1 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2 Andreas Krebbel <krebbel@linux.ibm.com>
4 PR tree-optimization/86844
5 * gimple-ssa-store-merging.c
6 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7 there are any overlapping stores in between them, make sure they are
8 also coalesced or we give up completely.
10 2018-09-12 Jakub Jelinek <jakub@redhat.com>
13 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
14 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
16 2018-09-12 Tom de Vries <tdevries@suse.de>
18 * common.opt (gdescribe-dies): Add option.
19 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
20 attribute for artifical and nameless decls.
21 (dwarf2out_register_external_die): Add description attribute to
22 external reference die.
23 (add_desc_attribute): New functions.
24 (gen_subprogram_die): Add description attribute to
25 DW_TAG_call_site_parameter.
26 * tree-pretty-print.c (print_generic_expr_to_str): New function.
27 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
28 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
30 (@item -gdescribe-dies): Add.
32 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
34 * tree-vrp.c (vrp_shift_undefined_p): Remove.
35 (extract_range_from_binary_expr_1: Call
36 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
37 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
40 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
42 * gimple-ssa-warn-alloca.c
43 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
44 field for ALLOCA_BOUND_*_LARGE.
46 2018-09-11 Nathan Sidwell <nathan@acm.org>
48 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
50 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
52 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
53 for clobbers. Remove obsolete comment.
55 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
57 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
58 mpxchk, mpxld and mpxst types.
59 (define_attr length_immediate): Remove all processing of mpx types.
60 (define_attr prefix_0f): Ditto.
61 (define_attr memory): Ditto.
63 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
65 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
66 (log<mode>2): Change operand 1 predicate to general_operand.
67 Extend operand 1 to XFmode and generate logxf3 insn.
68 (log10<mode>2): Change operand 1 predicate to general_operand.
69 Extend operand 1 to XFmode and generate log10xf3 insn.
70 (log2<mode>2): Change operand 1 predicate to general_operand.
71 Extend operand 1 to XFmode and generate log2xf3 insn.
72 (fyl2xp1_extend<mode>xf3_i387): Remove.
73 (log1p<mode>2): Change operand 1 predicate to general_operand.
74 Extend operand 1 to XFmode and generate log1pxf3 insn.
75 (fxtract_extend<mode>xf3_i387): Remove.
76 (logb<mode>2): Change operand 1 predicate to general_operand.
77 Extend operand 1 to XFmode and generate logbxf3 insn.
78 (ilogb<mode>2): Change operand 1 predicate to general_operand.
79 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
80 (significand<mode>2): Change operand 1 predicate to general_operand.
81 Extend operand 1 to XFmode and generate significandxf3 insn.
83 2018-09-11 Nathan Sidwell <nathan@acm.org>
85 * gcc.c (perror_with_name, pfatal_with_name): Delete.
86 (load_specs): Use fatal_error.
87 (DELETE_IF_ORDINARY, process_command): Use error.
88 (execute, run_attempt): Use fatal_error.
90 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
92 * diagnostic-core.h (sorry_at): New prototype.
93 * diagnostic.c (sorry_at): New function.
95 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
97 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
98 by zero as VR_UNDEFINED.
100 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
102 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
103 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
104 (<sincos>mode2): New expander.
105 (sincos_extend<mode>xf3_i387): Remove insn pattern.
106 (sincos -> sin, cos splitters): Remove splitter patterns.
107 (sincos<mode>3): Change operand 2 predicate to general_operand.
108 Extend operand 2 to XFmode and generate sincosxf3 insn.
109 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
110 Change operand 3 predicate to const1_operand.
111 (fptan_extend<mode>xf4_i387): Remove insn pattern.
112 (tanxf2): Update operands in the call to fptanxf4_i387.
113 (tan<mode>2): Change operand 1 predicate to general_operand.
114 Extend operand 1 to XFmode and generate tanxf3 insn.
115 (atan2xf3): Rename from *fpatanxf3_i387.
116 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
117 (atan2xf3): Remove expander.
118 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
119 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
120 (atan<mode>2): Change operand 1 predicate to general_operand.
121 Extend operand 1 to XFmode and generate atanxf3 insn.
123 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
125 * config/i386/i386.md (x87/SSE constant load splitter): Use
126 memory_operand instead of nonimmediate_operand for input operand
129 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
131 * config/i386/i386.md (float partial SSE register stall splitter): Move
132 splitter near its instruction pattern.
133 (float_extend partial SSE register stall splitter): Ditto.
134 (float_truncate partial SSE register stall splitter): Ditto.
136 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
139 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
140 to speculation_safe_value_not_needed.
143 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
144 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
145 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
146 leaf_function_p, instead use has_hard_reg_initial_val.
148 2018-09-09 Nathan Sidwell <nathan@acm.org>
150 * gcc.h (pfatal_with_name): Don't declare here.
151 * gcc.c (pfatal_with_name): Make static.
153 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
155 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
158 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
160 PR rtl-optimization/85458
161 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
162 priority hook to reduce the priority of EXPR.
164 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
166 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
167 DImode for x87 on 32bit targets. Conditionally disable x87 modes
168 with X87_ENABLE_FLOAT. Remove preparation code.
169 (*float<SWI48:mode><MODEF:mode>2): Rename from
170 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
171 math using "enabled" attribute.
172 (*floatdi<MODEF:mode>2_i387): Rename from
173 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
174 enable for 32bit targets only.
175 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
177 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
178 as operand 1 predicate. Rewrite as define_insn_and_split.
179 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
181 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
183 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
184 to fallthru to FLOAT case.
186 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
189 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
190 around folding of vec_sl to handle out of range shift values.
192 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
194 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
195 Update callers to gen_fix_trunc<mode>_i387_fisttp
196 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
197 nonimmediate_operand.
198 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
199 and corresponding splitters.
200 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
201 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
202 (fix_truncdi_i387_with_temp): Remove insn pattern
203 and corresponding splitters.
204 (fix_trunc<mode>_i387): Change operand 0 predicate to
205 nonimmediate_operand.
206 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
207 and corresponding splitters.
208 (*fistdi2_1): Remove.
210 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
211 (lrintxfdi2): Remove expander. Reimplement as define_insn.
212 (*fist<mode>2_1): Remove.
213 (fist<mode>2): Ditto.
214 (fist<mode>2_with_temp): Remove insn pattern and corresponding
216 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
217 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
218 (fistdi2_<rounding>): Change operand 0 predicate to
219 nonimmediate_operand.
220 (fistdi2_<rounding>_with_temp): Remove insn pattern
221 and corresponding splitters.
222 (fist<mode>2_<rounding>): Change operand 0 predicate to
223 nonimmediate_operand.
224 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
225 and corresponding splitters.
227 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
229 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
231 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
234 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
236 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
237 early gimple folding of vec_splat().
238 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
239 * gimple-fold.h: Add an extern define for tree_vec_extract().
241 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
243 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
244 wrappers around TREE_TYPE comparisons.
246 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
249 * config/s390/predicates.md: Add nonsym_memory_operand.
250 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
251 contains a SYMBOL_REF, load it into an intermediate pseudo.
252 (s390_emit_compare_and_swap): Legitimize operand.
253 * config/s390/s390.md: Use the new nonsym_memory_operand
254 with UNSPECV_CAS patterns.
256 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
259 * config/s390/s390-passes.def: New file.
260 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
262 (make_pass_s390_early_mach): Add declaration.
263 * config/s390/s390.c (make_pass_s390_early_mach):
264 (s390_option_override): Remove dynamic registration.
265 * config/s390/t-s390: Add s390-passes.def.
267 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
269 * config/s390/s390.c (s390_decompose_constant_pool_ref):
270 Remove UNSPEC_LTREL_BASE check.
271 (annotate_constant_pool_refs): Likewise.
272 (find_constant_pool_ref): Likewise.
273 (find_ltrel_base): Removed.
274 (replace_ltrel_base): Removed.
275 (s390_mainpool_finish): Remove replace_ltrel_base call.
276 (s390_chunkify_start): Remove pending LTREL_BASE logic.
277 (s390_chunkify_finish): Remove replace_ltrel_base call.
278 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
280 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
283 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
284 to speculation_safe_value_not_needed.
286 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
287 Bernd Schmidt <bernds_cb1@t-online.de>
289 * config/nvptx/nvptx-opts.h: New file.
290 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
291 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
293 (TARGET_SM35): New macro.
294 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
296 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
299 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
301 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
303 * config/i386/i386.md (truncdfsf2): Remove expander.
304 (truncdfsf2_with_temp): Ditto.
305 (truncxf<mode>2): Ditto.
306 (*truncdfsf_fast_mixed): Remove insn pattern.
307 (*truncdfsf_fast_i387): Ditto.
308 (*truncdfsf_mixed): Ditto.
309 (*truncdfsf_i387): Ditto.
310 (*truncdfsf2_i387_1): Ditto.
311 (*truncxfsf2_mixed): Ditto.
312 (*truncxfdf2_mixed): Ditto.
313 (*truncxf<mode>2_i387_noop): Ditto. Update callers
314 to call gen_truncxf<mode>2 instead.
315 (*truncxf<mode>2_i387): Remove.
316 (reg->reg splitters): Remove splitter pattern.
317 (reg->mem splitters): Ditto.
319 (truncdfsf2): New insn pattern.
320 (truncxf<mode>2): Ditto.
322 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
324 * tree-ssa-math-opts.c (is_mult_by): New function.
325 (is_square_of): Use the above.
326 (optimize_recip_sqrt): New function.
327 (pass_cse_reciprocals::execute): Use the above.
329 2018-09-05 Richard Biener <rguenther@suse.de>
332 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
333 to zero-init the emplaced vec.
335 2018-09-05 Martin Liska <mliska@suse.cz>
337 PR tree-optimization/87205
338 * tree-switch-conversion.c (pass_lower_switch::execute):
339 Group cases for switch statements.
341 2018-09-05 Richard Biener <rguenther@suse.de>
343 PR tree-optimization/87217
344 * tree-ssa-sccvn.c (vuse_valueize): New.
345 (vn_reference_lookup_pieces): Use it.
346 (vn_reference_lookup): Likewise.
348 2018-09-05 Nathan Sidwell <nathan@acm.org>
351 * stor-layout.c (place_field): Scan forwards to check last
352 bitfield when ms_bitfield_placement is in effect.
354 2018-09-05 Richard Biener <rguenther@suse.de>
357 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
360 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
361 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
363 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
364 * config.gcc (extra_objs): Build it.
365 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
367 * config/aarch64/aarch64-passes.def
368 (pass_tag_collision_avoidance): New pass.
369 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
370 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
371 (aarch64_classify_address): Remove static qualifier.
372 (aarch64_address_info, aarch64_address_type): Move to...
373 * config/aarch64/aarch64-protos.h: ... here.
374 (make_pass_tag_collision_avoidance): New function.
375 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
378 2018-09-05 Martin Liska <mliska@suse.cz>
380 * doc/gcov.texi: Update documentation of humar
382 * gcov.c (format_count): Print one decimal place, it provides
383 more fine number of situations like '1G' vs. '1.4G'.
385 2018-09-05 Martin Liska <mliska@suse.cz>
388 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
389 * optc-gen.awk: Allow 'Var' for Deprecated options in order
390 to generate a MASK value.
392 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
395 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
396 if frame pointer isn't used.
397 (compute_frame_pointer_to_fb_displacement): Likewise.
399 2018-09-04 Jakub Jelinek <jakub@redhat.com>
402 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
403 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
404 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
405 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
406 and OPTION_MASK_ISA_XSAVEC_UNSET.
408 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
410 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
411 XOR operations in NAND case.
413 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
415 * wide-int-range.cc (wide_int_range_convert): New.
416 * wide-int-range.h (wide_int_range_convert): New.
417 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
418 code into wide_int_range_convert.
419 (extract_range_into_wide_ints): Do not munge anti range constants
420 into the entire domain. Just return the range back.
422 2018-09-04 Martin Liska <mliska@suse.cz>
424 * genmatch.c (output_line_directive): Add new argument
426 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
428 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
430 * doc/invoke.texi (Option Summary): Add whitespace.
432 * doc/invoke.texi (Option Summary): Add -Waligned-new.
434 2018-09-04 Richard Biener <rguenther@suse.de>
436 PR tree-optimization/87211
437 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
438 backedge value we're supposed to treat as VARYING also number
439 the PHI to VARYING in case it got a different value-number already.
441 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
443 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
444 (extract_range_from_binary_expr_1): Do not call
445 vrp_can_optimize_bit_op.
446 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
448 (wide_int_range_get_mask_and_bounds): New.
449 (wide_int_range_optimize_bit_op): New.
450 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
451 (wide_int_range_bit_and): Same.
452 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
453 (wide_int_range_optimize_bit_op): New.
454 (wide_int_range_get_mask_and_bounds): New.
456 2018-09-04 Richard Biener <rguenther@suse.de>
458 PR tree-optimization/87176
459 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
460 variable. When value-numbering a virtual PHI node make sure
461 to not value-number to the backedge value.
463 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
465 * doc/extend.texi (Long Long, Hex Floats): Document support for
466 long long and hex floats in more recent versions of ISO C++.
468 2018-09-03 Richard Biener <rguenther@suse.de>
470 PR tree-optimization/87177
471 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
474 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
476 * bb-reorder.c (edge_order): Convert to C-qsort-style
477 tri-state comparator.
478 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
480 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
482 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
483 tri-state comparator.
484 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
486 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
488 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
489 (mergesort): ... here as maximum count for using netsort.
490 (gcc_qsort): Set nlim to 3 if stable sort is requested.
491 (gcc_stablesort): New.
492 * system.h (gcc_stablesort): Declare.
494 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
496 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
497 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
498 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
500 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
502 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
503 lxsdx and stxsdx alternatives.
504 (*mov<mode>_hardfloat64): Ditto.
505 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
507 2018-09-03 Richard Biener <rguenther@suse.de>
509 PR tree-optimization/87200
510 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
513 2018-09-03 Martin Liska <mliska@suse.cz>
515 PR tree-optimization/87201
516 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
517 Fix parenthesis in an expression.
519 2018-09-03 Richard Biener <rguenther@suse.de>
521 PR tree-optimization/87197
522 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
523 visited. CSE the VN_INFO hashtable lookup.
525 PR tree-optimization/87169
526 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
527 iterating make sure there's no extra backedges from irreducible
528 regions feeding the header. Mark the destination block
531 2018-09-03 Martin Liska <mliska@suse.cz>
534 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
535 * common/common-targhooks.c (default_get_valid_option_values):
537 * common/common-targhooks.h (default_get_valid_option_values):
539 * common/config/i386/i386-common.c: Move processor_target_table
541 (ix86_get_valid_option_values): New function.
542 (TARGET_GET_VALID_OPTION_VALUES): New macro.
543 * config/i386/i386.c (struct ptt): Move to i386-common.c.
544 (PTA_*): Move all defined masks into i386-common.c.
545 (ix86_function_specific_restore): Use new processor_cost_table.
546 * config/i386/i386.h (struct ptt): Moved from i386.c.
547 (struct pta): Likewise.
548 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
549 * doc/tm.texi.in: Likewise.
550 * opt-suggestions.c (option_proposer::suggest_option):
551 Pass prefix to build_option_suggestions.
552 (option_proposer::get_completions): Likewise.
553 (option_proposer::build_option_suggestions): Use the new target
555 * opts.c (struct option_help_tuple): New struct.
556 (print_filtered_help): Use the new target hook.
558 2018-09-03 Martin Liska <mliska@suse.cz>
561 * predict.c (set_even_probabilities): Add likely_edges
562 argument and handle cases where we have precisely one
564 (combine_predictions_for_bb): Catch also likely_edges.
565 (tree_predict_by_opcode): Handle gswitch statements.
566 * tree-cfg.h (find_case_label_for_value): New declaration.
567 (find_taken_edge_switch_expr): Likewise.
568 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
569 Find pivot in decision tree based on probabily, not by number of
572 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
574 * doc/standards.texi (Standards): Update Objective-C reference.
576 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
578 * doc/install.texi (Prerequisites): Update link for MPC.
580 2018-09-01 Michael Matz <matz@suse.de>
582 PR tree-optimization/87074
583 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
584 PHIs for outer-loop uses.
586 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
588 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
589 * doc/invoke.texi (C Dialect Options): Ditto.
591 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
593 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
595 2018-08-31 Richard Biener <rguenther@suse.de>
597 PR tree-optimization/87168
598 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
599 (rpo_elim::eliminate_avail): When OP was not visited it must
602 2018-08-31 David Malcolm <dmalcolm@redhat.com>
604 * tree-vrp.c (copy_value_range): Convert param "from" from
605 "value_range *" to "const value_range *".
606 (range_is_null): Likewise for param "vr".
607 (range_int_cst_p): Likewise.
608 (range_int_cst_singleton_p): Likewise.
609 (symbolic_range_p): Likewise.
610 (value_ranges_intersect_p): Likewise for both params.
611 (value_range_nonnegative_p): Likewise for param "vr".
612 (value_range_constant_singleton): Likewise.
613 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
614 (extract_range_into_wide_ints): Likewise for param "vr".
615 (extract_range_from_multiplicative_op): Likewise for params "vr0"
617 (vrp_can_optimize_bit_op): Likewise.
618 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
620 (extract_range_from_unary_expr): Likewise.
621 (debug_value_range): Likewise for param "vr".
622 (value_range::dump): Add "const" qualifier.
623 (vrp_prop::check_array_ref): Convert local "vr" from
624 "value_range *" to "const value_range *".
625 (vrp_prop::check_mem_ref): Likewise.
626 (vrp_prop::visit_stmt): Likewise for local "old_vr".
627 (vrp_intersect_ranges_1): Likewise for param "vr_1".
628 (vrp_intersect_ranges): Likewise.
629 (simplify_stmt_for_jump_threading): Likewise for local "vr".
630 (vrp_prop::vrp_finalize): Likewise.
631 * tree-vrp.h (value_range::dump): Add "const" qualifier.
632 (vrp_intersect_ranges): Add "const" qualifier to params as above.
633 (extract_range_from_unary_expr): Likewise.
634 (value_range_constant_singleton): Likewise.
635 (symbolic_range_p): Likewise.
636 (copy_value_range): Likewise.
637 (extract_range_from_binary_expr_1): Likewise.
638 (range_int_cst_p): Likewise.
639 (vrp_set_zero_nonzero_bits): Likewise.
640 (range_int_cst_singleton_p): Likewise.
642 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
644 * config/aarch64/arm_neon.h (vabsd_s64): New.
645 (vnegd_s64): Likewise.
647 2018-08-31 Martin Jambor <mjambor@suse.cz>
649 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
651 2018-08-31 Martin Liska <mliska@suse.cz>
653 * ipa-icf.c (sem_item::add_type): Use
654 sem_item::m_type_hash_cache.
655 * ipa-icf.h: Move the cache from sem_item_optimizer
658 2018-08-31 Nathan Sidwell <nathan@acm.org>
660 * doc/extend.texi (Backwards Compatibility): Remove implicit
661 extern C leeway of () being (...).
663 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
665 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
667 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
671 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
673 2018-08-31 Jakub Jelinek <jakub@redhat.com>
676 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
677 gen_int_mode. Formatting fixes.
679 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
681 * target.def (custom_function_descriptors): Improve documentation.
682 * doc/tm.texi.in (Trampolines): Expand discussion of function
683 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
684 beginning of the section.
685 * doc/tm.texi: Regenerated.
687 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
689 * cfg.h (class auto_edge_flag): Spell out the template-id of the
690 base class in the initializer list. This is a workaround for
691 building with older GCC.
692 (class auto_bb_flag): Likewise.
694 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
696 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
697 (altivec_vcmpequ<VI_char>_p): Remove star.
698 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
700 (expand_strncmp_vec_sequence): New function.
701 (emit_final_str_compare_vec): New function.
702 (expand_strn_compare): Add support for vector strncmp.
703 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
704 length specification to bytes.
705 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
706 (vcmpnezb_p): New pattern.
707 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
708 for option -mstring-compare-inline-limit.
710 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
712 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
713 (PTA_SKYLAKE): Add PTA_AES.
714 (PTA_GOLDMONT): Likewise.
716 2018-08-29 Jan Hubicka <jh@suse.cz>
719 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
720 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
722 2018-08-29 Jan Hubicka <jh@suse.cz>
724 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
726 (hash_tree): Do not visit TYPE_STUB_DECL.
727 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
728 stream TYPE_STUB_DECL.
729 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
730 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
731 after free_lang_data.
732 (type_in_anonymous_namespace_p): Likewise.
734 2018-08-29 Jan Hubicka <jh@suse.cz>
736 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
737 comment that it has to be even number.
738 (class sreal): Change m_sig type to int32_t.
739 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
740 int64_t for temporary calculations.
741 (sreal_verify_basics): Drop one bit from minimum and maximum.
743 2018-08-30 Richard Biener <rguenther@suse.de>
745 PR tree-optimization/87147
746 * tree-ssa-sccvn.c (SSA_VISITED): New function.
747 (visit_phi): When the degenerate result is from the backedge and
748 we didn't visit its definition yet drop to VARYING.
749 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
751 2018-08-29 Jan Hubicka <jh@suse.cz>
753 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
755 (hash_tree): Likewise.
757 2018-08-29 Jan Hubicka <jh@suse.cz>
759 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
760 and TYPE_NEXT_REF_TO.
762 2018-08-29 Jan Hubicka <jh@suse.cz>
764 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
765 comment that it has to be even number.
766 (class sreal): Change m_sig type to int32_t.
767 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
768 int64_t for temporary calculations.
769 (sreal_verify_basics): Drop one bit from minimum and maximum.
771 2018-08-30 Tamar Christina <tamar.christina@arm.com>
773 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
775 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
778 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
779 if to_add is negative.
781 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
784 * builtins.c (c_strlen): Improve range checks.
786 2018-08-29 Martin Sebor <msebor@redhat.com>
787 Jeff Law <law@redhat.com>
789 PR tree-optimization/86714
790 PR tree-optimization/86711
791 * builtins.c (c_strlen): Add arguments to call to string_constant.
792 * expr.c (string_constant): Add argument. Detect missing nul
793 terminator and outermost declaration it's missing in.
794 * expr.h (string_constant): Add argument.
795 * fold-const.c (read_from_constant_string): Add arguments to call to
797 (c_getstr): Likewise.
798 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
800 * tree-ssa-strlen.c (get_stridx): Likewise.
802 2018-08-29 Jan Hubicka <jh@suse.cz>
804 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
805 Do not stream DECL_VINDEX.
806 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
807 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
808 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
810 2018-08-29 Richard Biener <rguenther@suse.de>
812 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
813 virtual operands that are not default defs to honor region
815 (rpo_vn_valueize): Remove ineffective code here.
817 2018-08-29 Richard Biener <rguenther@suse.de>
819 PR tree-optimization/87132
820 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
821 when skipping defs reachable over backedges.
823 2018-08-29 Richard Biener <rguenther@suse.de>
825 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
826 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
827 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
828 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
829 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
830 (vn_reference_lookup_3): Remove use of const_parms.
831 (free_rpo_vn): Do not free const_parms.
832 (do_rpo_vn): Do not call init_const_parms.
833 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
834 SSA_NAME_POINTS_TO_READONLY_MEMORY.
835 (call_may_clobber_ref_p_1): Likewise.
837 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
840 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
842 (-ftree-scev-cprop): Document.
844 2018-08-29 Jan Hubicka <jh@suse.cz>
846 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
848 (sreal constructor): Update.
849 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
850 sreal:operator/): Update.
852 2018-08-29 Martin Liska <mliska@suse.cz>
854 * tree-switch-conversion.c (switch_conversion::expand):
855 Strenghten assumption about gswitch statements.
857 2018-08-29 Richard Biener <rguenther@suse.de>
859 PR tree-optimization/87117
860 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
861 re-value-number released SSA VDEFs.
863 2018-08-29 Richard Biener <rguenther@suse.de>
865 PR tree-optimization/87126
866 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
868 2018-08-28 Jim Wilson <jimw@sifive.com>
870 * config/riscv/pic.md: Rewrite.
871 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
873 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
874 (SOFTF, default_load, softload, softstore): New.
876 2018-08-28 Jeff Law <law@redhat.com>
878 * fold-const.c (fold_binary_loc): Remove recently added assert.
880 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
882 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
883 to OP parmeter of generated function.
885 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
887 PR tree-optimization/87009
888 * match.pd: Add boolean optimizations.
890 2018-08-28 Martin Sebor <msebor@redhat.com>
893 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
894 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
895 (pass_walloca::gate): Use it.
896 (alloca_call_type): Same.
897 (pass_walloca::execute): Same.
898 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
900 2018-08-28 David Malcolm <dmalcolm@redhat.com>
902 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
903 GCC_VERSION for usage of "__gcc_dump_printf__" format from
906 2018-08-28 Richard Biener <rguenther@suse.de>
908 PR tree-optimization/87124
909 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
910 constants before looking up avail.
912 2018-08-28 Jakub Jelinek <jakub@redhat.com>
915 * calls.c (maybe_warn_nonstring_arg): Punt early if
916 warn_stringop_overflow is zero. Don't call get_range_strlen
917 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
918 Swap comparison operands to have constants on rhs. Only use
919 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
922 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
924 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
925 use of tree_to_shwi. Remove duplicated test for the size being
926 a whole number of bytes.
928 2018-08-28 Richard Biener <rguenther@suse.de>
930 PR tree-optimization/87117
931 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
932 Handle removed stmt without LHS (GIMPLE_NOP).
934 2018-08-28 Richard Biener <rguenther@suse.de>
936 PR tree-optimization/87117
937 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
938 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
940 2018-08-28 Richard Biener <rguenther@suse.de>
942 PR tree-optimization/87117
943 * tree-ssa-pre.c (compute_avail): Do not make expressions
944 with predicated values available.
945 (get_expr_value_id): Assert we do not run into predicated value
948 2018-08-28 Richard Biener <rguenther@suse.de>
950 PR tree-optimization/87117
951 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
952 get virtual operands.
953 (get_expr_operands): Handle STRING_CST like other decls.
955 2018-08-28 Martin Liska <mliska@suse.cz>
957 * tree.h: Update documentation of fndecl_built_in_p
961 2018-08-27 Jeff Law <law@redhat.com>
962 PR tree-optimization/87110
963 * tree-ssa-dse.c (compute_trims): Handle non-constant
966 2018-08-27 Martin Sebor <msebor@redhat.com>
968 PR tree-optimization/86914
969 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
971 2018-08-27 Martin Sebor <msebor@redhat.com>
973 PR tree-optimization/87112
974 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
975 the type of the bound argument.
977 2018-08-27 Jeff Law <law@redhat.com>
979 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
980 type does not have a TYPE_SIZE_UNIT.
982 2018-08-27 Steve Ellcey <sellcey@cavium.com>
984 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
985 with include of backend.h.
987 2018-08-27 Richard Biener <rguenther@suse.de>
989 PR tree-optimization/86927
990 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
991 use const cond reduction code.
993 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
995 PR tree-optimization/85758
996 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
998 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1001 * diagnostic-show-locus.c (class layout_range): Update for
1002 conversion of show_caret_p to a tri-state.
1003 (layout_range::layout_range): Likewise.
1004 (make_range): Likewise.
1005 (layout::maybe_add_location_range): Likewise.
1006 (layout::should_print_annotation_line_p): Don't show annotation
1007 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1008 (layout::get_state_at_point): Update for conversion of
1009 show_caret_p to a tri-state. Bail out early for
1010 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1011 underlining or source colorization.
1012 (gcc_rich_location::add_location_if_nearby): Update for conversion
1013 of show_caret_p to a tri-state.
1014 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1015 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1017 (selftest::test_one_liner_labels): Likewise.
1018 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1019 conversion of show_caret_p to a tri-state.
1020 * pretty-print.c (text_info::set_location): Likewise.
1021 * pretty-print.h (text_info::set_location): Likewise.
1022 * substring-locations.c (format_warning_n_va): Likewise.
1023 * tree-diagnostic.c (default_tree_printer): Likewise.
1024 * tree-pretty-print.c (newline_and_indent): Likewise.
1026 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1029 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1030 line above for line-insertion fix-it hints.
1031 (selftest::test_fixit_insert_containing_newline): Update the
1032 expected results, and add a test with line-numbering enabled.
1034 2018-08-27 Martin Liska <mliska@suse.cz>
1037 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1038 params with DECL_HAS_VALUE_EXPR_P.
1040 2018-08-27 Martin Liska <mliska@suse.cz>
1042 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1043 selected expansion strategy.
1045 2018-08-27 Martin Liska <mliska@suse.cz>
1047 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1048 * builtins.c (is_builtin_fn): Likewise.
1049 * attribs.c (diag_attr_exclusions): Use new function
1050 fndecl_built_in_p and remove check for FUNCTION_DECL if
1052 (builtin_mathfn_code): Likewise.
1053 (fold_builtin_expect): Likewise.
1054 (fold_call_expr): Likewise.
1055 (fold_builtin_call_array): Likewise.
1056 (fold_call_stmt): Likewise.
1057 (set_builtin_user_assembler_name): Likewise.
1058 (is_simple_builtin): Likewise.
1059 * calls.c (gimple_alloca_call_p): Likewise.
1060 (maybe_warn_nonstring_arg): Likewise.
1061 * cfgexpand.c (expand_call_stmt): Likewise.
1062 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1063 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1064 (cgraph_node::verify_node): Likewise.
1065 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1066 (cgraph_node::create_clone): Likewise.
1067 * config/arm/arm.c (arm_insert_attributes): Likewise.
1068 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1069 * dse.c (scan_insn): Likewise.
1070 * expr.c (expand_expr_real_1): Likewise.
1071 * fold-const.c (operand_equal_p): Likewise.
1072 (fold_binary_loc): Likewise.
1073 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1074 * gimple-low.c (lower_stmt): Likewise.
1075 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1076 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1077 * gimple.c (gimple_build_call_from_tree): Likewise.
1078 (gimple_call_builtin_p): Likewise.
1079 (gimple_call_combined_fn): Likewise.
1080 * gimplify.c (gimplify_call_expr): Likewise.
1081 (gimple_boolify): Likewise.
1082 (gimplify_modify_expr): Likewise.
1083 (gimplify_addr_expr): Likewise.
1084 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1085 * ipa-cp.c (determine_versionability): Likewise.
1086 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1087 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1088 * ipa-split.c (visit_bb): Likewise.
1089 (split_function): Likewise.
1090 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1091 * lto-cgraph.c (input_node): Likewise.
1092 * lto-streamer-out.c (write_symbol): Likewise.
1093 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1094 (lower_omp_1): Likewise.
1095 * predict.c (strip_predict_hints): Likewise.
1096 * print-tree.c (print_node): Likewise.
1097 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1098 * trans-mem.c (is_tm_irrevocable): Likewise.
1099 (is_tm_load): Likewise.
1100 (is_tm_simple_load): Likewise.
1101 (is_tm_store): Likewise.
1102 (is_tm_simple_store): Likewise.
1103 (is_tm_abort): Likewise.
1104 (tm_region_init_1): Likewise.
1105 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1106 * tree-cfg.c (verify_gimple_call): Likewise.
1107 (move_stmt_r): Likewise.
1108 (stmt_can_terminate_bb_p): Likewise.
1109 * tree-eh.c (lower_eh_constructs_2): Likewise.
1110 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1111 * tree-inline.c (remap_gimple_stmt): Likewise.
1112 (copy_bb): Likewise.
1113 (estimate_num_insns): Likewise.
1114 (fold_marked_statements): Likewise.
1115 * tree-sra.c (scan_function): Likewise.
1116 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1117 (optimize_stack_restore): Likewise.
1118 (pass_fold_builtins::execute): Likewise.
1119 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1120 (mark_all_reaching_defs_necessary_1): Likewise.
1121 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1122 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1123 (pass_forwprop::execute): Likewise.
1124 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1125 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1126 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1127 * tree-ssa-strlen.c (get_string_length): Likewise.
1128 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1129 (find_func_aliases_for_call): Likewise.
1130 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1131 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1132 * tree-tailcall.c (find_tail_calls): Likewise.
1133 * tree.c (need_assembler_name_p): Likewise.
1134 (free_lang_data_in_decl): Likewise.
1135 (get_call_combined_fn): Likewise.
1136 * ubsan.c (is_ubsan_builtin_p): Likewise.
1137 * varasm.c (incorporeal_function_p): Likewise.
1138 * tree.h (DECL_BUILT_IN): Remove and replace with
1140 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1141 (fndecl_built_in_p): New.
1143 2018-08-27 Martin Liska <mliska@suse.cz>
1145 PR tree-optimization/86847
1146 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1147 Dump also subtree probability.
1148 (switch_decision_tree::do_jump_if_equal): New function.
1149 (switch_decision_tree::emit_case_nodes): Handle special
1150 situations in balanced tree that can be emitted much simpler.
1151 Fix calculation of probabilities that happen in tree expansion.
1152 * tree-switch-conversion.h (struct cluster): Add
1154 (struct simple_cluster): Likewise.
1155 (struct case_tree_node): Add new function has_child.
1156 (do_jump_if_equal): New.
1158 2018-08-27 Martin Liska <mliska@suse.cz>
1160 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1161 Add new argument to bit_test_cluster constructor.
1162 (bit_test_cluster::emit): Set bits really number of values
1164 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1165 probability argument.
1166 * tree-switch-conversion.h (struct bit_test_cluster):
1167 Add m_handles_entire_switch.
1169 2018-08-27 Martin Liska <mliska@suse.cz>
1171 PR tree-optimization/86702
1172 * tree-switch-conversion.c (jump_table_cluster::emit):
1173 Make probabilities even for values in jump table
1174 according to number of cases handled.
1175 (switch_decision_tree::compute_cases_per_edge): Pass
1176 argument to reset_out_edges_aux function.
1177 (switch_decision_tree::analyze_switch_statement): Likewise.
1178 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1181 2018-08-27 Martin Liska <mliska@suse.cz>
1183 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1184 cfun argument explicitly.
1185 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1186 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1187 function gimple_switch_default_bb.
1188 (convert_switch_statements):
1190 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1191 * stmt.c (label_to_block_fn): Use label_to_block and pass
1192 cfun argument explicitly and use gimple_switch_label_bb.
1193 (expand_case): Likewise.
1194 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1195 cfun argument explicitly. Likewise.
1196 (make_edges_bb): Likewise.
1197 (make_cond_expr_edges): Likewise.
1198 (get_cases_for_edge): Likewise.
1199 (make_gimple_switch_edges): Likewise.
1200 (label_to_block_fn): Likewise.
1201 (label_to_block): Likewise.
1202 (make_goto_expr_edges): Likewise.
1203 (make_gimple_asm_edges): Likewise.
1204 (main_block_label): Likewise.
1205 (group_case_labels_stmt): Likewise.
1206 (find_taken_edge_computed_goto): Likewise.
1207 (find_taken_edge_switch_expr): Likewise.
1208 (gimple_verify_flow_info): Likewise.
1209 (gimple_redirect_edge_and_branch): Likewise.
1210 (gimple_switch_label_bb): New function.
1211 (gimple_switch_default_bb): Likewise.
1212 (gimple_switch_edge): Likewise.
1213 (gimple_switch_default_edge): Likewise.
1214 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1215 (label_to_block): ... with this.
1216 (gimple_switch_label_bb): New.
1217 (gimple_switch_default_bb): Likewise.
1218 (gimple_switch_edge): Likewise.
1219 (gimple_switch_default_edge): Likewise.
1220 * tree-cfgcleanup.c (convert_single_case_switch): Use
1221 new gimple functions and pass new argument to label_to_block.
1222 (cleanup_control_flow_bb):
1223 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1224 cfun argument explicitly.
1225 (make_eh_edges): Likewise.
1226 (redirect_eh_dispatch_edge): Likewise.
1227 (lower_resx): Likewise.
1228 (lower_eh_dispatch): Likewise.
1229 (maybe_remove_unreachable_handlers): Likewise.
1230 (unsplit_eh): Likewise.
1231 (cleanup_empty_eh): Likewise.
1232 (verify_eh_edges): Likewise.
1233 (verify_eh_dispatch_edge): Likewise.
1234 * tree-ssa-dom.c (record_edge_info): Likewise.
1235 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1236 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1237 (thread_through_normal_block): Likewise.
1238 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1239 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1240 * tree-switch-conversion.c (switch_conversion::collect): Use new
1242 (switch_conversion::check_final_bb): Likewise.
1243 (switch_conversion::gather_default_values): Pass new argument
1245 (switch_conversion::build_constructors): Likewise.
1246 (switch_decision_tree::compute_cases_per_edge): Use new
1247 gimple_switch_edge function.
1248 (switch_decision_tree::analyze_switch_statement): Pass new argument
1250 (switch_decision_tree::try_switch_expansion): Use
1251 gimple_switch_default_edge.
1252 * tree-vrp.c (find_switch_asserts): Pass new argument
1254 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1255 (vr_values::simplify_switch_using_ranges): Likewise.
1257 2018-08-27 Richard Biener <rguenther@suse.de>
1259 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1260 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1262 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1263 (struct vn_nary_op_s): Add unwind_to member. Add
1264 predicated_values flag and put result into a union together
1265 with a linked list of vn_pval.
1266 (struct vn_ssa_aux): Add name member to make maintaining
1267 a map of SSA name to vn_ssa_aux possible. Remove no longer
1268 needed info, dfsnum, low, visited, on_sccstack, use_processed
1269 and range_info_anti_range_p members.
1270 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1271 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1273 (vn_valueize): New global.
1274 (vn_context_bb): Likewise.
1275 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1276 VN_INFO_PTR_INFO): Remove.
1277 * tree-ssa-sccvn.c: ... (rewrite)
1278 (pass_fre::execute): For -O2+ initialize loops and run
1279 RPO VN in optimistic mode (iterating). For -O1 and -Og
1280 run RPO VN in non-optimistic mode.
1281 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1282 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1283 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1284 (rpo-vn-max-loop-depth): Document.
1285 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1286 when valuezing the VUSE signals we walked out of the region.
1287 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1288 (phi_translate): Set VN context block to use for availability
1290 (compute_avail): Likewise.
1291 (pre_valueize): New function.
1292 (pass_pre::execute): Adjust to the RPO VN API.
1294 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1295 (propagate_constants_for_unrolling): Remove.
1296 (tree_unroll_loops_completely): Perform value-numbering
1297 on the unrolled bodies loop parent.
1299 2018-08-27 Richard Biener <rguenther@suse.de>
1301 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1302 for partial antic compute.
1304 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1306 PR rtl-optimization/87065
1307 * combine.c (simplify_if_then_else): Formatting fix.
1308 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1310 (known_cond): Don't return const_true_rtx for vector modes. Use
1311 CONST0_RTX instead of const0_rtx. Formatting fixes.
1313 2018-08-27 Martin Liska <mliska@suse.cz>
1315 PR gcov-profile/87069
1316 * gcov.c (process_file): Record files already processed
1317 and warn about a file being processed multiple times.
1319 2018-08-27 Martin Liska <mliska@suse.cz>
1322 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1323 Set default values for x_aarch64_*_string strings.
1324 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1325 prefix. For -mabi do not print '=ABI' in help and use
1326 <option_value> format for -msve-vector-bits and -moverride
1329 2018-08-26 Jeff Law <law@redhat.com>
1331 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1334 2018-08-26 Marek Polacek <polacek@redhat.com>
1336 PR c++/87029, Implement -Wredundant-move.
1337 * doc/invoke.texi: Document -Wredundant-move.
1339 2018-08-25 Martin Sebor <msebor@redhat.com>
1341 PR tree-optimization/87059
1342 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1343 to the same type as the other.
1344 * fold-const.c (fold_binary_loc): Assert expectation.
1346 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1348 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1349 extraneous parentheses, dead code section and formatting.
1351 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1354 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1355 wide enough for jumps in the line-numbering to be visible.
1356 (layout::print_gap_in_line_numbering): New member function.
1357 (layout::calculate_line_spans): When using line numbering, merge
1358 line spans that are only 1 line apart.
1359 (diagnostic_show_locus): When printing line numbers, show gaps in
1360 line numbering directly, rather than printing headers.
1361 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1362 line-numbering with multiple line spans.
1363 (selftest::test_fixit_insert_containing_newline_2): Add test of
1364 line-numbering, in which the spans are close enough to be merged.
1366 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1368 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1369 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1370 * tree-vrp.c (range_is_nonnull): Remove.
1371 (range_includes_zero_p): Accept value_range instead of min/max.
1372 (extract_range_from_binary_expr_1): Do not early bail on
1374 Use range_includes_zero_p instead of range_is_nonnull.
1375 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1376 of range_is_nonnull.
1377 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1378 special case VR_ANTI_RANGE.
1379 (vrp_finalize): Same.
1380 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1382 (range_is_nonnull): Remove.
1383 * vr-values.c (vrp_stmt_computes_nonzero): Use
1384 range_includes_zero_p instead of range_is_nonnull.
1385 (extract_range_basic): Pass value_range to range_includes_zero_p
1386 instead of range_is_nonnull.
1388 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1390 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1391 * emit-rtl.h (rtl_data): Remove return_bnd.
1392 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1393 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1394 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1395 (POINTER_BOUNDS_MODE): Remove definition.
1396 (make_pointer_bounds_mode): Remove.
1397 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1398 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1399 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1400 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1401 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1402 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1403 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1405 * config/i386/i386-modes.def (BND32, BND64): Remove.
1406 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1407 (dbx64_register_map): Ditto.
1408 (svr4_dbx_register_map): Ditto.
1409 (indirect_thunk_bnd_needed): Remove.
1410 (indirect_thunks_bnd_used): Ditto.
1411 (indirect_return_bnd_needed): Ditto.
1412 (indirect_return_via_cx_bnd): Ditto.
1413 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1414 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1415 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1416 (output_indirect_thunk_function): Remove handling of
1417 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1418 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1419 (ix86_save_reg): Remove handling of crtl->return_bnd.
1420 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1421 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1422 and UNSPEC_BNDLX_ADDR.
1423 (ix86_output_indirect_branch_via_reg): Remove handling of
1424 indirect_thunk_prefix_bnd.
1425 (ix86_output_indirect_branch_via_push): Ditto.
1426 (ix86_output_function_return): Ditto.
1427 (ix86_output_indirect_function_return): Ditto.
1428 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1429 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1430 (CALL_USED_REGISTERS): Ditto.
1431 (REG_ALLOC_ORDER): Update for removal of bound registers.
1432 (HI_REGISTER_NAMES): Ditto.
1433 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1434 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1435 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1436 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1437 (FIRST_PSEUDO_REG): Update.
1438 (BND): Remove mode iterator.
1439 * config/i386/predicates.md (bnd_mem_operator): Remove.
1441 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1443 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1446 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1448 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1449 the case in which the permute needs only a single element and
1450 repeats for every vector of the result. Extend that case to
1451 handle variable-length vectors.
1452 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1454 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1457 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1458 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1460 2018-08-24 Richard Biener <rguenther@suse.de>
1462 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1463 bb_flags_allocated members.
1464 (auto_flag): New RAII class for allocating flags.
1465 (auto_edge_flag): New RAII class for allocating edge flags.
1466 (auto_bb_flag): New RAII class for allocating bb flags.
1467 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1469 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1470 in favor of temporarily allocated BB flag.
1471 * hsa-brig.c: Re-order includes.
1472 * hsa-dump.c: Likewise.
1473 * hsa-regalloc.c: Likewise.
1474 * print-rtl.c: Likewise.
1475 * profile-count.c: Likewise.
1477 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1480 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1483 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1486 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1487 from wide_int_range_multiplicative_op.
1489 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1491 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1494 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1496 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1499 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1501 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1502 full GENERIC expression used for replacement.
1504 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1506 * tree-vrp.c (abs_extent_range): Remove.
1507 (extract_range_into_wide_ints): Pass wide ints by reference.
1508 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1509 Pass wide ints by reference in all calls to
1510 extract_range_into_wide_ints.
1511 * wide-int-range.cc (wide_int_range_div): New.
1512 * wide-int-range.h (wide_int_range_div): New.
1513 (wide_int_range_includes_zero_p): New.
1514 (wide_int_range_zero_p): New.
1516 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1518 * config/aarch64/aarch64.md (arches): New enum.
1519 (arch): New enum attr.
1520 (arch_enabled): New attr.
1521 (enabled): Now uses arch_enabled only.
1522 (simd, sve, fp16): Removed attribute.
1523 (fp): Attr now defined in terms of 'arch'.
1524 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1525 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1526 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1527 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1528 attributes into 'arch'.
1529 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1530 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1531 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1532 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1533 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1534 'simd' attribute into 'arch'.
1535 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1536 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1537 Convert use of 'fp' attribute to 'arch'.
1538 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1539 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1541 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1542 (different modes) Merge 'fp' and 'simd' into 'arch'.
1543 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1546 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1548 PR rtl-optimization/87026
1549 * expmed.c (canonicalize_comparison): If we can no longer create
1550 pseudoregisters, don't.
1552 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1555 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1557 * config/arm/arm.c (speculation_barrier_libfunc): New static
1559 (arm_init_libfuncs): Initialize it.
1560 (arm_emit_speculation_barrier): New function.
1561 * config/arm/arm.md (speculation_barrier): Call
1562 arm_emit_speculation_barrier for architectures that do not have
1564 (speculation_barrier_insn): Only match on Armv7 or later.
1566 2018-08-23 Richard Biener <rguenther@suse.de>
1569 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1572 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1574 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1575 of single-vector TBLs.
1576 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1579 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1582 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1583 aarch64_evpc_tbl guard.
1585 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1587 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1590 2018-08-22 Martin Sebor <msebor@redhat.com>
1593 * tree-pretty-print.c (pretty_print_string): Add argument.
1594 (dump_generic_node): Call to pretty_print_string with string size.
1596 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1598 PR rtl-optimization/86771
1599 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1600 of two SETs into those two SETs, one to be placed at i2, if that SETs
1601 destination is modified between i2 and i3.
1603 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1605 PR tree-optimization/86725
1606 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1608 (vect_analyze_scalar_cycles_1): Check it.
1610 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1612 PR tree-optimization/86725
1613 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1614 an outer loop phi as a double reduction, make sure that the
1615 single user of the phi result is an inner loop phi.
1617 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1619 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1620 grouped stores with gaps to a strided group.
1622 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1624 * tree-vect-stmts.c (get_group_load_store_type)
1625 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1626 first statement in a group.
1628 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1630 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1631 the sequence used in gcc/gcc.c.
1633 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1636 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1639 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1641 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1642 Darwin10-specific unwinder-shim.
1643 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1644 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1645 New to cater for Darwin10 Rosetta.
1647 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1649 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1650 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1652 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1657 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1658 (dwarf2out_switch_text_section): Generate a local label for the
1659 second function sub-section and apply it as the second FDE start
1661 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1662 second sub-section start.
1664 2018-08-22 Richard Biener <rguenther@suse.de>
1666 PR tree-optimization/86988
1667 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1669 2018-08-22 Richard Biener <rguenther@suse.de>
1671 PR tree-optimization/86945
1672 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1674 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1676 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1677 a comment about how uses of r2 for .sdata2 come about.
1679 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1681 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1683 2018-08-21 Marek Polacek <polacek@redhat.com>
1685 PR c++/86981, Implement -Wpessimizing-move.
1686 * doc/invoke.texi: Document -Wpessimizing-move.
1688 2018-08-21 Jan Hubicka <jh@suse.cz>
1690 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1691 * tree.h (is_redundant_typedef): Remove.
1692 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1694 2018-08-21 Jan Hubicka <jh@suse.cz>
1696 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1699 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1701 * expmed.c (extract_low_bits): Reject invalid subregs early.
1703 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1706 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1709 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1711 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1712 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1713 * config/vxworks.c: Likewise.
1715 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1717 * config/vxworks.c: Set targetm.have_ctors_dtors
1718 if HAVE_INITFINI_ARRAY_SUPPORT.
1719 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1720 if HAVE_INITFINI_ARRAY_SUPPORT.
1722 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1724 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1725 default search path for VxWorks < 7.
1727 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1729 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1730 (get_format_string): Refer to c_getstr.
1732 2018-08-21 Tom de Vries <tdevries@suse.de>
1734 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1735 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1736 (debuginfo_early_stop): Declare.
1737 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1738 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1739 (debuginfo_early_stop): New function.
1740 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1741 and debuginfo_early_stop.
1742 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1743 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1744 (general_init): Call debuginfo_early_init.
1745 (finalize): Call debuginfo_fini.
1746 (do_compile): Call debuginfo_init.
1747 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1749 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1751 2018-08-21 Tom de Vries <tdevries@suse.de>
1753 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1754 flag_dump_noaddr and flag_dump_unnumbered.
1756 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1758 * wide-int-range.cc (wide_int_range_abs): New.
1759 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1760 * wide-int-range.h (wide_int_range_abs): New.
1761 (wide_int_range_min_max): New.
1762 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1763 case to call wide_int_range_abs.
1764 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1765 (extract_range_from_abs_expr): Delete.
1767 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1770 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1771 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1774 2018-08-20 Nathan Sidwell <nathan@acm.org>
1775 Jeff Law <law@redhat.com>
1777 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1778 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1780 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1783 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1784 (decl_attributes): Likewise.
1785 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1787 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1788 * diagnostic-core.h (class auto_diagnostic_group): New class.
1789 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1790 (diagnostic_report_diagnostic): Handle the first diagnostics within
1792 (emit_diagnostic): Add auto_diagnostic_group instance.
1794 (inform_n): Likewise.
1795 (warning): Likewise.
1796 (warning_at): Likewise.
1797 (warning_n): Likewise.
1798 (pedwarn): Likewise.
1799 (permerror): Likewise.
1801 (error_n): Likewise.
1802 (error_at): Likewise.
1804 (fatal_error): Likewise.
1805 (internal_error): Likewise.
1806 (internal_error_no_backtrace): Likewise.
1807 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1808 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1809 * diagnostic.h (struct diagnostic_context): Add fields
1810 "diagnostic_group_nesting_depth",
1811 "diagnostic_group_emission_count", "begin_group_cb",
1813 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1814 Add auto_diagnostic_group instance(s).
1815 (find_explicit_erroneous_behavior): Likewise.
1816 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1817 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1818 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1819 (gimplify_va_arg_expr): Likewise.
1820 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1821 (HSA_SORRY_AT): Likewise.
1822 * ipa-devirt.c (compare_virtual_tables): Likewise.
1823 (warn_odr): Likewise.
1824 * multiple_target.c (expand_target_clones): Likewise.
1825 * opts-common.c (cmdline_handle_error): Likewise.
1826 * reginfo.c (globalize_reg): Likewise.
1827 * substring-locations.c (format_warning_n_va): Likewise.
1828 * tree-inline.c (expand_call_inline): Likewise.
1829 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1830 * tree-ssa-loop-niter.c
1831 (do_warn_aggressive_loop_optimizations): Likewise.
1832 * tree-ssa-uninit.c (warn_uninit): Likewise.
1833 * tree.c (warn_deprecated_use): Likewise.
1835 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1838 * config/i386/i386.md (eh_return): Always update EH return
1839 address in word_mode.
1841 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1843 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1844 TARGET_SPLIT_COMPLEX_ARG is defined.
1846 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1848 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1850 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1853 * expr.c (expand_assignment): Assert that bitpos is positive.
1854 (store_field): Likewise
1855 (expand_expr_real_1): Make sure that bitpos is positive.
1856 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1859 2018-08-20 Nathan Sidwell <nathan@acm.org>
1861 * Makefile.in (CPP_ID_DATA_H): Delete.
1862 (CPP_INTERNAL_H): Don't add it.
1863 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1864 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1866 2018-08-20 Richard Biener <rguenther@suse.de>
1868 PR tree-optimization/78655
1869 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1870 pointer + offset nonnull if either operand is nonnull work.
1872 2018-08-20 Tom de Vries <tdevries@suse.de>
1874 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1875 unless the referenced die describes the added property using
1876 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1877 Otherwise, add a DW_AT_location to the referenced die.
1879 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1882 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1883 register_operand when calling ix86_set_reg_reg_cost.
1884 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1885 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1886 predicate and to 1 otherwise.
1888 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1890 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1891 emit a diagnostic that it is not supported and reset the option.
1892 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1893 supported and consume the option. (ASM_FINAL_SPEC): New.
1895 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1897 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1900 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1902 C-SKY port: Documentation
1904 * doc/extend.texi (C-SKY Function Attributes): New section.
1905 * doc/invoke.texi (Option Summary): Add C-SKY options.
1906 (C-SKY Options): New section.
1907 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1909 2018-08-17 Jojo <jijie_rong@c-sky.com>
1910 Huibin Wang <huibin_wang@c-sky.com>
1911 Sandra Loosemore <sandra@codesourcery.com>
1912 Chung-Lin Tang <cltang@codesourcery.com>
1914 C-SKY port: Backend implementation
1916 * config/csky/*: New.
1917 * common/config/csky/*: New.
1919 2018-08-17 Jojo <jijie_rong@c-sky.com>
1920 Huibin Wang <huibin_wang@c-sky.com>
1921 Sandra Loosemore <sandra@codesourcery.com>
1922 Chung-Lin Tang <cltang@codesourcery.com>
1923 Andrew Jenner <andrew@codesourcery.com>
1925 C-SKY port: Configury
1927 * config.gcc (csky-*-*): New.
1928 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1929 * configure: Regenerated.
1931 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1933 * dump-context.h: Include "dumpfile.h".
1934 (dump_context::dump_printf_va): Convert final param from va_list
1935 to va_list *. Convert from ATTRIBUTE_PRINTF to
1936 ATTRIBUTE_GCC_DUMP_PRINTF.
1937 (dump_context::dump_printf_loc_va): Likewise.
1938 * dumpfile.c: Include "stringpool.h".
1939 (make_item_for_dump_printf_va): Delete.
1940 (make_item_for_dump_printf): Delete.
1941 (class dump_pretty_printer): New class.
1942 (dump_pretty_printer::dump_pretty_printer): New ctor.
1943 (dump_pretty_printer::emit_items): New member function.
1944 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1946 (dump_pretty_printer::emit_item): New member function.
1947 (dump_pretty_printer::stash_item): New member function.
1948 (dump_pretty_printer::format_decoder_cb): New member function.
1949 (dump_pretty_printer::decode_format): New member function.
1950 (dump_context::dump_printf_va): Reimplement in terms of
1951 dump_pretty_printer.
1952 (dump_context::dump_printf_loc_va): Convert final param from va_list
1954 (dump_context::begin_scope): Reimplement call to
1955 make_item_for_dump_printf.
1956 (dump_printf): Update for change to dump_printf_va.
1957 (dump_printf_loc): Likewise.
1958 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1959 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1960 with %T, %E, and %G.
1961 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1962 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1963 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1964 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1965 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1966 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1967 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1968 within a dump_printf_loc call to "%wu".
1969 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1970 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1971 missing space after "=".
1972 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1973 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1974 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1975 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1976 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1977 duplicate "vectorized" from message.
1979 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1981 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1982 polyNxK_t element's TYPE_STRING_FLAG.
1984 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1986 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1987 (they were unnamed before). Fix comments.
1989 2018-08-17 Nathan Sidwell <nathan@acm.org>
1991 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1993 2018-08-17 Richard Biener <rguenther@suse.de>
1995 PR tree-optimization/86841
1996 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1998 2018-08-17 Martin Liska <mliska@suse.cz>
2000 * common.opt: Remove Warn, Init and Report for options with
2001 Ignore/Deprecated flag. Warning is done automatically for
2003 * config/i386/i386.opt: Likewise.
2004 * config/ia64/ia64.opt: Likewise.
2005 * config/rs6000/rs6000.opt: Likewise.
2006 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2007 Remove usage of flag_check_pointer_bounds.
2008 * lto-wrapper.c (merge_and_complain): Do not handle
2009 OPT_fcheck_pointer_bounds.
2010 (append_compiler_options): Likewise.
2011 * opt-functions.awk: Do not handle Deprecated.
2012 * optc-gen.awk: Check that Var, Report and Init are not
2013 used for an option with Ignore/Deprecated flag.
2014 * opts-common.c (decode_cmdline_option): Do not report
2016 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2018 * opts.h (struct cl_option): Remove cl_deprecated flag.
2019 (CL_ERR_DEPRECATED): Remove error enum value.
2021 2018-08-17 Richard Biener <rguenther@suse.de>
2024 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2025 across a va-arg-pack using call adjust its return value accordingly.
2027 2018-08-16 Martin Sebor <msebor@redhat.com>
2029 PR tree-optimization/86853
2030 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2031 (struct fmtresult): Add member and initialize it in ctors.
2032 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2033 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2034 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2035 (parse_directive): Handle %C same as %c.
2036 (sprintf_dom_walker::compute_format_length): Adjust.
2037 (is_call_safe): Adjust.
2039 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2041 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2042 for determining how to count the elements.
2043 * builtins.h (c_strlen): Adjust prototype.
2044 * expr.c (string_constant): Add new parameter mem_size.
2045 Set *mem_size appropriately.
2046 * expr.h (string_constant): Adjust protoype.
2047 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2048 * gimple-fold.h (get_range_strlen): Adjust prototype.
2049 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2050 (format_string): Call get_string_length with eltsize.
2052 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2054 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2055 to emit the span, rather than setting it as the prefix.
2057 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2059 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2060 "margin_char" parameter, defaulting to space. Use it in place
2061 of pp_space for the initial part of the margin.
2062 (layout::print_leading_fixits): Use '+' when filling the margin
2063 of line-insertion fix-it hints.
2065 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2067 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2070 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2072 * config/rs6000/altivec.md: Don't set length attribute to the default
2074 * config/rs6000/darwin.md: Ditto.
2075 * config/rs6000/dfp.md: Ditto.
2076 * config/rs6000/htm.md: Ditto.
2077 * config/rs6000/rs6000.md: Ditto.
2078 * config/rs6000/sync.md: Ditto.
2079 * config/rs6000/vsx.md: Ditto.
2081 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2083 * config/rs6000/altivec.md: Don't set length attribute to the default
2084 value, for branch instructions.
2085 * config/rs6000/darwin.md: Ditto.
2086 * config/rs6000/rs6000.md: Ditto.
2088 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2090 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2091 (unnamed conditional branch define_insn): Set length to 4 or 8
2092 depending on offset.
2093 (<bd>_<mode>): Similar, for alternative 0.
2094 (<bd>tf_<mode>): Ditto.
2096 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2098 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2100 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2102 * doc/rtl.texi: Replace old RTX class names with new names.
2105 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2107 * expmed.h (canonicalize_comparison): New declaration.
2108 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2109 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2110 * optabs.c (prepare_cmp_insn): Likewise.
2111 * rtl.h (unsigned_condition_p): New function which checks if a
2112 comparison operator is unsigned.
2114 2018-08-16 Nathan Sidwell <nathan@acm.org>
2116 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2117 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2119 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2122 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2123 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2124 (mov<mov>): ..this and enable unconditionally.
2126 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2128 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2130 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2132 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2133 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2134 "Common" with "Target".
2136 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2138 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2139 * doc/invoke.texi (mmitigate-rop): Remove.
2140 * config/i386/i386.c: Do not include "regrename.h".
2141 (ix86_rop_should_change_byte_p, reg_encoded_number)
2142 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2144 (ix86_reorg): Remove call to ix86_mitigate_rop.
2145 * config/i386/i386.md (attr "modrm_class"): Remove.
2146 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2147 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2148 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2150 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2152 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2153 allow folding of mergeh() and mergel() for the float and double types.
2154 (fold_mergehl_helper): Rework to handle building a permute tree
2157 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2159 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2162 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2164 * common.opt (fdiagnostics-show-labels): New option.
2165 * diagnostic-show-locus.c (class layout_range): Add field
2167 (class layout): Add field "m_show_labels_p".
2168 (layout_range::layout_range): Add param "label" and use it to
2170 (make_range): Pass in NULL for new "label" param of layout_range's
2172 (layout::layout): Initialize m_show_labels_p.
2173 (layout::maybe_add_location_range): Pass in loc_range->m_label
2174 when constructing layout_range instances.
2175 (struct line_label): New struct.
2176 (layout::print_any_labels): New member function.
2177 (layout::print_line): Call it if label-printing is enabled.
2178 (selftest::test_one_liner_labels): New test.
2179 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2180 * diagnostic.c (diagnostic_initialize): Initialize
2181 context->show_labels_p.
2182 * diagnostic.h (struct diagnostic_context): Add field
2184 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2185 -fno-diagnostics-show-labels.
2186 * dwarf2out.c (gen_producer_string): Add
2187 OPT_fdiagnostics_show_labels to the ignored options.
2188 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2190 (gcc_rich_location::maybe_add_expr): Likewise.
2191 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2192 label" param, defaulting to NULL.
2193 (gcc_rich_location::add_expr): Add "label" param.
2194 (gcc_rich_location::maybe_add_expr): Likewise.
2195 (class text_range_label): New class.
2196 (class range_label_for_type_mismatch): New class.
2197 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2198 of format_warning_va.
2199 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2200 * lto-wrapper.c (merge_and_complain): Add
2201 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2202 (append_compiler_options): Likewise to the dropped options.
2203 (append_diag_options): Likewise to the passed-on options.
2204 * opts.c (common_handle_option): Handle the new option.
2205 * selftest-diagnostic.c
2206 (test_diagnostic_context::test_diagnostic_context): Enable
2208 * substring-locations.c: Include "gcc-rich-location.h".
2209 (format_warning_n_va): Add "fmt_label" and "param_label" params
2210 and use them as appropriate.
2211 (format_warning_va): Add "fmt_label" and "param_label" params,
2212 passing them on to format_warning_n_va.
2213 (format_warning_at_substring): Likewise.
2214 (format_warning_at_substring_n): Likewise.
2215 * substring-locations.h (format_warning_va): Add "fmt_label" and
2216 "param_label" params.
2217 (format_warning_n_va): Likewise.
2218 (format_warning_at_substring): Likewise.
2219 (format_warning_at_substring_n): Likewise.
2220 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2222 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2225 * builtins.c (expand_builtin_memcmp): Do not expand the call
2226 when overflow is detected.
2228 2018-08-15 Martin Sebor <msebor@redhat.com>
2230 PR tree-optimization/71625
2231 * config/aarch64/aarch64-builtins.c
2232 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2234 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2236 * config/s390/s390.c (s390_reorg): Remove loop.
2238 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2241 (darwin_function_switched_text_sections): Delete.
2242 * gcc/config/darwin.h
2243 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2245 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2248 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2249 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2250 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2252 2018-08-15 Martin Liska <mliska@suse.cz>
2254 PR tree-optimization/86925
2255 * predict.c (expr_expected_value_1): When taking
2256 later predictor, assign also probability.
2257 Use fold_build2_initializer_loc in order to fold
2258 the expression in -frounding-math.
2260 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2262 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2264 (expand_vec_perm_1): Try the new method.
2266 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2269 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2270 Check whether lra_live_max_point is 0 before dividing.
2272 2018-08-14 Martin Sebor <msebor@redhat.com>
2274 PR tree-optimization/86650
2275 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2276 (vrp_prop::check_mem_ref): Same.
2278 2018-08-13 Liu Hao <lh_mouse@126.com>
2280 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2281 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2282 and clear it thereafter, as it only works for DBCS.
2284 2018-08-13 Liu Hao <lh_mouse@126.com>
2286 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2287 handle returned by _get_osf_handle().
2289 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2291 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2292 for folding vec_perm.
2294 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2296 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2297 Add support for gimple-folding of vec_pack() and vec_unpack()
2300 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2302 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2303 vec_xst variants to the list.
2304 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2305 vector loads and stores.
2307 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2309 * config.gcc (rs6000-ibm-aix4.x): Delete.
2310 (rs6000-ibm-aix5.1): Delete.
2311 (rs6000-ibm-aix5.2): Delete.
2312 (rs6000-ibm-aix5.3): Delete.
2313 * config/rs6000/aix43.h: Delete.
2314 * config/rs6000/aix51.h: Delete.
2315 * config/rs6000/aix52.h: Delete.
2316 * config/rs6000/t-aix43: Delete.
2318 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2320 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2322 (s390_decompose_address): Factor out constant pool ref
2325 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2327 * config/nds32/nds32-predicates.c
2328 (nds32_can_use_bclr_p): Change return type as bool.
2329 (nds32_can_use_bset_p): Ditto.
2330 (nds32_can_use_btgl_p): Ditto.
2331 (nds32_can_use_bitci_p): Ditto.
2332 * config/nds32/nds32-protos.h
2333 (nds32_can_use_bclr_p): Change declaration.
2334 (nds32_can_use_bset_p): Ditto.
2335 (nds32_can_use_btgl_p): Ditto.
2336 (nds32_can_use_bitci_p): Ditto.
2338 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2340 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2341 Support -msched-prolog-epilog option.
2342 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2344 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2346 * common/config/nds32/nds32-common.c
2347 (nds32_option_optimization_table): Enalbe -malways-align.
2349 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2351 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2353 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2354 OPT_misr_secure_ case.
2355 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2356 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2357 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2359 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2360 (nds32_isr_info): New field security_level.
2361 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2362 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2363 * config/nds32/nds32.opt (misr-secure): New option.
2364 * config/nds32/nds32_init.inc: New file.
2365 * config/nds32/nds32_isr.h: New file.
2367 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2369 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2370 Update comment for atomic instructions.
2371 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2372 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2374 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2375 load for __ATOMIC_SEQ_CST model.
2376 (atomic_loaddi_1): Remove float register target.
2377 (atomic_storedi): Handle CONST_INT values.
2378 (atomic_storedi_1): Remove float register source. Add special case
2380 (memory_barrier): New expander and insn.
2382 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2384 PR tree-optimization/86835
2385 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2386 new_stmt after def_gsi, make sure to insert new_square_stmt after
2387 that stmt, not 2 stmts before it.
2389 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2392 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2395 2018-08-10 Martin Liska <mliska@suse.cz>
2398 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2400 * builtins.c (expand_builtin_expect_with_probability):
2402 (expand_builtin_expect_with_probability): New function.
2403 (build_builtin_expect_predicate): Add new argumnet probability
2404 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2405 (fold_builtin_expect):
2408 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2409 * builtins.h (fold_builtin_expect): Set new argument.
2410 * doc/extend.texi: Document __builtin_expect_with_probability.
2411 * doc/invoke.texi: Likewise.
2412 * gimple-fold.c (gimple_fold_call): Pass new argument.
2413 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2414 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2415 * predict.c (get_predictor_value): New function.
2416 (expr_expected_value): Add new argument probability. Assume
2417 that predictor and probability are always non-null.
2418 (expr_expected_value_1): Likewise. For __builtin_expect and
2419 __builtin_expect_with_probability set probability. Handle
2420 combination in binary expressions.
2421 (tree_predict_by_opcode): Simplify code by simply calling
2422 get_predictor_value.
2423 (pass_strip_predict_hints::execute): Add handling of
2424 BUILT_IN_EXPECT_WITH_PROBABILITY.
2425 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2427 * tree.h (DECL_BUILT_IN_P): New function.
2429 2018-08-10 Martin Liska <mliska@suse.cz>
2431 PR tree-optimization/85799
2432 * passes.def: Add argument for pass_strip_predict_hints.
2433 * predict.c (class pass_strip_predict_hints): Add new argument
2435 (strip_predictor_early): New function.
2436 (pass_strip_predict_hints::execute): Call the function to
2438 (strip_predict_hints): New function.
2439 * predict.def: Fix comment.
2441 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2443 * Makefile.in: Clarify which tm.texi to copy over to assert the
2444 right to grant a GFDL license for all.
2446 2018-08-09 Jeff Law <law@redhat.com>
2448 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2451 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2453 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2456 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2458 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2459 reductions for variable-length vectors.
2461 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2464 * common.opt (fdiagnostics-show-line-numbers): New option.
2465 * diagnostic-show-locus.c (class layout): Add fields
2466 "m_show_line_numbers_p" and "m_linenum_width";
2467 (num_digits): New function.
2468 (test_num_digits): New function.
2469 (layout::layout): Initialize new fields. Update m_x_offset
2470 logic to handle any left margin.
2471 (layout::print_source_line): Print line number when requested.
2472 (layout::start_annotation_line): New member function.
2473 (layout::print_annotation_line): Call it.
2474 (layout::print_leading_fixits): Likewise.
2475 (layout::print_trailing_fixits): Likewise. Update calls to
2476 move_to_column for new parameter.
2477 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2478 it to potentially call start_annotation_line.
2479 (layout::show_ruler): Call start_annotation_line.
2480 (selftest::test_line_numbers_multiline_range): New selftest.
2481 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2482 and selftest::test_line_numbers_multiline_range.
2483 * diagnostic.c (diagnostic_initialize): Initialize
2484 show_line_numbers_p.
2485 * diagnostic.h (struct diagnostic_context): Add field
2486 "show_line_numbers_p".
2487 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2488 -fno-diagnostics-show-line-numbers.
2489 * dwarf2out.c (gen_producer_string): Add
2490 OPT_fdiagnostics_show_line_numbers to the ignored options.
2491 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2492 one setting" options.
2493 (append_compiler_options): Likewise to the dropped options.
2494 (append_diag_options): Likewise to the passed-on options.
2495 * opts.c (common_handle_option): Handle the new option.
2496 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2498 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2500 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2501 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2502 third argument of type "const signed char" to descriptions of
2503 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2504 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2505 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2506 __builtin_bcdsub_ov functions.
2508 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2510 PR tree-optimization/86858
2511 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2512 flow_bb_inside_loop_p calls.
2514 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2516 PR tree-optimization/86871
2517 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2518 instead of gimple_assign_lhs.
2520 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2523 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2524 register constraint to operand 0.
2525 (add<mode>3_carryinC): Likewise.
2526 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2528 2018-08-09 Martin Liska <mliska@suse.cz>
2531 * common.opt: Remove extra line.
2533 2018-08-09 Martin Liska <mliska@suse.cz>
2535 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2536 at the end of a line, make first letter capital and end up
2537 a sentence with a dot.
2538 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2539 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2540 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2541 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2542 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2543 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2544 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2545 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2546 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2547 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2548 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2549 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2550 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2551 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2552 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2553 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2554 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2555 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2557 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2560 * config/s390/s390.c (s390_option_override_internal): Reduce the
2561 stack-clash-protection-probe-interval param if it would be too big
2564 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2567 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2568 * config/m68k/m68k.c (handle_move_double): Don't call
2569 m68k_final_prescan_insn.
2570 (m68k_adjust_decorated_operand): Renamed from
2571 m68k_final_prescan_insn, remove first and third operand and
2573 (print_operand): Call it.
2574 (print_operand_address): Call it.
2576 2018-08-08 Nathan Sidwell <nathan@acm.org>
2578 * diagnostic.c (diagnostic_report_current_module): Use
2579 linemap_included_from & linemap_included_from_linemap.
2581 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2583 * config/aarch64/aarch64-cores.def: Add phecda core.
2584 * config/aarch64/aarch64-tune.md: Regenerate.
2585 * doc/invoke.texi: Add phecda core.
2587 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2590 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2592 * config/s390/s390.md ("movti"): Add more alternatives for
2593 constant to GPR copies.
2595 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2597 * config/s390/s390.c: Fix whitespace damage throughout the file.
2598 * config/s390/s390.h: Likewise.
2599 * config/s390/tpf.h: Likewise.
2601 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2603 * config/s390/s390.c (s390_loadrelative_operand_p):
2604 Remove TARGET_CPU_ZARCH usages.
2605 (s390_rtx_costs): Likewise.
2606 (s390_legitimate_constant_p): Likewise.
2607 (s390_cannot_force_const_mem): Likewise.
2608 (legitimate_reload_constant_p): Likewise.
2609 (s390_preferred_reload_class): Likewise.
2610 (legitimize_pic_address): Likewise.
2611 (legitimize_tls_address): Likewise.
2612 (s390_split_branches): Removed.
2613 (s390_add_execute): Removed.
2614 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2615 (s390_mainpool_start): Likewise.
2616 (s390_mainpool_finish): Likewise.
2617 (s390_mainpool_cancel): Removed.
2618 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2619 (s390_chunkify_cancel): Likewise.
2620 (s390_return_addr_rtx): Likewise.
2621 (s390_register_info): Remove split_branches_pending_p uages.
2622 (s390_optimize_register_info): Likewise.
2623 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2624 split_branches_pending_p usages.
2625 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2626 (s390_load_got): Likewise.
2627 (s390_expand_split_stack_prologue): Likewise.
2628 (output_asm_nops): Likewise.
2629 (s390_function_profiler): Likewise.
2630 (s390_emit_call): Likewise.
2631 (s390_conditional_register_usage): Likewise.
2632 (s390_optimize_prologue): Likewise.
2633 (s390_reorg): Remove TARGET_CPU_ZARCH and
2634 split_branches_pending_p usages.
2635 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2637 (s390_output_indirect_thunk_function): Likewise.
2638 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2639 (TARGET_CPU_ZARCH_P): Removed.
2640 (struct machine_function): Remove split_branches_pending_p.
2641 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2643 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2645 * common/config/s390/s390-common.c (processor_flags_table):
2647 * config.gcc: Remove with_arch/with_tune support.
2648 * config/s390/2064.md: Remove cpu attribute comparisons.
2649 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2651 * config/s390/linux.h (ASM_SPEC):
2652 Remove -march support.
2653 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2654 Use a table to get an arch level.
2655 * config/s390/s390-opts.h (enum processor_type):
2657 * config/s390/s390.c
2658 (processor_table): Remove entries, add arch_level values.
2659 (s390_issue_rate): Remove cases.
2660 (s390_option_override): Adjust
2661 s390_option_override_internal() call.
2662 (s390_option_override_internal): Remove deprecation warning.
2663 (s390_valid_target_attribute_tree): Adjust
2664 s390_option_override_internal() call.
2665 * config/s390/s390.h (struct s390_processor):
2666 Share with s390-c.c, add arch_level field.
2667 * config/s390/s390.md:
2668 Remove occurrences in cpu attribute.
2669 * config/s390/s390.opt: Remove -march/-mtune support.
2670 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2671 * doc/invoke.texi: Remove deprecation warning.
2673 2018-08-08 Luis Machado <luis.machado@linaro.org>
2675 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2677 (qdf24xx_tunings): Set vector cost structure to
2678 qdf24xx_vector_cost.
2680 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2681 <register_sextend>: Set to 3.
2683 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2686 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2687 * config/aarch64/aarch64-simd.md
2688 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2689 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2690 (aarch64_frecpx<mode>): ...this new pattern.
2691 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2692 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2694 2018-08-07 Martin Liska <mliska@suse.cz>
2697 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2698 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2699 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2700 * doc/extend.texi: Document that malloc attribute adds
2703 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2706 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2707 Define to speculation_safe_value_not_needed.
2709 2018-08-06 Jeff Law <law@redhat.com>
2711 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2712 the vr_values instance to cprop_into_stmt.
2713 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2714 (cprop_operand): Also query EVRP to determine if OP is a constant.
2716 2018-08-06 Nathan Sidwell <nathan@acm.org>
2718 * diagnostic.c (diagnostic_report_current_module): Reroll
2719 included-at loop. Translate text.
2721 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2723 * function-tests.c (selftest::test_expansion_to_rtl): Call
2724 free_after_compilation.
2726 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2728 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2730 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2732 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2733 loops with memory block operations from getting unrolled.
2735 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2738 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2739 Define to speculation_safe_value_not_needed.
2741 2018-08-06 Jeff Law <law@redhat.com>
2743 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2746 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2749 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2750 with all enabled __intN types.
2752 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2754 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2756 * alias.c (record_set): Check for clobber high.
2757 * cfgexpand.c (expand_gimple_stmt): Likewise.
2758 * combine-stack-adj.c (single_set_for_csa): Likewise.
2759 * combine.c (find_single_use_1): Likewise.
2760 (set_nonzero_bits_and_sign_copies): Likewise.
2761 (get_combine_src_dest): Likewise.
2762 (is_parallel_of_n_reg_sets): Likewise.
2763 (try_combine): Likewise.
2764 (record_dead_and_set_regs_1): Likewise.
2765 (reg_dead_at_p_1): Likewise.
2766 (reg_dead_at_p): Likewise.
2767 * dce.c (deletable_insn_p): Likewise.
2768 (mark_nonreg_stores_1): Likewise.
2769 (mark_nonreg_stores_2): Likewise.
2770 * df-scan.c (df_find_hard_reg_defs): Likewise.
2771 (df_uses_record): Likewise.
2772 (df_get_call_refs): Likewise.
2773 * dwarf2out.c (mem_loc_descriptor): Likewise.
2774 * haifa-sched.c (haifa_classify_rtx): Likewise.
2775 * ira-build.c (create_insn_allocnos): Likewise.
2776 * ira-costs.c (scan_one_insn): Likewise.
2777 * ira.c (equiv_init_movable_p): Likewise.
2778 (rtx_moveable_p): Likewise.
2779 (interesting_dest_for_shprep): Likewise.
2780 * jump.c (mark_jump_label_1): Likewise.
2781 * postreload-gcse.c (record_opr_changes): Likewise.
2782 * postreload.c (reload_cse_simplify): Likewise.
2783 (struct reg_use): Add source expr.
2784 (reload_combine): Check for clobber high.
2785 (reload_combine_note_use): Likewise.
2786 (reload_cse_move2add): Likewise.
2787 (move2add_note_store): Likewise.
2788 * print-rtl.c (print_pattern): Likewise.
2789 * recog.c (decode_asm_operands): Likewise.
2790 (store_data_bypass_p): Likewise.
2791 (if_test_bypass_p): Likewise.
2792 * regcprop.c (kill_clobbered_value): Likewise.
2793 (kill_set_value): Likewise.
2794 * reginfo.c (reg_scan_mark_refs): Likewise.
2795 * reload1.c (maybe_fix_stack_asms): Likewise.
2796 (eliminate_regs_1): Likewise.
2797 (elimination_effects): Likewise.
2798 (mark_not_eliminable): Likewise.
2799 (scan_paradoxical_subregs): Likewise.
2800 (forget_old_reloads_1): Likewise.
2801 * reorg.c (find_end_label): Likewise.
2802 (try_merge_delay_insns): Likewise.
2803 (redundant_insn): Likewise.
2804 (own_thread_p): Likewise.
2805 (fill_simple_delay_slots): Likewise.
2806 (fill_slots_from_thread): Likewise.
2807 (dbr_schedule): Likewise.
2808 * resource.c (update_live_status): Likewise.
2809 (mark_referenced_resources): Likewise.
2810 (mark_set_resources): Likewise.
2811 * rtl.c (copy_rtx): Likewise.
2812 * rtlanal.c (reg_referenced_p): Likewise.
2813 (single_set_2): Likewise.
2814 (noop_move_p): Likewise.
2815 (note_stores): Likewise.
2816 * sched-deps.c (sched_analyze_reg): Likewise.
2817 (sched_analyze_insn): Likewise.
2819 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2821 * cse.c (invalidate_reg): New function extracted from...
2822 (invalidate): ...here.
2823 (canonicalize_insn): Check for clobber high.
2824 (invalidate_from_clobbers): invalidate clobber highs.
2825 (invalidate_from_sets_and_clobbers): Likewise.
2826 (count_reg_usage): Check for clobber high.
2827 (insn_live_p): Likewise.
2828 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2829 (cselib_invalidate_regno): Check for clobber in setter.
2830 (cselib_invalidate_rtx): Pass through setter.
2831 (cselib_invalidate_rtx_note_stores):
2832 (cselib_process_insn): Check for clobber high.
2833 * cselib.h (cselib_invalidate_rtx): Add operand.
2835 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2837 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2838 (mark_not_eliminable): Likewise.
2839 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2840 * lra-lives.c (process_bb_lives): Check for clobber high.
2841 * lra.c (new_insn_reg): Remember clobber highs.
2842 (collect_non_operand_hard_regs): Check for clobber high.
2843 (lra_set_insn_recog_data): Likewise.
2844 (add_regs_to_insn_regno_info): Likewise.
2845 (lra_update_insn_regno_info): Likewise.
2847 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2849 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2850 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2852 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2854 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2855 (copy_insn_1): Likewise.
2856 (gen_hard_reg_clobber_high): New gen function.
2857 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2858 * genemit.c (gen_exp): Likewise.
2859 (gen_emit_seq): Pass through info.
2860 (gen_insn): Check for CLOBBER_HIGH.
2861 (gen_expand): Pass through info.
2862 (gen_split): Likewise.
2863 (output_add_clobbers): Likewise.
2864 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2865 (remove_clobbers): Likewise.
2866 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2868 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2870 * doc/rtl.texi (clobber_high): Add.
2871 (parallel): Add in clobber high
2872 * rtl.c (rtl_check_failed_code3): Add function.
2873 * rtl.def (CLOBBER_HIGH): Add expression.
2874 * rtl.h (RTL_CHECKC3): Add macro.
2875 (rtl_check_failed_code3): Add declaration.
2876 (XC3EXP): Add macro.
2878 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2881 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2882 cfun->machine->max_used_stack_alignment if needed.
2884 2018-08-04 Martin Sebor <msebor@redhat.com>
2886 PR tree-optimization/86571
2887 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2890 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2893 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2896 2018-08-03 Jeff Law <law@redhat.com>
2899 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2900 Define to speculation_safe_value_not_needed.
2902 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2904 * doc/gcov.texi (-x): Remove duplicate "to".
2905 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2906 (-Wif-not-aligned): Remove duplicate "is".
2907 (-flto): Remove duplicate "the".
2908 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2909 duplicate "v5.00.b".
2910 (MSP430 Options): Remove duplicate "and" from the description
2911 of "-mgprel-sec=regexp".
2912 (x86 Options): Remove duplicate copies of "vmldLog102" and
2913 vmlsLog104 from description of "-mveclibabi=type".
2915 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2917 * internal-fn.h (first_commutative_argument): Declare.
2918 * internal-fn.c (first_commutative_argument): New function.
2919 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2920 restrictions for pattern statements. Use first_commutative_argument
2921 to look for commutative operands in calls to internal functions.
2923 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2925 * Makefile.in (wide-int-range.o): New.
2926 * tree-vrp.c: Move all the wide_int_* functions to...
2927 * wide-int-range.cc: ...here.
2928 * tree-vrp.h: Move all the wide_int_* prototypes to...
2929 * wide-int-range.h: ...here.
2931 2018-08-03 Tom de Vries <tdevries@suse.de>
2933 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2935 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2936 * except.c (output_function_exception_table): Do early exit if
2937 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2939 2018-08-03 Martin Liska <mliska@suse.cz>
2941 * predict.c (dump_prediction): Change to 2 digits
2944 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2946 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2948 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2950 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2952 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2953 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2954 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2955 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2956 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2958 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2960 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2961 pp_take_prefix when saving the existing prefix.
2962 * diagnostic.c (diagnostic_append_note): Likewise.
2963 * langhooks.c (lhd_print_error_function): Likewise.
2964 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2965 param's type. Free the existing prefix.
2966 (pp_take_prefix): New function.
2967 (pretty_printer::pretty_printer): Drop the prefix parameter.
2968 Rename the length parameter to match the comment.
2969 (pretty_printer::~pretty_printer): Free the prefix.
2970 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2972 (struct pretty_printer): Drop the "const" from "prefix" field's
2973 type and clarify memory management.
2974 (pp_set_prefix): Drop the "const" from the 2nd param.
2975 (pp_take_prefix): New decl.
2977 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2979 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2980 for word_mode_ok here instead of passing as argument.
2981 (expand_block_compare): Change select_block_compare_mode() call.
2982 (expand_strncmp_gpr_sequence): New function.
2983 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2985 2018-08-02 Jeff Law <law@redhat.com>
2988 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2989 Define to speculation_safe_value_not_needed.
2992 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2993 Define to speculation_safe_value_not_needed.
2995 2018-08-02 Tom de Vries <tdevries@suse.de>
2998 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2999 function. Return UI_TARGET unconditionally.
3000 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3001 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3003 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3005 * genemit.c (print_overload_test): Fix typo.
3007 2018-08-02 Richard Biener <rguenther@suse.de>
3009 PR tree-optimization/86816
3010 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3011 which checks for value availability before querying it.
3012 (gvn_uses_equal): Use it.
3013 (same_succ_hash): Likewise.
3014 (gimple_equal_p): Likewise.
3016 2018-08-02 Nick Clifton <nickc@redhat.com>
3019 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3020 Define to speculation_safe_value_not_needed.
3023 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3024 Define to speculation_safe_value_not_needed.
3027 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3028 Define to speculation_safe_value_not_needed.
3031 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3032 Define to speculation_safe_value_not_needed.
3035 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3036 Define to speculation_safe_value_not_needed.
3039 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3040 Define to speculation_safe_value_not_needed.
3043 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3044 Define to speculation_safe_value_not_needed.
3047 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3048 Define to speculation_safe_value_not_needed.
3051 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3052 speculation_safe_value_not_needed.
3055 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3056 to speculation_safe_value_not_needed.
3058 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3060 * doc/md.texi: Expand the documentation of instruction names
3061 to mention port-local uses. Document '@' in pattern names.
3062 * read-md.h (overloaded_instance, overloaded_name): New structs.
3064 (md_reader::handle_overloaded_name): New member function.
3065 (md_reader::get_overloads): Likewise.
3066 (md_reader::m_first_overload): New member variable.
3067 (md_reader::m_next_overload_ptr): Likewise.
3068 (md_reader::m_overloads_htab): Likewise.
3069 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3070 m_next_overload_ptr and m_overloads_htab.
3071 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3072 (get_mode_token, get_code_token, get_int_token): New functions.
3073 (map_attr_string): Add an optional argument that passes back
3074 the associated iterator.
3075 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3076 (md_reader::handle_overloaded_name, add_overload_instance): New
3078 (apply_iterators): Handle '@' names. Report an error if '@'
3079 is used without iterators.
3080 (initialize_iterators): Initialize the new iterator_group fields.
3081 * genopinit.c (handle_overloaded_code_for)
3082 (handle_overloaded_gen): New functions.
3083 (main): Use them to print declarations of maybe_code_for_* and
3084 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3085 * genemit.c (print_overload_arguments, print_overload_test)
3086 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3087 (main): Use it to print definitions of maybe_code_for_* and
3088 maybe_gen_* functions.
3089 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3090 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3091 instead of explicit mode checks.
3092 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3093 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3094 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3095 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3096 (aarch64_expand_compare_and_swap): Likewise
3097 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3098 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3099 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3100 (aarch64_constant_pool_reload_icode): Delete.
3101 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3102 instead of aarch64_constant_pool_reload_icode. Use
3103 code_for_aarch64_reload_mov instead of explicit mode checks.
3104 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3105 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3106 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3107 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3108 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3109 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3110 (aarch64_atomic_load_op_code): Delete.
3111 (aarch64_emit_atomic_load_op): Likewise.
3112 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3113 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3114 instead of aarch64_emit_atomic_load_op.
3115 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3116 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3117 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3118 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3119 character before the pattern name.
3120 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3121 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3122 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3123 (aarch64_frecps<mode>): Likewise.
3124 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3125 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3126 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3127 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3128 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3130 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3132 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3133 Allow HFmode constants if TARGET_FP_F16INST.
3135 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3138 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3139 No longer check last store for clobber of address register.
3141 2018-08-02 Martin Liska <mliska@suse.cz>
3143 PR gcov-profile/86817
3144 * gcov.c (process_all_functions): New function.
3146 (process_file): Move functions processing to
3147 process_all_functions.
3149 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3151 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3152 "const" to the "gimple *" and "rtx_insn *" parameters.
3153 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3155 (dump_location_t::dump_location_t): Likewise.
3157 2018-08-01 Martin Sebor <msebor@redhat.com>
3159 PR tree-optimization/86650
3160 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3161 rather than a "gcall *". Directly pass the data of interest
3162 to percent_K_format, rather than building a temporary CALL_EXPR
3164 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3165 (gimple_fold_builtin_strncat): Adjust.
3166 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3167 gcall* argument with gimple*.
3168 * gimple-ssa-warn-restrict.c (check_call): Same.
3169 (wrestrict_dom_walker::before_dom_children): Same.
3170 (builtin_access::builtin_access): Same.
3171 (check_bounds_or_overlap): Same
3172 (maybe_diag_overlap): Same.
3173 (maybe_diag_offset_bounds): Same.
3174 * tree-diagnostic.c (default_tree_printer): Move usage of
3175 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3177 * tree-pretty-print.c (percent_K_format): Add argument.
3178 * tree-pretty-print.h: Add argument.
3179 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3180 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3181 (maybe_diag_stxncpy_trunc): Same.
3182 (handle_builtin_stxncpy): Same.
3183 (handle_builtin_strcat): Same.
3185 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3187 * match.pd: Optimise pointer range checks.
3189 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3191 PR tree-optimization/86758
3192 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3193 to remove pattern statements.
3195 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3197 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3198 result of dfs_enumerate_from when constructing stmt_vec_infos,
3199 instead of additionally calling get_loop_body.
3201 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3203 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3205 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3206 When creating an iv, assert that the step is not known to be zero.
3207 (vect_setup_realignment): Update call accordingly.
3208 * tree-vect-stmts.c (vectorizable_store): Likewise.
3209 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3211 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3213 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3214 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3215 (vectorizable_reduction): Likewise.
3216 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3217 (vect_detect_hybrid_slp_stmts): Likewise.
3218 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3220 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3222 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3223 (wide_int_set_zero_nonzero_bits): ...this.
3224 (zero_nonzero_bits_from_vr): Rename to...
3225 (vrp_set_zero_nonzero_bits): ...this.
3226 (extract_range_from_multiplicative_op_1): Abstract wide int
3228 (wide_int_range_multiplicative_op): ...here.
3229 (extract_range_from_binary_expr_1): Extract wide int binary
3230 operations into their own functions.
3231 (wide_int_range_lshift): New.
3232 (wide_int_range_can_optimize_bit_op): New.
3233 (wide_int_range_shift_undefined_p): New.
3234 (wide_int_range_bit_xor): New.
3235 (wide_int_range_bit_ior): New.
3236 (wide_int_range_bit_and): New.
3237 (wide_int_range_trunc_mod): New.
3238 (extract_range_into_wide_ints): New.
3239 (vrp_shift_undefined_p): New.
3240 (extract_range_from_multiplicative_op): New.
3241 (vrp_can_optimize_bit_op): New.
3242 * tree-vrp.h (value_range::dump): New.
3243 (wide_int_range_multiplicative_op): New.
3244 (wide_int_range_lshift):New.
3245 (wide_int_range_shift_undefined_p): New.
3246 (wide_int_range_bit_xor): New.
3247 (wide_int_range_bit_ior): New.
3248 (wide_int_range_bit_and): New.
3249 (wide_int_range_trunc_mod): New.
3250 (zero_nonzero_bits_from_bounds): Rename to...
3251 (wide_int_set_zero_nonzero_bits): ...this.
3252 (zero_nonzero_bits_from_vr): Rename to...
3253 (vrp_set_zero_nonzero_bits): ...this.
3254 (range_easy_mask_min_max): Rename to...
3255 (wide_int_range_can_optimize_bit_op): this.
3256 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3257 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3259 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3261 * tree-vectorizer.h (vect_orig_stmt): New function.
3262 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3263 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3264 (vect_create_epilog_for_reduction): Likewise.
3265 (vectorizable_live_operation): Likewise.
3266 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3267 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3268 * tree-vect-stmts.c (vectorizable_call): Likewise.
3269 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3271 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3273 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3275 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3276 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3277 (vect_transform_loop): Likewise.
3278 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3280 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3282 * tree-vectorizer.h (vect_schedule_slp): Return void.
3283 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3284 (vect_schedule_slp): Likewise.
3286 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3288 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3290 (vect_transform_loop): Update calls accordingly. Schedule SLP
3291 instances before the main loop, if any exist.
3293 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3295 PR tree-optimization/86749
3296 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3297 If the lhs is used in a COND_EXPR, check that it is being used
3298 as the "then" or "else" value.
3300 2018-08-01 Tom de Vries <tdevries@suse.de>
3303 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3304 speculation_safe_value_not_needed.
3306 2018-08-01 Richard Biener <rguenther@suse.de>
3308 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3311 2018-08-01 Martin Liska <mliska@suse.cz>
3313 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3314 format how successful transformation is dumped.
3315 (gimple_mod_pow2_value_transform): Likewise.
3316 (gimple_mod_subtract_transform): Likewise.
3317 (gimple_stringops_transform): Likewise.
3319 2018-08-01 Martin Liska <mliska@suse.cz>
3322 * value-prof.c (interesting_stringop_to_profile_p):
3323 Simplify the code and add BUILT_IN_MEMMOVE.
3324 (gimple_stringops_transform): Likewise.
3326 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3328 * config/aarch64/aarch64-simd.md
3329 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3330 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3331 use GPI iterator instead of SI mode.
3333 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3335 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3336 rs6000_speculation_barrier.
3337 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3338 new barrier pattern name.
3340 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3342 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3343 (speculation_barrier): New insn.
3345 2018-08-01 Richard Biener <rguenther@suse.de>
3348 * graphite.h: Include isl/id.h and isl/space.h to allow build
3351 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3354 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3355 mode for COFF targets.
3356 * defaults.h (TARGET_COFF): Define.
3357 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3358 TARGET_COFF): Define.
3359 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3360 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3361 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3363 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3365 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3366 * gimple-streamer-out.c (output_bb): Save it.
3367 * lto-streamer-in.c (input_struct_function_base): Restore
3368 instance discriminator if available. Create map on demand.
3369 * lto-streamer-out.c (output_struct_function_base): Save it if
3371 * final.c (decl_to_instance_map): Document LTO strategy.
3373 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3374 Olivier Hainque <hainque@adacore.com>
3376 * debug.h (decl_to_instance_map_t): New type.
3377 (decl_to_instance_map): Declare.
3378 (maybe_create_decl_to_instance_map): New inline function.
3379 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3380 to track basic block discriminators.
3381 (final_start_function_1): Initialize them.
3382 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3384 (decl_to_instance_map): New variable.
3385 (map_decl_to_instance, maybe_set_discriminator): New functions.
3386 (notice_source_line): Set discriminator.
3388 2018-07-31 Ian Lance Taylor <iant@golang.org>
3390 * targhooks.c (default_have_speculation_safe_value): Add
3393 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3395 * dump-context.h: Include "pretty-print.h".
3396 (dump_context::refresh_dumps_are_enabled): New decl.
3397 (dump_context::emit_item): New decl.
3398 (class dump_context): Add fields "m_test_pp" and
3400 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3401 (temp_dump_context::get_dumped_text): New decl.
3402 (class temp_dump_context): Add field "m_pp".
3403 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3404 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3406 (set_dump_file): Update for above change.
3407 (set_alt_dump_file): Likewise.
3408 (dump_loc): New overload, taking a pretty_printer *.
3409 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3410 to any test pretty-printer.
3411 (make_item_for_dump_gimple_stmt): New function, adapted from
3412 optinfo::add_gimple_stmt.
3413 (dump_context::dump_gimple_stmt): Call it, and use the result,
3414 eliminating the direct usage of dump_file and alt_dump_file in
3415 favor of indirectly using them via emit_item.
3416 (make_item_for_dump_gimple_expr): New function, adapted from
3417 optinfo::add_gimple_expr.
3418 (dump_context::dump_gimple_expr): Call it, and use the result,
3419 eliminating the direct usage of dump_file and alt_dump_file in
3420 favor of indirectly using them via emit_item.
3421 (make_item_for_dump_generic_expr): New function, adapted from
3423 (dump_context::dump_generic_expr): Call it, and use the result,
3424 eliminating the direct usage of dump_file and alt_dump_file in
3425 favor of indirectly using them via emit_item.
3426 (make_item_for_dump_printf_va): New function, adapted from
3427 optinfo::add_printf_va.
3428 (make_item_for_dump_printf): New function.
3429 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3430 and use the result, eliminating the direct usage of dump_file and
3431 alt_dump_file in favor of indirectly using them via emit_item.
3432 (make_item_for_dump_dec): New function.
3433 (dump_context::dump_dec): Call it, and use the result,
3434 eliminating the direct usage of dump_file and alt_dump_file in
3435 favor of indirectly using them via emit_item.
3436 (make_item_for_dump_symtab_node): New function, adapted from
3437 optinfo::add_symtab_node.
3438 (dump_context::dump_symtab_node): Call it, and use the result,
3439 eliminating the direct usage of dump_file and alt_dump_file in
3440 favor of indirectly using them via emit_item.
3441 (dump_context::begin_scope): Reimplement, avoiding direct usage
3442 of dump_file and alt_dump_file in favor of indirectly using them
3444 (dump_context::emit_item): New member function.
3445 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3446 Set up test pretty-printer on the underlying context. Call
3447 refresh_dumps_are_enabled.
3448 (temp_dump_context::~temp_dump_context): Call
3449 refresh_dumps_are_enabled.
3450 (temp_dump_context::get_dumped_text): New member function.
3451 (selftest::verify_dumped_text): New function.
3452 (ASSERT_DUMPED_TEXT_EQ): New macro.
3453 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3454 and then without optinfo enabled. Add uses of
3455 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3456 * dumpfile.h: Update comment for the dump_* API.
3457 * optinfo-emit-json.cc
3458 (selftest::test_building_json_from_dump_calls): Update for new
3459 param for temp_dump_context ctor.
3460 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3461 and "m_owned" field.
3462 (optinfo_item::~optinfo_item): Likewise.
3463 (optinfo::add_item): New member function.
3464 (optinfo::emit): Update comment.
3465 (optinfo::add_string): Delete.
3466 (optinfo::add_printf): Delete.
3467 (optinfo::add_printf_va): Delete.
3468 (optinfo::add_gimple_stmt): Delete.
3469 (optinfo::add_gimple_expr): Delete.
3470 (optinfo::add_tree): Delete.
3471 (optinfo::add_symtab_node): Delete.
3472 (optinfo::add_dec): Delete.
3473 * optinfo.h (class dump_context): New forward decl.
3474 (optinfo::add_item): New decl.
3475 (optinfo::add_string): Delete.
3476 (optinfo::add_printf): Delete.
3477 (optinfo::add_printf_va): Delete.
3478 (optinfo::add_gimple_stmt): Delete.
3479 (optinfo::add_gimple_expr): Delete.
3480 (optinfo::add_tree): Delete.
3481 (optinfo::add_symtab_node): Delete.
3482 (optinfo::add_dec): Delete.
3483 (optinfo::add_poly_int): Delete.
3484 (optinfo_item::optinfo_item): Remove "owned" param.
3485 (class optinfo_item): Remove field "m_owned".
3487 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3490 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3491 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3492 requested variable alignment.
3493 (expand_one_ssa_partition): Likewise.
3494 (expand_one_var): Likewise.
3496 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3498 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3499 to speculation_safe_value_not_needed.
3501 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3503 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3504 * targhooks.c (speculation_safe_value_not_needed): New function.
3505 * target.def (have_speculation_safe_value): Update documentation.
3506 * doc/tm.texi: Regenerated.
3508 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3510 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3511 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3513 (despeculate_copy<ALLI:mode>_insn): New insn.
3514 (despeculate_copyti_insn): New insn.
3515 (despeculate_simple<ALLI:mode>): New insn
3516 (despeculate_simpleti): New insn.
3517 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3519 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3520 aarch64_speculation_safe_value.
3521 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3523 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3525 * config/aarch64/aarch64-speculation.cc: New file.
3526 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3527 before pass_reorder_blocks.
3528 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3530 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3531 X14 and X15 when tracking speculation.
3532 * config/aarch64/aarch64.md (register name constants): Add
3533 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3534 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3535 (speculation_barrier): New insn attribute.
3536 (cmp<mode>): Allow SP in comparisons.
3537 (speculation_tracker): New insn.
3538 (speculation_barrier): Add speculation_barrier attribute.
3539 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3540 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3541 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3543 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3545 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3546 aarch64_track_speculation is true.
3547 (tb<optab><mode>1): Likewise.
3548 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3549 generate CB[N]Z when tracking speculation.
3550 (aarch64_split_compare_and_swap): Likewise.
3551 (aarch64_split_atomic_op): Likewise.
3553 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3555 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3557 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3559 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3560 (speculation_barrier): New insn.
3562 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3564 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3565 * config/arm/arm.md (speculation_barrier): New expand.
3566 (speculation_barrier_insn): New pattern.
3568 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3570 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3571 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3572 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3573 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3575 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3576 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3577 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3578 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3579 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3580 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3581 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3582 * builtins.c (expand_speculation_safe_value): New function.
3583 (expand_builtin): Call it.
3584 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3585 * doc/extend.texi: Document __builtin_speculation_safe_value.
3586 * doc/md.texi: Document "speculation_barrier" pattern.
3587 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3588 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3589 * doc/tm.texi: Regenerated.
3590 * target.def (have_speculation_safe_value, speculation_safe_value): New
3592 * targhooks.c (default_have_speculation_safe_value): New function.
3593 (default_speculation_safe_value): New function.
3594 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3595 (default_speculation_safe_value): Add prototype.
3597 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3599 * dump-context.h (dump_context::dump_loc): New decl.
3600 * dumpfile.c (dump_context::dump_loc): New member function.
3601 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3602 and dump_gimple_stmt.
3603 (dump_context::dump_gimple_expr_loc): Likewise, using
3605 (dump_context::dump_generic_expr_loc): Likewise, using
3607 (dump_context::dump_printf_loc_va): Likewise, using
3609 (dump_context::begin_scope): Explicitly using the global function
3610 "dump_loc", rather than the member function.
3612 2018-07-31 Martin Sebor <msebor@redhat.com>
3614 PR tree-optimization/86741
3615 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3617 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3619 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3620 depend on whether prefetch instructions will be emitted or not.
3621 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3622 will be emitted or not.
3623 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3624 (TARGET_SETMEM_PFD): New macros.
3626 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3628 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3629 (NULL_STMT_VEC_INFO): Delete.
3630 (stmt_vec_info::operator*): Likewise.
3631 (stmt_vec_info::operator gimple *): Likewise.
3632 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3633 of NULL_STMT_VEC_INFO.
3634 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3635 (vect_reassociating_reduction_p): Likewise.
3636 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3637 (vectorizable_store): Likewise.
3638 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3639 (vec_info::free_stmt_vec_infos): Likewise.
3641 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3643 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3644 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3648 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3649 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3650 (vec_info::free_stmt_vec_info): New private member functions.
3651 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3652 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3653 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3654 set_stmt_vec_info_vec and free_stmt_vec_infos.
3655 * tree-vect-loop.c (_loop_vec_info): Remove call to
3656 set_stmt_vec_info_vec.
3657 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3658 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3659 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3660 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3661 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3662 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3663 with the clearing in the xcalloc.
3664 (stmt_vec_info_vec): Delete.
3665 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3666 (vectorize_loops): Likewise.
3667 (vec_info::~vec_info): Remove argument from call to
3668 free_stmt_vec_infos.
3669 (vec_info::add_stmt): Remove vinfo argument from call to
3672 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3674 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3675 rather than a gimple stmt.
3676 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3677 information for pattern statements when passed the original
3678 statement; instead wait to be passed the pattern statement itself.
3679 Don't call set_vinfo_for_stmt here.
3680 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3681 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3682 stmt_vec_infos here.
3683 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3684 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3685 stmt_vec_infos entry.
3687 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3689 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3690 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3691 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3692 * tree-vect-stmts.c (vectorizable_call): Likewise.
3693 (vectorizable_simd_clone_call): Likewise.
3695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3697 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3698 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3699 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3700 * tree-vect-loop.c (vect_transform_loop): Likewise.
3701 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3702 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3704 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3706 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3707 (vect_dr_stmt): Delete.
3708 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3709 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3711 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3712 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3713 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3714 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3715 (vect_analyze_data_refs): Likewise.
3716 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3718 (vect_find_same_alignment_drs): Likewise.
3719 (vect_slp_analyze_node_dependences): Update calls accordingly.
3720 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3721 instead of DR_VECT_AUX.
3722 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3723 of a vector data references. Use vec_info::lookup_dr instead of
3725 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3726 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3727 instead of DR_VECT_AUX.
3729 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3731 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3733 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3735 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3736 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3737 (vect_gen_prolog_loop_niters): Likewise.
3739 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3741 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3742 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3743 (vect_known_alignment_in_bytes, vect_dr_behavior)
3744 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3745 instead of data_references. Update calls to other routines for
3746 which the same change has been made.
3747 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3748 dr_vec_infos instead of stmt_vec_infos.
3749 (vect_analyze_data_ref_dependence): Update call accordingly.
3750 (vect_slp_analyze_data_ref_dependence)
3751 (vect_record_base_alignments): Use DR_VECT_AUX.
3752 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3753 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3754 (vector_alignment_reachable_p, vect_get_data_access_cost)
3755 (vect_peeling_supportable, vect_analyze_group_access_1)
3756 (vect_analyze_group_access, vect_analyze_data_ref_access)
3757 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3758 (vect_compile_time_alias, vect_small_gap_p)
3759 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3760 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3761 instead of data_references. Update calls to other routines for
3762 which the same change has been made.
3763 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3764 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3765 (vect_slp_analyze_and_verify_node_alignment)
3766 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3767 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3768 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3770 (_vect_peel_info::dr): Replace with...
3771 (_vect_peel_info::dr_info): ...this new field.
3772 (vect_peeling_hash_get_most_frequent)
3773 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3774 (vect_peeling_hash_get_lowest_cost):
3775 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3776 routines for which the same change has been made.
3777 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3779 * tree-vect-loop-manip.c (get_misalign_in_elems)
3780 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3782 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3783 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3784 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3785 (get_group_load_store_type, get_negative_load_store_type)
3786 (vect_get_data_ptr_increment, vectorizable_store)
3787 (vectorizable_load): Likewise.
3788 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3789 Update calls to other routines for which the same change has been made.
3791 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3793 * tree-vectorizer.h (vec_info::move_dr): New member function.
3794 (dataref_aux): Rename to...
3795 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3796 (_stmt_vec_info::dr_aux): Update accordingly.
3797 (_stmt_vec_info::data_ref_info): Delete.
3798 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3799 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3800 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3801 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3803 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3804 (STMT_VINFO_DR_INFO): New macro.
3805 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3806 (set_dr_misalignment): Update after rename of dataref_aux.
3807 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3808 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3809 initialization of STMT_VINFO_DATA_REF.
3810 * tree-vectorizer.c (vec_info::move_dr): New function.
3811 * tree-vect-patterns.c (vect_recog_bool_pattern)
3812 (vect_recog_mask_conversion_pattern)
3813 (vect_recog_gather_scatter_pattern): Use it.
3814 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3815 the "dr" and "stmt" fields of dr_vec_info instead of
3816 STMT_VINFO_DATA_REF.
3818 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3820 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3821 (is_pattern_stmt_p): Use it.
3822 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3823 on pattern statements.
3825 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3827 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3828 original stmt as a stmt_vec_info rather than a gimple stmt.
3829 (vect_pattern_recog_1): Take the statement directly as a
3830 stmt_vec_info, rather than via a gimple_stmt_iterator.
3831 Update call to vect_mark_pattern_stmts.
3832 (vect_pattern_recog): Update calls accordingly.
3834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3836 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3837 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3838 a vect_def_type for the first argument.
3839 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3840 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3841 operand if it isn't defined by a vectorized statement.
3842 (vect_build_gather_load_calls): Remove the mask_dt argument and
3843 update calls to vect_get_vec_def_for_stmt_copy.
3844 (vectorizable_bswap): Likewise the dt argument.
3845 (vectorizable_call): Update calls to vectorizable_bswap and
3846 vect_get_vec_def_for_stmt_copy.
3847 (vectorizable_simd_clone_call, vectorizable_assignment)
3848 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3849 (vectorizable_comparison): Update calls to
3850 vect_get_vec_def_for_stmt_copy.
3851 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3853 (vect_get_loop_based_defs): Remove dt argument and update call
3854 to vect_get_vec_def_for_stmt_copy.
3855 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3856 and vect_get_vec_def_for_stmt_copy.
3857 (vectorizable_load): Update calls to vect_build_gather_load_calls
3858 and vect_get_vec_def_for_stmt_copy.
3859 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3860 (vectorizable_reduction, vectorizable_live_operation): Update calls
3861 to vect_get_vec_def_for_stmt_copy.
3863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3865 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3866 and gimple stmt arguments with a stmt_vec_info.
3867 (vect_record_base_alignments): Update calls accordingly.
3868 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3869 and gimple stmt arguments with a stmt_vec_info.
3870 (vect_build_slp_tree_1): Remove vinfo argument and update call
3871 to vect_record_max_nunits.
3872 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3873 and vect_record_max_nunits.
3875 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3877 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3878 file and take a stmt_vec_info instead of a gimple stmt.
3879 (supportable_widening_operation, vect_finish_replace_stmt)
3880 (vect_finish_stmt_generation, vect_get_store_rhs)
3881 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3882 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3883 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3884 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3885 (vect_create_data_ref_ptr, bump_vector_ptr)
3886 (vect_permute_store_chain, vect_setup_realignment)
3887 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3888 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3889 (vectorizable_reduction, vectorizable_induction)
3890 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3891 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3892 than gimple stmts as arguments.
3893 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3894 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3895 (can_group_stmts_p, vect_check_gather_scatter)
3896 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3897 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3898 (vect_permute_load_chain, vect_shift_permute_load_chain)
3899 (vect_transform_grouped_load)
3900 (vect_record_grouped_load_vectors): Likewise.
3901 * tree-vect-loop.c (vect_fixup_reduc_chain)
3902 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3903 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3904 (vectorizable_reduction, vectorizable_induction)
3905 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3906 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3907 (vect_get_load_store_mask): Likewise.
3908 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3909 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3910 * tree-vect-stmts.c (vect_mark_relevant)
3911 (is_simple_and_all_uses_invariant)
3912 (exist_non_indexing_operands_for_use_p, process_use)
3913 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3914 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3915 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3916 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3917 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3918 (get_negative_load_store_type, get_load_store_type)
3919 (vect_check_load_store_mask, vect_check_store_rhs)
3920 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3921 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3922 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3923 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3924 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3925 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3926 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3927 (supportable_widening_operation): Likewise.
3929 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3931 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3932 a stmt_vec_info instead of a gcall.
3933 (vect_check_gather_scatter): Update call accordingly.
3934 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3936 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3937 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3938 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3939 instead of a gimple stmt.
3940 (vect_transform_loop): Update calls accordingly.
3941 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3942 stmt_vec_infos instead of gimple stmts.
3943 (vect_analyze_slp_instance): Update use accordingly.
3944 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3945 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3946 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3947 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3948 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3949 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3950 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3951 down to subroutines.
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3955 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3956 of the worklist from a vector of gimple stmts to a vector of
3958 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3959 (vect_mark_stmts_to_be_vectorized): Likewise
3961 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3963 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3964 statement before passing it to vect_analyze_stmt.
3965 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3966 the chain of phi vector definitions. Track the exit phi via its
3968 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3969 STMT_VINFO_REDUC_DEF.
3970 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3971 stmt_vec_infos to handle the statement chains.
3972 (vect_get_slp_defs): Record the first statement in the node
3973 using a stmt_vec_info.
3974 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3975 statements here and pass their stmt_vec_info down to subroutines.
3976 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3977 down to vect_finish_stmt_generation.
3978 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3979 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3980 stmt_vec_infos to subroutines.
3981 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3984 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3986 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3987 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3988 (vect_permute_store_chain, vect_setup_realignment)
3989 (vect_permute_load_chain, vect_shift_permute_load_chain)
3990 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3991 stmts internally, and when passing values to other vectorizer routines.
3992 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3993 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3994 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3995 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3996 (vectorizable_reduction, vectorizable_induction)
3997 (vectorizable_live_operation, vect_transform_loop_stmt)
3998 (vect_transform_loop): Likewise.
3999 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4000 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4001 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4002 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4003 (vect_slp_analyze_node_operations_1): Likewise.
4004 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4005 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4006 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4007 (vect_finish_stmt_generation_1, get_group_load_store_type)
4008 (get_load_store_type, vect_build_gather_load_calls)
4009 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4010 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4011 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4012 (vectorizable_store, vectorizable_load, vectorizable_condition)
4013 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4014 (supportable_widening_operation): Likewise.
4015 (vect_get_vector_types_for_stmt): Likewise.
4016 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4018 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4020 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4021 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4022 (vect_permute_store_chain, vect_permute_load_chain)
4023 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4024 repeated stmt_vec_info lookups.
4025 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4026 (vect_update_ivs_after_vectorizer): Likewise.
4027 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4028 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4029 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4030 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4031 (vect_bb_slp_scalar_cost): Likewise.
4032 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4036 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4037 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4038 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4039 to get gassigns and gcalls, rather than operating on generc gimple
4041 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4042 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4043 (vectorizable_load, vect_analyze_stmt): Likewise.
4044 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4048 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4049 return stmt_vec_infos rather than gimple stmts. Do not accept
4051 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4053 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4054 Update use of get_later_stmt.
4055 (vect_get_constant_vectors): Update call accordingly.
4056 (vect_schedule_slp_instance): Likewise
4057 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4058 (vect_slp_analyze_instance_dependence): Likewise.
4059 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4061 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4063 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4064 (stmt_info_for_cost::stmt_info): ...this new field.
4065 (add_stmt_costs): Update accordingly.
4066 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4067 (vect_get_known_peeling_cost): Likewise.
4068 (vect_estimate_min_profitable_iters): Likewise.
4069 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4071 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4073 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4074 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4075 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4077 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4079 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4081 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4082 a gimple stmt to a stmt_vec_info.
4083 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4085 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4087 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4088 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4089 (_loop_vec_info::reduction_chains): Likewise.
4090 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4092 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4096 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4097 a gimple stmt to a stmt_vec_info.
4098 (_stmt_vec_info::next_element): Likewise.
4099 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4100 (vect_slp_analyze_and_verify_node_alignment)
4101 (vect_analyze_group_access_1, vect_analyze_group_access)
4102 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4103 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4104 (vect_supportable_dr_alignment): Update accordingly.
4105 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4106 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4107 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4108 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4109 * tree-vect-slp.c (vect_build_slp_tree_1)
4110 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4111 (vect_split_slp_store_group, vect_analyze_slp_instance)
4112 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4113 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4114 (get_group_load_store_type, get_load_store_type)
4115 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4116 (vect_transform_stmt, vect_remove_stores): Likewise.
4118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4120 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4122 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4123 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4124 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4125 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4126 (vector_alignment_reachable_p, vect_get_data_access_cost)
4127 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4128 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4129 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4130 (vect_analyze_group_access_1, vect_analyze_group_access)
4131 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4132 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4133 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4134 result of vect_dr_stmt and use the stmt_vec_info instead of
4135 the associated gimple stmt.
4136 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4137 (vect_gen_prolog_loop_niters): Likewise.
4138 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4140 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4142 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4143 to a vec<stmt_vec_info>.
4144 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4145 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4147 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4148 to a vec<stmt_vec_info>.
4149 (bst_traits::value_type, bst_traits::value_type): Likewise.
4150 (bst_traits::hash): Update accordingly.
4151 (vect_get_and_check_slp_defs): Change the stmts parameter from
4152 a vec<gimple *> to a vec<stmt_vec_info>.
4153 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4154 (vect_build_slp_tree): Likewise.
4155 (vect_build_slp_tree_2): Likewise. Update uses of
4156 SLP_TREE_SCALAR_STMTS.
4157 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4158 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4159 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4160 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4161 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4162 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4163 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4164 (vect_get_constant_vectors, vect_get_slp_defs)
4165 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4166 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4167 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4168 instead of gimple stmts.
4169 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4170 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4171 (vect_slp_analyze_instance_dependence): Update uses of
4172 SLP_TREE_SCALAR_STMTS.
4173 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4174 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4175 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4176 (get_initial_defs_for_reduction): Likewise.
4177 (vect_create_epilog_for_reduction): Likewise.
4178 (vectorize_fold_left_reduction): Likewise.
4179 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4180 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4181 (can_vectorize_live_stmts): Likewise.
4183 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4185 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4186 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4187 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4189 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4191 (gather_scalar_reductions): Update after above interface changes.
4192 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4193 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4195 (vect_force_simple_reduction): Likewise.
4196 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4197 LOOP_VINFO_REDUCTIONS.
4198 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4202 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4203 a gimple stmt to a stmt_vec_info.
4204 * tree-vect-loop.c (vect_active_double_reduction_p)
4205 (vect_force_simple_reduction, vectorizable_reduction): Update
4208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4210 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4211 vec<gimple *> to a vec<stmt_vec_info>.
4212 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4213 the reduction_phis argument from a vec<gimple *> to a
4215 (vectorizable_reduction): Likewise the phis local variable that
4216 is passed to vect_create_epilog_for_reduction. Update for new type
4217 of SLP_TREE_VEC_STMTS.
4218 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4219 (vectorizable_live_operation): Likewise.
4220 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4221 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4223 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4225 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4226 a gimple stmt to a stmt_vec_info.
4227 (vectorizable_condition, vectorizable_live_operation)
4228 (vectorizable_reduction, vectorizable_induction): Pass back the
4229 vectorized statement as a stmt_vec_info.
4230 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4231 use of STMT_VINFO_VEC_STMT.
4232 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4233 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4234 as stmt_vec_infos rather than gimple stmts.
4235 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4237 (vectorizable_live_operation): Likewise.
4238 (vectorizable_reduction, vectorizable_induction): Likewise,
4239 updating use of STMT_VINFO_VEC_STMT.
4240 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4241 of STMT_VINFO_VEC_STMT.
4242 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4243 (vectorizable_simd_clone_call, vectorizable_conversion)
4244 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4245 (vectorizable_store, vectorizable_load, vectorizable_condition)
4246 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4247 from a gimple stmt to a stmt_vec_info.
4248 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4249 pointer to a stmt_vec_info to the vectorizable_* routines.
4251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4253 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4254 a gimple stmt to a stmt_vec_info.
4255 (is_pattern_stmt_p): Update accordingly.
4256 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4257 (vect_record_grouped_load_vectors): Likewise.
4258 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4259 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4260 (vect_model_reduction_cost): Likewise.
4261 (vect_create_epilog_for_reduction): Likewise.
4262 (vectorizable_reduction, vectorizable_induction): Likewise.
4263 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4264 Return the stmt_vec_info for the pattern statement.
4265 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4266 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4267 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4268 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4269 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4270 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4271 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4272 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4276 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4277 (vect_finish_stmt_generation): Likewise.
4278 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4279 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4280 (vect_build_gather_load_calls): Use the return value of the above
4281 functions instead of a separate call to vinfo_for_stmt. Use narrow
4282 scopes for the input gimple stmt and wider scopes for the associated
4283 stmt_vec_info. Use vec_info::lookup_def when setting these
4284 stmt_vec_infos from an SSA_NAME definition.
4285 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4286 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4287 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4288 (vectorizable_store, vectorizable_load, vectorizable_condition)
4289 (vectorizable_comparison): Likewise.
4290 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4291 (vectorizable_reduction): Likewise.
4293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4295 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4296 stmt_vec_info * parameter before the optional gimple **.
4297 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4298 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4299 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4300 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4301 (vectorizable_live_operation): Likewise.
4302 * tree-vect-patterns.c (type_conversion_p): Likewise.
4303 (vect_look_through_possible_promotion): Likewise.
4304 (vect_recog_rotate_pattern): Likewise.
4305 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4307 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4309 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4310 a typedef to a wrapper class.
4311 (NULL_STMT_VEC_INFO): New macro.
4312 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4313 (stmt_vec_info::operator*): New function.
4314 (stmt_vec_info::operator gimple *): Likewise.
4315 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4316 (add_stmt_costs): Likewise.
4317 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4318 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4319 (vect_get_known_peeling_cost): Likewise.
4320 (vect_estimate_min_profitable_iters): Likewise.
4321 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4322 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4323 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4324 (vectorizable_store, free_stmt_vec_infos): Likewise.
4325 (new_stmt_vec_info): Change return type of xcalloc to
4328 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4330 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4331 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4332 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4333 a single_imm_use-based sequence.
4334 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4336 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4338 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4339 * tree-vectorizer.c (vec_info::lookup_def): New function.
4340 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4341 (vect_widened_op_tree): Likewise.
4342 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4343 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4344 (vectorizable_reduction): Likewise.
4345 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4347 (vect_is_slp_reduction): Update calls accordingly. Use
4348 vec_info::lookup_def.
4349 (vect_is_simple_reduction): Likewise
4350 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4352 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4354 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4355 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4356 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4358 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4359 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4360 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4361 (vect_is_slp_reduction, vectorizable_induction)
4362 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4363 * tree-vect-patterns.c (vect_init_pattern_stmt):
4364 (vect_determine_min_output_precision_1, vect_determine_precisions)
4365 (vect_pattern_recog): Likewise.
4366 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4367 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4368 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4369 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4370 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4371 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4372 info field from a loop to a loop_vec_info.
4374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4376 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4377 (vec_info::add_stmt): Declare.
4378 * tree-vectorizer.c (vec_info::add_stmt): New function.
4379 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4380 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4381 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4382 (vectorizable_induction): Likewise.
4383 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4384 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4385 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4386 (vectorizable_load): Likewise.
4387 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4388 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4389 (vect_recog_gather_scatter_pattern): Likewise.
4390 (append_pattern_def_seq): Likewise. Remove a check that is
4391 performed by add_stmt itself.
4393 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4395 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4396 which make_ssa_name was called with new_stmt before new_stmt
4399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4401 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4403 (vect_is_slp_reduction): ...here...
4404 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4405 that are already known to be false.
4407 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4409 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4410 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4411 STMT_VINFO_NUM_SLP_USES when it's true.
4412 (vect_free_slp_instance): Add a final_p parameter and pass it to
4414 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4415 (vect_analyze_slp_instance): Likewise.
4416 (vect_slp_analyze_operations): Likewise.
4417 (vect_slp_analyze_bb_1): Likewise.
4418 * tree-vectorizer.c (vec_info): Likewise.
4419 * tree-vect-loop.c (vect_transform_loop): Likewise.
4421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4423 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4424 function is not called for second and subsequent members of
4427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4429 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4430 cases for nested loops from here to ...
4431 (vect_create_epilog_for_reduction): ...here. Only call
4432 vect_is_simple_use for inner-loop reductions.
4434 2018-07-31 Martin Liska <mliska@suse.cz>
4436 PR gcov-profile/85338
4437 PR gcov-profile/85350
4438 PR gcov-profile/85372
4439 * profile.c (struct location_triplet): New.
4440 (struct location_triplet_hash): Likewise.
4441 (output_location): Do not output a BB that
4442 is already recorded for a line.
4443 (branch_prob): Use streamed_locations.
4445 2018-07-31 Martin Liska <mliska@suse.cz>
4447 PR gcov-profile/85370
4448 * coverage.c (coverage_begin_function): Do not mark target
4449 clones as artificial functions.
4451 2018-07-31 Martin Liska <mliska@suse.cz>
4453 PR gcov-profile/83813
4454 PR gcov-profile/84758
4455 PR gcov-profile/85217
4456 PR gcov-profile/85332
4457 * profile.c (branch_prob): Do not record GOTO expressions
4458 for GIMPLE statements which locations are already streamed.
4460 2018-07-31 Olivier Hainque <hainque@adacore.com>
4462 * gcc.c (handle_spec_function): Accept a soft_matched_part
4463 argument, as do_spec_1. Pass it down to ...
4464 (eval_spec_function): Accept a soft_matched_part argument,
4465 and pass it down to ...
4466 (do_spec_2): Accept a soft_matched_part argument, and pass
4467 it down to do_spec_1.
4468 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4469 (handle_braces): Update call to handle_spec_function.
4470 (driver::set_up_specs): Update calls to do_spec_2.
4471 (compare_debug_dump_opt_spec_function): Likewise.
4472 (compare_debug_self_opt_spec_function): Likewise.
4474 2018-07-31 Olivier Hainque <hainque@adacore.com>
4476 * common.opt (nolibc): New option.
4477 * doc/invoke.texi (Link Options): Document it.
4478 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4479 * config/alpha/linux.h: Likewise.
4480 * config/arc/elf.h: Likewise.
4481 * config/arm/uclinux-elf.h: Likewise.
4482 * config/arm/unknown-elf.h: Likewise.
4483 * config/avr/avrlibc.h: Likewise.
4484 * config/bfin/bfin.h: Likewise.
4485 * config/bfin/linux.h: Likewise.
4486 * config/bfin/uclinux.h: Likewise.
4487 * config/darwin.h: Likewise.
4488 * config/darwin10.h: Likewise.
4489 * config/darwin12.h: Likewise.
4490 * config/gnu-user.h: Likewise.
4491 * config/lm32/uclinux-elf.h: Likewise.
4492 * config/pa/pa-hpux11.h: Likewise.
4493 * config/pa/pa64-hpux.h: Likewise.
4494 * config/sparc/sparc.h: Likewise.
4496 2018-07-31 Olivier Hainque <hainque@adacore.com>
4498 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4499 undefined variables.
4501 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4504 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4507 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4509 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4510 terminated string literal.
4512 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4514 PR rtl-optimization/85160
4515 * combine.c (is_just_move): New function.
4516 (try_combine): Allow combining two instructions into two if neither of
4517 the original instructions was a move.
4519 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4522 * doc/extend.texi (Global Register Variables): Discourage use of type
4524 (Local Register Variables): Likewise.
4526 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4528 PR tree-optimization/86506
4529 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4531 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4534 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4535 hard_regno, make sure no insn between `from` and `to` clobbers it.
4537 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4538 Tom de Vries <tdevries@suse.de>
4540 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4541 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4542 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4543 PTX_DEFAULT_RUNTIME_DIM.
4544 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4546 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4548 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4549 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4550 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4552 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4554 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4556 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4557 predicate to reflect toc fusion has been deleted.
4558 (toc_fusion_mem_raw): Delete, no longer used.
4559 (toc_fusion_mem_wrapped): Likewise.
4560 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4562 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4563 Delete, no longer used.
4564 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4565 meant to be used for toc fusion.
4566 (rs6000_debug_print_mode): Delete toc fusion debugging.
4567 (rs6000_debug_reg_global): Likewise.
4568 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4569 fusion and secondary reload support that were never used.
4570 (rs6000_option_override_internal): Delete TOC fusion, that was only
4571 partially defined, and it did not work unless you also used the
4573 (rs6000_legitimate_address_p): Delete TOC fusion support.
4574 (rs6000_opt_masks): Likewise.
4575 (fusion_wrap_memory_address): Delete function, no longer used.
4576 (fusion_split_address); Delete TOC fusion support.
4577 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4578 longer used with toc fusion being deleted.
4579 (TARGET_TOC_FUSION_FP): Likewise.
4580 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4582 (toc fusion spliter): Delete TOC fusion support.
4583 (toc_fusionload_<mode>): Likewise.
4584 (toc_fusionload_di): Likewise.
4585 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4586 longer needs to be named. Rename predicate to delete TOC fusion.
4587 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4588 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4589 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4590 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4591 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4593 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4595 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4596 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4597 __int128 in built-in function prototypes.
4598 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4599 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4601 2018-07-27 Martin Sebor <msebor@redhat.com>
4603 PR tree-optimization/86696
4604 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4605 types, including enums.
4606 (handle_char_store): Be prepared for the above function to fail.
4608 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4610 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4611 when optimization level is lower than 2 or optimize for size.
4613 2018-07-26 Martin Sebor <msebor@redhat.com>
4615 PR tree-optimization/86043
4616 PR tree-optimization/86042
4617 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4618 (get_string_cst_length): Rename...
4619 (get_min_string_length): ...to this. Add argument.
4620 (handle_char_store): Extend to handle multi-character stores by
4622 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4623 * tree.h (initializer_zerop): Add argument.
4625 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4628 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4629 declare target to variables if they have always,{to,from,tofrom} map
4632 2018-07-26 Martin Liska <mliska@suse.cz>
4635 * lto-wrapper.c: Add linker_output as prefix
4636 for ltrans_output_file.
4638 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4640 PR rtl-optimization/85805
4641 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4642 value for hard registers if that was written in the same mode.
4644 2018-07-26 Martin Liska <mliska@suse.cz>
4646 PR gcov-profile/86536
4647 * gcov.c (format_gcov): Use printf format %.*f directly
4648 and do not handle special values.
4650 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4652 * common/config/arc/arc-common.c (arc_option_optimization_table):
4653 Update default optimizations for size.
4655 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4657 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4658 * config/arc/constraints.md (CfZ): New constraint.
4659 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4660 (subsf3_fpu): Likewise.
4661 (cmpsf_fpu): Likewise.
4662 (cmpsf_fpu_uneq): Likewise.
4664 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4666 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4668 (arc_is_uncached_mem_p): uncached applies to both the variable and
4671 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4673 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4676 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4678 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4679 field "m_scopes" from vec to auto_vec.
4681 2018-07-25 Martin Liska <mliska@suse.cz>
4683 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4686 2018-07-25 Richard Biener <rguenther@suse.de>
4689 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4690 special wrt context_die late.
4691 (gen_subprogram_die): Re-use DIEs in local scope.
4693 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4695 PR tree-optimization/86644
4696 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4698 2018-07-25 Martin Liska <mliska@suse.cz>
4701 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4702 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4704 2018-07-25 Martin Liska <mliska@suse.cz>
4707 * params.def: Explain ASan abbreviation and provide
4708 a documentation link.
4710 2018-07-24 Martin Sebor <msebor@redhat.com>
4712 PR tree-optimization/86622
4713 PR tree-optimization/86532
4714 * builtins.h (string_length): Declare.
4715 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4716 (check_access): Be prepared for non-constant length ranges.
4717 (string_length): Make extern.
4718 * expr.c (string_constant): Only handle the minor non-constant
4719 array index. Use string_constant to compute the length of
4720 a generic string constant.
4722 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4724 PR tree-optimization/86618
4725 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4726 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4728 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4730 PR tree-optimization/86636
4731 * json.cc (json::object::set): Fix comment. Add assertions.
4732 (json::array::append): Move here from json.h. Add comment and an
4734 (json::string::string): Likewise.
4735 * json.h (json::array::append): Move to json.cc.
4736 (json::string::string): Likewise.
4737 * optinfo-emit-json.cc
4738 (optrecord_json_writer::impl_location_to_json): Assert that we
4739 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4740 wrapper around it. Expand the location once, rather than three
4742 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4743 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4745 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4746 places. Fix some overlong lines.
4748 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4750 * config/aarch64/aarch64-simd.md
4751 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4752 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4753 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4754 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4755 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4756 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4757 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4758 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4759 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4761 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4764 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4765 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4766 and abs_d == d, do the power of two handling if profitable.
4768 2018-07-24 Richard Biener <rguenther@suse.de>
4770 * match.pd: Add BIT_FIELD_REF canonicalizations.
4772 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4775 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4777 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4779 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4780 terminated STRING_CST object.
4782 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4784 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4786 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4788 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4789 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4790 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4791 the elements into a register.
4792 (rs6000_split_v4si_init_di_reg): Delete.
4793 (rs6000_split_v4si_init): Delete.
4794 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4795 (vsx_init_v4si): Rewrite as a define_expand.
4797 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4799 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4800 zero_extend argument from memory): New.
4802 2018-07-22 Martin Sebor <msebor@redhat.com>
4805 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4806 diagnosing calls with unknown arguments unless -Walloca-larger-than
4807 is restricted to less than PTRDIFF_MAX bytes.
4809 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4811 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4813 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4815 * pretty-print.c (text_info::set_location): Remove redundant
4816 "line_table" parameter from call to rich_location::set_range.
4818 2018-07-20 Martin Sebor <msebor@redhat.com>
4821 * builtins.c (expand_builtin_alloca): Adjust.
4822 * calls.c (alloc_max_size): Simplify.
4823 * cgraphunit.c (cgraph_node::expand): Adjust.
4824 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4826 (frame_larger_than_size): Same.
4827 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4828 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4830 * doc/invoke.texi (GCC Command Options): Document option arguments.
4831 Explain byte-size arguments and suffixes.
4832 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4833 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4834 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4835 * doc/options.texi (UInteger): Expand.
4836 (Host_Wide_Int, ByteSize): Document new properties.
4837 * final.c (final_start_function_1): Include sizes in an error message.
4838 * function.c (frame_offset_overflow): Same.
4839 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4840 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4841 Diagnose unbounded alloca calls only for limits of less than
4843 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4844 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4846 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4847 only for limits of less than PTRDIFF_MAX.
4848 * langhooks-def.h (lhd_handle_option): Change function argument
4850 * langhooks.c (lhd_handle_option): Same.
4851 * langhooks.h (handle_option): Same.
4852 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4854 (var_type, var_type_struct): Same.
4855 (var_set): Handle ByteSize flag.
4856 * optc-gen.awk: Add comments to output to ease debugging. Make
4857 use of HOST_WIDE_INT where appropriate.
4858 * opts-gen-save.awk: Use %lx to format unsigned long.
4859 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4860 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4861 arguments. Parse bytes-size suffixes.
4862 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4863 (enum_value_to_arg): Same.
4864 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4865 (handle_option): Adjust.
4866 (generate_option): Change function argument to HOST_WIDE_INT.
4867 (cmdline_handle_error): Adjust.
4868 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4869 (set_option): Change function argument to HOST_WIDE_INT.
4870 (option_enabled): Handle cl_host_wide_int.
4871 (get_option_state): Handle CLVC_SIZE.
4872 (control_warning_option): Same.
4873 * opts.c (common_handle_option): Change function argument to
4874 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4875 OPT_Wvla_larger_than_.
4876 * opts.h (enum cl_var_type): Add an enumerator.
4877 * stor-layout.c (layout_decl): Print a more meaningful warning.
4878 * toplev.c (output_stack_usage): Adjust.
4880 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4882 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4883 call to inline_expand_builtin_string_cmp.
4884 (expand_builtin_strcmp): Likewise.
4885 (expand_builtin_strncmp): Likewise.
4886 (inline_string_cmp): Delete the last parameter, change char_type_node
4887 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4889 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4890 the inlining expansion on target where the type of the call has same or
4891 narrower precision than unsigned char.
4893 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4895 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4896 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4897 * common.opt (fsave-optimization-record): New option.
4898 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4899 * doc/invoke.texi (-fsave-optimization-record): New option.
4900 * dumpfile.c: Include "optinfo-emit-json.h".
4901 (struct kv_pair): Move to coretypes.h.
4902 (optgroup_options): Make non-static.
4903 (dump_context::end_scope): Call
4904 optimization_records_maybe_pop_dump_scope.
4905 * dumpfile.h (optgroup_options): New decl.
4906 * json.cc: New file.
4908 * optinfo-emit-json.cc: New file.
4909 * optinfo-emit-json.h: New file.
4910 * optinfo.cc: Include "optinfo-emit-json.h".
4911 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4912 (optinfo_enabled_p): Check optimization_records_enabled_p.
4913 (optinfo_wants_inlining_info_p): Likewise.
4914 * optinfo.h: Update comment.
4915 * profile-count.c (profile_quality_as_string): New function.
4916 * profile-count.h (profile_quality_as_string): New decl.
4917 (profile_count::quality): New accessor.
4918 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4919 and optinfo_emit_json_cc_tests.
4920 * selftest.h (selftest::json_cc_tests): New decl.
4921 (selftest::optinfo_emit_json_cc_tests): New decl.
4922 * toplev.c: Include "optinfo-emit-json.h".
4923 (compile_file): Call optimization_records_finish.
4924 (do_compile): Call optimization_records_start.
4925 * tree-ssa-live.c: Include optinfo.h.
4926 (remove_unused_scope_block_p): Retain inlining information if
4927 optinfo_wants_inlining_info_p returns true.
4929 2018-07-20 Richard Biener <rguenther@suse.de>
4932 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4933 to cover -flto-partition=none.
4935 2018-07-20 Martin Liska <mliska@suse.cz>
4937 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4938 (get_decl_source_range): Remove unused function.
4940 2018-07-20 Richard Biener <rguenther@suse.de>
4942 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4943 (struct vn_phi_s): Likewise.
4944 (struct vn_reference_s): Likewise.
4945 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4946 for searching the slot of an entry known to be in the hash itself.
4947 (vn_phi_hasher::equal): Likewise.
4948 (vn_reference_hasher::equal): Likewise.
4949 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4951 (optimistic_info, current_info): Remove, keeping only valid_info.
4952 (vn_reference_lookup_1): Remove fallback lookup.
4953 (vn_reference_lookup_2): Likewise.
4954 (vn_nary_op_lookup_1): Likewise.
4955 (vn_phi_lookup): Likewise.
4956 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4958 (vn_reference_insert): Adjust, chain the inserted hash element
4959 at last_inserted_ref.
4960 (vn_reference_insert_pieces): Likewise.
4961 (visit_reference_op_call): Likewise.
4962 (vn_nary_op_insert_into): Chain the inserted hash element at
4964 (vn_nary_op_insert_pieces): Adjust.
4965 (vn_nary_op_insert): Likewise.
4966 (vn_nary_op_insert_stmt): Likewise.
4967 (vn_phi_insert): Adjust, chain the inserted hash element at
4969 (process_scc): Remove clearing and copying the optimistic
4970 table. Instead remove elements inserted during an optimistic
4971 iteration from the single table we maintain.
4972 (init_scc_vn): Adjust.
4973 (free_scc_vn): Likewise.
4974 (sccvn_dom_walker::record_cond): Likewise.
4975 (sccvn_dom_walker::after_dom_children): Likewise.
4977 2018-07-19 Martin Sebor <msebor@redhat.com>
4979 PR tree-optimization/84047
4980 PR tree-optimization/83776
4981 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4982 (check_array_bounds): Call it.
4984 2018-07-19 Martin Sebor <msebor@redhat.com>
4986 * align.h (align_flags): Use member initialization.
4988 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4990 * Makefile.in (OBJS): Add optinfo.o.
4991 * coretypes.h (class symtab_node): New forward decl.
4992 (struct cgraph_node): New forward decl.
4993 (class varpool_node): New forward decl.
4994 * dump-context.h: New file.
4995 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4997 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4998 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4999 (set_alt_dump_file): Likewise.
5000 (dump_context::~dump_context): New dtor.
5001 (dump_gimple_stmt): Move implementation to...
5002 (dump_context::dump_gimple_stmt): ...this new member function.
5003 Add the stmt to any pending optinfo, creating one if need be.
5004 (dump_gimple_stmt_loc): Move implementation to...
5005 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5006 Start a new optinfo and add the stmt to it.
5007 (dump_gimple_expr): Move implementation to...
5008 (dump_context::dump_gimple_expr): ...this new member function.
5009 Add the stmt to any pending optinfo, creating one if need be.
5010 (dump_gimple_expr_loc): Move implementation to...
5011 (dump_context::dump_gimple_expr_loc): ...this new member function.
5012 Start a new optinfo and add the stmt to it.
5013 (dump_generic_expr): Move implementation to...
5014 (dump_context::dump_generic_expr): ...this new member function.
5015 Add the tree to any pending optinfo, creating one if need be.
5016 (dump_generic_expr_loc): Move implementation to...
5017 (dump_context::dump_generic_expr_loc): ...this new member
5018 function. Add the tree to any pending optinfo, creating one if
5020 (dump_printf): Move implementation to...
5021 (dump_context::dump_printf_va): ...this new member function. Add
5022 the text to any pending optinfo, creating one if need be.
5023 (dump_printf_loc): Move implementation to...
5024 (dump_context::dump_printf_loc_va): ...this new member function.
5025 Start a new optinfo and add the stmt to it.
5026 (dump_dec): Move implementation to...
5027 (dump_context::dump_dec): ...this new member function. Add the
5028 value to any pending optinfo, creating one if need be.
5029 (dump_context::dump_symtab_node): New member function.
5030 (dump_context::get_scope_depth): New member function.
5031 (dump_context::begin_scope): New member function.
5032 (dump_context::end_scope): New member function.
5033 (dump_context::ensure_pending_optinfo): New member function.
5034 (dump_context::begin_next_optinfo): New member function.
5035 (dump_context::end_any_optinfo): New member function.
5036 (dump_context::s_current): New global.
5037 (dump_context::s_default): New global.
5038 (dump_scope_depth): Delete global.
5039 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5040 (dump_symtab_node): New function.
5041 (get_dump_scope_depth): Reimplement in terms of dump_context.
5042 (dump_begin_scope): Likewise.
5043 (dump_end_scope): Likewise.
5044 (selftest::temp_dump_context::temp_dump_context): New ctor.
5045 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5046 (selftest::verify_item): New function.
5047 (ASSERT_IS_TEXT): New macro.
5048 (ASSERT_IS_TREE): New macro.
5049 (ASSERT_IS_GIMPLE): New macro.
5050 (selftest::test_capture_of_dump_calls): New test.
5051 (selftest::dumpfile_c_tests): Call it.
5052 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5053 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5054 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5055 descriptive comment.
5056 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5057 (dump_node, dump_bb): Move these unrelated decls.
5058 (class dump_manager): Add leading comment.
5059 * optinfo.cc: New file.
5060 * optinfo.h: New file.
5062 2018-07-19 Michael Collison <michael.collison@arm.com>
5063 Richard Henderson <rth@redhat.com>
5065 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5066 (subti): Handle op1 zero.
5067 (subvti4, usub4ti4): New.
5068 (*sub<GPI>3_compare1_imm): New.
5069 (sub<GPI>3_carryinCV): New.
5070 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5071 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5073 2018-07-19 Michael Collison <michael.collison@arm.com>
5074 Richard Henderson <rth@redhat.com>
5076 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5077 (addti3): Create simpler code if low part is already known to be 0.
5078 (addvti4, uaddvti4): New.
5079 (*add<GPI>3_compareC_cconly_imm): New.
5080 (*add<GPI>3_compareC_cconly): New.
5081 (*add<GPI>3_compareC_imm): New.
5082 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5083 handle constants within this pattern..
5084 (*add<GPI>3_compareV_cconly_imm): New.
5085 (*add<GPI>3_compareV_cconly): New.
5086 (*add<GPI>3_compareV_imm): New.
5087 (add<GPI>3_compareV): New.
5088 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5089 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5090 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5091 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5092 with 'comparison' operator.
5093 (*add<GPI>3_compareV_cconly_imm): Ditto.
5094 (*add<GPI>3_compareV_cconly): Ditto.
5095 (*add<GPI>3_compareV_imm): Ditto.
5096 (add<GPI>3_compareV): Ditto.
5097 (add<mode>3_carryinC): Ditto.
5098 (*add<mode>3_carryinC_zero): Ditto.
5099 (*add<mode>3_carryinC): Ditto.
5100 (add<mode>3_carryinV): Ditto.
5101 (*add<mode>3_carryinV_zero): Ditto.
5102 (*add<mode>3_carryinV): Ditto.
5104 2018-07-19 Michael Collison <michael.collison@arm.com>
5105 Richard Henderson <rth@redhat.com>
5107 * config/aarch64/aarch64-modes.def (CC_V): New.
5108 * config/aarch64/aarch64-protos.h
5109 (aarch64_addti_scratch_regs): Declare
5110 (aarch64_subvti_scratch_regs): Declare.
5111 (aarch64_expand_subvti): Declare.
5112 (aarch64_gen_unlikely_cbranch): Declare
5113 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5114 for signed overflow using CC_Vmode.
5115 (aarch64_get_condition_code_1): Handle CC_Vmode.
5116 (aarch64_gen_unlikely_cbranch): New function.
5117 (aarch64_addti_scratch_regs): New function.
5118 (aarch64_subvti_scratch_regs): New function.
5119 (aarch64_expand_subvti): New function.
5121 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5123 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5125 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5126 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5129 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5132 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5133 address check not strict.
5135 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5137 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5139 (store_pair_lanes<mode>): Likewise.
5140 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5141 enum value 'ADDR_QUERY_LDP_STP_N'.
5142 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5143 (aarch64_print_address_internal): Add declaration.
5144 (aarch64_print_ldpstp_address): Remove.
5145 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5146 (aarch64_print_operand): Change printing of 'y'.
5147 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5148 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5149 'true' rather than '1'.
5150 * config/aarch64/constraints.md (Uml): Likewise.
5151 (Uml): Rename to Umn.
5154 2018-07-19 Richard Biener <rguenther@suse.de>
5156 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5158 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5159 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5160 (vn_reference_hasher): Likewise.
5161 (struct vn_tables_s): Remove obstack and alloc-pool members.
5162 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5163 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5164 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5165 (vn_reference_insert_pieces): Likewise.
5166 (alloc_vn_nary_op_noinit): Adjust.
5167 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5168 (vn_phi_eq): Adjust.
5169 (shared_lookup_phiargs): Remove.
5170 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5171 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5172 (visit_reference_op_call): Likewise.
5173 (copy_nary, copy_phi, copy_reference): Remove.
5174 (process_scc): Rewind the obstack when iterating. Do not
5175 copy the elements to valid_info but just move them from one
5176 hashtable to the other.
5177 (allocate_vn_table): Adjust.
5178 (free_vn_table): Likewise.
5179 (init_scc_vn): Likewise.
5180 (free_scc_vn): Likewise.
5182 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5185 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5186 indirect_return as function type attribute.
5187 (ix86_attribute_table): Change indirect_return to function
5189 * doc/extend.texi: Update indirect_return attribute.
5191 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5193 * wide-int.h (widest2_int): New.
5194 * gimple-fold.c (arith_overflowed_p): Use it.
5195 * tree.h (widest2_int_cst): New.
5196 * tree-vrp.c (wide_int_binop_overflow): Rename from
5197 vrp_int_const_binop.
5198 Rewrite to work on trees.
5199 (extract_range_from_multiplicative_op_1): Abstract code to...
5200 (wide_int_range_min_max): ...here.
5201 (wide_int_range_cross_product): ...and here.
5202 (extract_range_from_binary_expr_1): Abstract overflow code to...
5203 (wide_int_range_mult_wrapping): ...here.
5204 * tree-vrp.h (wide_int_range_cross_product): New.
5205 (wide_int_range_mult_wrapping): New.
5207 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5208 Julia Koval <julia.koval@intel.com>
5210 * config/i386/x86-tune-costs.h (skylake_memcpy,
5211 skylake_memset): Replace rep_prefix with unrolling for size 512.
5213 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5216 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5217 comparision with EQ_EXPR in last stmt.
5219 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5221 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5222 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5223 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5224 previously known as "PowerPC AltiVec Built-in Functions". Move
5225 some material to new subsubsections "PowerPC AltiVec Built-in
5226 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5228 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5229 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5230 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5231 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5233 2018-07-18 Richard Biener <rguenther@suse.de>
5235 PR tree-optimization/86557
5236 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5239 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5241 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5243 2018-07-17 Jeff Law <law@redhat.com>
5245 * config/arm/arm.c (get_label_padding): Update for recent
5246 changes to label_to_alignment.
5248 PR tree-optimization/86010
5249 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5251 * config/mips/mips.c (vr4130_align_insns): Update for recent
5252 changes to label_to_alignment.
5254 * config/frv/frv.c (frv_label_align): Update for recent changes
5255 to label_to_alignment.
5257 * config/nios2/nios2.c (nios2_label_align): Update for recent
5258 changes which dropped ALIGN_LABELS_LOG.
5260 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5262 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5263 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5265 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5267 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5268 deprecated align_labels_log.
5270 2018-07-17 Richard Biener <rguenther@suse.de>
5273 * dwarf2out.c (init_sections_and_labels): Always generate
5274 a debug_line_str_section for early LTO debug.
5275 (dwarf2out_finish): Reset debug_line_str_hash output early.
5276 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5278 (dwarf2out_early_finish): Output debug_line_str.
5280 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5282 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5283 index register on z196 or later.
5285 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5287 * config/s390/s390.c (s390_default_align): Set default function
5289 (s390_override_options_after_change): Call s390_default align.
5290 (s390_option_override_internal): Call s390_default_align.
5291 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5293 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5296 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5297 to _looptemp_ clauses, other than the first two.
5299 2018-07-17 Martin Liska <mliska@suse.cz>
5301 * opts.c: Do not enable OPT_falign_* for -Os.
5303 2018-07-17 Martin Liska <mliska@suse.cz>
5305 * align.h (MAX_CODE_ALIGN): New.
5306 (MAX_CODE_ALIGN_VALUE): New.
5307 * common/config/i386/i386-common.c (ix86_handle_option):
5308 (MAX_CODE_ALIGN): Moved to align.h.
5309 * final.c (MAX_CODE_ALIGN): Likewise.
5310 * opts.c (parse_and_check_align_values):
5311 (MAX_CODE_ALIGN): Likewise.
5312 (MAX_CODE_ALIGN_VALUE): Likewise.
5314 2018-07-17 Martin Liska <mliska@suse.cz>
5316 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5317 in order to fulfil coding style.
5318 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5319 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5320 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5321 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5322 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5323 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5324 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5325 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5326 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5328 2018-07-17 Martin Liska <mliska@suse.cz>
5330 * align.h: New file.
5331 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5333 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5334 align_flags of label_to_alignment.
5335 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5337 * config/m68k/m68k.c: Do not use removed align_labels_value and
5339 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5340 (LOOP_ALIGN): Likewise.
5341 (LABEL_ALIGN): Likewise.
5342 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5343 Remove not used macro.
5344 (rs6000_loop_align): Change return type to align_flags.
5345 (rs6000_loop_align_max_skip): Remove.
5346 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5347 Change return type to align_flags.
5348 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5349 Remove not used macro.
5350 (rs6000_loop_align): Change return type to align_flags.
5351 (rs6000_loop_align_max_skip): Remove.
5352 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5353 * config/rx/rx-protos.h (rx_align_for_label): Make it
5355 * config/rx/rx.c (rx_align_for_label): Change return type
5357 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5359 into align_flags class.
5360 (LABEL_ALIGN): Likewise.
5361 (LOOP_ALIGN): Likewise.
5362 * config/s390/s390.c (s390_label_align): Use align_flags
5364 (s390_asm_output_function_label): Likewise.
5365 * config/sh/sh.c (sh_override_options_after_change):
5366 Use align_flags class directly without macros.
5367 (find_barrier): Likewise.
5368 (barrier_align): Likewise.
5369 (sh_loop_align): Likewise.
5370 * config/spu/spu.c (spu_option_override):
5371 Use align_flags_tuple::get_value instead of removed macros.
5372 (spu_sched_init): Likewise.
5373 * config/spu/spu.h (GTY): Likewise.
5374 * config/visium/visium.c (visium_option_override):
5375 Set "8" as default secondary alignment.
5376 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5377 in order to guarantee secondary alignment of 8.
5378 * coretypes.h: Include align.h header file.
5379 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5380 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5381 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5382 * doc/tm.texi.in: Likewise.
5383 * final.c (struct label_alignment): Remove not used structure.
5384 (LABEL_ALIGN): Change type to align_flags.
5385 (LOOP_ALIGN): Likewise.
5386 (JUMP_ALIGN): Likewise.
5387 (default_loop_align_max_skip): Remove.
5388 (default_label_align_max_skip): Likewise.
5389 (default_jump_align_max_skip): Likewise.
5390 (default_label_align_after_barrier_max_skip):
5391 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5392 (LABEL_TO_MAX_SKIP): Remove.
5393 (label_to_alignment): Return align_flags type instead of integer.
5394 (label_to_max_skip): Remove.
5395 (align_fuzz): Use align_flags type.
5396 (compute_alignments): Use align_flags type and use align_flags::max
5397 to combine multiple alignments.
5398 (grow_label_align): Grow vec instead of C array.
5399 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5400 (shorten_branches): Use align_flags type and use align_flags::max
5401 to combine multiple alignments.
5402 (final_scan_insn_1): Remove usage of secondary alignment that comes
5403 from label alignment, but instead use proper secondary alignment
5404 which is computed in grow_label_align.
5405 * flags.h (struct align_flags_tuple): Move to align.h.
5406 (struct align_flags): Likewise.
5407 (state_align_loops): Rename to align_loops.
5408 (state_align_jumps): Rename to align_jumps.
5409 (state_align_labels): Rename to align_labels.
5410 (state_align_functions): Rename to align_functions.
5411 (align_loops_log): Remove.
5412 (align_jumps_log): Remove.
5413 (align_labels_log): Remove.
5414 (align_functions_log): Remove.
5415 (align_loops_max_skip): Remove.
5416 (align_jumps_max_skip): Remove.
5417 (align_labels_max_skip): Remove.
5418 (align_functions_max_skip): Remove.
5419 (align_loops_value): Remove.
5420 (align_jumps_value): Remove.
5421 (align_labels_value): Remove.
5422 (align_functions_value): Remove.
5423 * output.h (label_to_alignment): Change return type to align_flags.
5424 (label_to_max_skip): Remove.
5425 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5426 jump_align_max_skip macros.
5427 * targhooks.h (default_loop_align_max_skip): Remove.
5428 (default_label_align_max_skip): Likewise.
5429 (default_jump_align_max_skip): Likewise.
5430 (default_label_align_after_barrier_max_skip): Remove.
5431 * toplev.c (read_log_maxskip): Use ::normalize function.
5432 (parse_N_M): Remove not used argument and also call ::normalize.
5433 (parse_alignment_opts): Do not pass unused arguments.
5434 * varasm.c (assemble_start_function): Use directly align_functions
5435 instead of removed macros.
5436 * system.h: Do not poison removed macros.
5438 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5441 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5442 and cond temporaries don't have reference type if iterator has
5443 pointer type. For init use &for_pre_body instead of pre_p if
5444 for_pre_body is non-empty.
5446 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5448 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5449 double-double modes to SFmode directly directly.
5450 (trunc<mode>sf2_fprs): Delete.
5452 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5454 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5455 for conversions between IFmode and the decimal floating point modes.
5456 (init_float128_ieee): Use the correct names for conversions between
5457 KFmode and the decimal floating point modes.
5459 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5461 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5462 for the conversions between TDmode and IFmode.
5463 (init_float128_ieee): Use more correct names for the conversions
5464 between TDmode and KFmode.
5466 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5468 PR tree-optimization/86526
5469 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5470 (inline_expand_builtin_string_cmp): Likewise.
5471 (inline_string_cmp): Likewise. Use c_readstr instead of
5472 builtin_memcpy_read_str. Add unit_mode temporary.
5474 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5477 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5478 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5480 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5482 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5483 Alphabetize prototypes of built-in functions, separating out
5484 built-in functions that are listed in this section but should be
5485 described elsewhere.
5487 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5490 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5491 conditional move when trapping comparison was split to a
5492 non-trapping one (and vice versa).
5494 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5496 * config/s390/s390.c (s390_function_profiler): Generate nops
5497 instead of profiler call sequences.
5498 * config/s390/s390.opt: Add the new option.
5500 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5502 * config/s390/s390.c (s390_function_profiler): Generate
5503 __mcount_loc section.
5504 * config/s390/s390.opt: Add the new option.
5506 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5508 * common.opt: Add the new warning.
5509 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5510 %r0,__fentry__" when -mfentry is specified.
5511 (s390_option_override_internal): Disallow -mfentry for 31-bit
5513 * config/s390/s390.opt: Add the new option.
5515 2018-07-16 Richard Biener <rguenther@suse.de>
5518 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5519 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5521 2018-07-16 Martin Liska <mliska@suse.cz>
5524 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5527 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5529 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5531 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5533 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5535 * config/arc/arc-cpus.def (hs4x): New cpu.
5537 * config/arc/arc-tables.opt: Regenerate.
5538 * config/arc/arc.c (arc_sched_issue_rate): New function.
5539 (TARGET_SCHED_ISSUE_RATE): Define.
5540 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5541 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5543 (attr tune): Add ARCHS4x tune values.
5544 (attr tune_dspmpy): Define.
5545 (*tst): Correct instruction type.
5546 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5547 * config/arc/arcHS4x.md: New file.
5548 * config/arc/fpu.md: Update instruction type attributes.
5549 * config/arc/t-multilib: Regenerate.
5551 2018-07-16 Tom de Vries <tdevries@suse.de>
5554 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5556 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5558 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5561 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5563 PR tree-optimization/86514
5564 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5565 conversion to a boolean type from a type with greater precision.
5567 2018-07-16 Tom de Vries <tdevries@suse.de>
5569 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5570 dump_flags request TDF_SLIM.
5572 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5574 * fold-const.c (int_const_binop_1): Abstract...
5575 (wide_int_binop): ...wide int code here.
5576 (poly_int_binop): ...poly int code here.
5577 Abstract the rest of int_const_binop_1 into int_const_binop.
5578 * fold-const.h (wide_int_binop): New.
5579 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5580 Remove useless PLUS/MINUS_EXPR case.
5581 (zero_nonzero_bits_from_vr): Move wide int code...
5582 (zero_nonzero_bits_from_bounds): ...here.
5583 (extract_range_from_binary_expr_1): Move mask optimization code...
5584 (range_easy_mask_min_max): ...here.
5585 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5586 (range_easy_mask_min_max): New.
5588 2018-07-15 Jeff Law <law@redhat.com>
5591 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5594 2018-07-14 Jim Wilson <jimw@sifive.com>
5596 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5598 2018-07-14 Paul Koning <ni1d@arrl.net>
5600 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5602 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5604 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5607 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5608 Steve Munroe <munroesj52@gmail.com>
5610 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5611 (_mm_andnot_si128): Likewise.
5612 (_mm_or_si128): Likewise.
5613 (_mm_xor_si128): Likewise.
5615 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5618 * builtins.c (expand_builtin_memcmp): Inline the calls first
5619 when result_eq is false.
5620 (expand_builtin_strcmp): Inline the calls first.
5621 (expand_builtin_strncmp): Likewise.
5622 (inline_string_cmp): New routine. Expand a string compare
5623 call by using a sequence of char comparison.
5624 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5625 a call to str(n)cmp/memcmp.
5626 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5628 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5630 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5632 * config/arm/driver-arm.c: Include arm-native.h.
5633 (host_detect_local_cpu): Use auto-generated data tables.
5634 (vendors, arm_cpu_table): Delete. Move part information to ...
5635 * config/arm/arm-cpus.in: ... here.
5636 * config/arm/parsecpu.awk (gen_native): New function.
5637 (vendor, part): New CPU fields.
5638 (END): Add support for building the native CPU detection tables.
5639 * config/arm/t-arm (arm-native.h): Add build rule.
5640 (driver-arm.o): Add dependency on arm-native.h.
5642 2018-07-13 Richard Biener <rguenther@suse.de>
5645 * match.pd (addr1 - addr2): Allow either of the operand to
5648 2018-07-13 Tom de Vries <tdevries@suse.de>
5650 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5653 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5655 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5656 arrays instead of numbered variables.
5658 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5660 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5661 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5663 2018-07-13 Richard Biener <rguenther@suse.de>
5666 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5667 instead of get_context_die.
5669 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5670 Richard Biener <rguenther@suse.de>
5673 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5674 that the loop latch destination where phi is defined.
5676 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5678 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5679 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5680 (riscv_set_current_function): Extract getting interrupt type to new
5682 (riscv_get_interrupt_type): New function.
5683 (riscv_merge_decl_attributes): New function, checking interrupt type is
5685 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5687 2018-07-12 Paul Koning <ni1d@arrl.net>
5689 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5692 2018-07-12 Paul Koning <ni1d@arrl.net>
5694 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5695 zero reference, add doloop_end instead.
5696 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5697 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5698 detail for doloop_end.
5700 2018-07-12 Martin Sebor <msebor@redhat.com>
5703 * attribs.c (decl_attributes): Reject conflicting attributes before
5704 calling attribute handlers.
5706 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5708 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5710 (gcc::dump_manager::get_dump_file_name): likewise.
5711 (dump_begin): Likewise.
5712 * dumpfile.h (dump_begin): Update prototype.
5713 (gcc::dump_manager::get_dump_file_name,
5714 gcc::dump_manager::get_dump_file_name): Update prototype.
5716 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5718 * internal-fn.h (vectorizable_internal_fn_p): New function.
5719 * tree-vect-slp.c (compatible_calls_p): Likewise.
5720 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5721 to internal functions.
5722 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5724 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5726 * fold-const.h (inverse_conditions_p): Declare.
5727 * fold-const.c (inverse_conditions_p): New function.
5728 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5729 that test the inverse condition of a conditional internal function.
5730 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5731 * internal-fn.c (internal_fn_mask_index): Handle conditional
5733 (vectorized_internal_fn_supported_p): New function.
5734 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5735 (any_pred_load_store): Replace with...
5736 (need_to_predicate): ...this new variable.
5737 (redundant_ssa_names): New variable.
5738 (ifcvt_can_use_mask_load_store): Move initial checks to...
5739 (ifcvt_can_predicate): ...this new function. Handle tree codes
5740 for which a conditional internal function exists.
5741 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5742 instead of ifcvt_can_use_mask_load_store. Update after variable
5744 (predicate_load_or_store): New function, split out from
5745 predicate_mem_writes.
5746 (check_redundant_cond_expr): New function.
5747 (value_available_p): Likewise.
5748 (predicate_rhs_code): Likewise.
5749 (predicate_mem_writes): Rename to...
5750 (predicate_statements): ...this. Use predicate_load_or_store
5751 and predicate_rhs_code.
5752 (combine_blocks, tree_if_conversion): Update after above name changes.
5753 (ifcvt_local_dce): Handle redundant_ssa_names.
5754 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5755 general conditional functions.
5756 * tree-vect-stmts.c (vectorizable_call): Likewise.
5758 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5759 Alan Hayward <alan.hayward@arm.com>
5760 David Sherwood <david.sherwood@arm.com>
5762 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5763 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5764 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5765 plus and minus and convert them into IFN_COND_FMA-based sequences.
5766 (convert_mult_to_fma): Handle conditional plus and minus.
5768 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5770 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5771 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5772 (cond_fnms_optab): New optabs.
5773 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5775 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5776 * internal-fn.h (get_conditional_internal_fn): Declare.
5777 (get_unconditional_internal_fn): Likewise.
5778 * internal-fn.c (cond_ternary_direct): New macro.
5779 (expand_cond_ternary_optab_fn): Likewise.
5780 (direct_cond_ternary_optab_supported_p): Likewise.
5781 (FOR_EACH_COND_FN_PAIR): Likewise.
5782 (get_conditional_internal_fn): New function.
5783 (get_unconditional_internal_fn): Likewise.
5784 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5785 (gimple_match_op::gimple_match_op): Add a new overload for 5
5787 (gimple_match_op::set_op): Likewise.
5788 (gimple_resimplify5): Declare.
5789 * genmatch.c (decision_tree::gen): Generate simplifications for
5791 * gimple-match-head.c (gimple_simplify): Define an overload for
5792 5 operands. Handle calls with 5 arguments in the top-level overload.
5793 (convert_conditional_op): Handle conversions from unconditional
5794 internal functions to conditional ones.
5795 (gimple_resimplify5): New function.
5796 (build_call_internal): Pass a fifth operand.
5797 (maybe_push_res_to_seq): Likewise.
5798 (try_conditional_simplification): Try converting conditional
5799 internal functions to unconditional internal functions.
5800 Handle 3-operand unconditional forms.
5801 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5802 Define ternary equivalents of the current rules for binary conditional
5804 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5806 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5807 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5808 (optab): Handle them.
5809 (SVE_COND_FP_TERNARY): New int iterator.
5810 (sve_fmla_op, sve_fmad_op): New int attributes.
5811 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5812 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5813 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5815 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5817 * target.def (preferred_else_value): New target hook.
5818 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5819 * doc/tm.texi: Regenerate.
5820 * targhooks.h (default_preferred_else_value): Declare.
5821 * targhooks.c (default_preferred_else_value): New function.
5822 * internal-fn.h (conditional_internal_fn_code): Declare.
5823 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5824 (get_conditional_internal_fn): Use it.
5825 (conditional_internal_fn_code): New function.
5826 * gimple-match.h (gimple_match_cond): New struct.
5827 (gimple_match_op): Add a cond member function.
5828 (gimple_match_op::gimple_match_op): Update all forms to take a
5830 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5831 for the suboperation, but don't specify a particular else_value.
5832 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5833 (visit_nary_op, visit_reference_op_load): Pass
5834 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5835 * gimple-match-head.c: Include tree-eh.h
5836 (convert_conditional_op): New function.
5837 (maybe_resimplify_conditional_op): Likewise.
5838 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5839 (gimple_resimplify2): Likewise.
5840 (gimple_resimplify3): Likewise.
5841 (gimple_resimplify4): Likewise.
5842 (maybe_push_res_to_seq): Return null for conditional operations.
5843 (try_conditional_simplification): New function.
5844 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5846 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5848 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5850 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5852 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5854 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5856 (hash_tree): Do not hash DECL_FCONTEXT
5857 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5858 Do not stream DECL_FCONTEXT.
5859 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5860 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5862 2018-07-12 Richard Biener <rguenther@suse.de>
5865 * dwarf2out.c (gen_block_die): Only output blocks when they have
5866 at least one !DECL_IGNORED_P variable.
5868 2018-07-12 Richard Biener <rguenther@suse.de>
5871 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5872 Remove -mieee-fp handling.
5874 2018-07-12 Richard Biener <rguenther@suse.de>
5876 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5877 left-over from last patch.
5879 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5881 PR tree-optimization/86492
5882 * gimple-ssa-store-merging.c
5883 (imm_store_chain_info::coalesce_immediate_stores): Call
5884 check_no_overlap even for the merge_overlapping case. Formatting fix.
5886 2018-07-12 Richard Biener <rguenther@suse.de>
5889 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5890 move possibly trapping operations into the conditional.
5892 2018-07-12 Richard Biener <rguenther@suse.de>
5894 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5895 (vn_lookup_simplify_result): Remove recursion limit applied
5897 (vn_nary_build_or_lookup_1): Adjust.
5898 (try_to_simplify): Likewise.
5899 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5901 (gimple_resimplify2): Likewise.
5902 (gimple_resimplify3): Likewise.
5903 (gimple_resimplify4): Likewise.
5905 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5907 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5908 Use __mmask64 type instead of __mmask8 for __M argument.
5909 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5910 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5912 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5913 __mmask16 for __M argument.
5914 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5915 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5916 to __mmask16 instead of __mmask8.
5917 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5918 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5919 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5920 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5921 instead of __mmask16 for __U argument.
5922 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5923 __mmask16 instead of __mmask8 for __U argument.
5924 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5926 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5928 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5930 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5932 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5934 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5936 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5938 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5940 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5942 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5944 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5945 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5946 return type as well as __M argument type and all casts from __mmask8
5948 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5949 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5950 return type as well as __M argument type and all casts from __mmask8
5952 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5953 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5954 return type as well as __M argument type and all casts from __mmask8
5956 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5957 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5958 return type as well as __M argument type and all casts from __mmask8
5960 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5961 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5964 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5966 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5967 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5970 2018-07-11 Paul Koning <ni1d@arrl.net>
5972 * doc/md.texi (define_subst): Document how multiple occurrences of
5973 the same argument in the replacement pattern are handled.
5975 2018-07-11 Paul Koning <ni1d@arrl.net>
5977 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5979 (Common Type Attributes): Add "mode" attribute.
5981 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5983 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5984 stream DECL_ORIGINAL_TYPE.
5985 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5986 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5987 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5988 Do not walk original type.
5989 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5991 (write_ts_decl_non_common_tree_pointers): Do not stream
5993 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5994 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5996 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5998 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5999 thread twice from the same starting edge.
6001 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6003 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6004 * gimple.c (gimple_call_nonnull_result_p): ...here...
6005 (gimple_call_nonnull_arg): ...and here.
6006 * gimple.h (gimple_call_nonnull_result_p): New.
6007 (gimple_call_nonnull_arg): New.
6009 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6011 * config/arm/arm-cpus.in: Move information from fpu field of each
6012 cpu definition to the isa field.
6013 * config/arm/parsecpu.awk (fpu): Delete match rule.
6014 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6016 2018-07-11 Richard Biener <rguenther@suse.de>
6019 * dwarf2out.c (init_sections_and_labels): Use
6020 output_asm_line_debug_info consistently.
6021 (dwarf2out_early_finish): Likewise.
6022 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6025 2018-07-11 Richard Biener <rguenther@suse.de>
6027 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6028 Rework father_bb setting in a way to avoid propagating constants
6029 multiple times on a loop body.
6031 2018-07-10 Mark Wielaard <mark@klomp.org>
6034 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6036 2018-07-10 Richard Biener <rguenther@suse.de>
6038 * hash-map.h (hash_map::iterator::operator*): Return
6039 references to key and value.
6041 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6044 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6045 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6046 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6047 (gimplify_omp_for): For composite loops, move outer
6048 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6049 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6050 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6051 TREE_LIST for both the original class iterator and the "last" helper
6052 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6053 loop, remember has_decl_expr from outer composite loops for the
6054 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6056 2018-07-09 Martin Sebor <msebor@redhat.com>
6060 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6061 accessing implicitly initialized array elements.
6062 * expr.c (string_constant): Handle string initializers of
6063 character arrays within aggregates.
6064 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6065 Store element offset. As a special case, handle zero size.
6066 (fold_nonarray_ctor_reference): Same.
6067 (fold_ctor_reference): Add argument. Store subobject offset.
6068 * gimple-fold.h (fold_ctor_reference): Add argument.
6070 2018-07-09 Paul Koning <ni1d@arrl.net>
6072 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6073 (pdp11_insn_cost): New function.
6074 (pdp11_md_asm_adjust): New function.
6075 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6076 (pdp11_rtx_costs): Update to match machine better.
6077 (output_addr_const_pdp11): Correct format mismatch warnings.
6078 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6079 * config/pdp11/pdp11.md: General change to add base_cost and/or
6080 length attributes for use by new pdp11_insn_cost function.
6081 (MIN_BRANCH): Correct definition.
6083 (doloop_end): Use standard pattern name for looping pattern.
6084 (doloop_end_nocc): New.
6085 (movsf): Add another constraint alternative.
6086 (zero_extendqihi2): Add constraint alternatives for not in place
6088 (zero_extendhisi2): Remove.
6089 (shift patterns): Add CC handling variants.
6093 (define_peephole2): New peephole to recognize mov that sets CC for
6096 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6098 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6099 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6102 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6105 * real.c (real_nextafter): Return true if result is denormal.
6107 2018-07-09 Martin Liska <mliska@suse.cz>
6109 * common.opt: Add back wrongly removed attribute.
6111 2018-07-09 Richard Biener <rguenther@suse.de>
6114 * dwarf2out.c (gen_block_die): For an early generated DIE
6115 always output high/low PC attributes.
6117 2018-07-09 Tom de Vries <tdevries@suse.de>
6119 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6120 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6121 onto VAR_DECL with abstract origin.
6123 2018-07-07 Jim Wilson <jimw@sifive.com>
6125 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6127 2018-07-07 Tom de Vries <tdevries@suse.de>
6129 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6131 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6133 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6135 (combine_bound): Use wide-int overflow calculation instead of
6137 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6139 * fold-const.c (int_const_binop_2): Same.
6140 (extract_muldiv_1): Same.
6141 (fold_div_compare): Same.
6142 (fold_abs_const): Same.
6144 * poly-int.h (add): Same.
6148 * predict.c (predict_iv_comparison): Same.
6149 * profile-count.c (slow_safe_scale_64bit): Same.
6150 * simplify-rtx.c (simplify_const_binary_operation): Same.
6151 * tree-chrec.c (tree_fold_binomial): Same.
6152 * tree-data-ref.c (split_constant_offset_1): Same.
6153 * tree-if-conv.c (idx_within_array_bound): Same.
6154 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6155 * tree-ssa-phiopt.c (minmax_replacement): Same.
6156 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6157 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6158 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6159 * wide-int.cc (wi::add_large): Same.
6160 (wi::mul_internal): Same.
6161 (wi::sub_large): Same.
6162 (wi::divmod_internal): Same.
6163 * wide-int.h: Change overflow type to overflow_type for neg, add,
6164 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6165 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6166 mul_internal, divmod_internal.
6167 (overflow_type): New enum.
6168 (accumulate_overflow): New.
6170 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6172 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6173 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6175 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6177 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6178 argument is checked for zero before entering loop, avoid checking again.
6180 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6182 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6183 * gimplify.h (generic_expr_could_trap_p): Likwise.
6184 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6186 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6188 PR tree-optimization/86401
6189 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6190 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6191 (fold_bit_and_mask): ... here. New helper function for match.pd.
6192 * fold-const.h (fold_bit_and_mask): Declare.
6193 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6195 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6198 * target.def (translate_mode_attribute): New hook.
6199 * targhooks.h (default_translate_mode_attribute): Declare.
6200 * targhooks.c (default_translate_mode_attribute): New function.
6201 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6202 * doc/tm.texi: Regenerate.
6203 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6204 (rs6000_translate_mode_attribute): New function.
6206 2018-07-06 Paul Koning <ni1d@arrl.net>
6208 * doc/md.texi (define_split): Document DONE and FAIL.
6209 (define_peephole2): Ditto.
6211 2018-07-05 Jeff Law <law@redhat.com>
6213 PR tree-optimization/86010
6214 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6215 both the head and tail of mem* and str* calls.
6217 2018-07-05 Jim Wilson <jimw@sifive.com>
6219 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6221 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6223 * config/aarch64/aarch64-simd.md: correct flags text for
6224 MIN_EXPR replacement.
6226 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6228 * configure: Regenerated.
6230 2018-07-05 Carl Love <cel@us.ibm.com>
6232 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6233 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6234 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6235 VSX_BUILTIN_DOUBLEL_V4SF.
6237 2018-07-05 Martin Sebor <msebor@redhat.com>
6240 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6241 than its domain to compute its the upper bound of a char array.
6243 2018-07-05 Nathan Sidwell <nathan@acm.org>
6245 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6246 * doc/cpp.texi: Update comment.
6247 * doc/tm.texi: Rebuilt.
6248 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6249 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6250 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6251 headers affected by extern "C".
6252 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6253 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6254 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6255 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6256 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6257 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6258 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6259 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6260 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6261 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6262 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6263 config/sparc/sp64-elf.h, config/spu/spu.h,
6264 config/stormy16/stormy16.h, config/v850/v850.h,
6265 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6266 define NO_IMPLICIT_EXTERN_C.
6267 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6269 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6272 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6273 instead of GET_MODE_SIZE when comparing Units.
6275 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6278 * rtlanal.c (set_noop_p): Constrain on mode change,
6279 include hard-reg-set.h
6281 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6283 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6285 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6288 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6291 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6293 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6295 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6298 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6300 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6302 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6305 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6307 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6309 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6310 neg_*_op* variables.
6312 2018-07-04 Martin Liska <mliska@suse.cz>
6314 * tree-switch-conversion.c: Define
6315 max_ratio_for_speed and max_ratio_for_size constants.
6317 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6318 Martin Liska <mliska@suse.cz>
6323 * common.opt: Rename align options with 'str_' prefix.
6324 * common/config/i386/i386-common.c (set_malign_value): New
6326 (ix86_handle_option): Use it to set -falign-* options/
6327 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6328 type from int to string.
6329 * config/aarch64/aarch64.c: Update default values from int
6331 * config/alpha/alpha.c (alpha_override_options_after_change):
6333 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6334 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6335 max skip conditionally.
6336 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6337 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6338 max skip conditionally.
6339 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6340 max skip conditionally.
6341 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6342 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6343 max skip conditionally.
6344 * config/i386/i386.c (struct ptt): Change type from int to
6346 (ix86_default_align): Set default values.
6347 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6348 max skip conditionally.
6349 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6350 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6351 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6352 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6353 max skip conditionally.
6354 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6355 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6356 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6357 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6358 max skip conditionally.
6359 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6360 * config/ia64/ia64.c (ia64_option_override): Set default values
6361 for alignment options.
6362 * config/m68k/m68k.c: Handle new str_align_* options.
6363 * config/mips/mips.c (mips_set_compression_mode): Change
6365 (mips_option_override): Set default values for options.
6366 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6368 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6370 * config/rx/rx.c (rx_option_override): Likewise.
6371 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6372 (LABEL_ALIGN): Use align_labels_log.
6373 (LOOP_ALIGN): Use align_loops_align.
6374 * config/s390/s390.c (s390_asm_output_function_label): Use new
6376 * config/sh/sh.c (sh_override_options_after_change):
6377 Change type of constants.
6378 * config/spu/spu.c (spu_sched_init): Likewise.
6379 * config/sparc/sparc.c (sparc_option_override): Set default
6381 * config/visium/visium.c (visium_option_override): Likewise.
6382 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6383 emit p2align format with last argument if it's not needed.
6384 * doc/invoke.texi: Document extended format of -falign-*.
6385 * final.c: Use align_labels alignment.
6386 * flags.h (struct target_flag_state): Change type to use
6388 (struct align_flags_tuple): New.
6389 (struct align_flags): Likewise.
6390 (align_loops_log): Redefine macro to use new types.
6391 (align_loops_max_skip): Redefine macro to use new types.
6392 (align_jumps_log): Redefine macro to use new types.
6393 (align_jumps_max_skip): Redefine macro to use new types.
6394 (align_labels_log): Redefine macro to use new types.
6395 (align_labels_max_skip): Redefine macro to use new types.
6396 (align_functions_log): Redefine macro to use new types.
6397 (align_loops): Redefine macro to use new types.
6398 (align_jumps): Redefine macro to use new types.
6399 (align_labels): Redefine macro to use new types.
6400 (align_functions): Redefine macro to use new types.
6401 (align_functions_max_skip): Redefine macro to use new types.
6402 (align_loops_value): New macro.
6403 (align_jumps_value): New macro.
6404 (align_labels_value): New macro.
6405 (align_functions_value): New macro.
6406 * function.c (invoke_set_current_function_hook): Propagate
6407 alignment values from flags to global variables default in
6409 * ipa-icf.c (sem_function::equals_wpa): Use
6410 cl_optimization_option_eq instead of memcmp.
6411 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6413 (cl_optimization_stream_in): Likewise.
6414 * optc-save-gen.awk: Support strings in cl_optimization.
6415 * opth-gen.awk: Likewise.
6416 * opts.c (finish_options): Remove error checking of invalid
6418 (MAX_CODE_ALIGN): Remove.
6419 (MAX_CODE_ALIGN_VALUE): Likewise.
6420 (parse_and_check_align_values): New function.
6421 (check_alignment_argument): Likewise.
6422 (common_handle_option): Use check_alignment_argument.
6423 * opts.h (parse_and_check_align_values): Declare.
6424 * toplev.c (init_alignments): Remove.
6425 (read_log_maxskip): New.
6426 (parse_N_M): Likewise.
6427 (parse_alignment_opts): Likewise.
6428 (backend_init_target): Remove usage of init_alignments.
6429 * toplev.h (parse_alignment_opts): Declare.
6430 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6432 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6433 * tree.c (cl_option_hasher::equal): New.
6434 * varasm.c: Use new global macros.
6436 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6438 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6439 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6440 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6441 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6442 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6443 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6444 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6445 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6446 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6447 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6448 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6449 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6450 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6452 2018-07-04 Martin Liska <mliska@suse.cz>
6453 Jonathan Wakely <jwakely@redhat.com>
6455 * coverage.c: Use correct type.
6456 * doc/invoke.texi: Language correction.
6458 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6461 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6462 ENDBRANCH for non-tail call which may return via indirect branch.
6463 * doc/extend.texi: Document indirect_return attribute.
6465 2018-07-03 Martin Sebor <msebor@redhat.com>
6467 PR tree-optimization/86274
6468 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6470 (format_floating): Correct handling of infinities and NaNs.
6472 2018-07-03 Martin Sebor <msebor@redhat.com>
6474 * print-tree.c (print_real_cst): New function.
6475 (print_node_brief): Call it.
6476 (print_node): Ditto.
6478 2018-07-03 Jeff Law <law@redhat.com>
6480 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6481 into a single pattern.
6483 * config/h8300/h8300.md (ors code_iterator): New.
6484 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6485 a single pattern and single splitter.
6486 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6487 (iorqi3_1, xorqi3_1): Likewise.
6488 (iorqi3, xorqi3 expanders): Similarly.
6490 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6491 (movmd_internal) into a single pattern using the P mode iterator.
6492 (movmd splitters): Similarly.
6493 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6494 (movsd splitters): Similarly.
6496 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6497 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6498 right table based on the size of the operand.
6499 * config/h8300/h8300.md (length_table): Corresponding changes. All
6500 references to "addb", "addw" and "addl" changed to "add".
6501 (btst patterns): Merge two variants into a single pattern.
6502 (tstqi, tsthi): Likewise.
6503 (addhi3_incdec, addsi3_incdec): Likewise.
6504 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6505 (mulhi3, mulsi3): Likewise.
6506 (udivhi3, udivsi3): Likewise.
6507 (divhi3, divsi3): Likewise.
6508 (andorqi3, andorhi3, andorsi3): Likewise.
6510 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6513 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6514 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6516 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6518 PR tree-optimization/85694
6519 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6520 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6522 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6523 (<u>avg<mode>3_ceil): New patterns.
6525 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6527 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6528 scan-tree-dump directive.
6529 * gcc.dg/vect/slp-perm-2.c: Likewise.
6530 * gcc.dg/vect/slp-perm-3.c: Likewise.
6531 * gcc.dg/vect/slp-perm-5.c: Likewise.
6532 * gcc.dg/vect/slp-perm-6.c: Likewise.
6533 * gcc.dg/vect/slp-perm-7.c: Likewise.
6534 * gcc.dg/vect/slp-perm-8.c: Likewise.
6536 2018-07-03 Marek Polacek <polacek@redhat.com>
6539 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6541 2018-07-03 Richard Biener <rguenther@suse.de>
6544 * tree-ssa-structalias.c (find_func_clobbers): Properly
6545 handle indirect calls.
6547 2018-07-03 Jeff Law <law@redhat.com>
6549 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6550 (shifts): New code iterator.
6551 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6552 expander. Fix HImode handling on H8/SX.
6553 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6554 (subqi3, subhi3, subsi3 expanders): Likewise.
6555 (andqi3, andhi3, andsi3 expanders): Likewise.
6556 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6557 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6558 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6559 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6560 (zero_extendqihi2, zero_extendqisi2): Likewise.
6561 (extendqihi2, extendqisi2): Likewise.
6562 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6563 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6564 (rotlqi3_1, rotlhi3_1): Likewise.
6565 (logicalhi3_sn, logicalsi3_sn): Likewise.
6566 (logicalhi3, logicalsi3): Likewise.
6568 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6570 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6571 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6572 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6573 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6574 type to append_pattern_def_seq instead of creating a stmt_vec_info
6576 (build_mask_conversion): Likewise. Remove vinfo argument.
6577 (vect_add_conversion_to_patterm): Likewise, renaming to...
6578 (vect_add_conversion_to_pattern): ...this.
6579 (vect_recog_mask_conversion_pattern): Update call to
6580 build_mask_conversion. Pass the vector type to
6581 append_pattern_def_seq here too.
6582 (vect_recog_gather_scatter_pattern): Update call to
6583 vect_add_conversion_to_pattern.
6585 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6587 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6588 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6589 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6590 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6591 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6592 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6593 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6594 append_pattern_def_seq instead of new_pattern_def_seq.
6595 (vect_recog_divmod_pattern): Do both of the above.
6596 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6599 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6601 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6602 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6603 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6604 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6605 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6606 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6607 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6608 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6609 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6610 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6611 parameter with a single stmt_vec_info.
6612 (vect_recog_func_ptr): Likewise.
6613 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6614 (vect_try_gather_scatter_pattern): ...this.
6615 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6616 the stmt_vec_info of the statement to be matched. Don't clear
6617 STMT_VINFO_RELATED_STMT.
6618 (vect_pattern_recog): Update call accordingly.
6620 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6622 PR tree-optimization/85694
6623 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6624 (uavgM3_ceil): Document new optabs.
6625 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6626 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6628 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6629 (savg_ceil_optab): New optabs.
6630 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6631 (vect_vect_recog_func_ptrs): Add it.
6632 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6633 constant directly from the associated lhs.
6635 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6637 * tree-vect-patterns.c (vect_split_statement): New function.
6638 (vect_convert_input): Use it to try to split an existing cast.
6640 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6642 * poly-int.h (print_hex): New function.
6643 * dumpfile.h (dump_dec, dump_hex): Declare.
6644 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6645 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6646 min_input_precision, operation_precision and operation_sign.
6647 * tree-vect-patterns.c (vect_get_range_info): New function.
6648 (vect_same_loop_or_bb_p, vect_single_imm_use)
6649 (vect_operation_fits_smaller_type): Delete.
6650 (vect_look_through_possible_promotion): Add an optional
6651 single_use_p parameter.
6652 (vect_recog_over_widening_pattern): Rewrite to use new
6653 stmt_vec_info infomration. Handle one operation at a time.
6654 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6655 (vect_truncatable_operation_p, vect_set_operation_type)
6656 (vect_set_min_input_precision): New functions.
6657 (vect_determine_min_output_precision_1): Likewise.
6658 (vect_determine_min_output_precision): Likewise.
6659 (vect_determine_precisions_from_range): Likewise.
6660 (vect_determine_precisions_from_users): Likewise.
6661 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6662 (vect_vect_recog_func_ptrs): Put over_widening first.
6664 (vect_pattern_recog): Call vect_determine_precisions.
6666 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6668 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6669 statements that have been replaced by further pattern statements.
6670 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6672 2018-07-03 Richard Biener <rguenther@suse.de>
6674 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6675 always set *dt. Dump vectype in vectype overload.
6676 * dumpfile.h (dump_gimple_expr): New function.
6677 (dump_gimple_expr_loc): Likewise.
6678 * dumpfile.c (dump_gimple_expr): New function.
6679 (dump_gimple_expr_loc): Likewise.
6681 2018-07-02 Jeff Law <law@redhat.com>
6683 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6684 the H8/300, H8/300H and H8/S variants into a single pattern.
6685 (movhi_h8300, movqi_h8300hs): Similarly.
6686 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6687 (QHI mode iterator): New.
6689 * config/h8300/h8300.md: Remove trailing whitespace.
6691 2018-07-02 Jim Wilson <jimw@sifive.com>
6693 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6694 instead of emit_insn for interrupt returns.
6695 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6696 (riscv_sret, riscv_uret): Likewise.
6698 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6700 * pretty-print.c (selftest::test_pp_format): Move save and restore
6701 of quotes to class auto_fix_quotes, and add an instance.
6702 * selftest.c: Include "intl.h".
6703 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6704 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6705 * selftest.h (selftest::auto_fix_quotes): New class.
6707 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6709 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6710 (aarch64_sve_prepare_conditional_op): Remove.
6711 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6712 Allow aarch64_simd_reg_or_zero as select operand; remove
6713 the aarch64_sve_prepare_conditional_op call.
6714 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6715 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6716 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6717 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6718 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6719 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6720 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6721 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6722 and a splitters to match all of the *_any patterns.
6723 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6725 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6726 (SVE_COND_FP_BINARY_REV): Remove.
6727 (sve_int_op_rev, sve_fp_op_rev): New.
6728 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6729 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6730 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6731 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6732 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6733 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6734 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6735 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6736 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6738 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6739 Remove match_dup 1 from the inner unspec.
6740 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6742 * config/aarch64/aarch64.md (movprfx): New attr.
6743 (length): Default movprfx to 8.
6744 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6745 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6746 (*<su>mul<SVE_I>3_highpart): Likewise.
6747 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6748 (*v<ASHIFT><SVE_I>3): Likewise.
6749 (*<su><MAXMIN><SVE_I>3): Likewise.
6750 (*<su><MAXMIN><SVE_F>3): Likewise.
6751 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6752 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6753 (*div<SVE_F>4): Likewise.
6755 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6757 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6760 2018-07-02 Richard Biener <rguenther@suse.de>
6762 PR tree-optimization/86363
6763 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6764 memset argument refers to a non-variable address.
6766 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6768 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6769 {PLUS,MINUS}_EXPR code to...
6770 (adjust_symbolic_bound): ...here,
6771 (combine_bound): ...here,
6772 (set_value_range_with_overflow): ...and here.
6774 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6776 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6778 (extract_range_from_abs_expr): ...here.
6780 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6782 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6783 -fno-omit-frame-pointer when not optimizing.
6785 2018-07-02 Martin Liska <mliska@suse.cz>
6788 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6789 (propagate_nothrow): Likewise.
6791 2018-07-02 Martin Liska <mliska@suse.cz>
6794 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6796 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6798 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6799 function in r262149, changing "loc" param from source_location to
6800 const dump_location_t &.
6801 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6802 declaration, as above.
6804 2018-07-01 Paul Koning <ni1d@arrl.net>
6806 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6807 -munit-asm, -mgnu-asm, -mdec-asm.
6808 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6809 (pdp11_output_labelref): New.
6810 (pdp11_output_def): New.
6811 (pdp11_output_addr_vec_elt): New.
6812 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6813 %# and %@ format codes.
6814 (pdp11_option_override): New.
6815 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6816 (pdp11_output_ident): New.
6817 (pdp11_asm_named_section): New.
6818 (pdp11_asm_init_sections): New.
6819 (pdp11_file_start): New.
6820 (pdp11_file_end): New.
6821 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6822 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6823 %o, like %c but octal.
6824 (pdp11_option_override): New.
6825 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6827 (DATA_SECTION_ASM_OP): Ditto.
6828 (READONLY_DATA_SECTION_ASM_OP): New.
6829 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6830 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6831 (ASM_OUTPUT_LABELREF): Ditto.
6832 (ASM_OUTPUT_DEF): Ditto.
6833 (ASM_OUTPUT_EXTERNAL): New.
6834 (ASM_OUTPUT_SOURCE_FILENAME): New.
6835 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6836 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6837 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6838 %# and %@ format codes.
6839 * config/pdp11/pdp11.opt (mgnu-asm): New.
6840 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6841 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6842 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6844 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6846 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6847 dereferencing path[] beyond its length.
6849 (debug_all_paths): New.
6850 (rewire_first_differing_edge): New.
6851 (adjust_paths_after_duplication): New.
6852 (duplicate_thread_path): Call adjust_paths_after_duplication.
6854 (thread_through_all_blocks): Add new argument to
6855 duplicate_thread_path.
6857 2018-06-30 Jim Wilson <jimw@sifive.com>
6859 * config/riscv/predicates.md (p2m1_shift_operand): New.
6860 (high_mask_shift_operand): New.
6861 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6862 pattern using p2m1_shift_operand.
6863 (lshsi3_zero_extend_3+2): New combiner pattern using
6864 high_mask_shift_operand.
6866 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6868 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6870 (vect_recog_rotate_pattern): ...here.
6871 (vect_convert_input): Try to insert casts of invariants in the
6873 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6874 preheader to be empty.
6876 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6878 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6879 vector type. If given, install it in the new statement's
6881 (vect_element_precision): New function.
6882 (vect_unpromoted_value): New struct.
6883 (vect_unpromoted_value::vect_unpromoted_value): New function.
6884 (vect_unpromoted_value::set_op): Likewise.
6885 (vect_look_through_possible_promotion): Likewise.
6886 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6887 (vect_widened_op_tree, vect_convert_input): Likewise.
6888 (vect_convert_inputs, vect_convert_output): Likewise.
6889 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6890 to handle the optional cast of the multiplication result and
6891 vect_widened_op_tree to detect the widened multiplication itself.
6892 Do not require the input and output of promotion casts to have
6893 the same sign, but base the signedness of the operation on the
6894 input rather than the result. If the pattern includes two
6895 promotions, check that those promotions have the same sign.
6896 Do not restrict the MULT_EXPR handling to a double-width result;
6897 handle quadruple-width results and wider. Use vect_convert_inputs
6898 to convert the inputs to the common type.
6899 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6900 to handle the optional cast of the ABS result. Also allow a sign
6901 change or a sign extension between the ABS and MINUS.
6902 Use vect_widened_op_tree to detect the widened subtraction and use
6903 vect_convert_inputs to convert the inputs to the common type.
6904 (vect_handle_widen_op_by_const): Delete.
6905 (vect_recog_widen_op_pattern): New function.
6906 (vect_recog_widen_mult_pattern): Use it.
6907 (vect_recog_widen_shift_pattern): Likewise.
6908 (vect_recog_widen_sum_pattern): Use
6909 vect_look_through_possible_promotion to handle the promoted
6912 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6914 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6915 the containing gimple_seq *.
6916 * gimple-iterator.h (gsi_for_stmt): Declare it.
6917 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6918 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6919 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6920 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6921 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6923 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6925 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6926 statement being replaced is part of an existing pattern
6927 definition sequence, inserting the new pattern statements before
6929 (vect_pattern_recog_1): Don't return a bool. If the statement
6930 is already part of a pattern, instead apply pattern matching
6931 to the pattern definition statements. Don't clear the
6932 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6933 (vect_pattern_recog): Don't break after the first match;
6934 continue processing the pattern definition statements instead.
6935 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6937 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6939 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6940 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6941 (vect_recog_widen_sum_pattern): Use it.
6943 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6945 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6946 phi is not a pattern statement and has not been replaced by
6947 a pattern statement.
6948 * tree-vect-patterns.c (type_conversion_p): Don't check
6949 STMT_VINFO_IN_PATTERN_P.
6950 (vect_recog_vector_vector_shift_pattern): Likewise.
6951 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6952 the pattern statement rather than the original statement; check
6953 directly for a WIDEN_MULT_EXPR here.
6954 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6955 vect_is_simple_use to return the pattern statement rather
6956 than the original statement; use is_pattern_stmt_p to check
6957 for such a pattern statement.
6958 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6959 to return the pattern statement rather than the original statement;
6960 don't do the same transformation here.
6961 (vect_is_simple_use): If the defining statement has been replaced
6962 by a pattern statement, return the pattern statement instead.
6963 Remove the corresponding (local) transformation from the vectype
6966 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6968 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6969 end and default to null.
6970 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6971 (vectorizable_reduction): Update calls accordingly, dropping the
6972 gimple ** argument if the passed-back statement isn't needed.
6973 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6974 (vect_recog_rotate_pattern): Likewise.
6975 (vect_recog_mask_conversion_pattern): Likewise.
6976 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6977 (vect_mask_constant_operand_p): Likewise.
6978 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6979 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6980 (get_group_load_store_type, get_load_store_type): Likewise.
6981 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6982 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6983 (vectorizable_conversion, vectorizable_assignment): Likewise.
6984 (vectorizable_shift, vectorizable_operation): Likewise.
6985 (vectorizable_store, vect_is_simple_cond): Likewise.
6986 (vectorizable_condition, vectorizable_comparison): Likewise.
6987 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6988 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6989 and move it to the end. Cope with null def_stmt_outs.
6991 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6993 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6995 2018-06-29 Jeff Law <law@redhat.com>
6997 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6998 displacements for TARGET_V850E2V3 and newer.
6999 (TARGET_LRA_P): Remove. Defaults to LRA now.
7000 * config/v850/v850.md (sign23byte_load): Remove.
7001 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7002 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7004 2018-06-29 Martin Liska <mliska@suse.cz>
7007 * coverage.c (coverage_init): Mangle full path name.
7008 * doc/invoke.texi: Document the change.
7009 * gcov-io.c (mangle_path): New.
7010 * gcov-io.h (mangle_path): Likewise.
7011 * gcov.c (mangle_name): Use mangle_path for path mangling.
7013 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7015 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7016 if starting source register is not even.
7018 2018-06-29 Martin Liska <mliska@suse.cz>
7020 PR tree-optimization/86263
7021 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7022 Make edge redirection.
7024 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7026 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7027 (dump_scope_depth): New variable.
7028 (get_dump_scope_depth): New function.
7029 (dump_begin_scope): New function.
7030 (dump_end_scope): New function.
7031 * dumpfile.h (get_dump_scope_depth): New declaration.
7032 (dump_begin_scope): New declaration.
7033 (dump_end_scope): New declaration.
7034 (class auto_dump_scope): New class.
7035 (AUTO_DUMP_SCOPE): New macro.
7036 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7039 2018-06-29 Richard Biener <rguenther@suse.de>
7041 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7042 compute_all_dependences succeeds.
7043 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7044 exceed --param loop-max-datarefs-for-datadeps.
7046 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7048 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7050 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7053 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7054 alternative 0 in preferred_for_speed attribute.
7056 2018-06-28 Paul Koning <ni1d@arrl.net>
7058 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7059 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7060 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7061 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7062 for shift insn patterns.
7064 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7066 * cgraph.c (cgraph_node::get_body): Replace assignments to
7067 "dump_file" with calls to set_dump_file.
7068 * dumpfile.c (alt_dump_file): Make static, and group with...
7069 (alt_flags): ...this definition.
7070 (dumps_are_enabled): New variable.
7071 (refresh_dumps_are_enabled): New function.
7072 (set_dump_file): New function.
7073 (set_alt_dump_file): New function.
7074 (gcc::dump_manager::dump_start): Replace assignments to
7075 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7077 (gcc::dump_manager::dump_finish): Likewise.
7078 * dumpfile.h (alt_dump_file): Delete decl.
7079 (dumps_are_enabled): New variable decl.
7080 (set_dump_file): New function decl.
7081 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7083 * tree-nested.c (lower_nested_functions): Replace assignments to
7084 "dump_file" with calls to set_dump_file.
7086 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7088 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7089 goto_locus of each outgoing edge of each basic block.
7091 2018-06-28 Richard Biener <rguenther@suse.de>
7093 * dwarf2out.c (decl_scope_table): Remove.
7094 (push_decl_scope): Likewise.
7095 (pop_decl_scope): Likewise.
7096 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7097 (gen_struct_or_union_type_die): Likewise.
7098 (gen_tagged_type_die): Likewise.
7099 (dwarf2out_init): Do not initialize decl_scope_table.
7100 (dwarf2out_c_finalize): Do not free it.
7102 2018-06-28 Richard Biener <rguenther@suse.de>
7104 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7105 deciding whether to not re-use a DIE.
7107 2018-06-28 Richard Biener <rguenther@suse.de>
7109 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7110 DW_AT_abstract_origin attribute.
7112 2018-06-28 Martin Liska <mliska@suse.cz>
7114 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7115 Use newly introduced constants.
7116 * tree-switch-conversion.h (struct jump_table_cluster):
7117 Define max_ratio_for_size and max_ratio_for_speed.
7119 2018-06-28 Martin Liska <mliska@suse.cz>
7121 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7122 Add new checking assert to catch invalid state.
7123 (jump_table_cluster::can_be_handled): Handle single case
7125 (jump_table_cluster::is_beneficial): Bail out for such case.
7126 (bit_test_cluster::find_bit_tests):
7127 Add new checking assert to catch invalid state.
7128 (bit_test_cluster::can_be_handled): Handle single case
7130 (bit_test_cluster::is_beneficial): Bail out for such case.
7131 (switch_decision_tree::analyze_switch_statement):
7134 2018-06-28 Martin Liska <mliska@suse.cz>
7136 * common.opt: Introduce -completion option.
7137 * gcc.c (driver_handle_option): Handle it.
7138 (driver::main): Print completions if completion
7140 * opt-suggestions.c (option_proposer::get_completions):
7142 (option_proposer::suggest_completion): Likewise.
7143 (option_proposer::find_param_completions): Likewise.
7144 (verify_autocompletions): Likewise.
7145 (test_completion_valid_options): Likewise.
7146 (test_completion_valid_params): Likewise.
7147 (in_completion_p): Likewise.
7148 (empty_completion_p): Likewise.
7149 (test_completion_partial_match): Likewise.
7150 (test_completion_garbage): Likewise.
7151 (opt_proposer_c_tests): Likewise.
7152 * opt-suggestions.h: Declare new functions.
7153 * opts.c (common_handle_option): Handle OPT__completion_.
7154 * selftest-run-tests.c (selftest::run_tests): Add
7155 opt_proposer_c_tests.
7156 * selftest.c (assert_str_startswith): New.
7157 * selftest.h (assert_str_startswith): Likewise.
7158 (opt_proposer_c_tests): New.
7159 (ASSERT_STR_STARTSWITH): Likewise.
7161 2018-06-28 Martin Liska <mliska@suse.cz>
7163 * Makefile.in: Add opt-suggestions.o.
7164 * gcc-main.c: Include opt-suggestions.h.
7165 * gcc.c (driver::driver): Likewise.
7166 (driver::~driver): Remove m_option_suggestions.
7167 (driver::build_option_suggestions): Moved to option_proposer.
7168 (driver::suggest_option): Likewise.
7169 (driver::handle_unrecognized_options): Use option_proposer.
7170 * gcc.h (class driver): Add new memver m_option_proposer.
7171 * opt-suggestions.c: New file.
7172 * opt-suggestions.h: New file.
7174 2018-06-28 Martin Liska <mliska@suse.cz>
7176 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7177 (auto_string_vec::~auto_string_vec): Likewise.
7179 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7181 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7182 prevent_decl_creation_for_types fields up and add reset_location field.
7183 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7184 statement if id->reset_location is true.
7185 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7186 id->reset_location is true.
7187 (copy_phis_for_bb): Force input_location on the arguments if
7188 id->reset_location is true.
7189 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7190 is set on the function to be inlined.
7192 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7194 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7196 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7198 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7199 registers for Pmode.
7200 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7201 hard registers for the clobbered pseudo.
7203 2018-06-27 Paul Koning <ni1d@arrl.net>
7205 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7206 mutually exclusive options.
7207 * config/pdp11/constraints.md (h): New constraint.
7208 (O): Update definition to match shift code generation.
7209 (D): New constraint.
7210 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7212 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7214 (output_jump): Change arguments.
7215 (pdp11_fixed_cc_regs): New function.
7216 (pdp11_cc_mode): Ditto.
7217 (pdp11_expand_shift): Ditto.
7218 (pdp11_assemble_shift): Ditto.
7219 (pdp11_small_shift): Ditto.
7220 (pdp11_branch_cost): Remove.
7221 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7223 (pdp11_register_move_cost): Update for CC registers.
7224 (pdp11_rtx_costs): Add case for LSHIFTRT.
7225 (pdp11_output_jump): Add CCNZ mode conditional branches.
7226 (notice_update_cc_on_set): Remove.
7227 (pdp11_cc_mode): New function.
7228 (simple_memory_operand): Correct pre/post decrement case.
7229 (no_side_effect_operand): New function.
7230 (pdp11_regno_reg_class): Add CC_REGS class.
7231 (pdp11_fixed_cc_regs): New function.
7232 (pdp11_small_shift): New function.
7233 (pdp11_expand_shift): New function to expand shift insns.
7234 (pdp11_assemble_shift): New function to output shifts.
7235 (pdp11_branch_cost): Remove.
7236 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7237 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7238 (WCHAR_TYPE): Ditto.
7239 (PTRDIFF_TYPE): Ditto.
7240 (ADJUST_INSN_LENGTH): New macro.
7241 (FIXED_REGISTERS): Add CC registers.
7242 (CALL_USED_REGISTERS): Ditto.
7244 (REG_CLASS_NAMES): Ditto.
7245 (REG_CLASS_CONTENTS): Ditto.
7246 (SELECT_CC_MODE): Use new function.
7247 (TARGET_FLAGS_REGNUM): New macro.
7248 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7249 (cc0_reg_rtx): Remove.
7250 (CC_STATUS_MDEP): Remove.
7251 (CC_STATUS_MDEFP_INIT): Remove.
7252 (CC_IN_FPU): Remove.
7253 (NOTICE_UPDATE_CC): Remove.
7254 (REGISTER_NAMES): Add CC registers.
7255 (BRANCH_COST): Change to constant 1.
7256 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7258 * config/pdp11/pdp11.opt (mbcopy): Remove.
7259 (mbcopy-builtin): Remove.
7260 (mbranch-cheap): Remove.
7261 (mbranch-expensive): Remove.
7262 * config/pdp11/predicates.md (expand_shift_operand): Update to
7263 match shift code generation.
7264 (ccnz_operator): New predicate.
7265 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7266 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7267 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7269 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7270 description of O constraint.
7272 2018-06-27 Jeff Law <law@redhat.com>
7273 Austin Law <austinklaw@gmail.com>
7275 * config/v850/v850.md (addsi3_set_flags): New pattern.
7276 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7277 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7278 (zero_extendhisi2_v850_set_flags): Likewise.
7279 (zero_extendqisi2_v850_set_flags): Likewise.
7280 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7281 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7282 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7284 * config/v850/v850-protos.h (notice_update_cc): Remove.
7285 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7286 (v850_print_operand): Handle 'D' and "d".
7287 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7288 Add handling of arithmetic/logical operations compared against zero.
7289 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7290 Do not look at v850_compare_op, instead get mode from last argument.
7291 (v850_gen_compare): Remove
7292 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7293 after reload for prologue insns.
7294 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7296 (construct_save_jarl): Likewise.
7297 (TARGET_FLAGS_REGNUM): Define.
7298 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7299 (NOTICE_UPDATE_CC): Remove.
7300 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7301 than cc0. Conditionalize on reload_completed.
7302 (cmpsi_insn, setfcc_insn): Likewise.
7303 (tst1 splitter): Turn into define_and_split which sets the flags
7305 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7306 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7307 (cstoresf4, cstoredf4): Clobber the flags.
7308 (cmpsi, cmpsf, cmpdf): Remove expanders.
7309 (setf_insn): Remove pattern.
7310 (addsi3): Turn into define_and_split which clobbers the flags after
7311 reload and a suitable pattern (addsi3_clobber_flags) for use after
7313 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7314 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7315 (ashrsi3, ashrsi3_v850e2): Likewise.
7316 (bins): Clobber the flags.
7317 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7318 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7319 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7320 (call_value_internal_short, call_value_internal_long): Likewise.
7321 (callt_save_interrupt, callt_return_interrupt): Likewise.
7322 (save_interrupt, return_interrupt): Likewise.
7323 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7324 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7325 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7326 (All FP comparisons): Only allow after reload has completed.
7328 (divh, divhu): Tweak output template.
7329 (branch_z_normal, branch_z_invert): Remove
7330 (branch_nz_normal, branch_nz_invert): Likewise.
7331 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7333 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7334 * config/v850/v850.c (notice_update_cc): Remove.
7335 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7336 (CC_NO_CARRY): Likewise.
7337 (NOTICE_UPDATE_CC): Define to nothing.
7338 * config/v850/v850.md: Remove block comment on cc0 handling
7339 Remove "cc" attribute from all patterns. Remove cc_status handling
7340 from all patterns. Minor formatting fixes.
7342 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7344 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7345 (cortex-a76.cortex-a55): Likewise.
7346 * config/aarch64/aarch64-tune.md: Regenerate.
7347 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7348 cortex-a76.cortex-a55.
7350 2018-06-27 Jeff Law <law@redhat.com>
7352 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7353 (MULTILIB_DIRNAMES): Similarly.
7355 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7357 * gimple.h (gimple_return_retbnd): Delete.
7358 (gimple_return_set_retbnd): Likewise.
7359 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7360 gimple_return_set_retbnd.
7361 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7362 gimple_return_retbnd and adjust.
7363 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7364 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7365 Explicitly return NULL in a couple more cases. Move assertion
7366 on debug statements and remove unreachable code.
7367 (reset_debug_binding): Do not test id->retbnd.
7368 (expand_call_inline): Do not set it.
7370 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7372 * configure.ac: Add --disable-gcov option.
7373 * configure: Regenerate.
7374 * Makefile.in: Honour @enable_gcov@.
7375 * doc/install.texi: Document --disable-gcov.
7377 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7379 * config/arm/arm-cpus.in (cortex-a76): New entry.
7380 (cortex-a76.cortex-a55): Likewise.
7381 * config/arm/arm-tables.opt: Regenerate.
7382 * config/arm/arm-tune.md: Likewise.
7383 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7384 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7385 cortex-a76.cortex-a55.
7387 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7390 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7392 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7394 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7396 (EPILOGUE_USES): Likewise.
7398 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7400 * tree-inline.c (remap_location): New function extracted from...
7401 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7402 (copy_phis_for_bb): ...here. Call remap_location.
7403 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7405 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7407 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7408 unaligned vsx for 16B memset.
7410 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7413 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7414 ieee128_float_type_node to long_double_type_node unless
7415 TARGET_LONG_DOUBLE_128 is set.
7417 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7419 * cfgloop.c (get_loop_location): Convert return type from
7420 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7421 by implicit construction from rtx_insn *, and using
7422 dump_user_location_t::from_function_decl for the fallback case.
7423 * cfgloop.h (get_loop_location): Convert return type from
7424 location_t to dump_user_location_t.
7425 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7426 dump_printf_loc to pass in a dump_location_t rather than a
7427 location_t, via the gimple stmt.
7428 * coverage.c (get_coverage_counts): Update calls to
7429 dump_printf_loc to pass in dump_location_t rather than a
7431 * doc/optinfo.texi (Dump types): Convert example of
7432 dump_printf_loc from taking "locus" to taking "insn". Update
7433 description of the "_loc" calls to cover dump_location_t.
7434 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7436 (dump_user_location_t::dump_user_location_t): New constructors,
7437 from gimple *stmt and rtx_insn *.
7438 (dump_user_location_t::from_function_decl): New function.
7439 (dump_loc): Make static.
7440 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7441 const dump_location_t &.
7442 (dump_generic_expr_loc): Delete.
7443 (dump_printf_loc): Convert param "loc" from location_t to
7444 const dump_location_t &.
7445 (selftest::test_impl_location): New function.
7446 (selftest::dumpfile_c_tests): New function.
7447 * dumpfile.h: Include "profile-count.h".
7448 (class dump_user_location_t): New class.
7449 (struct dump_impl_location_t): New struct.
7450 (class dump_location_t): New class.
7451 (dump_printf_loc): Convert 2nd param from source_location to
7452 const dump_location_t &.
7453 (dump_generic_expr_loc): Delete.
7454 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7455 const dump_location_t &.
7456 * gimple-fold.c (fold_gimple_assign): Update call to
7457 dump_printf_loc to pass in a dump_location_t rather than a
7458 location_t, via the gimple stmt.
7459 (gimple_fold_call): Likewise.
7460 * gimple-loop-interchange.cc
7461 (loop_cand::analyze_iloop_reduction_var): Update for change to
7462 check_reduction_path.
7463 (tree_loop_interchange::interchange): Update for change to
7465 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7466 change in return-type of find_loop_location.
7467 (graphite_regenerate_ast_isl): Likewise.
7468 * graphite-optimize-isl.c (optimize_isl): Likewise.
7469 * graphite.c (graphite_transform_loops): Likewise.
7470 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7471 pass in a dump_location_t rather than a location_t, via the
7473 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7474 * ipa.c (walk_polymorphic_call_targets): Likewise.
7475 * loop-unroll.c (report_unroll): Convert "locus" param from
7476 location_t to dump_location_t.
7477 (decide_unrolling): Update for change to get_loop_location's
7479 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7480 location_t to dump_user_location_t.
7481 (grid_find_single_omp_among_assignments_1): Updates calls to
7482 dump_printf_loc to pass in a dump_location_t rather than a
7483 location_t, via the gimple stmt.
7484 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7485 location_t to dump_location_t. Updates calls to dump_printf_loc
7486 to pass in a dump_location_t rather than a location_t, via the
7488 (grid_inner_loop_gridifiable_p): Likewise.
7489 (grid_dist_follows_simple_pattern): Likewise.
7490 (grid_gfor_follows_tiling_pattern): Likewise.
7491 (grid_target_follows_gridifiable_pattern): Likewise.
7492 (grid_attempt_target_gridification): Convert initialization
7493 of local "grid" from memset to zero-initialization; FIXME: does
7494 this require C++11? Update call to dump_printf_loc to pass in a
7495 optinfo_location rather than a location_t, via the gimple stmt.
7496 * profile.c (read_profile_edge_counts): Updates call to
7497 dump_printf_loc to pass in a dump_location_t rather than a
7499 (compute_branch_probabilities): Likewise.
7500 * selftest-run-tests.c (selftest::run_tests): Call
7502 * selftest.h (dumpfile_c_tests): New decl.
7503 * tree-loop-distribution.c (pass_loop_distribution::execute):
7504 Update for change in return type of find_loop_location.
7505 * tree-parloops.c (parallelize_loops): Likewise.
7506 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7507 "locus" from location_t to dump_user_location_t.
7508 (canonicalize_loop_induction_variables): Likewise.
7509 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7510 for change in return type of find_loop_location.
7511 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7512 to dump_printf_loc to pass in a dump_location_t rather than a
7513 location_t, via the stmt.
7514 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7516 * tree-vect-loop-manip.c (find_loop_location): Convert return
7517 type from source_location to dump_user_location_t.
7518 (vect_do_peeling): Update for above change.
7519 (vect_loop_versioning): Update for change in type of
7521 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7522 from location_t to dump_user_location_t.
7523 (vect_estimate_min_profitable_iters): Update for change in type
7525 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7526 location_t to dump_location_t.
7527 (vect_slp_bb): Update for change in type of vect_location.
7528 * tree-vectorizer.c (vect_location): Convert from source_location
7529 to dump_user_location_t.
7530 (try_vectorize_loop_1): Update for change in vect_location's type.
7531 (vectorize_loops): Likewise.
7532 (increase_alignment): Likewise.
7533 * tree-vectorizer.h (vect_location): Convert from source_location
7534 to dump_user_location_t.
7535 (find_loop_location): Convert return type from source_location to
7536 dump_user_location_t.
7537 (check_reduction_path): Convert 1st param from location_t to
7538 dump_user_location_t.
7539 * value-prof.c (check_counter): Update call to dump_printf_loc to
7540 pass in a dump_user_location_t rather than a location_t; update
7541 call to error_at for change in type of "locus".
7542 (check_ic_target): Update call to dump_printf_loc to
7543 pass in a dump_user_location_t rather than a location_t, via the
7546 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7548 * config/s390/s390.h (enum processor_flags): Do not use
7549 default tune parameter when -march was specified.
7551 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7554 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7555 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7558 2018-06-26 Richard Biener <rguenther@suse.de>
7560 PR tree-optimization/86287
7562 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7563 (vect_analyze_loop): Initialize n_stmts.
7565 2018-06-26 Richard Biener <rguenther@suse.de>
7568 * fold-const.c (fold_convertible_p): Pointer extension
7571 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7574 * dwarf2out.c (loc_list_has_views): Adjust comments.
7575 (dw_loc_list): Split single cross-partition range with
7578 2018-06-25 Jeff Law <law@redhat.com>
7580 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7581 on -mbig-switch by default.
7583 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7585 (const_float_0_operand): Remove unused predicate.
7586 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7587 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7588 (recipsf2): New expander. Original pattern now called
7590 (recipdf2, recipdf2_insn): Similarly.
7591 (rsqrtsf2, rsqrtsf2_insn): Similarly
7592 (rsqrtdf2, rsqrtdf2_insn): Similarly
7594 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7596 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7597 Simplify logic for FreeBSD (twice).
7599 2018-06-25 Martin Sebor <msebor@redhat.com>
7601 PR tree-optimization/86204
7602 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7603 a strnlen result if it's less than the length of the string.
7605 2018-06-25 Martin Sebor <msebor@redhat.com>
7607 PR tree-optimization/85700
7608 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7609 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7610 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7612 2018-06-25 Martin Sebor <msebor@redhat.com>
7614 * doc/extend.texi (Zero-length arrays): Update and clarify.
7616 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7618 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7619 added IEEE/IBM long double multilib support on PowerPC little
7620 endian Linux systems.
7621 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7622 (MULTILIB_DEFAULTS): Likewise.
7623 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7625 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7626 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7627 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7629 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7632 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7633 (REORDER_45): Likewise.
7635 2018-06-25 Jeff Law <law@redhat.com>
7637 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7638 dividend to 32 bits. Adjust length.
7639 (udivmodhi4): Cleanup output template. Fix length.
7641 2018-06-25 Carl Love <cel@us.ibm.com>
7643 * config/rs6000/vsx.md: Change word selector to prefered location.
7645 2018-06-25 Richard Biener <rguenther@suse.de>
7647 PR tree-optimization/86304
7648 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7649 epilogue-if-converted loops as well.
7651 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7653 * lto-section-out.c (lto_begin_section): Do not print section
7654 name for noaddr and unnumbered dumps.
7656 2018-06-25 Richard Biener <rguenther@suse.de>
7658 * tree-vectorizer.h (struct vec_info_shared): New structure
7659 with parts split out from struct vec_info and loop_nest from
7660 struct _loop_vec_info.
7661 (struct vec_info): Adjust accordingly.
7662 (struct _loop_vec_info): Likewise.
7663 (LOOP_VINFO_LOOP_NEST): Adjust.
7664 (LOOP_VINFO_DATAREFS): Likewise.
7665 (LOOP_VINFO_DDRS): Likewise.
7666 (struct _bb_vec_info): Likewise.
7667 (BB_VINFO_DATAREFS): Likewise.
7668 (BB_VINFO_DDRS): Likewise.
7669 (struct _stmt_vec_info): Add dr_aux member.
7670 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7671 (DR_MISALIGNMENT_UNINITIALIZED): New.
7672 (set_dr_misalignment): Adjust.
7673 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7674 (vect_analyze_loop): Adjust prototype.
7675 (vect_analyze_loop_form): Likewise.
7676 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7677 Compute dependences lazily.
7678 (vect_record_base_alignments): Use shared datarefs/ddrs.
7679 (vect_verify_datarefs_alignment): Likewise.
7680 (vect_analyze_data_refs_alignment): Likewise.
7681 (vect_analyze_data_ref_accesses): Likewise.
7682 (vect_analyze_data_refs): Likewise.
7683 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7684 constructor parameter for shared part.
7685 (vect_analyze_loop_form): Pass in shared part and adjust.
7686 (vect_analyze_loop_2): Pass in storage for the number of
7687 stmts. Move loop nest finding to the caller. Compute
7689 (vect_analyze_loop): Pass in shared part.
7690 (vect_transform_loop): Verify shared datarefs are unchanged.
7691 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7692 constructor parameter for shared part.
7693 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7694 (vect_slp_bb): Verify shared datarefs are unchanged before
7696 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7698 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7699 DR_MISALIGNMENT_UNINITIALIZED.
7700 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7701 parameter for shared part.
7702 (vec_info::~vec_info): Adjust.
7703 (vec_info_shared::vec_info_shared): New.
7704 (vec_info_shared::~vec_info_shared): Likewise.
7705 (vec_info_shared::save_datarefs): Likewise.
7706 (vec_info_shared::check_datarefs): Likewise.
7707 (try_vectorize_loop_1): Construct shared part live for analyses
7708 of a single loop for multiple vector sizes.
7709 * tree-parloops.c (gather_scalar_reductions): Adjust.
7711 2018-06-25 Richard Biener <rguenther@suse.de>
7713 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7714 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7715 (vect_analyze_data_refs): Remove similar code from here and
7716 simplify accordingly.
7718 2018-06-25 Richard Biener <rguenther@suse.de>
7720 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7721 for reverse storage order accesses rather than asserting
7722 they cannot happen here.
7724 2018-06-25 Tom de Vries <tdevries@suse.de>
7727 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7728 Use data16 instead of .byte for insn prefix.
7730 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7733 * parser.c (make_char_string_pack): Pass this literal chars
7734 through cpp_interpret_string.
7735 (cp_parser_userdef_numeric_literal): Check the result of
7736 make_char_string_pack.
7738 2018-06-24 Maya Rashish <coypu@sdf.org>
7740 * ginclude/stddef.h: Simplify conditions around avoiding
7741 re-definition of __size_t.
7743 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7745 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7746 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7748 2018-06-22 Maya Rashish <coypu@sdf.org>
7750 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7751 made to OpenBSD and NetBSD through the years.
7753 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7755 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7756 behavior of vec_pack (vector double, vector double) to match
7757 behavior of vec_float2 (vector double, vector double).
7759 2018-06-22 Olivier Hainque <hainque@adacore.com>
7761 * gimplify.c (gimplify_function_tree): Prevent creation
7762 of a trampoline for the address of the current function
7763 passed to entry/exit instrumentation hooks.
7765 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7768 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7771 2018-06-22 Martin Liska <mliska@suse.cz>
7773 PR tree-optimization/86263
7774 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7775 Bail out if is_enabled is false.
7776 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7778 (jump_table_cluster::is_enabled): New function.
7780 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7782 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7783 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7784 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7785 (lto_input_ts_binfo_tree_pointers): Likewise.
7786 * tree-streamer-out.c (streamer_write_tree_bitfields,
7787 write_ts_binfo_tree_pointers): Likewise.
7788 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7790 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7792 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7794 2018-06-22 Martin Liska <mliska@suse.cz>
7796 * symbol-summary.h (get): Make it pure and inline move
7797 functionality from ::get function.
7798 (get): Remove and inline into ::get and ::get_create.
7799 (get_create): Move code from ::get function.
7801 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7804 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7805 -x assembler-with-cpp.
7807 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7809 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7810 _FILE_OFFSET_BITS=64 for C++.
7812 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7814 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7815 conversion insn that shows up when pr85657-3.c is compiled using
7816 IEEE 128-bit long double.
7817 (neg<mode>2_internal): Use the correct mode to check whether the
7818 mode is IBM extended.
7819 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7820 multiply and divide external functions from being created more
7823 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7825 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7827 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7828 the edge can be forwarded.
7829 (cfg_layout_merge_blocks): Likewise.
7831 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7833 * except.c (finish_eh_generation): Commit edge insertions only after
7834 the EH edges have been redirected from post-landing to landing pads.
7836 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7838 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7839 create_tmp_var_for to create the FRAME decl.
7840 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7842 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7844 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7845 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7846 debug statement when resetting its value.
7847 (expand_call_inline): Copy the locus of the call onto the assignment
7848 of the return value, if any. Use local variable in more cases.
7850 2018-06-21 Martin Liska <mliska@suse.cz>
7852 * ipa-pure-const.c (propagate_nothrow): Use
7853 funct_state_summaries->get.
7854 (dump_malloc_lattice): Likewise.
7855 (propagate_malloc): Likewise.
7857 2018-06-21 Richard Biener <rguenther@suse.de>
7859 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7860 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7861 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7863 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7864 BLOCK_ABSTRACT_ORIGIN unconditionally.
7866 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7868 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7870 * ipa-reference.c (ipa_reference_c_finalize): Delete
7871 ipa_ref_opt_sum_summaries and set it to NULL.
7873 2018-06-21 Tom de Vries <tdevries@suse.de>
7875 PR tree-optimization/85859
7876 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7877 test with comment from bb_no_side_effects_p.
7879 2018-06-21 Richard Biener <rguenther@suse.de>
7881 PR tree-optimization/86232
7882 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7883 max for constant niter.
7885 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7887 * config/aarch64/aarch64-simd.md
7888 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7890 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7892 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7893 Make opernads of the unspec commutative.
7895 2018-06-21 Richard Biener <rguenther@suse.de>
7897 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7898 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7899 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7900 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7902 (vect_record_base_alignments): Do not record base alignment
7903 for gathers or scatters.
7904 (vect_compute_data_ref_alignment): Drop return value that is always
7905 true. Bail out early for gathers or scatters.
7906 (vect_enhance_data_refs_alignment): Bail out early for gathers
7908 (vect_find_same_alignment_drs): Likewise.
7909 (vect_analyze_data_refs_alignment): Remove dead code.
7910 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7911 (vect_analyze_data_refs): For possible gathers or scatters do
7912 not create an alternate DR, just check their possible validity
7913 and mark them. Adjust DECL_NONALIASED handling to not rely
7915 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7916 update inits of gathers or scatters.
7917 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7918 Also copy gather/scatter flag to pattern vinfo.
7920 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7922 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7923 behavior of vec_packsu (vector unsigned long long, vector unsigned
7924 long long) to match behavior of vec_packs with same signature.
7926 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7927 Thomas Schwinge <thomas@codesourcery.com>
7928 Cesar Philippidis <cesar@codesourcery.com>
7930 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7931 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7932 (gimplify_adjust_omp_clauses): Likewise.
7933 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7934 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7935 (gimplify_omp_target_update): Update handling of acc update and
7937 * omp-low.c (install_var_field): Remove unused parameter
7938 base_pointers_restrict.
7939 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7940 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7942 (omp_target_base_pointers_restrict_p): Delete.
7943 (scan_omp_target): Update call to scan_sharing_clauses.
7944 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7946 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7947 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7948 (convert_local_omp_clauses): Likewise.
7949 * tree-pretty-print.c (dump_omp_clause): Likewise.
7950 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7952 (omp_clause_code_name): Likewise.
7954 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7957 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7960 PR tree-optimization/86231
7961 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7962 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7964 2018-06-20 Tom de Vries <tdevries@suse.de>
7966 PR tree-optimization/86097
7967 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7968 iv type if signedness of iv type is not the same as that of *nit.
7970 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7972 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7973 EDGE_EH edges, verify they are all EDGE_EH.
7975 2018-06-20 Maya Rashish <coypu@sdf.org>
7977 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7979 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7981 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7982 * config/aarch64/aarch64.c (xgene1_tunings): Add
7983 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7984 (aarch64_mode_valid_for_sched_fusion_p):
7985 Allow 16-byte modes.
7986 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7987 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7989 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7991 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7992 * config/aarch64/iterators.md (VQ2): New mode iterator.
7994 2018-06-20 Martin Liska <mliska@suse.cz>
7996 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7997 Change default ratio from 10 to 8.
7999 2018-06-20 Martin Liska <mliska@suse.cz>
8001 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8003 (bit_test_cluster::find_bit_tests): Likewise.
8004 (switch_decision_tree::analyze_switch_statement): Find clusters.
8005 * tree-switch-conversion.h (struct jump_table_cluster): Document
8008 2018-06-20 Martin Liska <mliska@suse.cz>
8010 * tree-switch-conversion.c (switch_conversion::collect):
8011 Record m_uniq property.
8012 (switch_conversion::expand): Bail out for special conditions.
8013 (group_cluster::~group_cluster): New.
8014 (group_cluster::group_cluster): Likewise.
8015 (group_cluster::dump): Likewise.
8016 (jump_table_cluster::emit): New.
8017 (switch_decision_tree::fix_phi_operands_for_edges): New.
8018 (struct case_node): Remove struct.
8019 (jump_table_cluster::can_be_handled): New.
8020 (case_values_threshold): Moved to header.
8021 (reset_out_edges_aux): Likewise.
8022 (jump_table_cluster::is_beneficial): New.
8023 (bit_test_cluster::can_be_handled): Likewise.
8024 (add_case_node): Remove.
8025 (bit_test_cluster::is_beneficial): New.
8026 (case_bit_test::cmp): New.
8027 (bit_test_cluster::emit): New.
8028 (expand_switch_as_decision_tree_p): Remove.
8029 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8030 (fix_phi_operands_for_edge): Likewise.
8031 (switch_decision_tree::analyze_switch_statement): New.
8032 (compute_cases_per_edge): Move ...
8033 (switch_decision_tree::compute_cases_per_edge): ... here.
8034 (try_switch_expansion): Likewise.
8035 (switch_decision_tree::try_switch_expansion): Likewise.
8036 (record_phi_operand_mapping): Likewise.
8037 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8038 (emit_case_decision_tree): Likewise.
8039 (switch_decision_tree::emit): Likewise.
8040 (balance_case_nodes): Likewise.
8041 (switch_decision_tree::balance_case_nodes): Likewise.
8042 (dump_case_nodes): Likewise.
8043 (switch_decision_tree::dump_case_nodes): Likewise.
8044 (emit_jump): Likewise.
8045 (switch_decision_tree::emit_jump): Likewise.
8046 (emit_cmp_and_jump_insns): Likewise.
8047 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8048 (emit_case_nodes): Likewise.
8049 (switch_decision_tree::emit_case_nodes): Likewise.
8050 (conditional_probability): Remove.
8051 * tree-switch-conversion.h (enum cluster_type): New.
8053 (struct cluster): Likewise.
8054 (cluster::cluster): Likewise.
8055 (struct simple_cluster): Likewise.
8056 (simple_cluster::simple_cluster): Likewise.
8057 (struct group_cluster): Likewise.
8058 (struct jump_table_cluster): Likewise.
8059 (struct bit_test_cluster): Likewise.
8060 (struct min_cluster_item): Likewise.
8061 (struct case_tree_node): Likewise.
8062 (case_tree_node::case_tree_node): Likewise.
8063 (jump_table_cluster::case_values_threshold): Likewise.
8064 (struct case_bit_test): Likewise.
8065 (struct switch_decision_tree): Likewise.
8066 (struct switch_conversion): Likewise.
8067 (switch_decision_tree::reset_out_edges_aux): Likewise.
8069 2018-06-20 Martin Liska <mliska@suse.cz>
8071 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8072 (hoist_edge_and_branch_if_true): Likewise.
8073 (expand_switch_using_bit_tests_p): Likewise.
8074 (struct case_bit_test): Likewise.
8075 (case_bit_test_cmp): Likewise.
8076 (emit_case_bit_tests): Likewise.
8077 (switch_conversion::switch_conversion): New class.
8078 (struct switch_conv_info): Remove old struct.
8079 (collect_switch_conv_info): More to ...
8080 (switch_conversion::collect): ... this.
8081 (check_range): Likewise.
8082 (switch_conversion::check_range): Likewise.
8083 (check_all_empty_except_final): Likewise.
8084 (switch_conversion::check_all_empty_except_final): Likewise.
8085 (check_final_bb): Likewise.
8086 (switch_conversion::check_final_bb): Likewise.
8087 (create_temp_arrays): Likewise.
8088 (switch_conversion::create_temp_arrays): Likewise.
8089 (free_temp_arrays): Likewise.
8090 (gather_default_values): Likewise.
8091 (switch_conversion::gather_default_values): Likewise.
8092 (build_constructors): Likewise.
8093 (switch_conversion::build_constructors): Likewise.
8094 (constructor_contains_same_values_p): Likewise.
8095 (switch_conversion::contains_same_values_p): Likewise.
8096 (array_value_type): Likewise.
8097 (switch_conversion::array_value_type): Likewise.
8098 (build_one_array): Likewise.
8099 (switch_conversion::build_one_array): Likewise.
8100 (build_arrays): Likewise.
8101 (switch_conversion::build_arrays): Likewise.
8102 (gen_def_assigns): Likewise.
8103 (switch_conversion::gen_def_assigns): Likewise.
8104 (prune_bbs): Likewise.
8105 (switch_conversion::prune_bbs): Likewise.
8106 (fix_phi_nodes): Likewise.
8107 (switch_conversion::fix_phi_nodes): Likewise.
8108 (gen_inbound_check): Likewise.
8109 (switch_conversion::gen_inbound_check): Likewise.
8110 (process_switch): Use the newly created class.
8111 (switch_conversion::expand): New.
8112 (switch_conversion::~switch_conversion): New.
8113 * tree-switch-conversion.h: New file.
8115 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8117 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8118 tree-vect-patterns.c.
8119 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8120 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8121 (vect_recog_sad_pattern): Likewise.
8122 (vect_recog_widen_sum_pattern): Likewise.
8123 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8124 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8125 (vect_recog_rotate_pattern): Likewise.
8126 (vect_recog_mult_pattern): Likewise.
8127 (vect_recog_vector_vector_shift_pattern): Likewise.
8128 (vect_recog_divmod_pattern): Likewise.
8129 (vect_recog_mixed_size_cond_pattern): Likewise.
8130 (vect_recog_bool_pattern): Likewise.
8131 (vect_recog_mask_conversion_pattern): Likewise.
8132 (vect_try_gather_scatter_pattern): Likewise.
8133 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8134 (vect_recog_over_widening_pattern): Likewise.
8135 (vect_recog_gather_scatter_pattern): Likewise.
8136 (vect_recog_func_ptr): Move from tree-vectorizer.h
8137 (vect_vect_recog_func_ptrs): Move further down the file.
8138 (vect_recog_func): Likewise. Remove the third argument.
8139 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8140 (vect_pattern_recog_1): Expect the pattern function to do any
8141 necessary target tests. Also expect it to provide a vector type.
8142 Remove the type_in handling.
8144 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8146 * tree-vect-patterns.c (vect_pattern_detected): New function.
8147 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8148 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8149 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8150 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8151 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8152 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8153 (vect_recog_mask_conversion_pattern)
8154 (vect_try_gather_scatter_pattern): Likewise.
8156 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8158 * tree-vect-patterns.c (vect_get_internal_def): New function.
8159 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8160 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8161 (search_type_for_mask_1): Use it.
8163 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8165 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8166 redundant WIDEN_SUM_EXPR handling.
8167 (vect_recog_sad_pattern): Likewise.
8169 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8171 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8172 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8173 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8174 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8175 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8177 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8179 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8180 use the stmt_vec_info of the original bb statement for the
8181 new zero assignment, even if the call is part of a pattern.
8183 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8185 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8186 that the sequence is attached to the original statement rather
8187 than the pattern statement.
8188 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8189 PATTERN_DEF_SEQ from the original statement rather than
8190 the main pattern statement.
8191 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8192 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8193 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8195 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8197 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8198 definition statements before the early exit for statements that aren't
8200 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8202 (vect_transform_loop): ...here. Process pattern definition
8203 statements without first checking whether the main pattern
8204 statement is live or relevant.
8206 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8208 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8209 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8211 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8213 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8214 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8215 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8216 (expand_block_compare): Change select_block_compare_mode call.
8217 (expand_strncmp_align_check): Use new functions, fix comment.
8218 (emit_final_str_compare_gpr): New function.
8219 (expand_strn_compare): Refactor and clean up code.
8220 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8222 2018-06-19 Tony Reix <tony.reix@atos.com>
8223 Damien Bergamini <damien.bergamini@atos.com>
8224 David Edelsohn <dje.gcc@gmail.com>
8226 * collect2.c (static_obj): New variable.
8227 (static_libs): New variable.
8228 (is_in_list): Uncomment declaration.
8229 (main): Track AIX libraries linked statically.
8230 (is_in_list): Uncomment definition.
8231 (scan_prog_file): Don't add AIX shared libraries initializer
8232 to constructor list if linking statically.
8234 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8236 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8238 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8240 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8242 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8245 2018-06-19 Martin Liska <mliska@suse.cz>
8247 * config/i386/i386.c (ix86_can_inline_p): Do not use
8248 ipa_fn_summaries::get_create.
8249 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8251 (devirtualization_time_bonus): Likewise.
8252 (ipcp_propagate_stage): Likewise.
8253 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8254 (edge_set_predicate): Likewise.
8255 (evaluate_conditions_for_known_args): Likewise.
8256 (evaluate_properties_for_edge): Likewise.
8257 (ipa_call_summary::reset): Tranform to ...
8258 (ipa_call_summary::~ipa_call_summary): ... this.
8259 (ipa_fn_summary::reset): Transform to ...
8260 (ipa_fn_summary::~ipa_fn_summary): ... this.
8261 (ipa_fn_summary_t::remove): Rename to ...
8262 (ipa_fn_summary_t::remove_callees): ... this.
8263 (ipa_fn_summary_t::duplicate): Use placement new
8264 instead of memory copy.
8265 (ipa_call_summary_t::duplicate): Likewise.
8266 (ipa_call_summary_t::remove): Remove.
8267 (dump_ipa_call_summary): Change get_create to get.
8268 (ipa_dump_fn_summary): Dump only when summary exists.
8269 (analyze_function_body): Use symbol_summary::get instead
8271 (compute_fn_summary): Likewise.
8272 (estimate_edge_devirt_benefit): Likewise.
8273 (estimate_edge_size_and_time): Likewise.
8274 (inline_update_callee_summaries): Likewise.
8275 (remap_edge_change_prob): Likewise.
8276 (remap_edge_summaries): Likewise.
8277 (ipa_merge_fn_summary_after_inlining): Likewise.
8278 (write_ipa_call_summary): Likewise.
8279 (ipa_fn_summary_write): Likewise.
8280 (ipa_free_fn_summary): Likewise.
8281 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8282 (struct ipa_call_summary): Likewise.
8283 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8285 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8286 (estimate_size_after_inlining): Likewise.
8287 (estimate_growth): Likewise.
8288 (growth_likely_positive): Likewise.
8289 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8290 (inline_call): Likewise.
8291 * ipa-inline.c (caller_growth_limits): Likewise.
8292 (can_inline_edge_p): Likewise.
8293 (can_inline_edge_by_limits_p): Likewise.
8294 (compute_uninlined_call_time): Likewise.
8295 (compute_inlined_call_time): Likewise.
8296 (want_inline_small_function_p): Likewise.
8297 (edge_badness): Likewise.
8298 (update_caller_keys): Likewise.
8299 (update_callee_keys): Likewise.
8300 (inline_small_functions): Likewise.
8301 (inline_to_all_callers_1): Likewise.
8302 (dump_overall_stats): Likewise.
8303 (early_inline_small_functions): Likewise.
8304 (early_inliner): Likewise.
8305 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8306 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8307 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8308 * ipa-split.c (execute_split_functions): Likewise.
8309 * symbol-summary.h: Likewise.
8310 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8312 2018-06-19 Richard Biener <rguenther@suse.de>
8314 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8315 (vectorize_loops): ... here. Fix dbgcnt handling.
8316 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8318 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8321 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8322 ieee128 argument takes up only one (vector) register, not two (floating
8325 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8327 * gimplify.c (gimplify_init_constructor): Really never clear for an
8328 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8330 2018-06-19 Richard Biener <rguenther@suse.de>
8332 PR tree-optimization/86179
8333 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8334 after failed recognition.
8336 2018-06-18 Martin Sebor <msebor@redhat.com>
8339 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8340 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8341 Handle integer subtraction.
8342 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8343 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8345 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8347 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8348 param from rtx to rtx_insn *.
8349 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8351 (frv_ifcvt_modify_insn): Likwise.
8352 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8353 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8354 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8355 as_a <rtx_insn *> cast to local "unprotected_region" once
8356 it's been established that it's not NULL or pc_rtx.
8357 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8358 param "sethi" from rtx to rtx_insn *.
8359 (nds32_group_float_insns): Likewise for param "insn".
8360 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8362 (vax_output_int_subtract): Likewise.
8363 * config/vax/vax.c (vax_output_int_add): Likewise for param
8365 (vax_output_int_subtract): Likewise.
8366 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8367 (emit_pattern_after): Likewise for param "after".
8368 (emit_insn_after): Likewise.
8369 (emit_jump_insn_after): Likewise.
8370 (emit_call_insn_after): Likewise.
8371 (emit_debug_insn_after): Likewise.
8372 (emit_pattern_before): Likewise for param "before".
8373 (emit_insn_before): Likewise.
8374 (emit_jump_insn_before): Likewise.
8375 * final.c (get_insn_template): Likewise for param "insn", removing
8377 * output.h (get_insn_template): Likewise for 2nd param.
8378 * rtl.h (emit_insn_before): Likewise.
8379 (emit_jump_insn_before): Likewise.
8380 (emit_debug_insn_before_noloc): Likewise.
8381 (emit_insn_after): Likewise.
8382 (emit_jump_insn_after): Likewise.
8383 (emit_call_insn_after): Likewise.
8384 (emit_debug_insn_after): Likewise.
8385 (set_insn_deleted): Likewise for param.
8387 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8390 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8391 floating point modes, so that IFmode is numerically greater than
8392 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8393 to declare the ordering. This prevents IFmode from being
8394 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8395 machine. Include rs6000-modes.h to share the fractional values
8396 between genmodes* and the rest of the compiler.
8400 * config/rs6000/rs6000-modes.h: New file.
8401 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8402 meaning of rs6000_long_double_size so that 126..128 selects an
8403 appropriate 128-bit floating point type.
8404 (rs6000_option_override_internal): Likewise.
8405 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8406 (TARGET_LONG_DOUBLE_128): Change the meaning of
8407 rs6000_long_double_size so that 126..128 selects an appropriate
8408 128-bit floating point type.
8409 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8410 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8411 source and destination to match the standard usage.
8412 (truncifkf2): Likewise.
8413 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8414 ISA 2.07 to use an explicit clobber, instead of passing in a
8416 (copysign<mode>3_soft): Likewise.
8418 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8420 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8421 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8422 (vect_slp_analyze_instance_dependence): Likewise.
8423 (vect_enhance_data_refs_alignment): Likewise.
8424 (vect_analyze_data_refs_alignment): Likewise.
8425 (vect_slp_analyze_and_verify_instance_alignment
8426 (vect_analyze_data_ref_accesses): Likewise.
8427 (vect_prune_runtime_alias_test_list): Likewise.
8428 (vect_analyze_data_refs): Likewise.
8429 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8430 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8431 (vect_analyze_scalar_cycles_1): Likewise.
8432 (vect_get_loop_niters): Likewise.
8433 (vect_analyze_loop_form_1): Likewise.
8434 (vect_update_vf_for_slp): Likewise.
8435 (vect_analyze_loop_operations): Likewise.
8436 (vect_analyze_loop): Likewise.
8437 (vectorizable_induction): Likewise.
8438 (vect_transform_loop): Likewise.
8439 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8440 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8441 (vect_make_slp_decision): Likewise.
8442 (vect_detect_hybrid_slp): Likewise.
8443 (vect_slp_analyze_operations): Likewise.
8444 (vect_slp_bb): Likewise.
8445 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8446 (vectorizable_bswap): Likewise.
8447 (vectorizable_call): Likewise.
8448 (vectorizable_simd_clone_call): Likewise.
8449 (vectorizable_conversion): Likewise.
8450 (vectorizable_assignment): Likewise.
8451 (vectorizable_shift): Likewise.
8452 (vectorizable_operation): Likewise.
8453 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8455 2018-06-18 Martin Sebor <msebor@redhat.com>
8457 PR tree-optimization/81384
8458 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8459 * builtins.c (expand_builtin_strnlen): New function.
8460 (expand_builtin): Call it.
8461 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8462 * builtins.def (BUILT_IN_STRNLEN): New.
8463 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8464 Warn for bounds in excess of maximum object size.
8465 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8466 single-value ranges. Handle strnlen.
8467 (handle_builtin_strlen): Handle strnlen.
8468 (strlen_check_and_optimize_stmt): Same.
8469 * doc/extend.texi (Other Builtins): Document strnlen.
8471 2018-06-18 Maya Rashish <coypu@sdf.org>
8473 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8474 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8475 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8477 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8479 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8481 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8483 * tree.c (escaped_string::escape): Replace cast to char * by
8484 const_cast<char *> (unescaped).
8486 2018-06-18 Nick Clifton <nickc@redhat.com>
8489 * tree.c (escaped_string): New class. Converts an unescaped
8490 string into its escaped equivalent.
8491 (warn_deprecated_use): Use the new class to convert the
8492 deprecation message, if present.
8493 (test_escaped_strings): New self test.
8494 (test_c_tests): Add test_escaped_strings.
8495 * doc/extend.texi (deprecated): Add a note that the
8496 deprecation message is affected by the -fmessage-length
8497 option, and that control characters will be escaped.
8498 (#pragma GCC error): Document this pragma.
8499 (#pragma GCC warning): Likewise.
8500 * doc/invoke.texi (-fmessage-length): Document this option's
8501 effect on the #warning and #error preprocessor directives and
8502 the deprecated attribute.
8504 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8506 * tree.c (decl_value_expr_lookup): Revert latest change.
8507 (decl_value_expr_insert): Likewise.
8509 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8511 * gimplify.c (nonlocal_vlas): Delete.
8512 (nonlocal_vla_vars): Likewise.
8513 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8515 (gimplify_body): Do not create and destroy nonlocal_vlas.
8516 * tree-nested.c: Include diagnostic.h.
8517 (use_pointer_in_frame): Tweak.
8518 (lookup_field_for_decl): Add assertion and declare the transformation.
8519 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8520 internal error when the reference is in a wrong context. Do not
8521 create a debug decl by default.
8522 (note_nonlocal_block_vlas): Delete.
8523 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8524 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8525 create a debug decl by default.
8526 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8527 call is in a wrong context.
8528 (fixup_vla_decls): New function.
8529 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8530 debug variables were created.
8531 * tree.c (decl_value_expr_lookup): Add checking assertion.
8532 (decl_value_expr_insert): Likewise.
8534 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8537 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8538 * tree-scalar-evolution.c (interpret_expr): Likewise.
8539 (expression_expensive_p): Likewise.
8540 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8541 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8542 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8543 (ssa_defined_by_minus_one_stmt_p): New.
8545 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8548 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8549 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8550 * dojump.c (do_jump): Likewise.
8551 * expr.c (expand_expr_real_2): Check operand type's sign.
8552 * fold-const.c (const_unop): Handle ABSU_EXPR.
8553 (fold_abs_const): Likewise.
8554 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8555 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8556 (strip_sign_op_1): Likesise.
8557 * match.pd: Add new pattern to generate ABSU_EXPR.
8558 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8559 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8560 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8561 * tree-inline.c (estimate_operator_cost): Likewise.
8562 * tree-pretty-print.c (dump_generic_node): Likewise.
8563 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8564 * tree.def (ABSU_EXPR): New.
8566 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8569 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8570 documented as preserved for backward compatibility only.
8571 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8573 PR rtl-optimization/86108
8574 * bb-reorder.c (create_forwarder_block): Renamed to ...
8575 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8576 jump from new landing pad to the second part.
8577 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8580 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8583 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8584 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8585 Only call store_expr for halves if the mode is the same.
8588 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8589 Fix up comment formatting.
8591 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8593 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8594 (typed_splay_tree::closure,
8595 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8596 (typed_splay_tree::typed_splay_tree,
8597 typed_splay_tree::operator =): Declared private.
8598 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8599 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8600 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8601 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8602 typed_splay_tree::splay_tree_splay,
8603 typed_splay_tree::splay_tree_foreach_helper,
8604 typed_splay_tree::splay_tree_insert,
8605 typed_splay_tree::splay_tree_remove,
8606 typed_splay_tree::splay_tree_lookup,
8607 typed_splay_tree::splay_tree_predecessor,
8608 typed_splay_tree::splay_tree_successor,
8609 typed_splay_tree::splay_tree_min,
8610 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8611 (typed_splay_tree::root, typed_splay_tree::comp,
8612 typed_splay_tree::delete_key,
8613 typed_splay_tree::delete_value): New data members.
8614 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8615 typed_splay_tree::remove.
8617 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8619 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8620 -mginv and -mno-ginv to the assembler.
8621 * config/mips/mips.opt (-mcrc): New option.
8623 * doc/invoke.text (-mcrc): Document.
8626 2018-06-15 Nick Clifton <nickc@redhat.com>
8629 * tree.c (escaped_string): New class. Converts an unescaped
8630 string into its escaped equivalent.
8631 (warn_deprecated_use): Use the new class to convert the
8632 deprecation message, if present.
8633 (test_escaped_strings): New self test.
8634 (test_c_tests): Add test_escaped_strings.
8635 * doc/extend.texi (deprecated): Add a note that the
8636 deprecation message is affected by the -fmessage-length
8637 option, and that control characters will be escaped.
8638 (#pragma GCC error): Document this pragma.
8639 (#pragma GCC warning): Likewise.
8640 * doc/invoke.texi (-fmessage-length): Document this option's
8641 effect on the #warning and #error preprocessor directives and
8642 the deprecated attribute.
8644 2018-06-15 Richard Biener <rguenther@suse.de>
8646 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8647 here, also noting vector size used.
8648 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8649 size used in MSG_OPTIMIZED_LOCATIONS dump.
8650 (pass_slp_vectorize::execute): Adjust.
8652 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8655 * config/arc/arc.c (arc_return_address_register): Fix
8658 2018-06-15 Richard Biener <rguenther@suse.de>
8661 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8662 leave useless conversion stripping to force_gimple_operand_gsi.
8663 (gimplify_build2): Likewise.
8664 (gimplify_build1): Likewise.
8666 2018-06-15 Richard Biener <rguenther@suse.de>
8669 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8670 before adjusting their block.
8672 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8674 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8675 multilibs for *-*-rtems*.
8676 * config/riscv/t-rtems: New file.
8678 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8681 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8682 unsigned_type_for returns NULL.
8685 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8686 subregs of multi-word pseudos unless the float mode has word size.
8688 2018-06-14 Richard Biener <rguenther@suse.de>
8691 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8692 duplicate and harmful type_hash_canon.
8693 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8695 2018-06-14 Richard Biener <rguenther@suse.de>
8698 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8701 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8703 * config/rtems.h (STDINT_LONG32): Define.
8705 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8706 Prachi Godbole <prachi.godbole@imgtec.com>
8708 * config/mips/mips-cpus.def: Define P6600.
8709 * config/mips/mips-tables.opt: Regenerate.
8710 * config/mips/mips.c (mips_ucbranch_type): New enum.
8711 (mips_rtx_cost_data): Add support for P6600.
8712 (mips_issue_rate): Likewise.
8713 (mips_multipass_dfa_lookahead): Likewise.
8714 (mips_avoid_hazard): Likewise.
8715 (mips_reorg_process_insns): Likewise.
8716 (mips_classify_branch_p6600): New function.
8717 * config/mips/mips.h (TUNE_P6600): New define.
8718 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8719 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8720 * config/mips/mips.md: Include p6600.md.
8721 (processor): Add p6600.
8722 * config/mips/p6600.md: New file.
8723 * doc/invoke.texi: Add p6600 to supported architectures.
8725 2018-06-13 Martin Sebor <msebor@redhat.com>
8727 PR tree-optimization/86114
8728 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8730 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8732 2018-06-13 Richard Biener <rguenther@suse.de>
8734 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8735 Properly set vector type of the intermediate stmt.
8736 * tree-vect-stmts.c (vectorizable_operation): The destination
8737 var always has vectype_out type.
8739 2018-06-13 Jeff Law <law@redhat.com>
8741 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8742 integer 0 for argument to print_rtl_with_bb.
8743 (rl78_reorg): Likewise.
8745 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8747 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8748 from rtx to rtx_insn *.
8749 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8751 (add_sched_insns_for_speculation): Likewise for local "target",
8752 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8753 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8754 from rtx_insn ** to rtx_code_label **.
8755 (reorg_emit_nops): Likewise.
8756 (c6x_reorg): Likewise for local "call_labels".
8757 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8759 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8760 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8761 the loops over LABEL_REFS.
8762 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8764 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8765 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8766 (split_branches): Strengthen local "olabel" from rtx to
8767 rtx_insn *, adding a safe_as_a cast.
8768 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8770 (add_insn_after): Likewise for first two params.
8771 (add_insn_before): Likewise.
8772 (remove_insn): Likewise for param.
8773 (emit_pattern_before_noloc): Likewise for second and third params.
8774 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8775 (emit_call_insn_before_noloc): Likewise.
8776 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8778 (emit_barrier_before): Likewise.
8779 (emit_label_before): Strengthen "label" param from "rtx" to
8780 "rtx_code_label *". Strengthen "before" param from "rtx" to
8782 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8784 (emit_pattern_after_noloc): Likewise.
8785 (emit_insn_after_noloc): Likewise.
8786 (emit_jump_insn_after_noloc): Likewise.
8787 (emit_call_insn_after_noloc): Likewise.
8788 (emit_debug_insn_after_noloc): Likewise.
8789 (emit_barrier_after): Likewise.
8790 (emit_label_after): Likewise for both params.
8791 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8792 "loc" param from "int" to "location_t".
8793 (emit_insn_after_setloc): Likewise.
8794 (emit_jump_insn_after_setloc): Likewise.
8795 (emit_call_insn_after_setloc): Likewise.
8796 (emit_debug_insn_after_setloc): Likewise.
8797 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8798 "loc" param from "int" to "location_t".
8799 (emit_pattern_before): Convert NULL_RTX to NULL.
8800 (emit_insn_before_setloc): Convert "loc" param from "int" to
8802 (emit_jump_insn_before_setloc): Likewise.
8803 (emit_call_insn_before_setloc): Likewise.
8804 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8805 rtx_insn *. Convert "loc" param from "int" to "location_t".
8806 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8807 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8808 Convert 3rd param from "int" to "location_t".
8809 (emit_barrier_before, emit_barrier_after, next_real_insn):
8810 Strengthen param from rtx to rtx_insn *.
8811 (emit_label_before): Strengthen 1st param from "rtx" to
8812 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8814 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8815 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8816 Strengthen 2nd param from "rtx" to "rtx_insn *".
8817 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8818 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8819 Likewise. Convert 3rd param from "int" to "location_t".
8820 (emit_label_after): Strengthen 1st param from "rtx" to
8822 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8824 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8825 from "rtx" to "rtx_insn *".
8827 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8829 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8830 bodies streamed in with -Q.
8831 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8832 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8833 * gimple-streamer-out.c: Include gimple-pretty-print.h
8834 (output_bb): Dump stmts streamed.
8835 * lto-section-out.c: Include print-tree.h
8836 (lto_begin_section): Dump sections created.
8837 (lto_output_decl_index): Dump decl encoded.
8838 * lto-streamer-out.c: Include print-tree.h
8839 (create_output_block): Dump output block created.
8840 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8841 (output_function): Dump function output.
8842 (output_constructor): Dump constructor streamed.
8843 (write_global_stream): Output indexes encoded.
8844 (produce_asm_for_decls): Dump streams encoded.
8845 * lto-streamer.c (streamer_dump_file): New global var.
8846 * lto-streamer.h (streamer_dump_file): Declare.
8847 * passes.c (ipa_write_summaries): Initialize streamer dump.
8848 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8851 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8854 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8855 offsets for register save directives. Emit a second batch of save
8856 directives, if need be, when the function accesses prior frames.
8858 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8860 * config/arc/fpu.md (fmasf4): Force operand to register.
8861 (fnmasf4): Likewise.
8863 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8865 * config/arc/arc-protos.h (arc_pad_return): Remove.
8866 * config/arc/arc.c (machine_function): Remove force_short_suffix
8868 (arc_print_operand): Adjust printing of '&'.
8869 (arc_verify_short): Remove conditional printing of short suffix.
8870 (arc_final_prescan_insn): Remove reference to size_reason.
8871 (pad_return): New function.
8872 (arc_reorg): Call pad_return.
8873 (arc_pad_return): Remove.
8874 (arc_init_machine_status): Remove reference to force_short_suffix.
8875 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8876 (attr length): When attribute iscompact is true force to 2
8877 regardless; in the case of maybe check if we want to force the
8878 instruction to have 4 bytes length.
8879 (nopv): Change it to generate 4 byte long nop as well.
8880 (blockage): New pattern.
8881 (simple_return): Remove call to arc_pad_return.
8882 (p_return_i): Likewise.
8884 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8886 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8888 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8890 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8893 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8895 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8896 for ARC700 and ARCv2.
8898 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8901 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8902 operands[2] instead of operands[1].
8905 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8907 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8908 case, check whether the outer register overlaps an unallocatable
8909 register, not just whether it fits the required class.
8911 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8913 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8915 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8916 (memrefs_conflict_p): Likewise.
8917 (init_alias_analysis): Likewise.
8918 * cfgexpand.c (expand_debug_expr): Likewise.
8919 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8920 * cse.c (fold_rtx): Likewise.
8921 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8922 * expr.c (emit_block_move_hints): Likewise.
8923 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8924 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8925 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8926 (emit_group_store): Likewise.
8927 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8928 to read the PRE/POST_MODIFY increment.
8929 * calls.c (store_one_arg): Use strip_offset.
8930 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8932 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8934 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8935 (simplify_binary_operation_1): Extend CONST_INT handling to
8937 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8938 than a HOST_WIDE_INT.
8939 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8941 (adjust_mems, add_stores): Update accodingly.
8942 (vt_canonicalize_addr): Track polynomial offsets.
8943 (emit_note_insn_var_location): Likewise.
8944 (vt_add_function_parameter): Likewise.
8945 (vt_initialize): Likewise.
8947 2018-06-12 Jeff Law <law@redhat.com>
8949 * config.gcc (alpha*-*-freebsd*): Remove.
8950 * config/alpha/freebsd.h: Remove.
8952 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8955 * spellcheck-tree.c (levenshtein_distance): Rename to...
8956 (get_edit_distance): ...this, and update for underlying renaming.
8957 * spellcheck-tree.h (levenshtein_distance): Rename to...
8958 (get_edit_distance): ...this.
8959 * spellcheck.c (levenshtein_distance): Rename to...
8960 (get_edit_distance): ...this. Convert from Levenshtein distance
8961 to Damerau-Levenshtein distance by supporting transpositions of
8962 adjacent characters. Rename "v1" to "v_next" and "v0" to
8964 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8965 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8966 update for underlying renaming.
8967 (selftest::levenshtein_distance_unit_test): Rename to...
8968 (selftest::test_get_edit_distance_unit): ...this, and update for
8969 underlying renaming.
8970 (selftest::test_find_closest_string): Add example from PR 69968
8971 where transposition helps
8972 (selftest::test_metric_conditions): Update for renaming.
8973 (selftest::test_metric_conditions): Likewise.
8974 (selftest::spellcheck_c_tests): Likewise.
8975 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8976 (get_edit_distance): ...this.
8977 (best_match::consider): Update for renaming.
8979 2018-06-12 Martin Sebor <msebor@redhat.com>
8981 PR tree-optimization/85259
8982 * builtins.c (compute_objsize): Handle constant offsets.
8983 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8984 true iff a warning has been issued.
8985 * gimple.h (gimple_nonartificial_location): New function.
8986 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8987 gimple_nonartificial_location and handle -Wno-system-headers.
8988 (handle_builtin_stxncpy): Same.
8990 2018-06-12 Martin Sebor <msebor@redhat.com>
8993 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8995 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8997 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8998 BUILTIN_VEC_XST entries for pointer to double and long long.
9000 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9003 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9005 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9008 2018-06-12 Martin Liska <mliska@suse.cz>
9010 * doc/options.texi: Document IntegerRange.
9012 2018-06-12 Martin Liska <mliska@suse.cz>
9014 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9015 * opt-functions.awk: Handle Deprecated flag.
9016 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9018 (read_cmdline_option): Report warning for a deprecated option.
9019 * opts.h (struct cl_option): Add new field cl_deprecated.
9020 (CL_ERR_DEPRECATED): New.
9022 2018-06-12 Martin Liska <mliska@suse.cz>
9024 * doc/options.texi: Document Deprecated option flag.
9026 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9028 * config/arc/arc-arch.h (arc_extras): New enum.
9029 (arc_cpu_t):Add field extra.
9030 (arc_cpu_types): Consider the extras.
9031 * config/arc/arc-cpus.def: Add extras info.
9032 * config/arc/arc-opts.h (processor_type): Consider extra field.
9033 * config/arc/arc.c (arc_override_options): Handle extra field.
9035 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9037 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9038 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9040 * config/arc/arc.c (arc_init): Update pic warning.
9041 (irq_range): Update irq range parsing warnings.
9042 (arc_override_options): Update various warning messages.
9043 (arc_handle_aux_attribute): Likewise.
9045 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9047 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9049 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9051 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9052 compiler messages directives.
9054 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9056 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9057 * config/mips/mips-tables.opt: Regenerate.
9058 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9060 * doc/invoke.texi: Document -march=i6500.
9062 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9064 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9065 (i6400_gpmul): Add cpu_unit.
9066 (i6400_gpdiv): Likewise.
9067 (i6400_msa_add_d): Update reservations.
9068 (i6400_msa_int_add) Likewise.
9069 (i6400_msa_short_logic3) Likewise.
9070 (i6400_msa_short_logic2) Likewise.
9071 (i6400_msa_short_logic) Likewise.
9072 (i6400_msa_move) Likewise.
9073 (i6400_msa_cmp) Likewise.
9074 (i6400_msa_short_float2) Likewise.
9075 (i6400_msa_div_d) Likewise.
9076 (i6400_msa_long_logic1) Likewise.
9077 (i6400_msa_long_logic2) Likewise.
9078 (i6400_msa_mult) Likewise.
9079 (i6400_msa_long_float2) Likewise.
9080 (i6400_msa_long_float4) Likewise.
9081 (i6400_msa_long_float5) Likewise.
9082 (i6400_msa_long_float8) Likewise.
9083 (i6400_fpu_fadd): Include frint type.
9084 (i6400_fpu_store): New define_insn_reservation.
9085 (i6400_fpu_load): Likewise.
9086 (i6400_fpu_move): Likewise.
9087 (i6400_fpu_fcmp): Likewise.
9088 (i6400_fpu_fmadd): Likewise.
9089 (i6400_int_mult): Include imul3nc type and update reservation.
9090 (i6400_int_div): Include idiv3 type and update reservation.
9091 (i6400_int_load): Update to check type not move_type.
9092 (i6400_int_store): Likewise.
9093 (i6400_int_prefetch): Set zero latency.
9095 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9097 * gcc.c: Document new %@{...} sequence.
9098 (LINK_COMMAND_SPEC): Use it for the -L switches.
9099 (cpp_unique_options): Use it for the -I switches.
9100 (at_file_argbuf): New global variable.
9101 (in_at_file): Likewise.
9102 (alloc_args): Create at_file_argbuf.
9103 (clear_args): Truncate at_file_argbuf.
9104 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9105 (open_at_file): New function.
9106 (close_at_file): Likewise.
9107 (create_at_file): Delete.
9108 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9111 (validate_switches_from_spec): Deal with %@{...} sequence.
9112 (validate_switches): Likewise.
9113 (driver::finalize): Call clear_args.
9115 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9117 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9119 2018-06-11 Martin Sebor <msebor@redhat.com>
9121 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9122 (Wno-class-memaccess): Add @opindex.
9123 (Wno-templates, Wno-multiple-inheritance): Same.
9124 (Wno-virtual-inheritance, Wno-namespaces): Same.
9125 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9126 (Wno-format-overflow, Wno-format-truncation): Same.
9127 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9128 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9129 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9130 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9131 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9132 (Wno-misspelled-isr): Same.
9134 2018-06-11 Martin Sebor <msebor@redhat.com>
9136 * PR tree-optimization/86083
9137 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9139 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9141 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9143 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9146 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9147 on the correct operand.
9148 (*movdi_internal64): Ditto.
9150 2018-06-11 Martin Liska <mliska@suse.cz>
9152 PR tree-optimization/86089
9153 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9155 2018-06-11 Julia Koval <julia.koval@intel.com>
9157 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9158 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9159 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9161 2018-06-11 Olivier Hainque <hainque@adacore.com>
9163 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9164 for Ada with strict dwarf2.
9166 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9169 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9172 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9174 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9176 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9178 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9181 2018-06-08 Martin Liska <mliska@suse.cz>
9183 * tree-cfg.h (debug_function): Fix argument type to match
9186 2018-06-08 Martin Liska <mliska@suse.cz>
9188 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9189 Remove usage of MPX-related (and removed) fields.
9190 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9192 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9194 * cfg.c (debug): Use TDF_NONE rather than 0.
9195 * cfghooks.c (debug): Likewise.
9196 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9197 (struct dump_option_value_info): Convert to...
9198 (struct kv_pair): ...this template type.
9199 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9201 (optinfo_verbosity_options): Likewise.
9202 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9204 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9205 than int for "optgroup_flags" param.
9206 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9208 (dump_dec): Likewise.
9209 (dump_finish): Use TDF_NONE rather than 0.
9210 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9211 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9212 than 0. Update for change to option_ptr.
9213 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9214 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9215 0. Update for changes to optinfo_verbosity_options and
9217 (opt_info_switch_p): Convert optgroup_flags from int to
9219 (dump_basic_block): Use dump_flags_t rather than int
9220 for "dump_kind" param.
9221 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9222 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9223 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9224 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9225 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9226 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9227 TDF_NONE): Convert from macros to...
9228 (enum dump_flag): ...this new enum.
9229 (dump_flags_t): Update to use enum.
9230 (operator|, operator&, operator~, operator|=, operator&=):
9231 Implement for dump_flags_t.
9232 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9233 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9234 Convert from macros to...
9235 (enum optgroup_flag): ...this new enum.
9236 (optgroup_flags_t): New typedef.
9237 (operator|, operator|=): Implement for optgroup_flags_t.
9238 (struct dump_file_info): Convert field "alt_flags" to
9239 dump_flags_t. Convert field "optgroup_flags" to
9241 (dump_basic_block): Use dump_flags_t rather than int for param.
9242 (dump_generic_expr_loc): Likewise.
9243 (dump_dec): Likewise.
9244 (dump_register): Convert param "optgroup_flags" to
9246 (opt_info_enable_passes): Likewise.
9247 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9249 * gimple-pretty-print.c (debug): Likewise.
9250 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9251 (merged_store_group::apply_stores): Likewise.
9252 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9253 * gimple.c (verify_gimple_pp): Likewise.
9254 * graphite-poly.c (print_pbb_body): Likewise.
9255 * passes.c (pass_manager::register_one_dump_file): Convert
9256 local "optgroup_flags" to optgroup_flags_t.
9257 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9259 (debug_body): Likewise.
9260 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9261 to optgroup_flags_t.
9262 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9264 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9265 (convert_mult_to_fma): Likewise.
9266 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9267 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9268 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9269 "dump_kind" to dump_flags_t.
9271 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9273 * config/rs6000/rs6000.c (min, max): Delete.
9275 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9277 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9278 -mabi=spe and -mabi=no-spe.
9280 2018-06-08 Martin Liska <mliska@suse.cz>
9282 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9283 where we expect an existing summary.
9285 2018-06-08 Martin Liska <mliska@suse.cz>
9287 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9288 * ipa-inline.h (estimate_edge_growth): Likewise.
9290 2018-06-08 Martin Liska <mliska@suse.cz>
9292 * cgraph.c (function_version_hasher::hash): Use
9293 cgraph_node::get_uid ().
9294 (function_version_hasher::equal):
9295 * cgraph.h (cgraph_node::get_uid): New method.
9296 * ipa-inline.c (update_caller_keys): Use
9297 cgraph_node::get_uid ().
9298 (update_callee_keys): Likewise.
9299 * ipa-utils.c (searchc): Likewise.
9300 (ipa_reduced_postorder): Likewise.
9301 * lto-cgraph.c (input_node): Likewise.
9302 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9303 * symbol-summary.h (symtab_insertion): Likewise.
9304 (symtab_removal): Likewise.
9305 (symtab_duplication): Likewise.
9306 * tree-pretty-print.c (dump_function_header): Likewise.
9307 * tree-sra.c (convert_callers_for_node): Likewise.
9309 2018-06-08 Martin Liska <mliska@suse.cz>
9311 * cgraph.c (symbol_table::create_edge): Always assign a new
9313 (symbol_table::free_edge): Do not recycle numbers.
9314 * cgraph.h (cgraph_edge::get): New method.
9315 * symbol-summary.h (symtab_removal): Use it.
9316 (symtab_duplication): Likewise.
9317 (call_summary::hashable_uid): Remove.
9319 2018-06-08 Martin Liska <mliska@suse.cz>
9321 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9322 (initialize_growth_caches): Remove.
9323 (free_growth_caches): Likewise.
9324 (do_estimate_edge_time): Use edge_growth_cache.
9325 (do_estimate_edge_size): Likewise.
9326 (do_estimate_edge_hints): Likewise.
9327 * ipa-inline.c (reset_edge_caches): Likewise.
9328 (recursive_inlining): Likewise.
9329 (inline_small_functions): Likewise.
9330 * ipa-inline.h (initialize_growth_caches): Remove.
9331 (estimate_edge_size): Likewise.
9332 (estimate_edge_time): Likewise.
9333 (estimate_edge_hints): Likewise.
9334 (reset_edge_growth_cache): Likewise.
9335 * symbol-summary.h (call_summary::remove): New method.
9337 2018-06-08 Martin Liska <mliska@suse.cz>
9339 * ipa-cp.c (class edge_clone_summary): New summary.
9340 (grow_edge_clone_vectors): Remove.
9341 (ipcp_edge_duplication_hook): Remove.
9342 (class edge_clone_summary_t): New call_summary class.
9343 (ipcp_edge_removal_hook): Remove.
9344 (edge_clone_summary_t::duplicate): New function.
9345 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9346 (create_specialized_node): Likewise.
9347 (ipcp_driver): Initialize edge_clone_summaries and do not
9350 2018-06-08 Martin Liska <mliska@suse.cz>
9352 * symbol-summary.h (get): New function.
9353 (call_summary::m_initialize_when_cloning): New class member.
9355 2018-06-08 Martin Liska <mliska@suse.cz>
9357 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9358 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9359 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9360 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9361 (remove_cgraph_node_from_order): Use the removed_nodes set.
9362 (do_per_function_toporder): Likwise.
9363 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9364 instead of summary_uid.
9365 (symtab_removal): Likewise.
9366 (symtab_duplication): Likewise.
9368 2018-06-08 Martin Liska <mliska@suse.cz>
9370 * ipa-cp.c (ipcp_store_bits_results): Use
9371 ipcp_transformation_sum.
9372 (ipcp_store_vr_results): Likewise.
9373 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9375 (ipcp_transformation_initialize): ... this.
9376 (ipa_set_node_agg_value_chain):
9377 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9378 (write_ipcp_transformation_info): Likewise.
9379 (read_ipcp_transformation_info): Likewise.
9380 (ipcp_update_bits): Likewise.
9381 (ipcp_update_vr): Likewise.
9382 (ipcp_transform_function): Likewise.
9383 * ipa-prop.h: Rename ipcp_transformation_summary to
9384 ipcp_transformation.
9385 (class ipcp_transformation_t): New function summary.
9386 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9387 (ipa_get_agg_replacements_for_node): Likewise.
9389 2018-06-08 Martin Liska <mliska@suse.cz>
9391 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9393 (class funct_state_summary_t): New function_summary class.
9394 (has_function_state): Remove.
9395 (get_function_state): Likewise.
9396 (set_function_state): Likewise.
9397 (add_new_function): Likewise.
9398 (funct_state_summary_t::insert): New function.
9399 (duplicate_node_data): Remove.
9400 (remove_node_data): Remove.
9401 (funct_state_summary_t::duplicate): New function.
9402 (register_hooks): Create new funct_state_summaries.
9403 (pure_const_generate_summary): Use it.
9404 (pure_const_write_summary): Likewise.
9405 (pure_const_read_summary): Likewise.
9406 (propagate_pure_const): Likewise.
9407 (propagate_nothrow): Likewise.
9408 (dump_malloc_lattice): Likewise.
9409 (propagate_malloc): Likewise.
9410 (execute): Do not register hooks, just remove summary
9412 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9415 2018-06-08 Martin Liska <mliska@suse.cz>
9417 * ipa-reference.c (remove_node_data): Remove.
9418 (duplicate_node_data): Likewise.
9419 (class ipa_ref_var_info_summary_t): New class.
9420 (class ipa_ref_opt_summary_t): Likewise.
9421 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9422 (get_reference_optimization_summary): Use
9423 ipa_ref_opt_sum_summaries.
9424 (set_reference_vars_info): Remove.
9425 (set_reference_optimization_summary): Likewise.
9426 (ipa_init): Create summaries.
9427 (init_function_info): Use function summary.
9428 (ipa_ref_opt_summary_t::duplicate): New function.
9429 (ipa_ref_opt_summary_t::remove): New function.
9430 (get_read_write_all_from_node): Fix GNU coding style.
9431 (propagate): Use function summary.
9432 (write_node_summary_p): Fix GNU coding style.
9433 (stream_out_bitmap): Likewise.
9434 (ipa_reference_read_optimization_summary): Use function summary.
9435 (ipa_reference_c_finalize): Do not release hooks.
9437 2018-06-08 Martin Liska <mliska@suse.cz>
9439 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9440 (analyze_function_body): Extract multiple calls of get_create.
9441 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9442 * ipa-inline.c (recursive_inlining): Use ::get method.
9443 * ipa-inline.h (estimate_edge_growth): Likewise.
9445 2018-06-08 Martin Liska <mliska@suse.cz>
9447 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9449 (hsa_function_summary::hsa_function_summary): Use the new enum
9451 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9452 * hsa-gen.c (hsa_get_host_function): Likewise.
9453 (get_brig_function_name): Likewise.
9454 * ipa-hsa.c (process_hsa_functions): Likewise.
9455 (ipa_hsa_write_summary): Likewise.
9456 * symbol-summary.h (symtab_duplication): Use ::get function/
9457 (get): New function.
9459 2018-06-08 Martin Liska <mliska@suse.cz>
9461 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9463 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9464 (hsa_register_kernel): Likewise.
9465 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9466 * hsa-gen.c (hsa_get_host_function): Likewise.
9467 (get_brig_function_name): Likewise.
9468 (generate_hsa): Likewise.
9469 (pass_gen_hsail::execute): Likewise.
9470 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9471 (devirtualization_time_bonus): Likewise.
9472 (ipcp_propagate_stage): Likewise.
9473 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9474 (edge_set_predicate): Likewise.
9475 (evaluate_conditions_for_known_args): Likewise.
9476 (evaluate_properties_for_edge): Likewise.
9477 (ipa_fn_summary::reset): Likewise.
9478 (ipa_fn_summary_t::duplicate): Likewise.
9479 (dump_ipa_call_summary): Likewise.
9480 (ipa_dump_fn_summary): Likewise.
9481 (analyze_function_body): Likewise.
9482 (compute_fn_summary): Likewise.
9483 (estimate_edge_devirt_benefit): Likewise.
9484 (estimate_edge_size_and_time): Likewise.
9485 (estimate_calls_size_and_time): Likewise.
9486 (estimate_node_size_and_time): Likewise.
9487 (inline_update_callee_summaries): Likewise.
9488 (remap_edge_change_prob): Likewise.
9489 (remap_edge_summaries): Likewise.
9490 (ipa_merge_fn_summary_after_inlining): Likewise.
9491 (ipa_update_overall_fn_summary): Likewise.
9492 (read_ipa_call_summary): Likewise.
9493 (inline_read_section): Likewise.
9494 (write_ipa_call_summary): Likewise.
9495 (ipa_fn_summary_write): Likewise.
9496 (ipa_free_fn_summary): Likewise.
9497 * ipa-hsa.c (process_hsa_functions): Likewise.
9498 (ipa_hsa_write_summary): Likewise.
9499 (ipa_hsa_read_section): Likewise.
9500 * ipa-icf.c (sem_function::merge): Likewise.
9501 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9502 (do_estimate_edge_time): Likewise.
9503 (estimate_size_after_inlining): Likewise.
9504 (estimate_growth): Likewise.
9505 (growth_likely_positive): Likewise.
9506 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9507 (inline_call): Likewise.
9508 * ipa-inline.c (caller_growth_limits): Likewise.
9509 (can_inline_edge_p): Likewise.
9510 (can_inline_edge_by_limits_p): Likewise.
9511 (compute_uninlined_call_time): Likewise.
9512 (compute_inlined_call_time): Likewise.
9513 (want_inline_small_function_p): Likewise.
9514 (edge_badness): Likewise.
9515 (update_caller_keys): Likewise.
9516 (update_callee_keys): Likewise.
9517 (recursive_inlining): Likewise.
9518 (inline_small_functions): Likewise.
9519 (inline_to_all_callers_1): Likewise.
9520 (dump_overall_stats): Likewise.
9521 (early_inline_small_functions): Likewise.
9522 (early_inliner): Likewise.
9523 * ipa-inline.h (estimate_edge_growth): Likewise.
9524 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9525 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9526 * ipa-prop.h (IPA_NODE_REF): Likewise.
9527 (IPA_EDGE_REF): Likewise.
9528 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9529 (propagate_malloc): Likewise.
9530 * ipa-split.c (execute_split_functions): Likewise.
9531 * symbol-summary.h: Rename get to get_create.
9533 (get_create): Likewise.
9534 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9536 2018-06-08 Martin Liska <mliska@suse.cz>
9538 * symbol-summary.h (release): Move definition out of class
9540 (symtab_removal): Likewise.
9541 (symtab_duplication): Likewise.
9543 2018-06-08 Martin Liska <mliska@suse.cz>
9545 * symbol-summary.h (function_summary): Move constructor
9546 implementation out of class declaration.
9547 (release): Likewise.
9548 (symtab_insertion): Likewise.
9549 (symtab_removal): Likewise.
9550 (symtab_duplication): Likewise.
9553 2018-06-08 Martin Liska <mliska@suse.cz>
9555 * Makefile.in: Remove support for MPX (macros, related functions,
9556 fields in cgraph_node, ...).
9557 * builtin-types.def (BT_BND): Likewise.
9558 (BT_FN_BND_CONST_PTR): Likewise.
9559 (BT_FN_CONST_PTR_BND): Likewise.
9560 (BT_FN_VOID_PTR_BND): Likewise.
9561 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9562 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9563 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9564 (expand_builtin_mempcpy_with_bounds): Likewise.
9565 (expand_builtin_memset_with_bounds): Likewise.
9566 (expand_builtin_memset_args): Likewise.
9567 (std_expand_builtin_va_start): Likewise.
9568 (expand_builtin): Likewise.
9569 (expand_builtin_with_bounds): Likewise.
9570 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9571 (DEF_LIB_BUILTIN_CHKP): Likewise.
9572 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9573 (DEF_CHKP_BUILTIN): Likewise.
9574 (BUILT_IN_MEMCPY): Likewise.
9575 (BUILT_IN_MEMMOVE): Likewise.
9576 (BUILT_IN_MEMPCPY): Likewise.
9577 (BUILT_IN_MEMSET): Likewise.
9578 (BUILT_IN_STPCPY): Likewise.
9579 (BUILT_IN_STRCAT): Likewise.
9580 (BUILT_IN_STRCHR): Likewise.
9581 (BUILT_IN_STRCPY): Likewise.
9582 (BUILT_IN_STRLEN): Likewise.
9583 (BUILT_IN_MEMCPY_CHK): Likewise.
9584 (BUILT_IN_MEMMOVE_CHK): Likewise.
9585 (BUILT_IN_MEMPCPY_CHK): Likewise.
9586 (BUILT_IN_MEMSET_CHK): Likewise.
9587 (BUILT_IN_STPCPY_CHK): Likewise.
9588 (BUILT_IN_STRCAT_CHK): Likewise.
9589 (BUILT_IN_STRCPY_CHK): Likewise.
9590 * calls.c (store_bounds): Likewise.
9591 (emit_call_1): Likewise.
9592 (special_function_p): Likewise.
9593 (maybe_warn_nonstring_arg): Likewise.
9594 (initialize_argument_information): Likewise.
9595 (finalize_must_preallocate): Likewise.
9596 (compute_argument_addresses): Likewise.
9597 (expand_call): Likewise.
9598 * cfgexpand.c (expand_call_stmt): Likewise.
9599 (expand_return): Likewise.
9600 (expand_gimple_stmt_1): Likewise.
9601 (pass_expand::execute): Likewise.
9602 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9603 (cgraph_node::remove): Likewise.
9604 (cgraph_node::dump): Likewise.
9605 (cgraph_node::verify_node): Likewise.
9606 * cgraph.h (chkp_function_instrumented_p): Likewise.
9607 (symtab_node::get_alias_target): Likewise.
9608 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9609 (cgraph_local_p): Likewise.
9610 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9611 (cgraph_edge::rebuild_references): Likewise.
9612 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9613 (walk_polymorphic_call_targets): Likewise.
9614 (cgraph_node::expand_thunk): Likewise.
9615 (symbol_table::output_weakrefs): Likewise.
9616 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9617 (ix86_handle_option): Likewise.
9618 * config/i386/constraints.md: Likewise.
9619 * config/i386/i386-builtin-types.def (BND): Likewise.
9623 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9624 (BDESC_FIRST): Likewise.
9626 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9627 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9628 * config/i386/i386.c (enum reg_class): Likewise.
9629 (ix86_target_string): Likewise.
9630 (ix86_option_override_internal): Likewise.
9631 (ix86_conditional_register_usage): Likewise.
9632 (ix86_valid_target_attribute_inner_p): Likewise.
9633 (ix86_set_indirect_branch_type): Likewise.
9634 (ix86_set_current_function): Likewise.
9635 (ix86_function_arg_regno_p): Likewise.
9636 (init_cumulative_args): Likewise.
9637 (ix86_function_arg_advance): Likewise.
9638 (ix86_function_arg): Likewise.
9639 (ix86_pass_by_reference): Likewise.
9640 (ix86_function_value_regno_p): Likewise.
9641 (ix86_function_value_1): Likewise.
9642 (ix86_function_value_bounds): Likewise.
9643 (ix86_return_in_memory): Likewise.
9644 (ix86_setup_incoming_vararg_bounds): Likewise.
9645 (ix86_va_start): Likewise.
9646 (indirect_thunk_need_prefix): Likewise.
9647 (print_reg): Likewise.
9648 (ix86_print_operand): Likewise.
9649 (ix86_expand_call): Likewise.
9650 (ix86_output_function_return): Likewise.
9651 (reg_encoded_number): Likewise.
9652 (BDESC_VERIFYS): Likewise.
9653 (ix86_init_mpx_builtins): Likewise.
9654 (ix86_init_builtins): Likewise.
9655 (ix86_emit_cmove): Likewise.
9656 (ix86_emit_move_max): Likewise.
9657 (ix86_expand_builtin): Likewise.
9658 (ix86_builtin_mpx_function): Likewise.
9659 (ix86_get_arg_address_for_bt): Likewise.
9660 (ix86_load_bounds): Likewise.
9661 (ix86_store_bounds): Likewise.
9662 (ix86_load_returned_bounds): Likewise.
9663 (ix86_store_returned_bounds): Likewise.
9664 (ix86_class_likely_spilled_p): Likewise.
9665 (ix86_hard_regno_mode_ok): Likewise.
9666 (x86_order_regs_for_local_alloc): Likewise.
9667 (ix86_mitigate_rop): Likewise.
9668 (ix86_bnd_prefixed_insn_p): Likewise.
9669 (ix86_mpx_bound_mode): Likewise.
9670 (ix86_make_bounds_constant): Likewise.
9671 (ix86_initialize_bounds): Likewise.
9672 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9673 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9674 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9675 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9676 (TARGET_CHKP_BOUND_MODE): Likewise.
9677 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9678 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9679 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9680 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9681 * config/i386/i386.h (TARGET_MPX): Likewise.
9682 (TARGET_MPX_P): Likewise.
9683 (VALID_BND_REG_MODE): Likewise.
9684 (FIRST_BND_REG): Likewise.
9685 (LAST_BND_REG): Likewise.
9686 (enum reg_class): Likewise.
9687 (BND_REG_P): Likewise.
9688 (BND_REGNO_P): Likewise.
9689 (BNDmode): Likewise.
9690 (ADJUST_INSN_LENGTH): Likewise.
9691 * config/i386/i386.md: Likewise.
9692 * config/i386/i386.opt: Likewise.
9693 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9694 (defined): Likewise.
9695 (LINK_MPX): Likewise.
9696 (MPX_SPEC): Likewise.
9697 (LIBMPX_SPEC): Likewise.
9698 (LIBMPXWRAPPERS_SPEC): Likewise.
9699 (CHKP_SPEC): Likewise.
9700 * config/i386/predicates.md: Likewise.
9701 * dbxout.c (dbxout_type): Likewise.
9702 * doc/extend.texi: Likewise.
9703 * doc/invoke.texi: Likewise.
9704 * doc/md.texi: Likewise.
9705 * doc/tm.texi: Likewise.
9706 * doc/tm.texi.in: Likewise.
9707 * dwarf2out.c (is_base_type): Likewise.
9708 (gen_formal_types_die): Likewise.
9709 (gen_subprogram_die): Likewise.
9710 (gen_type_die_with_usage): Likewise.
9711 (gen_decl_die): Likewise.
9712 (dwarf2out_late_global_decl): Likewise.
9713 * expr.c (expand_assignment): Likewise.
9714 (emit_storent_insn): Likewise.
9715 (store_expr_with_bounds): Likewise.
9716 (store_expr): Likewise.
9717 (expand_expr_real_1): Likewise.
9718 * expr.h (store_expr_with_bounds): Likewise.
9719 * function.c (use_register_for_decl): Likewise.
9720 (struct bounds_parm_data): Likewise.
9721 (assign_parms_augmented_arg_list): Likewise.
9722 (assign_parm_find_entry_rtl): Likewise.
9723 (assign_parm_is_stack_parm): Likewise.
9724 (assign_parm_load_bounds): Likewise.
9725 (assign_bounds): Likewise.
9726 (assign_parms): Likewise.
9727 (expand_function_start): Likewise.
9728 * gcc.c (CHKP_SPEC): Likewise.
9729 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9730 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9731 (wrestrict_dom_walker::check_call): Likewise.
9732 * gimple.c (gimple_build_call_from_tree): Likewise.
9733 * gimple.h (enum gf_mask): Likewise.
9734 (gimple_call_with_bounds_p): Likewise.
9735 (gimple_call_set_with_bounds): Likewise.
9736 * gimplify.c (gimplify_init_constructor): Likewise.
9737 * ipa-cp.c (initialize_node_lattices): Likewise.
9738 (propagate_constants_across_call): Likewise.
9739 (find_more_scalar_values_for_callers_subset): Likewise.
9740 * ipa-hsa.c (process_hsa_functions): Likewise.
9741 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9742 * ipa-icf.c (sem_function::merge): Likewise.
9743 * ipa-inline.c (early_inliner): Likewise.
9744 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9745 (warn_function_cold): Likewise.
9746 (propagate_pure_const): Likewise.
9747 * ipa-ref.h (enum GTY): Likewise.
9748 * ipa-split.c (find_retbnd): Likewise.
9749 (consider_split): Likewise.
9750 (split_function): Likewise.
9751 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9752 * ipa.c (walk_polymorphic_call_targets): Likewise.
9753 (symbol_table::remove_unreachable_nodes): Likewise.
9754 (process_references): Likewise.
9755 (cgraph_build_static_cdtor_1): Likewise.
9756 * lto-cgraph.c (lto_output_node): Likewise.
9757 (output_refs): Likewise.
9758 (compute_ltrans_boundary): Likewise.
9759 (input_overwrite_node): Likewise.
9760 (input_node): Likewise.
9761 (input_cgraph_1): Likewise.
9762 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9763 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9764 (class pass_chkp_instrumentation_passes): Likewise.
9765 (make_pass_chkp_instrumentation_passes): Likewise.
9766 * passes.def: Likewise.
9767 * rtl.h (struct GTY): Likewise.
9768 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9769 * stor-layout.c (layout_type): Likewise.
9770 * symtab.c: Likewise.
9771 * target.def: Likewise.
9772 * targhooks.c (default_chkp_bound_type): Likewise.
9773 (default_chkp_bound_mode): Likewise.
9774 (default_builtin_chkp_function): Likewise.
9775 (default_chkp_function_value_bounds): Likewise.
9776 (default_chkp_make_bounds_constant): Likewise.
9777 (default_chkp_initialize_bounds): Likewise.
9778 * targhooks.h (default_chkp_bound_type): Likewise.
9779 (default_chkp_bound_mode): Likewise.
9780 (default_builtin_chkp_function): Likewise.
9781 (default_chkp_function_value_bounds): Likewise.
9782 (default_chkp_make_bounds_constant): Likewise.
9783 (default_chkp_initialize_bounds): Likewise.
9784 * toplev.c (compile_file): Likewise.
9785 (process_options): Likewise.
9786 * tree-core.h (DEF_BUILTIN): Likewise.
9787 (DEF_BUILTIN_CHKP): Likewise.
9788 * tree-inline.c (declare_return_variable): Likewise.
9789 (remap_gimple_stmt): Likewise.
9790 (copy_bb): Likewise.
9791 (initialize_inlined_parameters): Likewise.
9792 (expand_call_inline): Likewise.
9793 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9794 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9795 (make_pass_ipa_chkp_produce_thunks): Likewise.
9796 (make_pass_chkp): Likewise.
9797 (make_pass_chkp_opt): Likewise.
9798 (make_pass_chkp_instrumentation_passes): Likewise.
9799 * tree-pretty-print.c (dump_generic_node): Likewise.
9800 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9801 * tree-ssa-dce.c (propagate_necessity): Likewise.
9802 (eliminate_unnecessary_stmts): Likewise.
9803 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9804 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9805 * tree-ssa-sccvn.h: Likewise.
9806 * tree-ssa-strlen.c (get_string_length): Likewise.
9807 (valid_builtin_call): Likewise.
9808 (adjust_last_stmt): Likewise.
9809 (handle_builtin_strchr): Likewise.
9810 (handle_builtin_strcpy): Likewise.
9811 (handle_builtin_stxncpy): Likewise.
9812 (handle_builtin_memcpy): Likewise.
9813 (handle_builtin_strcat): Likewise.
9814 (strlen_check_and_optimize_stmt): Likewise.
9815 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9816 * tree-streamer-in.c: Likewise.
9817 * tree-streamer.c (record_common_node): Likewise.
9818 * tree.c (tree_code_size): Likewise.
9819 (wide_int_to_tree_1): Likewise.
9820 (type_contains_placeholder_1): Likewise.
9821 (build_common_tree_nodes): Likewise.
9822 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9823 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9824 (POINTER_BOUNDS_P): Likewise.
9825 (BOUNDED_TYPE_P): Likewise.
9826 (BOUNDED_P): Likewise.
9827 (CALL_WITH_BOUNDS_P): Likewise.
9828 (pointer_bounds_type_node): Likewise.
9829 * value-prof.c (gimple_ic): Likewise.
9830 * var-tracking.c (vt_add_function_parameters): Likewise.
9831 * varasm.c (make_decl_rtl): Likewise.
9832 (assemble_start_function): Likewise.
9833 (output_constant): Likewise.
9834 (maybe_assemble_visibility): Likewise.
9835 * varpool.c (ctor_for_folding): Likewise.
9836 * chkp-builtins.def: Remove.
9837 * ipa-chkp.c: Remove.
9838 * ipa-chkp.h: Remove.
9839 * rtl-chkp.c: Remove.
9840 * rtl-chkp.h: Remove.
9841 * tree-chkp-opt.c: Remove.
9842 * tree-chkp.c: Remove.
9843 * tree-chkp.h: Remove.
9845 2018-06-07 Carl Love <cel@us.ibm.com>
9847 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9848 vextract_fp_from_shortl): Add BE support.
9850 2018-06-07 Paul Koning <ni1d@arrl.net>
9852 * compare-elim.c (try_merge_compare): Don't merge compare if
9853 address contains a side effect.
9854 (try_eliminate_compare): Likewise.
9856 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9858 * config.gcc: Support "tremont".
9859 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9860 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9862 * config/i386/i386.c (m_TREMONT): Define.
9863 (processor_target_table): Add "tremont".
9864 (PTA_TREMONT): Define.
9865 (ix86_lea_outperforms): Add TARGET_TREMONT.
9866 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9867 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9868 and M_INTEL_GOLDMONT_PLUS.
9869 (fold_builtin_cpu): Add "tremont".
9870 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9871 (ix86_option_override_internal): Add "tremont".
9872 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9873 (processor_type): Add PROCESSOR_TREMONT.
9874 * config/i386/x86-tune.def: Add m_TREMONT.
9875 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9877 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9879 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9880 symbol defined for msp430i* devices to be lower case.
9882 2018-06-07 Richard Biener <rguenther@suse.de>
9884 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9885 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9886 Properly wrap signed arithmetic if overflow wraps.
9888 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9890 PR tree-optimization/69615
9891 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9892 of a cast from a same precision integral SSA_NAME in a bb dominated
9893 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9894 cast to utype if rhs2 has already a compatible type.
9896 2018-06-07 Richard Biener <rguenther@suse.de>
9898 PR tree-optimization/85935
9899 * graphite-scop-detection.c (find_params_in_bb): Analyze
9900 condition operands with respect to the correct loop. Assert
9901 the analysis doesn't fail.
9903 2018-06-04 Carl Love <cel@us.ibm.com>
9905 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9906 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9907 as it is slightly cheaper.
9908 (first_match_or_eos_index_<mode>):
9909 Calculate index using natural element order.
9910 (first_match_index_<mode>):
9911 Calculate index using natural element order.
9912 (first_match_or_eos_index_<mode>):
9913 Calculate index using natural order.
9914 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9915 for BE and LE modes.
9916 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9917 P9V_BUILTIN_VCLZLSBB_V16QI.
9918 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9921 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9923 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9924 indentation and line wrap for many prototypes. Add missing
9925 @smallexample directives around block of prototypes for vec_xl and
9928 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9930 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9931 track if we pass or return IEEE 128-bit floating point.
9932 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9933 C++ mangling that is compatible with GCC 8.1.
9934 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9935 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9936 floating point types.
9937 (rs6000_function_arg_advance_1): Likewise.
9938 (rs6000_mangle_type): Optionally generate mangled names that match
9939 what GCC 8.1 generated for IEEE 128-bit floating point types.
9940 (rs6000_globalize_decl_name): If we have an external function that
9941 passes or returns IEEE 128-bit types, generate a weak reference
9942 from the mangled name used in GCC 8.1 to the current mangled
9944 (rs6000_init_builtins): Make __ibm128 use the long double type if
9945 long double is IBM extended double. Make __float128 use the long
9946 double type if long double is IEEE 128-bit.
9949 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9950 macro for __ibm128 built-in functions.
9951 (PACK_IF): Add __ibm128 pack/unpack functions.
9952 (UNPACK_IF): Likewise.
9953 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9954 enable long double built-in functions if long double is IEEE
9955 128-bit floating point.
9956 (rs6000_invalid_builtin): Update long double built-in function
9958 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9959 functions, adjust the built-in function to use the long double
9960 built-in function if __ibm128 and long double are the same type.
9961 * doc/extend.texi (PowerPC builtins): Update documention for
9962 __builtin_{,un}pack_longdouble. Add documentation for
9963 __builtin_{,un}pack_ibm128.
9965 2018-06-06 Jim Wilson <jimw@sifive.com>
9967 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9968 (struct machine_function): New field interrupt_mode.
9969 (riscv_handle_type_attribute): New function. Add forward declaration.
9970 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9971 (riscv_expand_epilogue): Check interrupt_mode field.
9972 (riscv_set_current_function): Check interrupt attribute args and
9973 set interrupt_mode field.
9974 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9975 (riscv_sret, riscv_uret): New.
9976 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9977 new arguments to interrupt attribute.
9979 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9982 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9983 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9985 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9987 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9988 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9989 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9990 several redundant entries.
9992 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9994 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9995 type from "rtx" to "rtx_insn *".
9996 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9997 for local "call_insn", removing cast.
9998 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10000 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10002 PR tree-optimization/86066
10003 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10004 for BIT_INSERT_EXPR stores.
10006 2018-06-06 Richard Biener <rguenther@suse.de>
10008 PR tree-optimization/86062
10009 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10010 component refs ontop
10011 of to be offsetted base.
10013 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10015 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10016 to be static and remove check on interrupt attribute name.
10018 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10020 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10021 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10023 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10026 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10028 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10029 Remove second argument, change how error is called.
10030 (aarch64_layout_arg): Remove second argument from
10031 aarch64_err_no_fpadvsimd call.
10032 (aarch64_init_cumulative_args): Ditto.
10033 (aarch64_gimplify_va_arg_expr): Ditto.
10034 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10036 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10038 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10039 (*simple_return_indirect_internal<mode>): Rename from
10040 simple_return_indirect_internal. Use W mode iterator.
10041 (rstorssp): New expander.
10042 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10043 (clrssbsy): New expander.
10044 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10046 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10048 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10050 (cmse_check_pointed_object): Likewise.
10052 2018-06-05 Martin Liska <mliska@suse.cz>
10054 PR gcov-profile/47618
10055 * doc/invoke.texi: Document how -fprofile-dir format
10058 2018-06-05 Richard Biener <rguenther@suse.de>
10060 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10061 removal pretend DOM info isn't available so we do not update
10062 it and only remove edges, not dominated blocks. Actually free
10063 DOM info in case we removed something. Remove unreachable blocks.
10064 (mfb_keep_latches): Work with either DOM info or marked backedges.
10065 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10066 first. Mark backedges if DOM info isn't available.
10067 (Re-)compute DOM info after cleanup_control_flow_pre.
10069 2018-06-05 Richard Biener <rguenther@suse.de>
10071 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10072 (locus_discrim_hasher::hash): Adjust.
10073 (locus_discrim_hasher::equal): Likewise.
10074 (next_discriminator_for_locus): Work on line directly.
10075 (same_line_p): Pass in expanded locus1 as well.
10076 (assign_discriminators): Avoid redundant location expansions.
10078 2018-06-05 Richard Biener <rguenther@suse.de>
10080 PR tree-optimization/86046
10081 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10082 if required after clearing TREE_ADDRESSABLE.
10084 2018-06-05 Richard Biener <rguenther@suse.de>
10086 PR tree-optimization/86047
10087 * tree-ssa-loop.c (for_each_index): Glob handling of all
10088 decls and constants and really handle all of them.
10090 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10093 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10094 qualifier_void_pointer and qualifier_const_void_pointer.
10095 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10096 (arm_init_builtins): Handle the above.
10097 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10098 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10099 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10102 2018-06-05 Martin Liska <mliska@suse.cz>
10104 * auto-profile.c (read_autofdo_file): Do not use
10105 gcov_ctr_summary struct.
10106 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10107 * coverage.c (struct counts_entry): Likewise.
10108 (read_counts_file): Read just single summary entry.
10109 (get_coverage_counts): Use gcov_summary struct.
10110 * coverage.h (get_coverage_counts): Likewise.
10111 * gcov-dump.c (dump_working_sets): Likewise.
10112 (tag_summary): Dump just single summary.
10113 * gcov-io.c (gcov_write_summary): Write just histogram
10115 (gcov_read_summary): Read just single summary.
10116 (compute_working_sets): Use gcov_summary struct.
10117 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10118 of GCOV_COUNTERS_SUMMABLE.
10119 (GCOV_COUNTERS_SUMMABLE): Remove.
10120 (GCOV_FIRST_VALUE_COUNTER): Replace with
10121 GCOV_COUNTER_V_INTERVAL.
10122 (struct gcov_ctr_summary): Remove.
10123 (struct gcov_summary): Directly use fields of former
10125 (compute_working_sets): Use gcov_summary struct.
10126 * gcov.c (read_count_file): Do not use ctrs fields.
10127 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10129 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10131 * profile.c: Likewise.
10132 * profile.h: Likewise.
10134 2018-06-05 Martin Liska <mliska@suse.cz>
10136 PR gcov-profile/84846
10137 * gcov.c (output_lines): Print working directory only
10138 in intermediate format.
10140 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10142 * config/s390/s390-builtin-types.def: Add void function type.
10143 * config/s390/s390-builtins.def: Use the function type for the
10146 2018-06-04 Jim Wilson <jimw@sifive.com>
10148 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10150 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10151 and maybe_eh_return. Change regno to unsigned int. Use new args to
10152 handle EH_RETURN_DATA_REGNO registers properly.
10153 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10154 (riscv_expand_epilogue): Update comment. Change argument name and
10155 type. Update code to use new name and type. Pass new args to
10156 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10158 * config/riscv/riscv.md (NORMAL_RETURN): New.
10159 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10160 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10161 (eh_return): Call gen_eh_return_internal and emit barrier.
10162 (eh_return_internal): Call riscv_expand_epilogue.
10164 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10166 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10167 bit_insertion field and declare can_be_merged_into method.
10168 (merged_store_group::can_be_merged_into): New method.
10169 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10170 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10171 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10173 2018-06-04 Richard Biener <rguenther@suse.de>
10175 PR tree-optimization/85955
10176 * builtins.c (fold_builtin_sincos): Convert pointers to
10177 destination to appropriate type before dereferencing.
10179 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10181 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10183 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10185 * expr.c (expand_expr_real_1): Force the operand into memory if
10186 its TYPE_MODE is BLKmode and if there is no integer mode for
10187 the number of bits being extracted.
10189 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10193 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10194 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10196 2018-06-04 Richard Biener <rguenther@suse.de>
10198 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10199 (cleanup_tree_cfg_noloop): ... single caller. Do
10200 start_recording_case_labels later.
10202 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10204 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10205 to _IMMINTRIN_H_INCLUDED.
10206 * config/i386/pconfigintrin.h: Ditto.
10207 * config/i386/waitpkgintrin.h: Ditto.
10208 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10209 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10210 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10211 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10212 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10213 waitpkgintrin.h and cldemoteintrin.h.
10215 2018-06-04 Richard Biener <rguenther@suse.de>
10217 PR tree-optimization/86038
10218 * tracer.c (find_best_successor): Check probability for
10219 being initialized, bail out if not.
10221 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10224 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10225 of bits to ignore when comparing architectures.
10227 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10229 PR tree-optimization/69615
10230 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10231 maximum or minimum of the type, try to merge it also as if
10232 range1 is + [-, x - 1] or + [x + 1, -].
10235 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10237 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10239 PR tree-optimization/86034
10240 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10241 the unsigned bitfield type in a bit insertion sequence if it does not
10242 have a larger precision than the bitfield size.
10243 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10245 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10247 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10249 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10251 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10252 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10253 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10254 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10256 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10258 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10259 Disable -fdelete-null-pointer-checks for ELF toolchain.
10261 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10262 Kito Cheng <kito.cheng@gmail.com>
10264 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10265 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10266 (nds32*-*-*): Add glibc and uclibc conditions.
10267 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10268 (TARGET_EXCEPT_UNWIND_INFO): Define.
10269 * config/nds32/elf.h: New file.
10270 * config/nds32/linux.h: New file.
10271 * config/nds32/nds32-elf.opt: New file.
10272 * config/nds32/nds32-linux.opt: New file.
10273 * config/nds32/nds32-fp-as-gp.c
10274 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10275 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10277 (nds32_asm_file_end): Ditto.
10278 (nds32_print_operand): Ditto.
10279 (nds32_insert_attributes): Ditto.
10280 (nds32_init_libfuncs): New function.
10281 (TARGET_HAVE_TLS): Define.
10282 (TARGET_INIT_LIBFUNCS): Define.
10283 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10285 (TARGET_ELF): Apply different mcmodel setting.
10286 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10287 been migrated into elf.h and linux.h files.
10288 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10289 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10290 (mcmodel): The content has been migrated into nds32-elf.opt and
10291 nds32-linux.opt files.
10292 * config/nds32/t-elf: New file.
10293 * config/nds32/t-linux: New file.
10295 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10296 Shiva Chen <shiva0217@gmail.com>
10298 * config/nds32/constants.md (unspec_volatile_element): Add
10299 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10300 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10302 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10303 (make_pass_nds32_fp_as_gp): Declare.
10304 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10306 (nds32_asm_function_end_prologue): Remove unused asm output.
10307 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10308 (nds32_asm_file_start): Output necessary fp_as_gp information.
10309 (nds32_option_override): Adjust register usage.
10310 (nds32_expand_prologue): Consider fp_as_gp situation.
10311 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10312 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10315 (simple_return): Ditto.
10316 (omit_fp_begin): Output special directive for fp_as_gp.
10317 (omit_fp_end): Output special directive for fp_as_gp.
10318 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10319 mforbid-fp-as-gp): New options.
10321 2018-06-01 Mark Wielaard <mark@klomp.org>
10323 * dwarf2out.c (dwarf2out_finish): Remove generation of
10324 DW_AT_loclists_base.
10326 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10328 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10329 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10330 (struct merged_store_group): Add bit_insertion field.
10331 (dump_char_array): Use standard hexadecimal format.
10332 (merged_store_group::merged_store_group): Set bit_insertion to false.
10333 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10334 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10335 also print the mask in the dump file.
10336 (pass_store_merging::gate): Minor tweak.
10337 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10338 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10339 stores with INTEGER_CST stores.
10340 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10341 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10342 and use it throughout. Generate bit insertion sequences if need be.
10343 (pass_store_merging::process_store): Remove redundant condition.
10344 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10346 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10348 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10349 the 128-bit floating point types. Fix function comment.
10351 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10353 * config/aarch64/aarch64-simd.md
10354 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10356 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10359 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10361 PR tree-optimization/85989
10362 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10364 (backprop::intersect_uses): Check it when deciding whether this
10365 is a backedge reference.
10366 (backprop::process_block): Add each phi to m_visited_phis
10367 after visiting it, then clear it at the end.
10369 2018-06-01 Richard Biener <rguenther@suse.de>
10371 * tree-vectorizer.h (vect_dr_stmt): New function.
10372 (vect_get_load_cost): Adjust.
10373 (vect_get_store_cost): Likewise.
10374 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10375 Use vect_dr_stmt instead of DR_SMTT.
10376 (vect_record_base_alignments): Likewise.
10377 (vect_calculate_target_alignment): Likewise.
10378 (vect_compute_data_ref_alignment): Likewise and make static.
10379 (vect_update_misalignment_for_peel): Likewise.
10380 (vect_verify_datarefs_alignment): Likewise.
10381 (vector_alignment_reachable_p): Likewise.
10382 (vect_get_data_access_cost): Likewise. Pass down
10383 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10384 (vect_get_peeling_costs_all_drs): Likewise.
10385 (vect_peeling_hash_get_lowest_cost): Likewise.
10386 (vect_enhance_data_refs_alignment): Likewise.
10387 (vect_find_same_alignment_drs): Likewise.
10388 (vect_analyze_data_refs_alignment): Likewise.
10389 (vect_analyze_group_access_1): Likewise.
10390 (vect_analyze_group_access): Likewise.
10391 (vect_analyze_data_ref_access): Likewise.
10392 (vect_analyze_data_ref_accesses): Likewise.
10393 (vect_vfa_segment_size): Likewise.
10394 (vect_small_gap_p): Likewise.
10395 (vectorizable_with_step_bound_p): Likewise.
10396 (vect_prune_runtime_alias_test_list): Likewise.
10397 (vect_analyze_data_refs): Likewise.
10398 (vect_supportable_dr_alignment): Likewise.
10399 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10400 (vect_gen_prolog_loop_niters): Likewise.
10401 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10402 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10404 (vect_recog_mask_conversion_pattern): Likewise.
10405 (vect_try_gather_scatter_pattern): Likewise.
10406 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10407 to vect_get_store_cost.
10408 (vect_get_store_cost): Get stmt_info instead of DR.
10409 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10410 (vect_get_load_cost): Get stmt_info instead of DR.
10412 2018-06-01 Richard Biener <rguenther@suse.de>
10414 PR middle-end/86017
10415 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10416 vars wrapped in MEM_REFs.
10418 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10420 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10421 Fix subreg tests so that we only return a choice between
10422 GENERAL_REGS and FP_REGS if the original classes included both.
10424 2018-06-01 Richard Biener <rguenther@suse.de>
10427 * tree-ssa-structalias.c (get_function_part_constraint):
10428 Handle NULL fi->decl.
10429 (find_func_aliases_for_call): Properly handle indirect
10430 fi from direct call.
10431 (find_func_clobbers): Likewise.
10432 (ipa_pta_execute): Likewise.
10433 (create_variable_info_for): For functions that are ifunc_resolver
10434 resolve to a varinfo that contains the result of the resolver call.
10435 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10438 2018-05-31 Michael Collison <michael.collison@arm.com>
10440 * config/aarch64/aarch64.md:
10441 (*fix_to_zero_extenddfdi2): New pattern.
10442 * gcc.target/aarch64/fix_extend1.c: New testcase.
10444 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10446 PR middle-end/78809
10447 PR middle-end/83026
10448 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10449 and BUILT_IN_STRNCMP_EQ.
10450 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10451 BUILT_IN_STRNCMP_EQ.
10452 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10453 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10454 (gimple_fold_builtin): Likewise.
10455 * tree-ssa-strlen.c (compute_string_length): New function.
10456 (determine_min_obsize): New function.
10457 (handle_builtin_string_cmp): New function to handle calls to
10458 string compare functions.
10459 (strlen_optimize_stmt): Add handling to builtin string compare
10461 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10462 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10463 * tree.c (build_common_builtin_nodes): Add new defines of
10464 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10466 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10469 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10470 functions with naked attribute.
10472 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10474 * config/i386/sse.md (avx_vec_concat<mode>):
10475 Substitute concat_tg_mode mode attribute with xtg_mode.
10476 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10477 (concat_tg_mode): Remove mode attribute.
10479 2018-05-31 Martin Sebor <msebor@redhat.com>
10482 * calls.c (alloc_max_size): Correct a logic error/typo.
10483 Treat excessive arguments as infinite. Warn for invalid arguments.
10484 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10486 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10489 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10490 and movx for Haswell.
10492 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10493 Cesar Philippidis <cesar@codesourcery.com>
10495 PR middle-end/85879
10496 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10497 when emitting error on private/firstprivate reductions.
10498 * omp-low.c (lower_omp_target): Avoid reference-type processing
10499 on pointers for firstprivate clause.
10501 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10503 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10506 * config/aarch64/aarch64-simd.md
10507 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10508 (aarch64_ld1_x3_<mode>): Likewise
10509 (aarch64_st1x2<VALLDIF:mode>): Likewise
10510 (aarch64_st1_x2_<mode>): Likewise
10511 (aarch64_st1x3<VALLDIF:mode>): Likewise
10512 (aarch64_st1_x3_<mode>): Likewise
10513 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10514 (vld1_s8_x3): Likewise.
10515 (vld1_u16_x3): Likewise.
10516 (vld1_s16_x3): Likewise.
10517 (vld1_u32_x3): Likewise.
10518 (vld1_s32_x3): Likewise.
10519 (vld1_u64_x3): Likewise.
10520 (vld1_s64_x3): Likewise.
10521 (vld1_f16_x3): Likewise.
10522 (vld1_f32_x3): Likewise.
10523 (vld1_f64_x3): Likewise.
10524 (vld1_p8_x3): Likewise.
10525 (vld1_p16_x3): Likewise.
10526 (vld1_p64_x3): Likewise.
10527 (vld1q_u8_x3): Likewise.
10528 (vld1q_s8_x3): Likewise.
10529 (vld1q_u16_x3): Likewise.
10530 (vld1q_s16_x3): Likewise.
10531 (vld1q_u32_x3): Likewise.
10532 (vld1q_s32_x3): Likewise.
10533 (vld1q_u64_x3): Likewise.
10534 (vld1q_s64_x3): Likewise.
10535 (vld1q_f16_x3): Likewise.
10536 (vld1q_f32_x3): Likewise.
10537 (vld1q_f64_x3): Likewise.
10538 (vld1q_p8_x3): Likewise.
10539 (vld1q_p16_x3): Likewise.
10540 (vld1q_p64_x3): Likewise.
10541 (vst1_s64_x2): Likewise.
10542 (vst1_u64_x2): Likewise.
10543 (vst1_f64_x2): Likewise.
10544 (vst1_s8_x2): Likewise.
10545 (vst1_p8_x2): Likewise.
10546 (vst1_s16_x2): Likewise.
10547 (vst1_p16_x2): Likewise.
10548 (vst1_s32_x2): Likewise.
10549 (vst1_u8_x2): Likewise.
10550 (vst1_u16_x2): Likewise.
10551 (vst1_u32_x2): Likewise.
10552 (vst1_f16_x2): Likewise.
10553 (vst1_f32_x2): Likewise.
10554 (vst1_p64_x2): Likewise.
10555 (vst1q_s8_x2): Likewise.
10556 (vst1q_p8_x2): Likewise.
10557 (vst1q_s16_x2): Likewise.
10558 (vst1q_p16_x2): Likewise.
10559 (vst1q_s32_x2): Likewise.
10560 (vst1q_s64_x2): Likewise.
10561 (vst1q_u8_x2): Likewise.
10562 (vst1q_u16_x2): Likewise.
10563 (vst1q_u32_x2): Likewise.
10564 (vst1q_u64_x2): Likewise.
10565 (vst1q_f16_x2): Likewise.
10566 (vst1q_f32_x2): Likewise.
10567 (vst1q_f64_x2): Likewise.
10568 (vst1q_p64_x2): Likewise.
10569 (vst1_s64_x3): Likewise.
10570 (vst1_u64_x3): Likewise.
10571 (vst1_f64_x3): Likewise.
10572 (vst1_s8_x3): Likewise.
10573 (vst1_p8_x3): Likewise.
10574 (vst1_s16_x3): Likewise.
10575 (vst1_p16_x3): Likewise.
10576 (vst1_s32_x3): Likewise.
10577 (vst1_u8_x3): Likewise.
10578 (vst1_u16_x3): Likewise.
10579 (vst1_u32_x3): Likewise.
10580 (vst1_f16_x3): Likewise.
10581 (vst1_f32_x3): Likewise.
10582 (vst1_p64_x3): Likewise.
10583 (vst1q_s8_x3): Likewise.
10584 (vst1q_p8_x3): Likewise.
10585 (vst1q_s16_x3): Likewise.
10586 (vst1q_p16_x3): Likewise.
10587 (vst1q_s32_x3): Likewise.
10588 (vst1q_s64_x3): Likewise.
10589 (vst1q_u8_x3): Likewise.
10590 (vst1q_u16_x3): Likewise.
10591 (vst1q_u32_x3): Likewise.
10592 (vst1q_u64_x3): Likewise.
10593 (vst1q_f16_x3): Likewise.
10594 (vst1q_f32_x3): Likewise.
10595 (vst1q_f64_x3): Likewise.
10596 (vst1q_p64_x3): Likewise.
10598 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10600 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10601 user_label_prefix to name.
10603 * tree-core.h: Update comment about the format of NAME string
10604 passed to handler in attribute_spec.
10606 * config/msp430/msp430.md: Remove erroneous subreg expression from
10607 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10608 zero_extend{q,h}isi2.
10610 2018-05-30 Borislav Petkov <bp@suse.de>
10612 * doc/extend.texi: Document some architecture specific
10613 constraints and sort entries.
10615 2018-05-30 Martin Sebor <msebor@redhat.com>
10617 PR middle-end/85369
10618 * builtins.c (expand_builtin_stpcpy_1): New function.
10619 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10620 only if the former succeeds.
10622 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10624 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10627 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10629 * doc/invoke.texi (-flinker-output): Document
10631 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10633 * passes.c (ipa_write_summaries): Only modify statements if body
10635 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10636 incrementally linking.
10637 (ipa_passes): Likewise.
10638 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10639 pass down resolution info.
10640 * common.opt (flag_incremental_link): Update info.
10641 * gcc.c (plugin specs): Turn flinker-output=* to
10642 -plugin-opt=-linker-output-known
10643 * toplev.c (compile_file): Also cut compilation when doing incremental
10645 * flag-types. (enum lto_partition_model): Add
10646 LTO_LINKER_OUTPUT_NOLTOREL.
10647 (invoke.texi): Add -flinker-output docs.
10648 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10649 link same way as WPA; do not stream in dead initializers.
10651 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10652 darf2out_register_external_decl): Support incremental link.
10654 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10656 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10658 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10660 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10661 it down to simple_object_copy_lto_debug_sections.
10662 (run_gcc): Determine incremental LTO link time and configure
10663 lto1 into non-wpa mode, disable renaming of debug sections.
10665 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10667 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10668 descriptions of various incorrectly documented functions.
10670 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10673 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10674 address check not strict.
10676 2018-05-30 Richard Biener <rguenther@suse.de>
10678 PR tree-optimization/85964
10679 * tracer.c (better_p): Drop initialized count check, we only
10680 call the function with initialized counts now.
10681 (find_best_successor): Do find a best edge if one
10682 has uninitialized count.
10683 (find_best_predecessor): Likewise. Do BB frequency check only
10684 if count is initialized.
10686 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10688 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10689 (aarch64_ldrstr_offset_compare): New.
10690 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10691 load/store orderings.
10692 (aarch64_gen_adjusted_ldpstp): Likewise.
10694 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10696 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10697 Check for subset of GENERAL_REGS and FP_REGS.
10698 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10701 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10703 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10704 and wi::to_poly_offset. Add the current offset and then check
10705 whether the sum fits, rather than using an unchecked addition of
10706 a checked term. Check for a shwi rather than a uhwi.
10707 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10708 (store_constructor): Use poly_int_tree_p.
10709 (expand_expr_real_1): Likewise.
10710 * function.c (assign_temp): Likewise.
10711 * fold-const.c (const_binop): Use poly_int_tree_p and
10712 wi::to_poly_offset.
10713 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10715 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10716 to_poly_offset for MEM offsets.
10717 * ipa-icf.c (sem_variable::equals): Likewise.
10718 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10719 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10720 wi::to_poly_offset for BIT_FIELD_REF offsets.
10721 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10722 wi::to_poly_offset.
10723 * var-tracking.c (emit_note_insn_var_location): Use
10724 tree_to_poly_uint64.
10726 2018-05-29 Jim Wilson <jimw@sifive.com>
10728 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10730 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10733 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10734 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10736 (sse4_1_round<mode>2): Use nonimmediate_operand
10737 for operand 1 predicate.
10739 2018-05-29 Martin Sebor <msebor@redhat.com>
10740 Richard Biener <rguenther@suse.de>
10743 * calls.c (get_size_range): Call determine_value_range instead
10744 of get_value_range..
10745 * tree-vrp.h (determine_value_range): Declared new function.
10746 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10748 2018-05-29 Richard Biener <rguenther@suse.de>
10750 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10751 sure to use non-pattern stmts for get_earlier_stmt arguments.
10752 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10753 called on pattern stmts.
10754 (get_later_stmt): Likewise.
10756 2018-05-29 Martin Liska <mliska@suse.cz>
10758 PR gcov-profile/85759
10759 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10762 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10764 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10766 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10770 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10771 VEC_PACK_FLOAT_EXPR): New tree codes.
10772 * tree-pretty-print.c (op_code_prio): Handle
10773 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10774 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10775 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10776 * tree-inline.c (estimate_operator_cost): Likewise.
10777 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10778 * fold-const.c (const_binop): Likewise.
10779 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10780 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10781 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10782 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10783 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10784 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10785 * expr.c (expand_expr_real_2): Likewise.
10786 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10787 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10788 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10790 * optabs.c (expand_widen_pattern_expr): For
10791 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10792 sign from result type rather than operand's type.
10793 (expand_binop_directly): For vec_packu_float_optab and
10794 vec_packs_float_optab allow result type to be different from operand's
10796 * optabs-tree.c (optab_for_tree_code): Handle
10797 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10798 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10799 * tree-vect-generic.c (expand_vector_operations_1): Handle
10800 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10801 VEC_PACK_FLOAT_EXPR.
10802 * tree-vect-stmts.c (supportable_widening_operation): Handle
10804 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10805 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10806 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10807 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10808 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10810 (vec_pack<floatprefix>_float_<mode>): New expander.
10811 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10813 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10814 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10815 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10816 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10817 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10819 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10820 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10821 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10822 VEC_PACK_FLOAT_EXPR): Document.
10824 2018-05-29 Richard Biener <rguenther@suse.de>
10826 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10828 (stmt_vec_info_vec): Make pointer.
10829 (init_stmt_vec_info_vec): Remove.
10830 (free_stmt_vec_info_vec): Likewise.
10831 (set_stmt_vec_info_vec): New function.
10832 (free_stmt_vec_infos): Likewise.
10833 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10834 (set_vinfo_for_stmt): Likewise.
10835 (get_earlier_stmt): Likewise.
10836 (get_later_stmt): Likewise.
10837 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10838 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10839 (vec_info::~vec_info): Free stmt_vec_infos.
10840 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10841 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10842 (pass_slp_vectorize::execute): Likewise.
10843 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10844 (free_stmt_vec_info_vec): Likewise.
10845 (set_stmt_vec_info_vec): New function.
10846 (free_stmt_vec_infos): Likewise.
10847 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10848 the global stmt_vec_info_vec.
10849 * tree-parloops.c (gather_scalar_reductions): Use
10850 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10853 2018-05-29 Richard Biener <rguenther@suse.de>
10855 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10857 2018-05-29 Martin Liska <mliska@suse.cz>
10858 David Malcolm <dmalcolm@redhat.com>
10860 * vec.c (test_reverse): New.
10861 (vec_c_tests): Add new test.
10862 * vec.h (vl_ptr>::reverse): New function.
10864 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10866 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10868 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10871 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10873 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10875 2018-05-28 Richard Biener <rguenther@suse.de>
10877 PR tree-optimization/85933
10878 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10879 look at stmts marked as vectorizable.
10881 2018-05-28 Richard Biener <rguenther@suse.de>
10883 PR tree-optimization/85934
10884 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10885 vector boolean check before scalar optimization.
10887 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10889 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10892 2018-05-28 Mark Wielaard <mark@klomp.org>
10894 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10895 if it is an expression containing a minus sign.
10897 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10899 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10901 2018-05-27 Paul Koning <ni1d@arrl.net>
10903 * config/pdp11/pdp11.md (truncsihi2): Remove.
10905 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10906 Chung-Ju Wu <jasonwucj@gmail.com>
10908 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10910 (unaligned_store_dw): Ditto.
10911 * config/nds32/nds32-memory-manipulation.c
10912 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10913 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10914 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10915 (emit_setmem_word_loop): Rename to ...
10916 (emit_setmem_doubleword_loop): ... this.
10917 (nds32_gen_dup_4_byte_to_word_value): New function.
10918 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10919 (nds32_expand_setmem_loop): Refine implementation.
10920 (nds32_expand_setmem_loop_v3m): Ditto.
10921 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10924 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10926 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10928 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10930 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10931 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10932 machine->attr_no_prologue_p.
10933 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10934 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10935 (nds32_expand_epilogue): Consider attr_naked_p.
10936 (nds32_expand_epilogue_v3pop): Likewise.
10937 (nds32_can_use_return_insn): Likewise.
10938 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10939 attr_no_prologue_p fields.
10940 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10942 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10945 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10947 * config/i386/sse.md
10948 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10950 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10952 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10954 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10956 (*<floatsuffix>floatv2div2sf2): Rename to ...
10957 (*float<floatunssuffix>v2div2sf2): ... this.
10958 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10959 (float<floatunssuffix>v2div2sf2_mask): ... this.
10960 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10961 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10962 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10964 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10966 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10968 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10970 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10972 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10974 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10975 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10976 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10977 gen_ufix_truncv8dfv8si2.
10978 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10979 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10980 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10981 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10982 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10983 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10984 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10985 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10987 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10991 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10993 2018-05-25 Jim Wilson <jimw@sifive.com>
10995 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10996 * config/riscv/riscv.c (struct machine_function): Add
10997 interrupt_handler_p and attribute_checked_p fields.
10998 (riscv_attribute_table): Add interrupt.
10999 (riscv_interrupt_type_p): New.
11000 (riscv_save_reg_p): Save extra regs for interrupt handler.
11001 (riscv_use_save_libcall): Return false for interrupt handler.
11002 (riscv_first_stack_step): Add forward declaration.
11003 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11004 for interrupt handler with large frame. Use it for saved reg list.
11005 (riscv_expand_prologue): Move flag_stack_usage_info support to
11006 eliminate duplication.
11007 (riscv_expand_epilogue): Generate mret for interrupt handler.
11008 (riscv_epilogue_uses): New.
11009 (riscv_can_use_return_insn): Return false for interrupt handler.
11010 (riscv_function_ok_for_sibcall): Likewise.
11011 (riscv_set_current_function): Add interrupt handler support.
11012 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11013 * config/riscv/riscv.md (UNSPECV_MRET): New.
11015 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11017 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11019 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11021 PR tree-optimization/85712
11022 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11023 this candidate has already been replaced in-situ by a copy.
11025 2018-05-25 Jason Merrill <jason@redhat.com>
11027 PR c++/80485 - inline function non-zero address.
11028 * symtab.c (nonzero_address): Check DECL_COMDAT.
11030 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11033 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11034 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11035 extension of SImode operation. Use const123_operand predicate.
11036 (*saddsi_1): Remove.
11037 (*saddl_se_1): Ditto.
11038 (*ssubsi_1): Ditto.
11039 (*ssubl_se_1): Ditto.
11040 * config/alpha/predicates.md (const123_operand): New predicate.
11041 * config/alpha/constraints.md (P): Use IN_RANGE.
11043 2018-05-25 Richard Biener <rguenther@suse.de>
11045 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11047 (ref_maybe_used_by_stmt_p): Likewise.
11048 (stmt_may_clobber_ref_p): Likewise.
11049 (stmt_may_clobber_ref_p_1): Likewise.
11050 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11052 (ref_maybe_used_by_stmt_p): Likewise.
11053 (stmt_may_clobber_ref_p): Likewise.
11054 (stmt_may_clobber_ref_p_1): Likewise.
11055 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11056 the alias oracle to disambiguate DRs with stmts DR analysis
11058 (vect_analyze_data_refs): Do not give up on not analyzable
11059 DRs for BB vectorization. Remove code truncating the dataref
11062 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11065 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11066 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11067 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11069 2018-05-25 Richard Biener <rguenther@suse.de>
11071 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11072 function, combining stmt data ref gathering and fatal analysis
11074 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11075 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11076 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11077 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11078 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11080 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11082 PR tree-optimization/85720
11083 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11084 SCC if all partitions are builtins.
11085 (version_loop_by_alias_check): New parameter. Generate cancelable
11086 runtime alias check if all partitions are builtins.
11087 (distribute_loop): Update call to above function.
11089 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11091 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11092 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11093 (parm_default_def_partition_arg): Ditto.
11094 (set_parm_default_def_partition): Ditto.
11095 (get_parm_default_def_partitions): Ditto and make it static.
11096 (get_undefined_value_partitions): Ditto and make it static.
11097 (remove_ssa_form): Refactor call to init_var_map here.
11098 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11099 computation for loop region.
11100 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11101 (register_default_def): Delete.
11102 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11103 (parm_default_def_partition_arg): Ditto.
11104 (set_parm_default_def_partition): Ditto.
11105 (get_parm_default_def_partitions): Ditto and make it static.
11106 (get_undefined_value_partitions): Ditto and make it static.
11107 (coalesce_with_default, coalesce_with_default): Update comment.
11108 (create_coalesce_list_for_region): New func factored out from
11109 create_outofssa_var_map.
11110 (populate_coalesce_list_for_outofssa): New func factored out from
11111 create_outofssa_var_map and coalesce_ssa_name.
11112 (create_outofssa_var_map): Delete.
11113 (coalesce_ssa_name): Refactor to support live range computation.
11114 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11115 (get_parm_default_def_partitions): Delete.
11116 (get_undefined_value_partitions): Ditto.
11117 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11118 computation for loop region.
11119 (new_tree_live_info, loe_visit_block): Ditto.
11120 (live_worklist, set_var_live_on_entry): Ditto.
11121 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11122 * tree-ssa-live.h (struct _var_map): New fields.
11123 (init_var_map): Change decl.
11124 (region_contains_p): New.
11126 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11128 * tree-ssa-live.h (live_merge_and_clear): Delete.
11130 2018-05-25 Richard Biener <rguenther@suse.de>
11133 * tree-dump.c (dequeue_and_dump): Remove access to removed
11134 operand 2 of a SWITCH_EXPR.
11136 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11138 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11139 multiplication and division.
11140 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11141 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11142 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11143 (cond_udiv_optab, cond_umod_optab): New optabs.
11144 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11145 (IFN_COND_RDIV): New internal functions.
11146 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11147 TRUNC_MOD_EXPR and RDIV_EXPR.
11148 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11149 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11151 (SVE_INT_BINARY): Include mult.
11152 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11153 (optab, sve_int_op): Handle mult.
11154 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11156 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11157 for SVE_INT_BINARY_SD.
11159 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11161 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11162 (optab, sve_int_op): Handle div and udiv.
11163 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11164 for SVE_INT_BINARY_SD.
11165 (*<optab><mode>3): New insn for the same.
11167 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11169 * tree-vect-patterns.c: Include predict.h.
11170 (vect_recog_divmod_pattern): Restrict check for division support
11171 to when optimizing for size.
11173 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11175 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11176 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11177 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11178 (gimple_match_op::set_op): Likewise.
11179 (gimple_resimplify4): Declare.
11180 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11181 (expr::gen_transform): Likewise.
11182 (decision_tree::gen): Generate a simplification routine for 4 operands.
11183 * gimple-match-head.c (gimple_simplify): Add an overload for
11184 4 operands. In the top-level function, handle up to 4 call
11185 arguments and call gimple_resimplify4.
11186 (gimple_resimplify4): New function.
11187 (build_call_internal): Pass a fourth operand.
11188 (maybe_push_to_seq): Likewise.
11189 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11190 Fold VEC_COND_EXPRs of an operation and a default value into
11191 an IFN_COND_* function if possible.
11192 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11194 (SVE_COND_FP_BINARY): Include them.
11195 (optab, sve_fp_op): Handle them.
11196 (SVE_INT_BINARY_REV): New code iterator.
11197 (SVE_COND_FP_BINARY_REV): New int iterator.
11198 (commutative): New int attribute.
11199 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11201 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11203 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11204 (*cond_<optab><mode>): New patterns for reversed operands.
11206 2018-05-25 Richard Biener <rguenther@suse.de>
11208 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11209 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11210 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11211 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11212 * tree-vect-data-refs.c (everywhere): Adjust users.
11213 * tree-vect-loop.c (everywhere): Likewise.
11214 * tree-vect-slp.c (everywhere): Likewise.
11215 * tree-vect-stmts.c (everywhere): Likewise.
11216 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11218 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11220 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11222 (gcc_cv_as_section_exclude): ... this.
11223 Try Solaris as #exclude syntax.
11224 * configure: Regenerate.
11225 * config.in: Regenerate.
11226 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11228 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11229 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11231 * varasm.c (default_elf_asm_named_section): Don't check if
11232 HAVE_GAS_SECTION_EXCLUDE is defined.
11234 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11236 * doc/md.texi: Update the documentation of the cond_* optabs
11237 to mention the new final operand. Fix GET_MODE_NUNITS call.
11238 Describe the scalar case too.
11239 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11240 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11242 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11243 (get_conditional_internal_fn): Update comment.
11244 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11245 accumulator value as a final argument to conditional functions.
11246 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11247 a define_expand and add an "else" operand. Assert for now that
11248 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11249 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11250 (*cond_<optab><mode>): New patterns.
11251 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11252 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11253 (UNSPEC_COND_EOR): Delete.
11254 (optab): Remove associated mappings.
11255 (SVE_INT_BINARY): New code iterator.
11256 (sve_int_op): Remove int attribute and add "minus" to the code
11258 (SVE_COND_INT_OP): Delete.
11259 (SVE_COND_FP_OP): Rename to...
11260 (SVE_COND_FP_BINARY): ...this.
11262 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11264 * optabs.c (can_reuse_operands_p): New function.
11265 (maybe_legitimize_operands): Try to reuse the results for
11268 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11270 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11271 Add {q} suffix to insn mnemonic.
11273 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11275 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11276 (msp430_warn_func_return): New.
11278 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11280 * fold-const.c (tree_nonzero_bits): New function.
11281 * fold-const.h (tree_nonzero_bits): Likewise.
11282 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11283 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11285 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11289 * varasm.c (assemble_alias): Check ifunc_resolver only on
11292 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11295 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11296 when memory input operand is handled.
11298 2018-05-24 Luis Machado <luis.machado@linaro.org>
11300 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11302 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11304 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11306 * match.pd: Delay FMA folds until after vectorization.
11308 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11311 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11312 address check not strict.
11314 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11316 * gimple-match.h (gimple_match_op): New class.
11317 (mprts_hook): Replace parameters with a gimple_match_op *.
11318 (maybe_build_generic_op): Likewise.
11319 (gimple_simplified_result_is_gimple_val): Replace parameters with
11320 a const gimple_match_op *.
11321 (gimple_simplify): Replace code_helper * and tree * parameters with
11322 a gimple_match_op * parameter.
11323 (gimple_resimplify1): Replace code_helper *, tree and tree *
11324 parameters with a gimple_match_op * parameter.
11325 (gimple_resimplify2): Likewise.
11326 (gimple_resimplify3): Likewise.
11327 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11328 parameters with a gimple_match_op * parameter.
11329 * gimple-match-head.c (gimple_simplify): Change prototypes of
11330 auto-generated functions to take a gimple_match_op * instead of
11331 separate code_helper * and tree * parameters. Make the same
11332 change in the top-level overload and update calls to the
11333 gimple_resimplify routines. Update calls to the auto-generated
11334 functions and to maybe_push_res_to_seq in the publicly-facing
11335 operation-specific gimple_simplify overloads.
11336 (gimple_match_op::MAX_NUM_OPS): Define.
11337 (gimple_resimplify1): Replace rcode and ops with a single res_op
11338 parameter. Update call to gimple_simplify.
11339 (gimple_resimplify2): Likewise.
11340 (gimple_resimplify3): Likewise.
11341 (mprts_hook): Replace parameters with a gimple_match_op *.
11342 (maybe_build_generic_op): Likewise.
11343 (build_call_internal): Replace type, nargs and ops with
11344 a gimple_match_op *.
11345 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11346 with a single gimple_match_op *. Update calls to mprts_hook,
11347 build_call_internal and gimple_simplified_result_is_gimple_val.
11348 Factor out code that is common to the tree_code and combined_fn cases.
11349 * genmatch.c (expr::gen_transform): Replace tem_code and
11350 tem_ops with a gimple_match_op called tem_op. Update calls
11351 to the gimple_resimplify functions and maybe_push_res_to_seq.
11352 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11353 res_ops. Update call to the gimple_resimplify functions.
11354 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11355 (decision_tree::gen): Make the functions take a gimple_match_op *
11356 called res_op instead of separate res_code and res_ops parameters.
11357 Update call accordingly.
11358 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11359 and ops with a single res_op parameter. Update calls to
11360 maybe_build_generic_op and maybe_push_res_to_seq.
11361 (fold_stmt_1): Update calls to gimple_simplify and
11362 replace_stmt_with_simplification.
11363 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11364 and gimple_simplified_result_is_gimple_val.
11365 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11367 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11368 with a gimple_match_op *.
11369 (vn_nary_build_or_lookup): Likewise. Update call to
11370 vn_nary_build_or_lookup_1.
11371 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11372 gimple_match_op *. Update calls to the gimple_resimplify routines
11373 and to gimple_simplified_result_is_gimple_val.
11374 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11375 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11376 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11377 (visit_nary_op): Likewise.
11378 (visit_reference_op_load): Likewise.
11380 2018-05-23 Luis Machado <luis.machado@linaro.org>
11382 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11383 modifier for printing the step amount.
11385 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11388 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11391 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11393 * doc/sourcebuild.texi (Endianness): New subsubsection.
11395 2018-05-23 Luis Machado <luis.machado@linaro.org>
11397 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11398 <prefetch_dynamic_strides>: New const bool field.
11399 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11400 prefetch_dynamic_strides.
11401 (exynosm1_prefetch_tune): Likewise.
11402 (thunderxt88_prefetch_tune): Likewise.
11403 (thunderx_prefetch_tune): Likewise.
11404 (thunderx2t99_prefetch_tune): Likewise.
11405 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11407 (aarch64_override_options_internal): Update to set
11408 PARAM_PREFETCH_DYNAMIC_STRIDES.
11409 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11410 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11411 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11412 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11413 prefetch-dynamic-strides setting.
11415 2018-05-23 Luis Machado <luis.machado@linaro.org>
11417 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11418 <minimum_stride>: New const int field.
11419 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11420 minimum_stride field defaulting to -1.
11421 (exynosm1_prefetch_tune): Likewise.
11422 (thunderxt88_prefetch_tune): Likewise.
11423 (thunderx_prefetch_tune): Likewise.
11424 (thunderx2t99_prefetch_tune): Likewise.
11425 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11426 <default_opt_level>: Set to 3.
11427 (aarch64_override_options_internal): Update to set
11428 PARAM_PREFETCH_MINIMUM_STRIDE.
11429 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11430 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11431 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11432 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11433 stride is constant and is below the minimum stride threshold.
11435 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11437 * config/arm/arm-cpus.in (mode26): Delete.
11438 (armv4): Delete mode26 reference.
11439 * config/arm/arm.c (arm_configure_build_target): Delete use of
11442 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11444 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11446 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11447 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11449 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11450 (floatunsdidf2): Ditto.
11452 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11454 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11455 (fixuns_trunc<mode>si2_avx512f): Ditto.
11456 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11457 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11458 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11460 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11462 PR rtl-optimization/79985
11463 * df-scan.c (df_insn_refs_collect): Remove special case for
11464 global registers and asm statements.
11466 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11468 * extend.texi (Global Register Variables): Rewrite the bullet list.
11469 Note that the register is available for allocation. Note that access
11470 via inline asm must use constraints. Add note about async-signal
11471 handlers. Remove paragraph about automagic register selection.
11473 2018-05-23 Richard Biener <rguenther@suse.de>
11475 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11476 of fixed offset from memset VN.
11478 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11480 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11481 first_interp field.
11482 (alloc_cand_and_find_basis): Initialize first_interp field.
11483 (slsr_process_mul): Modify first_interp field.
11484 (slsr_process_add): Likewise.
11485 (slsr_process_cast): Modify first_interp field for each new
11487 (slsr_process_copy): Likewise.
11488 (dump_candidate): Dump first_interp field.
11489 (replace_mult_candidate): Process all interpretations, not just
11491 (replace_rhs_if_not_dup): Likewise.
11492 (replace_one_candidate): Likewise.
11494 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11496 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11498 (aarch64_needs_frame_chain): New function.
11499 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11501 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11504 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11505 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11506 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11507 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11508 as true for strict-align.
11509 (aarch64_can_inline_p): Perform checks even when callee has no
11510 attributes to check for strict alignment.
11511 * doc/extend.texi (AArch64 Function Attributes): Document
11513 * doc/invoke.texi: (AArch64 Options): Likewise.
11515 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11517 PR tree-optimization/85853
11518 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11519 the handling of the root of the node to...
11520 (vect_slp_analyze_node_operations_1): ...this new function,
11521 and run the whole thing with the child nodes' def types
11522 set according to their SLP node's def type.
11524 2018-05-23 Richard Biener <rguenther@suse.de>
11526 PR middle-end/85874
11527 * tree-data-ref.c (create_runtime_alias_checks): Defer
11528 and ignore overflow warnings.
11530 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11532 PR tree-optimization/85822
11533 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11536 2018-05-23 Richard Biener <rguenther@suse.de>
11538 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11539 memset constants via native_interpret_expr.
11541 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11544 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11546 (cgraph_node::create_alias): Likewise.
11547 (cgraph_node::get_availability): Check ifunc_resolver instead
11548 of looking up ifunc attribute.
11549 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11550 * varasm.c (do_assemble_alias): Likewise.
11551 (assemble_alias): Likewise.
11552 (default_binds_local_p_3): Likewise.
11553 * cgraph.h (cgraph_node): Add ifunc_resolver.
11554 (cgraph_node::only_called_directly_or_aliased_p): Return false
11555 for IFUNC resolver.
11556 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11558 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11559 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11560 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11561 instead of looking up ifunc attribute.
11563 2018-05-22 Luis Machado <luis.machado@linaro.org>
11565 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11567 2018-05-22 Martin Sebor <msebor@redhat.com>
11569 PR middle-end/85359
11570 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11571 only when expasion succeeds.
11572 (expand_builtin_strcmp): Same.
11573 (expand_builtin_strncmp): Same.
11575 2018-05-22 Martin Sebor <msebor@redhat.com>
11577 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11579 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11580 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11582 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11583 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11585 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11586 Add check for legitimate_address.
11587 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11588 (aarch64_swap_ldrstr_operands): New.
11589 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11592 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11593 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11595 * config/aarch64/aarch64.md: New patterns to generate stp
11597 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11598 single words and double words.
11599 (load_pair_sw, load_pair_dw): Likewise.
11600 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11602 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11604 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11605 for different mode ldpstp and add peephole for merged zero stores.
11606 Likewise for loads.
11607 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11609 (aarch64_gen_store_pair): Rename calls to match new patterns.
11610 (aarch64_gen_load_pair): Rename calls to match new patterns.
11611 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11612 (load_pair<DREG:mode><DREG2:mode>): ... This.
11613 (store_pair<mode>): Rename to...
11614 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11615 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11616 New mode iterators.
11617 (V_INT_EQUIV): Handle SImode.
11618 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11621 2018-05-22 Martin Sebor <msebor@redhat.com>
11624 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11625 or ajust the presumed bound on an operation to avoid unnecessary
11628 2018-05-22 Martin Sebor <msebor@redhat.com>
11630 PR tree-optimization/85826
11631 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11632 assuming that a DECL necesarily has a constant size.
11634 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11636 PR middle-end/85862
11637 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11639 2018-05-22 Richard Biener <rguenther@suse.de>
11641 PR tree-optimization/85834
11642 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11643 non-constant and non-zero memset arguments.
11645 2018-05-22 Martin Liska <mliska@suse.cz>
11648 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11650 2018-05-22 Richard Biener <rguenther@suse.de>
11652 PR tree-optimization/85863
11653 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11654 comparisons when vectype is specified.
11655 (vectorizable_condition): Do not specify vectype for
11656 vect_is_simple_cond when SLP vectorizing.
11658 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11661 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11662 define __ibm128 as long double.
11663 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11664 as a distinct type when IEEE 128-bit support is enabled.
11665 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11666 128-bit types to use the correct functions.
11667 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11668 convert between 128-bit floating point types that have different
11669 modes but the same representation, instead of using gen_lowpart to
11671 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11673 (IFKF_reg): New attributes to give the register constraints for
11675 (extend<mode>tf2_internal): New insns to mark an explicit
11676 conversion between 128-bit floating point types that have a
11677 different mode but share the same representation.
11679 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11681 PR tree-optimization/85814
11682 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11683 a null return from get_strinfo when unsharing the next
11684 strinfo in the chain.
11686 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11689 * varasm.c (weak_finish): Clean up weak_decls.
11691 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11693 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11694 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11695 UNSPEC_UADALP values.
11696 * config/aarch64/iterators.md (ABAL): New int iterator.
11699 (sur): Add mappings for the above.
11700 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11702 (aarch64_<sur>abal<mode>_4): Likewise.
11703 (aarch64_<sur>adalp<mode>_3): Likewise.
11704 (<sur>sadv16qi): New define_expand.
11706 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11708 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11709 (*movdf_internal): Ditto.
11710 (*rcpsf2_sse): Ditto.
11711 (*rsqrtsf2_sse): Ditto.
11712 (*sqrt<mode>2_sse): Ditto.
11714 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11716 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11718 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11719 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11720 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11721 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11723 * config/aarch64/arm_neon.h: Likewise.
11724 * config/aarch64/iterators.md (VQ_I): New.
11726 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11728 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11730 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11733 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11735 * config/nds32/constraints.md (S): New constraint.
11736 * config/nds32/nds32.md (call_internal): Use constraint S.
11737 (call_value_internal): Likewise.
11738 (sibcall_internal): Likewise.
11739 (sibcall_value_internal): Likewise.
11741 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11742 Chung-Ju Wu <jasonwucj@gmail.com>
11744 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11745 into consideration.
11747 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11748 Chung-Ju Wu <jasonwucj@gmail.com>
11750 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11751 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11752 (nds32_rtx_costs_impl): Simplify.
11753 (nds32_address_cost_impl): Simplify.
11754 (nds32_init_rtx_costs): New function.
11755 (nds32_rtx_costs_speed_prefer): Likewise.
11756 (nds32_rtx_costs_size_prefer): Likewise.
11757 (nds32_address_cost_speed_prefer): Likewise.
11758 (nds32_address_cost_speed_fwprop): Likewise.
11759 (nds32_address_cost_size_prefer): Likewise.
11760 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11761 * config/nds32/nds32.c (nds32_option_override): Use
11762 nds32_init_rtx_costs function.
11764 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11766 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11767 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11768 (TARGET_PIPELINE_N8): Likewise.
11769 (TARGET_PIPELINE_N10): Likewise.
11770 (TARGET_PIPELINE_N13): Likewise.
11771 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11773 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11775 * config/nds32/nds32-fpu.md: Update copyright year.
11777 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11779 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11781 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11783 * config/nds32/nds32.c
11784 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11785 * config/nds32/nds32.opt (minline-asm-r15): New option.
11787 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11789 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11791 * config/nds32/nds32.md (abssi2): New pattern.
11793 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11795 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11796 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11797 Merge insn pattern from sse_cvtsi2ss<round_name> and
11798 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11799 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11800 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11801 using SWI48 mode iterator.
11802 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11803 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11804 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11805 pattern from sse_cvttss2si<round_saeonly_name>
11806 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11807 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11808 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11809 using SWI48 mode iterator.
11810 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11811 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11812 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11813 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11814 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11815 using SWI48 mode iterator.
11816 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11817 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11818 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11819 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11820 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11821 SWI48 mode iterator.
11822 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11823 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11824 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11825 pattern from sse_cvttsd2si<round_saeonly_name>
11826 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11828 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11830 * config/nds32/nds32-md-auxiliary.c
11831 (nds32_valid_smw_lwm_base_p): Refine.
11832 (nds32_output_smw_single_word): Refine.
11833 (nds32_output_smw_double_word): New.
11834 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11836 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11838 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11839 (nds32_output_stack_pop): Refine.
11840 (nds32_expand_unaligned_load): Refine.
11841 (nds32_expand_unaligned_store): Refine.
11843 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11844 Chung-Ju Wu <jasonwucj@gmail.com>
11846 * config/nds32/constants.md: Add TP_REGNUM constant.
11847 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11848 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11850 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11851 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11852 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11853 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11854 and PIC code generation.
11855 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11857 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11859 * config/nds32/nds32.md: Support TLS and PIC.
11860 * config/nds32/nds32.c: Support TLS and PIC.
11861 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11862 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11865 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11867 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11868 mode with E_ prefix.
11870 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11871 Chung-Ju Wu <jasonwucj@gmail.com>
11873 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11874 * config/nds32/nds32-md-auxiliary.c
11875 (symbolic_reference_mentioned_p): New.
11876 (nds32_legitimize_ict_address): New.
11877 (nds32_expand_ict_move): New.
11878 (nds32_indirect_call_referenced_p): New.
11879 (nds32_symbol_binds_local_p): Delete.
11880 (nds32_long_call_p): Modify.
11881 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11882 * config/nds32/nds32-protos.h
11883 (symbolic_reference_mentioned_p): Declare.
11884 (nds32_legitimize_ict_address): Declare.
11885 (nds32_expand_ict_move): Declare.
11886 (nds32_indirect_call_referenced_p): Declare.
11887 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11888 (nds32_relax_group): Use nds32_ict_const_p as condition.
11889 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11890 (nds32_asm_file_start): Output ict_model directive in asm code.
11891 (nds32_legitimate_address_p): Consider indirect call.
11892 (nds32_print_operand): Consider indirect call.
11893 (nds32_print_operand_address): Consider indirect call.
11894 (nds32_insert_attributes): Handle "indirect_call" attribute.
11895 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11896 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11897 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11898 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11899 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11900 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11901 (TARGET_ICT_MODEL_SMALL): Define.
11902 (TARGET_ICT_MODEL_LARGE): Define.
11903 * config/nds32/nds32.md (movsi): Consider ict model.
11904 (call, call_value): Consider ict model.
11905 (sibcall, sibcall_value): Consider ict model.
11906 * config/nds32/nds32.opt (mict-model): New option.
11907 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11910 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11911 Monk Chiang <sh.chiang04@gmail.com>
11912 Jim Wilson <jimw@sifive.com>
11914 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11915 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11916 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11917 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11918 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11919 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11920 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11921 compute save_libcall_adjustment properly.
11922 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11923 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11924 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11925 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11926 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11927 (ABI_SPEC): Handle mabi=ilp32e.
11928 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11929 (RVE): Add RVE mask.
11930 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11931 <-march>: Add rv32e as an example.
11933 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11936 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11937 (intra_create_variable_infos): Handle C++ constructors.
11939 2018-05-18 Martin Liska <mliska@suse.cz>
11941 * passes.def: Remove a redundant pass.
11943 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11946 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11948 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11950 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11952 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11954 (armv2, armv2a, armv3, armv3m): Delete architectures.
11955 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11956 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11957 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11959 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11960 (*mulsidi3adddi): Likewise.
11961 (mulsidi3): Likewise.
11962 (*mulsidi3_nov6): Likewise.
11963 (umulsidi3): Likewise.
11964 (umulsidi3_nov6): Likewise.
11965 (umaddsidi4): Likewise.
11966 (*umulsidi3adddi): Likewise.
11967 (smulsi3_highpart): Likewise.
11968 (*smulsi3_highpart_nov6): Likewise.
11969 (umulsi3_highpart): Likewise.
11970 (*umulsi3_highpart_nov6): Likewise.
11971 * config/arm/arm.h (arm_arch3m): Delete.
11972 * config/arm/arm.c (arm_arch3m): Delete.
11973 (arm_option_override_internal): Update armv3-related comment.
11974 (arm_configure_build_target): Delete use of isa_bit_mode32.
11975 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11976 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11977 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11978 (mulsa3): Likewise.
11979 (mulusa3): Likewise.
11980 * config/arm/arm-protos.h (arm_arch3m): Delete.
11981 * config/arm/arm-tables.opt: Regenerate.
11982 * config/arm/arm-tune.md: Likewise.
11983 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11984 deleted architectures.
11986 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11988 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11989 (armv5t, armv5te): New features.
11990 (ARMv5, ARMv5e): Delete fgroups.
11991 (ARMv5t, ARMv5te): Adjust for above changes.
11992 (ARMv6m): Likewise.
11993 (armv5, armv5e): Delete arches.
11994 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11996 (*call_reg_arm): Likewise.
11997 (*call_value_reg_armv5): Likewise.
11998 (*call_value_reg_arm): Likewise.
11999 (*call_symbol): Likewise.
12000 (*call_value_symbol): Likewise.
12001 (*sibcall_insn): Likewise.
12002 (*sibcall_value_insn): Likewise.
12003 (clzsi2): Likewise.
12004 (prefetch): Likewise.
12005 (define_split and define_peephole2 dependent on arm_arch5):
12007 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12009 (TARGET_ARM_QBIT): Likewise.
12010 (TARGET_DSP_MULTIPLY): Likewise.
12011 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12012 (arm_arch5, arm_arch5e): Delete.
12013 (arm_arch5t, arm_arch5te): Declare.
12014 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12015 (arm_arch5t): Declare.
12016 (arm_option_reconfigure_globals): Update for the above.
12017 (arm_options_perform_arch_sanity_checks): Update comment, replace
12018 use of arm_arch5 with arm_arch5t.
12019 (use_return_insn): Likewise.
12020 (arm_emit_call_insn): Likewise.
12021 (output_return_instruction): Likewise.
12022 (arm_final_prescan_insn): Likewise.
12023 (arm_coproc_builtin_available): Likewise.
12024 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12025 arm_arch5e with arm_arch5t and arm_arch5te.
12026 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12027 (arm_arch5t, arm_arch5te): Declare.
12028 * config/arm/arm-tables.opt: Regenerate.
12029 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12030 * config/arm/t-multilib: Likewise.
12031 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12032 instead of arm_arch5.
12033 (*call_reg_thumb1): Likewise.
12034 (*call_value_reg_thumb1_v5): Likewise.
12035 (*call_value_reg_thumb1): Likewise.
12036 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12038 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12040 2018-05-18 Martin Liska <mliska@suse.cz>
12042 PR gcov-profile/84846
12043 * doc/gcov.texi: Document -t option of gcov tool.
12045 2018-05-18 Martin Liska <mliska@suse.cz>
12047 PR gcov-profile/84846
12048 * gcov.c (print_usage): Add new -t option.
12049 (process_args): Handle the option.
12050 (generate_results): Use stdout as output when requested by
12053 2018-05-18 Martin Liska <mliska@suse.cz>
12055 PR gcov-profile/84846
12056 * coverage.c (coverage_init): Write PWD to .gcno file.
12057 * doc/gcov.texi: Document how working directory is printed.
12058 * gcov-dump.c (dump_gcov_file): Print PWD.
12059 * gcov.c (output_intermediate_file): Likewise.
12060 (read_graph_file): Read PWD string.
12061 (output_lines): Print PWD.
12063 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12065 PR middle-end/85817
12066 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12067 for retval and return false if all args to phi are zero.
12069 2018-05-18 Richard Biener <rguenther@suse.de>
12071 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12073 (evrp_dom_walker::before_dom_children): Call it.
12075 2018-05-18 Richard Biener <rguenther@suse.de>
12077 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12078 results when processing array refs with variable index.
12080 2018-05-18 Toon Moene <toon@moene.org>
12082 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12083 directly after that of -floop-interchange. Indicate that both
12084 options are enabled by default when specifying -O3.
12086 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12088 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12089 iterator. Delete separate integer-mode vec_set<mode> expander.
12090 (aarch64_simd_vec_setv2di): Delete.
12091 (vec_setv2di): Delete.
12092 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12093 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12094 the "w, r" alternative.
12096 2018-05-18 Martin Liska <mliska@suse.cz>
12098 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12099 * tree-pass.h (make_pass_lower_switch_O0): New function.
12100 * tree-switch-conversion.c (node_has_low_bound): Remove.
12101 (node_has_high_bound): Likewise.
12102 (node_is_bounded): Likewise.
12103 (class pass_lower_switch): Make it a template type and create
12105 (pass_lower_switch::execute): Add template argument.
12106 (make_pass_lower_switch): New function.
12107 (make_pass_lower_switch_O0): New function.
12108 (do_jump_if_equal): Remove.
12109 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12110 all the hard work to tree optimization passes.
12112 2018-05-18 Martin Liska <mliska@suse.cz>
12114 * dbgcnt.c (limit_low): Renamed from limit.
12115 (limit_high): New variable.
12116 (dbg_cnt_is_enabled): Check for upper limit.
12117 (dbg_cnt): Adjust dumping.
12118 (dbg_cnt_set_limit_by_index): Add new argument for high
12120 (dbg_cnt_set_limit_by_name): Likewise.
12121 (dbg_cnt_process_single_pair): Parse new format.
12122 (dbg_cnt_process_opt): Use strtok.
12123 (dbg_cnt_list_all_counters): Remove 'value' and add
12125 * doc/invoke.texi: Document changes.
12127 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12129 * doc/sourcebuild.texi (scalar_all_fma): Document.
12130 * tree.def (FMA_EXPR): Delete.
12131 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12132 * internal-fn.c (ternary_direct): New macro.
12133 (expand_ternary_optab_fn): Likewise.
12134 (direct_ternary_optab_supported_p): Likewise.
12135 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12136 * builtins.c (fold_builtin_fma): Delete.
12137 (fold_builtin_3): Don't call it.
12138 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12139 * expr.c (expand_expr_real_2): Likewise.
12140 * fold-const.c (operand_equal_p): Likewise.
12141 (fold_ternary_loc): Likewise.
12142 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12143 * gimple.c (DEFTREECODE): Likewise.
12144 * gimplify.c (gimplify_expr): Likewise.
12145 * optabs-tree.c (optab_for_tree_code): Likewise.
12146 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12147 * tree-eh.c (operation_could_trap_p): Likewise.
12148 (stmt_could_throw_1_p): Likewise.
12149 * tree-inline.c (estimate_operator_cost): Likewise.
12150 * tree-pretty-print.c (dump_generic_node): Likewise.
12151 (op_code_prio): Likewise.
12152 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12153 * tree-ssa-operands.c (get_expr_operands): Likewise.
12154 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12155 * fold-const-call.h (fold_fma): Delete.
12156 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12157 CFN_FNMA and CFN_FNMS.
12158 (fold_fma): Delete.
12159 * genmatch.c (combined_fn): New enum.
12160 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12161 (commutative_op): New function.
12162 (commutate): Use it. Handle more than 2 operands.
12163 (dt_operand::gen_gimple_expr): Use commutative_op.
12164 (parser::parse_expr): Allow :c to be used with non-binary
12165 operators if the commutative operand is known.
12166 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12167 CFN_FMS, CFN_FNMA and CFN_FNMS.
12168 (backprop::process_assign_use): Remove FMA_EXPR handling.
12169 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12170 (gen_hsa_fma): New function.
12171 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12172 IFN_FNMA and IFN_FNMS.
12173 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12174 * gimple-fold.h (follow_all_ssa_edges): Declare.
12175 * gimple-fold.c (follow_all_ssa_edges): New function.
12176 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12177 gimple_build interface and use follow_all_ssa_edges to fold the result.
12178 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12179 instead of checking for optabs directly.
12180 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12181 rather than FMA_EXPRs.
12182 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12183 call to IFN_FMA instead of an FMA_EXPR.
12185 2018-05-17 Jim Wilson <jimw@sifive.com>
12187 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12188 sign extended promoted subreg, and the range does not have the sign bit
12189 set, then do a sign extend.
12191 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12192 test, check for sign extended subreg and/or constant operands, and
12193 do a sign extend in that case.
12195 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12197 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12198 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12200 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12201 Change logics_shift_reg to logics_shift_imm.
12202 (thunderx2t99_fp_loadpair_basic): Delete.
12203 (thunderx2t99_fp_storepair_basic): Delete.
12204 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12205 (thunderx2t99_asimd_polynomial): Delete.
12206 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12207 and neon_fp_mul_d_scalar_q.
12208 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12209 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12210 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12211 (thunderx2t99_asimd_lut): Add missing tbl types.
12212 (thunderx2t99_asimd_ext): Delete.
12213 (thunderx2t99_asimd_load1_1_mult): Delete.
12214 (thunderx2t99_asimd_load1_2_mult): Delete.
12215 (thunderx2t99_asimd_load1_ldp): New.
12216 (thunderx2t99_asimd_load1): New.
12217 (thunderx2t99_asimd_load2): Add missing *load2* types.
12218 (thunderx2t99_asimd_load3): New.
12219 (thunderx2t99_asimd_load4): New.
12220 (thunderx2t99_asimd_store1_1_mult): Delete.
12221 (thunderx2t99_asimd_store1_2_mult): Delete.
12222 (thunderx2t99_asimd_store2_mult): Delete.
12223 (thunderx2t99_asimd_store2_onelane): Delete.
12224 (thunderx2t99_asimd_store_stp): New.
12225 (thunderx2t99_asimd_store1): New.
12226 (thunderx2t99_asimd_store2): New.
12227 (thunderx2t99_asimd_store3): New.
12228 (thunderx2t99_asimd_store4): New.
12230 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12232 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12233 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12235 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12236 Segher Boessenkool <segher@kernel.crashing.org>
12239 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12242 2018-05-17 Richard Biener <rguenther@suse.de>
12244 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12245 for pruning loop and prune defs feeding only already visited PHIs.
12247 2018-05-17 Richard Biener <rguenther@suse.de>
12249 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12251 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12252 Richard Biener <rguenther@suse.de>
12254 PR tree-optimization/85793
12255 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12256 for VMAT_ELEMENTWISE.
12258 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12260 * internal-fn.h (lookup_internal_fn): Declare
12261 * internal-fn.c (lookup_internal_fn): New function.
12262 * gimple.c (gimple_build_call_from_tree): Handle calls to
12263 internal functions.
12264 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12265 internal function names.
12266 * tree-pretty-print.c (dump_generic_node): Likewise.
12267 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12269 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12271 * gimple-fold.h (gimple_build): Make the function forms take
12272 combined_fn rather than built_in_function.
12273 (gimple_simplify): Likewise.
12274 * gimple-match-head.c (gimple_simplify): Likewise.
12275 * gimple-fold.c (gimple_build): Likewise.
12276 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12277 rather than gimple_build_call_internal.
12278 (get_initial_defs_for_reduction): Likewise.
12279 (vect_create_epilog_for_reduction): Likewise.
12280 (vectorizable_live_operation): Likewise.
12282 2018-05-17 Martin Liska <mliska@suse.cz>
12284 * gimple-ssa-sprintf.c (format_directive): Do not use
12285 space in between 'G_' and '('.
12287 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12290 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12291 even if the mask is not all ones.
12294 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12296 (ix86_gimple_fold_builtin): Likewise.
12299 * config/i386/i386.c: Include tree-vector-builder.h.
12300 (ix86_vector_shift_count): New function.
12301 (ix86_fold_builtin): Fold shift builtins by scalar count.
12302 (ix86_gimple_fold_builtin): Likewise.
12304 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12305 _mm512_setzero): New intrinsics.
12307 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12308 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12310 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12311 code generation for cases where splatting a value is not useful.
12312 * simplify-rtx.c (simplify_ternary_operation): Simplify
12313 vec_merge across a vec_duplicate and a paradoxical subreg forming
12314 a vector mode to a vec_concat.
12316 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12318 * config.gcc: Support "goldmont-plus".
12319 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12321 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12322 PROCESSOR_GOLDMONT_PLUS.
12323 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12324 (processor_target_table): Add "goldmont-plus".
12325 (PTA_GOLDMONT_PLUS): Define.
12326 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12327 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12328 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12329 (fold_builtin_cpu): Add "goldmont-plus".
12330 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12331 (ix86_option_override_internal): Add "goldmont-plus".
12332 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12333 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12334 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12335 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12337 2018-05-17 Richard Biener <rguenther@suse.de>
12339 PR tree-optimization/85757
12340 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12341 remove defs that only feed that PHI from further processing.
12343 2018-05-16 Jim Wilson <jimw@sifive.com>
12345 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12347 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12349 2018-05-16 Mark Wielaard <mark@klomp.org>
12351 * dwarf2out.c (count_index_strings): New function.
12352 (output_indirect_strings): Call count_index_strings and generate
12353 header for dwarf_version >= 5.
12355 2018-05-16 Mark Wielaard <mark@klomp.org>
12357 * dwarf2out.c (dwarf_FORM): New function.
12358 (set_indirect_string): Use dwarf_FORM.
12359 (reset_indirect_string): Likewise.
12360 (size_of_die): Likewise.
12361 (value_format): Likewise.
12362 (output_die): Likewise.
12363 (add_skeleton_AT_string): Likewise.
12364 (output_macinfo_op): Likewise.
12365 (index_string): Likewise.
12366 (output_index_string_offset): Likewise.
12367 (output_index_string): Likewise.
12368 (count_index_strings): Likewise.
12370 2018-05-16 Carl Love <cel@us.ibm.com>
12372 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12373 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12375 2018-05-16 Martin Jambor <mjambor@suse.cz>
12377 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12378 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12380 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12382 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12383 (fnma<mode>4): Likewise.
12384 (fms<mode>4): Likewise.
12385 (fnms<mode>4): Likewise.
12386 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12387 (aarch64_fnma<mode>4): Likewise.
12388 (aarch64_fms<mode>4): Likewise.
12389 (aarch64_fnms<mode>4): Likewise.
12390 (aarch64_fnmadd<mode>4): Likewise.
12392 2018-05-16 Jason Merrill <jason@redhat.com>
12394 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12396 2018-05-16 Richard Biener <rguenther@suse.de>
12398 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12399 (dump_stmt_cost): Declare.
12400 (add_stmt_cost): Dump cost we add.
12401 (add_stmt_costs): New function.
12402 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12403 No longer exported.
12404 (vect_analyze_stmt): Adjust prototype.
12405 (vectorizable_condition): Likewise.
12406 (vectorizable_live_operation): Likewise.
12407 (vectorizable_reduction): Likewise.
12408 (vectorizable_induction): Likewise.
12409 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12410 cost vector to pass to vectorizable_ and record afterwards.
12411 (vect_model_reduction_cost): Take cost vector argument and adjust.
12412 (vect_model_induction_cost): Likewise.
12413 (vectorizable_reduction): Likewise.
12414 (vectorizable_induction): Likewise.
12415 (vectorizable_live_operation): Likewise.
12416 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12417 SLP_TREE_NUMBER_OF_VEC_STMTS.
12418 (vect_analyze_slp_cost_1): Remove.
12419 (vect_analyze_slp_cost): Likewise.
12420 (vect_slp_analyze_node_operations): Take visited args and
12421 a target cost vector. Avoid processing already visited stmt sets.
12422 (vect_slp_analyze_operations): Use a local cost vector to gather
12423 costs and register those of non-discarded instances.
12424 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12425 (vect_schedule_slp_instance): Remove copying of
12426 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12428 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12429 adding cost. Record cost entry location.
12430 (vect_prologue_cost_for_slp_op): Function to compute cost of
12431 a constant or invariant generated for SLP vect in the prologue,
12432 split out from vect_analyze_slp_cost_1.
12433 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12434 (vect_model_promotion_demotion_cost): Likewise.
12435 (vect_model_store_cost): Likewise, make static.
12436 (vect_model_load_cost): Likewise.
12437 (vectorizable_bswap): Add cost vector arg and adjust.
12438 (vectorizable_call): Likewise.
12439 (vectorizable_simd_clone_call): Likewise.
12440 (vectorizable_conversion): Likewise.
12441 (vectorizable_assignment): Likewise.
12442 (vectorizable_shift): Likewise.
12443 (vectorizable_operation): Likewise.
12444 (vectorizable_store): Likewise.
12445 (vectorizable_load): Likewise.
12446 (vectorizable_condition): Likewise.
12447 (vectorizable_comparison): Likewise.
12448 (can_vectorize_live_stmts): Likewise.
12449 (vect_analyze_stmt): Likewise.
12450 (vect_transform_stmt): Adjust calls to vectorizable_*.
12451 * tree-vectorizer.c: Include gimple-pretty-print.h.
12452 (dump_stmt_cost): New function.
12454 2018-05-16 Richard Biener <rguenther@suse.de>
12456 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12457 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12458 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12459 (check_name): New callback.
12460 (dse_classify_store): Track cycles via a visited bitmap of PHI
12461 defs and simplify handling of in-loop and across loop dead stores
12462 and properly fail for loop-variant refs. Handle byte-tracking with
12463 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12466 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12468 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12469 (vect_get_mask_type_for_stmt): Likewise.
12470 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12472 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12473 to determine the statement's vector type and the vector type that
12474 should be used for calculating nunits. Deal with cases in which
12475 the type has to be deferred.
12476 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12477 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12478 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12479 (vect_determine_vf_for_stmt): New functions, split out from...
12480 (vect_determine_vectorization_factor): ...here.
12481 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12482 (vect_get_mask_type_for_stmt): New functions, split out from
12483 vect_determine_vectorization_factor.
12485 2018-05-16 Richard Biener <rguenther@suse.de>
12487 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12488 verify the [VEC_]COND_EXPR embedded comparison.
12490 2018-05-15 Martin Sebor <msebor@redhat.com>
12492 PR tree-optimization/85753
12493 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12494 RECORD_TYPE in addition to ARRAY_TYPE.
12496 2018-05-15 Martin Sebor <msebor@redhat.com>
12498 PR middle-end/85643
12499 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12501 2018-05-15 Richard Biener <rguenther@suse.de>
12503 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12504 add by_clobber_p one. Change algorithm to collect all defs
12505 representing uses we need to walk and try reducing them to
12506 a single one before failing.
12507 (dse_dom_walker::dse_optimize_stmt): Adjust.
12509 2018-05-13 Mark Wielaard <mark@klomp.org>
12511 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12512 (size_of_loc_descr): Likewise.
12513 (output_loc_operands): Likewise.
12514 (output_loc_operands_raw): Likewise.
12515 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12516 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12517 (hash_loc_operands): Likewise.
12518 (compare_loc_operands): Likewise.
12520 2018-05-14 Mark Wielaard <mark@klomp.org>
12522 * dwarf2out.c (count_index_addrs): New function.
12523 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12525 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12527 PR tree-optimization/83648
12528 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12529 return value as malloc candidate.
12531 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12534 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12535 param as true in call to suggest_attribute.
12537 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12539 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12540 -mreadonly-in-sdata.
12542 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12544 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12546 (aarch64_crypto_aesd_fused): Likewise.
12548 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12550 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12551 (movsi_aarch64): Likewise.
12552 (load_pairsi): Likewise.
12553 (load_pairdi): Likewise.
12554 (store_pairsi): Likewise.
12555 (store_pairdi): Likewise.
12556 (load_pairsf): Likewise.
12557 (load_pairdf): Likewise.
12558 (store_pairsf): Likewise.
12559 (store_pairdf): Likewise.
12560 (zero_extend): Likewise.
12561 (trunc): Swap alternatives.
12562 (fcvt_target): Add '?' to prefer w over r.
12564 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12567 * config/i386/i386.md: Disallow non-commutative arithmetics in
12568 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12569 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12570 in the peephole2 before it.
12572 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12574 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12575 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12576 (ix86_handle_option): Handle -mcldemote.
12577 * config.gcc: New header.
12578 * config/i386/cldemoteintrin.h: New file.
12579 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12580 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12582 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12583 OPTION_MASK_ISA_CLDEMOTE.
12584 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12585 (ix86_valid_target_attribute_inner_p): Ditto.
12586 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12587 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12588 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12589 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12590 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12592 * config/i386/i386.opt: Add -mcldemote.
12593 * config/i386/x86intrin.h: New header.
12594 * doc/invoke.texi: Add -mcldemote.
12596 2018-05-14 Richard Biener <rguenther@suse.de>
12598 * doc/match-and-simplify.texi: Adjust :s documentation.
12600 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12602 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12603 intended memcpy size.
12604 (REORDER_45): Likewise.
12606 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12608 * sort.cc: New file.
12609 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12610 * vec.c (qsort_chk): Use gcc_qsort.
12611 * Makefile.in (OBJS-libcommon): Add sort.o.
12612 (build/sort.o): New target. Use it...
12613 (BUILD_RTL): ... here, and...
12614 (build/gencfn-macros): ... here, and...
12615 (build/genmatch): ... here.
12617 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12618 Chung-Ju Wu <jasonwucj@gmail.com>
12620 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12621 * config/nds32/nds32-graywolf.md: New file.
12622 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12623 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12625 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12626 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12627 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12628 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12629 * config/nds32/pipelines.md: Include n15 settings.
12631 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12632 Chung-Ju Wu <jasonwucj@gmail.com>
12634 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12635 * config/nds32/nds32-n13.md: New file.
12636 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12637 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12639 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12640 * config/nds32/nds32.md (pipeline_model): Add n13.
12641 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12642 * config/nds32/pipelines.md: Include n13 settings.
12644 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12645 Chung-Ju Wu <jasonwucj@gmail.com>
12647 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12648 * config/nds32/nds32-n10.md: New file.
12649 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12650 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12652 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12653 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12654 * config/nds32/nds32.md (pipeline_model): Add n10.
12655 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12656 * config/nds32/pipelines.md: Include n10 settings.
12658 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12659 Kito Cheng <kito.cheng@gmail.com>
12660 Chung-Ju Wu <jasonwucj@gmail.com>
12662 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12663 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12664 Add enum values for DSP extension instructions.
12665 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12667 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12668 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12669 New code iterators.
12670 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12671 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12672 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12673 * config/nds32/nds32-intrinsic.md: Likewise.
12674 * config/nds32/nds32_intrinsic.h: Likewise.
12675 * config/nds32/nds32-md-auxiliary.c: Likewise.
12676 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12677 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12678 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12679 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12680 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12681 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12682 TYPE_DMAC in switch statement.
12683 * config/nds32/nds32.c: New checking and implementation for DSP
12684 extension instructions.
12685 * config/nds32/nds32.h: Likewise.
12686 * config/nds32/nds32.md: Likewise.
12687 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12688 * config/nds32/predicates.md: Implement new predicates for DSP
12691 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12693 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12694 Reformat alternatives and attributes so it is easier to identify
12695 which constraints/attributes go with which instruction.
12696 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12697 (mov<mode>_softfloat32, FMOVE64): Likewise.
12698 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12699 (mov<mode>_softfloat64, FMOVE64): Likewise.
12701 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12703 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12705 (Basic PowerPC Built-in Functions): The new name of the
12706 subsection previously known as "PowerPC Built-in Functions".
12707 (Basic PowerPC Built-in Functions Available on all Configurations):
12709 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12710 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12711 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12712 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12714 2018-05-11 Martin Jambor <mjambor@suse.cz>
12717 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12720 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12723 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12725 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12727 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12728 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12729 (ix86_handle_option): Handle -mwaitpkg.
12730 * config.gcc: New header.
12731 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12732 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12733 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12735 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12736 OPTION_MASK_ISA_WAITPKG.
12737 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12738 (ix86_option_override_internal): Add PTA_WAITPKG.
12739 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12740 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12741 IX86_BUILTIN_TPAUSE.
12742 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12743 __builtin_ia32_umwait and __builtin_ia32_tpause.
12744 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12745 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12746 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12747 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12748 UNSPECV_TPAUSE): New.
12749 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12750 * config/i386/i386.opt: Add -mwaitpkg.
12751 * config/i386/waitpkgintrin.h: New file.
12752 * config/i386/x86intrin.h: New header.
12753 * doc/invoke.texi: Add -mwaitpkg.
12755 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12758 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12760 (cortex-m0): Use armv6s-m isa.
12761 (cortex-m0plus): Likewise.
12762 (cortex-m1): Likewise.
12763 (cortex-m0.small-multiply): Likewise.
12764 (cortex-m0plus.small-multiply): Likewise.
12765 (cortex-m1.small-multiply): Likewise.
12767 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12768 Jakub Jelinek <jakub@redhat.com>
12770 PR tree-optimization/85692
12771 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12772 source permute as well.
12774 2018-05-11 Martin Liska <mliska@suse.cz>
12777 * doc/extend.texi: Document LLVM style format for no_sanitize
12780 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12782 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12783 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12784 (mode_supports_vsx_dform_quad): Likewise.
12785 (mode_supports_vmx_dform): Move these functions to be next to the
12786 other mode_supports functions.
12787 (mode_supports_dq_form): Likewise.
12788 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12789 mode_supports_dq_form.
12790 (reg_offset_addressing_ok_p): Likewise.
12791 (offsettable_ok_by_alignment): Likewise.
12792 (rs6000_legitimate_offset_address_p): Likewise.
12793 (legitimate_lo_sum_address_p): Likewise.
12794 (rs6000_legitimize_address): Likewise.
12795 (rs6000_legitimize_reload_address): Likewise.
12796 (rs6000_secondary_reload_inner): Likewise.
12797 (rs6000_preferred_reload_class): Likewise.
12798 (rs6000_output_move_128bit): Likewise.
12800 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12802 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12803 Generate SImode target register for null target.
12804 <case IX86_BUILTIN_XGETBV>: Ditto.
12805 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12806 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12808 2018-05-10 Carl Love <cel@us.ibm.com>
12810 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12811 dcbtt and dcbtstt if operands[2] is 0.
12813 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12816 * config/i386/sse.md (usadv64qi): New expander.
12818 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12820 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12821 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12822 -maltivec=be support.
12823 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12824 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12825 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12826 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12827 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12828 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12829 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12830 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12831 altivec_vsumsws): Adjust.
12832 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12833 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12834 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12836 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12837 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12838 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12839 (altivec_lve<VI_char>x): Delete expand.
12840 (*altivec_lve<VI_char>x_internal): Rename to...
12841 (altivec_lve<VI_char>x): ... this.
12842 (altivec_lvxl_<mode>): Delete expand.
12843 (*altivec_lvxl_<mode>_internal): Rename to ...
12844 (altivec_lvxl_<mode>): ... this.
12845 (altivec_stvxl_<mode>): Delete expand.
12846 (*altivec_stvxl_<mode>_internal): Rename to ...
12847 (altivec_stvxl_<mode>): ... this.
12848 (altivec_stve<VI_char>x): Delete expand.
12849 (*altivec_stve<VI_char>x_internal): Rename to ...
12850 (altivec_stve<VI_char>x): ... this.
12851 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12852 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12853 reduc_plus_scal_<mode>): Adjust.
12854 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12856 (rs6000_cpu_cpp_builtins): Adjust.
12857 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12858 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12859 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12860 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12861 -maltivec=be support.
12862 (rs6000_split_vec_extract_var): Adjust.
12863 (rs6000_split_v4si_init): Adjust.
12864 (swap_selector_for_mode): Delete.
12865 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12866 altivec_expand_stvex_be): Delete.
12867 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12868 -maltivec=be support.
12869 (rs6000_gimple_fold_builtin): Ditto.
12870 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12872 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12873 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12874 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12875 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12876 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12877 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12878 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12879 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12880 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12881 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12882 anonymous split): Adjust.
12883 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12884 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12886 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12888 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12889 when --with-gxx-include-dir is also specified.
12890 * configure: Regenerate.
12892 2018-05-09 Jim Wilson <jimw@sifive.com>
12895 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12896 * config/riscv/t-withmultilib: New.
12897 * config/riscv/withmultilib.h: New.
12898 * doc/install.texi: Document RISC-V --with-multilib-list support.
12900 2018-05-09 Richard Biener <rguenther@suse.de>
12902 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12904 (vect_bb_vectorization_profitable_p): Adjust. Compute
12905 actual scalar cost using the cost vector and the add_stmt_cost
12908 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12910 PR rtl-optimization/85645
12911 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12912 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12914 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12916 PR rtl-optimization/85645
12917 * shrink-wrap.c (spread_components): Return a boolean saying if
12918 anything was changed.
12919 (try_shrink_wrapping_separate): Iterate spread_components until
12920 nothing changes anymore.
12922 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12924 PR rtl-optimization/85645
12925 * regrename.c (build_def_use): Also kill the chains that include the
12926 destination of a REG_CFA_REGISTER note.
12928 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12930 PR rtl-optimization/85645
12931 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12932 insn that has a REG_CFA_REGISTER note.
12934 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12936 * cfgexpand.c (expand_clobber): New function.
12937 (expand_gimple_stmt_1): Use it.
12938 * tree-vect-stmts.c (vect_clobber_variable): New function,
12940 (vectorizable_simd_clone_call): ...here.
12941 (vectorizable_store): Emit a clobber either side of an
12942 IFN_STORE_LANES sequence.
12943 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12945 2018-05-09 Tom de Vries <tom@codesourcery.com>
12948 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12949 (define_insn "trap_if_false"): Add exit after trap.
12951 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12953 PR rtl-optimization/85638
12954 * bb-reorder.c: Include common/common-target.h.
12955 (create_forwarder_block): New function extracted from...
12956 (fix_up_crossing_landing_pad): ...here. Rename into...
12957 (dw2_fix_up_crossing_landing_pad): ...this.
12958 (sjlj_fix_up_crossing_landing_pad): New function.
12959 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12960 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12961 from both partitions and exit the loop after one iteration.
12963 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12966 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12968 (Basic PowerPC Built-in Functions): The new name of the
12969 subsection previously known as "PowerPC Built-in Functions".
12970 (Basic PowerPC Built-in Functions Available on all Configurations):
12972 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12974 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12976 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12978 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12981 2018-05-08 Jim Wilson <jimw@sifive.com>
12983 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12984 (LD_EMUL_SUFFIX): New.
12985 (LINK_SPEC): Use it.
12987 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12989 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12991 (Basic PowerPC Built-in Functions): The new name of the
12992 subsection previously known as "PowerPC Built-in Functions".
12993 (Basic PowerPC Built-in Functions Available on all Configurations):
12995 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12997 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12999 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13001 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13004 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13007 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13008 after cmpelim optimization.
13010 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13012 * config.gcc: Support "goldmont".
13013 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13014 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13015 PROCESSOR_GOLDMONT.
13016 * config/i386/i386.c (m_GOLDMONT): Define.
13017 (processor_target_table): Add "goldmont".
13018 (PTA_GOLDMONT): Define.
13019 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13020 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13021 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13022 (fold_builtin_cpu): Add "goldmont".
13023 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13024 (ix86_option_override_internal): Add "goldmont".
13025 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13026 (processor_type): Add PROCESSOR_GOLDMONT.
13027 * config/i386/i386.md: Add CPU "glm".
13028 * config/i386/glm.md: New file.
13029 * config/i386/x86-tune.def: Add m_GOLDMONT.
13030 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13032 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13035 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13037 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13038 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13039 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13042 * config/i386/i386.c (ix86_fold_builtin): Handle
13043 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13046 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13047 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13049 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13052 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13053 (check_arch): Likewise.
13054 (check_fpu): Return the result rather than printing it.
13055 (end arch): Fix operator precedence.
13056 (end cpu): Likewise.
13057 (END): Print the result from check_fpu.
13059 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13060 Alan Hayward <alan.hayward@arm.com>
13061 David Sherwood <david.sherwood@arm.com>
13063 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13064 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13065 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13066 (*fcmuo<mode>_and): New patterns.
13068 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13070 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13071 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13072 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13073 (cmp_op, sve_imm_con): New code attributes.
13074 (SVE_COND_INT_CMP, imm_con): Delete.
13075 (cmp_op): Remove above unspecs from int attribute.
13076 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13078 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13079 comparison-specific unspecs.
13080 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13081 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13082 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13083 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13084 (*vec_fcm<cmp_op><mode>): Rename to...
13085 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13086 (*vec_fcmuo<mode>): Rename to...
13087 (*fcmuo<mode>): ...this and adjust likewise.
13088 (*pred_fcm<cmp_op><mode>): New pattern.
13089 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13090 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13092 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13094 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13095 (aarch64_emit_sve_predicated_cond): New function.
13096 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13097 (aarch64_emit_unspec_cond_or): Replace with...
13098 (aarch64_emit_sve_or_conds): ...this new function. Use
13099 aarch64_emit_sve_ptrue_op for the individual comparisons and
13100 aarch64_emit_binop to OR them together.
13101 (aarch64_emit_inverted_unspec_cond): Replace with...
13102 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13103 aarch64_emit_sve_ptrue_op for the comparison and
13104 aarch64_emit_unop to invert the result.
13105 (aarch64_expand_sve_vec_cmp_float): Update after the above
13106 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13108 2018-05-07 Nathan Sidwell <nathan@acm.org>
13110 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13111 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13112 (Backwards Compatibility): Likewise.
13114 2018-05-07 Luis Machado <luis.machado@linaro.org>
13118 2018-05-07 Luis Machado <luis.machado@linaro.org>
13120 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13121 <prefetch_dynamic_strides>: New const bool field.
13122 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13123 prefetch_dynamic_strides.
13124 (exynosm1_prefetch_tune): Likewise.
13125 (thunderxt88_prefetch_tune): Likewise.
13126 (thunderx_prefetch_tune): Likewise.
13127 (thunderx2t99_prefetch_tune): Likewise.
13128 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13130 (aarch64_override_options_internal): Update to set
13131 PARAM_PREFETCH_DYNAMIC_STRIDES.
13132 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13133 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13134 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13135 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13136 prefetch-dynamic-strides setting.
13138 2018-05-07 Luis Machado <luis.machado@linaro.org>
13140 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13141 <minimum_stride>: New const int field.
13142 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13143 minimum_stride field.
13144 (exynosm1_prefetch_tune): Likewise.
13145 (thunderxt88_prefetch_tune): Likewise.
13146 (thunderx_prefetch_tune): Likewise.
13147 (thunderx2t99_prefetch_tune): Likewise.
13148 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13149 (aarch64_override_options_internal): Update to set
13150 PARAM_PREFETCH_MINIMUM_STRIDE.
13151 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13152 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13153 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13154 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13155 stride is constant and is below the minimum stride threshold.
13157 2018-05-07 Luis Machado <luis.machado@linaro.org>
13159 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13162 2018-05-07 Luis Machado <luis.machado@linaro.org>
13164 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13165 <prefetch_dynamic_strides>: New const bool field.
13166 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13167 prefetch_dynamic_strides.
13168 (exynosm1_prefetch_tune): Likewise.
13169 (thunderxt88_prefetch_tune): Likewise.
13170 (thunderx_prefetch_tune): Likewise.
13171 (thunderx2t99_prefetch_tune): Likewise.
13172 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13174 (aarch64_override_options_internal): Update to set
13175 PARAM_PREFETCH_DYNAMIC_STRIDES.
13176 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13177 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13178 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13179 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13180 prefetch-dynamic-strides setting.
13182 2018-05-07 Luis Machado <luis.machado@linaro.org>
13184 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13185 <minimum_stride>: New const int field.
13186 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13187 minimum_stride field.
13188 (exynosm1_prefetch_tune): Likewise.
13189 (thunderxt88_prefetch_tune): Likewise.
13190 (thunderx_prefetch_tune): Likewise.
13191 (thunderx2t99_prefetch_tune): Likewise.
13192 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13193 (aarch64_override_options_internal): Update to set
13194 PARAM_PREFETCH_MINIMUM_STRIDE.
13195 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13196 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13197 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13198 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13199 stride is constant and is below the minimum stride threshold.
13201 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13204 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13205 the type is addressable. Don't force op into register if it has
13208 2018-05-05 Roland McGrath <mcgrathr@google.com>
13211 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13212 any section for which we don't know a specific type it should have,
13213 regardless of name. Previously this was done only for the exact
13214 names ".init_array", ".fini_array", and ".preinit_array".
13215 (default_elf_asm_named_section): Add comment about
13216 relationship with default_section_type_flags and SECTION_NOTYPE.
13217 (get_section): Don't consider it a type conflict if one side has
13218 SECTION_NOTYPE and the other doesn't, as long as neither has the
13219 SECTION_BSS et al used in the default_section_type_flags logic.
13221 2018-05-05 Tom de Vries <tom@codesourcery.com>
13224 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13225 (workaround_barsyncs): New function.
13226 (nvptx_reorg): Use workaround_barsyncs.
13227 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13228 (define_expand "nvptx_membar_cta"): New define_expand.
13229 (define_insn "*nvptx_membar_cta"): New insn.
13231 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13233 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13234 To improve optimization opportunities.
13235 * builtin-types.def: The new needed builtin types for the above.
13237 2018-05-04 Richard Biener <rguenther@suse.de>
13239 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13240 * gimple-ssa-store-merging.c
13241 (imm_store_chain_info::output_merged_store): Remove redundant create,
13242 release split_store vector contents on failure.
13243 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13244 scalar stmt vector on cache hit.
13246 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13248 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13250 * config.gcc (powerpc-xilinx-eabi*): Remove.
13251 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13253 (fusion_addis_mem_combo_load): Ditto.
13254 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13256 (rs6000_cpu_cpp_builtins): Ditto.
13257 * config/rs6000/rs6000-linux.c
13258 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13259 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13260 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13262 (rs6000_setup_reg_addr_masks): Ditto.
13263 (rs6000_init_hard_regno_mode_ok): Ditto.
13264 (rs6000_option_override_internal): Ditto.
13265 (legitimate_lo_sum_address_p): Ditto.
13266 (rs6000_legitimize_address): Ditto.
13267 (rs6000_legitimize_reload_address): Ditto.
13268 (rs6000_legitimate_address_p): Ditto.
13269 (abi_v4_pass_in_fpr): Ditto.
13270 (setup_incoming_varargs): Ditto.
13271 (rs6000_gimplify_va_arg): Ditto.
13272 (rs6000_split_multireg_move): Ditto.
13273 (rs6000_savres_strategy): Ditto.
13274 (rs6000_emit_prologue_components): Ditto.
13275 (rs6000_emit_epilogue_components): Ditto.
13276 (rs6000_emit_prologue): Ditto.
13277 (rs6000_emit_epilogue): Ditto.
13278 (rs6000_elf_file_end): Ditto.
13279 (rs6000_function_value): Ditto.
13280 (rs6000_libcall_value): Ditto.
13281 * config/rs6000/rs6000.h: Ditto.
13282 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13283 (TARGET_MINMAX): ... this. New.
13284 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13285 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13286 (*movsi_internal1_single): Delete.
13287 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13288 mfpu=, mxilinx-fpu): Delete.
13289 * config/rs6000/singlefp.h: Delete.
13290 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13291 * config/rs6000/t-rs6000: Ditto.
13292 * config/rs6000/t-xilinx: Delete.
13293 * config/rs6000/titan.md: Adjust for fp_type removal.
13294 * config/rs6000/vsx.md: Remove Xilinx FP support.
13295 (VStype_simple): Delete.
13296 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13297 * config/rs6000/xfpu.h: Delete.
13298 * config/rs6000/xfpu.md: Delete.
13299 * config/rs6000/xilinx.h: Delete.
13300 * config/rs6000/xilinx.opt: Delete.
13301 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13302 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13304 2018-05-04 Tom de Vries <tom@codesourcery.com>
13307 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13310 2018-05-04 Richard Biener <rguenther@suse.de>
13312 PR middle-end/85627
13313 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13314 (expand_complex_div_wide): Likewise.
13315 (expand_complex_operations_1): Likewise.
13316 (expand_complex_libcall): Preserve EH info of the original stmt.
13317 (tree_lower_complex): Handle removed blocks.
13318 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13319 on complex multiplication and division libcall builtins.
13321 2018-05-04 Richard Biener <rguenther@suse.de>
13323 PR middle-end/85574
13324 * fold-const.c (negate_expr_p): Restrict negation of operand
13325 zero of a division to when we know that can happen without
13327 (fold_negate_expr_1): Likewise.
13329 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13332 * real.h (real_nextafter): Declare.
13333 * real.c (real_nextafter): New function.
13334 * fold-const-call.c (fold_const_nextafter): New function.
13335 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13336 CASE_CFN_NEXTTOWARD.
13337 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13338 even when arg1_mode is different from arg0_mode.
13340 2018-05-03 Nathan Sidwell <nathan@acm.org>
13342 * doc/extend.texi (Deprecated Features): Remove
13343 -ffriend-injection.
13344 (Backwards Compatibility): Likewise.
13345 * doc/invoke.texi (C++ Language Options): Likewise.
13346 (C++ Dialect Options): Likewise.
13348 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13351 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13352 _mm512_mask_mullox_epi64): New intrinsics.
13354 2018-05-03 Tom de Vries <tom@codesourcery.com>
13357 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13358 dump files): Add offload-tree.
13360 2018-05-03 Richard Biener <rguenther@suse.de>
13362 PR tree-optimization/85615
13363 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13364 to loops not nested in BBs loop father to avoid creating multi-entry
13367 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13369 PR tree-optimization/70291
13370 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13371 arguments. Change return type to tree. Emit libcall as a new
13372 statement rather than replacing existing one when inplace_p is true.
13373 (expand_complex_multiplication_components): New function.
13374 (expand_complex_multiplication): Expand floating-point complex
13375 multiplication using the above.
13376 (expand_complex_division): Rename inner_type parameter to type.
13377 Update expand_complex_libcall call-site.
13378 (expand_complex_operations_1): Update expand_complex_multiplication
13379 and expand_complex_division call-sites.
13381 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13384 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13385 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13386 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13387 the highest significant bit of the shift count mask is clear. In
13388 check whether and[sq]i3 is needed verify that all significant bits
13389 of the shift count other than the highest are set.
13391 2018-05-02 Tom de Vries <tom@codesourcery.com>
13394 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13395 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13396 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13397 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13398 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13399 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13400 __builtin_goacc_parlevel_size.
13402 2018-05-02 Richard Biener <rguenther@suse.de>
13404 PR tree-optimization/85597
13405 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13406 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13409 2018-05-02 Tom de Vries <tom@codesourcery.com>
13412 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13413 dump files): Add ltrans-tree.
13415 2018-05-02 Tom de Vries <tom@codesourcery.com>
13418 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13419 dump files): Add wpa-ipa.
13421 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13423 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13424 powerpc*-*-linux*paired* target.
13425 * config/rs6000/750cl.h: Delete.
13426 * config/rs6000/paired.h: Delete.
13427 * config/rs6000/paired.md: Delete.
13428 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13430 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13431 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13432 comment. Remove paired float support.
13433 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13434 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13436 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13437 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13439 * config/rs6000/rs6000.c: Remove paired float support.
13440 (paired_expand_vector_init, paired_expand_vector_move,
13441 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13442 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13443 paired_expand_builtin, paired_expand_predicate_builtin,
13444 paired_init_builtins): Delete.
13445 * config/rs6000/rs6000.h: Remove paired float support.
13446 * config/rs6000/rs6000.md: Remove paired float support.
13447 (move_from_CR_ov_bit): Delete.
13448 * config/rs6000/rs6000.opt (mpaired): Delete.
13449 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13450 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13452 2018-05-02 Richard Biener <rguenther@suse.de>
13454 PR middle-end/85567
13455 * gimplify.c (gimplify_save_expr): When in SSA form allow
13456 SAVE_EXPRs to compute to SSA vars.
13458 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13461 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13462 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13463 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13464 clobber operands[2], instead use a new pseudo. Formatting fixes.
13466 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13468 PR tree-optimization/85586
13469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13470 exit early for statements in the same group if the accesses are
13473 2018-05-02 Tom de Vries <tom@codesourcery.com>
13476 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13479 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13481 PR tree-optimization/85143
13482 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13484 2018-05-01 Tom de Vries <tom@codesourcery.com>
13487 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13488 not found" error message.
13490 2018-05-01 Tom de Vries <tom@codesourcery.com>
13493 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13494 * vec.c (test_ordered_remove_if): New function.
13495 (vec_c_tests): Call test_ordered_remove_if.
13496 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13497 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13498 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13499 VEC_ORDERED_REMOVE_IF.
13501 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13503 PR tree-optimization/82665
13504 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13505 pointer subtraction where arguments come from a memchr call.
13507 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13509 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13510 --push-state --as-needed and --pop-state instead of --as-needed and
13511 --no-as-needed if ld supports it.
13512 * configure: Regenerated.
13515 * doc/install.texi2html: Replace _002d with - and _002a with * in
13516 generated html files using sed.
13518 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13521 * gcc-rich-location.c (blank_line_before_p): New function.
13522 (use_new_line): New function.
13523 (gcc_rich_location::add_fixit_insert_formatted): New function.
13524 * gcc-rich-location.h
13525 (gcc_rich_location::add_fixit_insert_formatted): New function.
13527 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13529 * selftest.c (assert_streq): Rename "expected" and "actual" to
13530 "val1" and "val2". Extend NULL-handling to cover both inputs
13531 symmetrically, while still requiring both to be non-NULL for a pass.
13532 * selftest.h (assert_streq): Rename "expected" and "actual" to
13534 (ASSERT_EQ): Likewise.
13535 (ASSERT_EQ_AT): Likewise.
13536 (ASSERT_KNOWN_EQ): Likewise.
13537 (ASSERT_KNOWN_EQ_AT): Likewise.
13538 (ASSERT_NE): Likewise.
13539 (ASSERT_MAYBE_NE): Likewise.
13540 (ASSERT_MAYBE_NE_AT): Likewise.
13541 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13542 the assertion to pass.
13543 (ASSERT_STREQ_AT): Likewise.
13545 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13547 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13548 interaction with -pie.
13550 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13552 * selftest.h: Fix alphabetization of per-source-file selftest
13555 2018-04-30 Jason Merrill <jason@redhat.com>
13557 PR c++/61982 - dead stores to destroyed objects.
13558 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13561 2018-04-30 Jason Merrill <jason@redhat.com>
13563 * tree.c (build_clobber): New.
13564 * tree.h: Declare it.
13565 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13567 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13569 * diagnostic-show-locus.c (layout::layout): Update for
13570 location_get_source_line returning a char_span.
13571 (struct char_span): Move to input.h.
13572 (struct correction): Update for fields in char_span becoming
13574 (struct source_line): Update for location_get_source_line
13575 returning a char_span.
13576 (layout::print_line): Likewise.
13577 * edit-context.c (edited_file::print_content): Likewise.
13578 (edited_file::print_diff_hunk): Likewise.
13579 (edited_file::print_run_of_changed_lines): Likewise.
13580 (edited_file::get_num_lines): Likewise.
13581 (edited_line::edited_line): Likewise.
13582 * final.c (asm_show_source): Likewise.
13583 * input.c (location_get_source_line): Convert return type
13584 from const char * to char_span, losing the final "line_len"
13586 (dump_location_info): Update for the above.
13587 (get_substring_ranges_for_loc): Likewise. Use a char_span
13588 when handling the literal within the line.
13589 (test_reading_source_line): Update for location_get_source_line
13590 returning a char_span.
13591 * input.h (class char_span): Move here from
13592 diagnostic-show-locus.c, converting from a struct to a class.
13593 Make data members private.
13594 (char_span::operator bool): New.
13595 (char_span::length): New.
13596 (char_span::get_buffer): New.
13597 (char_span::operator[]): New.
13598 (char_span::subspan): Make const.
13599 (char_span::xstrdup): New.
13600 (location_get_source_line): Convert return type from const char *
13601 to char_span, losing the final "line_size" param.
13603 2018-04-30 Jan Hubicka <jh@suse.cz>
13605 * lto-wrapper.c (ltrans_priorities): New static var.
13606 (cmp_priority): New.
13607 (run_gcc): Read priorities and if doing parallel build order
13608 the Makefile by them.
13610 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13612 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13614 2018-04-30 Richard Biener <rguenther@suse.de>
13616 * tree-cfg.c (verify_address): Remove base argument, add
13617 flag whether to check TREE_ADDRESSABLE and do that.
13618 (verify_expr): Remove.
13619 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13620 (verify_gimple_assign_single): Likewise.
13621 (verify_gimple_switch): Likewise.
13622 (verify_expr_location_1): Dereference tp once. Add (disabled)
13623 piece from verify_expr.
13624 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13626 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13628 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13630 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13632 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13633 (small_data_pattern): Likewise.
13634 (arc_rewrite_small_data): Likewise.
13635 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13636 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13637 (get_symbol_alignment): New function.
13638 (legitimate_small_data_address_p): Likewise.
13639 (legitimate_scaled_address): Update, call
13640 legitimate_small_data_address_p.
13641 (output_sdata): New static variable.
13642 (arc_print_operand): Update how we handle small data operands.
13643 (arc_print_operand_address): Likewise.
13644 (arc_legitimate_address_p): Update, use
13645 legitimate_small_data_address_p.
13646 (arc_rewrite_small_data_p): Remove.
13647 (arc_rewrite_small_data_1): Likewise.
13648 (arc_rewrite_small_data): Likewise.
13649 (small_data_pattern): Likewise.
13650 (compact_sda_memory_operand): Update to use
13651 legitimate_small_data_address_p and get_symbol_alignment.
13652 (prepare_move_operands): Don't rewite sdata pattern.
13653 (prepare_extend_operands): Remove.
13654 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13656 (zero_extendqisi2): Likewise.
13657 (zero_extendhisi2): Likewise.
13658 (extendqihi2): Likewise.
13659 (extendqisi2): Likewise.
13660 (extendhisi2): Likewise.
13661 (addsi3): Likewise.
13662 (subsi3): Likewise.
13663 (andsi3): Likewise.
13664 * config/arc/constraints.md (Usd): Change it to memory constraint.
13666 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13668 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13669 as source of std instructions.
13670 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13671 allow 6-bit constants as source for store instructions.
13672 (movdi_insn): Update instruction pattern to allow 6-bit constants
13673 as source for store instructions.
13675 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13677 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13679 2018-04-30 Nathan Sidwell <nathan@acm.org>
13680 Sandra Loosemore <sandra@codesourcery.com>
13682 * dumpfile.c (dump_open): Allow '-' for stdout.
13683 * doc/invoke.texi (Developer Options): Document dump filename
13684 determination early. Document stdin/stdout selection.
13686 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13688 Microblaze Target: PIC data text relative
13690 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13691 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13693 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13694 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13695 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13696 New addressing mode for data-text relative position indepenedent code.
13697 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13698 'ADDRESS_SYMBOLIC_TXT_REL'.
13699 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13700 (microblaze_legitimate_pic_operand): Exclude function calls from
13701 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13702 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13704 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13705 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13706 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13707 for 'address + offset'.
13708 (microblaze_expand_prologue): Add new function prologue call for
13710 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13711 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13712 table in case of TARGET_PIC_DATA_TEXT_REL.
13713 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13714 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13715 Add new macros 'UNSPEC_TEXT',
13716 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13717 + exclude function calls from 'UNSPEC_PLT' in case of data text
13719 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13720 new target hook for generating address diff vector tables in case of
13722 * doc/tm.texi : Regenerate.
13723 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13724 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13725 of addr diff vector generation.
13726 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13727 target hook definition.
13728 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13729 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13730 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13731 option for data text relative.
13733 2018-04-30 Richard Biener <rguenther@suse.de>
13735 * tree-chrec.h (evolution_function_is_constant_p): Remove
13737 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13739 2018-04-30 Richard Biener <rguenther@suse.de>
13742 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13744 2018-04-30 Richard Biener <rguenther@suse.de>
13746 PR tree-optimization/28364
13747 PR tree-optimization/85275
13748 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13749 copying first exit test.
13751 2018-04-28 Mark Wielaard <mark@klomp.org>
13753 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13754 dwarf_version >= 5.
13755 (dwarf_AT): Handle DW_AT_addr_base.
13756 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13758 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13761 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13762 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13763 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13764 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13766 2018-04-28 Richard Biener <rguenther@suse.de>
13768 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13769 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13770 to reflect use. Only add interesting stmts.
13772 2018-04-27 Martin Jambor <mjambor@suse.cz>
13775 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13776 the jump function allows for passing through aggregate values.
13778 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13780 * input.h (in_system_header_at): Convert from macro to inline
13782 (from_macro_expansion_at): Likewise.
13783 (from_macro_definition_at): Likewise.
13785 2018-04-27 Jeff Law <law@redhat.com>
13787 * config.gcc: Mark tile* targets as deprecated/obsolete.
13789 2018-04-27 Richard Biener <rguenther@suse.de>
13791 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13794 2018-04-27 Richard Biener <rguenther@suse.de>
13796 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13798 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13800 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13801 with Yd constraint. Set "preferred_for_speed" attribute from
13802 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13803 with Yd constraint.
13804 (*movdi_internal): Ditto.
13805 (movti_interunit splitters): Remove
13806 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13807 (movdi_interunit splitters): Ditto.
13808 * config/i386/constraints.md (Ye): Remove.
13809 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13811 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13814 * config/aarch64/constraints.md (Usg): Limit to 31.
13815 (Usj): Limit to 63.
13817 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13819 PR tree-optimization/85529
13820 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13821 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13822 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13823 zero extension or masking of the MSB bit.
13824 (optimize_range_tests): Add FIRST_BB argument, pass it through
13825 to optimize_range_tests_var_bound.
13826 (maybe_optimize_range_tests, reassociate_bb): Adjust
13827 optimize_range_tests callers.
13829 2018-04-26 Richard Biener <rguenther@suse.de>
13830 Jakub Jelinek <jakub@redhat.com>
13832 * cgraph.h (symbol_table): Just declare debug method here.
13833 * symtab.c (symbol_table::debug): Define.
13835 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13837 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13839 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13841 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13842 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13843 (*movdi_internal): Substitute Yi and Yj constraint with x
13844 and Ym and Yn constraint with y constraint. Update "isa"
13845 attribute and set "preferred_for_speed" attribute from
13846 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13847 (*movsi_internal): Ditto.
13848 (*movdf_internal): Ditto.
13849 (*movsf_internal): Ditto.
13850 (*zero_extendsidi2): Ditto.
13851 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13852 (sse2_loadld): Ditto.
13853 (*vec_extract<ssevecmodelower>_0): Ditto.
13854 (*vec_extractv4si_0_zext_sse4): Ditto.
13855 (vec_concatv2di): Ditto.
13856 (*vec_dup<mode>): Ditto.
13857 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13858 * config/i386/constraints.md (Yi): Remove.
13863 2018-04-26 Nathan Sidwell <nathan@acm.org>
13865 * dumpfile.c (dump_open): New.
13866 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13867 (dump_finish): Detect stdio/stderr by value not name.
13869 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13871 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13873 2018-04-26 Tom de Vries <tom@codesourcery.com>
13876 * config/nvptx/nvptx.c (verify_neutering_jumps)
13877 (verify_neutering_labels): New function
13878 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13880 2018-04-26 Tom de Vries <tom@codesourcery.com>
13883 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13884 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13887 2018-04-26 Richard Biener <rguenther@suse.de>
13888 Tom de Vries <tom@codesourcery.com>
13891 * lto-streamer-out.c (output_function): Fixup loops if required to match
13892 discovery done in the reader.
13894 2018-04-26 Richard Biener <rguenther@suse.de>
13896 PR tree-optimization/85116
13897 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13898 have a loop exit from the single latch predecessor. Remove
13899 case of header with just condition.
13900 (ch_base::copy_headers): Exclude infinite loops from any
13902 (pass_ch::execute): Record exits.
13904 2018-04-26 Richard Biener <rguenther@suse.de>
13906 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13907 prologue cost vector and pass it to vect_get_load_cost.
13908 (vect_get_peeling_costs_all_drs): Likewise.
13909 (vect_peeling_hash_get_lowest_cost): Likewise.
13910 (vect_enhance_data_refs_alignment): Likewise.
13912 2018-04-26 Richard Biener <rguenther@suse.de>
13914 PR middle-end/85450
13915 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13916 checking of integer<->pointer conversions.
13917 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13918 sign-/zero-extending pointer types.
13919 (expand_omp_for_static_chunk): Likewise.
13921 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13922 Jean Lee <xiaoyur347@gmail.com>
13924 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13925 (TARGET_ASAN_SHADOW_OFFSET): Define.
13926 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13927 true for -fsanitize=address.
13929 2018-04-25 Mark Wielaard <mark@klomp.org>
13931 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13934 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13936 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13937 than "alu", remove explicit "memory" and "imm_disp" attributes.
13938 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13940 PR middle-end/85414
13941 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13942 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13943 gen_lowpart_no_emit.
13945 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13948 * config/i386/i386.c (ix86_expand_builtin): Change memory
13949 operand to XI, extend p0 to Pmode.
13950 * config/i386/i386.md: Change unspec volatile and operand
13951 1 mode to XI, change operand 0 mode to P.
13953 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13955 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13956 GET_MODE_MASK before any checking.
13957 (nds32_can_use_bset_p): Likewise.
13958 (nds32_can_use_btgl_p): Likewise.
13960 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13962 * config/nds32/nds32-doubleword.md: New define_split pattern for
13963 illegal register number.
13965 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13967 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13969 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13971 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13973 2018-04-25 Richard Biener <rguenther@suse.de>
13975 * lto-streamer.h (LTO_major_version): Bump to 8.
13977 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13979 * BASE-VER: Set to 9.0.0.
13981 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13983 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13984 in __abskf2 and __powikf2.
13986 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13989 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13990 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13991 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13992 Use the above on operand 2. Reindent.
13993 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13995 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13998 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14000 * config/i386/i386.opt (mcet): Removed.
14001 * doc/install.texi: Remove -mcet documentation.
14002 * doc/invoke.texi: Likewise.
14004 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14007 * doc/install.texi: Remove -mcet from bootstrap-cet.
14009 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14012 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14013 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14017 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14018 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14019 containing a CONST_VECTOR.
14021 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14023 * doc/install.texi: Update newlib dependency for nvptx.
14025 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14028 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14029 instead of INTVAL when shifting x left.
14031 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14033 PR tree-optimization/85478
14034 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14035 vect_grouped_store_supported for single element vectors.
14037 2018-04-24 Richard Biener <rguenther@suse.de>
14040 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14041 load cost increase to the case of non-constant step.
14043 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14046 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14047 destination if any_malformed_asm.
14049 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14051 PR middle-end/85496
14052 * expr.c (store_field): In the bitfield case, if the value comes from
14053 a function call and is returned in registers by means of a PARALLEL,
14054 do not change the mode of the temporary unless BLKmode and VOIDmode.
14056 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14058 PR rtl-optimization/85423
14059 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14060 dependencies to debug insns when the previous insn is non-debug.
14062 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14064 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14065 enums into a single definition.
14066 (fls): Fix predicates and printing.
14069 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14071 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14072 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14073 and short u6 immediate.
14074 (check_if_valid_sleep_operand): Remove.
14075 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14077 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14079 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14080 flag_always_save_lp condition.
14081 * config/nds32/nds32.opt (malways-save-lp): New option.
14083 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14085 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14086 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14087 * config/nds32/nds32.h
14088 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14089 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14091 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14093 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14094 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14096 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14097 Chung-Ju Wu <jasonwucj@gmail.com>
14099 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14101 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14102 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14104 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14106 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14108 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14110 * config/nds32/nds32-protos.h (nds32_data_alignment,
14111 nds32_local_alignment): Declare.
14112 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14113 nds32_local_alignment): New functions.
14114 (TARGET_CONSTANT_ALIGNMENT): Define.
14115 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14117 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14119 * config/nds32/nds32.c
14120 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14121 (TARGET_MODES_TIEABLE_P): Likewise.
14123 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14125 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14126 level Ofast and Og.
14128 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14129 Chung-Ju Wu <jasonwucj@gmail.com>
14131 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14132 for unaligned access.
14133 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14135 * config/nds32/nds32-intrinsic.md: Likewise.
14136 * config/nds32/nds32_intrinsic.h: Likewise.
14137 * config/nds32/nds32.h (nds32_builtins): Likewise.
14138 * config/nds32/nds32.opt (munaligned-access): New option.
14139 * config/nds32/nds32.c (nds32_asm_file_start): Display
14140 flag_unaligned_access status.
14142 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14144 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14145 -mno-relax is present.
14146 * config/riscv/linux.h (LINK_SPEC): Ditto.
14148 2018-04-20 Martin Sebor <msebor@redhat.com>
14151 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14153 (gimple_fold_builtin_stxcpy_chk): Same.
14154 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14156 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14159 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14160 __powikf2 when long double is IEEE 128-bit.
14162 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14164 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14165 step to make sure stack always aligned.
14167 2018-04-20 Carl Love <cel@us.ibm.com>
14170 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14171 size check for arg0.
14173 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14174 Tom de Vries <tom@codesourcery.com>
14177 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14178 Emit insns for calls too.
14179 (nvptx_find_par): Always look for worker-level predecessor insn.
14180 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14182 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14183 (nvptx_process_pars): Propagate frames for calls.
14185 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14188 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14190 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14191 (ix86_handle_option): Don't handle OPT_mibt.
14192 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14194 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14196 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14197 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14198 (ix86_target_macros): Define __CET__ with flag_cf_protection
14199 for -fcf-protection.
14200 * config/i386/i386.c (isa2_opts): Remove -mibt.
14201 * config/i386/i386.h (TARGET_IBT): Removed.
14202 (TARGET_IBT_P): Likewise.
14203 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14204 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14205 * config/i386/i386.opt (mcet): Update help message.
14206 (mshstk): Likewise.
14208 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14209 -mcet as an alias for -mshstk.
14211 2018-04-20 Richard Biener <rguenther@suse.de>
14213 PR middle-end/85475
14214 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14215 complexity by forcing a single use of the multiply operand.
14217 2018-04-20 Martin Jambor <mjambor@suse.cz>
14220 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14221 recursion dependency to only apply to non-clones.
14223 2018-04-20 Martin Jambor <mjambor@suse.cz>
14226 * ipa-cp.c (create_specialized_node): Check that clones of
14227 self-recursive edges exist during IPA-CP.
14229 2018-04-19 Toon Moene <toon@moene.org>
14231 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14234 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14236 PR tree-optimization/85467
14237 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14238 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14239 VECTOR_CST element to type.
14241 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14244 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14245 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14246 (builtin_longjmp): Likewise.
14247 (save_stack_nonlocal): New pattern.
14248 (restore_stack_nonlocal): Likewise.
14250 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14253 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14254 Replace ASM_OUTPUT_LABEL with fprintf.
14256 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14259 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14260 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14261 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14262 define __IBT__ and __SHSTK__ for -fcf-protection.
14263 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14265 (ix86_trampoline_init): Likewise.
14266 (x86_output_mi_thunk): Likewise.
14267 (ix86_notrack_prefixed_insn_p): Likewise.
14268 (ix86_option_override_internal): Don't disallow -fcf-protection.
14269 * config/i386/i386.md (rdssp<mode>): Also enable for
14271 (incssp<mode>): Likewise.
14272 (nop_endbr): Likewise.
14273 * config/i386/i386.opt (mcet): Change help message to built-in
14276 (mshstk): Likewise.
14277 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14278 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14279 enable CET built-in functions.
14281 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14283 * common/config/i386/i386-common.c
14284 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14285 OPTION_MASK_ISA_MOVDIRI_UNSET,
14286 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14287 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14288 * config.gcc (movdirintrin.h): New header.
14289 * config/i386/cpuid.h (bit_MOVDIRI,
14290 bit_MOVDIR64B): New bits.
14291 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14293 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14294 (VOID, PVOID, PCVOID)): New function types.
14295 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14296 __builtin_ia32_directstoreu_u64,
14297 __builtin_ia32_movdir64b): New builtins.
14298 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14299 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14301 (ix86_valid_target_attribute_inner_p): Ditto.
14302 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14303 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14304 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14305 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14306 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14307 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14308 (movdiri<mode>, movdir64b_<mode>): New.
14309 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14310 * config/i386/immintrin.h: Include movdirintrin.h.
14311 * config/i386/movdirintrin.h: New file.
14312 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14314 2018-04-19 Richard Biener <rguenther@suse.de>
14316 PR middle-end/85455
14317 * cfg.c (clear_bb_flags): When loop state says we have
14318 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14320 2018-04-19 Richard Biener <rguenther@suse.de>
14322 PR tree-optimization/84737
14323 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14324 copying restrict info.
14325 (vect_setup_realignment): Use it.
14326 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14327 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14328 the first DR to all generated stores.
14329 (vectorizable_load): Likewise for loads.
14331 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14333 PR tree-optimization/85446
14334 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14335 the integral and pointer types to have the same precision.
14337 * doc/install.texi: Document --disable-cet being the default and
14340 2018-04-18 Martin Liska <mliska@suse.cz>
14342 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14345 2018-04-18 Martin Liska <mliska@suse.cz>
14348 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14351 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14352 arguments if they are comparable.
14354 2018-04-18 Martin Liska <mliska@suse.cz>
14357 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14360 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14363 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14366 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14367 ENDBR after calling __morestack.
14369 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14372 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14373 by using gcc_base_ver to generate a gcc_driver_version, and use
14374 it when generating GCC_DRIVER_NAME.
14375 * configure: Regenerate.
14377 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14380 * config.gcc: Obsolete powerpc*-*-*spe*.
14382 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14385 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14386 (stabstr_D): Change type of unum from unsigned int to
14387 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14390 2018-04-17 Jim Wilson <jimw@sifive.com>
14393 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14394 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14395 Set arg_pointer_offset after using pretend_args_size.
14397 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14399 PR rtl-optimization/85431
14400 * dse.c (record_store): Ignore zero width stores.
14403 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14404 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14405 __builtin_stack_restore rather than after it.
14406 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14407 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14408 argument instead of virtual_dynamic_stack_rtx.
14410 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14412 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14414 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14415 Add note to error message to explain internal mapping of overloaded
14416 built-in function name to non-overloaded built-in function name.
14417 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14420 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14423 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14424 where the inputs overlap with the output.
14426 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14428 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14429 (=v, v) alternative and explicit "memory" attribute.
14430 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14431 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14433 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14434 "sselog1" type instead of "sselog".
14435 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14436 "sselog". Remove explicit "memory" attribute.
14437 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14438 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14440 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14441 "sselog1" type instead of "sselog". Remove explicit "memory"
14443 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14444 use "sselog1" type instead of "sselog". Remove explicit "memory"
14446 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14447 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14449 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14450 "sselog1" type instead of "sselog". Remove explicit "memory"
14452 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14453 use "sselog1" type instead of "sselog". Remove explicit "memory"
14457 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14459 PR middle-end/85414
14460 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14463 2018-04-17 Martin Jambor <mjambor@suse.cz>
14466 * ipa-cp.c (create_specialized_node): Call
14467 expand_all_artificial_thunks if necessary.
14469 2018-04-17 Martin Liska <mliska@suse.cz>
14472 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14473 in message, remote space in between '_G' and '('.
14475 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14478 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14479 avx512f_vmcmp<mode>3<round_saeonly_name>,
14480 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14481 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14482 avx512f_rndscale<mode><round_saeonly_name>,
14483 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14484 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14485 Use %<iptr>2 instead of %2 for -masm=intel.
14486 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14487 avx512f_vcvttss2usi<round_saeonly_name>,
14488 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14490 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14491 avx512f_vcvttsd2usi<round_saeonly_name>,
14492 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14493 Use %q1 instead of %1 for -masm=intel.
14494 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14495 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14496 of %3 for -masm=intel.
14497 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14499 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14501 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14503 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14504 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14506 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14508 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14509 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14510 %g1 and one with %0 and %1.
14511 (avx512er_vmrcp28<mode><round_saeonly_name>,
14512 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14513 %1 for -masm=intel.
14514 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14515 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14516 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14517 of %0 and %{%4%} for -masm=intel.
14518 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14519 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14520 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14521 order of %0 and %{%5%}%{z%} for -masm=intel.
14523 2018-04-17 Jan Hubicka <jh@suse.cz>
14526 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14528 2018-04-17 Martin Liska <mliska@suse.cz>
14531 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14532 for target_clone error message. Make default implementation
14533 clone to be a local declaration.
14534 (separate_attrs): Add new argument and check for an empty
14536 (expand_target_clones): Handle it.
14537 (ipa_target_clone): Make redirection just for target_clones
14540 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14541 Tom de Vries <tom@codesourcery.com>
14543 PR middle-end/84955
14544 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14545 tiled basic blocks without omp continue statements.
14547 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14550 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14551 vec_extract expression as having side effects to make sure it gets
14554 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14557 * config/i386/i386.c (get_builtin_code_for_version): Check
14560 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14563 * config.gcc: Support "skylake".
14564 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14566 * config/i386/i386.c (m_SKYLAKE): Define.
14567 (processor_target_table): Add "skylake".
14568 (ix86_option_override_internal): Add "skylake".
14569 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14570 PROCESSOR_CANNONLAKE.
14571 (get_builtin_code_for_version): Fix priority for
14572 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14573 PROCESSOR_SKYLAKE-AVX512.
14574 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14575 (processor_type): Add PROCESSOR_SKYLAKE.
14577 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14578 Jason Merrill <jason@redhat.com>
14581 * convert.c (convert_to_integer_1): Use direct recursion for
14582 enumeral types and types with a precision less than the number
14583 of bits in their mode.
14585 2018-04-16 Julia Koval <julia.koval@intel.com>
14588 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14589 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14591 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14594 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14595 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14596 and -mno-direct-move.
14598 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14601 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14602 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14603 Ensure negative shifts result in {0}.
14605 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14607 PR rtl-optimization/79916
14608 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14609 regs (if any) to define how to gnerate SD moves when LRA is in
14612 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14614 PR rtl-optimization/85393
14615 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14616 * except.c (expand_dw2_landing_pad_for_region): Make static.
14617 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14618 a label and unconditional jump to old_bb, rather than
14619 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14622 PR rtl-optimization/85376
14623 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14624 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14625 instead of a specific value.
14627 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14628 Bin Cheng <bin.cheng@arm.com>
14630 PR tree-optimization/82965
14631 PR tree-optimization/83991
14632 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14633 by_profile_only parameter.
14634 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14635 information if the loop was predicted to iterate too many times.
14636 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14638 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14641 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14644 2018-04-13 Martin Liska <mliska@suse.cz>
14645 Jakub Jelinek <jakub@redhat.com>
14647 PR middle-end/81657
14648 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14649 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14650 * builtins.c (expand_builtin_memory_copy_args): Use
14651 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14652 handle dest_addr == pc_rtx.
14654 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14657 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14658 asked to not generate direct moves.
14659 (fix_trunc<mode>si2_stfiwx): Similar.
14660 (fix_trunc<mode>si2_internal): Similar.
14662 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14665 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14666 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14667 lookup if dest in some wider mode is known to be const0_rtx and
14668 if so, record permanent equivalence for it to be ZERO_EXTEND of
14669 the narrower mode destination.
14671 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14673 * lto-streamer-out.c (output_function): Revert 259346.
14674 * omp-expand.c (expand_oacc_for): Likewise.
14676 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14678 PR rtl-optimization/85354
14679 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14680 * sel-sched.c (sel_global_init): ... here.
14682 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14685 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14686 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14687 mode for PE-COFF targets.
14688 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14689 (i386_pe_asm_lto_end): Likewise.
14690 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14691 (TARGET_ASM_LTO_END): Likewise.
14692 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14693 (i386_pe_asm_lto_start): New function.
14694 (i386_pe_asm_lto_end): Likewise.
14696 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14697 Richard Biener <rguenther@suse.de>
14699 PR middle-end/84955
14700 * lto-streamer-out.c (output_function): Fix CFG loop state before
14702 * omp-expand.c (expand_oacc_for): Handle calls to internal
14703 functions like regular functions.
14705 2018-04-12 Richard Biener <rguenther@suse.de>
14708 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14709 for the early LTO debug to properly generate references to it
14710 during DIE emission. Do not re-use that for the skeleton for
14712 (dwarf2out_early_finish): Likewise.
14714 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14717 * config/i386/sse.md
14718 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14719 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14720 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14721 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14722 and output is a reg, avoid creating invalid lowpart subreg, but
14723 instead split into a 512-bit move. Don't split if not AVX512VL,
14724 input is xmm16+ reg and output is a mem.
14725 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14726 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14727 xmm16+ reg and output is a mem.
14729 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14731 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14732 also for flag_dwarf2_cfi_asm.
14734 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14736 PR rtl-optimization/85342
14737 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14738 a bool scalar var inside of the loop instead. Don't try to update
14739 recog_data.operand after failed apply_change_group.
14741 2018-04-12 Tom de Vries <tom@codesourcery.com>
14744 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14745 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14746 array with flexible array member as array without given dimension.
14747 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14748 argument for undefined param to true.
14750 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14753 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14754 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14755 from PowerPC section.
14756 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14757 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14758 help text that is too long.
14759 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14760 help text that is too long.
14761 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14762 help text that is too long.
14764 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14766 * config/alpha/alpha.md (stack_probe_internal): Rename
14767 from "probe_stack". Update all callers.
14769 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14771 PR rtl-optimization/84566
14772 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14773 sched_macro_fuse_insns.
14775 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14778 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14779 (compute_block_dependences): ... from here.
14781 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14783 PR tree-optimization/85331
14784 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14785 from int to HOST_WIDE_INT.
14787 2018-04-11 Martin Jambor <mjambor@suse.cz>
14790 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14791 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14792 not the same as the source val.
14793 (cgraph_edge_brings_value_p): New parameter.
14794 (gather_edges_for_value): Pass destination value to
14795 cgraph_edge_brings_value_p.
14796 (perhaps_add_new_callers): Likewise.
14797 (get_info_about_necessary_edges): Likewise and exclude values brought
14798 only by self-recursive edges.
14799 (create_specialized_node): Redirect only clones of self-calling edges.
14800 (+self_recursive_pass_through_p): New function.
14801 (find_more_scalar_values_for_callers_subset): Use it.
14802 (find_aggregate_values_for_callers_subset): Likewise.
14803 (known_aggs_to_agg_replacement_list): Removed.
14804 (decide_whether_version_node): Re-calculate known constants for all
14805 remaining context clones.
14807 2018-04-11 Richard Biener <rguenther@suse.de>
14810 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14811 from early DWARF output.
14812 (dwarf2out_early_finish): Output line info unconditionally into
14813 early DWARF and add reference to it.
14815 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14818 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14819 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14820 other than V2DFmode using iptr mode attribute.
14821 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14823 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14825 PR rtl-optimization/84659
14826 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14828 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14831 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14833 (output_loc_list): Pass address of a dummy size variable even in the
14834 locview handling loop.
14835 (index_location_lists): Add comment on why skip_loc_list_entry can't
14838 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14841 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14844 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14847 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14848 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14849 and -mstring-compare-inline-limit.
14851 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14854 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14855 for stack clash protection in a register whenever we need it to be in
14858 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14860 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14861 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14863 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14866 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14868 (mlong-double-): Ditto.
14869 * config/rs6000/sysv4.opt (msdata=): Ditto.
14870 (mtls-size=): Ditto.
14872 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14874 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14875 erroneous entries for
14876 "vector int vec_ldl (int, long int *)", and
14877 "vector unsigned int vec_ldl (int, unsigned long int *)".
14878 Add comments and entries for
14879 "vector bool char vec_ldl (int, bool char *)",
14880 "vector bool short vec_ldl (int, bool short *)",
14881 "vector bool int vec_ldl (int, bool int *)",
14882 "vector bool long long vec_ldl (int, bool long long *)",
14883 "vector pixel vec_ldl (int, pixel *)",
14884 "vector long long vec_ldl (int, long long *)",
14885 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14886 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14887 type tree bool_long_long_type_node and correct definition of
14888 bool_V2DI_type_node to make reference to this new type tree.
14889 (rs6000_mangle_type): Replace erroneous reference to
14890 bool_long_type_node with bool_long_long_type_node.
14891 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14892 comments to emphasize sign distinctions for char and int types and
14893 replace RS6000_BTI_bool_long constant with
14894 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14895 use of RS6000_BTI_pixel.
14896 (bool_long_type_node): Remove this macro definition.
14897 (bool_long_long_type_node): New macro definition
14899 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14901 PR rtl-optimization/85300
14902 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14903 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14904 simplify_unary_operation fails.
14906 2018-04-10 Martin Liska <mliska@suse.cz>
14908 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14909 cgraph_edge and ipa_ref.
14911 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14915 * config/i386/sse.md
14916 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14917 computation of the VEC_MERGE selector from mask.
14918 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14919 Fix decoding of the VEC_MERGE selector into mask.
14921 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14923 PR tree-optimization/85286
14924 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14926 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14928 * final.c (final_1): Set insn_last_address as well as
14929 insn_current_address.
14931 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14934 * explow.c (emit_stack_probe): Call validize_mem on memory location
14935 before passing it to gen_probe_stack. Create address operand and
14936 legitimize it for the probe_stack_address case.
14938 2018-04-09 Jan Hubicka <jh@suse.cz>
14941 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14942 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14943 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14945 (free_lang_data): Rebuild type inheritance graph.
14947 2018-04-09 Martin Sebor <msebor@redhat.com>
14949 * invoke.texi (-finline-small-functions): Mention other optimization
14951 (-findirect-inlining, -fpartial-inlining): Same.
14952 (-finline-functions-called-once): Same.
14953 (-freorder-blocks-and-partition): Same.
14955 2018-04-09 Jan Hubicka <jh@suse.cz>
14958 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14959 jumps; choose last target that matches the criteria (i.e.
14960 no partition changes for non-crossing jumps).
14961 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14962 support for redirecting crossing jumps to non-crossing.
14964 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14966 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14967 also for naked functions.
14969 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14971 * config/arc/arc.md (add_shift): New pattern.
14972 (add_shift2): Likewise.
14973 (sub_shift): Likewise.
14974 (sub_shift_cmp0_noout): Likewise.
14975 (compare_si_ashiftsi): Likewise.
14976 (xbfu_cmp0_noout): New combine pattern.
14977 (xbfu_cmp0"): Likewise.
14978 (movsi_set_cc_insn): Place the predicable variant first.
14979 (commutative_binary_cmp0_noout): Remove clobber.
14980 (commutative_binary_cmp0): New pattern.
14981 (noncommutative_binary_cmp0): Likewise.
14982 (noncommutative_binary_cmp0_noout): Likewise.
14983 (noncommutative_binary_comparison_result_used): Removed.
14984 (rsub_cmp0): New pattern.
14985 (rsub_cmp0_noout): Likewise.
14986 (extzvsi): Changed, keep only meaningful variants.
14987 (SQH, SEZ): New iterators.
14988 (SQH_postfix): New mode attribute.
14989 (SEZ_prefix): New code attribute.
14990 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14991 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14992 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14993 of numerical value.
14994 (noncommutative_operator): Check the availability of barrel
14997 2018-04-09 Richard Biener <rguenther@suse.de>
14999 PR tree-optimization/85284
15000 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15001 Only use the niter constraining form of simple_iv when the exit
15002 is always executed.
15004 2018-04-09 Tom de Vries <tom@codesourcery.com>
15007 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15008 (define_expand "*memory_barrier"): New define_expand.
15009 (define_insn "memory_barrier"): New insn.
15011 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15013 PR rtl-optimization/80463
15014 PR rtl-optimization/83972
15015 PR rtl-optimization/83480
15017 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15018 correct producer for the insn.
15019 (tidy_control_flow): Fixup seqnos in case of debug insns.
15021 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15023 PR rtl-optimization/83913
15025 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15026 different sched-times when merging exprs.
15028 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15030 PR rtl-optimization/83962
15032 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15033 tidy_fallthru_edge and tidy_control_flow.
15035 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15037 PR rtl-optimization/83530
15039 * sel-sched.c (force_next_insn): New global variable.
15040 (remove_insn_for_debug): When force_next_insn is true, also leave only
15041 next insn in the ready list.
15042 (sel_sched_region): When the region wasn't scheduled, make another pass
15043 over it with force_next_insn set to 1.
15045 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15047 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15049 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15050 for interrupt control.
15051 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15052 functions for interrupt control.
15053 * config/nds32/nds32-intrinsic.md: Likewise.
15054 * config/nds32/nds32_intrinsic.h: Likewise.
15055 * config/nds32/nds32.h (nds32_builtins): Likewise.
15057 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15059 * config/nds32/nds32.c (nds32_init_machine_status,
15060 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15061 strict_aligned_p field.
15062 (nds32_expand_to_rtl_hook): New function.
15063 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15064 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15066 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15067 Chung-Ju Wu <jasonwucj@gmail.com>
15069 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15070 * config/nds32/nds32-n7.md: New file.
15071 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15072 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15074 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15075 * config/nds32/nds32.md (pipeline_model): Add n7.
15076 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15077 * config/nds32/pipelines.md: Include n7 settings.
15079 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15080 Chung-Ju Wu <jasonwucj@gmail.com>
15082 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15083 * config/nds32/nds32-e8.md: New file.
15084 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15085 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15087 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15088 * config/nds32/nds32.md (pipeline_model): Add e8.
15089 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15090 * config/nds32/pipelines.md: Include e8 settings.
15092 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15093 Chung-Ju Wu <jasonwucj@gmail.com>
15095 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15096 * config/nds32/nds32-n8.md: New file.
15097 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15098 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15100 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15101 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15102 * config/nds32/nds32.md (pipeline_model): Add n8.
15103 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15104 * config/nds32/pipelines.md: Include n8 settings.
15106 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15107 Chung-Ju Wu <jasonwucj@gmail.com>
15109 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15110 * config/nds32/nds32-n9-2r1w.md: New file.
15111 * config/nds32/nds32-n9-3r2w.md: New file.
15112 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15113 nds32_register_ports): New or modify for cpu n9.
15114 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15116 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15117 * config/nds32/nds32-utils.c: New file.
15118 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15119 TARGET_MUL_SLOW): Define.
15120 * config/nds32/nds32.md (pipeline_model): New attribute.
15121 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15122 New options that support cpu n9.
15123 * config/nds32/pipelines.md: Include n9 settings.
15124 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15126 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15128 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15129 information if necessary.
15130 (output_cond_branch_compare_zero): Likewise.
15131 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15132 (nds32_target_alignment): Refine for alignment.
15133 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15134 (FUNCTION_BOUNDARY): Modify.
15135 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15137 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15139 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15141 * config/nds32/constants.md (unspec_volatile_element): Add values for
15142 TLB operation and data prefetch.
15143 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15144 functions for TLB operation and data prefetch.
15145 * config/nds32/nds32-intrinsic.md: Likewise.
15146 * config/nds32/nds32_intrinsic.h: Likewise.
15147 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15148 (nds32_print_operand): Likewise.
15149 * config/nds32/nds32.h (nds32_builtins): Likewise.
15151 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15152 Andrew Pinski <pinsika@gcc.gnu.org>
15154 PR middle-end/82976
15155 * match.pd: Use constant_boolean_node of correct type instead of
15156 boolean_true_node or boolean_false_node for simplifying
15157 pointer comparisons to zero.
15159 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15161 PR tree-optimization/80021
15162 * tree.c (verify_type_variant): Make error call in verify_variant_match
15163 translatable and remove final full stop.
15165 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15167 * config/nds32/constants.md (unspec_volatile_element): Add
15168 UNSPEC_VOLATILE_EH_RETURN.
15169 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15170 nds32_output_stack_pop): Support dwarf exception handling process.
15171 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15172 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15173 exception handling process.
15174 (nds32_compute_stack_frame): Likewise.
15175 (nds32_return_addr_rtx): Likewise.
15176 (nds32_initial_elimination_offset): Likewise.
15177 (nds32_expand_prologue): Likewise.
15178 (nds32_expand_epilogue): Likewise.
15179 (nds32_dynamic_chain_address): New function.
15180 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15181 exception handling.
15182 (DYNAMIC_CHAIN_ADDRESS): Define.
15183 (EH_RETURN_DATA_REGNO): Define.
15184 (EH_RETURN_STACKADJ_RTX): Define.
15185 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15186 patterns for dwarf exception handling.
15188 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15190 * config/nds32/nds32.h: Clean up obsolete macros.
15192 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15194 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15195 Add enum values for particular instructions.
15196 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15197 particular intrinsic functions.
15198 * config/nds32/nds32-intrinsic.md: Likewise.
15199 * config/nds32/nds32_intrinsic.h: Likewise.
15200 * config/nds32/nds32.h (nds32_builtins): Likewise.
15201 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15202 (btst, ave): New patterns for particular instructions.
15204 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15206 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15207 Add enum values for atomic load/store and memory sync.
15208 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15210 * config/nds32/nds32-intrinsic.md: Likewise.
15211 * config/nds32/nds32_intrinsic.h: Likewise.
15212 * config/nds32/nds32.h (nds32_builtins): Likewise.
15214 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15216 PR tree-optimization/85257
15217 * fold-const.c (native_encode_vector): If not all elts could fit
15218 and off is -1, return 0 rather than offset.
15219 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15220 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15221 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15222 adjust buffer in native_interpret_expr call.
15224 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15226 * config/nds32/constants.md (unspec_volatile_element): Add cache
15227 control enum values.
15228 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15229 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15230 * config/nds32/nds32.c (nds32_cctl_names): New.
15231 (nds32_print_operand): Handle cache control register names.
15232 * config/nds32/nds32.h (nds32_builtins): New enum values.
15233 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15235 * config/nds32/nds32.md (type): Add mmu.
15236 * config/nds32/pipelines.md (simple_insn): Add mmu.
15238 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15240 * config/nds32/nds32.md (type): Remove call.
15241 * config/nds32/pipelines.md (simple_insn): Likewise.
15243 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15245 * config/nds32/constants.md (unspec_volatile_element): Add
15246 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15247 UNSPEC_VOLATILE_FMFCFG.
15248 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15249 description for fmfcfg and fmfcsr.
15250 (bdesc_1arg): Add fmtcsr.
15251 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15252 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15253 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15254 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15255 unspec_fmfcfg): New patterns.
15256 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15257 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15258 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15259 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15260 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15261 __nds32__fmfcfg): Define.
15263 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15265 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15266 intrinsic register names.
15267 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15268 intrinsic register enum values and macros.
15270 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15272 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15273 for load/store addressing form.
15274 (nds32_print_operand_address): Likewise.
15276 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15279 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15280 based on LABEL_REF. Remove useless assertion.
15281 (pic_address_needs_scratch): Fix formatting.
15282 (sparc_legitimize_pic_address): Minor tweaks.
15283 (sparc_delegitimize_address): Adjust assertion accordingly.
15284 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15285 into symbolic_operand.
15286 (movsi_high_pic_label_ref): Likewise.
15287 (movsi_lo_sum_pic_label_ref): Likewise.
15288 (movdi_pic_label_ref): Likewise.
15289 (movdi_high_pic_label_ref): Likewise.
15290 (movdi_lo_sum_pic_label_ref): Likewise.
15292 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15294 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15295 custom LIB_SPEC setup.
15297 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15298 Kito Cheng <kito.cheng@gmail.com>
15300 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15301 * config/riscv/freebsd.h: New.
15303 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15305 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15306 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15309 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15310 Kito Cheng <kito.cheng@gmail.com>
15312 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15313 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15314 * config/nds32/nds32-protos.h (nds32_output_call,
15315 nds32_output_return): Declare.
15316 * config/nds32/nds32.md: Refine all the call and return patterns.
15318 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15321 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15322 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15324 PR rtl-optimization/84872
15325 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15326 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15327 EDGE_CROSSING edge.
15329 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15331 * expr.c (copy_blkmode_to_reg): Revert 254862.
15332 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15334 2018-04-06 Richard Biener <rguenther@suse.de>
15336 PR middle-end/85244
15337 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15338 after seeing a component reference with an adjacent field. Treat
15339 refs to arrays at struct end of external decls similar to
15340 refs to unconstrained commons.
15342 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15345 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15346 look through SAVE_EXPRs with non-side-effects argument. Adjust
15348 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15351 2018-04-06 Richard Biener <rguenther@suse.de>
15353 PR middle-end/85180
15354 * alias.c (find_base_term): New wrapper around find_base_term
15355 unwinding CSELIB_VAL_PTR changes.
15356 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15359 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15361 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15363 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15364 constant definitions.
15365 ("nop"): lr 0,0 -> nopr r0
15366 ("nop_lr0", "nop_lr1"): New insn definitions.
15368 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15370 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15371 NDS32_V3PUSH_AVAILABLE_P macro.
15373 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15374 Chung-Ju Wu <jasonwucj@gmail.com>
15376 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15377 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15378 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15379 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15380 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15381 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15382 * config/nds32/constraints.md: New constraints and checking for hard
15383 float configuration.
15384 * config/nds32/iterators.md: New mode iterator and attribute for hard
15385 float configuration.
15386 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15388 * config/nds32/nds32-fpu.md: New file.
15389 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15390 deal with hard float code generation.
15391 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15393 (abi_type, float_reg_number): New enum type.
15394 * config/nds32/nds32-predicates.c: New predicates for hard float.
15395 * config/nds32/nds32-protos.h: Declare functions for hard float.
15396 * config/nds32/nds32.c: Implementation for hard float configuration.
15397 * config/nds32/nds32.h: Definitions for hard float configuration.
15398 * config/nds32/nds32.md: Include hard float machine description and
15399 modify patterns for hard float configuration.
15400 * config/nds32/nds32.opt: New options for hard float configuration.
15401 * config/nds32/predicates.md: New predicates for hard float
15404 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15406 * common/config/nds32/nds32-common.c
15407 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15409 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15411 PR middle-end/85195
15412 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15413 CONSTRUCTOR_ELT (ctor, ...)->value.
15415 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15418 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15420 2018-04-05 Tom de Vries <tom@codesourcery.com>
15423 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15426 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15427 Kito Cheng <kito.cheng@gmail.com>
15429 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15430 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15431 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15432 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15434 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15435 Kito Cheng <kito.cheng@gmail.com>
15437 * config/nds32/constraints.md (Ufe): New memory constraint.
15438 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15439 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15440 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15442 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15443 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15445 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15447 * config/nds32/nds32.md: Use optimize_size in the condition for
15448 alu-shift instructions.
15450 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15452 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15454 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15456 * config/nds32/nds32.md (negsi2): Refine pattern.
15458 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15459 Chung-Ju Wu <jasonwucj@gmail.com>
15461 * config/nds32/iterators.md (shift_rotate): New code iterator.
15462 (shift): New code attribute.
15463 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15464 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15465 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15466 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15467 bit-wise operations.
15468 (andsi3, *andsi3): Ditto.
15469 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15470 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15471 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15472 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15473 nds32_ior_operand, nds32_xor_operand): New predicates.
15475 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15477 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15478 (addsi3, subsi3): ... this.
15480 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15482 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15484 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15486 * config/nds32/nds32.md: Adjust indention.
15488 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15490 * config/nds32/nds32.md (feature): New attribute.
15492 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15494 * config/nds32/nds32.md (subtype): New attribute.
15496 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15499 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15500 expansion to perform a bitwise AND of the argument followed by a
15501 boolean negation of the result.
15503 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15505 PR rtl-optimization/84878
15506 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15507 the basic block. Assert the use reference is not artificial and that
15508 it has an associated insn.
15510 2018-04-04 Michael Matz <matz@suse.de>
15512 * builtins.c (compute_objsize): Pass correct operand
15513 to array_at_struct_end_p.
15515 2018-04-04 Richard Biener <rguenther@suse.de>
15518 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15519 from contexts for DINFO_LEVEL_TERSE and below.
15521 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15523 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15524 resiter_operand condition.
15525 * config/nds32/nds32.md (*move<mode>): Ditto.
15527 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15528 Monk Chiang <sh.chiang04@gmail.com>
15530 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15532 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15534 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15536 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15537 Kito Cheng <kito.cheng@gmail.com>
15539 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15540 nds32_cond_code_str, output_cond_branch,
15541 output_cond_branch_compare_zero, nds32_expand_cbranch,
15542 nds32_expand_cstore, nds32_expand_movcc,
15543 nds32_output_cbranchsi4_equality_zero,
15544 nds32_output_cbranchsi4_equality_reg,
15545 nds32_output_cbranchsi4_equality_reg_or_const_int,
15546 nds32_output_cbranchsi4_greater_less_zero: New functions.
15547 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15548 nds32_expand_cstore, nds32_expand_movcc,
15549 nds32_output_cbranchsi4_equality_zero,
15550 nds32_output_cbranchsi4_equality_reg,
15551 nds32_output_cbranchsi4_equality_reg_or_const_int,
15552 nds32_output_cbranchsi4_greater_less_zero): Declare.
15553 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15554 nds32_rimm11s_operand): New predicates.
15555 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15556 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15559 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15561 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15562 * config/nds32/nds32.md: Ditto.
15563 * config/nds32/pipelines.md: Ditto.
15565 2018-04-04 Richard Biener <rguenther@suse.de>
15567 PR tree-optimization/85168
15568 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15569 propagating abnormals.
15571 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15573 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15575 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15576 Kito Cheng <kito.cheng@gmail.com>
15578 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15579 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15580 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15581 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15582 * config/nds32/nds32.md (sibcall_internal): New.
15583 (sibcall_register): Remove.
15584 (sibcall_immediate): Remove.
15585 (sibcall_value_internal): New.
15586 (sibcall_value_register): Remove.
15587 (sibcall_value_immediate): Remove.
15588 * config/nds32/predicates.md (nds32_general_register_operand): New.
15589 (nds32_call_address_operand): New.
15591 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15593 PR rtl-optimization/85167
15594 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15595 bb_defs if *split_p, instead preinitialize it to NULL.
15597 PR tree-optimization/85156
15598 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15599 evaluating the argument multiple times.
15601 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15603 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15605 (_mm_cvtpd_ps): Likewise.
15606 (_mm_cvttpd_epi32): Likewise.
15607 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15608 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15609 vector, pixel, and bool following altivec.h include.
15611 2018-04-03 Martin Sebor <msebor@redhat.com>
15613 * doc/extend.texi (Common Function Attributes): Clarify.
15614 (const attribute): Likewise.
15615 (pure attribute): Likewise.
15617 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15620 * config/i386/i386.c (ix86_expand_vector_set): Use
15621 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15623 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15625 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15626 instructions when changing rounding bits to preserve precision bits
15627 in the x87 control word.
15629 2018-04-03 Martin Liska <mliska@suse.cz>
15631 PR tree-optimization/82491
15632 * rtl.h (strip_offset_and_add): Replace += suboffset with
15633 poly_uint64 () + suboffset.
15635 2018-03-29 Martin Liska <mliska@suse.cz>
15636 Martin Jambor <mjambor@suse.cz>
15639 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15640 param_type is not an integral or pointer type.
15642 2018-04-03 Richard Biener <rguenther@suse.de>
15644 * sese.h (recompute_all_dominators): Remove.
15646 2018-04-02 Martin Sebor <msebor@redhat.com>
15648 * doc/invoke.texi (-Wrestrict): Fix typos.
15650 2018-04-02 Jim Wilson <jimw@sifive.com>
15652 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15653 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15654 (<optab>di3, <optab>si3_extend): Likewise.
15655 (<optab>si3_mask, <optab>si3_mask_1): New.
15656 (<optab>di3_mask, <optab>di3_mask_1): New.
15657 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15658 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15659 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15661 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15663 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15666 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15668 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15669 (nds32_canonicalize_comparison): New function.
15671 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15672 Kito Cheng <kito.cheng@gmail.com>
15673 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15675 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15676 * config/nds32/constants.md (unspec_volatile_element): Add
15677 UNSPEC_VOLATILE_RELAX_GROUP.
15678 * config/nds32/nds32-relax-opt.c: New file.
15679 * config/nds32/nds32-predicates.c
15680 (nds32_symbol_load_store_p): New function.
15681 * config/nds32/nds32-protos.h
15682 (nds32_symbol_load_store_p): Declare function.
15683 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15684 * config/nds32/nds32.c
15685 (nds32_register_pass): New function to register pass.
15686 (nds32_register_passes): New function to register passes.
15687 * config/nds32/nds32.md (relax_group): New pattern.
15688 * config/nds32/nds32.opt (mrelax-hint): New option.
15689 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15691 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15693 * config/nds32/t-nds32: Modify files dependency.
15695 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15697 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15698 (PROFILE_HOOK): Define its implementation.
15700 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15702 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15703 type and 32-bit size.
15705 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15707 PR middle-end/85090
15708 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15709 (V_128_256): New mode iterator.
15710 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15711 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15712 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15714 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15715 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15717 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15720 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15721 NaN inputs correctly.
15723 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15726 * config/rs6000/vsx.md (??r): New mode attribute.
15727 (*vsx_mov<mode>_64bit): Use it.
15728 (*vsx_mov<mode>_32bit): Likewise.
15730 2018-03-30 Martin Sebor <msebor@redhat.com>
15732 PR tree-optimization/84818
15733 * builtins.c (check_access): Use warning_n.
15735 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15738 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15740 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15743 2018-03-30 Julia Koval <julia.koval@intel.com>
15746 * x86-tune.def (movx, partial_reg_dependency): Enable for
15749 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15751 PR inline-asm/84985
15752 * lra-constraints.c (process_alt_operands): Move setting
15753 this_alternative_matches below.
15755 2018-03-29 Martin Liska <mliska@suse.cz>
15758 * doc/invoke.texi: Document how LTO works with debug info.
15759 Describe auto-load support of binutils. Mention 'x86-64'
15760 as valid option value of -march option.
15762 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15764 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15767 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15768 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15769 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15772 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15775 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15776 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15777 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15778 for RS6000_BTM_POWERPC64.
15779 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15780 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15781 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15784 (DIVDEU): Likewise.
15786 2018-03-28 Carl Love <cel@us.ibm.com>
15789 2017-09-27 Carl Love <cel@us.ibm.com>
15791 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15792 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15793 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15796 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15798 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15799 instead of __vector bool.
15800 (_mm_max_pu8): Likewise.
15801 (_mm_min_pi16): Likewise.
15803 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15806 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15807 (DIVWEUO): Likewise.
15808 (DIVDEO): Likewise.
15809 (DIVDEUO): Likewise.
15810 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15811 DIVWEUO and DIVDEUO.
15812 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15813 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15814 (div_extend): Likewise.
15815 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15817 (__builtin_divweuo): Likewise.
15818 (__builtin_divdeo): Likewise.
15819 (__builtin_divdeuo): Likewise.
15821 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15824 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15825 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15827 PR tree-optimization/82004
15828 * gimple-match-head.c (optimize_pow_to_exp): New function.
15829 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15830 Don't fold to exp if optimize_pow_to_exp is false.
15832 2018-03-28 Martin Liska <mliska@suse.cz>
15835 * calls.c (initialize_argument_information): Fix trailing space.
15836 * common.opt: Fix typo and provide better explanation for
15837 -fsanitize-coverage option.
15838 * config/i386/i386.opt: Fix typo.
15840 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15841 Martin Liska <mliska@suse.cz>
15844 * gimplify.c (asan_poison_variable): Don't do the check for
15845 gimplify_omp_ctxp here.
15846 (gimplify_decl_expr): Do it here.
15847 (gimplify_target_expr): Likewise.
15849 2018-03-28 Martin Liska <mliska@suse.cz>
15852 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15853 chkp_type_bounds_count if MPX is not enabled.
15855 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15857 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15859 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15862 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15863 function to create the function decl for complex long double
15864 multiply and divide for -mabi=ieeelongdouble.
15865 (init_float128_ieee): Call it.
15867 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15870 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15871 -fcf-protection=branch -mibt.
15872 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15874 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15877 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15878 arm_word_relocations.
15880 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15883 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15884 extern array declarations.
15886 2018-03-27 Richard Biener <rguenther@suse.de>
15888 PR middle-end/84067
15889 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15890 explicit single_use checks.
15892 2018-03-27 Richard Biener <rguenther@suse.de>
15894 PR tree-optimization/85082
15895 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15898 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15900 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15901 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15902 Turn on fasynchronous-unwind-tables and funwind-tables.
15904 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15907 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15908 (*bmi_blsr_<mode>_ccz): Ditto.
15910 2018-03-26 Tom de Vries <tom@codesourcery.com>
15912 PR tree-optimization/85063
15913 * omp-general.c (offloading_function_p): New function. Factor out
15915 * omp-offload.c (pass_omp_target_link::gate): ... here.
15916 * omp-general.h (offloading_function_p): Declare.
15917 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15918 with attribute omp declare target for offloading functions.
15920 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15922 PR tree-optimization/84005
15923 * tree-data-ref.h (get_base_for_alignment): Declare.
15924 * tree-data-ref.c (get_base_for_alignment_1): New function.
15925 (get_base_for_alignment): Likewise.
15926 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15927 get_base_for_alignment to find a suitable base object, instead
15928 of always using drb->base_address.
15930 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15932 PR inline-asm/85022
15933 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15934 known size by default.
15936 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15938 PR inline-asm/85030
15939 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15940 and non BLKmode operands.
15942 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15945 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15946 Clean up attributes.
15948 2018-03-23 Richard Biener <rguenther@suse.de>
15951 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15952 we are going to emit early debug for LTO.
15954 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15956 PR inline-asm/85034
15957 * function.c (match_asm_constraints_1): Don't optimize if input
15958 doesn't satisfy general_operand predicate for output's mode.
15960 PR inline-asm/85022
15961 * alias.c (write_dependence_p): Don't require for x_canonicalized
15962 non-VOIDmode if x has VOIDmode.
15965 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15966 just don't try to optimize it rather than assert it never happens.
15968 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15970 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15971 macro expansions for definition of ST_INTERNAL_<mode> and
15972 LD_INTERNAL_<mode> builtins.
15973 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15975 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15977 (altivec_expand_st_builtin): Likewise.
15978 (altivec_expand_builtin): Remove calls to deleted functions.
15979 (rs6000_address_for_altivec): Delete this function.
15980 * config/rs6000/vector.md: Remove expands for
15981 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15983 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15986 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15987 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15988 re-computing once computed.
15989 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15990 (arm_init_machine_status): Initialize
15991 machine->static_chain_stack_bytes.
15993 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15996 * doc/extend.texi: Add four new prototypes for vec_ld.
15997 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15998 definitions for more logical presentation.
15999 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16000 entries for V1TI variants of __builtin_altivec_ld builtin.
16001 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16002 handling of V1TI variant of LVX icode pattern.
16003 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16004 (rs6000_gimple_fold_builtin): Likewise.
16005 (altivec_init_builtins): Add code to define
16006 __builtin_altivec_lvx_v1ti function.
16008 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16010 PR inline-asm/84941
16011 * function.c (match_asm_constraints_1): Don't do the optimization
16012 if input isn't a REG, SUBREG, MEM or constant.
16014 2018-03-22 Tom de Vries <tom@codesourcery.com>
16016 PR tree-optimization/84956
16017 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16018 bb_has_abnormal_pred.
16020 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16023 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16024 DECL_INITIAL (decl) to decl at the end.
16025 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16026 adjust the comment.
16028 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16030 * doc/extend.texi (__builtin_tgmath): Document when complex
16031 integer types are treated as _Complex _Float64.
16033 2018-03-21 Tom de Vries <tom@codesourcery.com>
16035 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16037 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16039 PR tree-optimization/84960
16040 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16041 if it is ENTRY block, move them into single succ of ENTRY in that case.
16043 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16045 PR tree-optimization/84811
16046 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16047 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16048 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16049 (known_subrange_p): Update accordingly. Cast each value involved
16050 in the size comparison, rather than casting the result of the
16053 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16055 PR tree-optimization/84982
16056 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16057 by flipping the least significant bit rather than all bits from
16058 bitpos to bitpos + bitsize - 1.
16060 2018-03-21 Nathan Sidwell <nathan@acm.org>
16062 * doc/extend.texi (Deprecated Features): Remove mention of
16063 long-deleted deprecations.
16065 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16068 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16069 * configure: Regenerate.
16071 2018-03-21 Tom de Vries <tom@codesourcery.com>
16073 PR tree-optimization/83126
16074 * tree-parloops.c (num_phis): New function.
16075 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16077 2018-03-21 Nathan Sidwell <nathan@acm.org>
16079 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16080 mention anon-struct/union members and trailing attributes.
16082 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16084 PR tree-optimization/84969
16085 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16086 builtin memset partitions if they set different rhs values.
16088 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16090 PR rtl-optimization/84989
16091 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16092 VEC_DUPLICATE with scalar result mode.
16094 2018-03-21 Martin Liska <mliska@suse.cz>
16097 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16098 not intended return statement.
16100 2018-03-21 Martin Liska <mliska@suse.cz>
16103 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16104 (chkp_find_bound_slots_1): Limit number of iterations.
16106 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16109 * Minor grammar fixes for x86 options.
16111 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16114 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16115 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16117 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16120 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16121 (altivec_lvx_<mode>_1op): Likewise.
16122 (altivec_stvx_<mode>_2op): Likewise.
16123 (altivec_stvx_<mode>_1op): Likewise.
16124 (altivec_lvx_<VM2:mode>): New define_expand.
16125 (altivec_stvx_<VM2:mode>): Likewise.
16126 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16127 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16128 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16129 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16130 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16131 (rs6000_gen_lvx): Likewise.
16132 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16133 (altivec_expand_stv_builtin): Likewise.
16134 (altivec_expand_builtin): Likewise.
16135 * config/rs6000/vector.md: Likewise.
16137 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16140 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16143 2018-03-20 Richard Biener <rguenther@suse.de>
16146 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16147 sign-conversions as zero, fall back to standard scalar_stmt
16150 2018-03-20 Martin Liska <mliska@suse.cz>
16153 * predict.c (rebuild_frequencies): Handle case when we have
16154 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16156 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16159 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16160 flag_section_anchors.
16161 * varasm.c (use_blocks_for_decl_p): Remove hack for
16162 dw2_force_const_mem.
16165 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16167 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16168 be created, use lowpart_subreg of operands[0] rather than operands[0]
16170 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16171 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16172 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16173 and n constraint instead of aarch64_shift_imm_di and Usd.
16174 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16175 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16177 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16180 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16181 to favor GPR over NEON registers.
16182 (<shift>di3_neon): Likewise.
16184 2018-03-20 Tom de Vries <tom@codesourcery.com>
16187 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16188 (nvptx_process_pars): Emit bar.sync asap and alap.
16190 2018-03-20 Tom de Vries <tom@codesourcery.com>
16193 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16194 seen_label if seen_label is already set.
16196 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16199 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16200 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16201 Use 1U instead of 1. Formatting fixes.
16204 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16205 instead of TREE_TYPE (s1) for the return value.
16207 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16209 PR tree-optimization/84946
16210 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16211 bitsize + bitsize in poly_uint64 rather than poly_int64.
16214 * dwarf2asm.c: Include fold-const.c.
16215 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16216 of decl rather than decl itself.
16218 PR rtl-optimization/84643
16219 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16221 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16224 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16225 calling assemble_variable.
16227 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16230 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16231 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16233 2018-03-19 Jim Wilson <jimw@sifive.com>
16236 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16237 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16238 (riscv_first_stack_step): Likewise.
16239 (riscv_option_override): Use STACK_BOUNDARY instead of
16240 MIN_STACK_BOUNDARY.
16241 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16242 MIN_STACK_BOUNDARY.
16243 (BIGGEST_ALIGNMENT): Set to 128.
16244 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16245 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16248 2018-03-19 Richard Biener <rguenther@suse.de>
16250 PR tree-optimization/84933
16251 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16252 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16254 2018-03-19 Richard Biener <rguenther@suse.de>
16256 PR tree-optimization/84859
16257 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16258 (cond_if_else_store_replacement): Perform sinking operation on
16259 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16260 Generalize what a BB with a single eligible store is.
16262 2018-03-19 Richard Biener <rguenther@suse.de>
16264 PR tree-optimization/84929
16265 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16266 chrec_is_positive against non-chrec arg.
16268 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16271 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16273 2018-03-18 Martin Liska <mliska@suse.cz>
16275 PR rtl-optimization/84635
16276 * regrename.c (build_def_use): Use matches_mode only when
16279 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16281 PR tree-optimization/84913
16282 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16283 vectorize chains of COND_EXPRs.
16285 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16287 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16289 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16291 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16293 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16295 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16297 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16298 Kito Cheng <kito.cheng@gmail.com>
16300 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16301 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16302 (nds32_adjust_reg_alloc_order): New function.
16303 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16305 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16307 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16308 nds32_print_operand, nds32_print_operand_address): Use
16309 HOST_WIDE_INT_PRINT_DEC instead.
16311 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16313 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16315 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16318 * config/i386/i386.c (initial_ix86_tune_features,
16319 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16320 unsigned long long.
16321 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16322 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16323 rather than 1u << ix86_tune. Formatting fix.
16324 (ix86_option_override_internal): Change ix86_arch_mask from
16325 unsigned int to unsigned HOST_WIDE_INT, initialize to
16326 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16327 (ix86_function_specific_restore): Likewise.
16329 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16332 * postreload.c (reload_combine_recognize_pattern): Perform
16333 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16334 truncate_int_for_mode the result for the destination's mode.
16337 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16338 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16340 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16343 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16346 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16347 regno_allocno_class_array and sorted_pseudos.
16348 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16349 insns where regno is used.
16351 2018-03-16 Martin Liska <mliska@suse.cz>
16354 * multiple_target.c (create_dispatcher_calls): Redirect
16355 reference in the symbol table.
16357 2018-03-16 Martin Liska <mliska@suse.cz>
16360 * multiple_target.c (create_dispatcher_calls): Redirect also
16363 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16367 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16368 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16369 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16371 2018-03-16 Julia Koval <julia.koval@intel.com>
16373 * doc/invoke.texi (Skylake Server): Add CLWB.
16374 Cannonlake): Remove CLWB.
16376 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16378 PR tree-optimization/84841
16379 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16381 (FLOAT_ONE_CONST_TYPE): Define.
16382 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16383 (sort_by_operand_rank): Put entries with higher constant_type last
16384 rather than first to match comments.
16386 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16388 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16391 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16394 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16395 check and use address of target always.
16397 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16400 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16401 (indirect_thunk_bnd_needed): Likewise.
16402 (indirect_thunks_used): Likewise.
16403 (indirect_thunks_bnd_used): Likewise.
16404 (indirect_return_needed): New.
16405 (indirect_return_bnd_needed): Likewise.
16406 (output_indirect_thunk_function): Add a bool argument for
16408 (output_indirect_thunk_function): Don't generate alias for
16409 function return thunk.
16410 (ix86_code_end): Call output_indirect_thunk_function to generate
16411 function return thunks.
16412 (ix86_output_function_return): Set indirect_return_bnd_needed
16413 and indirect_return_needed instead of indirect_thunk_bnd_needed
16414 and indirect_thunk_needed.
16416 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16418 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16419 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16420 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16422 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16423 Paul Hua <paul.hua.gm@gmail.com>
16426 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16428 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16430 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16431 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16432 resp. SFmode cases.
16434 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16437 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16438 instead of GET_MODE_SIZE when comparing Units.
16440 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16443 * varasm.c (hash_section): Return an unchangeble hash value
16444 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16445 Return !aarch64_can_use_per_function_literal_pools_p ().
16447 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16450 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16451 rather than address of cmode as last argument to prepare_cmp_insn.
16453 2018-03-15 Julia Koval <julia.koval@intel.com>
16455 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16456 F_AVX512VNNI, F_AVX512BITALG): New.
16458 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16461 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16462 insn for floating-point loads and stores.
16464 2018-03-14 Carl Love <cel@us.ibm.com>
16466 * config/rs6000/rs6000-c.c: Add macro definitions for
16467 ALTIVEC_BUILTIN_VEC_PERMXOR.
16468 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16469 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16470 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16471 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16473 * config/doc/extend.texi: Add prototypes for vec_permxor.
16475 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16478 * diagnostic-show-locus.c (class layout_point): Convert m_line
16479 from int to linenum_type.
16480 (line_span::comparator): Use linenum "compare" function when
16481 comparing line numbers.
16482 (test_line_span): New function.
16483 (layout_range::contains_point): Convert param "row" from int to
16485 (layout_range::intersects_line_p): Likewise.
16486 (layout::will_show_line_p): Likewise.
16487 (layout::print_source_line): Likewise.
16488 (layout::should_print_annotation_line_p): Likewise.
16489 (layout::print_annotation_line): Likewise.
16490 (layout::print_leading_fixits): Likewise.
16491 (layout::annotation_line_showed_range_p): Likewise.
16492 (struct line_corrections): Likewise for field m_row.
16493 (line_corrections::line_corrections): Likewise for param "row".
16494 (layout::print_trailing_fixits): Likewise.
16495 (layout::get_state_at_point): Likewise.
16496 (layout::get_x_bound_for_row): Likewise.
16497 (layout::print_line): Likewise.
16498 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16499 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16500 * input.c (selftest::test_linenum_comparisons): New function.
16501 (selftest::input_c_tests): Call it.
16502 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16503 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16504 * selftest.h (ASSERT_GT): New macro.
16505 (ASSERT_GT_AT): New macro.
16506 (ASSERT_LT): New macro.
16507 (ASSERT_LT_AT): New macro.
16509 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16511 PR rtl-optimization/84780
16512 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16514 2018-03-14 Martin Liska <mliska@suse.cz>
16516 * tree.c (record_node_allocation_statistics): Use
16517 get_stats_node_kind.
16518 (get_stats_node_kind): New function extracted from
16519 record_node_allocation_statistics.
16520 (free_node): Use get_stats_node_kind.
16522 2018-03-14 Richard Biener <rguenther@suse.de>
16524 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16525 that the value-set of ANTIC_IN doesn't grow.
16528 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16530 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16531 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16533 2018-03-14 Julia Koval <julia.koval@intel.com>
16535 * config.gcc (icelake-client, icelake-server): New.
16537 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16538 (initial_ix86_arch_features): Ditto.
16539 (PTA_SKYLAKE): Add SGX.
16540 (PTA_ICELAKE): Remove.
16541 (PTA_ICELAKE_CLIENT): New.
16542 (PTA_ICELAKE_SERVER): New.
16543 (ix86_option_override_internal): Split up icelake on icelake client and
16545 (get_builtin_code_for_version): Ditto.
16546 (fold_builtin_cpu): Ditto.
16547 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16548 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16549 * config/i386/i386.h (processor_type): Ditto.
16550 * doc/invoke.texi: Ditto.
16552 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16555 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16556 INTEGER_CST offset, add it together with bitpos / 8 and
16557 sign extend based on POINTER_SIZE.
16561 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16564 * config/i386/constraints.md (Yc): New register constraint.
16565 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16566 Use Yc constraint for alternative 2 of operand 0. Remove
16567 preferred_for_speed attribute.
16569 2018-03-14 Richard Biener <rguenther@suse.de>
16571 PR tree-optimization/84830
16572 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16573 with the old one to avoid oscillations.
16575 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16578 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16580 (assign_by_spills): Return a flag of reload assignment failure.
16581 Do not process the reload assignment failures. Do not spill other
16582 reload pseudos if they has the same reg class. Update n if
16584 (lra_assign): Add a return arg. Set up from the result of
16585 assign_by_spills call.
16586 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16587 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16588 usage_insns if it is not NULL.
16589 (spill_hard_reg_in_range): New function.
16590 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16591 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16592 function prototypes.
16593 (lra_assign): Change prototype.
16594 * lra.c (lra): Add code to deal with fails by splitting hard reg
16597 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16599 * config/riscv/riscv.opt (mrelax): New option.
16600 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16601 "norelax" when riscv_mrelax is disabled.
16602 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16604 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16607 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16608 reassociation for int modes.
16610 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16612 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16613 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16615 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16616 * config/aarch64/aarch64-sve.md
16617 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16618 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16619 (*extend<mode><Vwide>2): Rename to...
16620 (aarch64_sve_extend<mode><Vwide>2): ...this.
16621 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16622 renaming the old pattern to...
16623 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16625 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16626 define_expand, renaming the old pattern to...
16627 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16628 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16629 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16630 account when deciding which SVE instruction the optab should use.
16631 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16633 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16635 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16636 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16637 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16638 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16639 (tlsdesc_small_<mode>): Turn a define_expand and use
16640 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16641 (tlsdesc_small_advsimd_<mode>): ...this.
16642 (tlsdesc_small_sve_<mode>): New pattern.
16644 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16646 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16647 (UNSPEC_UMUL_HIGHPART): New constants.
16648 (MUL_HIGHPART): New int iteraor.
16649 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16650 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16652 (*<su>mul<mode>3_highpart): New define_insn.
16654 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16657 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16660 2018-03-13 Martin Liska <mliska@suse.cz>
16663 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16665 (sem_item_optimizer::~sem_item_optimizer): Release it.
16666 (sem_item_optimizer::merge_classes): Register variable aliases.
16667 (sem_item_optimizer::fixup_pt_set): New function.
16668 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16669 * ipa-icf.h: Declare new variables and functions.
16671 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16673 PR middle-end/84834
16674 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16675 integer_pow2p@2 and test integer_pow2p in condition.
16676 (A < 0 ? C : 0): Similarly for @1.
16678 PR middle-end/84831
16679 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16680 characters starting at p contain '\0' character, don't look beyond
16684 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16685 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16688 * reg-stack.c (change_stack): Change update_end var from int to
16689 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16690 also call set_block_for_insn on the newly added insns and rescan.
16693 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16694 on the last operand.
16697 * tree.c (stabilize_reference_1): Return save_expr (e) for
16698 STATEMENT_LIST even if it doesn't have side-effects.
16700 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16702 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16704 2018-03-12 Renlin Li <renlin.li@arm.com>
16706 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16707 aarch64_output_scalar_simd_mov_immediate.
16709 2018-03-12 Martin Sebor <msebor@redhat.com>
16711 PR tree-optimization/83456
16712 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16713 for perfectly overlapping calls to memcpy.
16714 (gimple_fold_builtin_memory_chk): Same.
16715 (gimple_fold_builtin_strcpy): Handle no-warning.
16716 (gimple_fold_builtin_stxcpy_chk): Same.
16717 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16719 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16721 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16722 parameter. Use it for SFmode.
16723 (rs6000_function_arg_advance_1): Adjust.
16724 (rs6000_function_arg): Adjust.
16725 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16727 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16729 PR rtl-optimization/84169
16730 PR rtl-optimization/84780
16731 * combine.c (can_combine_p): Check for a 2-insn combination whether
16732 the destination register is used between the two insns, too.
16734 2018-03-12 Richard Biener <rguenther@suse.de>
16736 PR tree-optimization/84803
16737 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16738 for refs DR analysis didn't process.
16740 2018-03-12 Richard Biener <rguenther@suse.de>
16742 PR tree-optimization/84777
16743 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16744 force-vectorize loops ignore whether we are optimizing for size.
16746 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16748 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16749 (TARGET_MD_ASM_ADJUST): Define.
16751 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16752 Kito Cheng <kito.cheng@gmail.com>
16753 Chung-Ju Wu <jasonwucj@gmail.com>
16755 * config/nds32/nds32.c (nds32_compute_stack_frame,
16756 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16757 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16758 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16759 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16760 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16761 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16762 * config/nds32/nds32.md (prologue, epilogue): Use macro
16763 NDS32_V3PUSH_AVAILABLE_P to do checking.
16765 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16768 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16769 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16770 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16771 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16772 addition of most attributes on !orig_type_die or the attribute not
16773 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16775 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16776 Chung-Ju Wu <jasonwucj@gmail.com>
16778 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16779 __NDS32_VH__ macro.
16780 * config/nds32/nds32.opt (mvh): New option.
16782 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16783 Chung-Ju Wu <jasonwucj@gmail.com>
16785 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16787 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16788 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16791 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16792 Chung-Ju Wu <jasonwucj@gmail.com>
16794 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16796 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16797 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16799 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16800 Kito Cheng <kito.cheng@gmail.com>
16801 Chung-Ju Wu <jasonwucj@gmail.com>
16803 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16804 UNSPEC_FFMISM and UNSPEC_FLMISM.
16805 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16806 for ffb, ffmism and flmism.
16807 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16808 (unspec_ffmism): Ditto.
16809 (unspec_flmism): Ditto.
16810 (nds32_expand_builtin_impl): Check if string extension is available.
16811 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16812 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16814 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16817 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16820 * lra-assigns.c (assign_by_spills): Return a flag of reload
16821 assignment failure. Do not process the reload assignment
16822 failures. Do not spill other reload pseudos if they has the same
16824 (lra_assign): Add a return arg. Set up from the result of
16825 assign_by_spills call.
16826 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16827 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16828 usage_insns if it is not NULL.
16829 (spill_hard_reg_in_range): New function.
16830 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16831 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16832 function prototypes.
16833 (lra_assign): Change prototype.
16834 * lra.c (lra): Add code to deal with fails by splitting hard reg
16837 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16840 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16842 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16845 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16846 (dw_val_node): Add val_symbolic_view.
16847 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16848 (symview_upper_bound): New.
16849 (new_line_info_table): Initialize symviews_since_reset.
16850 (dwarf2out_source_line): Count symviews_since_reset and set
16851 symview_upper_bound.
16852 (dw_val_equal_p): Handle symview.
16853 (add_AT_symview): New.
16854 (print_dw_val): Handle symview.
16855 (attr_checksum, attr_checksum_ordered): Likewise.
16856 (same_dw_val_p, size_of_die): Likewise.
16857 (value_format, output_die): Likewise.
16858 (add_high_low_attributes): Use add_AT_symview for entry_view.
16859 (dwarf2out_finish): Reset symview_upper_bound, clear
16862 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16865 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16866 Add strict argument and use it.
16867 (rs6000_split_multireg_move): Update for new strict argument.
16868 (mem_operand_gpr): Disallow all non-offsettable addresses.
16869 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16871 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16874 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16875 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16876 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16879 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16880 decl, use remap_type if we want to use the type.
16882 2018-03-09 Martin Sebor <msebor@redhat.com>
16884 PR tree-optimization/84526
16885 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16887 (builtin_access::generic_overlap): Be prepared to handle non-array
16890 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16892 PR rtl-optimization/84682
16893 * lra-constraints.c (process_address_1): Check is_address flag
16894 for address constraints.
16895 (process_alt_operands): Likewise.
16896 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16897 preprocess_constraints.
16898 * recog.h (preprocess_constraints): Add oploc parameter.
16900 * recog.c (preprocess_constraints): Test address_operand for
16901 CT_ADDRESS constraints.
16903 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16906 * lra-assigns.c (assign_by_spills): Return a flag of reload
16907 assignment failure. Do not process the reload assignment
16908 failures. Do not spill other reload pseudos if they has the same
16910 (lra_assign): Add a return arg. Set up from the result of
16911 assign_by_spills call.
16912 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16913 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16914 usage_insns if it is not NULL.
16915 (spill_hard_reg_in_range): New function.
16916 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16917 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16918 function prototypes.
16919 (lra_assign): Change prototype.
16920 * lra.c (lra): Add code to deal with fails by splitting hard reg
16923 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16926 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16927 Accept complain bool parameter. Only emit errors if it is true.
16928 (arm_parse_cpu_option_name): Likewise.
16929 (arm_target_thumb_only): Adjust callers of the above.
16930 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16931 prototype to take a default true bool parameter.
16932 (arm_parse_arch_option_name): Likewise.
16934 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16935 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16939 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16940 * configure: Regenerate.
16941 * configure.ac ("linker --version-script option"): New.
16942 ("linker soname option"): New.
16944 2018-03-09 Richard Biener <rguenther@suse.de>
16946 PR tree-optimization/84775
16947 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16948 immediate uses of predicate stmts and mark them modified.
16951 PR tree-optimization/84178
16952 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16954 (version_loop_for_if_conversion): Delay update_ssa call.
16955 (tree_if_conversion): Delay update_ssa until after predicate
16958 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16961 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16962 when the function accesses prior frames.
16964 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16967 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16968 gen_llsym, otherwise call maybe_gen_llsym.
16970 PR inline-asm/84742
16971 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16972 has ',' character inside of it.
16974 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16977 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16978 as clobbering CC_REGNUM.
16980 2018-03-08 Richard Biener <rguenther@suse.de>
16982 PR middle-end/84552
16983 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16984 (follow_copies_to_constant): Do not follow SSA names registered
16987 2018-03-08 Richard Biener <rguenther@suse.de>
16989 PR tree-optimization/84178
16990 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16992 (version_loop_for_if_conversion): Delay update_ssa call.
16993 (tree_if_conversion): Delay update_ssa until after predicate
16996 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16998 PR tree-optimization/84178
16999 * tree-if-conv.c (release_bb_predicate): Remove the
17000 the assertion that the stmts have NULL use_ops.
17001 Discard the statements, asserting that they haven't
17002 yet been added to a BB.
17004 2018-03-08 Richard Biener <rguenther@suse.de>
17006 PR tree-optimization/84746
17007 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17008 (phi_translate): Pass in destination ANTIC_OUT set.
17009 (phi_translate_1): Likewise. For a simplified result lookup
17010 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17011 (phi_translate_set): Adjust.
17012 (do_pre_regular_insertion): Likewise.
17013 (do_pre_partial_partial_insertion): Likewise.
17015 2018-03-08 Martin Liska <mliska@suse.cz>
17017 PR gcov-profile/84735
17018 * doc/gcov.texi: Document usage of profile files.
17019 * gcov-io.h: Document changes in the format.
17021 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17025 * dwarf2out.c (struct dw_line_info_table): Update comments for
17027 (FORCE_RESET_NEXT_VIEW): New.
17028 (FORCE_RESETTING_VIEW_P): New.
17029 (RESETTING_VIEW_P): Check for -1 too.
17030 (ZERO_VIEW_P): Likewise.
17031 (new_line_info_table): Force-reset next view.
17032 (dwarf2out_begin_function): Likewise.
17033 (dwarf2out_source_line): Simplify zero_view_p initialization.
17034 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17035 view directly. Omit view when omitting .loc at line 0.
17037 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17039 PR tree-optimization/84740
17040 * tree-switch-conversion.c (process_switch): Call build_constructors
17041 only if info.phi_count is non-zero.
17043 PR tree-optimization/84739
17044 * tree-tailcall.c (find_tail_calls): Check call arguments against
17045 DECL_ARGUMENTS (current_function_decl) rather than
17046 DECL_ARGUMENTS (func) when checking for tail recursion.
17048 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17050 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17051 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17052 Volker Reichelt's entry and add entries for people that perform
17053 GCC fuzzy testing and report numerous bugs.
17055 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17058 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17059 readonly data in sdata, if that is disabled.
17060 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17061 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17062 -mreadonly-in-sdata option.
17064 2018-03-07 Martin Sebor <msebor@redhat.com>
17066 PR tree-optimization/84468
17067 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17068 basic block when looking for nul assignment.
17070 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17073 * except.h (output_function_exception_table): Adjust prototype.
17074 * except.c (output_function_exception_table): Remove FNNAME parameter
17075 and add SECTION parameter. Ouput one part of the table at a time.
17076 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17077 the first part of the exception table and emit unwind directives.
17078 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17079 (i386_pe_seh_cold_init): Likewise.
17080 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17081 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17082 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17083 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17084 * config/i386/winnt.c: Include except.h.
17085 (struct seh_frame_state): Add reg_offset, after_prologue and
17086 in_cold_section fields.
17087 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17088 (i386_pe_seh_cold_init): New function.
17089 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17090 to seh->in_cold_section.
17091 (seh_emit_push): Record the offset of the push.
17092 (seh_emit_save): Record the offet of the save.
17093 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17094 Test seh->after_prologue to disregard the epilogue.
17095 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17096 (i386_pe_end_cold_function): New function.
17098 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17101 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17102 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17105 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17107 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17108 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17110 PR middle-end/84723
17111 * multiple_target.c: Include tree-inline.h and intl.h.
17112 (expand_target_clones): Diagnose and fail if node->definition and
17113 !tree_versionable_function_p (node->decl).
17115 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17117 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17119 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17120 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17121 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17123 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17126 * combine.c (try_combine): Use reg_or_subregno instead of handling
17127 just paradoxical SUBREGs and REGs.
17129 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17131 * config/arc/arc.c (arc_finalize_pic): Remove function.
17132 (arc_must_save_register): We use single base PIC register, remove
17133 checks to save/restore the PIC register.
17134 (arc_expand_prologue): Likewise.
17135 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17137 (arc_verify_short): Likewise.
17138 (arc_attr_type): Likewise.
17139 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17140 (walk_stores): Likewise.
17141 (arc_address_cost): Make it static.
17142 (arc_verify_short): Likewise.
17143 (branch_dest): Likewise.
17144 (arc_attr_type): Likewise.
17145 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17146 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17147 (arc_final_prescan_insn): Remove inserting the nops due to
17148 hardware hazards. It is done in reorg step.
17149 (insn_length_variant_t): Remove.
17150 (insn_length_parameters_t): Likewise.
17151 (arc_insn_length_parameters): Likewise.
17152 (arc_get_insn_variants): Likewise.
17153 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17155 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17157 PR inline-asm/84683
17158 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17161 PR tree-optimization/84687
17162 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17164 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17166 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17168 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17169 Rename to ppc_speculation_barrier.
17170 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17171 __builtin_ppc_speculation_barrier.
17173 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17176 * combine.c (combine_simplify_rtx): Don't try to simplify if
17177 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17180 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17182 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17183 to 32 bytes when compiling for POWER9.
17185 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17188 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17189 regparm >= 3 with no arg reg available also for calls with
17190 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17193 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17195 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17197 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17200 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17202 2018-03-05 Richard Biener <rguenther@suse.de>
17204 PR tree-optimization/84486
17205 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17206 When inserting a __builtin_assume_aligned call set the LHS
17207 SSA name alignment info accordingly.
17209 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17211 PR tree-optimization/84114
17212 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17213 Avoid reassociation of FLOAT_MODE addition.
17215 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17217 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17218 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17219 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17220 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17221 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17222 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17223 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17225 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17226 __builtin_ia32_wbinvd): New builtins.
17227 (SPECIAL_ARGS2): New.
17228 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17229 (SPECIAL_ARGS2): New.
17230 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17231 (ix86_valid_target_attribute_inner_p): Ditto.
17232 (ix86_init_mmx_sse_builtins): Add special_args2.
17233 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17234 TARGET_WBNOINVD_P): New.
17235 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17236 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17237 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17238 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17239 * config/i386/pconfigintrin.h: New file.
17240 * config/i386/wbnoinvdintrin.h: Ditto.
17241 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17243 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17245 2018-03-05 Richard Biener <rguenther@suse.de>
17247 PR tree-optimization/84670
17248 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17250 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17251 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17252 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17253 doesn't grow if all successors (recursively) were visited at least
17256 2018-03-05 Richard Biener <rguenther@suse.de>
17258 PR tree-optimization/84650
17259 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17260 if executed in the loop pipeline.
17262 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17264 * doc/configfiles.texi (Configuration Files): Move info about
17265 conditionalizing $target-protos.h to...
17266 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17267 differs from $target-protos.h.
17269 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17270 Chung-Ju Wu <jasonwucj@gmail.com>
17272 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17273 * config/nds32/nds32-multiple.md (setmemsi): Define.
17274 * config/nds32/nds32-memory-manipulation.c
17275 (nds32_gen_dup_4_byte_to_word_value): New.
17276 (emit_setmem_word_loop): New.
17277 (emit_setmem_byte_loop): New.
17278 (nds32_expand_setmem_loop): New.
17279 (nds32_expand_setmem_loop_v3m): New.
17280 (nds32_expand_setmem_unroll): New.
17281 (nds32_expand_setmem): New.
17283 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17284 Chung-Ju Wu <jasonwucj@gmail.com>
17286 * config/nds32/nds32-memory-manipulation.c
17287 (nds32_emit_load_store): New.
17288 (nds32_emit_post_inc_load_store): New.
17289 (nds32_emit_mem_move): New.
17290 (nds32_emit_mem_move_block): New.
17291 (nds32_expand_movmemsi_loop_unknown_size): New.
17292 (nds32_expand_movmemsi_loop_known_size): New.
17293 (nds32_expand_movmemsi_loop): New.
17294 (nds32_expand_movmemsi_unroll): New.
17295 (nds32_expand_movmemqi): Rename ...
17296 (nds32_expand_movmemsi): ... to this.
17297 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17298 (movmemsi): ... to this.
17299 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17300 (nds32_expand_movmemsi): ... to this.
17302 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17303 Monk Chiang <sh.chiang04@gmail.com>
17304 Chung-Ju Wu <jasonwucj@gmail.com>
17306 * config/nds32/nds32-protos.h
17307 (nds32_expand_load_multiple): New arguments.
17308 (nds32_expand_store_multiple): Ditto.
17309 (nds32_valid_multiple_load_store): Rename ...
17310 (nds32_valid_multiple_load_store_p): ... to this.
17311 * config/nds32/nds32-memory-manipulation.c
17312 (nds32_expand_load_multiple): Refine implementation.
17313 (nds32_expand_store_multiple): Ditto.
17314 * config/nds32/nds32-multiple.md
17315 (load_multiple): Update nds32_expand_load_multiple interface.
17316 (store_multiple): Update nds32_expand_store_multiple interface.
17317 * config/nds32/nds32-predicates.c
17318 (nds32_valid_multiple_load_store): Rename ...
17319 (nds32_valid_multiple_load_store_p): ... to this and refine
17321 * config/nds32/predicates.md
17322 (nds32_load_multiple_and_update_address_operation): New predicate.
17323 (nds32_store_multiple_and_update_address_operation): New predicate.
17325 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17326 Chung-Ju Wu <jasonwucj@gmail.com>
17328 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17329 (combo): New attribute.
17330 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17332 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17334 * config/nds32/nds32.opt: Change -mcmodel= default value.
17336 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17337 Monk Chiang <sh.chiang04@gmail.com>
17338 Chung-Ju Wu <jasonwucj@gmail.com>
17340 * config/nds32/constants.md (unspec_element): New enum.
17341 * config/nds32/constraints.md (Umw): New constraint.
17342 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17343 * config/nds32/nds32-intrinsic.md: Likewise.
17344 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17345 (nds32_valid_smw_lwm_base_p): New.
17346 (nds32_output_smw_single_word): New.
17347 (nds32_output_lmw_single_word): New.
17348 (nds32_expand_unaligned_load): New.
17349 (nds32_expand_unaligned_store): New.
17350 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17351 (nds32_output_smw_single_word): Declare.
17352 (nds32_output_lmw_single_word): Declare.
17353 (nds32_expand_unaligned_load): Declare.
17354 (nds32_expand_unaligned_store): Declare.
17355 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17356 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17357 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17358 NDS32_BUILTIN_UASTORE_DW.
17359 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17362 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17363 Kito Cheng <kito.cheng@gmail.com>
17364 Chung-Ju Wu <jasonwucj@gmail.com>
17366 * config/nds32/nds32-intrinsic.c
17367 (nds32_expand_builtin_null_ftype_reg): Delete.
17368 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17369 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17370 (nds32_read_argument): New.
17371 (nds32_legitimize_target): Ditto.
17372 (nds32_legitimize_argument): Ditto.
17373 (nds32_check_constant_argument): Ditto.
17374 (nds32_expand_unop_builtin): Ditto.
17375 (nds32_expand_unopimm_builtin): Ditto.
17376 (nds32_expand_binop_builtin): Ditto.
17377 (nds32_builtin_decl_impl): Ditto.
17378 (builtin_description): Ditto.
17379 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17380 (nds32_init_builtins_impl): Ditto.
17381 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17382 (nds32_builtin_decl): New.
17383 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17384 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17386 2018-03-02 Jeff Law <law@redhat.com>
17388 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17389 (redundant_insn, fill_simple_delay_slots): Likewise.
17390 (fill_slots_from_thread): Likewise.
17391 * resource.c (mark_referenced_resources): Likewise.
17392 (mark_set_resources, find_dead_or_set_registers): Likewise.
17394 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17396 * substring-locations.h (format_warning_va): Formatting fix for
17397 ATTRIBUTE_GCC_DIAG.
17398 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17400 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17401 * substring-locations.c: Include intl.h.
17402 (format_warning_va): Turned into small wrapper around
17403 format_warning_n_va, renamed to ...
17404 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17405 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17407 (format_warning_at_substring_n): New function.
17408 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17409 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17410 format_warning_at_substring with just a shorter name instead of
17411 const function pointer.
17412 (fmtwarn_n): New function.
17413 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17414 appropriate, get rid of all the fmtstr temporaries, move conditionals
17415 with G_() wrapped string literals directly into fmtwarn arguments,
17416 cast dir.len to (int), formatting fixes.
17418 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17420 * doc/invoke.texi: Remove "Cilk Plus" references.
17422 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17423 Richard Biener <rguenther@suse.de>
17426 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17427 for error or warning attributes if CALL_FROM_THUNK_P is set.
17430 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17433 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17434 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17437 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17438 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17440 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17441 instead of -1U in last predictors element's probability member.
17443 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17446 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17447 arguments if they are comparable.
17449 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17451 PR tree-optimization/84634
17452 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17453 masks and masked_loop_p with a single loop_masks, making sure it's
17454 null for bb vectorization.
17456 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17458 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17459 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17460 loop->force_vectorize to check whether there is no alias.
17462 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17465 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17467 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17469 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17470 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17471 instead of a loop around prev_real_insn.
17472 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17475 PR inline-asm/84625
17476 * config/i386/i386.c (ix86_print_operand): Use conditional
17477 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17480 2018-03-02 Richard Biener <rguenther@suse.de>
17482 PR tree-optimization/84427
17483 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17484 (bitmap_set_subtract_values): Rewrite to handle multiple
17487 (prune_clobbered_mems): Likewise.
17488 (phi_translate): Take edge instead of pred/phiblock.
17489 (phi_translate_1): Likewise.
17490 (phi_translate_set): Likewise. Insert all translated
17491 exprs for a value into the set, keeping possibly multiple
17492 expressions per value.
17493 (compute_antic_aux): Adjust for phi_translate changes.
17494 When intersecting union the expressions and prune those
17495 not in the final value set, keeping possibly multiple
17496 expressions per value. Do not use value-insertion
17497 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17498 all expressions. Add verification that the value-sets
17499 only shrink during iteration.
17500 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17501 (do_pre_regular_insertion): Likewise.
17502 (do_pre_partial_partial_insertion): Likewise.
17504 2018-03-02 Richard Biener <rguenther@suse.de>
17507 * config/darwin.c (saved_debug_info_level): New static global.
17508 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17509 (darwin_asm_lto_end): Restore debug info generation settings.
17511 2018-03-01 Martin Liska <mliska@suse.cz>
17514 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17515 volatile arguments.
17517 2018-03-01 Richard Biener <rguenther@suse.de>
17520 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17521 type annotation with LTO when debug was disabled at compile-time.
17523 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17525 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17527 (mips_final_postscan_insn): Likewise.
17529 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17531 PR rtl-optimization/84528
17532 * alias.c (init_alias_target): Add commentary.
17533 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17534 a unique base value if the frame pointer is not eliminated
17535 to the stack pointer.
17537 2018-03-01 Tom de Vries <tom@codesourcery.com>
17539 PR rtl-optimization/83327
17540 * lra-int.h (hard_regs_spilled_into): Declare.
17541 * lra.c (hard_regs_spilled_into): Define.
17542 (init_reg_info): Init hard_regs_spilled_into.
17543 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17544 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17545 (process_bb_lives): Handle hard_regs_spilled_into.
17546 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17547 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17549 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17551 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17552 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17553 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17554 * config/rs6000/aix72.h: New file.
17556 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17558 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17559 instead of warning_at with conditional singular and plural messages
17563 * stor-layout.c (update_alignment_for_field): For
17564 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17565 && !DECL_PACKED (field), do the alignment update, just use
17566 only desired_align instead of MAX (type_align, desired_align)
17568 (place_field): Don't do known_align < desired_align handling
17569 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17570 is non-NULL, instead do it after rli->prev_field handling and
17571 only if not within a bitfield word. For DECL_PACKED (field)
17572 use type_align of BITS_PER_UNIT.
17574 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17576 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17577 superfluous parentheses and trailing spaces.
17579 2018-02-28 Richard Biener <rguenther@suse.de>
17581 PR tree-optimization/84584
17582 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17583 SCoPs with fake exit edge.
17585 2018-02-28 Martin Liska <mliska@suse.cz>
17588 * timevar.c (timer::print): Fix format to properly print 100%
17591 2018-02-28 Richard Biener <rguenther@suse.de>
17593 PR middle-end/84607
17594 * genmatch.c (capture_info::walk_match): Do not mark
17595 captured expressions without operands as expr_p given
17596 they act more like predicates and should be subject to
17597 "lost tail" side-effect preserving.
17599 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17601 PR rtl-optimization/81611
17602 * auto-inc-dec.c (attempt_change): Move dead note from
17603 mem_insn if it's the next use of regno
17604 (find_address): Take address use of reg holding
17605 non-incremented value. Add parm to limit search to the named
17607 (merge_in_block): Attempt to use a mem insn that is the next
17608 use of the original regno.
17610 2018-02-27 Martin Sebor <msebor@redhat.com>
17613 * doc/invoke.texi (-Wmissing-attributes): New option.
17614 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17616 2018-02-27 Martin Sebor <msebor@redhat.com>
17618 PR translation/84207
17619 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17620 n argument to unsigned HOST_WIDE_INT.
17621 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17622 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17623 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17624 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17626 2018-02-27 Richard Biener <rguenther@suse.de>
17628 PR tree-optimization/84512
17629 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17630 Do not use the estimate returned from record_stmt_cost for
17631 the scalar iteration cost but sum properly using add_stmt_cost.
17633 2018-02-27 Richard Biener <rguenther@suse.de>
17635 PR tree-optimization/84466
17636 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17637 Adjust last change to less strictly validate use operands.
17639 2018-02-27 Martin Liska <mliska@suse.cz>
17641 PR gcov-profile/84548
17642 * gcov.c (process_file): Allow partial overlap and consider it
17643 also as group functions.
17644 (output_lines): Properly calculate range of lines for a group.
17646 2018-02-27 Martin Liska <mliska@suse.cz>
17648 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17649 'ggc' suffixes. Change first column width.
17650 (timer::print): Fix formatting of the column.
17652 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17654 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17655 preserve inline entry blocks for the sake of debug inline
17656 entry point markers alone.
17657 (remove_unused_locals): Suggest in comments a better place to
17658 force the preservation of inline entry blocks that are
17659 otherwise unused, but do not preserve them.
17661 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17663 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17665 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17668 * config/i386/constraints.md (Bs): Replace
17669 ix86_indirect_branch_register with
17670 TARGET_INDIRECT_BRANCH_REGISTER.
17672 * config/i386/i386.md (indirect_jump): Likewise.
17673 (tablejump): Likewise.
17674 (*sibcall_memory): Likewise.
17675 (*sibcall_value_memory): Likewise.
17676 Peepholes of indirect call and jump via memory: Likewise.
17677 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17678 (*sibcall_value_GOT_32): Likewise.
17679 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17680 (GOT_memory_operand): Likewise.
17681 (call_insn_operand): Likewise.
17682 (sibcall_insn_operand): Likewise.
17683 (GOT32_symbol_operand): Likewise.
17684 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17686 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17688 PR rtl-optimization/83496
17689 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17690 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17691 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17692 redundant insn, if any.
17693 (relax_delay_slots): Likewise.
17694 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17696 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17698 PR tree-optimization/83965
17699 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17700 that grouped statements are part of a reduction chain. Return
17701 true if the statement is not marked as a reduction itself but
17702 is part of a group.
17703 (vect_recog_dot_prod_pattern): Don't check whether the statement
17704 is part of a group here.
17705 (vect_recog_sad_pattern): Likewise.
17706 (vect_recog_widen_sum_pattern): Likewise.
17708 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17711 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17713 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17716 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17718 (ix86_output_indirect_function_return): New prototype.
17719 (ix86_split_simple_return_pop_internal): Likewise.
17720 * config/i386/i386.c (indirect_return_via_cx): New.
17721 (indirect_return_via_cx_bnd): Likewise.
17722 (indirect_thunk_name): Handle return va CX_REG.
17723 (output_indirect_thunk_function): Create alias for
17724 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17725 (ix86_output_indirect_jmp): Remove the bool argument.
17726 (ix86_output_indirect_function_return): New function.
17727 (ix86_split_simple_return_pop_internal): Likewise.
17728 * config/i386/i386.md (*indirect_jump): Don't pass false
17729 to ix86_output_indirect_jmp.
17730 (*tablejump_1): Likewise.
17731 (simple_return_pop_internal): Change it to define_insn_and_split.
17732 Call ix86_split_simple_return_pop_internal to split it for
17733 -mfunction-return=.
17734 (simple_return_indirect_internal): Call
17735 ix86_output_indirect_function_return instead of
17736 ix86_output_indirect_jmp.
17738 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17741 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17742 memset and value initialization afterwards.
17744 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17746 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17748 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17751 * common/config/aarch64/aarch64-common.c
17752 (aarch_option_optimization_table[]): Switch
17753 off fomit-frame-pointer
17755 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17756 Chung-Ju Wu <jasonwucj@gmail.com>
17758 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17760 (store_multiple): Ditto.
17762 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17764 * config.gcc: Add --with-cpu support for nds32 target.
17765 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17766 * config/nds32/nds32.opt: Add -mcpu= option.
17768 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17770 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17771 isel=yes): Warn for these deprecated options.
17773 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17775 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17776 ISA_2_5_MASKS_EMBEDDED.
17778 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17780 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17781 p->max as pointers rather than using iterative_hash_expr.
17783 2018-02-23 Carl Love <cel@us.ibm.com>
17785 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17786 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17788 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17789 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17790 P8V_BUILTIN_VEC_VUNSIGNED2.
17792 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17795 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17796 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17798 * lra-constraints.c (curr_insn_transform): Set up
17799 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17801 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17802 * lra-eliminations.c (spill_pseudos): Ditto.
17803 (process_insn_for_elimination): Ditto.
17804 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17805 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17806 LRA_NON_CLOBBERED_ALT.
17808 2018-02-22 Martin Sebor <msebor@redhat.com>
17810 PR tree-optimization/84480
17811 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17812 to maybe_diag_stxncpy_trunc. Call it.
17813 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17814 from gimple_fold_builtin_strcpy. Print inlining stack.
17815 (handle_builtin_stxncpy): Print inlining stack.
17816 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17818 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17821 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17822 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17823 and -fcheck-pointer-bounds are used together.
17824 (indirect_thunk_prefix): New enum.
17825 (indirect_thunk_need_prefix): New function.
17826 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17827 "_nt" instead of "_bnd" for NOTRACK prefix.
17828 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17829 (output_indirect_thunk_function): Likewise.
17831 (ix86_code_end): Update output_indirect_thunk_function calls.
17832 (ix86_output_indirect_branch_via_reg): Replace
17833 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17834 (ix86_output_indirect_branch_via_push): Likewise.
17835 (ix86_output_function_return): Likewise.
17836 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17837 incompatible with -fcf-protection=branch and
17838 -fcheck-pointer-bounds.
17840 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17843 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17844 Change gcc_assert call to output_operand_lossage.
17846 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17848 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17850 2018-02-22 DJ Delorie <dj@redhat.com>
17851 Sebastian Perta <sebastian.perta@renesas.com>
17852 Oleg Endo <olegendo@gcc.gnu.org>
17854 * config/rx/rx.c (rx_rtx_costs): New function.
17855 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17857 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17859 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17861 2018-02-22 Martin Liska <mliska@suse.cz>
17864 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17865 Add "native" as a possible value.
17867 2018-02-22 Martin Liska <mliska@suse.cz>
17870 * config/i386/i386.c (ix86_option_override_internal):
17871 Add "native" as a possible value for -march and -mtune.
17873 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17876 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17877 to all type variants.
17879 PR tree-optimization/84503
17880 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17881 width as info->bitpos + info->bitsize - start.
17882 (merged_store_group::merge_overlapping): Simplify width computation.
17883 (check_no_overlap): New function.
17884 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17885 start + width and last_order of the group, fail if check_no_overlap
17887 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17888 to group if check_no_overlap fails.
17890 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17892 * config/rs6000/altivec.md: Delete contraint arguments to
17893 define_expand, define_split, and define_peephole2, and in
17894 define_insn_and_split if always unused.
17895 * config/rs6000/darwin.md: Ditto.
17896 * config/rs6000/dfp.md: Ditto.
17897 * config/rs6000/rs6000.md: Ditto.
17898 * config/rs6000/sync.md: Ditto.
17899 * config/rs6000/vector.md: Ditto.
17900 * config/rs6000/vsx.md: Ditto.
17902 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17904 * config/rs6000/altivec.md: Write output control strings as braced
17905 blocks instead of double-quoted strings.
17906 * config/rs6000/darwin.md: Ditto.
17907 * config/rs6000/rs6000.md: Ditto.
17908 * config/rs6000/vector.md: Ditto.
17909 * config/rs6000/vsx.md: Ditto.
17911 2018-02-21 Jason Merrill <jason@redhat.com>
17913 PR c++/84314 - ICE with templates and fastcall attribute.
17914 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17916 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17918 * ipa-cp.c (determine_versionability): Fix comment typos.
17920 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17923 * ipa-cp.c (determine_versionability): Do not version functions caling
17926 2018-02-21 Martin Liska <mliska@suse.cz>
17929 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17930 Add "native" as a possible value.
17931 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17932 the macro when native cpu detection is available.
17934 2018-02-21 Martin Liska <mliska@suse.cz>
17937 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17938 Add "native" as a possible value.
17939 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17940 when native cpu detection is available.
17942 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17943 Martin Sebor <msebor@redhat.com>
17945 PR tree-optimization/84478
17946 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17948 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17949 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17950 support which is conservatively correct, for 2 only stay conservative
17951 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17952 argument to the 2 argument get_range_strlen, adjust 6 arg
17953 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17955 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17956 (gimple_fold_builtin_strlen): Pass true as last argument to
17959 2018-02-20 Martin Sebor <msebor@redhat.com>
17961 PR middle-end/84095
17962 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17963 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17964 (builtin_memref::builtin_memref): Factor out parts into
17965 set_base_and_offset and call it.
17967 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17969 PR middle-end/84406
17970 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17971 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17972 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17973 search at the associated MODE_INT.
17975 2018-02-20 Jeff Law <law@redhat.com>
17977 PR middle-end/82123
17978 PR tree-optimization/81592
17979 PR middle-end/79257
17980 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17981 for range data rather than using global data.
17982 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17983 range data rather than using global data.
17984 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17985 pass it to children as needed.
17986 (struct directive::fmtresult): Similarly.
17987 (struct directive::set_width): Similarly.
17988 (struct directive::set_precision): Similarly.
17989 (format_integer, format_directive, parse_directive): Similarly.
17990 (format_none): Accept unnamed vr_values parameter.
17991 (format_percent, format_floating, format_character): Similarly.
17992 (format_string, format_plain): Similarly.
17993 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17994 the EVRP range analyzer for range data rather than using global data.
17995 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17996 gimple-ssa-evrp-analyze.h
17997 (class sprintf_dom_walker): Add after_dom_children member function.
17998 Add evrp_range_analyzer member.
17999 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18000 range analyzer as needed.
18001 (sprintf_dom_walker::after_dom_children): New member function.
18002 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18004 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18005 (evrp_range_analyzer::pop_to_marker): Likewise.
18007 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18009 PR tree-optimization/84419
18010 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18011 with the required type if its current type is compatible but
18014 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18016 PR middle-end/82004
18017 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18018 after vectorization.
18020 2018-02-20 Martin Liska <mliska@suse.cz>
18023 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18024 possible values if we don't have a hint.
18026 2018-02-20 Martin Liska <mliska@suse.cz>
18030 * final.c (shorten_branches): Build align_tab array with one
18032 * opts.c (finish_options): Add alignment option limit check.
18033 (MAX_CODE_ALIGN): Likewise.
18034 (MAX_CODE_ALIGN_VALUE): Likewise.
18035 * doc/invoke.texi: Document maximum allowed option value for
18036 all -falign-* options.
18038 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18041 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18042 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18043 * var-tracking.c (emit_note_insn_var_location): Remove all references
18044 to NOTE_INSN_CALL_ARG_LOCATION.
18045 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18046 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18047 Use copy_rtx_if_shared.
18048 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18049 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18050 (dwarf2out_var_location): Remove handling of
18051 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18053 * final.c (final_scan_insn): Remove all references to
18054 NOTE_INSN_CALL_ARG_LOCATION.
18055 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18056 before dumping final insns.
18057 * except.c (emit_note_eh_region_end): Remove all references to
18058 NOTE_INSN_CALL_ARG_LOCATION.
18059 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18060 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18061 * config/arc/arc.c (hwloop_optimize): Likewise.
18062 * config/arm/arm.c (create_fix_barrier): Likewise.
18063 * config/s390/s390.c (s390_chunkify_start): Likewise.
18064 * config/sh/sh.c (find_barrier): Likewise.
18065 * config/i386/i386.c (rest_of_insert_endbranch,
18066 ix86_seh_fixup_eh_fallthru): Likewise.
18067 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18068 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18069 * config/frv/frv.c (frv_function_prologue): Likewise.
18070 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18072 (note_outside_basic_block_p): Remove all references to
18073 NOTE_INSN_CALL_ARG_LOCATION.
18074 * gengtype.c (adjust_field_rtx_def): Likewise.
18075 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18077 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18078 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18081 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18084 PR tree-optimization/84452
18085 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18086 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18089 2018-02-19 Martin Liska <mliska@suse.cz>
18092 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18094 2018-02-19 Martin Liska <mliska@suse.cz>
18095 Richard Sandiford <richard.sandiford@linaro.org>
18097 PR tree-optimization/82491
18098 * gimple-fold.c (get_base_constructor): Make earlier bail out
18101 2018-02-19 Carl Love <cel@us.ibm.com>
18103 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18104 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18106 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18107 P8V_BUILTIN_VEC_NEG.
18109 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18111 * config/rl78/rl78.md (movdf): New define expand.
18113 2018-02-19 Martin Liska <mliska@suse.cz>
18116 * doc/invoke.texi: Fix typo.
18117 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18119 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18121 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18122 handle rs6000_single_float and rs6000_double_float specially for
18125 2018-02-16 Jeff Law <law@redhat.com>
18127 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18128 (pop_regs): Use it.
18130 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18133 * ipa-inline.c (inline_small_functions): Fix a typo.
18135 2018-02-16 Nathan Sidwell <nathan@acm.org>
18137 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18139 2018-02-16 Carl Love <cel@us.ibm.com>
18141 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18142 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18143 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18144 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18145 expansion to P8V_BUILTIN_VEC_FLOAT2.
18147 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18149 PR rtl-optimization/70023
18150 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18151 src_regno into account.
18153 2018-02-16 Carl Love <cel@us.ibm.com>
18155 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18156 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18157 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18158 * config/rs6000/rs6000.c: Remove case statements for
18159 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18160 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18161 and P9V_BUILTIN_VEC_VINSERT4B.
18162 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18163 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18164 * config/rs6000/vsx.md:
18165 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18168 2018-02-16 Carl Love <cel@us.ibm.com>
18170 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18172 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18174 * config/rs6000/rs6000-c.c: Add the definitions for
18175 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18176 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18177 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18178 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18179 definition for insert4b and define insn *insert3b_internal.
18180 * doc/extend.texi: Add documentation for vec_extract4b.
18182 2018-02-16 Nathan Sidwell <nathan@acm.org>
18184 * doc/extend.texi (Backwards Compatibility): Mention friend
18185 injection. Note for-scope is deprecated.
18186 * doc/invoke.texi (-ffriend-injection): Deprecate.
18188 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18190 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18191 that moved to I2, also allow destinations that are a paradoxical
18192 subreg (instead of a normal reg).
18194 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18197 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18200 2018-02-16 Richard Biener <rguenther@suse.de>
18202 PR tree-optimization/84037
18203 PR tree-optimization/84016
18205 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18206 Adjust vec_construct for the fact we need additional higher latency
18207 128bit inserts for AVX256 and AVX512 vector builds.
18208 (ix86_add_stmt_cost): Scale vector construction cost for
18211 2018-02-16 Richard Biener <rguenther@suse.de>
18213 PR tree-optimization/84417
18214 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18215 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18216 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18218 2018-02-16 Martin Liska <mliska@suse.cz>
18221 * internal-fn.def (ASAN_CHECK): Set proper flags.
18222 (ASAN_MARK): Likewise.
18224 2018-02-16 Julia Koval <julia.koval@intel.com>
18226 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18227 from PTA_CANNONLAKE.
18229 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18232 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18233 Use ++iter rather than iter++ for std::list iterators.
18234 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18235 defer deleting them until all nodes in the forest are processed. Do
18236 free even leaf nodes. Change to_process into auto_vec.
18239 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18240 * vec.h (vec_default_construct): Use memset instead of placement new
18241 if BROKEN_VALUE_INITIALIZATION is defined.
18242 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18243 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18246 PR rtl-optimization/83723
18247 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18248 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18249 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18251 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18253 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18255 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18257 PR rtl-optimization/81443
18258 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18259 from inner REGs to paradoxical SUBREGs.
18261 2018-02-16 Richard Biener <rguenther@suse.de>
18263 PR tree-optimization/84399
18264 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18265 For operands we can analyze at their definition make sure we can
18266 analyze them at each use as well.
18268 2018-02-16 Richard Biener <rguenther@suse.de>
18270 PR tree-optimization/84190
18271 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18272 volatile accesses if the decl isn't volatile.
18274 2018-02-15 Jason Merrill <jason@redhat.com>
18276 PR c++/84314 - ICE with templates and fastcall attribute.
18277 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18278 TYPE_CANONICAL on an existing type.
18280 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18282 PR tree-optimization/84383
18283 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18284 dstoff nor call operand_equal_p if dstbase is NULL.
18286 PR tree-optimization/84334
18287 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18288 also a CONSTANT_CLASS_P, punt.
18290 2018-02-14 Jim Wilson <jimw@sifive.com>
18292 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18293 first SMALL_OPERAND check. New local min_second_step. Move assert
18294 to where locals are set. Add TARGET_RVC support.
18295 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18297 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18299 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18301 2018-02-14 Martin Sebor <msebor@redhat.com>
18303 PR tree-optimization/83698
18304 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18305 arrays constrain the offset range to their bounds.
18306 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18307 (builtin_access::overlap): Avoid setting the size of overlap if it's
18309 (maybe_diag_overlap): Also consider arrays when deciding what values
18310 of offsets to include in diagnostics.
18312 2018-02-14 Martin Sebor <msebor@redhat.com>
18315 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18316 that correspond to the kind of a declaration.
18318 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18321 * config/pa/pa.md: Load address of PIC label using the linkage table
18322 if the label is nonlocal.
18324 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18326 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18327 warning message if user requests -maltivec=be.
18328 * doc/invoke.texi: Document deprecation of -maltivec=be.
18330 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18333 * config/rs6000/rs6000-c.c: Update definitions for
18334 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18335 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18337 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18340 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18341 add _get_ssp intrinsics. Remove argument from
18342 __builtin_ia32_rdssp[d|q].
18343 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18344 * config/i386/i386-builtin.def: Remove argument from
18345 __builtin_ia32_rdssp[d|q].
18346 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18347 ix86_expand_special_args_builtin for _rdssp[d|q].
18348 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18349 Clear register before usage.
18350 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18351 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18353 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18355 PR tree-optimization/84357
18356 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18357 operand 1 of an ARRAY_REF too.
18359 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18362 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18363 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18365 (set_of_reg): New struct.
18366 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18367 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18368 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18370 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18371 Split into bitclr, bitset, bitinvert patterns if appropriate.
18372 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18373 use rx_fuse_in_memory_bitop.
18374 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18375 to named insn, correct maximum insn length.
18377 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18380 * machmode.def: Define a complex mode for PARTIAL_INT.
18381 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18383 * doc/rtl.texi: Document CSPImode.
18384 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18386 (msp430_hard_regno_nregs_with_padding): Likewise.
18388 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18391 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18393 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18395 PR rtl-optimization/84169
18396 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18397 we generated a parallel as new i3 and we split that to new i2 and i3
18398 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18399 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18400 those to i2, not i1. Partially rewrite this scan code.
18402 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18405 * stor-layout.c (place_field): For variable length fields, adjust
18406 offset_align afterwards not just based on the field's alignment,
18407 but also on the size.
18409 PR middle-end/84309
18410 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18411 of exps and logs in the use_exp2 case.
18413 2018-02-13 Jeff Law <law@redhat.com>
18415 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18416 entry for "vector".
18418 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18421 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18425 * common.opt (gas-loc-support, gas-locview-support): New.
18426 (ginline-points, ginternal-reset-location-views): New.
18427 * doc/invoke.texi: Document them. Use @itemx where intended.
18428 (gvariable-location-views): Adjust.
18429 * target.def (reset_location_view): New.
18430 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18431 (TARGET_RESET_LOCATION_VIEW): New.
18432 * doc/tm.texi: Rebuilt.
18433 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18434 (dwarf2out_default_as_locview_support): New.
18435 (output_asm_line_debug_info): Use option variables.
18436 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18437 (output_loc_list): Likewise.
18438 (add_high_low_attributes): Check option variables.
18439 Don't output entry view attribute in strict mode.
18440 (gen_inlined_subroutine_die): Check option variables.
18441 (dwarf2out_inline_entry): Likewise.
18442 (init_sections_and_labels): Likewise.
18443 (dwarf2out_early_finish): Likewise.
18444 (maybe_reset_location_view): New, from...
18445 (dwarf2out_var_location): ... here. Call it.
18446 * debug.h (dwarf2out_default_as_loc_support): Declare.
18447 (dwarf2out_default_as_locview_support): Declare.
18448 * hooks.c (hook_int_rtx_insn_0): New.
18449 * hooks.h (hook_int_rtx_insn_0): Declare.
18450 * toplev.c (process_options): Take -gas-loc-support and
18451 -gas-locview-support from dwarf2out. Enable
18452 -gvariable-location-views by default only with locview
18453 assembler support. Enable -ginternal-reset-location-views by
18454 default only if the target defines the corresponding hook.
18455 Enable -ginline-points by default if location views are
18456 enabled; force it disabled if statement frontiers are
18458 * tree-inline.c (expand_call_inline): Check option variables.
18459 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18461 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18463 PR tree-optimization/84321
18464 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18465 handling. Also check whether the anti-range contains any values
18466 that satisfy the mask; switch to a VR_RANGE if not.
18468 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18471 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18473 2018-02-13 Martin Jambor <mjambor@suse.cz>
18476 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18477 of call statements, also set location of a load to a temporary.
18479 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18481 * config/rl78/rl78.c (add_vector_labels): New function.
18482 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18483 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18484 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18485 which checks that no arguments are passed.
18486 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18487 * doc/extend.texi: Documentation for the new attribute.
18489 2018-02-13 Andreas Schwab <schwab@suse.de>
18491 * config/riscv/linux.h (CPP_SPEC): Define.
18493 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18496 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18497 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18498 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18499 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18500 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18501 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18502 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18503 temporarily for AES and PCLMUL builtins.
18505 PR tree-optimization/84339
18506 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18507 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18510 PR middle-end/84309
18511 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18512 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18513 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18515 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18517 * omp-simd-clone.h: New file.
18518 * omp-simd-clone.c: Include omp-simd-clone.h.
18519 (expand_simd_clones): No longer static.
18520 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18521 cgraph.h and omp-simd-clone.h.
18522 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18523 (vect_recog_widen_shift_pattern): Formatting fix.
18524 (vect_pattern_recog_1): Don't check optab for calls.
18527 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18528 operands[2] into a REG before using gen_lowpart on it.
18530 2018-02-12 Jeff Law <law@redhat.com>
18533 * config/sh/sh.c (find_barrier): Consider a sibling call
18536 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18537 successfully back substituting a reg.
18539 2018-02-12 Richard Biener <rguenther@suse.de>
18541 PR tree-optimization/84037
18542 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18543 parameter, move visited init to caller.
18544 (vect_slp_analyze_operations): Separate cost from validity
18545 check, initialize visited once for all instances.
18546 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18548 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18550 (vect_model_promotion_demotion_cost): Likewise.
18551 (vectorizable_bswap): Guard cost modeling with !slp_node
18552 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18554 (vectorizable_call): Likewise.
18555 (vectorizable_conversion): Likewise.
18556 (vectorizable_assignment): Likewise.
18557 (vectorizable_shift): Likewise.
18558 (vectorizable_operation): Likewise.
18559 (vectorizable_store): Likewise.
18560 (vectorizable_load): Likewise.
18561 (vectorizable_condition): Likewise.
18562 (vectorizable_comparison): Likewise.
18564 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18567 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18568 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18569 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18571 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18573 PR middle-end/83665
18574 * params.def (inline-min-speedup): Increase from 8 to 15.
18575 (max-inline-insns-auto): Decrease from 40 to 30.
18576 * ipa-split.c (consider_split): Add some buffer for function to
18577 be considered inlining candidate.
18578 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18581 2018-02-12 Richard Biener <rguenther@suse.de>
18583 PR tree-optimization/84037
18584 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18585 matched stmts if we cannot swap the non-matched ones.
18587 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18589 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18590 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18591 _mm_maskz_scalef_round_ss): New intrinsics.
18592 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18593 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18594 __builtin_ia32_scalefss_round): Remove.
18595 (__builtin_ia32_scalefsd_mask_round,
18596 __builtin_ia32_scalefss_mask_round): New intrinsics.
18597 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18598 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18599 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18600 "<round_constraint>")): Changed to ...
18601 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18602 "<round_scalar_constraint>")): ... this.
18603 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18604 %0, %1, %2<round_op3>}"): Changed to ...
18605 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18606 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18607 %2<round_scalar_mask_op3>}"): ... this.
18608 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18610 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18612 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18613 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18614 (_mm_maskz_sqrt_round_ss): New intrinsics.
18615 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18616 (__builtin_ia32_sqrtsd_mask_round)
18617 (__builtin_ia32_sqrtss_mask_round): New builtins.
18618 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18619 (__builtin_ia32_sqrtss_round): Remove.
18620 (__builtin_ia32_sqrtsd_mask_round)
18621 (__builtin_ia32_sqrtss_mask_round): New builtins.
18622 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18623 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18624 ((match_operand:VF_128 1 "vector_operand"
18625 "xBm,<round_constraint>")): Changed to ...
18626 ((match_operand:VF_128 1 "vector_operand"
18627 "xBm,<round_scalar_constraint>")): ... this.
18628 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18629 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18630 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18631 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18632 %<iptr>1<round_scalar_mask_op3>}): ... this.
18633 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18634 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18636 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18639 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18640 Cast vec_cmpeq result to correct type.
18641 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18642 Cast vec_cmpgt result to correct type.
18644 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18646 * final.c (final_scan_insn_1): Renamed from...
18647 (final_scan_insn): ... this. New wrapper, to recover
18648 seen from the outermost call in recursive ones.
18649 * config/sparc/sparc.c (output_return): Drop seen from call.
18650 (output_sibcall): Likewise.
18651 * config/visium/visium.c (output_branch): Likewise.
18653 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18655 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18658 2018-02-10 Alan Modra <amodra@gmail.com>
18661 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18662 Specify LR as an input.
18664 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18667 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18668 remove_member_access_dummy_vars): New functions.
18669 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18670 lower_omp_1, execute_lower_omp): Use them.
18672 PR rtl-optimization/84308
18673 * shrink-wrap.c (spread_components): Release todo vector.
18675 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18677 PR rtl-optimization/57193
18678 * ira-color.c (struct allocno_color_data): Add member
18679 conflict_allocno_hard_prefs.
18680 (update_conflict_allocno_hard_prefs): New.
18681 (bucket_allocno_compare_func): Add a preference based on
18682 conflict_allocno_hard_prefs.
18683 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18684 (color_allocnos): Remove a dead code. Initiate
18685 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18687 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18690 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18691 constraint from =wa to wa. Avoid a subreg on the output operand,
18692 instead use a pseudo and subreg it in a move.
18693 (p9_xxbrd_<mode>): Changed to ...
18694 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18695 (p9_xxbrd_v2df): New expander.
18696 (p9_xxbrw_<mode>): Changed to ...
18697 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18698 (p9_xxbrw_v4sf): New expander.
18700 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18702 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18704 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18707 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18708 multiply in 32-bit mode.
18709 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18710 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18713 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18715 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18716 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18717 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18718 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18720 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18723 * dwarf2out.c (is_trivial_indirect_ref): New function.
18724 (dwarf2out_late_global_decl): Do not generate a location
18725 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18726 and that are not defined in the current unit.
18728 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18730 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18731 instead of a libcall for UNORDERED.
18733 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18736 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18737 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18739 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18742 * config/s390/s390.c (s390_set_current_function): Invoke
18743 s390_indirect_branch_settings also if fndecl didn't change.
18745 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18747 * config/rs6000/rs6000.md (blockage): Set length to zero.
18749 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18751 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18753 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18756 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18757 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18761 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18762 PARALLEL incoming that failed vt_get_decl_and_offset check.
18764 PR middle-end/84237
18765 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18766 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18768 (get_variable_section): For decls in named .bss* sections pass true as
18769 second argument to bss_initializer_p.
18771 2018-02-09 Marek Polacek <polacek@redhat.com>
18772 Jakub Jelinek <jakub@redhat.com>
18775 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18776 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18777 Sync some changes from cxx_fold_indirect_ref.
18779 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18781 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18783 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18784 (BLOCK_INLINE_ENTRY_LABEL): New.
18785 (dwarf2out_var_location): Disregard inline entry markers.
18786 (inline_entry_data): New struct.
18787 (inline_entry_data_hasher): New hashtable type.
18788 (inline_entry_data_hasher::hash): New.
18789 (inline_entry_data_hasher::equal): New.
18790 (inline_entry_data_table): New variable.
18791 (add_high_low_attributes): Add DW_AT_entry_pc and
18792 DW_AT_GNU_entry_view attributes if a pending entry is found
18793 in inline_entry_data_table. Add old entry_pc attribute only
18794 if debug nonbinding markers are disabled.
18795 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18796 markers are enabled.
18797 (block_within_block_p, dwarf2out_inline_entry): New.
18798 (dwarf2out_finish): Check that no entries remained in
18799 inline_entry_data_table.
18800 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18801 (final_scan_insn, notice_source_line): Likewise.
18802 (rest_of_clean_state): Skip inline entry markers.
18803 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18805 * gimple.c (gimple_build_debug_inline_entry): New.
18806 * gimple.h (enum gimple_debug_subcode): Add
18807 GIMPLE_DEBUG_INLINE_ENTRY.
18808 (gimple_build_debug_inline_entry): Declare.
18809 (gimple_debug_inline_entry_p): New.
18810 (gimple_debug_nonbind_marker_p): Adjust.
18811 * insn-notes.def (INLINE_ENTRY): New.
18812 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18813 inline entry marker notes.
18814 (print_insn): Likewise.
18815 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18816 (INSN_DEBUG_MARKER_KIND): Likewise.
18817 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18818 * tree-inline.c (expand_call_inline): Build and insert
18819 debug_inline_entry stmt.
18820 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18821 inline entry blocks early, if nonbind markers are enabled.
18822 (dump_scope_block): Dump fragment info.
18823 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18824 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18825 (gimple_build_debug_inline_entry): New.
18826 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18827 Enable/disable inline entry points too.
18828 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18829 (DEBUG_INSN): Describe inline entry markers.
18831 * common.opt (gvariable-location-views): New.
18832 (gvariable-location-views=incompat5): New.
18833 * config.in: Rebuilt.
18834 * configure: Rebuilt.
18835 * configure.ac: Test assembler for view support.
18836 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18837 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18838 * dwarf2out.c (var_loc_view): New typedef.
18839 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18840 (dwarf2out_locviews_in_attribute): New.
18841 (dwarf2out_locviews_in_loclist): New.
18842 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18843 (enum dw_line_info_opcode): Add LI_adv_address.
18844 (struct dw_line_info_table): Add view.
18845 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18846 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18847 (zero_view_p): New variable.
18848 (ZERO_VIEW_P): New macro.
18849 (output_asm_line_debug_info): New.
18850 (struct var_loc_node): Add view.
18851 (add_AT_view_list, AT_loc_list): New.
18852 (add_var_loc_to_decl): Add view param. Test it against last.
18853 (new_loc_list): Add view params. Record them.
18854 (AT_loc_list_ptr): Handle loc and view lists.
18855 (view_list_to_loc_list_val_node): New.
18856 (print_dw_val): Handle dw_val_class_view_list.
18857 (size_of_die): Likewise.
18858 (value_format): Likewise.
18859 (loc_list_has_views): New.
18860 (gen_llsym): Set vl_symbol too.
18861 (maybe_gen_llsym, skip_loc_list_entry): New.
18862 (dwarf2out_maybe_output_loclist_view_pair): New.
18863 (output_loc_list): Output view list or entries too.
18864 (output_view_list_offset): New.
18865 (output_die): Handle dw_val_class_view_list.
18866 (output_dwarf_version): New.
18867 (output_compilation_unit_header): Use it.
18868 (output_skeleton_debug_sections): Likewise.
18869 (output_rnglists, output_line_info): Likewise.
18870 (output_pubnames, output_aranges): Update version comments.
18871 (output_one_line_info_table): Output view numbers in asm comments.
18872 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18873 Call maybe_gen_llsym.
18874 (loc_list_from_tree_1): Adjust.
18875 (add_AT_location_description): Create view list attribute if
18876 needed, check it's absent otherwise.
18877 (convert_cfa_to_fb_loc_list): Adjust.
18878 (maybe_emit_file): Call output_asm_line_debug_info for test.
18879 (dwarf2out_var_location): Reset views as needed. Precompute
18880 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18881 attribute. Set view.
18882 (new_line_info_table): Reset next view.
18883 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18884 (dwarf2out_source_line): Likewise. Output view resets and labels to
18885 the assembler, or select appropriate line info opcodes.
18886 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18887 (optimize_string_length): Catch it. Adjust.
18888 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18889 dw_val_class_view_list, and remove it if no longer needed.
18890 (hash_loc_list): Hash view numbers.
18891 (loc_list_hasher::equal): Compare them.
18892 (optimize_location_lists): Check whether a view list symbol is
18893 needed, and whether the locview attribute is present, and
18894 whether they match. Remove the locview attribute if no longer
18896 (index_location_lists): Call skip_loc_list_entry for test.
18897 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18898 Use output_dwarf_version.
18899 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18900 (struct dw_val_node): Add val_view_list.
18901 * final.c (SEEN_NEXT_VIEW): New.
18902 (set_next_view_needed): New.
18903 (clear_next_view_needed): New.
18904 (maybe_output_next_view): New.
18905 (final_start_function): Rename to...
18906 (final_start_function_1): ... this. Take pointer to FIRST,
18907 add SEEN parameter. Emit param bindings in the initial view.
18908 (final_start_function): Reintroduce SEEN-less interface.
18909 (final): Rename to...
18910 (final_1): ... this. Take SEEN parameter. Output final pending
18911 next view at the end.
18912 (final): Reintroduce seen-less interface.
18913 (final_scan_insn): Output pending next view before switching
18914 sections or ending a block. Mark the next view as needed when
18915 outputting variable locations. Notify debug backend of section
18916 changes, and of location view changes.
18917 (rest_of_handle_final): Adjust.
18918 * toplev.c (process_options): Autodetect value for debug variable
18919 location views option. Warn on incompat5 without -gdwarf-5.
18920 * doc/invoke.texi (gvariable-location-views): New.
18921 (gvariable-location-views=incompat5): New.
18922 (gno-variable-location-views): New.
18924 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18926 PR tree-optimization/84136
18927 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18928 that the result of find_edge is non-NULL.
18930 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18933 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18934 storing integer register in SImode. Fix cost of 256 and 512
18935 byte aligned SSE register store.
18937 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18939 * config/i386/i386.c (ix86_multiplication_cost): Fix
18940 multiplication cost for TARGET_AVX512DQ.
18942 2018-02-08 Marek Polacek <polacek@redhat.com>
18944 PR tree-optimization/84238
18945 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18948 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18950 PR tree-optimization/84265
18951 * tree-vect-stmts.c (vectorizable_store): Don't treat
18952 VMAT_CONTIGUOUS accesses as grouped.
18953 (vectorizable_load): Likewise.
18955 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18957 PR tree-optimization/81635
18958 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18959 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18960 (test_round_for_mask): New functions.
18961 (wide_int_cc_tests): Call test_round_for_mask.
18962 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18963 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18964 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18965 range returned by get_range_info.
18967 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18970 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18971 * symtab.c: Include builtins.h
18972 (symtab_node::output_to_lto_symbol_table_p): Move here
18973 from lto-streamer-out.c:output_symbol_p.
18974 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18975 (output_symbol_p): Move all logic to symtab.c
18976 (produce_symtab): Update.
18978 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18980 * config/s390/s390-opts.h (enum indirect_branch): Define.
18981 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18982 (s390_indirect_branch_via_thunk)
18983 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18984 (enum s390_indirect_branch_type): Define.
18985 * config/s390/s390.c (struct s390_frame_layout, struct
18986 machine_function): Remove.
18987 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18988 (indirect_branch_table_label_no, indirect_branch_table_name):
18990 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18991 (enum s390_indirect_branch_option): Define.
18992 (s390_return_addr_from_memory): New function.
18993 (s390_handle_string_attribute): New function.
18994 (s390_attribute_table): Add new attribute handler.
18995 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18996 (s390_indirect_branch_via_thunk): New function.
18997 (s390_indirect_branch_via_inline_thunk): New function.
18998 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18999 sibling call optimization for non z10 compiles.
19000 (s390_emit_call): Force indirect branch target to be a single
19001 register. Add r1 clobber for non-z10 compiles.
19002 (s390_emit_epilogue): Emit return jump via return_use expander.
19003 (s390_reorg): Handle JUMP_INSNs as execute targets.
19004 (s390_option_override_internal): Perform validity checks for the
19005 new command line options.
19006 (s390_indirect_branch_attrvalue): New function.
19007 (s390_indirect_branch_settings): New function.
19008 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19009 (s390_output_indirect_thunk_function): New function.
19010 (s390_code_end): Implement target hook.
19011 (s390_case_values_threshold): Implement target hook.
19012 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19014 * config/s390/s390.h (struct s390_frame_layout)
19015 (struct machine_function): Move here from s390.c.
19016 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19017 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19018 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19019 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19020 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19021 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19022 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19023 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19024 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19025 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19026 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19027 (mnemonic attribute): Add values which aren't recognized
19029 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19030 pattern for branch conversion. Fix mnemonic attribute.
19031 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19032 indirect branch via thunk if requested.
19033 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19034 ("*indirect_jump"): Disable for branch conversion using out of
19036 ("indirect_jump_via_thunk<mode>_z10")
19037 ("indirect_jump_via_thunk<mode>")
19038 ("indirect_jump_via_inlinethunk<mode>_z10")
19039 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19040 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19041 ("casesi_jump_via_inlinethunk<mode>_z10")
19042 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19043 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19044 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19045 ("*indirect2_jump"): Disable for branch conversion.
19046 ("casesi_jump"): Turn into expander and expand patterns for branch
19048 ("return_use"): New expander.
19049 ("*return"): Emit return via thunk and rename it to ...
19050 ("*return<mode>"): ... this one.
19051 * config/s390/s390.opt: Add new options and and enum for the
19054 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19056 * lra-constraints.c (match_reload): Unconditionally use
19057 gen_lowpart_SUBREG, rather than selecting between that
19058 and equivalent gen_rtx_SUBREG code.
19060 2018-02-08 Richard Biener <rguenther@suse.de>
19062 PR tree-optimization/84233
19063 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19064 changed flag instead of boguously re-using phi_inserted.
19066 2018-02-08 Martin Jambor <mjambor@suse.cz>
19068 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19069 static local variables.
19071 2018-02-08 Richard Biener <rguenther@suse.de>
19073 PR tree-optimization/84278
19074 * tree-vect-stmts.c (vectorizable_store): When looking for
19075 smaller vector types to perform grouped strided loads/stores
19076 make sure the mode is supported by the target.
19077 (vectorizable_load): Likewise.
19079 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19081 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19082 Increase LDP/STP opportunities by adding adjacent callee-saves.
19084 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19086 PR rtl-optimization/84068
19087 PR rtl-optimization/83459
19088 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19090 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19092 PR tree-optimization/84224
19093 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19094 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19095 non-zero arguments.
19097 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19100 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19101 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19102 count, remove one USE.
19104 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19106 * doc/install.texi (Configuration): Document the
19107 --with-long-double-format={ibm,ieee} PowerPC configuration
19111 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19112 Convert from define_expand to be define_insn_and_split. Rework
19113 float/double/_Float128 conversions to QI/HI/SImode to work with
19114 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19115 conversions to QI/HImode types did a store and then a load to
19116 truncate the value. For conversions to VSX registers, don't split
19117 the insn, instead emit the code directly. Use the code iterator
19118 any_fix to combine signed and unsigned conversions.
19119 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19120 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19121 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19122 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19123 (fix_<mode>di2_hw): Likewise.
19124 (fixuns_<mode>di2_hw): Likewise.
19125 (fix_<mode>si2_hw): Likewise.
19126 (fixuns_<mode>si2_hw): Likewise.
19127 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19128 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19129 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19130 fix<uns>_trunc<SFDF:mode>si2_p8.
19131 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19132 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19133 (fix<uns>_<mode>_mem): Likewise.
19134 (fctiw<u>z_<mode>_mem): Likewise.
19135 (fix<uns>_<mode>_mem): Likewise.
19136 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19137 the register allocator from doing a direct move to the GPRs to do
19138 a store, and instead use the ISA 3.0 store byte/half-word from
19139 vector register instruction. For IEEE 128-bit floating point,
19140 also optimize stores of 32-bit ints.
19141 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19143 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19145 * genextract.c (push_pathstr_operand): New function to support
19147 (walk_rtx): Call push_pathstr_operand.
19148 (print_path): Support [a-zA-Z].
19150 2018-02-07 Richard Biener <rguenther@suse.de>
19152 PR tree-optimization/84037
19153 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19154 (cse_and_gimplify_to_preheader): Declare.
19155 (vect_get_place_in_interleaving_chain): Likewise.
19156 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19158 (_loop_vec_info::~_loop_vec_info): Delete it.
19159 (cse_and_gimplify_to_preheader): New function.
19160 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19161 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19162 (vectorizable_load): Likewise. For grouped stores always base
19163 the IV on the first element.
19164 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19165 condition before gimplifying.
19167 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19169 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19170 *DIV_EXPR and *MOD_EXPR.
19172 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19175 * config/i386/i386.c (ix86_option_override_internal): Mask out
19176 the CF_SET bit when checking -fcf-protection.
19178 2018-02-07 Tom de Vries <tom@codesourcery.com>
19181 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19184 2018-02-07 Richard Biener <rguenther@suse.de>
19186 PR tree-optimization/84204
19187 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19190 PR tree-optimization/84205
19191 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19192 special-case isl_ast_op_zdiv_r.
19194 PR tree-optimization/84223
19195 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19196 Only add conditions from within the region.
19197 (gather_bbs::after_dom_children): Adjust.
19199 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19202 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19203 * config/avr/avr.md: Only post-reload split REG-REG moves if
19204 either register is GENERAL_REG_P.
19206 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19208 PR tree-optimization/84235
19209 * tree-ssa-scopedtables.c
19210 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19211 if the subtraction is performed in floating point type where NaNs are
19212 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19213 build 1. Formatting fix.
19215 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19218 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19219 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19220 and skip it regardless of bb boundaries. Use CALL_P macro,
19221 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19222 unnecessarily, formatting fix.
19224 2018-02-06 Michael Collison <michael.collison@arm.com>
19226 * config/arm/thumb2.md:
19227 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19228 (*thumb_mov_notscc): Ditto.
19230 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19233 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19234 unsigned_fix, not "s".
19236 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19238 * configure.ac (gcc_fn_eh_frame_ro): New function.
19239 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19240 correct .eh_frame permissions.
19241 * configure: Regenerate.
19243 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19245 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19246 irrelevant options.
19248 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19250 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19251 Display warning message for -mno-speculate-indirect-jumps.
19253 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19255 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19257 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19259 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19261 PR tree-optimization/84225
19262 * tree-eh.c (find_trapping_overflow): Only call
19263 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19265 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19268 * config/i386/i386.c: Reimplement the check of possible options
19269 -mibt/-mshstk conbination. Change error messages.
19270 * doc/invoke.texi: Fix a typo: remove extra '='.
19272 2018-02-06 Marek Polacek <polacek@redhat.com>
19274 PR tree-optimization/84228
19275 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19277 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19280 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19281 emitted arch directives.
19282 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19283 __ARM_FEATURE_COPROC before changing architectures.
19285 2018-02-06 Richard Biener <rguenther@suse.de>
19287 * config/i386/i386.c (print_reg): Fix typo.
19288 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19290 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19292 * configure: Regenerate.
19294 2018-02-05 Martin Sebor <msebor@redhat.com>
19296 PR tree-optimization/83369
19297 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19300 2018-02-05 Martin Liska <mliska@suse.cz>
19302 * doc/invoke.texi: Cherry-pick upstream r323995.
19304 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19306 * ira.c (ira_init_register_move_cost): Adjust comment.
19308 2018-02-05 Martin Liska <mliska@suse.cz>
19310 PR gcov-profile/84137
19311 * doc/gcov.texi: Fix typo in documentation.
19313 2018-02-05 Martin Liska <mliska@suse.cz>
19315 PR gcov-profile/83879
19316 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19317 using dlopen functionality.
19319 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19321 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19322 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19323 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19324 _mm_maskz_range_round_ss): New intrinsics.
19325 (__builtin_ia32_rangesd128_round)
19326 (__builtin_ia32_rangess128_round): Remove.
19327 (__builtin_ia32_rangesd128_mask_round,
19328 __builtin_ia32_rangess128_mask_round): New builtins.
19329 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19330 __builtin_ia32_rangess128_round): Remove.
19331 (__builtin_ia32_rangesd128_mask_round,
19332 __builtin_ia32_rangess128_mask_round): New builtins.
19333 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19334 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19335 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19336 "<round_saeonly_constraint>")): Changed to ...
19337 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19338 "<round_saeonly_scalar_constraint>")): ... this.
19339 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19340 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19341 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19342 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19343 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19345 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19347 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19349 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19350 Remove all values except native, 8540 and 8548.
19352 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19354 * config/i386/i386.c (ix86_output_function_return): Pass
19355 INVALID_REGNUM, instead of -1, as invalid register number to
19356 indirect_thunk_name and output_indirect_thunk.
19358 2018-02-02 Julia Koval <julia.koval@intel.com>
19360 * config.gcc: Add -march=icelake.
19361 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19362 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19363 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19364 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19365 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19366 (processor_target_table): Add icelake.
19367 (ix86_option_override_internal): Handle new PTAs.
19368 (get_builtin_code_for_version): Handle icelake.
19369 (M_INTEL_COREI7_ICELAKE): New.
19370 (fold_builtin_cpu): Handle icelake.
19371 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19372 * doc/invoke.texi: Add -march=icelake.
19374 2018-02-02 Julia Koval <julia.koval@intel.com>
19376 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19377 to wide_int_bitmask.
19378 * wide-int-bitmask.h: New.
19380 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19383 * config/i386/i386.md: Replace Pmode with word_mode in
19384 builtin_setjmp_setup and builtin_longjmp to support x32.
19386 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19390 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19392 (rs6000_supported_cpu_names): New static variable.
19393 (linux_cpu_translation_table): Likewise.
19394 (elf_platform) <cpu>: Define new static variable and use it.
19395 Translate kernel AT_PLATFORM name to canonical name if needed.
19396 Error if platform name is unknown.
19398 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19401 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19403 2018-02-01 Jeff Law <law@redhat.com>
19406 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19407 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19408 the scratch if RELEASE_VIA_POP is false.
19409 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19410 If we have to save a temporary register, decrement SIZE appropriately.
19411 Pass new arguments to release_scratch_register_on_entry.
19412 (ix86_adjust_stack_and_probe): Likewise.
19413 (ix86_emit_probe_stack_range): Pass new arguments to
19414 release_scratch_register_on_entry.
19416 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19418 PR rtl-optimization/84157
19419 * combine.c (change_zero_ext): Use REG_P predicate in
19420 front of HARD_REGISTER_P predicate.
19422 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19424 * config/avr/avr.c (avr_option_override): Move disabling of
19425 -fdelete-null-pointer-checks to...
19426 * common/config/avr/avr-common.c (avr_option_optimization_table):
19429 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19431 PR tree-optimization/81635
19432 * tree-data-ref.c (split_constant_offset_1): For types that
19433 wrap on overflow, try to use range info to prove that wrapping
19436 2018-02-01 Renlin Li <renlin.li@arm.com>
19439 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19440 TAILCALL_ADDR_REGS.
19441 (aarch64_register_move_cost): Likewise.
19442 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19443 TAILCALL_ADDR_REGS.
19444 (REG_CLASS_NAMES): Likewise.
19445 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19446 TAILCALL_ADDR_REGS. Remove IP registers.
19447 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19449 2018-02-01 Richard Biener <rguenther@suse.de>
19451 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19452 for specifying RPO order and allow NULL for that.
19453 * domwalk.c (dom_walker::dom_walker): Likewise.
19454 (dom_walker::walk): Handle NULL RPO order.
19455 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19457 (rewrite_update_dom_walker): Likewise.
19458 (mark_def_dom_walker): Likewise.
19460 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19462 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19463 (aarch64_maybe_expand_sve_subreg_move): Declare.
19464 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19465 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19467 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19468 that are semantically a reverse operation.
19469 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19470 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19471 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19473 (aarch64_can_change_mode_class): For big-endian, forbid changes
19474 between two SVE modes if they have different element sizes.
19476 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19478 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19479 the TImode handling for big-endian targets.
19481 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19483 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19484 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19486 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19487 Remove BSWAP handing for big-endian targets and use the form of
19488 LD1RQ appropariate for the mode.
19490 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19492 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19493 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19494 duplicated element.
19496 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19499 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19500 check for operands that need to go through aarch64_sve_reload_be.
19502 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19504 PR tree-optimization/81661
19505 PR tree-optimization/84117
19506 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19507 * tree-eh.c: Include gimplify.h.
19508 (find_trapping_overflow, replace_trapping_overflow,
19509 rewrite_to_non_trapping_overflow): New functions.
19510 * tree-vect-loop.c: Include tree-eh.h.
19511 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19512 * tree-data-ref.c: Include tree-eh.h.
19513 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19515 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19517 PR rtl-optimization/84123
19518 * combine.c (change_zero_ext): Check if hard register satisfies
19519 can_change_dest_mode before calling gen_lowpart_SUBREG.
19521 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19524 * ira.c (ira_init_register_move_cost): Remove assert.
19526 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19528 PR rtl-optimization/84071
19529 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19530 * doc/tm.texi: Regenerate.
19532 2018-01-31 Richard Biener <rguenther@suse.de>
19534 PR tree-optimization/84132
19535 * tree-data-ref.c (analyze_miv_subscript): Properly
19536 check whether evolution_function_is_affine_multivariate_p
19537 before calling gcd_of_steps_may_divide_p.
19539 2018-01-31 Julia Koval <julia.koval@intel.com>
19542 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19543 * config/i386/i386.md (rdpid_rex64) New.
19544 (rdpid): Make 32bit only.
19546 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19549 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19550 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19552 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19555 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19557 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19559 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19561 PR rtl-optimization/84071
19562 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19563 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19565 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19567 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19568 (arc_attribute_table): Add 'aux' attribute.
19569 (arc_in_small_data_p): Consider aux like variables.
19570 (arc_is_aux_reg_p): New function.
19571 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19572 (arc_get_aux_arg): New function.
19573 (prepare_move_operands): Handle aux-register access.
19574 (arc_handle_aux_attribute): New function.
19575 * doc/extend.texi (ARC Variable attributes): Add subsection.
19577 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19579 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19580 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19581 (arc_attribute_table): Add 'uncached' attribute.
19582 (arc_print_operand): Print '.di' flag for uncached memory
19584 (arc_in_small_data_p): Do not consider for small data the uncached
19586 (arc_is_uncached_mem_p): New function.
19587 * config/arc/predicates.md (compact_store_memory_operand): Check
19588 for uncached memory accesses.
19589 (nonvol_nonimm_operand): Likewise.
19590 * doc/extend.texi (ARC Type Attribute): New subsection.
19592 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19595 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19596 falign-loops=): Add Optimization flag.
19598 2018-01-30 Jeff Law <law@redhat.com>
19601 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19602 INT_REGISTERS_SAVED. Check it prior to calling
19603 get_scratch_register_on_entry.
19604 (ix86_adjust_stack_and_probe): Similarly.
19605 (ix86_emit_probe_stack_range): Similarly.
19606 (ix86_expand_prologue): Corresponding changes.
19608 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19611 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19612 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19614 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19617 * lra-constraints.c (curr_insn_transform): Process AND in the
19620 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19622 PR rtl-optimization/83986
19623 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19624 dependence against last_pending_memory_flush in addition to
19625 pending_jump_insns.
19627 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19629 PR tree-optimization/81611
19630 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19633 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19636 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19639 2018-01-30 Richard Biener <rguenther@suse.de>
19640 Jakub Jelinek <jakub@redhat.com>
19642 PR tree-optimization/84111
19643 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19644 inner loops added during recursion, as they don't have up-to-date
19647 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19650 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19651 (can_inline_edge_by_limits_p): ... here.
19652 (can_early_inline_edge_p, check_callers,
19653 update_caller_keys, update_callee_keys, recursive_inlining,
19654 add_new_edges_to_heap, speculation_useful_p,
19655 inline_small_functions,
19656 inline_small_functions, flatten_function,
19657 inline_to_all_callers_1): Update.
19659 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19661 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19664 2018-01-30 Richard Biener <rguenther@suse.de>
19666 PR tree-optimization/83008
19667 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19668 invariant and constant vector uses in stmts when they need
19669 more than one stmt.
19671 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19674 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19675 * configure: Regenerate.
19677 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19679 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19681 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19682 Use gen_rtx_REG rather than gen_lowpart.
19684 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19686 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19687 rather than 0 when creating partial subregs.
19689 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19691 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19694 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19697 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19698 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19699 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19700 flags. This restores the settings used before the 2017-07-24.
19701 Turning off pre increment/decrement/modify allows IVOPTS to
19702 optimize DF/SF loops where the index is an int.
19704 2018-01-29 Richard Biener <rguenther@suse.de>
19705 Kelvin Nilsen <kelvin@gcc.gnu.org>
19708 * tree-vect-stmts.c (vectorizable_call): Don't call
19709 targetm.vectorize_builtin_md_vectorized_function if callee is
19712 2018-01-22 Carl Love <cel@us.ibm.com>
19714 * doc/extend.tex: Fix typo in second arg in
19715 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19717 2018-01-29 Richard Biener <rguenther@suse.de>
19719 PR tree-optimization/84086
19720 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19721 (flush_ssaname_freelist): When SSA names were released reset
19722 the SCEV hash table.
19724 2018-01-29 Richard Biener <rguenther@suse.de>
19726 PR tree-optimization/84057
19727 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19728 removed paths when removing edges.
19730 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19732 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19733 -mfunction-return=@var{choice}.
19735 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19737 PR diagnostic/84034
19738 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19739 Handle CR like TAB.
19740 (layout::print_source_line): Likewise.
19741 (test_get_line_width_without_trailing_whitespace): Add test cases.
19743 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19745 PR middle-end/84040
19746 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19749 2018-01-26 Jim Wilson <jimw@sifive.com>
19751 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19753 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19756 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19758 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19759 and CMP + SUB-immediate -> SUBS.
19761 2018-01-26 Martin Sebor <msebor@redhat.com>
19763 PR tree-optimization/83896
19764 * tree-ssa-strlen.c (get_string_len): Rename...
19765 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19766 Avoid assuming length is constant.
19767 (handle_char_store): Use HOST_WIDE_INT for string length.
19769 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19772 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19773 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19775 2018-01-26 Richard Biener <rguenther@suse.de>
19777 PR rtl-optimization/84003
19778 * dse.c (record_store): Only record redundant stores when
19779 the earlier store aliases at least all accesses the later one does.
19781 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19783 PR rtl-optimization/83985
19784 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19785 REG_CFA_RESTORE insns.
19786 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19787 REG_CFA_RESTORE insns here.
19790 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19791 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19793 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19795 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19796 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19797 (arc_init): Likewise.
19798 (arc_override_options): Likewise.
19799 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19801 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19803 * config/arc/arc.h (TARGET_DBNZ): Define.
19804 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19805 properly set the tune attribute.
19806 (dbnz): Use TARGET_DBNZ guard.
19807 * config/arc/arc.opt (mtune): Add core3 option.
19809 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19811 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19812 recognize new pic like addresses.
19813 (arc_delegitimize_address): Clean up.
19815 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19817 * config/arc/arc-arches.def: Option mrf16 valid for all
19819 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19820 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19821 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19822 * config/arc/arc-tables.opt: Regenerate.
19823 * config/arc/arc.c (arc_conditional_register_usage): Handle
19824 reduced register file case.
19825 (arc_file_start): Set must have build attributes.
19826 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19827 mrf16 option value.
19828 * config/arc/arc.opt (mrf16): Add new option.
19829 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19830 * config/arc/genmultilib.awk: Handle new mrf16 option.
19831 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19832 * config/arc/t-multilib: Regenerate.
19833 * doc/invoke.texi (ARC Options): Document mrf16 option.
19835 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19837 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19838 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19839 (arc_attribute_table): Add 'secure_call' attribute.
19840 (arc_print_operand): Print secure call operand.
19841 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19843 (arc_is_secure_call_p): New function. * config/arc/arc.md
19844 (call_i): Add support for sjli instruction.
19845 (call_value_i): Likewise.
19846 * config/arc/constraints.md (Csc): New constraint.
19848 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19849 John Eric Martin <John.Martin@emmicro-us.com>
19851 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19852 * config/arc/arc.c (_arc_jli_section): New struct.
19853 (arc_jli_section): New type.
19854 (rc_jli_sections): New static variable.
19855 (arc_handle_jli_attribute): New function.
19856 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19857 (arc_file_end): New function.
19858 (TARGET_ASM_FILE_END): Define.
19859 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19860 (arc_add_jli_section): New function.
19861 (jli_call_scan): Likewise.
19862 (arc_reorg): Call jli_call_scan.
19863 (arc_output_addsi): Remove 'S' from printing asm operand.
19864 (arc_is_jli_call_p): New function.
19865 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19867 (movhi_insn): Likewise.
19868 (movsi_insn): Likewise.
19869 (movsi_set_cc_insn): Likewise.
19870 (loadqi_update): Likewise.
19871 (load_zeroextendqisi_update): Likewise.
19872 (load_signextendqisi_update): Likewise.
19873 (loadhi_update): Likewise.
19874 (load_zeroextendhisi_update): Likewise.
19875 (load_signextendhisi_update): Likewise.
19876 (loadsi_update): Likewise.
19877 (loadsf_update): Likewise.
19878 (movsicc_insn): Likewise.
19879 (bset_insn): Likewise.
19880 (bxor_insn): Likewise.
19881 (bclr_insn): Likewise.
19882 (bmsk_insn): Likewise.
19883 (bicsi3_insn): Likewise.
19884 (cmpsi_cc_c_insn): Likewise.
19885 (movsi_ne): Likewise.
19886 (movsi_cond_exec): Likewise.
19887 (clrsbsi2): Likewise.
19888 (norm_f): Likewise.
19898 (call_i): Remove 'S' asm letter, add jli instruction.
19899 (call_value_i): Likewise.
19900 * config/arc/arc.op (mjli-always): New option.
19901 * config/arc/constraints.md (Cji): New constraint.
19902 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19904 (subsf3_fpx): Likewise.
19905 (mulsf3_fpx): Likewise.
19906 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19908 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19909 function attrbutes.
19910 * doc/invoke.texi (ARC): Document mjli-always option.
19912 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19914 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19915 avoid addition with 0 and use incw and decw where possible.
19917 2018-01-26 Richard Biener <rguenther@suse.de>
19919 PR tree-optimization/81082
19920 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19921 association if it requires casting to unsigned.
19922 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19923 from fold_plusminus_mult_expr to catch important cases late when
19924 range info is available.
19926 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19928 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19929 * configure.ac (hidden_linkonce): New test.
19930 * configure: Regenerate.
19931 * config.in: Regenerate.
19933 2018-01-26 Julia Koval <julia.koval@intel.com>
19935 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19936 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19937 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19938 _mm_mask_bitshuffle_epi64_mask): Fix type.
19939 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19940 USI_FTYPE_V4DI_V4DI_USI): Remove.
19941 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19942 __builtin_ia32_vpshufbitqmb256_mask,
19943 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19944 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19945 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19947 2018-01-26 Alan Modra <amodra@gmail.com>
19950 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19951 UNSPEC_VBPERMQ. Sort other unspecs.
19953 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19955 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19957 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19959 PR middle-end/83055
19960 * predict.c (drop_profile): Do not push/pop cfun; update also
19962 (handle_missing_profiles): Fix logic looking for zero profiles.
19964 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19966 PR middle-end/83977
19967 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19968 on functions with #pragma omp declare simd or functions with simd
19970 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19971 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19972 Remove trailing \n from warning_at calls.
19974 2018-01-25 Tom de Vries <tom@codesourcery.com>
19977 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19978 for neutered workers.
19980 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19983 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19984 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19986 2018-01-24 Jeff Law <law@redhat.com>
19989 * i386.c (get_probe_interval): Move to earlier point.
19990 (ix86_compute_frame_layout): If -fstack-clash-protection and
19991 the frame is larger than the probe interval, then use pushes
19992 to save registers rather than reg->mem moves.
19993 (ix86_expand_prologue): Remove conditional for int_registers_saved
19996 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19999 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20000 min/max for never referenced object.
20002 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20004 PR middle-end/83977
20005 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20007 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20008 attributes from DECL_ATTRIBUTES (decl) without affecting
20009 DECL_ATTRIBUTES (current_function_decl).
20010 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20011 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20013 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20015 PR tree-optimization/83979
20016 * fold-const.c (fold_comparison): Use constant_boolean_node
20017 instead of boolean_{true,false}_node.
20019 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20021 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20024 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20026 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20027 Simplify the clause that sets the length attribute.
20028 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20029 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20030 clause that sets the length attribute.
20031 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20033 2018-01-24 Tom de Vries <tom@codesourcery.com>
20036 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20037 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20038 Add strict parameter.
20039 (prevent_branch_around_nothing): Insert dummy insn between branch to
20040 label and label with no ptx insn inbetween.
20041 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20043 2018-01-24 Tom de Vries <tom@codesourcery.com>
20046 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20047 for neutered threads in warp.
20048 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20050 2018-01-24 Richard Biener <rguenther@suse.de>
20052 PR tree-optimization/83176
20053 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20056 2018-01-24 Richard Biener <rguenther@suse.de>
20058 PR tree-optimization/82819
20059 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20060 code generating pluses that are no-ops in the target precision.
20062 2018-01-24 Richard Biener <rguenther@suse.de>
20064 PR middle-end/84000
20065 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20067 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20069 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20070 to merge probabilities.
20071 * predict.c (probably_never_executed): Also mark as cold functions
20072 with global 0 profile and guessed local profile.
20073 * profile-count.c (profile_probability::combine_with_count): New
20075 * profile-count.h (profile_probability::operator*,
20076 profile_probability::operator*=, profile_probability::operator/,
20077 profile_probability::operator/=): Reduce precision to adjusted
20078 and set value to guessed on contradictory divisions.
20079 (profile_probability::combine_with_freq): Remove.
20080 (profile_probability::combine_wiht_count): Declare.
20081 (profile_count::force_nonzero):: Set to adjusted.
20082 (profile_count::probability_in):: Set quality to adjusted.
20083 * tree-ssa-tail-merge.c (replace_block_by): Use
20084 combine_with_count.
20086 2018-01-23 Andrew Waterman <andrew@sifive.com>
20087 Jim Wilson <jimw@sifive.com>
20089 * config/riscv/riscv.c (riscv_stack_boundary): New.
20090 (riscv_option_override): Set riscv_stack_boundary. Handle
20091 riscv_preferred_stack_boundary_arg.
20092 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20093 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20094 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20095 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20096 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20097 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20099 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20102 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20103 of struct ix86_frame.
20104 (ix86_expand_epilogue): Likewise. Add a local variable for
20105 the reg_save_offset field in struct ix86_frame.
20107 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20109 PR tree-optimization/82604
20110 * tree-loop-distribution.c (enum partition_kind): New enum item
20111 PKIND_PARTIAL_MEMSET.
20112 (partition_builtin_p): Support above new enum item.
20113 (generate_code_for_partition): Ditto.
20114 (compute_access_range): Differentiate cases that equality can be
20115 proven at all loops, the innermost loops or no loops.
20116 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20117 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20118 (finalize_partitions, distribute_loop): Don't fuse partition of
20119 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20120 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20121 parloop is enabled.
20123 2018-01-23 Martin Liska <mliska@suse.cz>
20125 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20126 order to ignore the predictor.
20127 (PRED_POLYMORPHIC_CALL): Likewise.
20128 (PRED_RECURSIVE_CALL): Likewise.
20130 2018-01-23 Martin Liska <mliska@suse.cz>
20132 * tree-profile.c (tree_profiling): Print function header to
20133 aware reader which function we are working on.
20134 * value-prof.c (gimple_find_values_to_profile): Do not print
20135 not interesting value histograms.
20137 2018-01-23 Martin Liska <mliska@suse.cz>
20139 * profile-count.h (enum profile_quality): Add
20140 profile_uninitialized as the first value. Do not number values
20141 as they are zero based.
20142 (profile_count::verify): Update sanity check.
20143 (profile_probability::verify): Likewise.
20145 2018-01-23 Nathan Sidwell <nathan@acm.org>
20147 * doc/invoke.texi (ffor-scope): Deprecate.
20149 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20151 PR tree-optimization/83510
20152 * domwalk.c (set_all_edges_as_executable): New function.
20153 (dom_walker::dom_walker): Convert bool param
20154 "skip_unreachable_blocks" to enum reachability. Move setup of
20155 edge flags to set_all_edges_as_executable and only do it when
20156 reachability is REACHABLE_BLOCKS.
20157 * domwalk.h (enum dom_walker::reachability): New enum.
20158 (dom_walker::dom_walker): Convert bool param
20159 "skip_unreachable_blocks" to enum reachability.
20160 (set_all_edges_as_executable): New decl.
20161 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20162 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20164 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20165 but converting true to REACHABLE_BLOCKS.
20166 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20168 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20169 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20170 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20172 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20173 if check_all_array_refs will be called.
20175 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20177 * tree.c (selftest::test_location_wrappers): Add more test
20180 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20182 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20183 (selftest::test_bit_in_range): Likewise.
20185 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20188 * doc/sourcebuild.texi (vect_float): Say that the selector
20189 only describes the situation when -funsafe-math-optimizations is on.
20190 (vect_float_strict): Document.
20192 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20194 PR tree-optimization/83965
20195 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20196 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20197 instead of checking only for a reduction.
20198 (vect_recog_widen_sum_pattern): Likewise.
20200 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20202 * predict.c (probably_never_executed): Only use precise profile info.
20203 (compute_function_frequency): Skip after inlining hack since we now
20204 have quality checking.
20206 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20208 * profile-count.h (profile_probability::very_unlikely,
20209 profile_probability::unlikely, profile_probability::even): Set
20210 precision to guessed.
20212 2018-01-23 Richard Biener <rguenther@suse.de>
20214 PR tree-optimization/83963
20215 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20216 Properly terminate dominator walk when crossing the exit edge not
20217 when visiting its source block.
20219 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20222 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20223 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20225 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20227 PR tree-optimization/83957
20228 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20229 semicolon after for body surrounded by braces.
20231 PR tree-optimization/83081
20232 * profile-count.h (profile_probability::split): New method.
20233 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20234 Use profile_probability::split.
20235 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20236 when splitting a single conditional jump into 2.
20238 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20240 PR tree-optimization/69452
20241 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20244 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20246 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20247 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20248 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20252 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20254 * config/rl78/rl78.md (movdi): New define_expand.
20255 * config/rl78/rl78.c (rl78_split_movdi): New function.
20257 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20260 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20262 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20263 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20264 128-bit to produce an UNSPEC move to get the double word with the
20265 signbit and then a shift directly to do signbit.
20266 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20267 implementation with a new version that just does either a direct
20268 move or a regular move. Move memory interface to separate insns.
20269 Move insns so they are next to the expander.
20270 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20271 with signbit move. Split big and little endian case.
20272 (signbit<mode>2_dm_mem_le): Likewise.
20273 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20274 (signbit<mode>2_dm2): Likewise.
20276 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20278 * config/rl78/rl78.md (anddi3): New define_expand.
20280 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20282 * config/rl78/rl78.md (umindi3): New define_expand.
20284 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20286 * config/rl78/rl78.md (smindi3): New define_expand.
20288 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20290 * config/rl78/rl78.md (smaxdi3): New define_expand.
20292 2018-01-22 Carl Love <cel@us.ibm.com>
20294 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20295 LVX_V1TI): Add macro expansion.
20296 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20297 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20298 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20299 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20300 Change check to determine if the instruction is a byte reversing
20301 entry. Fix typo in comment.
20302 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20303 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20304 Add def_builtin calls for new builtins.
20305 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20306 Add define_insn expansion.
20308 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20310 * config/rl78/rl78.md (umaxdi3): New define_expand.
20312 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20314 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20315 for non-QImode registers.
20317 2018-01-22 Richard Biener <rguenther@suse.de>
20319 PR tree-optimization/83963
20320 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20321 including the loop exit block.
20322 (scop_detection::merge_sese): Likewise.
20323 (scop_detection::add_scop): Do it here instead.
20325 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20327 * doc/sourcebuild.texi (arm_softfloat): Document.
20329 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20332 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20333 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20334 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20336 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20337 David Edelsohn <dje.gcc@gmail.com>
20340 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20341 Change "crset eq" to "crset 2".
20342 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20343 (*call_indirect_aix<mode>_nospec): Likewise.
20344 (*call_value_indirect_aix<mode>_nospec): Likewise.
20345 (*call_indirect_elfv2<mode>_nospec): Likewise.
20346 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20347 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20348 change assembly output from . to $.
20349 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20350 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20351 (*tablejump<mode>_internal1_nospec): Likewise.
20353 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20356 * config/sh/sh_optimize_sett_clrt.cc:
20357 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20359 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20361 PR tree-optimization/83940
20362 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20363 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20364 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20365 use it to pass back the definition type.
20366 (vect_check_store_rhs): Likewise rhs_dt_out.
20367 (vect_build_gather_load_calls): Add a mask_dt argument and use
20368 it instead of a call to vect_is_simple_use.
20369 (vectorizable_store): Update calls to vect_check_load_store_mask
20370 and vect_check_store_rhs. Use the dt returned by the latter instead
20371 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20372 instead of calls to vect_is_simple_use. Pass the scalar rather
20373 than the vector operand to vect_is_simple_use when handling
20374 second and subsequent copies of an rhs value.
20375 (vectorizable_load): Update calls to vect_check_load_store_mask
20376 and vect_build_gather_load_calls. Use the cached mask_dt and
20377 gs_info.offset_dt instead of calls to vect_is_simple_use.
20379 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20381 PR middle-end/83945
20382 * tree-emutls.c: Include gimplify.h.
20383 (lower_emutls_2): New function.
20384 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20385 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20386 it before further processing.
20389 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20390 UINTVAL (trueop1) instead of INTVAL (op1).
20392 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20396 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20397 INCOMING_FRAME_SP_OFFSET if not defined.
20398 (scan_trace): Add ENTRY argument. If true and
20399 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20400 emit a note to adjust the CFA offset.
20401 (create_cfi_notes): Adjust scan_trace callers.
20402 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20403 INCOMING_FRAME_SP_OFFSET in the CIE.
20404 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20405 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20407 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20408 * doc/tm.texi: Regenerated.
20410 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20412 PR rtl-optimization/83147
20413 * lra-constraints.c (remove_inheritance_pseudos): Use
20414 lra_substitute_pseudo_within_insn.
20416 2018-01-19 Tom de Vries <tom@codesourcery.com>
20417 Cesar Philippidis <cesar@codesourcery.com>
20420 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20422 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20425 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20426 spaces for function labels.
20428 2018-01-19 Martin Liska <mliska@suse.cz>
20430 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20431 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20432 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20433 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20434 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20435 (PRED_CONST_RETURN): Change from 69 to 65.
20436 (PRED_NULL_RETURN): Change from 91 to 71.
20437 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20438 (PRED_LOOP_GUARD): Change from 66 to 73.
20440 2018-01-19 Martin Liska <mliska@suse.cz>
20442 * predict.c (predict_insn_def): Add new assert.
20443 (struct branch_predictor): Change type to signed integer.
20444 (test_prediction_value_range): Amend test to cover
20445 PROB_UNINITIALIZED.
20446 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20447 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20448 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20449 (PRED_LOOP_IV_COMPARE): Likewise.
20450 * predict.h (PROB_UNINITIALIZED): Define new constant.
20452 2018-01-19 Martin Liska <mliska@suse.cz>
20454 * predict.c (dump_prediction): Add new format for
20455 analyze_brprob.py script which is enabled with -details
20457 * profile-count.h (precise_p): New function.
20459 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20461 PR tree-optimization/83922
20462 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20463 there are no statements that need masking.
20464 (vect_active_double_reduction_p): New function.
20465 (vect_analyze_loop_operations): Use it when handling phis that
20466 are not in the loop header.
20468 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20470 PR tree-optimization/83914
20471 * tree-vect-loop.c (vectorizable_induction): Don't convert
20472 init_expr or apply the peeling adjustment for inductions
20473 that are nested within the vectorized loop.
20475 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20477 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20480 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20484 * function.h (gimplify_parameters): Add gimple_seq * argument.
20485 * function.c: Include gimple.h and options.h.
20486 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20487 for the added local temporaries if needed.
20488 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20489 if there are any parameter cleanups, wrap whole body into a
20490 try/finally with the cleanups.
20492 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20495 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20496 Use GET_MODE_CLASS for scalar floating point.
20498 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20502 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20503 Fix call of call_cgraph_insertion_hooks.
20505 2018-01-18 Martin Sebor <msebor@redhat.com>
20507 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20509 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20512 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20515 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20518 * common.opt: (-ffile-prefix-map): New option.
20519 * opts.c (common_handle_option): Defer it.
20520 * opts-global.c (handle_common_deferred_options): Handle it.
20521 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20522 * file-prefix-map.h: New file.
20523 (remap_debug_filename, add_debug_prefix_map): ...here.
20524 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20525 * final.c (debug_prefix_map, add_debug_prefix_map
20526 remap_debug_filename): Move to...
20527 * file-prefix-map.c: New file.
20528 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20529 generalize, get rid of alloca(), use strrchr() instead of strchr().
20530 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20531 Implement in terms of add_prefix_map().
20532 (remap_macro_filename, remap_debug_filename): Implement in term of
20534 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20535 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20536 * dbxout.c: Include file-prefix-map.h.
20537 * varasm.c: Likewise.
20538 * vmsdbgout.c: Likewise.
20539 * xcoffout.c: Likewise.
20540 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20541 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20542 * doc/invoke.texi (-ffile-prefix-map): Document.
20543 (-fdebug-prefix-map): Update description.
20545 2018-01-18 Martin Liska <mliska@suse.cz>
20547 * config/i386/i386.c (indirect_thunk_name): Document that also
20549 (output_indirect_thunk): Document why both instructions
20550 (pause and lfence) are generated.
20552 2018-01-18 Richard Biener <rguenther@suse.de>
20554 PR tree-optimization/83887
20555 * graphite-scop-detection.c
20556 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20557 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20558 (scop_detection::merge_sese): Re-implement with a flood-fill
20559 algorithm that properly finds a SESE region if it exists.
20561 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20564 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20565 pointer_diff optimizations use view_convert instead of convert.
20567 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20569 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20570 Generate different code for -mno-speculate-indirect-jumps.
20571 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20572 (*call_indirect_aix<mode>): Disable for
20573 -mno-speculate-indirect-jumps.
20574 (*call_indirect_aix<mode>_nospec): New define_insn.
20575 (*call_value_indirect_aix<mode>): Disable for
20576 -mno-speculate-indirect-jumps.
20577 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20578 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20579 -mno-speculate-indirect-jumps.
20580 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20582 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20584 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20585 long double type, set the flags for noting the default long double
20586 type, even if we don't pass or return a long double type.
20588 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20591 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20594 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20596 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20597 support for merge[hl].
20598 (fold_mergehl_helper): New helper function.
20599 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20600 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20601 (altivec_vmrglw_direct): Add xxmrglw insn.
20603 2018-01-17 Andrew Waterman <andrew@sifive.com>
20605 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20606 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20608 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20611 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20612 call the lto_location_cache before reading the
20613 DECL_SOURCE_LOCATION of the types.
20615 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20616 Richard Sandiford <richard.sandiford@linaro.org>
20618 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20619 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20620 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20621 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20622 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20624 * config/aarch64/constraints.md (aarch64_movti_operand):
20626 * config/aarch64/predicates.md (Uti): Add new constraint.
20628 2018-01-17 Carl Love <cel@us.ibm.com>
20630 * config/rs6000/vsx.md (define_expand xl_len_r,
20631 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20632 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20634 (define_expand, define_insn): Move the shift left from the
20635 define_insn to the define_expand for lxvl and stxvl instructions.
20636 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20637 and XL_LEN_R definitions to PURE.
20639 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20641 * config/i386/i386.c (indirect_thunk_name): Declare regno
20642 as unsigned int. Compare regno with INVALID_REGNUM.
20643 (output_indirect_thunk): Ditto.
20644 (output_indirect_thunk_function): Ditto.
20645 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20646 in the call to output_indirect_thunk_function.
20648 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20650 PR middle-end/83884
20651 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20652 rather than the size of inner_type to determine the stack slot size
20653 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20655 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20658 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20661 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20663 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20664 endian Linux systems to optionally enable multilibs for selecting
20665 the long double type if the user configured an explicit type.
20666 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20667 have no long double multilibs if not defined.
20668 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20669 warn if the user used -mabi={ieee,ibm}longdouble and we built
20670 multilibs for long double.
20671 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20672 appropriate multilib option.
20673 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20675 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20676 for building long double multilibs.
20677 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20679 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20681 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20684 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20686 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20689 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20692 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20695 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20697 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20698 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20700 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20702 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20703 different rtl trees depending on TARGET_64BIT.
20704 (rs6000_gen_lvx): Likewise.
20706 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20708 * config/visium/visium.md (nop): Tweak comment.
20709 (hazard_nop): Likewise.
20711 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20713 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20714 -mspeculate-indirect-jumps.
20715 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20716 for -mno-speculate-indirect-jumps.
20717 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20718 (*call_value_indirect_elfv2<mode>): Disable for
20719 -mno-speculate-indirect-jumps.
20720 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20721 (indirect_jump): Emit different RTL for
20722 -mno-speculate-indirect-jumps.
20723 (*indirect_jump<mode>): Disable for
20724 -mno-speculate-indirect-jumps.
20725 (*indirect_jump<mode>_nospec): New define_insn.
20726 (tablejump): Emit different RTL for
20727 -mno-speculate-indirect-jumps.
20728 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20729 (tablejumpsi_nospec): New define_expand.
20730 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20731 (tablejumpdi_nospec): New define_expand.
20732 (*tablejump<mode>_internal1): Disable for
20733 -mno-speculate-indirect-jumps.
20734 (*tablejump<mode>_internal1_nospec): New define_insn.
20735 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20738 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20740 * caller-save.c (insert_save): Drop unnecessary parameter. All
20743 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20744 Richard Biener <rguenth@suse.de>
20747 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20748 return early, inline manually is_gimple_sizepos. Make sure if we
20749 call gimplify_expr we don't end up with a gimple constant.
20750 * tree.c (variably_modified_type_p): Don't return true for
20751 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20752 * gimplify.h (is_gimple_sizepos): Remove.
20754 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20756 PR tree-optimization/83857
20757 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20758 vectorizable_live_operation for pure SLP statements.
20759 (vectorizable_live_operation): Handle PHIs.
20761 2018-01-16 Richard Biener <rguenther@suse.de>
20763 PR tree-optimization/83867
20764 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20765 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20767 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20770 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20771 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20772 If off is not INTEGER_CST, issue a may not be aligned warning
20773 rather than isn't aligned. Use isn%'t rather than isn't.
20774 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20776 <case MULT_EXPR>: Improve the case when bottom and one of the
20777 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20778 operand, in that case check if the other operand is multiple of
20779 bottom divided by the INTEGER_CST operand.
20781 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20784 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20785 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20786 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20787 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20788 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20789 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20790 (pa_function_arg_size): New function.
20792 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20794 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20795 in a separate statement.
20797 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20799 PR tree-optimization/83847
20800 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20801 group gathers and scatters.
20803 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20805 PR rtl-optimization/86620
20806 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20808 PR rtl-optimization/83213
20809 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20810 to last if both are JUMP_INSNs.
20812 PR tree-optimization/83843
20813 * gimple-ssa-store-merging.c
20814 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20815 store_immediate_info for bswap/nop orig_stores.
20817 2018-01-15 Andrew Waterman <andrew@sifive.com>
20819 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20821 <UDIV>: Increase cost if !TARGET_DIV.
20823 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20825 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20826 (define_attr "cr_logical_3op"): New.
20827 (cceq_ior_compare): Adjust.
20828 (cceq_ior_compare_complement): Adjust.
20829 (*cceq_rev_compare): Adjust.
20830 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20831 (is_cracked_insn): Adjust.
20832 (insn_must_be_first_in_group): Adjust.
20833 * config/rs6000/40x.md: Adjust.
20834 * config/rs6000/440.md: Adjust.
20835 * config/rs6000/476.md: Adjust.
20836 * config/rs6000/601.md: Adjust.
20837 * config/rs6000/603.md: Adjust.
20838 * config/rs6000/6xx.md: Adjust.
20839 * config/rs6000/7450.md: Adjust.
20840 * config/rs6000/7xx.md: Adjust.
20841 * config/rs6000/8540.md: Adjust.
20842 * config/rs6000/cell.md: Adjust.
20843 * config/rs6000/e300c2c3.md: Adjust.
20844 * config/rs6000/e500mc.md: Adjust.
20845 * config/rs6000/e500mc64.md: Adjust.
20846 * config/rs6000/e5500.md: Adjust.
20847 * config/rs6000/e6500.md: Adjust.
20848 * config/rs6000/mpc.md: Adjust.
20849 * config/rs6000/power4.md: Adjust.
20850 * config/rs6000/power5.md: Adjust.
20851 * config/rs6000/power6.md: Adjust.
20852 * config/rs6000/power7.md: Adjust.
20853 * config/rs6000/power8.md: Adjust.
20854 * config/rs6000/power9.md: Adjust.
20855 * config/rs6000/rs64.md: Adjust.
20856 * config/rs6000/titan.md: Adjust.
20858 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20860 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20861 ix86_indirect_branch_register logic.
20863 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20865 * config/i386/constraints.md (Bs): Update
20866 ix86_indirect_branch_register check. Don't check
20867 ix86_indirect_branch_register with GOT_memory_operand.
20869 * config/i386/predicates.md (GOT_memory_operand): Don't check
20870 ix86_indirect_branch_register here.
20871 (GOT32_symbol_operand): Likewise.
20873 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20875 * config/i386/predicates.md (constant_call_address_operand):
20876 Rewrite ix86_indirect_branch_register logic.
20877 (sibcall_insn_operand): Likewise.
20879 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20881 * config/i386/constraints.md (Bs): Replace
20882 ix86_indirect_branch_thunk_register with
20883 ix86_indirect_branch_register.
20885 * config/i386/i386.md (indirect_jump): Likewise.
20886 (tablejump): Likewise.
20887 (*sibcall_memory): Likewise.
20888 (*sibcall_value_memory): Likewise.
20889 Peepholes of indirect call and jump via memory: Likewise.
20890 * config/i386/i386.opt: Likewise.
20891 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20892 (GOT_memory_operand): Likewise.
20893 (call_insn_operand): Likewise.
20894 (sibcall_insn_operand): Likewise.
20895 (GOT32_symbol_operand): Likewise.
20897 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20899 PR middle-end/83837
20900 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20901 type rather than type addr's type points to.
20902 (expand_omp_atomic_mutex): Likewise.
20903 (expand_omp_atomic): Likewise.
20905 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20908 * config/i386/i386.c (output_indirect_thunk_function): Use
20909 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20910 for __x86_return_thunk.
20912 2018-01-15 Richard Biener <rguenther@suse.de>
20914 PR middle-end/83850
20915 * expmed.c (extract_bit_field_1): Fix typo.
20917 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20920 * config/arm/iterators.md (VF): New mode iterator.
20921 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20922 Remove integer-related logic from pattern.
20923 (neon_vabd<mode>_3): Likewise.
20925 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20927 PR middle-end/82694
20928 * common.opt (fstrict-overflow): No longer an alias.
20929 (fwrapv-pointer): New option.
20930 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20931 also for pointer types based on flag_wrapv_pointer.
20932 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20933 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20934 opts->x_flag_wrapv got set.
20935 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20936 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20937 POINTER_TYPE_OVERFLOW_UNDEFINED.
20938 * match.pd: Likewise in address comparison pattern.
20939 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20941 2018-01-15 Richard Biener <rguenther@suse.de>
20944 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20945 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20946 Reset type names to their identifier if their TYPE_DECL doesn't
20947 have linkage (and thus is used for ODR and devirt).
20948 (save_debug_info_for_decl): Remove.
20949 (save_debug_info_for_type): Likewise.
20950 (add_tree_to_fld_list): Adjust.
20951 * tree-pretty-print.c (dump_generic_node): Make dumping of
20952 type names more robust.
20954 2018-01-15 Richard Biener <rguenther@suse.de>
20956 * BASE-VER: Bump to 8.0.1.
20958 2018-01-14 Martin Sebor <msebor@redhat.com>
20961 * builtins.c (check_access): Avoid warning when the no-warning bit
20964 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20966 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20967 * ira-color (allocno_hard_regs_compare): Likewise.
20969 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20972 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20973 Use .pushsection/.popsection.
20975 2018-01-14 Martin Sebor <msebor@redhat.com>
20978 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20980 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20982 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20983 entry from extra_headers.
20984 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20985 extra_headers, make the list bitwise identical to the i?86-*-* one.
20987 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20989 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20990 -mcmodel=large with -mindirect-branch=thunk,
20991 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20992 -mfunction-return=thunk-extern.
20993 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20994 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20995 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20997 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20999 * config/i386/i386.c (print_reg): Print the name of the full
21000 integer register without '%'.
21001 (ix86_print_operand): Handle 'V'.
21002 * doc/extend.texi: Document 'V' modifier.
21004 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21006 * config/i386/constraints.md (Bs): Disallow memory operand for
21007 -mindirect-branch-register.
21009 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21010 (GOT_memory_operand): Likewise.
21011 (call_insn_operand): Likewise.
21012 (sibcall_insn_operand): Likewise.
21013 (GOT32_symbol_operand): Likewise.
21014 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21015 for -mindirect-branch-register.
21016 (tablejump): Likewise.
21017 (*sibcall_memory): Likewise.
21018 (*sibcall_value_memory): Likewise.
21019 Disallow peepholes of indirect call and jump via memory for
21020 -mindirect-branch-register.
21021 (*call_pop): Replace m with Bw.
21022 (*call_value_pop): Likewise.
21023 (*sibcall_pop_memory): Replace m with Bs.
21024 * config/i386/i386.opt (mindirect-branch-register): New option.
21025 * doc/invoke.texi: Document -mindirect-branch-register option.
21027 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21029 * config/i386/i386-protos.h (ix86_output_function_return): New.
21030 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21031 set function_return_type.
21032 (indirect_thunk_name): Add ret_p to indicate thunk for function
21034 (output_indirect_thunk_function): Pass false to
21035 indirect_thunk_name.
21036 (ix86_output_indirect_branch_via_reg): Likewise.
21037 (ix86_output_indirect_branch_via_push): Likewise.
21038 (output_indirect_thunk_function): Create alias for function
21039 return thunk if regno < 0.
21040 (ix86_output_function_return): New function.
21041 (ix86_handle_fndecl_attribute): Handle function_return.
21042 (ix86_attribute_table): Add function_return.
21043 * config/i386/i386.h (machine_function): Add
21044 function_return_type.
21045 * config/i386/i386.md (simple_return_internal): Use
21046 ix86_output_function_return.
21047 (simple_return_internal_long): Likewise.
21048 * config/i386/i386.opt (mfunction-return=): New option.
21049 (indirect_branch): Mention -mfunction-return=.
21050 * doc/extend.texi: Document function_return function attribute.
21051 * doc/invoke.texi: Document -mfunction-return= option.
21053 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21055 * config/i386/i386-opts.h (indirect_branch): New.
21056 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21057 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21058 with local indirect jump when converting indirect call and jump.
21059 (ix86_set_indirect_branch_type): New.
21060 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21061 (indirectlabelno): New.
21062 (indirect_thunk_needed): Likewise.
21063 (indirect_thunk_bnd_needed): Likewise.
21064 (indirect_thunks_used): Likewise.
21065 (indirect_thunks_bnd_used): Likewise.
21066 (INDIRECT_LABEL): Likewise.
21067 (indirect_thunk_name): Likewise.
21068 (output_indirect_thunk): Likewise.
21069 (output_indirect_thunk_function): Likewise.
21070 (ix86_output_indirect_branch_via_reg): Likewise.
21071 (ix86_output_indirect_branch_via_push): Likewise.
21072 (ix86_output_indirect_branch): Likewise.
21073 (ix86_output_indirect_jmp): Likewise.
21074 (ix86_code_end): Call output_indirect_thunk_function if needed.
21075 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21077 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21078 (ix86_attribute_table): Add indirect_branch.
21079 * config/i386/i386.h (machine_function): Add indirect_branch_type
21080 and has_local_indirect_jump.
21081 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21083 (tablejump): Likewise.
21084 (*indirect_jump): Use ix86_output_indirect_jmp.
21085 (*tablejump_1): Likewise.
21086 (simple_return_indirect_internal): Likewise.
21087 * config/i386/i386.opt (mindirect-branch=): New option.
21088 (indirect_branch): New.
21091 (thunk-inline): Likewise.
21092 (thunk-extern): Likewise.
21093 * doc/extend.texi: Document indirect_branch function attribute.
21094 * doc/invoke.texi: Document -mindirect-branch= option.
21096 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21099 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21101 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21103 * ipa-inline.c (want_inline_small_function_p): Return false if
21104 inlining has already failed with CIF_FINAL_ERROR.
21105 (update_caller_keys): Call want_inline_small_function_p before
21107 (update_callee_keys): Likewise.
21109 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21111 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21113 (rs6000_quadword_masked_address_p): Likewise.
21114 (quad_aligned_load_p): Likewise.
21115 (quad_aligned_store_p): Likewise.
21116 (const_load_sequence_p): Add comment to describe the outer-most loop.
21117 (mimic_memory_attributes_and_flags): New function.
21118 (rs6000_gen_stvx): Likewise.
21119 (replace_swapped_aligned_store): Likewise.
21120 (rs6000_gen_lvx): Likewise.
21121 (replace_swapped_aligned_load): Likewise.
21122 (replace_swapped_load_constant): Capitalize argument name in
21123 comment describing this function.
21124 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21125 and stores that access quad-word aligned addresses and replace
21126 with stvx or lvx instructions when appropriate.
21127 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21128 New function prototype.
21129 (rs6000_quadword_masked_address_p): Likewise.
21130 (rs6000_gen_lvx): Likewise.
21131 (rs6000_gen_stvx): Likewise.
21132 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21133 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21134 when memory address is aligned.
21135 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21136 this split to select lvx instruction when memory address is aligned.
21137 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21138 instruction when memory address is aligned.
21139 (*vsx_le_perm_load_v16qi): Likewise.
21140 (four unnamed splitters): Modify to select the stvx instruction
21141 when memory is aligned.
21143 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21145 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21146 which appears in the queue multiple times.
21148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21149 Alan Hayward <alan.hayward@arm.com>
21150 David Sherwood <david.sherwood@arm.com>
21152 * tree-vectorizer.h (vec_lower_bound): New structure.
21153 (_loop_vec_info): Add check_nonzero and lower_bounds.
21154 (LOOP_VINFO_CHECK_NONZERO): New macro.
21155 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21156 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21157 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21158 fields. Make seg_len the distance travelled, not including the
21160 (dr_direction_indicator): Declare.
21161 (dr_zero_step_indicator): Likewise.
21162 (dr_known_forward_stride_p): Likewise.
21163 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21165 (runtime_alias_check_p): Allow runtime alias checks with
21167 (operator ==): Compare access_size and align.
21168 (prune_runtime_alias_test_list): Rework for new distinction between
21169 the access_size and seg_len.
21170 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21172 (get_segment_min_max): New function.
21173 (create_intersect_range_checks): Use it.
21174 (dr_step_indicator): New function.
21175 (dr_direction_indicator): Likewise.
21176 (dr_zero_step_indicator): Likewise.
21177 (dr_known_forward_stride_p): Likewise.
21178 * tree-loop-distribution.c (data_ref_segment_size): Return
21179 DR_STEP * (niters - 1).
21180 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21182 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21183 (vect_preserves_scalar_order_p): New function, split out from...
21184 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21185 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21186 (vect_vfa_access_size): New function.
21187 (vect_vfa_align): Likewise.
21188 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21189 (dump_lower_bound): New function.
21190 (vect_check_lower_bound): Likewise.
21191 (vect_small_gap_p): Likewise.
21192 (vectorizable_with_step_bound_p): Likewise.
21193 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21194 depencies if the vectorization factor is 1. Convert the checks
21195 for nonzero steps into checks on the bounds of DR_STEP. Try using
21196 a bunds check for variable steps if the minimum required step is
21197 relatively small. Update calls to the dr_with_seg_len
21198 constructor and to vect_compile_time_alias.
21199 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21201 (vect_loop_versioning): Call it.
21202 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21204 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21206 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21207 Alan Hayward <alan.hayward@arm.com>
21208 David Sherwood <david.sherwood@arm.com>
21210 * doc/sourcebuild.texi (vect_scatter_store): Document.
21211 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21213 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21215 * genopinit.c (main): Add supports_vec_scatter_store and
21216 supports_vec_scatter_store_cached to target_optabs.
21217 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21218 IFN_MASK_SCATTER_STORE.
21219 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21221 * internal-fn.h (internal_store_fn_p): Declare.
21222 (internal_fn_stored_value_index): Likewise.
21223 * internal-fn.c (scatter_store_direct): New macro.
21224 (expand_scatter_store_optab_fn): New function.
21225 (direct_scatter_store_optab_supported_p): New macro.
21226 (internal_store_fn_p): New function.
21227 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21228 IFN_MASK_SCATTER_STORE.
21229 (internal_fn_mask_index): Likewise.
21230 (internal_fn_stored_value_index): New function.
21231 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21232 for scatter stores.
21233 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21234 * optabs-query.c (supports_vec_scatter_store_p): New function.
21235 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21236 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21237 true for scatter stores.
21238 (vect_gather_scatter_fn_p): Handle scatter stores too.
21239 (vect_check_gather_scatter): Consider using scatter stores if
21240 supports_vec_scatter_store_p.
21241 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21242 scatter stores too.
21243 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21244 internal_fn_stored_value_index.
21245 (check_load_store_masking): Handle scatter stores too.
21246 (vect_get_store_rhs): Make public.
21247 (vectorizable_call): Use internal_store_fn_p.
21248 (vectorizable_store): Handle scatter store internal functions.
21249 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21250 when deciding whether the end of the group has been reached.
21251 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21252 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21253 (mask_scatter_store<mode>): New insns.
21255 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21256 Alan Hayward <alan.hayward@arm.com>
21257 David Sherwood <david.sherwood@arm.com>
21259 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21260 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21261 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21263 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21264 Use vect_truncate_gather_scatter_offset if we can't treat the
21265 operation as a normal gather load or scatter store.
21266 (get_group_load_store_type): Take the gather_scatter_info
21267 as argument. Try using a gather load or scatter store for
21268 single-element groups.
21269 (get_load_store_type): Update calls to get_group_load_store_type
21270 and vect_use_strided_gather_scatters_p.
21272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21273 Alan Hayward <alan.hayward@arm.com>
21274 David Sherwood <david.sherwood@arm.com>
21276 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21277 optional tree argument.
21278 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21280 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21281 but continue to use the current value as a fallback.
21282 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21283 to compare the updates.
21284 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21285 (get_load_store_type): Use it when handling a strided access.
21286 (vect_get_strided_load_store_ops): New function.
21287 (vect_get_data_ptr_increment): Likewise.
21288 (vectorizable_load): Handle strided gather loads. Always pass
21289 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21292 Alan Hayward <alan.hayward@arm.com>
21293 David Sherwood <david.sherwood@arm.com>
21295 * doc/md.texi (gather_load@var{m}): Document.
21296 (mask_gather_load@var{m}): Likewise.
21297 * genopinit.c (main): Add supports_vec_gather_load and
21298 supports_vec_gather_load_cached to target_optabs.
21299 * optabs-tree.c (init_tree_optimization_optabs): Use
21300 ggc_cleared_alloc to allocate target_optabs.
21301 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21302 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21304 * internal-fn.h (internal_load_fn_p): Declare.
21305 (internal_gather_scatter_fn_p): Likewise.
21306 (internal_fn_mask_index): Likewise.
21307 (internal_gather_scatter_fn_supported_p): Likewise.
21308 * internal-fn.c (gather_load_direct): New macro.
21309 (expand_gather_load_optab_fn): New function.
21310 (direct_gather_load_optab_supported_p): New macro.
21311 (direct_internal_fn_optab): New function.
21312 (internal_load_fn_p): Likewise.
21313 (internal_gather_scatter_fn_p): Likewise.
21314 (internal_fn_mask_index): Likewise.
21315 (internal_gather_scatter_fn_supported_p): Likewise.
21316 * optabs-query.c (supports_at_least_one_mode_p): New function.
21317 (supports_vec_gather_load_p): Likewise.
21318 * optabs-query.h (supports_vec_gather_load_p): Declare.
21319 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21320 and memory_type field.
21321 (NUM_PATTERNS): Bump to 15.
21322 * tree-vect-data-refs.c: Include internal-fn.h.
21323 (vect_gather_scatter_fn_p): New function.
21324 (vect_describe_gather_scatter_call): Likewise.
21325 (vect_check_gather_scatter): Try using internal functions for
21326 gather loads. Recognize existing calls to a gather load function.
21327 (vect_analyze_data_refs): Consider using gather loads if
21328 supports_vec_gather_load_p.
21329 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21330 (vect_get_gather_scatter_offset_type): Likewise.
21331 (vect_convert_mask_for_vectype): Likewise.
21332 (vect_add_conversion_to_patterm): Likewise.
21333 (vect_try_gather_scatter_pattern): Likewise.
21334 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21335 (vect_vect_recog_func_ptrs): Add it.
21336 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21337 internal_fn_mask_index and internal_gather_scatter_fn_p.
21338 (check_load_store_masking): Take the gather_scatter_info as an
21339 argument and handle gather loads.
21340 (vect_get_gather_scatter_ops): New function.
21341 (vectorizable_call): Check internal_load_fn_p.
21342 (vectorizable_load): Likewise. Handle gather load internal
21344 (vectorizable_store): Update call to check_load_store_masking.
21345 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21346 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21347 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21348 (aarch64_gather_scale_operand_d): New predicates.
21349 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21350 (mask_gather_load<mode>): New insns.
21352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21353 Alan Hayward <alan.hayward@arm.com>
21354 David Sherwood <david.sherwood@arm.com>
21356 * optabs.def (fold_left_plus_optab): New optab.
21357 * doc/md.texi (fold_left_plus_@var{m}): Document.
21358 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21359 * internal-fn.c (fold_left_direct): Define.
21360 (expand_fold_left_optab_fn): Likewise.
21361 (direct_fold_left_optab_supported_p): Likewise.
21362 * fold-const-call.c (fold_const_fold_left): New function.
21363 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21364 * tree-parloops.c (valid_reduction_p): New function.
21365 (gather_scalar_reductions): Use it.
21366 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21367 (vect_finish_replace_stmt): Declare.
21368 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21369 (needs_fold_left_reduction_p): New function, split out from...
21370 (vect_is_simple_reduction): ...here. Accept reductions that
21371 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21372 (vect_force_simple_reduction): Also store the reduction type in
21373 the assignment's STMT_VINFO_REDUC_TYPE.
21374 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21375 (merge_with_identity): New function.
21376 (vect_expand_fold_left): Likewise.
21377 (vectorize_fold_left_reduction): Likewise.
21378 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21379 scalar phi in place for it. Check for target support and reject
21380 cases that would reassociate the operation. Defer the transform
21381 phase to vectorize_fold_left_reduction.
21382 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21383 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21384 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21386 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21388 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21389 call to ifc_temp_var.
21391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21392 Alan Hayward <alan.hayward@arm.com>
21393 David Sherwood <david.sherwood@arm.com>
21395 * target.def (legitimize_address_displacement): Take the original
21396 offset as a poly_int.
21397 * targhooks.h (default_legitimize_address_displacement): Update
21399 * targhooks.c (default_legitimize_address_displacement): Likewise.
21400 * doc/tm.texi: Regenerate.
21401 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21402 as an argument, moving assert of ad->disp == ad->disp_term to...
21403 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21404 Try calling targetm.legitimize_address_displacement before expanding
21405 the address rather than afterwards, and adjust for the new interface.
21406 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21407 Match the new hook interface. Handle SVE addresses.
21408 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21409 new hook interface.
21411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21413 * Makefile.in (OBJS): Add early-remat.o.
21414 * target.def (select_early_remat_modes): New hook.
21415 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21416 * doc/tm.texi: Regenerate.
21417 * targhooks.h (default_select_early_remat_modes): Declare.
21418 * targhooks.c (default_select_early_remat_modes): New function.
21419 * timevar.def (TV_EARLY_REMAT): New timevar.
21420 * passes.def (pass_early_remat): New pass.
21421 * tree-pass.h (make_pass_early_remat): Declare.
21422 * early-remat.c: New file.
21423 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21425 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21427 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21428 Alan Hayward <alan.hayward@arm.com>
21429 David Sherwood <david.sherwood@arm.com>
21431 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21432 vfm1 with a bound_epilog parameter.
21433 (vect_do_peeling): Update calls accordingly, and move the prologue
21434 call earlier in the function. Treat the base bound_epilog as 0 for
21435 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21436 this base when peeling for gaps.
21437 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21438 with fully-masked loops.
21439 (vect_estimate_min_profitable_iters): Handle the single peeled
21440 iteration in that case.
21442 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21443 Alan Hayward <alan.hayward@arm.com>
21444 David Sherwood <david.sherwood@arm.com>
21446 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21447 single-element interleaving even if the size is not a power of 2.
21448 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21449 accesses for single-element interleaving if the group size is
21452 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21453 Alan Hayward <alan.hayward@arm.com>
21454 David Sherwood <david.sherwood@arm.com>
21456 * doc/md.texi (fold_extract_last_@var{m}): Document.
21457 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21458 * optabs.def (fold_extract_last_optab): New optab.
21459 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21460 * internal-fn.c (fold_extract_direct): New macro.
21461 (expand_fold_extract_optab_fn): Likewise.
21462 (direct_fold_extract_optab_supported_p): Likewise.
21463 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21464 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21465 EXTRACT_LAST_REDUCTION.
21466 (get_initial_def_for_reduction): Do not create an initial vector
21467 for EXTRACT_LAST_REDUCTION reductions.
21468 (vectorizable_reduction): Leave the scalar phi in place for
21469 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21470 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21471 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21472 transform phase to vectorizable_condition.
21473 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21475 (vect_finish_stmt_generation): ...here.
21476 (vect_finish_replace_stmt): New function.
21477 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21478 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21480 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21483 Alan Hayward <alan.hayward@arm.com>
21484 David Sherwood <david.sherwood@arm.com>
21486 * doc/md.texi (extract_last_@var{m}): Document.
21487 * optabs.def (extract_last_optab): New optab.
21488 * internal-fn.def (EXTRACT_LAST): New internal function.
21489 * internal-fn.c (cond_unary_direct): New macro.
21490 (expand_cond_unary_optab_fn): Likewise.
21491 (direct_cond_unary_optab_supported_p): Likewise.
21492 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21493 loops using EXTRACT_LAST.
21494 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21495 (extract_last_<mode>): ...this optab.
21496 (vec_extract<mode><Vel>): Update accordingly.
21498 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21499 Alan Hayward <alan.hayward@arm.com>
21500 David Sherwood <david.sherwood@arm.com>
21502 * target.def (empty_mask_is_expensive): New hook.
21503 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21504 * doc/tm.texi: Regenerate.
21505 * targhooks.h (default_empty_mask_is_expensive): Declare.
21506 * targhooks.c (default_empty_mask_is_expensive): New function.
21507 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21508 if the target says that empty masks are expensive.
21509 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21511 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21513 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21514 Alan Hayward <alan.hayward@arm.com>
21515 David Sherwood <david.sherwood@arm.com>
21517 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21518 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21519 (vect_use_loop_mask_for_alignment_p): New function.
21520 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21521 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21522 niters_skip argument. Make sure that the first niters_skip elements
21523 of the first iteration are inactive.
21524 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21525 Update call to vect_set_loop_masks_directly.
21526 (get_misalign_in_elems): New function, split out from...
21527 (vect_gen_prolog_loop_niters): ...here.
21528 (vect_update_init_of_dr): Take a code argument that specifies whether
21529 the adjustment should be added or subtracted.
21530 (vect_update_init_of_drs): Likewise.
21531 (vect_prepare_for_masked_peels): New function.
21532 (vect_do_peeling): Skip prologue peeling if we're using a mask
21533 instead. Update call to vect_update_inits_of_drs.
21534 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21536 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21537 alignment. Do not include the number of peeled iterations in
21538 the minimum threshold in that case.
21539 (vectorizable_induction): Adjust the start value down by
21540 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21541 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21542 Take the number of skipped iterations into account when calculating
21544 * tree-vect-stmts.c (vect_gen_while_not): New function.
21546 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21547 Alan Hayward <alan.hayward@arm.com>
21548 David Sherwood <david.sherwood@arm.com>
21550 * doc/sourcebuild.texi (vect_fully_masked): Document.
21551 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21552 default value to 0.
21553 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21555 (vect_analyze_loop_2): ...here. Don't check the vectorization
21556 factor against the number of loop iterations if the loop is
21559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21560 Alan Hayward <alan.hayward@arm.com>
21561 David Sherwood <david.sherwood@arm.com>
21563 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21564 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21565 (dump_groups): Update accordingly.
21566 (iv_use::mem_type): New member variable.
21567 (address_p): New function.
21568 (record_use): Add a mem_type argument and initialize the new
21570 (record_group_use): Add a mem_type argument. Use address_p.
21571 Remove obsolete null checks of base_object. Update call to record_use.
21572 (find_interesting_uses_op): Update call to record_group_use.
21573 (find_interesting_uses_cond): Likewise.
21574 (find_interesting_uses_address): Likewise.
21575 (get_mem_type_for_internal_fn): New function.
21576 (find_address_like_use): Likewise.
21577 (find_interesting_uses_stmt): Try find_address_like_use before
21578 calling find_interesting_uses_op.
21579 (addr_offset_valid_p): Use the iv mem_type field as the type
21580 of the addressed memory.
21581 (add_autoinc_candidates): Likewise.
21582 (get_address_cost): Likewise.
21583 (split_small_address_groups_p): Use address_p.
21584 (split_address_groups): Likewise.
21585 (add_iv_candidate_for_use): Likewise.
21586 (autoinc_possible_for_pair): Likewise.
21587 (rewrite_groups): Likewise.
21588 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21589 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21590 (get_alias_ptr_type_for_ptr_address): New function.
21591 (rewrite_use_address): Rewrite address uses in calls that were
21592 identified by find_address_like_use.
21594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21595 Alan Hayward <alan.hayward@arm.com>
21596 David Sherwood <david.sherwood@arm.com>
21598 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21600 * gimple-expr.h (is_gimple_addressable: Likewise.
21601 * gimple-expr.c (is_gimple_address): Likewise.
21602 * internal-fn.c (expand_call_mem_ref): New function.
21603 (expand_mask_load_optab_fn): Use it.
21604 (expand_mask_store_optab_fn): Likewise.
21606 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21607 Alan Hayward <alan.hayward@arm.com>
21608 David Sherwood <david.sherwood@arm.com>
21610 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21611 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21612 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21613 (cond_umax@var{mode}): Document.
21614 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21615 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21616 (cond_umin_optab, cond_umax_optab): New optabs.
21617 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21618 (COND_IOR, COND_XOR): New internal functions.
21619 * internal-fn.h (get_conditional_internal_fn): Declare.
21620 * internal-fn.c (cond_binary_direct): New macro.
21621 (expand_cond_binary_optab_fn): Likewise.
21622 (direct_cond_binary_optab_supported_p): Likewise.
21623 (get_conditional_internal_fn): New function.
21624 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21625 Cope with reduction statements that are vectorized as calls rather
21627 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21628 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21629 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21630 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21631 (UNSPEC_COND_EOR): New unspecs.
21632 (optab): Add mappings for them.
21633 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21634 (sve_int_op, sve_fp_op): New int attributes.
21636 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21637 Alan Hayward <alan.hayward@arm.com>
21638 David Sherwood <david.sherwood@arm.com>
21640 * optabs.def (while_ult_optab): New optab.
21641 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21642 * internal-fn.def (WHILE_ULT): New internal function.
21643 * internal-fn.h (direct_internal_fn_supported_p): New override
21644 that takes two types as argument.
21645 * internal-fn.c (while_direct): New macro.
21646 (expand_while_optab_fn): New function.
21647 (convert_optab_supported_p): Likewise.
21648 (direct_while_optab_supported_p): New macro.
21649 * wide-int.h (wi::udiv_ceil): New function.
21650 * tree-vectorizer.h (rgroup_masks): New structure.
21651 (vec_loop_masks): New typedef.
21652 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21653 and fully_masked_p.
21654 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21655 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21656 (vect_max_vf): New function.
21657 (slpeel_make_loop_iterate_ntimes): Delete.
21658 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21659 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21660 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21661 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21662 internal-fn.h, stor-layout.h and optabs-query.h.
21663 (vect_set_loop_mask): New function.
21664 (add_preheader_seq): Likewise.
21665 (add_header_seq): Likewise.
21666 (interleave_supported_p): Likewise.
21667 (vect_maybe_permute_loop_masks): Likewise.
21668 (vect_set_loop_masks_directly): Likewise.
21669 (vect_set_loop_condition_masked): Likewise.
21670 (vect_set_loop_condition_unmasked): New function, split out from
21671 slpeel_make_loop_iterate_ntimes.
21672 (slpeel_make_loop_iterate_ntimes): Rename to..
21673 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21674 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21675 (vect_do_peeling): Update call accordingly.
21676 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21678 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21679 mask_compare_type, can_fully_mask_p and fully_masked_p.
21680 (release_vec_loop_masks): New function.
21681 (_loop_vec_info): Use it to free the loop masks.
21682 (can_produce_all_loop_masks_p): New function.
21683 (vect_get_max_nscalars_per_iter): Likewise.
21684 (vect_verify_full_masking): Likewise.
21685 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21686 retries, and free the mask rgroups before retrying. Check loop-wide
21687 reasons for disallowing fully-masked loops. Make the final decision
21688 about whether use a fully-masked loop or not.
21689 (vect_estimate_min_profitable_iters): Do not assume that peeling
21690 for the number of iterations will be needed for fully-masked loops.
21691 (vectorizable_reduction): Disable fully-masked loops.
21692 (vectorizable_live_operation): Likewise.
21693 (vect_halve_mask_nunits): New function.
21694 (vect_double_mask_nunits): Likewise.
21695 (vect_record_loop_mask): Likewise.
21696 (vect_get_loop_mask): Likewise.
21697 (vect_transform_loop): Handle the case in which the final loop
21698 iteration might handle a partial vector. Call vect_set_loop_condition
21699 instead of slpeel_make_loop_iterate_ntimes.
21700 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21701 (check_load_store_masking): New function.
21702 (prepare_load_store_mask): Likewise.
21703 (vectorizable_store): Handle fully-masked loops.
21704 (vectorizable_load): Likewise.
21705 (supportable_widening_operation): Use vect_halve_mask_nunits for
21707 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21708 (vect_gen_while): New function.
21709 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21710 (aarch64_uqdec<mode>): New insn.
21712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21713 Alan Hayward <alan.hayward@arm.com>
21714 David Sherwood <david.sherwood@arm.com>
21716 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21717 (reduc_xor_scal_optab): New optabs.
21718 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21719 (reduc_xor_scal_@var{m}): Document.
21720 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21721 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21722 internal functions.
21723 * fold-const-call.c (fold_const_call): Handle them.
21724 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21725 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21726 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21727 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21728 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21729 (UNSPEC_XORV): New unspecs.
21730 (optab): Add entries for them.
21731 (BITWISEV): New int iterator.
21732 (bit_reduc_op): New int attributes.
21734 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21735 Alan Hayward <alan.hayward@arm.com>
21736 David Sherwood <david.sherwood@arm.com>
21738 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21739 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21740 * optabs.def (vec_shl_insert_optab): New optab.
21741 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21742 (duplicate_and_interleave): Likewise.
21743 * tree-vect-loop.c: Include internal-fn.h.
21744 (neutral_op_for_slp_reduction): New function, split out from
21745 get_initial_defs_for_reduction.
21746 (get_initial_def_for_reduction): Handle option 2 for variable-length
21747 vectors by loading the neutral value into a vector and then shifting
21748 the initial value into element 0.
21749 (get_initial_defs_for_reduction): Replace the code argument with
21750 the neutral value calculated by neutral_op_for_slp_reduction.
21751 Use gimple_build_vector for constant-length vectors.
21752 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21753 but the first group_size elements have a neutral value.
21754 Use duplicate_and_interleave otherwise.
21755 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21756 Update call to get_initial_defs_for_reduction. Handle SLP
21757 reductions for variable-length vectors by creating one vector
21758 result for each scalar result, with the elements associated
21759 with other scalar results stubbed out with the neutral value.
21760 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21761 Require IFN_VEC_SHL_INSERT for double reductions on
21762 variable-length vectors, or SLP reductions that have
21763 a neutral value. Require can_duplicate_and_interleave_p
21764 support for variable-length unchained SLP reductions if there
21765 is no neutral value, such as for MIN/MAX reductions. Also require
21766 the number of vector elements to be a multiple of the number of
21767 SLP statements when doing variable-length unchained SLP reductions.
21768 Update call to vect_create_epilog_for_reduction.
21769 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21770 and remove initial values.
21771 (duplicate_and_interleave): Make public.
21772 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21773 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21775 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21776 Alan Hayward <alan.hayward@arm.com>
21777 David Sherwood <david.sherwood@arm.com>
21779 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21780 (can_duplicate_and_interleave_p): New function.
21781 (vect_get_and_check_slp_defs): Take the vector of statements
21782 rather than just the current one. Remove excess parentheses.
21783 Restriction rejectinon of vect_constant_def and vect_external_def
21784 for variable-length vectors to boolean types, or types for which
21785 can_duplicate_and_interleave_p is false.
21786 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21787 (duplicate_and_interleave): New function.
21788 (vect_get_constant_vectors): Use gimple_build_vector for
21789 constant-length vectors and suitable variable-length constant
21790 vectors. Use duplicate_and_interleave for other variable-length
21791 vectors. Don't defer the update when inserting new statements.
21793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21794 Alan Hayward <alan.hayward@arm.com>
21795 David Sherwood <david.sherwood@arm.com>
21797 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21798 min_profitable_iters doesn't go negative.
21800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21801 Alan Hayward <alan.hayward@arm.com>
21802 David Sherwood <david.sherwood@arm.com>
21804 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21805 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21806 * optabs.def (vec_mask_load_lanes_optab): New optab.
21807 (vec_mask_store_lanes_optab): Likewise.
21808 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21809 (MASK_STORE_LANES): Likewise.
21810 * internal-fn.c (mask_load_lanes_direct): New macro.
21811 (mask_store_lanes_direct): Likewise.
21812 (expand_mask_load_optab_fn): Handle masked operations.
21813 (expand_mask_load_lanes_optab_fn): New macro.
21814 (expand_mask_store_optab_fn): Handle masked operations.
21815 (expand_mask_store_lanes_optab_fn): New macro.
21816 (direct_mask_load_lanes_optab_supported_p): Likewise.
21817 (direct_mask_store_lanes_optab_supported_p): Likewise.
21818 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21820 (vect_load_lanes_supported): Likewise.
21821 * tree-vect-data-refs.c (strip_conversion): New function.
21822 (can_group_stmts_p): Likewise.
21823 (vect_analyze_data_ref_accesses): Use it instead of checking
21824 for a pair of assignments.
21825 (vect_store_lanes_supported): Take a masked_p parameter.
21826 (vect_load_lanes_supported): Likewise.
21827 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21828 vect_store_lanes_supported and vect_load_lanes_supported.
21829 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21830 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21831 parameter. Don't allow gaps for masked accesses.
21832 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21833 and vect_load_lanes_supported.
21834 (get_load_store_type): Take a masked_p parameter and update
21835 call to get_group_load_store_type.
21836 (vectorizable_store): Update call to get_load_store_type.
21837 Handle IFN_MASK_STORE_LANES.
21838 (vectorizable_load): Update call to get_load_store_type.
21839 Handle IFN_MASK_LOAD_LANES.
21841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21842 Alan Hayward <alan.hayward@arm.com>
21843 David Sherwood <david.sherwood@arm.com>
21845 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21847 * config/aarch64/aarch64-protos.h
21848 (aarch64_sve_struct_memory_operand_p): Declare.
21849 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21850 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21851 (VPRED, vpred): Handle SVE structure modes.
21852 * config/aarch64/constraints.md (Utx): New constraint.
21853 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21854 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21855 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21856 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21857 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21858 structure modes. Split into pieces after RA.
21859 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21860 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21862 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21863 SVE structure modes.
21864 (aarch64_classify_address): Likewise.
21865 (sizetochar): Move earlier in file.
21866 (aarch64_print_operand): Handle SVE register lists.
21867 (aarch64_array_mode): New function.
21868 (aarch64_sve_struct_memory_operand_p): Likewise.
21869 (TARGET_ARRAY_MODE): Redefine.
21871 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21872 Alan Hayward <alan.hayward@arm.com>
21873 David Sherwood <david.sherwood@arm.com>
21875 * target.def (array_mode): New target hook.
21876 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21877 * doc/tm.texi: Regenerate.
21878 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21879 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21880 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21881 targetm.array_mode.
21882 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21885 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21886 Alan Hayward <alan.hayward@arm.com>
21887 David Sherwood <david.sherwood@arm.com>
21889 * fold-const.c (fold_binary_loc): Check the argument types
21890 rather than the result type when testing for a vector operation.
21892 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21894 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21895 * doc/tm.texi: Regenerate.
21897 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21898 Alan Hayward <alan.hayward@arm.com>
21899 David Sherwood <david.sherwood@arm.com>
21901 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21902 (sve): Document new AArch64 extension.
21903 * doc/md.texi (w): Extend the description of the AArch64
21904 constraint to include SVE vectors.
21905 (Upl, Upa): Document new AArch64 predicate constraints.
21906 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21908 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21909 (msve-vector-bits=): New option.
21910 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21911 SVE when these are disabled.
21912 (sve): New extension.
21913 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21914 modes. Adjust their number of units based on aarch64_sve_vg.
21915 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21916 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21917 aarch64_addr_query_type.
21918 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21919 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21920 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21921 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21922 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21923 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21924 (aarch64_simd_imm_zero_p): Delete.
21925 (aarch64_check_zero_based_sve_index_immediate): Declare.
21926 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21927 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21928 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21929 (aarch64_sve_float_mul_immediate_p): Likewise.
21930 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21931 rather than an rtx.
21932 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21933 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21934 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21935 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21936 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21937 (aarch64_regmode_natural_size): Likewise.
21938 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21939 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21941 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21942 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21943 for VG and the SVE predicate registers.
21944 (V_ALIASES): Add a "z"-prefixed alias.
21945 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21946 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21947 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21948 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21949 (REG_CLASS_NAMES): Add entries for them.
21950 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21951 and the predicate registers.
21952 (aarch64_sve_vg): Declare.
21953 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21954 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21955 (REGMODE_NATURAL_SIZE): Define.
21956 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21958 * config/aarch64/aarch64.c: Include cfgrtl.h.
21959 (simd_immediate_info): Add a constructor for series vectors,
21960 and an associated step field.
21961 (aarch64_sve_vg): New variable.
21962 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21963 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21964 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21965 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21966 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21967 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21968 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21969 (aarch64_get_mask_mode): New functions.
21970 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21971 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21972 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21973 predicate modes and predicate registers. Explicitly restrict
21974 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21975 to store a vector mode if it is recognized by
21976 aarch64_classify_vector_mode.
21977 (aarch64_regmode_natural_size): New function.
21978 (aarch64_hard_regno_caller_save_mode): Return the original mode
21980 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21981 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21982 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21983 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21985 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21986 does not overlap dest if the function is frame-related. Handle
21988 (aarch64_split_add_offset): New function.
21989 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21990 them aarch64_add_offset.
21991 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21992 and update call to aarch64_sub_sp.
21993 (aarch64_add_cfa_expression): New function.
21994 (aarch64_expand_prologue): Pass extra temporary registers to the
21995 functions above. Handle the case in which we need to emit new
21996 DW_CFA_expressions for registers that were originally saved
21997 relative to the stack pointer, but now have to be expressed
21998 relative to the frame pointer.
21999 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22001 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22002 IP0 and IP1 values for SVE frames.
22003 (aarch64_expand_vec_series): New function.
22004 (aarch64_expand_sve_widened_duplicate): Likewise.
22005 (aarch64_expand_sve_const_vector): Likewise.
22006 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22007 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22008 into the register, rather than emitting a SET directly.
22009 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22010 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22011 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22012 (offset_9bit_signed_scaled_p): New functions.
22013 (aarch64_replicate_bitmask_imm): New function.
22014 (aarch64_bitmask_imm): Use it.
22015 (aarch64_cannot_force_const_mem): Reject expressions involving
22016 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22017 (aarch64_classify_index): Handle SVE indices, by requiring
22018 a plain register index with a scale that matches the element size.
22019 (aarch64_classify_address): Handle SVE addresses. Assert that
22020 the mode of the address is VOIDmode or an integer mode.
22021 Update call to aarch64_classify_symbol.
22022 (aarch64_classify_symbolic_expression): Update call to
22023 aarch64_classify_symbol.
22024 (aarch64_const_vec_all_in_range_p): New function.
22025 (aarch64_print_vector_float_operand): Likewise.
22026 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22027 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22028 and the FP immediates 1.0 and 0.5.
22029 (aarch64_print_address_internal): Handle SVE addresses.
22030 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22031 (aarch64_regno_regclass): Handle predicate registers.
22032 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22034 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22035 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22036 (aarch64_convert_sve_vector_bits): New function.
22037 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22038 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22039 rather than an rtx.
22040 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22041 Handle SVE vector and predicate modes. Accept VL-based constants
22042 that need only one temporary register, and VL offsets that require
22043 no temporary registers.
22044 (aarch64_conditional_register_usage): Mark the predicate registers
22045 as fixed if SVE isn't available.
22046 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22047 Return true for SVE vector and predicate modes.
22048 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22049 rather than an unsigned int. Handle SVE modes.
22050 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22052 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22054 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22055 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22056 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22057 (aarch64_sve_float_mul_immediate_p): New functions.
22058 (aarch64_sve_valid_immediate): New function.
22059 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22060 Explicitly reject structure modes. Check for INDEX constants.
22061 Handle PTRUE and PFALSE constants.
22062 (aarch64_check_zero_based_sve_index_immediate): New function.
22063 (aarch64_simd_imm_zero_p): Delete.
22064 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22065 vector modes. Accept constants in the range of CNT[BHWD].
22066 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22067 ask for an Advanced SIMD mode.
22068 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22069 (aarch64_simd_vector_alignment): Handle SVE predicates.
22070 (aarch64_vectorize_preferred_vector_alignment): New function.
22071 (aarch64_simd_vector_alignment_reachable): Use it instead of
22073 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22074 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22076 (MAX_VECT_LEN): Delete.
22077 (expand_vec_perm_d): Add a vec_flags field.
22078 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22079 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22080 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22082 (aarch64_evpc_rev): Rename to...
22083 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22084 (aarch64_evpc_rev_global): New function.
22085 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22086 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22088 (aarch64_evpc_sve_tbl): New function.
22089 (aarch64_expand_vec_perm_const_1): Update after rename of
22090 aarch64_evpc_rev. Handle SVE permutes too, trying
22091 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22092 than aarch64_evpc_tbl.
22093 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22094 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22095 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22096 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22097 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22098 (aarch64_expand_sve_vcond): New functions.
22099 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22100 of aarch64_vector_mode_p.
22101 (aarch64_dwarf_poly_indeterminate_value): New function.
22102 (aarch64_compute_pressure_classes): Likewise.
22103 (aarch64_can_change_mode_class): Likewise.
22104 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22105 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22106 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22107 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22108 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22109 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22110 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22111 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22113 (Dn, Dl, Dr): Accept const as well as const_vector.
22114 (Dz): Likewise. Compare against CONST0_RTX.
22115 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22116 of "vector" where appropriate.
22117 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22118 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22119 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22120 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22121 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22122 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22123 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22124 (v_int_equiv): Extend to SVE modes.
22125 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22127 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22128 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22129 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22130 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22131 (SVE_COND_FP_CMP): New int iterators.
22132 (perm_hilo): Handle the new unpack unspecs.
22133 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22135 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22136 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22137 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22138 (aarch64_equality_operator, aarch64_constant_vector_operand)
22139 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22140 (aarch64_sve_nonimmediate_operand): Likewise.
22141 (aarch64_sve_general_operand): Likewise.
22142 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22143 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22144 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22145 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22146 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22147 (aarch64_sve_float_arith_immediate): Likewise.
22148 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22149 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22150 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22151 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22152 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22153 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22154 (aarch64_sve_float_arith_operand): Likewise.
22155 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22156 (aarch64_sve_float_mul_operand): Likewise.
22157 (aarch64_sve_vec_perm_operand): Likewise.
22158 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22159 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22160 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22161 as well as const_vector.
22162 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22163 in file. Use CONST0_RTX and CONSTM1_RTX.
22164 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22165 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22166 Use aarch64_simd_imm_zero.
22167 * config/aarch64/aarch64-sve.md: New file.
22168 * config/aarch64/aarch64.md: Include it.
22169 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22170 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22171 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22172 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22173 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22174 (sve): New attribute.
22175 (enabled): Disable instructions with the sve attribute unless
22177 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22178 aarch64_expand_mov_immediate.
22179 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22180 CNT[BHSD] immediates.
22181 (movti): Split CONST_POLY_INT moves into two halves.
22182 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22183 Split additions that need a temporary here if the destination
22184 is the stack pointer.
22185 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22186 (*add<mode>3_poly_1): New instruction.
22187 (set_clobber_cc): New expander.
22189 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22191 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22192 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22193 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22194 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22195 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22196 Change innermode from fixed_mode_size to machine_mode.
22197 (simplify_subreg): Update call accordingly. Handle a constant-sized
22198 subreg of a variable-length CONST_VECTOR.
22200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22201 Alan Hayward <alan.hayward@arm.com>
22202 David Sherwood <david.sherwood@arm.com>
22204 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22205 (add_offset_to_base): New function, split out from...
22206 (create_mem_ref): ...here. When handling a scale other than 1,
22207 check first whether the address is valid without the offset.
22208 Add it into the base if so, leaving the index and scale as-is.
22210 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22213 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22214 fold_for_warn before checking if arg2 is INTEGER_CST.
22216 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22218 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22219 (store_multiple_operation): Delete.
22220 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22221 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22222 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22223 guarded by TARGET_STRING.
22224 (rs6000_output_load_multiple): Delete.
22225 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22226 OPTION_MASK_STRING / TARGET_STRING handling.
22227 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22228 (const rs6000_opt_masks) <"string">: Change mask to 0.
22229 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22230 (MASK_STRING): Delete.
22231 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22233 (load_multiple): Delete.
22240 (store_multiple): Delete.
22247 (movmemsi_8reg): Delete.
22248 (corresponding unnamed define_insn): Delete.
22249 (movmemsi_6reg): Delete.
22250 (corresponding unnamed define_insn): Delete.
22251 (movmemsi_4reg): Delete.
22252 (corresponding unnamed define_insn): Delete.
22253 (movmemsi_2reg): Delete.
22254 (corresponding unnamed define_insn): Delete.
22255 (movmemsi_1reg): Delete.
22256 (corresponding unnamed define_insn): Delete.
22257 * config/rs6000/rs6000.opt (mno-string): New.
22258 (mstring): Replace by deprecation warning stub.
22259 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22261 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22263 * regrename.c (regrename_do_replace): If replacing the same
22264 reg multiple times, try to reuse last created gen_raw_REG.
22267 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22268 main to workaround a bug in GDB.
22270 2018-01-12 Tom de Vries <tom@codesourcery.com>
22273 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22275 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22277 PR rtl-optimization/80481
22278 * ira-color.c (get_cap_member): New function.
22279 (allocnos_conflict_by_live_ranges_p): Use it.
22280 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22281 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22283 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22286 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22287 (*saddl_se_1): Ditto.
22288 (*ssubsi_1): Ditto.
22289 (*ssubl_se_1): Ditto.
22291 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22293 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22294 rather than wi::to_widest for DR_INITs.
22295 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22296 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22297 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22299 (vect_analyze_group_access_1): Note that here.
22301 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22303 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22304 polynomial type sizes.
22306 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22308 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22309 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22310 (gimple_add_tmp_var): Likewise.
22312 2018-01-12 Martin Liska <mliska@suse.cz>
22314 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22315 (gimple_alloc_sizes): Likewise.
22316 (dump_gimple_statistics): Use PRIu64 in printf format.
22317 * gimple.h: Change uint64_t to int.
22319 2018-01-12 Martin Liska <mliska@suse.cz>
22321 * tree-core.h: Use uint64_t instead of int.
22322 * tree.c (tree_node_counts): Likewise.
22323 (tree_node_sizes): Likewise.
22324 (dump_tree_statistics): Use PRIu64 in printf format.
22326 2018-01-12 Martin Liska <mliska@suse.cz>
22328 * Makefile.in: As qsort_chk is implemented in vec.c, add
22329 vec.o to linkage of gencfn-macros.
22330 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22331 passing the info to record_node_allocation_statistics.
22332 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22334 * ggc-common.c (struct ggc_usage): Add operator== and use
22335 it in operator< and compare function.
22336 * mem-stats.h (struct mem_usage): Likewise.
22337 * vec.c (struct vec_usage): Remove operator< and compare
22338 function. Can be simply inherited.
22340 2018-01-12 Martin Jambor <mjambor@suse.cz>
22343 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22344 * tree-ssa-math-opts.c: Include domwalk.h.
22345 (convert_mult_to_fma_1): New function.
22346 (fma_transformation_info): New type.
22347 (fma_deferring_state): Likewise.
22348 (cancel_fma_deferring): New function.
22349 (result_of_phi): Likewise.
22350 (last_fma_candidate_feeds_initial_phi): Likewise.
22351 (convert_mult_to_fma): Added deferring logic, split actual
22352 transformation to convert_mult_to_fma_1.
22353 (math_opts_dom_walker): New type.
22354 (math_opts_dom_walker::after_dom_children): New method, body moved
22355 here from pass_optimize_widening_mul::execute, added deferring logic
22357 (pass_optimize_widening_mul::execute): Moved most of code to
22358 math_opts_dom_walker::after_dom_children.
22359 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22360 * config/i386/i386.c (ix86_option_override_internal): Added
22361 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22363 2018-01-12 Richard Biener <rguenther@suse.de>
22366 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22367 inline instance vars.
22369 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22372 * config/rx/rx.c (rx_is_restricted_memory_address):
22373 Handle SUBREG case.
22375 2018-01-12 Richard Biener <rguenther@suse.de>
22377 PR tree-optimization/80846
22378 * target.def (split_reduction): New target hook.
22379 * targhooks.c (default_split_reduction): New function.
22380 * targhooks.h (default_split_reduction): Declare.
22381 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22382 target requests first reduce vectors by combining low and high
22384 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22385 (get_vectype_for_scalar_type_and_size): Export.
22386 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22387 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22388 * doc/tm.texi: Regenerate.
22389 * config/i386/i386.c (ix86_split_reduction): Implement
22390 TARGET_VECTORIZE_SPLIT_REDUCTION.
22392 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22395 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22396 in PIC mode except for TARGET_VXWORKS_RTP.
22397 * config/sparc/sparc.c: Include cfgrtl.h.
22398 (TARGET_INIT_PIC_REG): Define.
22399 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22400 (sparc_pic_register_p): New predicate.
22401 (sparc_legitimate_address_p): Use it.
22402 (sparc_legitimize_pic_address): Likewise.
22403 (sparc_delegitimize_address): Likewise.
22404 (sparc_mode_dependent_address_p): Likewise.
22405 (gen_load_pcrel_sym): Remove 4th parameter.
22406 (load_got_register): Adjust call to above. Remove obsolete stuff.
22407 (sparc_expand_prologue): Do not call load_got_register here.
22408 (sparc_flat_expand_prologue): Likewise.
22409 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22410 (sparc_use_pseudo_pic_reg): New function.
22411 (sparc_init_pic_reg): Likewise.
22412 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22413 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22415 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22417 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22418 Add item for branch_cost.
22420 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22422 PR rtl-optimization/83565
22423 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22424 not extend the result to a larger mode for rotate operations.
22425 (num_sign_bit_copies1): Likewise.
22427 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22430 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22432 Use values-Xc.o for -pedantic.
22433 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22435 2018-01-12 Martin Liska <mliska@suse.cz>
22438 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22440 (possible_polymorphic_call_targets): Use it.
22441 (ipa_devirt): Likewise.
22443 2018-01-12 Martin Liska <mliska@suse.cz>
22445 * profile-count.h (enum profile_quality): Use 0 as invalid
22446 enum value of profile_quality.
22448 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22450 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22451 -mext-string options.
22453 2018-01-12 Richard Biener <rguenther@suse.de>
22455 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22456 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22457 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22459 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22461 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22463 * configure.ac (--with-long-double-format): Add support for the
22464 configuration option to change the default long double format on
22466 * config.gcc (powerpc*-linux*-*): Likewise.
22467 * configure: Regenerate.
22468 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22469 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22470 used without modification.
22472 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22474 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22475 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22476 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22477 MISC_BUILTIN_SPEC_BARRIER.
22478 (rs6000_init_builtins): Likewise.
22479 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22481 (speculation_barrier): New define_insn.
22482 * doc/extend.texi: Document __builtin_speculation_barrier.
22484 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22487 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22488 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22489 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22491 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22492 integral modes instead of "ss" and "sd".
22493 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22494 vectors with 32-bit and 64-bit elements.
22495 (vecdupssescalarmodesuffix): New mode attribute.
22496 (vec_dup<mode>): Use it.
22498 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22501 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22502 frame if argument is passed on stack.
22504 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22507 * ree.c (combine_reaching_defs): Optimize also
22508 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22509 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22511 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22513 PR middle-end/83189
22514 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22516 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22518 PR middle-end/83718
22519 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22520 after they are computed.
22522 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22524 PR tree-optimization/83695
22525 * gimple-loop-linterchange.cc
22526 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22527 reset cached scev information after interchange.
22528 (pass_linterchange::execute): Remove call to scev_reset_htab.
22530 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22532 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22533 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22534 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22535 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22536 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22537 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22538 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22539 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22540 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22541 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22542 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22543 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22544 (V_lane_reg): Likewise.
22545 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22547 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22548 (vfmal_lane_low<mode>_intrinsic,
22549 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22550 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22551 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22552 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22553 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22554 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22556 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22558 * config/arm/arm-cpus.in (fp16fml): New feature.
22559 (ALL_SIMD): Add fp16fml.
22560 (armv8.2-a): Add fp16fml as an option.
22561 (armv8.3-a): Likewise.
22562 (armv8.4-a): Add fp16fml as part of fp16.
22563 * config/arm/arm.h (TARGET_FP16FML): Define.
22564 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22566 * config/arm/arm-modes.def (V2HF): Define.
22567 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22568 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22569 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22570 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22571 vfmsl_low, vfmsl_high): New set of builtins.
22572 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22573 (vfml_op): New code attribute.
22574 (VFMLHALVES): New int iterator.
22575 (VFML, VFMLSEL): New mode attributes.
22576 (V_reg): Define mapping for V2HF.
22577 (V_hi, V_lo): New mode attributes.
22578 (VF_constraint): Likewise.
22579 (vfml_half, vfml_half_selector): New int attributes.
22580 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22582 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22583 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22585 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22586 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22587 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22588 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22590 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22591 Document new effective target and option set.
22593 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22595 * config/arm/arm-cpus.in (armv8_4): New feature.
22596 (ARMv8_4a): New fgroup.
22597 (armv8.4-a): New arch.
22598 * config/arm/arm-tables.opt: Regenerate.
22599 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22600 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22601 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22602 Add matching rules for -march=armv8.4-a and extensions.
22603 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22605 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22608 * config/rx/rx.md (BW): New mode attribute.
22609 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22611 2018-01-11 Richard Biener <rguenther@suse.de>
22613 PR tree-optimization/83435
22614 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22615 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22616 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22618 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22619 Alan Hayward <alan.hayward@arm.com>
22620 David Sherwood <david.sherwood@arm.com>
22622 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22624 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22625 (aarch64_print_address_internal): Use it to check for a zero offset.
22627 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22628 Alan Hayward <alan.hayward@arm.com>
22629 David Sherwood <david.sherwood@arm.com>
22631 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22632 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22633 Return a poly_int64 rather than a HOST_WIDE_INT.
22634 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22635 rather than a HOST_WIDE_INT.
22636 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22637 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22638 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22639 final_offset from HOST_WIDE_INT to poly_int64.
22640 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22641 to_constant when getting the number of units in an Advanced SIMD
22643 (aarch64_builtin_vectorized_function): Check for a constant number
22645 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22647 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22648 attribute instead of GET_MODE_NUNITS.
22649 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22650 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22651 GET_MODE_SIZE for fixed-size registers.
22652 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22653 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22654 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22655 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22656 (aarch64_print_operand, aarch64_print_address_internal)
22657 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22658 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22659 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22660 Handle polynomial GET_MODE_SIZE.
22661 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22662 wider than SImode without modification.
22663 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22664 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22665 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22666 passing and returning SVE modes.
22667 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22668 rather than GEN_INT.
22669 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22670 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22671 (aarch64_allocate_and_probe_stack_space): Likewise.
22672 (aarch64_layout_frame): Cope with polynomial offsets.
22673 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22674 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22675 polynomial offsets.
22676 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22677 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22678 poly_int64 rather than a HOST_WIDE_INT.
22679 (aarch64_get_separate_components, aarch64_process_components)
22680 (aarch64_expand_prologue, aarch64_expand_epilogue)
22681 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22682 (aarch64_anchor_offset): New function, split out from...
22683 (aarch64_legitimize_address): ...here.
22684 (aarch64_builtin_vectorization_cost): Handle polynomial
22685 TYPE_VECTOR_SUBPARTS.
22686 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22688 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22689 number of elements from the PARALLEL rather than the mode.
22690 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22691 rather than GET_MODE_BITSIZE.
22692 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22693 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22694 (aarch64_expand_vec_perm_const_1): Handle polynomial
22695 d->perm.length () and d->perm elements.
22696 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22697 Apply to_constant to d->perm elements.
22698 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22699 polynomial CONST_VECTOR_NUNITS.
22700 (aarch64_move_pointer): Take amount as a poly_int64 rather
22702 (aarch64_progress_pointer): Avoid temporary variable.
22703 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22704 the mode attribute instead of GET_MODE.
22706 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22707 Alan Hayward <alan.hayward@arm.com>
22708 David Sherwood <david.sherwood@arm.com>
22710 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22711 x exists before using it.
22712 (aarch64_add_constant_internal): Rename to...
22713 (aarch64_add_offset_1): ...this. Replace regnum with separate
22714 src and dest rtxes. Handle the case in which they're different,
22715 including when the offset is zero. Replace scratchreg with an rtx.
22716 Use 2 additions if there is no spare register into which we can
22717 move a 16-bit constant.
22718 (aarch64_add_constant): Delete.
22719 (aarch64_add_offset): Replace reg with separate src and dest
22720 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22721 Use aarch64_add_offset_1.
22722 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22723 an rtx rather than an int. Take the delta as a poly_int64
22724 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22725 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22726 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22727 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22728 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22729 and aarch64_add_sp.
22730 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22731 aarch64_add_constant.
22733 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22735 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22736 Use scalar_float_mode.
22738 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22740 * config/aarch64/aarch64-simd.md
22741 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22742 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22743 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22744 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22745 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22746 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22747 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22748 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22749 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22750 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22752 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22755 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22756 targ_options->x_arm_arch_string is non NULL.
22758 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22760 * config/aarch64/aarch64.h
22761 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22763 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22766 * expmed.c (emit_store_flag_force): Swap if const op0
22767 and change VOIDmode to mode of op0.
22769 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22771 PR rtl-optimization/83761
22772 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22773 than bytes to mode_for_size.
22775 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22777 PR middle-end/83189
22778 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22779 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22782 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22784 PR middle-end/83575
22785 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22786 when in layout mode.
22787 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22788 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22791 2018-01-10 Michael Collison <michael.collison@arm.com>
22793 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22794 * config/aarch64/aarch64-option-extension.def: Add
22795 AARCH64_OPT_EXTENSION of 'fp16fml'.
22796 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22797 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22798 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22799 * config/aarch64/constraints.md (Ui7): New constraint.
22800 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22801 (VFMLA_SEL_W): Ditto.
22804 (VFMLA16_LOW): New int iterator.
22805 (VFMLA16_HIGH): Ditto.
22806 (UNSPEC_FMLAL): New unspec.
22807 (UNSPEC_FMLSL): Ditto.
22808 (UNSPEC_FMLAL2): Ditto.
22809 (UNSPEC_FMLSL2): Ditto.
22810 (f16mac): New code attribute.
22811 * config/aarch64/aarch64-simd-builtins.def
22812 (aarch64_fmlal_lowv2sf): Ditto.
22813 (aarch64_fmlsl_lowv2sf): Ditto.
22814 (aarch64_fmlalq_lowv4sf): Ditto.
22815 (aarch64_fmlslq_lowv4sf): Ditto.
22816 (aarch64_fmlal_highv2sf): Ditto.
22817 (aarch64_fmlsl_highv2sf): Ditto.
22818 (aarch64_fmlalq_highv4sf): Ditto.
22819 (aarch64_fmlslq_highv4sf): Ditto.
22820 (aarch64_fmlal_lane_lowv2sf): Ditto.
22821 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22822 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22823 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22824 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22825 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22826 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22827 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22828 (aarch64_fmlal_lane_highv2sf): Ditto.
22829 (aarch64_fmlsl_lane_highv2sf): Ditto.
22830 (aarch64_fmlal_laneq_highv2sf): Ditto.
22831 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22832 (aarch64_fmlalq_lane_highv4sf): Ditto.
22833 (aarch64_fmlsl_lane_highv4sf): Ditto.
22834 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22835 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22836 * config/aarch64/aarch64-simd.md:
22837 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22838 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22839 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22840 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22841 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22842 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22843 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22844 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22845 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22846 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22847 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22848 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22849 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22850 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22851 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22852 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22853 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22854 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22855 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22856 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22857 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22858 (vfmlsl_low_u32): Ditto.
22859 (vfmlalq_low_u32): Ditto.
22860 (vfmlslq_low_u32): Ditto.
22861 (vfmlal_high_u32): Ditto.
22862 (vfmlsl_high_u32): Ditto.
22863 (vfmlalq_high_u32): Ditto.
22864 (vfmlslq_high_u32): Ditto.
22865 (vfmlal_lane_low_u32): Ditto.
22866 (vfmlsl_lane_low_u32): Ditto.
22867 (vfmlal_laneq_low_u32): Ditto.
22868 (vfmlsl_laneq_low_u32): Ditto.
22869 (vfmlalq_lane_low_u32): Ditto.
22870 (vfmlslq_lane_low_u32): Ditto.
22871 (vfmlalq_laneq_low_u32): Ditto.
22872 (vfmlslq_laneq_low_u32): Ditto.
22873 (vfmlal_lane_high_u32): Ditto.
22874 (vfmlsl_lane_high_u32): Ditto.
22875 (vfmlal_laneq_high_u32): Ditto.
22876 (vfmlsl_laneq_high_u32): Ditto.
22877 (vfmlalq_lane_high_u32): Ditto.
22878 (vfmlslq_lane_high_u32): Ditto.
22879 (vfmlalq_laneq_high_u32): Ditto.
22880 (vfmlslq_laneq_high_u32): Ditto.
22881 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22882 (AARCH64_FL_FOR_ARCH8_4): New.
22883 (AARCH64_ISA_F16FML): New ISA flag.
22884 (TARGET_F16FML): New feature flag for fp16fml.
22885 (doc/invoke.texi): Document new fp16fml option.
22887 2018-01-10 Michael Collison <michael.collison@arm.com>
22889 * config/aarch64/aarch64-builtins.c:
22890 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22891 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22892 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22893 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22894 (AARCH64_ISA_SHA3): New ISA flag.
22895 (TARGET_SHA3): New feature flag for sha3.
22896 * config/aarch64/iterators.md (sha512_op): New int attribute.
22897 (CRYPTO_SHA512): New int iterator.
22898 (UNSPEC_SHA512H): New unspec.
22899 (UNSPEC_SHA512H2): Ditto.
22900 (UNSPEC_SHA512SU0): Ditto.
22901 (UNSPEC_SHA512SU1): Ditto.
22902 * config/aarch64/aarch64-simd-builtins.def
22903 (aarch64_crypto_sha512hqv2di): New builtin.
22904 (aarch64_crypto_sha512h2qv2di): Ditto.
22905 (aarch64_crypto_sha512su0qv2di): Ditto.
22906 (aarch64_crypto_sha512su1qv2di): Ditto.
22907 (aarch64_eor3qv8hi): Ditto.
22908 (aarch64_rax1qv2di): Ditto.
22909 (aarch64_xarqv2di): Ditto.
22910 (aarch64_bcaxqv8hi): Ditto.
22911 * config/aarch64/aarch64-simd.md:
22912 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22913 (aarch64_crypto_sha512su0qv2di): Ditto.
22914 (aarch64_crypto_sha512su1qv2di): Ditto.
22915 (aarch64_eor3qv8hi): Ditto.
22916 (aarch64_rax1qv2di): Ditto.
22917 (aarch64_xarqv2di): Ditto.
22918 (aarch64_bcaxqv8hi): Ditto.
22919 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22920 (vsha512h2q_u64): Ditto.
22921 (vsha512su0q_u64): Ditto.
22922 (vsha512su1q_u64): Ditto.
22923 (veor3q_u16): Ditto.
22924 (vrax1q_u64): Ditto.
22925 (vxarq_u64): Ditto.
22926 (vbcaxq_u16): Ditto.
22927 * config/arm/types.md (crypto_sha512): New type attribute.
22928 (crypto_sha3): Ditto.
22929 (doc/invoke.texi): Document new sha3 option.
22931 2018-01-10 Michael Collison <michael.collison@arm.com>
22933 * config/aarch64/aarch64-builtins.c:
22934 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22935 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22936 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22937 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22938 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22939 (AARCH64_ISA_SM4): New ISA flag.
22940 (TARGET_SM4): New feature flag for sm4.
22941 * config/aarch64/aarch64-simd-builtins.def
22942 (aarch64_sm3ss1qv4si): Ditto.
22943 (aarch64_sm3tt1aq4si): Ditto.
22944 (aarch64_sm3tt1bq4si): Ditto.
22945 (aarch64_sm3tt2aq4si): Ditto.
22946 (aarch64_sm3tt2bq4si): Ditto.
22947 (aarch64_sm3partw1qv4si): Ditto.
22948 (aarch64_sm3partw2qv4si): Ditto.
22949 (aarch64_sm4eqv4si): Ditto.
22950 (aarch64_sm4ekeyqv4si): Ditto.
22951 * config/aarch64/aarch64-simd.md:
22952 (aarch64_sm3ss1qv4si): Ditto.
22953 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22954 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22955 (aarch64_sm4eqv4si): Ditto.
22956 (aarch64_sm4ekeyqv4si): Ditto.
22957 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22958 (sm3part_op): Ditto.
22959 (CRYPTO_SM3TT): Ditto.
22960 (CRYPTO_SM3PART): Ditto.
22961 (UNSPEC_SM3SS1): New unspec.
22962 (UNSPEC_SM3TT1A): Ditto.
22963 (UNSPEC_SM3TT1B): Ditto.
22964 (UNSPEC_SM3TT2A): Ditto.
22965 (UNSPEC_SM3TT2B): Ditto.
22966 (UNSPEC_SM3PARTW1): Ditto.
22967 (UNSPEC_SM3PARTW2): Ditto.
22968 (UNSPEC_SM4E): Ditto.
22969 (UNSPEC_SM4EKEY): Ditto.
22970 * config/aarch64/constraints.md (Ui2): New constraint.
22971 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22972 * config/arm/types.md (crypto_sm3): New type attribute.
22973 (crypto_sm4): Ditto.
22974 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22975 (vsm3tt1aq_u32): Ditto.
22976 (vsm3tt1bq_u32): Ditto.
22977 (vsm3tt2aq_u32): Ditto.
22978 (vsm3tt2bq_u32): Ditto.
22979 (vsm3partw1q_u32): Ditto.
22980 (vsm3partw2q_u32): Ditto.
22981 (vsm4eq_u32): Ditto.
22982 (vsm4ekeyq_u32): Ditto.
22983 (doc/invoke.texi): Document new sm4 option.
22985 2018-01-10 Michael Collison <michael.collison@arm.com>
22987 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22988 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22989 (AARCH64_FL_FOR_ARCH8_4): New.
22990 (AARCH64_FL_V8_4): New flag.
22991 (doc/invoke.texi): Document new armv8.4-a option.
22993 2018-01-10 Michael Collison <michael.collison@arm.com>
22995 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22996 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22997 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22998 * config/aarch64/aarch64-option-extension.def: Add
22999 AARCH64_OPT_EXTENSION of 'sha2'.
23000 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23001 (crypto): Disable sha2 and aes if crypto disabled.
23002 (crypto): Enable aes and sha2 if enabled.
23003 (simd): Disable sha2 and aes if simd disabled.
23004 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23006 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23007 (TARGET_SHA2): New feature flag for sha2.
23008 (TARGET_AES): New feature flag for aes.
23009 * config/aarch64/aarch64-simd.md:
23010 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23011 conditional on TARGET_AES.
23012 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23013 (aarch64_crypto_sha1hsi): Make pattern conditional
23015 (aarch64_crypto_sha1hv4si): Ditto.
23016 (aarch64_be_crypto_sha1hv4si): Ditto.
23017 (aarch64_crypto_sha1su1v4si): Ditto.
23018 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23019 (aarch64_crypto_sha1su0v4si): Ditto.
23020 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23021 (aarch64_crypto_sha256su0v4si): Ditto.
23022 (aarch64_crypto_sha256su1v4si): Ditto.
23023 (doc/invoke.texi): Document new aes and sha2 options.
23025 2018-01-10 Martin Sebor <msebor@redhat.com>
23027 PR tree-optimization/83781
23028 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23031 2018-01-11 Martin Sebor <msebor@gmail.com>
23032 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23034 PR tree-optimization/83501
23035 PR tree-optimization/81703
23037 * tree-ssa-strlen.c (get_string_cst): Rename...
23038 (get_string_len): ...to this. Handle global constants.
23039 (handle_char_store): Adjust.
23041 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23042 Jim Wilson <jimw@sifive.com>
23044 * config/riscv/riscv-protos.h (riscv_output_return): New.
23045 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23046 (riscv_attribute_table, riscv_output_return),
23047 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23048 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23049 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23051 (riscv_expand_prologue): Add early return for naked function.
23052 (riscv_expand_epilogue): Likewise.
23053 (riscv_function_ok_for_sibcall): Return false for naked function.
23054 (riscv_set_current_function): New.
23055 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23056 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23057 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23058 * doc/extend.texi (RISC-V Function Attributes): New.
23060 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23062 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23063 check for 128-bit long double before checking TCmode.
23064 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23065 128-bit long doubles before checking TFmode or TCmode.
23066 (FLOAT128_IBM_P): Likewise.
23068 2018-01-10 Martin Sebor <msebor@redhat.com>
23070 PR tree-optimization/83671
23071 * builtins.c (c_strlen): Unconditionally return zero for the empty
23073 Use -Warray-bounds for warnings.
23074 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23075 for non-constant array indices with COMPONENT_REF, arrays of
23076 arrays, and pointers to arrays.
23077 (gimple_fold_builtin_strlen): Determine and set length range for
23078 non-constant character arrays.
23080 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23082 PR middle-end/81897
23083 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23086 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23088 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23090 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23093 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23094 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23095 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23096 indexed_or_indirect_operand predicate.
23097 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23098 (*vsx_le_perm_load_v8hi): Likewise.
23099 (*vsx_le_perm_load_v16qi): Likewise.
23100 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23101 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23102 (*vsx_le_perm_store_v8hi): Likewise.
23103 (*vsx_le_perm_store_v16qi): Likewise.
23104 (eight unnamed splitters): Likewise.
23106 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23108 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23109 * config/rs6000/emmintrin.h: Likewise.
23110 * config/rs6000/mmintrin.h: Likewise.
23111 * config/rs6000/xmmintrin.h: Likewise.
23113 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23116 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23118 * tree.c (tree_nop_conversion): Return true for location wrapper
23120 (maybe_wrap_with_location): New function.
23121 (selftest::check_strip_nops): New function.
23122 (selftest::test_location_wrappers): New function.
23123 (selftest::tree_c_tests): Call it.
23124 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23125 (maybe_wrap_with_location): New decl.
23126 (EXPR_LOCATION_WRAPPER_P): New macro.
23127 (location_wrapper_p): New inline function.
23128 (tree_strip_any_location_wrapper): New inline function.
23130 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23133 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23134 stack_realign_offset for the largest alignment of stack slot
23136 (ix86_find_max_used_stack_alignment): New function.
23137 (ix86_finalize_stack_frame_flags): Use it. Set
23138 max_used_stack_alignment if we don't realign stack.
23139 * config/i386/i386.h (machine_function): Add
23140 max_used_stack_alignment.
23142 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23144 * config/arm/arm.opt (-mbranch-cost): New option.
23145 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23148 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23151 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23152 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23154 2018-01-10 Richard Biener <rguenther@suse.de>
23157 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23158 early out so it also covers the case where we have a non-NULL
23161 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23163 PR tree-optimization/83753
23164 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23165 for non-strided grouped accesses if the number of elements is 1.
23167 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23170 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23171 * i386.h (TARGET_USE_GATHER): Define.
23172 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23174 2018-01-10 Martin Liska <mliska@suse.cz>
23177 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23178 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23180 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23181 CLEANUP_NO_PARTITIONING is not set.
23183 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23185 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23186 for vectors, as a partial revert of r254296.
23187 * rtl.h (const_vec_p): Delete.
23188 (const_vec_duplicate_p): Don't test for vector CONSTs.
23189 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23190 * expmed.c (make_tree): Likewise.
23193 * common.md (E, F): Use CONSTANT_P instead of checking for
23195 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23196 checking for CONST_VECTOR.
23198 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23200 PR middle-end/83575
23201 * predict.c (force_edge_cold): Handle in more sane way edges
23202 with no prediction.
23204 2018-01-09 Carl Love <cel@us.ibm.com>
23206 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23208 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23209 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23210 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23211 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23212 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23213 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23214 * config/rs6000/rs6000-protos.h: Add extern defition for
23215 rs6000_generate_float2_double_code.
23216 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23218 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23219 (float2_v2df): Add define_expand.
23221 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23224 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23225 op_mode in the force_to_mode call.
23227 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23229 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23230 instead of checking each element individually.
23231 (aarch64_evpc_uzp): Likewise.
23232 (aarch64_evpc_zip): Likewise.
23233 (aarch64_evpc_ext): Likewise.
23234 (aarch64_evpc_rev): Likewise.
23235 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23236 instead of checking each element individually. Return true without
23238 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23239 whether all selected elements come from the same input, instead of
23240 checking each element individually. Remove calls to gen_rtx_REG,
23241 start_sequence and end_sequence and instead assert that no rtl is
23244 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23246 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23247 order of HIGH and CONST checks.
23249 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23251 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23252 if the destination isn't an SSA_NAME.
23254 2018-01-09 Richard Biener <rguenther@suse.de>
23256 PR tree-optimization/83668
23257 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23259 (canonicalize_loop_form): ... here, renamed from ...
23260 (canonicalize_loop_closed_ssa_form): ... this and amended to
23261 swap successor edges for loop exit blocks to make us use
23262 the RPO order we need for initial schedule generation.
23264 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23266 PR tree-optimization/64811
23267 * match.pd: When optimizing comparisons with Inf, avoid
23268 introducing or losing exceptions from comparisons with NaN.
23270 2018-01-09 Martin Liska <mliska@suse.cz>
23273 * asan.c (shadow_mem_size): Add gcc_assert.
23275 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23277 Don't save registers in main().
23280 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23281 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23282 * config/avr/avr.c (avr_set_current_function): Don't error if
23283 naked, OS_task or OS_main are specified at the same time.
23284 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23286 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23288 * common/config/avr/avr-common.c (avr_option_optimization_table):
23289 Switch on -mmain-is-OS_task for optimizing compilations.
23291 2018-01-09 Richard Biener <rguenther@suse.de>
23293 PR tree-optimization/83572
23294 * graphite.c: Include cfganal.h.
23295 (graphite_transform_loops): Connect infinite loops to exit
23296 and remove fake edges at the end.
23298 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23300 * ipa-inline.c (edge_badness): Revert accidental checkin.
23302 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23305 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23306 symbols; not inline clones.
23308 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23311 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23312 hard registers. Formatting fixes.
23314 PR preprocessor/83722
23315 * gcc.c (try_generate_repro): Pass
23316 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23317 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23320 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23321 Kito Cheng <kito.cheng@gmail.com>
23323 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23324 (riscv_leaf_function_p): Delete.
23325 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23327 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23329 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23331 (do_ifelse): New function.
23332 (do_isel): New function.
23333 (do_sub3): New function.
23334 (do_add3): New function.
23335 (do_load_mask_compare): New function.
23336 (do_overlap_load_compare): New function.
23337 (expand_compare_loop): New function.
23338 (expand_block_compare): Call expand_compare_loop() when appropriate.
23339 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23340 option description.
23341 (-mblock-compare-inline-loop-limit): New option.
23343 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23346 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23347 Reverse order of second and third operands in first alternative.
23348 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23349 of first and second elements in UNSPEC_VPERMR vector.
23350 (altivec_expand_vec_perm_le): Likewise.
23352 2018-01-08 Jeff Law <law@redhat.com>
23354 PR rtl-optimizatin/81308
23355 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23356 (process_switch): If group_case_labels makes a change, then set
23358 (pass_convert_switch::execute): If a switch is converted, then
23359 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23361 PR rtl-optimization/81308
23362 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23365 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23367 PR target/83663 - Revert r255946
23368 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23369 generation for cases where splatting a value is not useful.
23370 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23371 across a vec_duplicate and a paradoxical subreg forming a vector
23372 mode to a vec_concat.
23374 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23376 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23377 -march=armv8.3-a variants.
23378 * config/arm/t-multilib: Likewise.
23379 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23381 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23383 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23385 (cceq_ior_compare_complement): Give it a name so I can use it, and
23386 change boolean_or_operator predicate to boolean_operator so it can
23387 be used to generate a crand.
23388 (eqne): New code iterator.
23389 (bd/bd_neg): New code_attrs.
23390 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23391 a single define_insn.
23392 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23393 decrement (bdnzt/bdnzf/bdzt/bdzf).
23394 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23395 with the new names of the branch decrement patterns, and added the
23396 names of the branch decrement conditional patterns.
23398 2018-01-08 Richard Biener <rguenther@suse.de>
23400 PR tree-optimization/83563
23401 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23404 2018-01-08 Richard Biener <rguenther@suse.de>
23406 PR middle-end/83713
23407 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23409 2018-01-08 Richard Biener <rguenther@suse.de>
23411 PR tree-optimization/83685
23412 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23413 references to abnormals.
23415 2018-01-08 Richard Biener <rguenther@suse.de>
23418 * dwarf2out.c (output_indirect_strings): Handle empty
23419 skeleton_debug_str_hash.
23420 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23422 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23424 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23425 (emit_store_direct): Likewise.
23426 (arc_trampoline_adjust_address): Likewise.
23427 (arc_asm_trampoline_template): New function.
23428 (arc_initialize_trampoline): Use asm_trampoline_template.
23429 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23430 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23431 * config/arc/arc.md (flush_icache): Delete pattern.
23433 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23435 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23436 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23439 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23442 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23443 by not USED_FOR_TARGET.
23444 (make_pass_resolve_sw_modes): Likewise.
23446 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23448 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23451 2018-01-08 Richard Biener <rguenther@suse.de>
23453 PR middle-end/83580
23454 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23456 2018-01-08 Richard Biener <rguenther@suse.de>
23458 PR middle-end/83517
23459 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23461 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23463 PR middle-end/81897
23464 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23465 basic blocks with a small number of successors.
23466 (convert_control_dep_chain_into_preds): Improve handling of
23468 (dump_predicates): Split apart into...
23469 (dump_pred_chain): ...here...
23470 (dump_pred_info): ...and here.
23471 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23472 (can_chain_union_be_invalidated_p): Improve check for invalidation
23474 (uninit_uses_cannot_happen): Avoid unnecessary if
23475 convert_control_dep_chain_into_preds yielded nothing.
23477 2018-01-06 Martin Sebor <msebor@redhat.com>
23479 PR tree-optimization/83640
23480 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23481 subtracting negative offset from size.
23482 (builtin_access::overlap): Adjust offset bounds of the access to fall
23483 within the size of the object if possible.
23485 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23487 PR rtl-optimization/83699
23488 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23489 extract_bit_field_as_subreg to cases in which the extracted
23490 value is also a vector.
23492 * lra-constraints.c (process_alt_operands): Test for the equivalence
23493 substitutions when detecting a possible reload cycle.
23495 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23498 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23499 by default if flag_selective_schedling{,2}. Formatting fixes.
23501 PR rtl-optimization/83682
23502 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23503 if it has non-VECTOR_MODE element mode.
23504 (vec_duplicate_p): Likewise.
23506 PR middle-end/83694
23507 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23508 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23510 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23513 * config/i386/i386-builtin.def
23514 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23515 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23516 Require also OPTION_MASK_ISA_AVX512F in addition to
23517 OPTION_MASK_ISA_GFNI.
23518 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23519 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23520 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23521 to OPTION_MASK_ISA_GFNI.
23522 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23523 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23524 OPTION_MASK_ISA_AVX512BW.
23525 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23526 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23527 addition to OPTION_MASK_ISA_GFNI.
23528 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23529 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23530 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23531 to OPTION_MASK_ISA_GFNI.
23532 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23533 a requirement for all ISAs rather than any of them with a few
23535 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23537 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23538 bitmasks to be enabled with 3 exceptions, instead of requiring any
23539 enabled ISA with lots of exceptions.
23540 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23541 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23542 Change avx512bw in isa attribute to avx512f.
23543 * config/i386/sgxintrin.h: Add license boilerplate.
23544 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23545 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23546 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23547 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23549 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23550 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23551 temporarily sse2 rather than sse if not enabled already.
23554 * config/i386/sse.md (VI248_VLBW): Rename to ...
23555 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23556 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23557 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23558 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23559 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23560 mode iterator instead of VI248_VLBW.
23562 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23564 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23565 (record_modified): Skip clobbers; add debug output.
23566 (param_change_prob): Use sreal frequencies.
23568 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23570 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23571 punt for user-aligned variables.
23573 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23575 * tree-chrec.c (chrec_contains_symbols): Return true for
23578 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23581 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23582 of (x|y) == x for BICS pattern.
23584 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23586 PR tree-optimization/83605
23587 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23588 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23591 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23593 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23594 * config/epiphany/rtems.h: New file.
23596 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23597 Uros Bizjak <ubizjak@gmail.com>
23600 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23601 QIreg_operand instead of register_operand predicate.
23602 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23603 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23604 comments instead of -fmitigate[-_]rop.
23606 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23609 * cgraphunit.c (symbol_table::compile): Switch to text_section
23610 before calling assembly_start debug hook.
23611 * run-rtl-passes.c (run_rtl_passes): Likewise.
23614 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23616 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23617 range_int_cst_p rather than !symbolic_range_p before calling
23618 extract_range_from_multiplicative_op_1.
23620 2018-01-04 Jeff Law <law@redhat.com>
23622 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23623 redundant test in assertion.
23625 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23627 * doc/rtl.texi: Document machine_mode wrapper classes.
23629 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23631 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23632 using tree_to_uhwi.
23634 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23636 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23637 the VEC_PERM_EXPR fold to fail.
23639 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23642 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23643 to switched_sections.
23645 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23648 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23649 test for d.testing.
23651 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23654 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23655 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23657 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23660 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23661 is BLKmode and bitpos not zero or mode change is needed.
23663 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23666 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23669 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23672 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23673 instead of MULT rtx. Update all corresponding splitters.
23674 (*saddl_se): Ditto.
23675 (*ssub<modesuffix>): Ditto.
23676 (*ssubl_se): Ditto.
23677 (*cmp_sadd_di): Update split patterns.
23678 (*cmp_sadd_si): Ditto.
23679 (*cmp_sadd_sidi): Ditto.
23680 (*cmp_ssub_di): Ditto.
23681 (*cmp_ssub_si): Ditto.
23682 (*cmp_ssub_sidi): Ditto.
23683 * config/alpha/predicates.md (const23_operand): New predicate.
23684 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23685 Look for ASHIFT, not MULT inner operand.
23686 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23688 2018-01-04 Martin Liska <mliska@suse.cz>
23690 PR gcov-profile/83669
23691 * gcov.c (output_intermediate_file): Add version to intermediate
23693 * doc/gcov.texi: Document new field 'version' in intermediate
23694 file format. Fix location of '-k' option of gcov command.
23696 2018-01-04 Martin Liska <mliska@suse.cz>
23699 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23701 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23703 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23705 2018-01-03 Martin Sebor <msebor@redhat.com>
23707 PR tree-optimization/83655
23708 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23709 checking calls with invalid arguments.
23711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23713 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23714 (vectorizable_mask_load_store): Delete.
23715 (vectorizable_call): Return false for masked loads and stores.
23716 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23717 instead of gimple_assign_rhs1.
23718 (vectorizable_load): Handle IFN_MASK_LOAD.
23719 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23723 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23725 (vectorizable_mask_load_store): ...here.
23726 (vectorizable_load): ...and here.
23728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23730 * tree-vect-stmts.c (vect_build_all_ones_mask)
23731 (vect_build_zero_merge_argument): New functions, split out from...
23732 (vectorizable_load): ...here.
23734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23736 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23738 (vectorizable_mask_load_store): ...here.
23739 (vectorizable_store): ...and here.
23741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23743 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23745 (vectorizable_mask_load_store): ...here.
23747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23749 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23750 (vect_model_store_cost): Take a vec_load_store_type instead of a
23752 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23753 (vect_model_store_cost): Take a vec_load_store_type instead of a
23755 (vectorizable_mask_load_store): Update accordingly.
23756 (vectorizable_store): Likewise.
23757 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23761 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23762 IFN_MASK_LOAD calls here rather than...
23763 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23766 Alan Hayward <alan.hayward@arm.com>
23767 David Sherwood <david.sherwood@arm.com>
23769 * expmed.c (extract_bit_field_1): For vector extracts,
23770 fall back to extract_bit_field_as_subreg if vec_extract
23773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23774 Alan Hayward <alan.hayward@arm.com>
23775 David Sherwood <david.sherwood@arm.com>
23777 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23778 they are variable or constant sized.
23779 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23780 slots for constant-sized data.
23782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23783 Alan Hayward <alan.hayward@arm.com>
23784 David Sherwood <david.sherwood@arm.com>
23786 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23787 handling COND_EXPRs with boolean comparisons, try to find a better
23788 basis for the mask type than the boolean itself.
23790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23792 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23793 is calculated and how it can be overridden.
23794 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23795 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23797 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23801 Alan Hayward <alan.hayward@arm.com>
23802 David Sherwood <david.sherwood@arm.com>
23804 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23805 Remove the mode argument.
23806 (aarch64_simd_valid_immediate): Remove the mode and inverse
23808 * config/aarch64/iterators.md (bitsize): New iterator.
23809 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23810 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23811 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23812 aarch64_simd_valid_immediate.
23813 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23814 (aarch64_reg_or_bic_imm): Likewise.
23815 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23816 with an insn_type enum and msl with a modifier_type enum.
23817 Replace element_width with a scalar_mode. Change the shift
23818 to unsigned int. Add constructors for scalar_float_mode and
23819 scalar_int_mode elements.
23820 (aarch64_vect_float_const_representable_p): Delete.
23821 (aarch64_can_const_movi_rtx_p)
23822 (aarch64_simd_scalar_immediate_valid_for_move)
23823 (aarch64_simd_make_constant): Update call to
23824 aarch64_simd_valid_immediate.
23825 (aarch64_advsimd_valid_immediate_hs): New function.
23826 (aarch64_advsimd_valid_immediate): Likewise.
23827 (aarch64_simd_valid_immediate): Remove mode and inverse
23828 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23829 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23830 and aarch64_float_const_representable_p on the result.
23831 (aarch64_output_simd_mov_immediate): Remove mode argument.
23832 Update call to aarch64_simd_valid_immediate and use of
23833 simd_immediate_info.
23834 (aarch64_output_scalar_simd_mov_immediate): Update call
23837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23838 Alan Hayward <alan.hayward@arm.com>
23839 David Sherwood <david.sherwood@arm.com>
23841 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23842 (mode_nunits): Likewise CONST_MODE_NUNITS.
23843 * machmode.def (ADJUST_NUNITS): Document.
23844 * genmodes.c (mode_data::need_nunits_adj): New field.
23845 (blank_mode): Update accordingly.
23846 (adj_nunits): New variable.
23847 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23849 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23850 listed in adj_nunits.
23851 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23852 listed in adj_nunits. Don't emit case statements for such modes.
23853 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23854 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23855 nothing if adj_nunits is nonnull.
23856 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23857 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23858 (emit_mode_fbit): Update use of print_maybe_const_decl.
23859 (emit_move_size): Likewise. Treat the array as non-const
23861 (emit_mode_adjustments): Handle adj_nunits.
23863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23865 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23866 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23867 (VECTOR_MODES): Use it.
23868 (make_vector_modes): Take the prefix as an argument.
23870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23871 Alan Hayward <alan.hayward@arm.com>
23872 David Sherwood <david.sherwood@arm.com>
23874 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23875 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23876 for MODE_VECTOR_BOOL.
23877 * machmode.def (VECTOR_BOOL_MODE): Document.
23878 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23879 (make_vector_bool_mode): New function.
23880 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23882 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23883 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23885 * stor-layout.c (int_mode_for_mode): Likewise.
23886 * tree.c (build_vector_type_for_mode): Likewise.
23887 * varasm.c (output_constant_pool_2): Likewise.
23888 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23889 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23890 for MODE_VECTOR_BOOL.
23891 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23892 of mode class checks.
23893 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23894 instead of a list of mode class checks.
23895 (expand_vector_scalar_condition): Likewise.
23896 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23899 Alan Hayward <alan.hayward@arm.com>
23900 David Sherwood <david.sherwood@arm.com>
23902 * machmode.h (mode_size): Change from unsigned short to
23904 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23905 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23906 or if measurement_type is not polynomial.
23907 (fixed_size_mode::includes_p): Check for constant-sized modes.
23908 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23909 return a poly_uint16 rather than an unsigned short.
23910 (emit_mode_size): Change the type of mode_size from unsigned short
23911 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23912 (emit_mode_adjustments): Cope with polynomial vector sizes.
23913 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23915 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23917 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23918 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23919 * caller-save.c (setup_save_areas): Likewise.
23920 (replace_reg_with_saved_mem): Likewise.
23921 * calls.c (emit_library_call_value_1): Likewise.
23922 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23923 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23924 (gen_lowpart_for_combine): Likewise.
23925 * convert.c (convert_to_integer_1): Likewise.
23926 * cse.c (equiv_constant, cse_insn): Likewise.
23927 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23928 (cselib_subst_to_values): Likewise.
23929 * dce.c (word_dce_process_block): Likewise.
23930 * df-problems.c (df_word_lr_mark_ref): Likewise.
23931 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23932 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23933 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23934 (rtl_for_decl_location): Likewise.
23935 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23936 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23937 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23938 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23939 (expand_expr_real_1): Likewise.
23940 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23941 (pad_below): Likewise.
23942 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23943 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23944 * ira.c (get_subreg_tracking_sizes): Likewise.
23945 * ira-build.c (ira_create_allocno_objects): Likewise.
23946 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23947 (ira_sort_regnos_for_alter_reg): Likewise.
23948 * ira-costs.c (record_operand_costs): Likewise.
23949 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23950 (resolve_simple_move): Likewise.
23951 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23952 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23953 (lra_constraints): Likewise.
23954 (CONST_POOL_OK_P): Reject variable-sized modes.
23955 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23956 (add_pseudo_to_slot, lra_spill): Likewise.
23957 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23958 * optabs-query.c (get_best_extraction_insn): Likewise.
23959 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23960 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23961 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23962 * recog.c (offsettable_address_addr_space_p): Likewise.
23963 * regcprop.c (maybe_mode_change): Likewise.
23964 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23965 * regrename.c (build_def_use): Likewise.
23966 * regstat.c (dump_reg_info): Likewise.
23967 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23968 (find_reloads, find_reloads_subreg_address): Likewise.
23969 * reload1.c (eliminate_regs_1): Likewise.
23970 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23971 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23972 (simplify_binary_operation_1, simplify_subreg): Likewise.
23973 * targhooks.c (default_function_arg_padding): Likewise.
23974 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23975 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23976 (verify_gimple_assign_ternary): Likewise.
23977 * tree-inline.c (estimate_move_cost): Likewise.
23978 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23979 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23980 (get_address_cost_ainc): Likewise.
23981 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23982 (vect_supportable_dr_alignment): Likewise.
23983 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23984 (vectorizable_reduction): Likewise.
23985 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23986 (vectorizable_operation, vectorizable_load): Likewise.
23987 * tree.c (build_same_sized_truth_vector_type): Likewise.
23988 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23989 * var-tracking.c (emit_note_insn_var_location): Likewise.
23990 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23991 (ADDR_VEC_ALIGN): Likewise.
23993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23994 Alan Hayward <alan.hayward@arm.com>
23995 David Sherwood <david.sherwood@arm.com>
23997 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23999 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24000 or if measurement_type is polynomial.
24001 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24002 * combine.c (make_extraction): Likewise.
24003 * dse.c (find_shift_sequence): Likewise.
24004 * dwarf2out.c (mem_loc_descriptor): Likewise.
24005 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24006 (extract_bit_field, extract_low_bits): Likewise.
24007 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24008 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24009 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24010 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24011 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24012 * reload.c (find_reloads): Likewise.
24013 * reload1.c (alter_reg): Likewise.
24014 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24015 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24016 * tree-if-conv.c (predicate_mem_writes): Likewise.
24017 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24018 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24019 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24020 * valtrack.c (dead_debug_insert_temp): Likewise.
24021 * varasm.c (mergeable_constant_section): Likewise.
24022 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24025 Alan Hayward <alan.hayward@arm.com>
24026 David Sherwood <david.sherwood@arm.com>
24028 * expr.c (expand_assignment): Cope with polynomial mode sizes
24029 when assigning to a CONCAT.
24031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24032 Alan Hayward <alan.hayward@arm.com>
24033 David Sherwood <david.sherwood@arm.com>
24035 * machmode.h (mode_precision): Change from unsigned short to
24037 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24039 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24040 or if measurement_type is not polynomial.
24041 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24042 in which the mode is already known to be a scalar_int_mode.
24043 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24044 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24046 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24047 for GET_MODE_PRECISION.
24048 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24049 for GET_MODE_PRECISION.
24050 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24052 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24053 (expand_field_assignment, make_extraction): Likewise.
24054 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24055 (get_last_value): Likewise.
24056 * convert.c (convert_to_integer_1): Likewise.
24057 * cse.c (cse_insn): Likewise.
24058 * expr.c (expand_expr_real_1): Likewise.
24059 * lra-constraints.c (simplify_operand_subreg): Likewise.
24060 * optabs-query.c (can_atomic_load_p): Likewise.
24061 * optabs.c (expand_atomic_load): Likewise.
24062 (expand_atomic_store): Likewise.
24063 * ree.c (combine_reaching_defs): Likewise.
24064 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24065 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24066 * tree.h (type_has_mode_precision_p): Likewise.
24067 * ubsan.c (instrument_si_overflow): Likewise.
24069 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24070 Alan Hayward <alan.hayward@arm.com>
24071 David Sherwood <david.sherwood@arm.com>
24073 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24074 polynomial numbers of units.
24075 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24076 (valid_vector_subparts_p): New function.
24077 (build_vector_type): Remove temporary shim and take the number
24078 of units as a poly_uint64 rather than an int.
24079 (build_opaque_vector_type): Take the number of units as a
24080 poly_uint64 rather than an int.
24081 * tree.c (build_vector_from_ctor): Handle polynomial
24082 TYPE_VECTOR_SUBPARTS.
24083 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24084 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24085 (build_vector_from_val): If the number of units is variable,
24086 use build_vec_duplicate_cst for constant operands and
24087 VEC_DUPLICATE_EXPR otherwise.
24088 (make_vector_type): Remove temporary is_constant ().
24089 (build_vector_type, build_opaque_vector_type): Take the number of
24090 units as a poly_uint64 rather than an int.
24091 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24093 * cfgexpand.c (expand_debug_expr): Likewise.
24094 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24095 (store_constructor, expand_expr_real_1): Likewise.
24096 (const_scalar_mask_from_tree): Likewise.
24097 * fold-const-call.c (fold_const_reduction): Likewise.
24098 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24099 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24100 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24101 (fold_relational_const): Likewise.
24102 (native_interpret_vector): Likewise. Change the size from an
24103 int to an unsigned int.
24104 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24105 TYPE_VECTOR_SUBPARTS.
24106 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24107 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24108 duplicating a non-constant operand into a variable-length vector.
24109 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24110 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24111 * ipa-icf.c (sem_variable::equals): Likewise.
24112 * match.pd: Likewise.
24113 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24114 * print-tree.c (print_node): Likewise.
24115 * stor-layout.c (layout_type): Likewise.
24116 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24117 * tree-cfg.c (verify_gimple_comparison): Likewise.
24118 (verify_gimple_assign_binary): Likewise.
24119 (verify_gimple_assign_ternary): Likewise.
24120 (verify_gimple_assign_single): Likewise.
24121 * tree-pretty-print.c (dump_generic_node): Likewise.
24122 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24123 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24124 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24125 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24126 (vect_shift_permute_load_chain): Likewise.
24127 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24128 (expand_vector_condition, optimize_vector_constructor): Likewise.
24129 (lower_vec_perm, get_compute_type): Likewise.
24130 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24131 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24132 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24133 (vect_recog_mask_conversion_pattern): Likewise.
24134 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24135 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24136 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24137 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24138 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24139 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24140 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24141 (supportable_widening_operation): Likewise.
24142 (supportable_narrowing_operation): Likewise.
24143 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24145 * varasm.c (output_constant): Likewise.
24147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24148 Alan Hayward <alan.hayward@arm.com>
24149 David Sherwood <david.sherwood@arm.com>
24151 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24152 so that both the length == 3 and length != 3 cases set up their
24153 own permute vectors. Add comments explaining why we know the
24154 number of elements is constant.
24155 (vect_permute_load_chain): Likewise.
24157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24158 Alan Hayward <alan.hayward@arm.com>
24159 David Sherwood <david.sherwood@arm.com>
24161 * machmode.h (mode_nunits): Change from unsigned char to
24163 (ONLY_FIXED_SIZE_MODES): New macro.
24164 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24165 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24166 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24168 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24169 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24170 or if measurement_type is not polynomial.
24171 * genmodes.c (ZERO_COEFFS): New macro.
24172 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24174 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24175 Use ZERO_COEFFS when emitting initializers.
24176 * data-streamer.h (bp_pack_poly_value): New function.
24177 (bp_unpack_poly_value): Likewise.
24178 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24179 for GET_MODE_NUNITS.
24180 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24181 for GET_MODE_NUNITS.
24182 * tree.c (make_vector_type): Remove temporary shim and make
24183 the real function take the number of units as a poly_uint64
24184 rather than an int.
24185 (build_vector_type_for_mode): Handle polynomial nunits.
24186 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24187 * emit-rtl.c (const_vec_series_p_1): Likewise.
24188 (gen_rtx_CONST_VECTOR): Likewise.
24189 * fold-const.c (test_vec_duplicate_folding): Likewise.
24190 * genrecog.c (validate_pattern): Likewise.
24191 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24192 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24193 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24194 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24195 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24196 * rtlanal.c (subreg_get_info): Likewise.
24197 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24198 (vect_grouped_load_supported): Likewise.
24199 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24200 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24201 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24202 (simplify_const_unary_operation, simplify_binary_operation_1)
24203 (simplify_const_binary_operation, simplify_ternary_operation)
24204 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24205 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24206 instead of CONST_VECTOR_NUNITS.
24207 * varasm.c (output_constant_pool_2): Likewise.
24208 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24209 explicit-encoded elements in the XVEC for variable-length vectors.
24211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24213 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24216 Alan Hayward <alan.hayward@arm.com>
24217 David Sherwood <david.sherwood@arm.com>
24219 * coretypes.h (fixed_size_mode): Declare.
24220 (fixed_size_mode_pod): New typedef.
24221 * builtins.h (target_builtins::x_apply_args_mode)
24222 (target_builtins::x_apply_result_mode): Change type to
24223 fixed_size_mode_pod.
24224 * builtins.c (apply_args_size, apply_result_size, result_vector)
24225 (expand_builtin_apply_args_1, expand_builtin_apply)
24226 (expand_builtin_return): Update accordingly.
24228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24230 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24231 * cselib.c (cselib_hash_rtx): Likewise.
24232 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24233 CONST_VECTOR encoding.
24235 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24236 Jeff Law <law@redhat.com>
24239 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24240 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24241 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24242 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24245 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24246 explicitly probe *sp in a noreturn function if there were any callee
24247 register saves or frame pointer is needed.
24249 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24252 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24253 BLKmode for ternary, binary or unary expressions.
24256 * var-tracking.c (delete_vta_debug_insn): New inline function.
24257 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24258 insns from get_insns () to NULL instead of each bb separately.
24259 Use delete_vta_debug_insn. No longer static.
24260 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24261 delete_vta_debug_insns callers.
24262 * rtl.h (delete_vta_debug_insns): Declare.
24263 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24264 instead of variable_tracking_main.
24266 2018-01-03 Martin Sebor <msebor@redhat.com>
24268 PR tree-optimization/83603
24269 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24270 arguments past the endof the argument list in functions declared
24271 without a prototype.
24272 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24273 Avoid checking when arguments are null.
24275 2018-01-03 Martin Sebor <msebor@redhat.com>
24278 * doc/extend.texi (attribute const): Fix a typo.
24279 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24280 issuing -Wsuggest-attribute for void functions.
24282 2018-01-03 Martin Sebor <msebor@redhat.com>
24284 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24285 offset_int::from instead of wide_int::to_shwi.
24286 (maybe_diag_overlap): Remove assertion.
24287 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24288 * gimple-ssa-sprintf.c (format_directive): Same.
24289 (parse_directive): Same.
24290 (sprintf_dom_walker::compute_format_length): Same.
24291 (try_substitute_return_value): Same.
24293 2018-01-03 Jeff Law <law@redhat.com>
24295 PR middle-end/83654
24296 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24297 non-constant residual for zero at runtime and avoid probing in
24298 that case. Reorganize code for trailing problem to mirror handling
24301 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24303 PR tree-optimization/83501
24304 * tree-ssa-strlen.c (get_string_cst): New.
24305 (handle_char_store): Call get_string_cst.
24307 2018-01-03 Martin Liska <mliska@suse.cz>
24309 PR tree-optimization/83593
24310 * tree-ssa-strlen.c: Include tree-cfg.h.
24311 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24312 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24313 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24315 (strlen_dom_walker::before_dom_children): Call
24316 gimple_purge_dead_eh_edges. Dump tranformation with details
24318 (strlen_dom_walker::before_dom_children): Update call by adding
24319 new argument cleanup_eh.
24320 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24322 2018-01-03 Martin Liska <mliska@suse.cz>
24325 * cif-code.def (VARIADIC_THUNK): New enum value.
24326 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24329 2018-01-03 Jan Beulich <jbeulich@suse.com>
24331 * sse.md (mov<mode>_internal): Tighten condition for when to use
24332 vmovdqu<ssescalarsize> for TI and OI modes.
24334 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24336 Update copyright years.
24338 2018-01-03 Martin Liska <mliska@suse.cz>
24341 * ipa-visibility.c (function_and_variable_visibility): Skip
24342 functions with noipa attribure.
24344 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24346 * gcc.c (process_command): Update copyright notice dates.
24347 * gcov-dump.c (print_version): Ditto.
24348 * gcov.c (print_version): Ditto.
24349 * gcov-tool.c (print_version): Ditto.
24350 * gengtype.c (create_file): Ditto.
24351 * doc/cpp.texi: Bump @copying's copyright year.
24352 * doc/cppinternals.texi: Ditto.
24353 * doc/gcc.texi: Ditto.
24354 * doc/gccint.texi: Ditto.
24355 * doc/gcov.texi: Ditto.
24356 * doc/install.texi: Ditto.
24357 * doc/invoke.texi: Ditto.
24359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24361 * vector-builder.h (vector_builder::m_full_nelts): Change from
24362 unsigned int to poly_uint64.
24363 (vector_builder::full_nelts): Update prototype accordingly.
24364 (vector_builder::new_vector): Likewise.
24365 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24366 (vector_builder::operator ==): Likewise.
24367 (vector_builder::finalize): Likewise.
24368 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24369 Take the number of elements as a poly_uint64 rather than an
24371 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24372 from unsigned int to poly_uint64.
24373 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24374 (vec_perm_indices::new_vector): Likewise.
24375 (vec_perm_indices::length): Likewise.
24376 (vec_perm_indices::nelts_per_input): Likewise.
24377 (vec_perm_indices::input_nelts): Likewise.
24378 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24379 number of elements per input as a poly_uint64 rather than an
24380 unsigned int. Use the original encoding for variable-length
24381 vectors, rather than clamping each individual element.
24382 For the second and subsequent elements in each pattern,
24383 clamp the step and base before clamping their sum.
24384 (vec_perm_indices::series_p): Handle polynomial element counts.
24385 (vec_perm_indices::all_in_range_p): Likewise.
24386 (vec_perm_indices_to_tree): Likewise.
24387 (vec_perm_indices_to_rtx): Likewise.
24388 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24389 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24390 (tree_vector_builder::new_binary_operation): Handle polynomial
24391 element counts. Return false if we need to know the number
24392 of elements at compile time.
24393 * fold-const.c (fold_vec_perm): Punt if the number of elements
24394 isn't known at compile time.
24396 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24398 * vec-perm-indices.h (vec_perm_builder): Change element type
24399 from HOST_WIDE_INT to poly_int64.
24400 (vec_perm_indices::element_type): Update accordingly.
24401 (vec_perm_indices::clamp): Handle polynomial element_types.
24402 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24403 (vec_perm_indices::all_in_range_p): Likewise.
24404 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24406 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24407 polynomial vec_perm_indices element types.
24408 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24409 * fold-const.c (fold_vec_perm): Likewise.
24410 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24411 * tree-vect-generic.c (lower_vec_perm): Likewise.
24412 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24413 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24414 element type to HOST_WIDE_INT.
24416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24417 Alan Hayward <alan.hayward@arm.com>
24418 David Sherwood <david.sherwood@arm.com>
24420 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24421 rather than an int. Use plus_constant.
24422 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24423 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24426 Alan Hayward <alan.hayward@arm.com>
24427 David Sherwood <david.sherwood@arm.com>
24429 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24430 a HOST_WIDE_INT to a poly_int64.
24432 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24433 Alan Hayward <alan.hayward@arm.com>
24434 David Sherwood <david.sherwood@arm.com>
24436 * calls.c (load_register_parameters): Cope with polynomial
24437 mode sizes. Require a constant size for BLKmode parameters
24438 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24439 forces a parameter to be padded at the lsb end in order to
24440 fill a complete number of words, require the parameter size
24441 to be ordered wrt UNITS_PER_WORD.
24443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24444 Alan Hayward <alan.hayward@arm.com>
24445 David Sherwood <david.sherwood@arm.com>
24447 * reload1.c (spill_stack_slot_width): Change element type
24448 from unsigned int to poly_uint64_pod.
24449 (alter_reg): Treat mode sizes as polynomial.
24451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24452 Alan Hayward <alan.hayward@arm.com>
24453 David Sherwood <david.sherwood@arm.com>
24455 * reload.c (complex_word_subreg_p): New function.
24456 (reload_inner_reg_of_subreg, push_reload): Use it.
24458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24459 Alan Hayward <alan.hayward@arm.com>
24460 David Sherwood <david.sherwood@arm.com>
24462 * lra-constraints.c (process_alt_operands): Reject matched
24463 operands whose sizes aren't ordered.
24464 (match_reload): Refer to this check here.
24466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24467 Alan Hayward <alan.hayward@arm.com>
24468 David Sherwood <david.sherwood@arm.com>
24470 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24471 that the mode size is in the set {1, 2, 4, 8, 16}.
24473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24474 Alan Hayward <alan.hayward@arm.com>
24475 David Sherwood <david.sherwood@arm.com>
24477 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24478 Use plus_constant instead of gen_rtx_PLUS.
24480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24481 Alan Hayward <alan.hayward@arm.com>
24482 David Sherwood <david.sherwood@arm.com>
24484 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24485 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24486 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24487 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24488 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24489 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24490 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24491 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24492 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24493 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24495 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24496 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24497 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24498 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24499 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24500 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24501 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24502 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24503 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24504 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24506 * expr.c (emit_move_resolve_push): Treat the input and result
24507 of PUSH_ROUNDING as a poly_int64.
24508 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24509 (emit_push_insn): Likewise.
24510 * lra-eliminations.c (mark_not_eliminable): Likewise.
24511 * recog.c (push_operand): Likewise.
24512 * reload1.c (elimination_effects): Likewise.
24513 * rtlanal.c (nonzero_bits1): Likewise.
24514 * calls.c (store_one_arg): Likewise. Require the padding to be
24515 known at compile time.
24517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24518 Alan Hayward <alan.hayward@arm.com>
24519 David Sherwood <david.sherwood@arm.com>
24521 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24522 Use plus_constant instead of gen_rtx_PLUS.
24524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24525 Alan Hayward <alan.hayward@arm.com>
24526 David Sherwood <david.sherwood@arm.com>
24528 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24529 rather than an int.
24531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24532 Alan Hayward <alan.hayward@arm.com>
24533 David Sherwood <david.sherwood@arm.com>
24535 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24536 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24537 via stack temporaries. Treat the mode size as polynomial too.
24539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24540 Alan Hayward <alan.hayward@arm.com>
24541 David Sherwood <david.sherwood@arm.com>
24543 * expr.c (expand_expr_real_2): When handling conversions involving
24544 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24545 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24546 as a poly_uint64 too.
24548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24549 Alan Hayward <alan.hayward@arm.com>
24550 David Sherwood <david.sherwood@arm.com>
24552 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24555 Alan Hayward <alan.hayward@arm.com>
24556 David Sherwood <david.sherwood@arm.com>
24558 * combine.c (can_change_dest_mode): Handle polynomial
24559 REGMODE_NATURAL_SIZE.
24560 * expmed.c (store_bit_field_1): Likewise.
24561 * expr.c (store_constructor): Likewise.
24562 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24563 and polynomial REGMODE_NATURAL_SIZE.
24564 (gen_lowpart_common): Likewise.
24565 * reginfo.c (record_subregs_of_mode): Likewise.
24566 * rtlanal.c (read_modify_subreg_p): Likewise.
24568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24569 Alan Hayward <alan.hayward@arm.com>
24570 David Sherwood <david.sherwood@arm.com>
24572 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24573 numbers of elements.
24575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24576 Alan Hayward <alan.hayward@arm.com>
24577 David Sherwood <david.sherwood@arm.com>
24579 * match.pd: Cope with polynomial numbers of vector elements.
24581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24582 Alan Hayward <alan.hayward@arm.com>
24583 David Sherwood <david.sherwood@arm.com>
24585 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24586 in a POINTER_PLUS_EXPR.
24588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24589 Alan Hayward <alan.hayward@arm.com>
24590 David Sherwood <david.sherwood@arm.com>
24592 * omp-simd-clone.c (simd_clone_subparts): New function.
24593 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24594 (ipa_simd_modify_function_body): Likewise.
24596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24597 Alan Hayward <alan.hayward@arm.com>
24598 David Sherwood <david.sherwood@arm.com>
24600 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24601 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24602 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24603 (expand_vector_condition, vector_element): Likewise.
24604 (subparts_gt): New function.
24605 (get_compute_type): Use subparts_gt.
24606 (count_type_subparts): Delete.
24607 (expand_vector_operations_1): Use subparts_gt instead of
24608 count_type_subparts.
24610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24611 Alan Hayward <alan.hayward@arm.com>
24612 David Sherwood <david.sherwood@arm.com>
24614 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24615 (vect_compile_time_alias): ...this new function. Do the calculation
24616 on poly_ints rather than trees.
24617 (vect_prune_runtime_alias_test_list): Update call accordingly.
24619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24620 Alan Hayward <alan.hayward@arm.com>
24621 David Sherwood <david.sherwood@arm.com>
24623 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24625 (vect_schedule_slp_instance): Likewise.
24627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24628 Alan Hayward <alan.hayward@arm.com>
24629 David Sherwood <david.sherwood@arm.com>
24631 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24632 constant and extern definitions for variable-length vectors.
24633 (vect_get_constant_vectors): Note that the number of units
24634 is known to be constant.
24636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24637 Alan Hayward <alan.hayward@arm.com>
24638 David Sherwood <david.sherwood@arm.com>
24640 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24641 of units as polynomial. Choose between WIDE and NARROW based
24644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24645 Alan Hayward <alan.hayward@arm.com>
24646 David Sherwood <david.sherwood@arm.com>
24648 * tree-vect-stmts.c (simd_clone_subparts): New function.
24649 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24652 Alan Hayward <alan.hayward@arm.com>
24653 David Sherwood <david.sherwood@arm.com>
24655 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24656 vectors as polynomial. Use build_index_vector for
24657 IFN_GOMP_SIMD_LANE.
24659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24660 Alan Hayward <alan.hayward@arm.com>
24661 David Sherwood <david.sherwood@arm.com>
24663 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24664 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24665 for variable-length vectors.
24666 (vectorizable_mask_load_store): Treat the number of units as
24667 polynomial, asserting that it is constant if the condition has
24668 already been enforced.
24669 (vectorizable_store, vectorizable_load): Likewise.
24671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24672 Alan Hayward <alan.hayward@arm.com>
24673 David Sherwood <david.sherwood@arm.com>
24675 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24676 of units as polynomial. Punt if we can't tell at compile time
24677 which vector contains the final result.
24679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24680 Alan Hayward <alan.hayward@arm.com>
24681 David Sherwood <david.sherwood@arm.com>
24683 * tree-vect-loop.c (vectorizable_induction): Treat the number
24684 of units as polynomial. Punt on SLP inductions. Use an integer
24685 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24686 cast of such a series for variable-length floating-point
24689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24690 Alan Hayward <alan.hayward@arm.com>
24691 David Sherwood <david.sherwood@arm.com>
24693 * tree.h (build_index_vector): Declare.
24694 * tree.c (build_index_vector): New function.
24695 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24696 of units as polynomial, forcibly converting it to a constant if
24697 vectorizable_reduction has already enforced the condition.
24698 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24699 to create a {1,2,3,...} vector.
24700 (vectorizable_reduction): Treat the number of units as polynomial.
24701 Choose vectype_in based on the largest scalar element size rather
24702 than the smallest number of units. Enforce the restrictions
24705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24706 Alan Hayward <alan.hayward@arm.com>
24707 David Sherwood <david.sherwood@arm.com>
24709 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24710 number of units as polynomial.
24712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24713 Alan Hayward <alan.hayward@arm.com>
24714 David Sherwood <david.sherwood@arm.com>
24716 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24717 * target.def (autovectorize_vector_sizes): Return the vector sizes
24718 by pointer, using vector_sizes rather than a bitmask.
24719 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24720 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24721 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24723 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24724 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24725 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24726 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24727 * omp-general.c (omp_max_vf): Likewise.
24728 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24729 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24730 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24731 * tree-vect-slp.c (vect_slp_bb): Likewise.
24732 * doc/tm.texi: Regenerate.
24733 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24735 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24736 the vector size as a poly_uint64 rather than an unsigned int.
24737 (current_vector_size): Change from an unsigned int to a poly_uint64.
24738 (get_vectype_for_scalar_type): Update accordingly.
24739 * tree.h (build_truth_vector_type): Take the size and number of
24740 units as a poly_uint64 rather than an unsigned int.
24741 (build_vector_type): Add a temporary overload that takes
24742 the number of units as a poly_uint64 rather than an unsigned int.
24743 * tree.c (make_vector_type): Likewise.
24744 (build_truth_vector_type): Take the number of units as a poly_uint64
24745 rather than an unsigned int.
24747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24748 Alan Hayward <alan.hayward@arm.com>
24749 David Sherwood <david.sherwood@arm.com>
24751 * target.def (get_mask_mode): Take the number of units and length
24752 as poly_uint64s rather than unsigned ints.
24753 * targhooks.h (default_get_mask_mode): Update accordingly.
24754 * targhooks.c (default_get_mask_mode): Likewise.
24755 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24756 * doc/tm.texi: Regenerate.
24758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24759 Alan Hayward <alan.hayward@arm.com>
24760 David Sherwood <david.sherwood@arm.com>
24762 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24763 * omp-general.c (omp_max_vf): Likewise.
24764 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24765 (expand_omp_simd): Handle polynomial safelen.
24766 * omp-low.c (omplow_simd_context): Add a default constructor.
24767 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24768 (lower_rec_simd_input_clauses): Update accordingly.
24769 (lower_rec_input_clauses): Likewise.
24771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24772 Alan Hayward <alan.hayward@arm.com>
24773 David Sherwood <david.sherwood@arm.com>
24775 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24776 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24777 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24778 (vect_analyze_slp_cost): Likewise.
24779 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24780 (vect_model_load_cost): Likewise.
24782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24783 Alan Hayward <alan.hayward@arm.com>
24784 David Sherwood <david.sherwood@arm.com>
24786 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24787 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24788 from an unsigned int * to a poly_uint64_pod *.
24789 (calculate_unrolling_factor): New function.
24790 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24793 Alan Hayward <alan.hayward@arm.com>
24794 David Sherwood <david.sherwood@arm.com>
24796 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24797 from an unsigned int to a poly_uint64.
24798 (_loop_vec_info::slp_unrolling_factor): Likewise.
24799 (_loop_vec_info::vectorization_factor): Change from an int
24801 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24802 (vect_get_num_vectors): New function.
24803 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24804 (vect_get_num_copies): Use vect_get_num_vectors.
24805 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24806 to an unsigned int *.
24807 (vect_analyze_data_refs): Change min_vf from an int * to a
24809 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24810 than an unsigned HOST_WIDE_INT.
24811 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24812 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24813 to an unsigned int *.
24814 (vect_analyze_data_ref_dependences): Likewise.
24815 (vect_compute_data_ref_alignment): Handle polynomial vf.
24816 (vect_enhance_data_refs_alignment): Likewise.
24817 (vect_prune_runtime_alias_test_list): Likewise.
24818 (vect_shift_permute_load_chain): Likewise.
24819 (vect_supportable_dr_alignment): Likewise.
24820 (dependence_distance_ge_vf): Take the vectorization factor as a
24821 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24822 (vect_analyze_data_refs): Change min_vf from an int * to a
24824 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24825 vfm1 as a poly_uint64 rather than an int. Make the same change
24826 for the returned bound_scalar.
24827 (vect_gen_vector_loop_niters): Handle polynomial vf.
24828 (vect_do_peeling): Likewise. Update call to
24829 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24830 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24832 * tree-vect-loop.c (vect_determine_vectorization_factor)
24833 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24834 (vect_get_known_peeling_cost): Likewise.
24835 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24836 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24837 (vect_transform_loop): Likewise. Use the lowest possible VF when
24838 updating the upper bounds of the loop.
24839 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24840 rather than an int.
24841 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24842 polynomial unroll factors.
24843 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24844 (vect_make_slp_decision): Likewise.
24845 (vect_supported_load_permutation_p): Likewise, and polynomial
24847 (vect_analyze_slp_cost): Handle polynomial vf.
24848 (vect_slp_analyze_node_operations): Likewise.
24849 (vect_slp_analyze_bb_1): Likewise.
24850 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24851 than an unsigned HOST_WIDE_INT.
24852 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24853 (vectorizable_load): Handle polynomial vf.
24854 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24856 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24859 Alan Hayward <alan.hayward@arm.com>
24860 David Sherwood <david.sherwood@arm.com>
24862 * match.pd: Handle bit operations involving three constants
24863 and try to fold one pair.
24865 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24867 * tree-vect-loop-manip.c: Include gimple-fold.h.
24868 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24869 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24870 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24871 Add a path that uses a step of VF instead of 1, but disable it
24873 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24874 and niters_no_overflow parameters. Update calls to
24875 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24876 Create a new SSA name if the latter choses to use a ste other
24877 than zero, and return it via niters_vector_mult_vf_var.
24878 * tree-vect-loop.c (vect_transform_loop): Update calls to
24879 vect_do_peeling, vect_gen_vector_loop_niters and
24880 slpeel_make_loop_iterate_ntimes.
24881 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24882 (vect_gen_vector_loop_niters): Update declarations after above changes.
24884 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24886 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24887 128-bit round to integer instructions.
24888 (ceil<mode>2): Likewise.
24889 (btrunc<mode>2): Likewise.
24890 (round<mode>2): Likewise.
24892 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24894 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24895 unaligned VSX load/store on P8/P9.
24896 (expand_block_clear): Allow the use of unaligned VSX
24897 load/store on P8/P9.
24899 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24901 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24903 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24904 swap associated with both a load and a store.
24906 2018-01-02 Andrew Waterman <andrew@sifive.com>
24908 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24909 * config/riscv/riscv.md (clear_cache): Use it.
24911 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24913 * web.c: Remove out-of-date comment.
24915 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24917 * expr.c (fixup_args_size_notes): Check that any existing
24918 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24919 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24920 (emit_single_push_insn): ...here.
24922 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24924 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24925 (const_vector_encoded_nelts): New function.
24926 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24927 (const_vector_int_elt, const_vector_elt): Declare.
24928 * emit-rtl.c (const_vector_int_elt_1): New function.
24929 (const_vector_elt): Likewise.
24930 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24931 of CONST_VECTOR_ELT.
24933 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24935 * expr.c: Include rtx-vector-builder.h.
24936 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24937 directly on the tree encoding.
24938 (const_vector_from_tree): Likewise.
24939 * optabs.c: Include rtx-vector-builder.h.
24940 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24941 sequence of "u" values.
24942 * vec-perm-indices.c: Include rtx-vector-builder.h.
24943 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24944 directly on the vec_perm_indices encoding.
24946 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24948 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24949 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24950 * rtx-vector-builder.h: New file.
24951 * rtx-vector-builder.c: Likewise.
24952 * rtl.h (rtx_def::u2): Add a const_vector field.
24953 (CONST_VECTOR_NPATTERNS): New macro.
24954 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24955 (CONST_VECTOR_DUPLICATE_P): Likewise.
24956 (CONST_VECTOR_STEPPED_P): Likewise.
24957 (CONST_VECTOR_ENCODED_ELT): Likewise.
24958 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24959 (unwrap_const_vec_duplicate): Likewise.
24960 (const_vec_series_p): Check for a non-duplicated vector encoding.
24961 Say that the function only returns true for integer vectors.
24962 * emit-rtl.c: Include rtx-vector-builder.h.
24963 (gen_const_vec_duplicate_1): Delete.
24964 (gen_const_vector): Call gen_const_vec_duplicate instead of
24965 gen_const_vec_duplicate_1.
24966 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24967 (gen_const_vec_duplicate): Use rtx_vector_builder.
24968 (gen_const_vec_series): Likewise.
24969 (gen_rtx_CONST_VECTOR): Likewise.
24970 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24971 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24972 Build a new vector rather than modifying a CONST_VECTOR in-place.
24973 (handle_special_swappables): Update call accordingly.
24974 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24975 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24976 Build a new vector rather than modifying a CONST_VECTOR in-place.
24977 (handle_special_swappables): Update call accordingly.
24979 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24981 * simplify-rtx.c (simplify_const_binary_operation): Use
24982 CONST_VECTOR_ELT instead of XVECEXP.
24984 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24986 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24987 the selector elements to be different from the data elements
24988 if the selector is a VECTOR_CST.
24989 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24990 ssizetype for the selector.
24992 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24994 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24995 before testing each element individually.
24996 * tree-vect-generic.c (lower_vec_perm): Likewise.
24998 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25000 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25001 * selftest-run-tests.c (selftest::run_tests): Call it.
25002 * vector-builder.h (vector_builder::operator ==): New function.
25003 (vector_builder::operator !=): Likewise.
25004 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25005 (vec_perm_indices::all_from_input_p): New function.
25006 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25007 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25008 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25009 instead of reading the VECTOR_CST directly. Detect whether both
25010 vector inputs are the same before constructing the vec_perm_indices,
25011 and update the number of inputs argument accordingly. Use the
25012 utility functions added above. Only construct sel2 if we need to.
25014 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25016 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25017 the broadcast of the low byte.
25018 (expand_mult_highpart): Use an explicit encoding for the permutes.
25019 * optabs-query.c (can_mult_highpart_p): Likewise.
25020 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25021 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25022 (vectorizable_bswap): Likewise.
25023 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25024 explicit encoding for the power-of-2 permutes.
25025 (vect_permute_store_chain): Likewise.
25026 (vect_grouped_load_supported): Likewise.
25027 (vect_permute_load_chain): Likewise.
25029 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25031 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25032 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25033 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25034 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25035 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25036 (vect_gen_perm_mask_any): Likewise.
25038 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25040 * int-vector-builder.h: New file.
25041 * vec-perm-indices.h: Include int-vector-builder.h.
25042 (vec_perm_indices): Redefine as an int_vector_builder.
25043 (auto_vec_perm_indices): Delete.
25044 (vec_perm_builder): Redefine as a stand-alone class.
25045 (vec_perm_indices::vec_perm_indices): New function.
25046 (vec_perm_indices::clamp): Likewise.
25047 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25048 (vec_perm_indices::new_vector): New function.
25049 (vec_perm_indices::new_expanded_vector): Update for new
25050 vec_perm_indices class.
25051 (vec_perm_indices::rotate_inputs): New function.
25052 (vec_perm_indices::all_in_range_p): Operate directly on the
25053 encoded form, without computing elided elements.
25054 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25055 encoding. Update for new vec_perm_indices class.
25056 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25057 the given vec_perm_builder.
25058 (expand_vec_perm_var): Update vec_perm_builder constructor.
25059 (expand_mult_highpart): Use vec_perm_builder instead of
25060 auto_vec_perm_indices.
25061 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25062 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25063 or double series encoding as appropriate.
25064 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25065 vec_perm_indices instead of auto_vec_perm_indices.
25066 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25067 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25068 (vect_permute_store_chain): Likewise.
25069 (vect_grouped_load_supported): Likewise.
25070 (vect_permute_load_chain): Likewise.
25071 (vect_shift_permute_load_chain): Likewise.
25072 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25073 (vect_transform_slp_perm_load): Likewise.
25074 (vect_schedule_slp_instance): Likewise.
25075 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25076 (vectorizable_mask_load_store): Likewise.
25077 (vectorizable_bswap): Likewise.
25078 (vectorizable_store): Likewise.
25079 (vectorizable_load): Likewise.
25080 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25081 vec_perm_indices instead of auto_vec_perm_indices. Use
25082 tree_to_vec_perm_builder to read the vector from a tree.
25083 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25084 vec_perm_builder instead of a vec_perm_indices.
25085 (have_whole_vector_shift): Use vec_perm_builder and
25086 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25087 truncation to calc_vec_perm_mask_for_shift.
25088 (vect_create_epilog_for_reduction): Likewise.
25089 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25090 from auto_vec_perm_indices to vec_perm_indices.
25091 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25092 instead of changing individual elements.
25093 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25094 the vector in d.perm.
25095 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25096 from auto_vec_perm_indices to vec_perm_indices.
25097 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25098 instead of changing individual elements.
25099 (arm_vectorize_vec_perm_const): Use new_vector to install
25100 the vector in d.perm.
25101 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25102 Update vec_perm_builder constructor.
25103 (rs6000_expand_interleave): Likewise.
25104 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25105 (rs6000_expand_interleave): Likewise.
25107 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25109 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25110 to qimode could truncate the indices.
25111 * optabs.c (expand_vec_perm_var): Likewise.
25113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25115 * Makefile.in (OBJS): Add vec-perm-indices.o.
25116 * vec-perm-indices.h: New file.
25117 * vec-perm-indices.c: Likewise.
25118 * target.h (vec_perm_indices): Replace with a forward class
25120 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25121 * optabs.h: Include vec-perm-indices.h.
25122 (expand_vec_perm): Delete.
25123 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25124 (expand_vec_perm_const): Declare.
25125 * target.def (vec_perm_const_ok): Replace with...
25126 (vec_perm_const): ...this new hook.
25127 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25128 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25129 * doc/tm.texi: Regenerate.
25130 * optabs.def (vec_perm_const): Delete.
25131 * doc/md.texi (vec_perm_const): Likewise.
25132 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25133 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25134 expand_vec_perm for constant permutation vectors. Assert that
25135 the mode of variable permutation vectors is the integer equivalent
25136 of the mode that is being permuted.
25137 * optabs-query.h (selector_fits_mode_p): Declare.
25138 * optabs-query.c: Include vec-perm-indices.h.
25139 (selector_fits_mode_p): New function.
25140 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25141 is defined, instead of checking whether the vec_perm_const_optab
25142 exists. Use targetm.vectorize.vec_perm_const instead of
25143 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25144 fit in the vector mode before using a variable permute.
25145 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25146 vec_perm_indices instead of an rtx.
25147 (expand_vec_perm): Replace with...
25148 (expand_vec_perm_const): ...this new function. Take the selector
25149 as a vec_perm_indices rather than an rtx. Also take the mode of
25150 the selector. Update call to shift_amt_for_vec_perm_mask.
25151 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25152 Use vec_perm_indices::new_expanded_vector to expand the original
25153 selector into bytes. Check whether the indices fit in the vector
25154 mode before using a variable permute.
25155 (expand_vec_perm_var): Make global.
25156 (expand_mult_highpart): Use expand_vec_perm_const.
25157 * fold-const.c: Includes vec-perm-indices.h.
25158 * tree-ssa-forwprop.c: Likewise.
25159 * tree-vect-data-refs.c: Likewise.
25160 * tree-vect-generic.c: Likewise.
25161 * tree-vect-loop.c: Likewise.
25162 * tree-vect-slp.c: Likewise.
25163 * tree-vect-stmts.c: Likewise.
25164 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25166 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25167 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25168 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25169 (aarch64_vectorize_vec_perm_const): ...this new function.
25170 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25171 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25172 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25173 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25174 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25175 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25176 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25178 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25179 check for NEON modes.
25180 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25181 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25182 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25183 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25185 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25186 the old VEC_PERM_CONST conditions.
25187 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25188 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25189 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25190 (ia64_vectorize_vec_perm_const_ok): Merge into...
25191 (ia64_vectorize_vec_perm_const): ...this new function.
25192 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25193 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25194 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25195 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25196 * config/mips/mips.c (mips_expand_vec_perm_const)
25197 (mips_vectorize_vec_perm_const_ok): Merge into...
25198 (mips_vectorize_vec_perm_const): ...this new function.
25199 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25200 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25201 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25202 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25203 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25204 (rs6000_expand_vec_perm_const): Delete.
25205 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25207 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25208 (altivec_expand_vec_perm_const_le): Take each operand individually.
25209 Operate on constant selectors rather than rtxes.
25210 (altivec_expand_vec_perm_const): Likewise. Update call to
25211 altivec_expand_vec_perm_const_le.
25212 (rs6000_expand_vec_perm_const): Delete.
25213 (rs6000_vectorize_vec_perm_const_ok): Delete.
25214 (rs6000_vectorize_vec_perm_const): New function.
25215 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25216 an element count and rtx array.
25217 (rs6000_expand_extract_even): Update call accordingly.
25218 (rs6000_expand_interleave): Likewise.
25219 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25220 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25221 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25222 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25223 (rs6000_expand_vec_perm_const): Delete.
25224 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25225 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25226 (altivec_expand_vec_perm_const_le): Take each operand individually.
25227 Operate on constant selectors rather than rtxes.
25228 (altivec_expand_vec_perm_const): Likewise. Update call to
25229 altivec_expand_vec_perm_const_le.
25230 (rs6000_expand_vec_perm_const): Delete.
25231 (rs6000_vectorize_vec_perm_const_ok): Delete.
25232 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25233 reference to the SPE evmerge intructions.
25234 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25235 an element count and rtx array.
25236 (rs6000_expand_extract_even): Update call accordingly.
25237 (rs6000_expand_interleave): Likewise.
25238 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25239 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25241 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25243 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25245 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25246 vector mode and that that mode matches the mode of the data
25248 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25249 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25250 directly using expand_vec_perm_1 when forcing selectors into
25252 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25254 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25256 * optabs-query.h (can_vec_perm_p): Delete.
25257 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25258 * optabs-query.c (can_vec_perm_p): Split into...
25259 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25260 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25261 particular selector is valid.
25262 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25263 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25264 (vect_grouped_load_supported): Likewise.
25265 (vect_shift_permute_load_chain): Likewise.
25266 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25267 (vect_transform_slp_perm_load): Likewise.
25268 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25269 (vectorizable_bswap): Likewise.
25270 (vect_gen_perm_mask_checked): Likewise.
25271 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25272 implementations of variable permutation vectors into account
25273 when deciding which selector to use.
25274 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25275 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25276 with a false third argument.
25277 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25278 to test whether the constant selector is valid and can_vec_perm_var_p
25279 to test whether a variable selector is valid.
25281 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25283 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25284 * optabs-query.c (can_vec_perm_p): Likewise.
25285 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25286 instead of vec_perm_indices.
25287 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25288 (vect_gen_perm_mask_checked): Likewise,
25289 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25290 (vect_gen_perm_mask_checked): Likewise,
25292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25294 * optabs-query.h (qimode_for_vec_perm): Declare.
25295 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25296 (qimode_for_vec_perm): ...this new function.
25297 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25299 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25301 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25302 does not have a conditional at the top.
25304 2018-01-02 Richard Biener <rguenther@suse.de>
25306 * ipa-inline.c (big_speedup_p): Fix expression.
25308 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25311 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25314 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25318 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25319 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25320 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25321 cond_taken_branch_cost 3->4.
25323 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25325 PR tree-optimization/83581
25326 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25327 TODO_cleanup_cfg if any changes have been made.
25329 PR middle-end/83608
25330 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25331 convert_modes if target mode has the right side, but different mode
25334 PR middle-end/83609
25335 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25336 last argument when extracting from CONCAT. If either from_real or
25337 from_imag is NULL, use expansion through memory. If result is not
25338 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25339 the parts directly to inner mode, if even that fails, use expansion
25342 PR middle-end/83623
25343 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25344 check for bswap in mode rather than HImode and use that in expand_unop
25347 Copyright (C) 2018 Free Software Foundation, Inc.
25349 Copying and distribution of this file, with or without modification,
25350 are permitted in any medium without royalty provided the copyright
25351 notice and this notice are preserved.