1 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2 Julian Brown <julian@codesourcery.com>
5 * gimplify.c (gimplify_scan_omp_clauses): Set
6 target_firstprivatize_array_bases in OpenACC parallel and kernels
7 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
10 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
12 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
13 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
15 2018-09-12 Richard Biener <rguenther@suse.de>
17 PR tree-optimization/87280
18 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
19 edge but unreachable target.
20 (do_rpo_vn): For conservatively handling a PHI only mark
21 the backedge executable but not the block reachable.
23 2018-09-12 Richard Biener <rguenther@suse.de>
25 PR tree-optimization/87266
26 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
29 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
31 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
33 ("trunc<BFP:mode><DFP_ALL:mode>2")
34 ("trunc<DFP_ALL:mode><BFP:mode>2")
35 ("extend<BFP:mode><DFP_ALL:mode>2")
36 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
37 according to the target operand type.
39 2018-09-12 Jakub Jelinek <jakub@redhat.com>
40 Andreas Krebbel <krebbel@linux.ibm.com>
42 PR tree-optimization/86844
43 * gimple-ssa-store-merging.c
44 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
45 there are any overlapping stores in between them, make sure they are
46 also coalesced or we give up completely.
48 2018-09-12 Jakub Jelinek <jakub@redhat.com>
51 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
52 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
54 2018-09-12 Tom de Vries <tdevries@suse.de>
56 * common.opt (gdescribe-dies): Add option.
57 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
58 attribute for artifical and nameless decls.
59 (dwarf2out_register_external_die): Add description attribute to
60 external reference die.
61 (add_desc_attribute): New functions.
62 (gen_subprogram_die): Add description attribute to
63 DW_TAG_call_site_parameter.
64 * tree-pretty-print.c (print_generic_expr_to_str): New function.
65 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
66 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
68 (@item -gdescribe-dies): Add.
70 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
72 * tree-vrp.c (vrp_shift_undefined_p): Remove.
73 (extract_range_from_binary_expr_1: Call
74 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
75 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
78 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
80 * gimple-ssa-warn-alloca.c
81 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
82 field for ALLOCA_BOUND_*_LARGE.
84 2018-09-11 Nathan Sidwell <nathan@acm.org>
86 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
88 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
90 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
91 for clobbers. Remove obsolete comment.
93 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
95 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
96 mpxchk, mpxld and mpxst types.
97 (define_attr length_immediate): Remove all processing of mpx types.
98 (define_attr prefix_0f): Ditto.
99 (define_attr memory): Ditto.
101 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
103 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
104 (log<mode>2): Change operand 1 predicate to general_operand.
105 Extend operand 1 to XFmode and generate logxf3 insn.
106 (log10<mode>2): Change operand 1 predicate to general_operand.
107 Extend operand 1 to XFmode and generate log10xf3 insn.
108 (log2<mode>2): Change operand 1 predicate to general_operand.
109 Extend operand 1 to XFmode and generate log2xf3 insn.
110 (fyl2xp1_extend<mode>xf3_i387): Remove.
111 (log1p<mode>2): Change operand 1 predicate to general_operand.
112 Extend operand 1 to XFmode and generate log1pxf3 insn.
113 (fxtract_extend<mode>xf3_i387): Remove.
114 (logb<mode>2): Change operand 1 predicate to general_operand.
115 Extend operand 1 to XFmode and generate logbxf3 insn.
116 (ilogb<mode>2): Change operand 1 predicate to general_operand.
117 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
118 (significand<mode>2): Change operand 1 predicate to general_operand.
119 Extend operand 1 to XFmode and generate significandxf3 insn.
121 2018-09-11 Nathan Sidwell <nathan@acm.org>
123 * gcc.c (perror_with_name, pfatal_with_name): Delete.
124 (load_specs): Use fatal_error.
125 (DELETE_IF_ORDINARY, process_command): Use error.
126 (execute, run_attempt): Use fatal_error.
128 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
130 * diagnostic-core.h (sorry_at): New prototype.
131 * diagnostic.c (sorry_at): New function.
133 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
135 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
136 by zero as VR_UNDEFINED.
138 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
140 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
141 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
142 (<sincos>mode2): New expander.
143 (sincos_extend<mode>xf3_i387): Remove insn pattern.
144 (sincos -> sin, cos splitters): Remove splitter patterns.
145 (sincos<mode>3): Change operand 2 predicate to general_operand.
146 Extend operand 2 to XFmode and generate sincosxf3 insn.
147 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
148 Change operand 3 predicate to const1_operand.
149 (fptan_extend<mode>xf4_i387): Remove insn pattern.
150 (tanxf2): Update operands in the call to fptanxf4_i387.
151 (tan<mode>2): Change operand 1 predicate to general_operand.
152 Extend operand 1 to XFmode and generate tanxf3 insn.
153 (atan2xf3): Rename from *fpatanxf3_i387.
154 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
155 (atan2xf3): Remove expander.
156 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
157 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
158 (atan<mode>2): Change operand 1 predicate to general_operand.
159 Extend operand 1 to XFmode and generate atanxf3 insn.
161 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
163 * config/i386/i386.md (x87/SSE constant load splitter): Use
164 memory_operand instead of nonimmediate_operand for input operand
167 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
169 * config/i386/i386.md (float partial SSE register stall splitter): Move
170 splitter near its instruction pattern.
171 (float_extend partial SSE register stall splitter): Ditto.
172 (float_truncate partial SSE register stall splitter): Ditto.
174 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
177 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
178 to speculation_safe_value_not_needed.
181 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
182 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
183 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
184 leaf_function_p, instead use has_hard_reg_initial_val.
186 2018-09-09 Nathan Sidwell <nathan@acm.org>
188 * gcc.h (pfatal_with_name): Don't declare here.
189 * gcc.c (pfatal_with_name): Make static.
191 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
193 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
196 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
198 PR rtl-optimization/85458
199 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
200 priority hook to reduce the priority of EXPR.
202 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
204 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
205 DImode for x87 on 32bit targets. Conditionally disable x87 modes
206 with X87_ENABLE_FLOAT. Remove preparation code.
207 (*float<SWI48:mode><MODEF:mode>2): Rename from
208 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
209 math using "enabled" attribute.
210 (*floatdi<MODEF:mode>2_i387): Rename from
211 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
212 enable for 32bit targets only.
213 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
215 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
216 as operand 1 predicate. Rewrite as define_insn_and_split.
217 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
219 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
221 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
222 to fallthru to FLOAT case.
224 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
227 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
228 around folding of vec_sl to handle out of range shift values.
230 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
232 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
233 Update callers to gen_fix_trunc<mode>_i387_fisttp
234 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
235 nonimmediate_operand.
236 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
237 and corresponding splitters.
238 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
239 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
240 (fix_truncdi_i387_with_temp): Remove insn pattern
241 and corresponding splitters.
242 (fix_trunc<mode>_i387): Change operand 0 predicate to
243 nonimmediate_operand.
244 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
245 and corresponding splitters.
246 (*fistdi2_1): Remove.
248 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
249 (lrintxfdi2): Remove expander. Reimplement as define_insn.
250 (*fist<mode>2_1): Remove.
251 (fist<mode>2): Ditto.
252 (fist<mode>2_with_temp): Remove insn pattern and corresponding
254 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
255 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
256 (fistdi2_<rounding>): Change operand 0 predicate to
257 nonimmediate_operand.
258 (fistdi2_<rounding>_with_temp): Remove insn pattern
259 and corresponding splitters.
260 (fist<mode>2_<rounding>): Change operand 0 predicate to
261 nonimmediate_operand.
262 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
263 and corresponding splitters.
265 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
267 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
269 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
272 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
274 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
275 early gimple folding of vec_splat().
276 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
277 * gimple-fold.h: Add an extern define for tree_vec_extract().
279 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
281 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
282 wrappers around TREE_TYPE comparisons.
284 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
287 * config/s390/predicates.md: Add nonsym_memory_operand.
288 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
289 contains a SYMBOL_REF, load it into an intermediate pseudo.
290 (s390_emit_compare_and_swap): Legitimize operand.
291 * config/s390/s390.md: Use the new nonsym_memory_operand
292 with UNSPECV_CAS patterns.
294 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
297 * config/s390/s390-passes.def: New file.
298 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
300 (make_pass_s390_early_mach): Add declaration.
301 * config/s390/s390.c (make_pass_s390_early_mach):
302 (s390_option_override): Remove dynamic registration.
303 * config/s390/t-s390: Add s390-passes.def.
305 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
307 * config/s390/s390.c (s390_decompose_constant_pool_ref):
308 Remove UNSPEC_LTREL_BASE check.
309 (annotate_constant_pool_refs): Likewise.
310 (find_constant_pool_ref): Likewise.
311 (find_ltrel_base): Removed.
312 (replace_ltrel_base): Removed.
313 (s390_mainpool_finish): Remove replace_ltrel_base call.
314 (s390_chunkify_start): Remove pending LTREL_BASE logic.
315 (s390_chunkify_finish): Remove replace_ltrel_base call.
316 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
318 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
321 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
322 to speculation_safe_value_not_needed.
324 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
325 Bernd Schmidt <bernds_cb1@t-online.de>
327 * config/nvptx/nvptx-opts.h: New file.
328 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
329 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
331 (TARGET_SM35): New macro.
332 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
334 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
337 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
339 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
341 * config/i386/i386.md (truncdfsf2): Remove expander.
342 (truncdfsf2_with_temp): Ditto.
343 (truncxf<mode>2): Ditto.
344 (*truncdfsf_fast_mixed): Remove insn pattern.
345 (*truncdfsf_fast_i387): Ditto.
346 (*truncdfsf_mixed): Ditto.
347 (*truncdfsf_i387): Ditto.
348 (*truncdfsf2_i387_1): Ditto.
349 (*truncxfsf2_mixed): Ditto.
350 (*truncxfdf2_mixed): Ditto.
351 (*truncxf<mode>2_i387_noop): Ditto. Update callers
352 to call gen_truncxf<mode>2 instead.
353 (*truncxf<mode>2_i387): Remove.
354 (reg->reg splitters): Remove splitter pattern.
355 (reg->mem splitters): Ditto.
357 (truncdfsf2): New insn pattern.
358 (truncxf<mode>2): Ditto.
360 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
362 * tree-ssa-math-opts.c (is_mult_by): New function.
363 (is_square_of): Use the above.
364 (optimize_recip_sqrt): New function.
365 (pass_cse_reciprocals::execute): Use the above.
367 2018-09-05 Richard Biener <rguenther@suse.de>
370 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
371 to zero-init the emplaced vec.
373 2018-09-05 Martin Liska <mliska@suse.cz>
375 PR tree-optimization/87205
376 * tree-switch-conversion.c (pass_lower_switch::execute):
377 Group cases for switch statements.
379 2018-09-05 Richard Biener <rguenther@suse.de>
381 PR tree-optimization/87217
382 * tree-ssa-sccvn.c (vuse_valueize): New.
383 (vn_reference_lookup_pieces): Use it.
384 (vn_reference_lookup): Likewise.
386 2018-09-05 Nathan Sidwell <nathan@acm.org>
389 * stor-layout.c (place_field): Scan forwards to check last
390 bitfield when ms_bitfield_placement is in effect.
392 2018-09-05 Richard Biener <rguenther@suse.de>
395 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
398 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
399 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
401 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
402 * config.gcc (extra_objs): Build it.
403 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
405 * config/aarch64/aarch64-passes.def
406 (pass_tag_collision_avoidance): New pass.
407 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
408 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
409 (aarch64_classify_address): Remove static qualifier.
410 (aarch64_address_info, aarch64_address_type): Move to...
411 * config/aarch64/aarch64-protos.h: ... here.
412 (make_pass_tag_collision_avoidance): New function.
413 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
416 2018-09-05 Martin Liska <mliska@suse.cz>
418 * doc/gcov.texi: Update documentation of humar
420 * gcov.c (format_count): Print one decimal place, it provides
421 more fine number of situations like '1G' vs. '1.4G'.
423 2018-09-05 Martin Liska <mliska@suse.cz>
426 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
427 * optc-gen.awk: Allow 'Var' for Deprecated options in order
428 to generate a MASK value.
430 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
433 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
434 if frame pointer isn't used.
435 (compute_frame_pointer_to_fb_displacement): Likewise.
437 2018-09-04 Jakub Jelinek <jakub@redhat.com>
440 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
441 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
442 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
443 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
444 and OPTION_MASK_ISA_XSAVEC_UNSET.
446 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
448 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
449 XOR operations in NAND case.
451 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
453 * wide-int-range.cc (wide_int_range_convert): New.
454 * wide-int-range.h (wide_int_range_convert): New.
455 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
456 code into wide_int_range_convert.
457 (extract_range_into_wide_ints): Do not munge anti range constants
458 into the entire domain. Just return the range back.
460 2018-09-04 Martin Liska <mliska@suse.cz>
462 * genmatch.c (output_line_directive): Add new argument
464 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
466 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
468 * doc/invoke.texi (Option Summary): Add whitespace.
470 * doc/invoke.texi (Option Summary): Add -Waligned-new.
472 2018-09-04 Richard Biener <rguenther@suse.de>
474 PR tree-optimization/87211
475 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
476 backedge value we're supposed to treat as VARYING also number
477 the PHI to VARYING in case it got a different value-number already.
479 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
481 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
482 (extract_range_from_binary_expr_1): Do not call
483 vrp_can_optimize_bit_op.
484 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
486 (wide_int_range_get_mask_and_bounds): New.
487 (wide_int_range_optimize_bit_op): New.
488 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
489 (wide_int_range_bit_and): Same.
490 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
491 (wide_int_range_optimize_bit_op): New.
492 (wide_int_range_get_mask_and_bounds): New.
494 2018-09-04 Richard Biener <rguenther@suse.de>
496 PR tree-optimization/87176
497 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
498 variable. When value-numbering a virtual PHI node make sure
499 to not value-number to the backedge value.
501 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
503 * doc/extend.texi (Long Long, Hex Floats): Document support for
504 long long and hex floats in more recent versions of ISO C++.
506 2018-09-03 Richard Biener <rguenther@suse.de>
508 PR tree-optimization/87177
509 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
512 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
514 * bb-reorder.c (edge_order): Convert to C-qsort-style
515 tri-state comparator.
516 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
518 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
520 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
521 tri-state comparator.
522 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
524 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
526 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
527 (mergesort): ... here as maximum count for using netsort.
528 (gcc_qsort): Set nlim to 3 if stable sort is requested.
529 (gcc_stablesort): New.
530 * system.h (gcc_stablesort): Declare.
532 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
534 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
535 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
536 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
538 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
540 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
541 lxsdx and stxsdx alternatives.
542 (*mov<mode>_hardfloat64): Ditto.
543 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
545 2018-09-03 Richard Biener <rguenther@suse.de>
547 PR tree-optimization/87200
548 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
551 2018-09-03 Martin Liska <mliska@suse.cz>
553 PR tree-optimization/87201
554 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
555 Fix parenthesis in an expression.
557 2018-09-03 Richard Biener <rguenther@suse.de>
559 PR tree-optimization/87197
560 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
561 visited. CSE the VN_INFO hashtable lookup.
563 PR tree-optimization/87169
564 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
565 iterating make sure there's no extra backedges from irreducible
566 regions feeding the header. Mark the destination block
569 2018-09-03 Martin Liska <mliska@suse.cz>
572 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
573 * common/common-targhooks.c (default_get_valid_option_values):
575 * common/common-targhooks.h (default_get_valid_option_values):
577 * common/config/i386/i386-common.c: Move processor_target_table
579 (ix86_get_valid_option_values): New function.
580 (TARGET_GET_VALID_OPTION_VALUES): New macro.
581 * config/i386/i386.c (struct ptt): Move to i386-common.c.
582 (PTA_*): Move all defined masks into i386-common.c.
583 (ix86_function_specific_restore): Use new processor_cost_table.
584 * config/i386/i386.h (struct ptt): Moved from i386.c.
585 (struct pta): Likewise.
586 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
587 * doc/tm.texi.in: Likewise.
588 * opt-suggestions.c (option_proposer::suggest_option):
589 Pass prefix to build_option_suggestions.
590 (option_proposer::get_completions): Likewise.
591 (option_proposer::build_option_suggestions): Use the new target
593 * opts.c (struct option_help_tuple): New struct.
594 (print_filtered_help): Use the new target hook.
596 2018-09-03 Martin Liska <mliska@suse.cz>
599 * predict.c (set_even_probabilities): Add likely_edges
600 argument and handle cases where we have precisely one
602 (combine_predictions_for_bb): Catch also likely_edges.
603 (tree_predict_by_opcode): Handle gswitch statements.
604 * tree-cfg.h (find_case_label_for_value): New declaration.
605 (find_taken_edge_switch_expr): Likewise.
606 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
607 Find pivot in decision tree based on probabily, not by number of
610 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
612 * doc/standards.texi (Standards): Update Objective-C reference.
614 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
616 * doc/install.texi (Prerequisites): Update link for MPC.
618 2018-09-01 Michael Matz <matz@suse.de>
620 PR tree-optimization/87074
621 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
622 PHIs for outer-loop uses.
624 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
626 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
627 * doc/invoke.texi (C Dialect Options): Ditto.
629 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
631 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
633 2018-08-31 Richard Biener <rguenther@suse.de>
635 PR tree-optimization/87168
636 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
637 (rpo_elim::eliminate_avail): When OP was not visited it must
640 2018-08-31 David Malcolm <dmalcolm@redhat.com>
642 * tree-vrp.c (copy_value_range): Convert param "from" from
643 "value_range *" to "const value_range *".
644 (range_is_null): Likewise for param "vr".
645 (range_int_cst_p): Likewise.
646 (range_int_cst_singleton_p): Likewise.
647 (symbolic_range_p): Likewise.
648 (value_ranges_intersect_p): Likewise for both params.
649 (value_range_nonnegative_p): Likewise for param "vr".
650 (value_range_constant_singleton): Likewise.
651 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
652 (extract_range_into_wide_ints): Likewise for param "vr".
653 (extract_range_from_multiplicative_op): Likewise for params "vr0"
655 (vrp_can_optimize_bit_op): Likewise.
656 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
658 (extract_range_from_unary_expr): Likewise.
659 (debug_value_range): Likewise for param "vr".
660 (value_range::dump): Add "const" qualifier.
661 (vrp_prop::check_array_ref): Convert local "vr" from
662 "value_range *" to "const value_range *".
663 (vrp_prop::check_mem_ref): Likewise.
664 (vrp_prop::visit_stmt): Likewise for local "old_vr".
665 (vrp_intersect_ranges_1): Likewise for param "vr_1".
666 (vrp_intersect_ranges): Likewise.
667 (simplify_stmt_for_jump_threading): Likewise for local "vr".
668 (vrp_prop::vrp_finalize): Likewise.
669 * tree-vrp.h (value_range::dump): Add "const" qualifier.
670 (vrp_intersect_ranges): Add "const" qualifier to params as above.
671 (extract_range_from_unary_expr): Likewise.
672 (value_range_constant_singleton): Likewise.
673 (symbolic_range_p): Likewise.
674 (copy_value_range): Likewise.
675 (extract_range_from_binary_expr_1): Likewise.
676 (range_int_cst_p): Likewise.
677 (vrp_set_zero_nonzero_bits): Likewise.
678 (range_int_cst_singleton_p): Likewise.
680 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
682 * config/aarch64/arm_neon.h (vabsd_s64): New.
683 (vnegd_s64): Likewise.
685 2018-08-31 Martin Jambor <mjambor@suse.cz>
687 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
689 2018-08-31 Martin Liska <mliska@suse.cz>
691 * ipa-icf.c (sem_item::add_type): Use
692 sem_item::m_type_hash_cache.
693 * ipa-icf.h: Move the cache from sem_item_optimizer
696 2018-08-31 Nathan Sidwell <nathan@acm.org>
698 * doc/extend.texi (Backwards Compatibility): Remove implicit
699 extern C leeway of () being (...).
701 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
703 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
705 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
709 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
711 2018-08-31 Jakub Jelinek <jakub@redhat.com>
714 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
715 gen_int_mode. Formatting fixes.
717 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
719 * target.def (custom_function_descriptors): Improve documentation.
720 * doc/tm.texi.in (Trampolines): Expand discussion of function
721 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
722 beginning of the section.
723 * doc/tm.texi: Regenerated.
725 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
727 * cfg.h (class auto_edge_flag): Spell out the template-id of the
728 base class in the initializer list. This is a workaround for
729 building with older GCC.
730 (class auto_bb_flag): Likewise.
732 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
734 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
735 (altivec_vcmpequ<VI_char>_p): Remove star.
736 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
738 (expand_strncmp_vec_sequence): New function.
739 (emit_final_str_compare_vec): New function.
740 (expand_strn_compare): Add support for vector strncmp.
741 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
742 length specification to bytes.
743 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
744 (vcmpnezb_p): New pattern.
745 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
746 for option -mstring-compare-inline-limit.
748 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
750 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
751 (PTA_SKYLAKE): Add PTA_AES.
752 (PTA_GOLDMONT): Likewise.
754 2018-08-29 Jan Hubicka <jh@suse.cz>
757 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
758 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
760 2018-08-29 Jan Hubicka <jh@suse.cz>
762 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
764 (hash_tree): Do not visit TYPE_STUB_DECL.
765 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
766 stream TYPE_STUB_DECL.
767 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
768 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
769 after free_lang_data.
770 (type_in_anonymous_namespace_p): Likewise.
772 2018-08-29 Jan Hubicka <jh@suse.cz>
774 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
775 comment that it has to be even number.
776 (class sreal): Change m_sig type to int32_t.
777 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
778 int64_t for temporary calculations.
779 (sreal_verify_basics): Drop one bit from minimum and maximum.
781 2018-08-30 Richard Biener <rguenther@suse.de>
783 PR tree-optimization/87147
784 * tree-ssa-sccvn.c (SSA_VISITED): New function.
785 (visit_phi): When the degenerate result is from the backedge and
786 we didn't visit its definition yet drop to VARYING.
787 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
789 2018-08-29 Jan Hubicka <jh@suse.cz>
791 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
793 (hash_tree): Likewise.
795 2018-08-29 Jan Hubicka <jh@suse.cz>
797 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
798 and TYPE_NEXT_REF_TO.
800 2018-08-29 Jan Hubicka <jh@suse.cz>
802 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
803 comment that it has to be even number.
804 (class sreal): Change m_sig type to int32_t.
805 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
806 int64_t for temporary calculations.
807 (sreal_verify_basics): Drop one bit from minimum and maximum.
809 2018-08-30 Tamar Christina <tamar.christina@arm.com>
811 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
813 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
816 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
817 if to_add is negative.
819 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
822 * builtins.c (c_strlen): Improve range checks.
824 2018-08-29 Martin Sebor <msebor@redhat.com>
825 Jeff Law <law@redhat.com>
827 PR tree-optimization/86714
828 PR tree-optimization/86711
829 * builtins.c (c_strlen): Add arguments to call to string_constant.
830 * expr.c (string_constant): Add argument. Detect missing nul
831 terminator and outermost declaration it's missing in.
832 * expr.h (string_constant): Add argument.
833 * fold-const.c (read_from_constant_string): Add arguments to call to
835 (c_getstr): Likewise.
836 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
838 * tree-ssa-strlen.c (get_stridx): Likewise.
840 2018-08-29 Jan Hubicka <jh@suse.cz>
842 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
843 Do not stream DECL_VINDEX.
844 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
845 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
846 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
848 2018-08-29 Richard Biener <rguenther@suse.de>
850 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
851 virtual operands that are not default defs to honor region
853 (rpo_vn_valueize): Remove ineffective code here.
855 2018-08-29 Richard Biener <rguenther@suse.de>
857 PR tree-optimization/87132
858 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
859 when skipping defs reachable over backedges.
861 2018-08-29 Richard Biener <rguenther@suse.de>
863 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
864 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
865 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
866 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
867 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
868 (vn_reference_lookup_3): Remove use of const_parms.
869 (free_rpo_vn): Do not free const_parms.
870 (do_rpo_vn): Do not call init_const_parms.
871 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
872 SSA_NAME_POINTS_TO_READONLY_MEMORY.
873 (call_may_clobber_ref_p_1): Likewise.
875 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
878 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
880 (-ftree-scev-cprop): Document.
882 2018-08-29 Jan Hubicka <jh@suse.cz>
884 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
886 (sreal constructor): Update.
887 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
888 sreal:operator/): Update.
890 2018-08-29 Martin Liska <mliska@suse.cz>
892 * tree-switch-conversion.c (switch_conversion::expand):
893 Strenghten assumption about gswitch statements.
895 2018-08-29 Richard Biener <rguenther@suse.de>
897 PR tree-optimization/87117
898 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
899 re-value-number released SSA VDEFs.
901 2018-08-29 Richard Biener <rguenther@suse.de>
903 PR tree-optimization/87126
904 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
906 2018-08-28 Jim Wilson <jimw@sifive.com>
908 * config/riscv/pic.md: Rewrite.
909 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
911 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
912 (SOFTF, default_load, softload, softstore): New.
914 2018-08-28 Jeff Law <law@redhat.com>
916 * fold-const.c (fold_binary_loc): Remove recently added assert.
918 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
920 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
921 to OP parmeter of generated function.
923 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
925 PR tree-optimization/87009
926 * match.pd: Add boolean optimizations.
928 2018-08-28 Martin Sebor <msebor@redhat.com>
931 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
932 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
933 (pass_walloca::gate): Use it.
934 (alloca_call_type): Same.
935 (pass_walloca::execute): Same.
936 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
938 2018-08-28 David Malcolm <dmalcolm@redhat.com>
940 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
941 GCC_VERSION for usage of "__gcc_dump_printf__" format from
944 2018-08-28 Richard Biener <rguenther@suse.de>
946 PR tree-optimization/87124
947 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
948 constants before looking up avail.
950 2018-08-28 Jakub Jelinek <jakub@redhat.com>
953 * calls.c (maybe_warn_nonstring_arg): Punt early if
954 warn_stringop_overflow is zero. Don't call get_range_strlen
955 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
956 Swap comparison operands to have constants on rhs. Only use
957 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
960 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
962 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
963 use of tree_to_shwi. Remove duplicated test for the size being
964 a whole number of bytes.
966 2018-08-28 Richard Biener <rguenther@suse.de>
968 PR tree-optimization/87117
969 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
970 Handle removed stmt without LHS (GIMPLE_NOP).
972 2018-08-28 Richard Biener <rguenther@suse.de>
974 PR tree-optimization/87117
975 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
976 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
978 2018-08-28 Richard Biener <rguenther@suse.de>
980 PR tree-optimization/87117
981 * tree-ssa-pre.c (compute_avail): Do not make expressions
982 with predicated values available.
983 (get_expr_value_id): Assert we do not run into predicated value
986 2018-08-28 Richard Biener <rguenther@suse.de>
988 PR tree-optimization/87117
989 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
990 get virtual operands.
991 (get_expr_operands): Handle STRING_CST like other decls.
993 2018-08-28 Martin Liska <mliska@suse.cz>
995 * tree.h: Update documentation of fndecl_built_in_p
999 2018-08-27 Jeff Law <law@redhat.com>
1000 PR tree-optimization/87110
1001 * tree-ssa-dse.c (compute_trims): Handle non-constant
1004 2018-08-27 Martin Sebor <msebor@redhat.com>
1006 PR tree-optimization/86914
1007 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1009 2018-08-27 Martin Sebor <msebor@redhat.com>
1011 PR tree-optimization/87112
1012 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1013 the type of the bound argument.
1015 2018-08-27 Jeff Law <law@redhat.com>
1017 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1018 type does not have a TYPE_SIZE_UNIT.
1020 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1022 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1023 with include of backend.h.
1025 2018-08-27 Richard Biener <rguenther@suse.de>
1027 PR tree-optimization/86927
1028 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1029 use const cond reduction code.
1031 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1033 PR tree-optimization/85758
1034 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1036 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1039 * diagnostic-show-locus.c (class layout_range): Update for
1040 conversion of show_caret_p to a tri-state.
1041 (layout_range::layout_range): Likewise.
1042 (make_range): Likewise.
1043 (layout::maybe_add_location_range): Likewise.
1044 (layout::should_print_annotation_line_p): Don't show annotation
1045 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1046 (layout::get_state_at_point): Update for conversion of
1047 show_caret_p to a tri-state. Bail out early for
1048 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1049 underlining or source colorization.
1050 (gcc_rich_location::add_location_if_nearby): Update for conversion
1051 of show_caret_p to a tri-state.
1052 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1053 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1055 (selftest::test_one_liner_labels): Likewise.
1056 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1057 conversion of show_caret_p to a tri-state.
1058 * pretty-print.c (text_info::set_location): Likewise.
1059 * pretty-print.h (text_info::set_location): Likewise.
1060 * substring-locations.c (format_warning_n_va): Likewise.
1061 * tree-diagnostic.c (default_tree_printer): Likewise.
1062 * tree-pretty-print.c (newline_and_indent): Likewise.
1064 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1067 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1068 line above for line-insertion fix-it hints.
1069 (selftest::test_fixit_insert_containing_newline): Update the
1070 expected results, and add a test with line-numbering enabled.
1072 2018-08-27 Martin Liska <mliska@suse.cz>
1075 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1076 params with DECL_HAS_VALUE_EXPR_P.
1078 2018-08-27 Martin Liska <mliska@suse.cz>
1080 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1081 selected expansion strategy.
1083 2018-08-27 Martin Liska <mliska@suse.cz>
1085 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1086 * builtins.c (is_builtin_fn): Likewise.
1087 * attribs.c (diag_attr_exclusions): Use new function
1088 fndecl_built_in_p and remove check for FUNCTION_DECL if
1090 (builtin_mathfn_code): Likewise.
1091 (fold_builtin_expect): Likewise.
1092 (fold_call_expr): Likewise.
1093 (fold_builtin_call_array): Likewise.
1094 (fold_call_stmt): Likewise.
1095 (set_builtin_user_assembler_name): Likewise.
1096 (is_simple_builtin): Likewise.
1097 * calls.c (gimple_alloca_call_p): Likewise.
1098 (maybe_warn_nonstring_arg): Likewise.
1099 * cfgexpand.c (expand_call_stmt): Likewise.
1100 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1101 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1102 (cgraph_node::verify_node): Likewise.
1103 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1104 (cgraph_node::create_clone): Likewise.
1105 * config/arm/arm.c (arm_insert_attributes): Likewise.
1106 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1107 * dse.c (scan_insn): Likewise.
1108 * expr.c (expand_expr_real_1): Likewise.
1109 * fold-const.c (operand_equal_p): Likewise.
1110 (fold_binary_loc): Likewise.
1111 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1112 * gimple-low.c (lower_stmt): Likewise.
1113 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1114 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1115 * gimple.c (gimple_build_call_from_tree): Likewise.
1116 (gimple_call_builtin_p): Likewise.
1117 (gimple_call_combined_fn): Likewise.
1118 * gimplify.c (gimplify_call_expr): Likewise.
1119 (gimple_boolify): Likewise.
1120 (gimplify_modify_expr): Likewise.
1121 (gimplify_addr_expr): Likewise.
1122 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1123 * ipa-cp.c (determine_versionability): Likewise.
1124 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1125 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1126 * ipa-split.c (visit_bb): Likewise.
1127 (split_function): Likewise.
1128 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1129 * lto-cgraph.c (input_node): Likewise.
1130 * lto-streamer-out.c (write_symbol): Likewise.
1131 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1132 (lower_omp_1): Likewise.
1133 * predict.c (strip_predict_hints): Likewise.
1134 * print-tree.c (print_node): Likewise.
1135 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1136 * trans-mem.c (is_tm_irrevocable): Likewise.
1137 (is_tm_load): Likewise.
1138 (is_tm_simple_load): Likewise.
1139 (is_tm_store): Likewise.
1140 (is_tm_simple_store): Likewise.
1141 (is_tm_abort): Likewise.
1142 (tm_region_init_1): Likewise.
1143 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1144 * tree-cfg.c (verify_gimple_call): Likewise.
1145 (move_stmt_r): Likewise.
1146 (stmt_can_terminate_bb_p): Likewise.
1147 * tree-eh.c (lower_eh_constructs_2): Likewise.
1148 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1149 * tree-inline.c (remap_gimple_stmt): Likewise.
1150 (copy_bb): Likewise.
1151 (estimate_num_insns): Likewise.
1152 (fold_marked_statements): Likewise.
1153 * tree-sra.c (scan_function): Likewise.
1154 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1155 (optimize_stack_restore): Likewise.
1156 (pass_fold_builtins::execute): Likewise.
1157 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1158 (mark_all_reaching_defs_necessary_1): Likewise.
1159 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1160 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1161 (pass_forwprop::execute): Likewise.
1162 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1163 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1164 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1165 * tree-ssa-strlen.c (get_string_length): Likewise.
1166 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1167 (find_func_aliases_for_call): Likewise.
1168 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1169 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1170 * tree-tailcall.c (find_tail_calls): Likewise.
1171 * tree.c (need_assembler_name_p): Likewise.
1172 (free_lang_data_in_decl): Likewise.
1173 (get_call_combined_fn): Likewise.
1174 * ubsan.c (is_ubsan_builtin_p): Likewise.
1175 * varasm.c (incorporeal_function_p): Likewise.
1176 * tree.h (DECL_BUILT_IN): Remove and replace with
1178 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1179 (fndecl_built_in_p): New.
1181 2018-08-27 Martin Liska <mliska@suse.cz>
1183 PR tree-optimization/86847
1184 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1185 Dump also subtree probability.
1186 (switch_decision_tree::do_jump_if_equal): New function.
1187 (switch_decision_tree::emit_case_nodes): Handle special
1188 situations in balanced tree that can be emitted much simpler.
1189 Fix calculation of probabilities that happen in tree expansion.
1190 * tree-switch-conversion.h (struct cluster): Add
1192 (struct simple_cluster): Likewise.
1193 (struct case_tree_node): Add new function has_child.
1194 (do_jump_if_equal): New.
1196 2018-08-27 Martin Liska <mliska@suse.cz>
1198 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1199 Add new argument to bit_test_cluster constructor.
1200 (bit_test_cluster::emit): Set bits really number of values
1202 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1203 probability argument.
1204 * tree-switch-conversion.h (struct bit_test_cluster):
1205 Add m_handles_entire_switch.
1207 2018-08-27 Martin Liska <mliska@suse.cz>
1209 PR tree-optimization/86702
1210 * tree-switch-conversion.c (jump_table_cluster::emit):
1211 Make probabilities even for values in jump table
1212 according to number of cases handled.
1213 (switch_decision_tree::compute_cases_per_edge): Pass
1214 argument to reset_out_edges_aux function.
1215 (switch_decision_tree::analyze_switch_statement): Likewise.
1216 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1219 2018-08-27 Martin Liska <mliska@suse.cz>
1221 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1222 cfun argument explicitly.
1223 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1224 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1225 function gimple_switch_default_bb.
1226 (convert_switch_statements):
1228 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1229 * stmt.c (label_to_block_fn): Use label_to_block and pass
1230 cfun argument explicitly and use gimple_switch_label_bb.
1231 (expand_case): Likewise.
1232 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1233 cfun argument explicitly. Likewise.
1234 (make_edges_bb): Likewise.
1235 (make_cond_expr_edges): Likewise.
1236 (get_cases_for_edge): Likewise.
1237 (make_gimple_switch_edges): Likewise.
1238 (label_to_block_fn): Likewise.
1239 (label_to_block): Likewise.
1240 (make_goto_expr_edges): Likewise.
1241 (make_gimple_asm_edges): Likewise.
1242 (main_block_label): Likewise.
1243 (group_case_labels_stmt): Likewise.
1244 (find_taken_edge_computed_goto): Likewise.
1245 (find_taken_edge_switch_expr): Likewise.
1246 (gimple_verify_flow_info): Likewise.
1247 (gimple_redirect_edge_and_branch): Likewise.
1248 (gimple_switch_label_bb): New function.
1249 (gimple_switch_default_bb): Likewise.
1250 (gimple_switch_edge): Likewise.
1251 (gimple_switch_default_edge): Likewise.
1252 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1253 (label_to_block): ... with this.
1254 (gimple_switch_label_bb): New.
1255 (gimple_switch_default_bb): Likewise.
1256 (gimple_switch_edge): Likewise.
1257 (gimple_switch_default_edge): Likewise.
1258 * tree-cfgcleanup.c (convert_single_case_switch): Use
1259 new gimple functions and pass new argument to label_to_block.
1260 (cleanup_control_flow_bb):
1261 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1262 cfun argument explicitly.
1263 (make_eh_edges): Likewise.
1264 (redirect_eh_dispatch_edge): Likewise.
1265 (lower_resx): Likewise.
1266 (lower_eh_dispatch): Likewise.
1267 (maybe_remove_unreachable_handlers): Likewise.
1268 (unsplit_eh): Likewise.
1269 (cleanup_empty_eh): Likewise.
1270 (verify_eh_edges): Likewise.
1271 (verify_eh_dispatch_edge): Likewise.
1272 * tree-ssa-dom.c (record_edge_info): Likewise.
1273 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1274 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1275 (thread_through_normal_block): Likewise.
1276 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1277 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1278 * tree-switch-conversion.c (switch_conversion::collect): Use new
1280 (switch_conversion::check_final_bb): Likewise.
1281 (switch_conversion::gather_default_values): Pass new argument
1283 (switch_conversion::build_constructors): Likewise.
1284 (switch_decision_tree::compute_cases_per_edge): Use new
1285 gimple_switch_edge function.
1286 (switch_decision_tree::analyze_switch_statement): Pass new argument
1288 (switch_decision_tree::try_switch_expansion): Use
1289 gimple_switch_default_edge.
1290 * tree-vrp.c (find_switch_asserts): Pass new argument
1292 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1293 (vr_values::simplify_switch_using_ranges): Likewise.
1295 2018-08-27 Richard Biener <rguenther@suse.de>
1297 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1298 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1300 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1301 (struct vn_nary_op_s): Add unwind_to member. Add
1302 predicated_values flag and put result into a union together
1303 with a linked list of vn_pval.
1304 (struct vn_ssa_aux): Add name member to make maintaining
1305 a map of SSA name to vn_ssa_aux possible. Remove no longer
1306 needed info, dfsnum, low, visited, on_sccstack, use_processed
1307 and range_info_anti_range_p members.
1308 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1309 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1311 (vn_valueize): New global.
1312 (vn_context_bb): Likewise.
1313 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1314 VN_INFO_PTR_INFO): Remove.
1315 * tree-ssa-sccvn.c: ... (rewrite)
1316 (pass_fre::execute): For -O2+ initialize loops and run
1317 RPO VN in optimistic mode (iterating). For -O1 and -Og
1318 run RPO VN in non-optimistic mode.
1319 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1320 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1321 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1322 (rpo-vn-max-loop-depth): Document.
1323 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1324 when valuezing the VUSE signals we walked out of the region.
1325 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1326 (phi_translate): Set VN context block to use for availability
1328 (compute_avail): Likewise.
1329 (pre_valueize): New function.
1330 (pass_pre::execute): Adjust to the RPO VN API.
1332 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1333 (propagate_constants_for_unrolling): Remove.
1334 (tree_unroll_loops_completely): Perform value-numbering
1335 on the unrolled bodies loop parent.
1337 2018-08-27 Richard Biener <rguenther@suse.de>
1339 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1340 for partial antic compute.
1342 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1344 PR rtl-optimization/87065
1345 * combine.c (simplify_if_then_else): Formatting fix.
1346 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1348 (known_cond): Don't return const_true_rtx for vector modes. Use
1349 CONST0_RTX instead of const0_rtx. Formatting fixes.
1351 2018-08-27 Martin Liska <mliska@suse.cz>
1353 PR gcov-profile/87069
1354 * gcov.c (process_file): Record files already processed
1355 and warn about a file being processed multiple times.
1357 2018-08-27 Martin Liska <mliska@suse.cz>
1360 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1361 Set default values for x_aarch64_*_string strings.
1362 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1363 prefix. For -mabi do not print '=ABI' in help and use
1364 <option_value> format for -msve-vector-bits and -moverride
1367 2018-08-26 Jeff Law <law@redhat.com>
1369 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1372 2018-08-26 Marek Polacek <polacek@redhat.com>
1374 PR c++/87029, Implement -Wredundant-move.
1375 * doc/invoke.texi: Document -Wredundant-move.
1377 2018-08-25 Martin Sebor <msebor@redhat.com>
1379 PR tree-optimization/87059
1380 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1381 to the same type as the other.
1382 * fold-const.c (fold_binary_loc): Assert expectation.
1384 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1386 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1387 extraneous parentheses, dead code section and formatting.
1389 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1392 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1393 wide enough for jumps in the line-numbering to be visible.
1394 (layout::print_gap_in_line_numbering): New member function.
1395 (layout::calculate_line_spans): When using line numbering, merge
1396 line spans that are only 1 line apart.
1397 (diagnostic_show_locus): When printing line numbers, show gaps in
1398 line numbering directly, rather than printing headers.
1399 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1400 line-numbering with multiple line spans.
1401 (selftest::test_fixit_insert_containing_newline_2): Add test of
1402 line-numbering, in which the spans are close enough to be merged.
1404 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1406 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1407 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1408 * tree-vrp.c (range_is_nonnull): Remove.
1409 (range_includes_zero_p): Accept value_range instead of min/max.
1410 (extract_range_from_binary_expr_1): Do not early bail on
1412 Use range_includes_zero_p instead of range_is_nonnull.
1413 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1414 of range_is_nonnull.
1415 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1416 special case VR_ANTI_RANGE.
1417 (vrp_finalize): Same.
1418 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1420 (range_is_nonnull): Remove.
1421 * vr-values.c (vrp_stmt_computes_nonzero): Use
1422 range_includes_zero_p instead of range_is_nonnull.
1423 (extract_range_basic): Pass value_range to range_includes_zero_p
1424 instead of range_is_nonnull.
1426 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1428 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1429 * emit-rtl.h (rtl_data): Remove return_bnd.
1430 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1431 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1432 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1433 (POINTER_BOUNDS_MODE): Remove definition.
1434 (make_pointer_bounds_mode): Remove.
1435 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1436 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1437 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1438 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1439 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1440 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1441 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1443 * config/i386/i386-modes.def (BND32, BND64): Remove.
1444 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1445 (dbx64_register_map): Ditto.
1446 (svr4_dbx_register_map): Ditto.
1447 (indirect_thunk_bnd_needed): Remove.
1448 (indirect_thunks_bnd_used): Ditto.
1449 (indirect_return_bnd_needed): Ditto.
1450 (indirect_return_via_cx_bnd): Ditto.
1451 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1452 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1453 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1454 (output_indirect_thunk_function): Remove handling of
1455 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1456 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1457 (ix86_save_reg): Remove handling of crtl->return_bnd.
1458 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1459 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1460 and UNSPEC_BNDLX_ADDR.
1461 (ix86_output_indirect_branch_via_reg): Remove handling of
1462 indirect_thunk_prefix_bnd.
1463 (ix86_output_indirect_branch_via_push): Ditto.
1464 (ix86_output_function_return): Ditto.
1465 (ix86_output_indirect_function_return): Ditto.
1466 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1467 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1468 (CALL_USED_REGISTERS): Ditto.
1469 (REG_ALLOC_ORDER): Update for removal of bound registers.
1470 (HI_REGISTER_NAMES): Ditto.
1471 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1472 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1473 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1474 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1475 (FIRST_PSEUDO_REG): Update.
1476 (BND): Remove mode iterator.
1477 * config/i386/predicates.md (bnd_mem_operator): Remove.
1479 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1481 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1484 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1486 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1487 the case in which the permute needs only a single element and
1488 repeats for every vector of the result. Extend that case to
1489 handle variable-length vectors.
1490 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1492 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1495 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1496 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1498 2018-08-24 Richard Biener <rguenther@suse.de>
1500 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1501 bb_flags_allocated members.
1502 (auto_flag): New RAII class for allocating flags.
1503 (auto_edge_flag): New RAII class for allocating edge flags.
1504 (auto_bb_flag): New RAII class for allocating bb flags.
1505 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1507 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1508 in favor of temporarily allocated BB flag.
1509 * hsa-brig.c: Re-order includes.
1510 * hsa-dump.c: Likewise.
1511 * hsa-regalloc.c: Likewise.
1512 * print-rtl.c: Likewise.
1513 * profile-count.c: Likewise.
1515 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1518 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1521 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1524 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1525 from wide_int_range_multiplicative_op.
1527 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1529 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1532 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1534 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1537 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1539 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1540 full GENERIC expression used for replacement.
1542 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1544 * tree-vrp.c (abs_extent_range): Remove.
1545 (extract_range_into_wide_ints): Pass wide ints by reference.
1546 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1547 Pass wide ints by reference in all calls to
1548 extract_range_into_wide_ints.
1549 * wide-int-range.cc (wide_int_range_div): New.
1550 * wide-int-range.h (wide_int_range_div): New.
1551 (wide_int_range_includes_zero_p): New.
1552 (wide_int_range_zero_p): New.
1554 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1556 * config/aarch64/aarch64.md (arches): New enum.
1557 (arch): New enum attr.
1558 (arch_enabled): New attr.
1559 (enabled): Now uses arch_enabled only.
1560 (simd, sve, fp16): Removed attribute.
1561 (fp): Attr now defined in terms of 'arch'.
1562 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1563 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1564 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1565 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1566 attributes into 'arch'.
1567 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1568 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1569 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1570 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1571 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1572 'simd' attribute into 'arch'.
1573 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1574 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1575 Convert use of 'fp' attribute to 'arch'.
1576 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1577 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1579 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1580 (different modes) Merge 'fp' and 'simd' into 'arch'.
1581 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1584 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1586 PR rtl-optimization/87026
1587 * expmed.c (canonicalize_comparison): If we can no longer create
1588 pseudoregisters, don't.
1590 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1593 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1595 * config/arm/arm.c (speculation_barrier_libfunc): New static
1597 (arm_init_libfuncs): Initialize it.
1598 (arm_emit_speculation_barrier): New function.
1599 * config/arm/arm.md (speculation_barrier): Call
1600 arm_emit_speculation_barrier for architectures that do not have
1602 (speculation_barrier_insn): Only match on Armv7 or later.
1604 2018-08-23 Richard Biener <rguenther@suse.de>
1607 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1610 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1612 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1613 of single-vector TBLs.
1614 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1617 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1620 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1621 aarch64_evpc_tbl guard.
1623 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1625 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1628 2018-08-22 Martin Sebor <msebor@redhat.com>
1631 * tree-pretty-print.c (pretty_print_string): Add argument.
1632 (dump_generic_node): Call to pretty_print_string with string size.
1634 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1636 PR rtl-optimization/86771
1637 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1638 of two SETs into those two SETs, one to be placed at i2, if that SETs
1639 destination is modified between i2 and i3.
1641 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1643 PR tree-optimization/86725
1644 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1646 (vect_analyze_scalar_cycles_1): Check it.
1648 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1650 PR tree-optimization/86725
1651 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1652 an outer loop phi as a double reduction, make sure that the
1653 single user of the phi result is an inner loop phi.
1655 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1657 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1658 grouped stores with gaps to a strided group.
1660 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1662 * tree-vect-stmts.c (get_group_load_store_type)
1663 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1664 first statement in a group.
1666 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1668 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1669 the sequence used in gcc/gcc.c.
1671 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1674 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1677 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1679 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1680 Darwin10-specific unwinder-shim.
1681 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1682 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1683 New to cater for Darwin10 Rosetta.
1685 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1687 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1688 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1690 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1695 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1696 (dwarf2out_switch_text_section): Generate a local label for the
1697 second function sub-section and apply it as the second FDE start
1699 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1700 second sub-section start.
1702 2018-08-22 Richard Biener <rguenther@suse.de>
1704 PR tree-optimization/86988
1705 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1707 2018-08-22 Richard Biener <rguenther@suse.de>
1709 PR tree-optimization/86945
1710 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1712 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1714 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1715 a comment about how uses of r2 for .sdata2 come about.
1717 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1719 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1721 2018-08-21 Marek Polacek <polacek@redhat.com>
1723 PR c++/86981, Implement -Wpessimizing-move.
1724 * doc/invoke.texi: Document -Wpessimizing-move.
1726 2018-08-21 Jan Hubicka <jh@suse.cz>
1728 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1729 * tree.h (is_redundant_typedef): Remove.
1730 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1732 2018-08-21 Jan Hubicka <jh@suse.cz>
1734 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1737 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1739 * expmed.c (extract_low_bits): Reject invalid subregs early.
1741 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1744 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1747 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1749 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1750 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1751 * config/vxworks.c: Likewise.
1753 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1755 * config/vxworks.c: Set targetm.have_ctors_dtors
1756 if HAVE_INITFINI_ARRAY_SUPPORT.
1757 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1758 if HAVE_INITFINI_ARRAY_SUPPORT.
1760 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1762 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1763 default search path for VxWorks < 7.
1765 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1767 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1768 (get_format_string): Refer to c_getstr.
1770 2018-08-21 Tom de Vries <tdevries@suse.de>
1772 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1773 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1774 (debuginfo_early_stop): Declare.
1775 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1776 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1777 (debuginfo_early_stop): New function.
1778 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1779 and debuginfo_early_stop.
1780 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1781 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1782 (general_init): Call debuginfo_early_init.
1783 (finalize): Call debuginfo_fini.
1784 (do_compile): Call debuginfo_init.
1785 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1787 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1789 2018-08-21 Tom de Vries <tdevries@suse.de>
1791 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1792 flag_dump_noaddr and flag_dump_unnumbered.
1794 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1796 * wide-int-range.cc (wide_int_range_abs): New.
1797 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1798 * wide-int-range.h (wide_int_range_abs): New.
1799 (wide_int_range_min_max): New.
1800 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1801 case to call wide_int_range_abs.
1802 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1803 (extract_range_from_abs_expr): Delete.
1805 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1808 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1809 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1812 2018-08-20 Nathan Sidwell <nathan@acm.org>
1813 Jeff Law <law@redhat.com>
1815 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1816 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1818 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1821 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1822 (decl_attributes): Likewise.
1823 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1825 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1826 * diagnostic-core.h (class auto_diagnostic_group): New class.
1827 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1828 (diagnostic_report_diagnostic): Handle the first diagnostics within
1830 (emit_diagnostic): Add auto_diagnostic_group instance.
1832 (inform_n): Likewise.
1833 (warning): Likewise.
1834 (warning_at): Likewise.
1835 (warning_n): Likewise.
1836 (pedwarn): Likewise.
1837 (permerror): Likewise.
1839 (error_n): Likewise.
1840 (error_at): Likewise.
1842 (fatal_error): Likewise.
1843 (internal_error): Likewise.
1844 (internal_error_no_backtrace): Likewise.
1845 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1846 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1847 * diagnostic.h (struct diagnostic_context): Add fields
1848 "diagnostic_group_nesting_depth",
1849 "diagnostic_group_emission_count", "begin_group_cb",
1851 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1852 Add auto_diagnostic_group instance(s).
1853 (find_explicit_erroneous_behavior): Likewise.
1854 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1855 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1856 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1857 (gimplify_va_arg_expr): Likewise.
1858 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1859 (HSA_SORRY_AT): Likewise.
1860 * ipa-devirt.c (compare_virtual_tables): Likewise.
1861 (warn_odr): Likewise.
1862 * multiple_target.c (expand_target_clones): Likewise.
1863 * opts-common.c (cmdline_handle_error): Likewise.
1864 * reginfo.c (globalize_reg): Likewise.
1865 * substring-locations.c (format_warning_n_va): Likewise.
1866 * tree-inline.c (expand_call_inline): Likewise.
1867 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1868 * tree-ssa-loop-niter.c
1869 (do_warn_aggressive_loop_optimizations): Likewise.
1870 * tree-ssa-uninit.c (warn_uninit): Likewise.
1871 * tree.c (warn_deprecated_use): Likewise.
1873 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1876 * config/i386/i386.md (eh_return): Always update EH return
1877 address in word_mode.
1879 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1881 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1882 TARGET_SPLIT_COMPLEX_ARG is defined.
1884 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1886 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1888 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1891 * expr.c (expand_assignment): Assert that bitpos is positive.
1892 (store_field): Likewise
1893 (expand_expr_real_1): Make sure that bitpos is positive.
1894 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1897 2018-08-20 Nathan Sidwell <nathan@acm.org>
1899 * Makefile.in (CPP_ID_DATA_H): Delete.
1900 (CPP_INTERNAL_H): Don't add it.
1901 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1902 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1904 2018-08-20 Richard Biener <rguenther@suse.de>
1906 PR tree-optimization/78655
1907 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1908 pointer + offset nonnull if either operand is nonnull work.
1910 2018-08-20 Tom de Vries <tdevries@suse.de>
1912 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1913 unless the referenced die describes the added property using
1914 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1915 Otherwise, add a DW_AT_location to the referenced die.
1917 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1920 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1921 register_operand when calling ix86_set_reg_reg_cost.
1922 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1923 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1924 predicate and to 1 otherwise.
1926 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1928 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1929 emit a diagnostic that it is not supported and reset the option.
1930 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1931 supported and consume the option. (ASM_FINAL_SPEC): New.
1933 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1935 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1938 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1940 C-SKY port: Documentation
1942 * doc/extend.texi (C-SKY Function Attributes): New section.
1943 * doc/invoke.texi (Option Summary): Add C-SKY options.
1944 (C-SKY Options): New section.
1945 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1947 2018-08-17 Jojo <jijie_rong@c-sky.com>
1948 Huibin Wang <huibin_wang@c-sky.com>
1949 Sandra Loosemore <sandra@codesourcery.com>
1950 Chung-Lin Tang <cltang@codesourcery.com>
1952 C-SKY port: Backend implementation
1954 * config/csky/*: New.
1955 * common/config/csky/*: New.
1957 2018-08-17 Jojo <jijie_rong@c-sky.com>
1958 Huibin Wang <huibin_wang@c-sky.com>
1959 Sandra Loosemore <sandra@codesourcery.com>
1960 Chung-Lin Tang <cltang@codesourcery.com>
1961 Andrew Jenner <andrew@codesourcery.com>
1963 C-SKY port: Configury
1965 * config.gcc (csky-*-*): New.
1966 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1967 * configure: Regenerated.
1969 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1971 * dump-context.h: Include "dumpfile.h".
1972 (dump_context::dump_printf_va): Convert final param from va_list
1973 to va_list *. Convert from ATTRIBUTE_PRINTF to
1974 ATTRIBUTE_GCC_DUMP_PRINTF.
1975 (dump_context::dump_printf_loc_va): Likewise.
1976 * dumpfile.c: Include "stringpool.h".
1977 (make_item_for_dump_printf_va): Delete.
1978 (make_item_for_dump_printf): Delete.
1979 (class dump_pretty_printer): New class.
1980 (dump_pretty_printer::dump_pretty_printer): New ctor.
1981 (dump_pretty_printer::emit_items): New member function.
1982 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1984 (dump_pretty_printer::emit_item): New member function.
1985 (dump_pretty_printer::stash_item): New member function.
1986 (dump_pretty_printer::format_decoder_cb): New member function.
1987 (dump_pretty_printer::decode_format): New member function.
1988 (dump_context::dump_printf_va): Reimplement in terms of
1989 dump_pretty_printer.
1990 (dump_context::dump_printf_loc_va): Convert final param from va_list
1992 (dump_context::begin_scope): Reimplement call to
1993 make_item_for_dump_printf.
1994 (dump_printf): Update for change to dump_printf_va.
1995 (dump_printf_loc): Likewise.
1996 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1997 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1998 with %T, %E, and %G.
1999 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2000 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2001 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2002 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2003 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2004 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2005 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2006 within a dump_printf_loc call to "%wu".
2007 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2008 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2009 missing space after "=".
2010 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2011 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2012 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2013 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2014 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2015 duplicate "vectorized" from message.
2017 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2019 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2020 polyNxK_t element's TYPE_STRING_FLAG.
2022 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2024 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2025 (they were unnamed before). Fix comments.
2027 2018-08-17 Nathan Sidwell <nathan@acm.org>
2029 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2031 2018-08-17 Richard Biener <rguenther@suse.de>
2033 PR tree-optimization/86841
2034 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2036 2018-08-17 Martin Liska <mliska@suse.cz>
2038 * common.opt: Remove Warn, Init and Report for options with
2039 Ignore/Deprecated flag. Warning is done automatically for
2041 * config/i386/i386.opt: Likewise.
2042 * config/ia64/ia64.opt: Likewise.
2043 * config/rs6000/rs6000.opt: Likewise.
2044 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2045 Remove usage of flag_check_pointer_bounds.
2046 * lto-wrapper.c (merge_and_complain): Do not handle
2047 OPT_fcheck_pointer_bounds.
2048 (append_compiler_options): Likewise.
2049 * opt-functions.awk: Do not handle Deprecated.
2050 * optc-gen.awk: Check that Var, Report and Init are not
2051 used for an option with Ignore/Deprecated flag.
2052 * opts-common.c (decode_cmdline_option): Do not report
2054 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2056 * opts.h (struct cl_option): Remove cl_deprecated flag.
2057 (CL_ERR_DEPRECATED): Remove error enum value.
2059 2018-08-17 Richard Biener <rguenther@suse.de>
2062 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2063 across a va-arg-pack using call adjust its return value accordingly.
2065 2018-08-16 Martin Sebor <msebor@redhat.com>
2067 PR tree-optimization/86853
2068 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2069 (struct fmtresult): Add member and initialize it in ctors.
2070 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2071 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2072 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2073 (parse_directive): Handle %C same as %c.
2074 (sprintf_dom_walker::compute_format_length): Adjust.
2075 (is_call_safe): Adjust.
2077 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2079 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2080 for determining how to count the elements.
2081 * builtins.h (c_strlen): Adjust prototype.
2082 * expr.c (string_constant): Add new parameter mem_size.
2083 Set *mem_size appropriately.
2084 * expr.h (string_constant): Adjust protoype.
2085 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2086 * gimple-fold.h (get_range_strlen): Adjust prototype.
2087 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2088 (format_string): Call get_string_length with eltsize.
2090 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2092 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2093 to emit the span, rather than setting it as the prefix.
2095 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2097 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2098 "margin_char" parameter, defaulting to space. Use it in place
2099 of pp_space for the initial part of the margin.
2100 (layout::print_leading_fixits): Use '+' when filling the margin
2101 of line-insertion fix-it hints.
2103 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2105 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2108 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2110 * config/rs6000/altivec.md: Don't set length attribute to the default
2112 * config/rs6000/darwin.md: Ditto.
2113 * config/rs6000/dfp.md: Ditto.
2114 * config/rs6000/htm.md: Ditto.
2115 * config/rs6000/rs6000.md: Ditto.
2116 * config/rs6000/sync.md: Ditto.
2117 * config/rs6000/vsx.md: Ditto.
2119 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2121 * config/rs6000/altivec.md: Don't set length attribute to the default
2122 value, for branch instructions.
2123 * config/rs6000/darwin.md: Ditto.
2124 * config/rs6000/rs6000.md: Ditto.
2126 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2128 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2129 (unnamed conditional branch define_insn): Set length to 4 or 8
2130 depending on offset.
2131 (<bd>_<mode>): Similar, for alternative 0.
2132 (<bd>tf_<mode>): Ditto.
2134 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2136 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2138 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2140 * doc/rtl.texi: Replace old RTX class names with new names.
2143 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2145 * expmed.h (canonicalize_comparison): New declaration.
2146 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2147 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2148 * optabs.c (prepare_cmp_insn): Likewise.
2149 * rtl.h (unsigned_condition_p): New function which checks if a
2150 comparison operator is unsigned.
2152 2018-08-16 Nathan Sidwell <nathan@acm.org>
2154 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2155 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2157 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2160 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2161 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2162 (mov<mov>): ..this and enable unconditionally.
2164 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2166 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2168 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2170 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2171 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2172 "Common" with "Target".
2174 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2176 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2177 * doc/invoke.texi (mmitigate-rop): Remove.
2178 * config/i386/i386.c: Do not include "regrename.h".
2179 (ix86_rop_should_change_byte_p, reg_encoded_number)
2180 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2182 (ix86_reorg): Remove call to ix86_mitigate_rop.
2183 * config/i386/i386.md (attr "modrm_class"): Remove.
2184 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2185 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2186 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2188 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2190 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2191 allow folding of mergeh() and mergel() for the float and double types.
2192 (fold_mergehl_helper): Rework to handle building a permute tree
2195 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2197 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2200 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2202 * common.opt (fdiagnostics-show-labels): New option.
2203 * diagnostic-show-locus.c (class layout_range): Add field
2205 (class layout): Add field "m_show_labels_p".
2206 (layout_range::layout_range): Add param "label" and use it to
2208 (make_range): Pass in NULL for new "label" param of layout_range's
2210 (layout::layout): Initialize m_show_labels_p.
2211 (layout::maybe_add_location_range): Pass in loc_range->m_label
2212 when constructing layout_range instances.
2213 (struct line_label): New struct.
2214 (layout::print_any_labels): New member function.
2215 (layout::print_line): Call it if label-printing is enabled.
2216 (selftest::test_one_liner_labels): New test.
2217 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2218 * diagnostic.c (diagnostic_initialize): Initialize
2219 context->show_labels_p.
2220 * diagnostic.h (struct diagnostic_context): Add field
2222 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2223 -fno-diagnostics-show-labels.
2224 * dwarf2out.c (gen_producer_string): Add
2225 OPT_fdiagnostics_show_labels to the ignored options.
2226 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2228 (gcc_rich_location::maybe_add_expr): Likewise.
2229 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2230 label" param, defaulting to NULL.
2231 (gcc_rich_location::add_expr): Add "label" param.
2232 (gcc_rich_location::maybe_add_expr): Likewise.
2233 (class text_range_label): New class.
2234 (class range_label_for_type_mismatch): New class.
2235 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2236 of format_warning_va.
2237 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2238 * lto-wrapper.c (merge_and_complain): Add
2239 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2240 (append_compiler_options): Likewise to the dropped options.
2241 (append_diag_options): Likewise to the passed-on options.
2242 * opts.c (common_handle_option): Handle the new option.
2243 * selftest-diagnostic.c
2244 (test_diagnostic_context::test_diagnostic_context): Enable
2246 * substring-locations.c: Include "gcc-rich-location.h".
2247 (format_warning_n_va): Add "fmt_label" and "param_label" params
2248 and use them as appropriate.
2249 (format_warning_va): Add "fmt_label" and "param_label" params,
2250 passing them on to format_warning_n_va.
2251 (format_warning_at_substring): Likewise.
2252 (format_warning_at_substring_n): Likewise.
2253 * substring-locations.h (format_warning_va): Add "fmt_label" and
2254 "param_label" params.
2255 (format_warning_n_va): Likewise.
2256 (format_warning_at_substring): Likewise.
2257 (format_warning_at_substring_n): Likewise.
2258 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2260 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2263 * builtins.c (expand_builtin_memcmp): Do not expand the call
2264 when overflow is detected.
2266 2018-08-15 Martin Sebor <msebor@redhat.com>
2268 PR tree-optimization/71625
2269 * config/aarch64/aarch64-builtins.c
2270 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2272 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2274 * config/s390/s390.c (s390_reorg): Remove loop.
2276 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2279 (darwin_function_switched_text_sections): Delete.
2280 * gcc/config/darwin.h
2281 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2283 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2286 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2287 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2288 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2290 2018-08-15 Martin Liska <mliska@suse.cz>
2292 PR tree-optimization/86925
2293 * predict.c (expr_expected_value_1): When taking
2294 later predictor, assign also probability.
2295 Use fold_build2_initializer_loc in order to fold
2296 the expression in -frounding-math.
2298 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2300 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2302 (expand_vec_perm_1): Try the new method.
2304 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2307 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2308 Check whether lra_live_max_point is 0 before dividing.
2310 2018-08-14 Martin Sebor <msebor@redhat.com>
2312 PR tree-optimization/86650
2313 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2314 (vrp_prop::check_mem_ref): Same.
2316 2018-08-13 Liu Hao <lh_mouse@126.com>
2318 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2319 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2320 and clear it thereafter, as it only works for DBCS.
2322 2018-08-13 Liu Hao <lh_mouse@126.com>
2324 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2325 handle returned by _get_osf_handle().
2327 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2329 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2330 for folding vec_perm.
2332 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2334 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2335 Add support for gimple-folding of vec_pack() and vec_unpack()
2338 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2340 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2341 vec_xst variants to the list.
2342 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2343 vector loads and stores.
2345 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2347 * config.gcc (rs6000-ibm-aix4.x): Delete.
2348 (rs6000-ibm-aix5.1): Delete.
2349 (rs6000-ibm-aix5.2): Delete.
2350 (rs6000-ibm-aix5.3): Delete.
2351 * config/rs6000/aix43.h: Delete.
2352 * config/rs6000/aix51.h: Delete.
2353 * config/rs6000/aix52.h: Delete.
2354 * config/rs6000/t-aix43: Delete.
2356 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2358 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2360 (s390_decompose_address): Factor out constant pool ref
2363 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2365 * config/nds32/nds32-predicates.c
2366 (nds32_can_use_bclr_p): Change return type as bool.
2367 (nds32_can_use_bset_p): Ditto.
2368 (nds32_can_use_btgl_p): Ditto.
2369 (nds32_can_use_bitci_p): Ditto.
2370 * config/nds32/nds32-protos.h
2371 (nds32_can_use_bclr_p): Change declaration.
2372 (nds32_can_use_bset_p): Ditto.
2373 (nds32_can_use_btgl_p): Ditto.
2374 (nds32_can_use_bitci_p): Ditto.
2376 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2378 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2379 Support -msched-prolog-epilog option.
2380 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2382 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2384 * common/config/nds32/nds32-common.c
2385 (nds32_option_optimization_table): Enalbe -malways-align.
2387 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2389 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2391 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2392 OPT_misr_secure_ case.
2393 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2394 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2395 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2397 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2398 (nds32_isr_info): New field security_level.
2399 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2400 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2401 * config/nds32/nds32.opt (misr-secure): New option.
2402 * config/nds32/nds32_init.inc: New file.
2403 * config/nds32/nds32_isr.h: New file.
2405 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2407 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2408 Update comment for atomic instructions.
2409 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2410 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2412 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2413 load for __ATOMIC_SEQ_CST model.
2414 (atomic_loaddi_1): Remove float register target.
2415 (atomic_storedi): Handle CONST_INT values.
2416 (atomic_storedi_1): Remove float register source. Add special case
2418 (memory_barrier): New expander and insn.
2420 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2422 PR tree-optimization/86835
2423 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2424 new_stmt after def_gsi, make sure to insert new_square_stmt after
2425 that stmt, not 2 stmts before it.
2427 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2430 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2433 2018-08-10 Martin Liska <mliska@suse.cz>
2436 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2438 * builtins.c (expand_builtin_expect_with_probability):
2440 (expand_builtin_expect_with_probability): New function.
2441 (build_builtin_expect_predicate): Add new argumnet probability
2442 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2443 (fold_builtin_expect):
2446 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2447 * builtins.h (fold_builtin_expect): Set new argument.
2448 * doc/extend.texi: Document __builtin_expect_with_probability.
2449 * doc/invoke.texi: Likewise.
2450 * gimple-fold.c (gimple_fold_call): Pass new argument.
2451 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2452 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2453 * predict.c (get_predictor_value): New function.
2454 (expr_expected_value): Add new argument probability. Assume
2455 that predictor and probability are always non-null.
2456 (expr_expected_value_1): Likewise. For __builtin_expect and
2457 __builtin_expect_with_probability set probability. Handle
2458 combination in binary expressions.
2459 (tree_predict_by_opcode): Simplify code by simply calling
2460 get_predictor_value.
2461 (pass_strip_predict_hints::execute): Add handling of
2462 BUILT_IN_EXPECT_WITH_PROBABILITY.
2463 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2465 * tree.h (DECL_BUILT_IN_P): New function.
2467 2018-08-10 Martin Liska <mliska@suse.cz>
2469 PR tree-optimization/85799
2470 * passes.def: Add argument for pass_strip_predict_hints.
2471 * predict.c (class pass_strip_predict_hints): Add new argument
2473 (strip_predictor_early): New function.
2474 (pass_strip_predict_hints::execute): Call the function to
2476 (strip_predict_hints): New function.
2477 * predict.def: Fix comment.
2479 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2481 * Makefile.in: Clarify which tm.texi to copy over to assert the
2482 right to grant a GFDL license for all.
2484 2018-08-09 Jeff Law <law@redhat.com>
2486 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2489 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2491 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2494 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2496 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2497 reductions for variable-length vectors.
2499 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2502 * common.opt (fdiagnostics-show-line-numbers): New option.
2503 * diagnostic-show-locus.c (class layout): Add fields
2504 "m_show_line_numbers_p" and "m_linenum_width";
2505 (num_digits): New function.
2506 (test_num_digits): New function.
2507 (layout::layout): Initialize new fields. Update m_x_offset
2508 logic to handle any left margin.
2509 (layout::print_source_line): Print line number when requested.
2510 (layout::start_annotation_line): New member function.
2511 (layout::print_annotation_line): Call it.
2512 (layout::print_leading_fixits): Likewise.
2513 (layout::print_trailing_fixits): Likewise. Update calls to
2514 move_to_column for new parameter.
2515 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2516 it to potentially call start_annotation_line.
2517 (layout::show_ruler): Call start_annotation_line.
2518 (selftest::test_line_numbers_multiline_range): New selftest.
2519 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2520 and selftest::test_line_numbers_multiline_range.
2521 * diagnostic.c (diagnostic_initialize): Initialize
2522 show_line_numbers_p.
2523 * diagnostic.h (struct diagnostic_context): Add field
2524 "show_line_numbers_p".
2525 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2526 -fno-diagnostics-show-line-numbers.
2527 * dwarf2out.c (gen_producer_string): Add
2528 OPT_fdiagnostics_show_line_numbers to the ignored options.
2529 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2530 one setting" options.
2531 (append_compiler_options): Likewise to the dropped options.
2532 (append_diag_options): Likewise to the passed-on options.
2533 * opts.c (common_handle_option): Handle the new option.
2534 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2536 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2538 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2539 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2540 third argument of type "const signed char" to descriptions of
2541 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2542 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2543 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2544 __builtin_bcdsub_ov functions.
2546 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2548 PR tree-optimization/86858
2549 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2550 flow_bb_inside_loop_p calls.
2552 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2554 PR tree-optimization/86871
2555 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2556 instead of gimple_assign_lhs.
2558 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2561 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2562 register constraint to operand 0.
2563 (add<mode>3_carryinC): Likewise.
2564 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2566 2018-08-09 Martin Liska <mliska@suse.cz>
2569 * common.opt: Remove extra line.
2571 2018-08-09 Martin Liska <mliska@suse.cz>
2573 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2574 at the end of a line, make first letter capital and end up
2575 a sentence with a dot.
2576 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2577 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2578 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2579 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2580 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2581 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2582 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2583 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2584 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2585 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2586 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2587 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2588 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2589 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2590 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2591 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2592 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2593 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2595 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2598 * config/s390/s390.c (s390_option_override_internal): Reduce the
2599 stack-clash-protection-probe-interval param if it would be too big
2602 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2605 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2606 * config/m68k/m68k.c (handle_move_double): Don't call
2607 m68k_final_prescan_insn.
2608 (m68k_adjust_decorated_operand): Renamed from
2609 m68k_final_prescan_insn, remove first and third operand and
2611 (print_operand): Call it.
2612 (print_operand_address): Call it.
2614 2018-08-08 Nathan Sidwell <nathan@acm.org>
2616 * diagnostic.c (diagnostic_report_current_module): Use
2617 linemap_included_from & linemap_included_from_linemap.
2619 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2621 * config/aarch64/aarch64-cores.def: Add phecda core.
2622 * config/aarch64/aarch64-tune.md: Regenerate.
2623 * doc/invoke.texi: Add phecda core.
2625 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2628 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2630 * config/s390/s390.md ("movti"): Add more alternatives for
2631 constant to GPR copies.
2633 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2635 * config/s390/s390.c: Fix whitespace damage throughout the file.
2636 * config/s390/s390.h: Likewise.
2637 * config/s390/tpf.h: Likewise.
2639 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2641 * config/s390/s390.c (s390_loadrelative_operand_p):
2642 Remove TARGET_CPU_ZARCH usages.
2643 (s390_rtx_costs): Likewise.
2644 (s390_legitimate_constant_p): Likewise.
2645 (s390_cannot_force_const_mem): Likewise.
2646 (legitimate_reload_constant_p): Likewise.
2647 (s390_preferred_reload_class): Likewise.
2648 (legitimize_pic_address): Likewise.
2649 (legitimize_tls_address): Likewise.
2650 (s390_split_branches): Removed.
2651 (s390_add_execute): Removed.
2652 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2653 (s390_mainpool_start): Likewise.
2654 (s390_mainpool_finish): Likewise.
2655 (s390_mainpool_cancel): Removed.
2656 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2657 (s390_chunkify_cancel): Likewise.
2658 (s390_return_addr_rtx): Likewise.
2659 (s390_register_info): Remove split_branches_pending_p uages.
2660 (s390_optimize_register_info): Likewise.
2661 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2662 split_branches_pending_p usages.
2663 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2664 (s390_load_got): Likewise.
2665 (s390_expand_split_stack_prologue): Likewise.
2666 (output_asm_nops): Likewise.
2667 (s390_function_profiler): Likewise.
2668 (s390_emit_call): Likewise.
2669 (s390_conditional_register_usage): Likewise.
2670 (s390_optimize_prologue): Likewise.
2671 (s390_reorg): Remove TARGET_CPU_ZARCH and
2672 split_branches_pending_p usages.
2673 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2675 (s390_output_indirect_thunk_function): Likewise.
2676 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2677 (TARGET_CPU_ZARCH_P): Removed.
2678 (struct machine_function): Remove split_branches_pending_p.
2679 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2681 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2683 * common/config/s390/s390-common.c (processor_flags_table):
2685 * config.gcc: Remove with_arch/with_tune support.
2686 * config/s390/2064.md: Remove cpu attribute comparisons.
2687 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2689 * config/s390/linux.h (ASM_SPEC):
2690 Remove -march support.
2691 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2692 Use a table to get an arch level.
2693 * config/s390/s390-opts.h (enum processor_type):
2695 * config/s390/s390.c
2696 (processor_table): Remove entries, add arch_level values.
2697 (s390_issue_rate): Remove cases.
2698 (s390_option_override): Adjust
2699 s390_option_override_internal() call.
2700 (s390_option_override_internal): Remove deprecation warning.
2701 (s390_valid_target_attribute_tree): Adjust
2702 s390_option_override_internal() call.
2703 * config/s390/s390.h (struct s390_processor):
2704 Share with s390-c.c, add arch_level field.
2705 * config/s390/s390.md:
2706 Remove occurrences in cpu attribute.
2707 * config/s390/s390.opt: Remove -march/-mtune support.
2708 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2709 * doc/invoke.texi: Remove deprecation warning.
2711 2018-08-08 Luis Machado <luis.machado@linaro.org>
2713 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2715 (qdf24xx_tunings): Set vector cost structure to
2716 qdf24xx_vector_cost.
2718 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2719 <register_sextend>: Set to 3.
2721 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2724 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2725 * config/aarch64/aarch64-simd.md
2726 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2727 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2728 (aarch64_frecpx<mode>): ...this new pattern.
2729 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2730 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2732 2018-08-07 Martin Liska <mliska@suse.cz>
2735 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2736 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2737 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2738 * doc/extend.texi: Document that malloc attribute adds
2741 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2744 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2745 Define to speculation_safe_value_not_needed.
2747 2018-08-06 Jeff Law <law@redhat.com>
2749 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2750 the vr_values instance to cprop_into_stmt.
2751 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2752 (cprop_operand): Also query EVRP to determine if OP is a constant.
2754 2018-08-06 Nathan Sidwell <nathan@acm.org>
2756 * diagnostic.c (diagnostic_report_current_module): Reroll
2757 included-at loop. Translate text.
2759 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2761 * function-tests.c (selftest::test_expansion_to_rtl): Call
2762 free_after_compilation.
2764 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2766 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2768 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2770 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2771 loops with memory block operations from getting unrolled.
2773 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2776 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2777 Define to speculation_safe_value_not_needed.
2779 2018-08-06 Jeff Law <law@redhat.com>
2781 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2784 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2787 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2788 with all enabled __intN types.
2790 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2792 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2794 * alias.c (record_set): Check for clobber high.
2795 * cfgexpand.c (expand_gimple_stmt): Likewise.
2796 * combine-stack-adj.c (single_set_for_csa): Likewise.
2797 * combine.c (find_single_use_1): Likewise.
2798 (set_nonzero_bits_and_sign_copies): Likewise.
2799 (get_combine_src_dest): Likewise.
2800 (is_parallel_of_n_reg_sets): Likewise.
2801 (try_combine): Likewise.
2802 (record_dead_and_set_regs_1): Likewise.
2803 (reg_dead_at_p_1): Likewise.
2804 (reg_dead_at_p): Likewise.
2805 * dce.c (deletable_insn_p): Likewise.
2806 (mark_nonreg_stores_1): Likewise.
2807 (mark_nonreg_stores_2): Likewise.
2808 * df-scan.c (df_find_hard_reg_defs): Likewise.
2809 (df_uses_record): Likewise.
2810 (df_get_call_refs): Likewise.
2811 * dwarf2out.c (mem_loc_descriptor): Likewise.
2812 * haifa-sched.c (haifa_classify_rtx): Likewise.
2813 * ira-build.c (create_insn_allocnos): Likewise.
2814 * ira-costs.c (scan_one_insn): Likewise.
2815 * ira.c (equiv_init_movable_p): Likewise.
2816 (rtx_moveable_p): Likewise.
2817 (interesting_dest_for_shprep): Likewise.
2818 * jump.c (mark_jump_label_1): Likewise.
2819 * postreload-gcse.c (record_opr_changes): Likewise.
2820 * postreload.c (reload_cse_simplify): Likewise.
2821 (struct reg_use): Add source expr.
2822 (reload_combine): Check for clobber high.
2823 (reload_combine_note_use): Likewise.
2824 (reload_cse_move2add): Likewise.
2825 (move2add_note_store): Likewise.
2826 * print-rtl.c (print_pattern): Likewise.
2827 * recog.c (decode_asm_operands): Likewise.
2828 (store_data_bypass_p): Likewise.
2829 (if_test_bypass_p): Likewise.
2830 * regcprop.c (kill_clobbered_value): Likewise.
2831 (kill_set_value): Likewise.
2832 * reginfo.c (reg_scan_mark_refs): Likewise.
2833 * reload1.c (maybe_fix_stack_asms): Likewise.
2834 (eliminate_regs_1): Likewise.
2835 (elimination_effects): Likewise.
2836 (mark_not_eliminable): Likewise.
2837 (scan_paradoxical_subregs): Likewise.
2838 (forget_old_reloads_1): Likewise.
2839 * reorg.c (find_end_label): Likewise.
2840 (try_merge_delay_insns): Likewise.
2841 (redundant_insn): Likewise.
2842 (own_thread_p): Likewise.
2843 (fill_simple_delay_slots): Likewise.
2844 (fill_slots_from_thread): Likewise.
2845 (dbr_schedule): Likewise.
2846 * resource.c (update_live_status): Likewise.
2847 (mark_referenced_resources): Likewise.
2848 (mark_set_resources): Likewise.
2849 * rtl.c (copy_rtx): Likewise.
2850 * rtlanal.c (reg_referenced_p): Likewise.
2851 (single_set_2): Likewise.
2852 (noop_move_p): Likewise.
2853 (note_stores): Likewise.
2854 * sched-deps.c (sched_analyze_reg): Likewise.
2855 (sched_analyze_insn): Likewise.
2857 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2859 * cse.c (invalidate_reg): New function extracted from...
2860 (invalidate): ...here.
2861 (canonicalize_insn): Check for clobber high.
2862 (invalidate_from_clobbers): invalidate clobber highs.
2863 (invalidate_from_sets_and_clobbers): Likewise.
2864 (count_reg_usage): Check for clobber high.
2865 (insn_live_p): Likewise.
2866 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2867 (cselib_invalidate_regno): Check for clobber in setter.
2868 (cselib_invalidate_rtx): Pass through setter.
2869 (cselib_invalidate_rtx_note_stores):
2870 (cselib_process_insn): Check for clobber high.
2871 * cselib.h (cselib_invalidate_rtx): Add operand.
2873 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2875 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2876 (mark_not_eliminable): Likewise.
2877 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2878 * lra-lives.c (process_bb_lives): Check for clobber high.
2879 * lra.c (new_insn_reg): Remember clobber highs.
2880 (collect_non_operand_hard_regs): Check for clobber high.
2881 (lra_set_insn_recog_data): Likewise.
2882 (add_regs_to_insn_regno_info): Likewise.
2883 (lra_update_insn_regno_info): Likewise.
2885 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2887 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2888 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2890 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2892 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2893 (copy_insn_1): Likewise.
2894 (gen_hard_reg_clobber_high): New gen function.
2895 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2896 * genemit.c (gen_exp): Likewise.
2897 (gen_emit_seq): Pass through info.
2898 (gen_insn): Check for CLOBBER_HIGH.
2899 (gen_expand): Pass through info.
2900 (gen_split): Likewise.
2901 (output_add_clobbers): Likewise.
2902 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2903 (remove_clobbers): Likewise.
2904 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2906 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2908 * doc/rtl.texi (clobber_high): Add.
2909 (parallel): Add in clobber high
2910 * rtl.c (rtl_check_failed_code3): Add function.
2911 * rtl.def (CLOBBER_HIGH): Add expression.
2912 * rtl.h (RTL_CHECKC3): Add macro.
2913 (rtl_check_failed_code3): Add declaration.
2914 (XC3EXP): Add macro.
2916 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2919 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2920 cfun->machine->max_used_stack_alignment if needed.
2922 2018-08-04 Martin Sebor <msebor@redhat.com>
2924 PR tree-optimization/86571
2925 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2928 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2931 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2934 2018-08-03 Jeff Law <law@redhat.com>
2937 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2938 Define to speculation_safe_value_not_needed.
2940 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2942 * doc/gcov.texi (-x): Remove duplicate "to".
2943 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2944 (-Wif-not-aligned): Remove duplicate "is".
2945 (-flto): Remove duplicate "the".
2946 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2947 duplicate "v5.00.b".
2948 (MSP430 Options): Remove duplicate "and" from the description
2949 of "-mgprel-sec=regexp".
2950 (x86 Options): Remove duplicate copies of "vmldLog102" and
2951 vmlsLog104 from description of "-mveclibabi=type".
2953 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2955 * internal-fn.h (first_commutative_argument): Declare.
2956 * internal-fn.c (first_commutative_argument): New function.
2957 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2958 restrictions for pattern statements. Use first_commutative_argument
2959 to look for commutative operands in calls to internal functions.
2961 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2963 * Makefile.in (wide-int-range.o): New.
2964 * tree-vrp.c: Move all the wide_int_* functions to...
2965 * wide-int-range.cc: ...here.
2966 * tree-vrp.h: Move all the wide_int_* prototypes to...
2967 * wide-int-range.h: ...here.
2969 2018-08-03 Tom de Vries <tdevries@suse.de>
2971 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2973 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2974 * except.c (output_function_exception_table): Do early exit if
2975 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2977 2018-08-03 Martin Liska <mliska@suse.cz>
2979 * predict.c (dump_prediction): Change to 2 digits
2982 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2984 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2986 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2988 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2990 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2991 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2992 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2993 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2994 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2996 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2998 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2999 pp_take_prefix when saving the existing prefix.
3000 * diagnostic.c (diagnostic_append_note): Likewise.
3001 * langhooks.c (lhd_print_error_function): Likewise.
3002 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3003 param's type. Free the existing prefix.
3004 (pp_take_prefix): New function.
3005 (pretty_printer::pretty_printer): Drop the prefix parameter.
3006 Rename the length parameter to match the comment.
3007 (pretty_printer::~pretty_printer): Free the prefix.
3008 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3010 (struct pretty_printer): Drop the "const" from "prefix" field's
3011 type and clarify memory management.
3012 (pp_set_prefix): Drop the "const" from the 2nd param.
3013 (pp_take_prefix): New decl.
3015 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3017 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3018 for word_mode_ok here instead of passing as argument.
3019 (expand_block_compare): Change select_block_compare_mode() call.
3020 (expand_strncmp_gpr_sequence): New function.
3021 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3023 2018-08-02 Jeff Law <law@redhat.com>
3026 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3027 Define to speculation_safe_value_not_needed.
3030 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3031 Define to speculation_safe_value_not_needed.
3033 2018-08-02 Tom de Vries <tdevries@suse.de>
3036 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3037 function. Return UI_TARGET unconditionally.
3038 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3039 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3041 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3043 * genemit.c (print_overload_test): Fix typo.
3045 2018-08-02 Richard Biener <rguenther@suse.de>
3047 PR tree-optimization/86816
3048 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3049 which checks for value availability before querying it.
3050 (gvn_uses_equal): Use it.
3051 (same_succ_hash): Likewise.
3052 (gimple_equal_p): Likewise.
3054 2018-08-02 Nick Clifton <nickc@redhat.com>
3057 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3058 Define to speculation_safe_value_not_needed.
3061 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3062 Define to speculation_safe_value_not_needed.
3065 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3066 Define to speculation_safe_value_not_needed.
3069 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3070 Define to speculation_safe_value_not_needed.
3073 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3074 Define to speculation_safe_value_not_needed.
3077 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3078 Define to speculation_safe_value_not_needed.
3081 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3082 Define to speculation_safe_value_not_needed.
3085 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3086 Define to speculation_safe_value_not_needed.
3089 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3090 speculation_safe_value_not_needed.
3093 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3094 to speculation_safe_value_not_needed.
3096 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3098 * doc/md.texi: Expand the documentation of instruction names
3099 to mention port-local uses. Document '@' in pattern names.
3100 * read-md.h (overloaded_instance, overloaded_name): New structs.
3102 (md_reader::handle_overloaded_name): New member function.
3103 (md_reader::get_overloads): Likewise.
3104 (md_reader::m_first_overload): New member variable.
3105 (md_reader::m_next_overload_ptr): Likewise.
3106 (md_reader::m_overloads_htab): Likewise.
3107 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3108 m_next_overload_ptr and m_overloads_htab.
3109 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3110 (get_mode_token, get_code_token, get_int_token): New functions.
3111 (map_attr_string): Add an optional argument that passes back
3112 the associated iterator.
3113 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3114 (md_reader::handle_overloaded_name, add_overload_instance): New
3116 (apply_iterators): Handle '@' names. Report an error if '@'
3117 is used without iterators.
3118 (initialize_iterators): Initialize the new iterator_group fields.
3119 * genopinit.c (handle_overloaded_code_for)
3120 (handle_overloaded_gen): New functions.
3121 (main): Use them to print declarations of maybe_code_for_* and
3122 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3123 * genemit.c (print_overload_arguments, print_overload_test)
3124 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3125 (main): Use it to print definitions of maybe_code_for_* and
3126 maybe_gen_* functions.
3127 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3128 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3129 instead of explicit mode checks.
3130 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3131 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3132 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3133 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3134 (aarch64_expand_compare_and_swap): Likewise
3135 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3136 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3137 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3138 (aarch64_constant_pool_reload_icode): Delete.
3139 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3140 instead of aarch64_constant_pool_reload_icode. Use
3141 code_for_aarch64_reload_mov instead of explicit mode checks.
3142 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3143 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3144 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3145 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3146 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3147 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3148 (aarch64_atomic_load_op_code): Delete.
3149 (aarch64_emit_atomic_load_op): Likewise.
3150 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3151 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3152 instead of aarch64_emit_atomic_load_op.
3153 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3154 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3155 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3156 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3157 character before the pattern name.
3158 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3159 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3160 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3161 (aarch64_frecps<mode>): Likewise.
3162 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3163 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3164 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3165 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3166 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3168 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3170 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3171 Allow HFmode constants if TARGET_FP_F16INST.
3173 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3176 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3177 No longer check last store for clobber of address register.
3179 2018-08-02 Martin Liska <mliska@suse.cz>
3181 PR gcov-profile/86817
3182 * gcov.c (process_all_functions): New function.
3184 (process_file): Move functions processing to
3185 process_all_functions.
3187 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3189 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3190 "const" to the "gimple *" and "rtx_insn *" parameters.
3191 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3193 (dump_location_t::dump_location_t): Likewise.
3195 2018-08-01 Martin Sebor <msebor@redhat.com>
3197 PR tree-optimization/86650
3198 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3199 rather than a "gcall *". Directly pass the data of interest
3200 to percent_K_format, rather than building a temporary CALL_EXPR
3202 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3203 (gimple_fold_builtin_strncat): Adjust.
3204 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3205 gcall* argument with gimple*.
3206 * gimple-ssa-warn-restrict.c (check_call): Same.
3207 (wrestrict_dom_walker::before_dom_children): Same.
3208 (builtin_access::builtin_access): Same.
3209 (check_bounds_or_overlap): Same
3210 (maybe_diag_overlap): Same.
3211 (maybe_diag_offset_bounds): Same.
3212 * tree-diagnostic.c (default_tree_printer): Move usage of
3213 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3215 * tree-pretty-print.c (percent_K_format): Add argument.
3216 * tree-pretty-print.h: Add argument.
3217 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3218 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3219 (maybe_diag_stxncpy_trunc): Same.
3220 (handle_builtin_stxncpy): Same.
3221 (handle_builtin_strcat): Same.
3223 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3225 * match.pd: Optimise pointer range checks.
3227 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3229 PR tree-optimization/86758
3230 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3231 to remove pattern statements.
3233 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3235 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3236 result of dfs_enumerate_from when constructing stmt_vec_infos,
3237 instead of additionally calling get_loop_body.
3239 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3241 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3243 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3244 When creating an iv, assert that the step is not known to be zero.
3245 (vect_setup_realignment): Update call accordingly.
3246 * tree-vect-stmts.c (vectorizable_store): Likewise.
3247 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3249 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3251 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3252 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3253 (vectorizable_reduction): Likewise.
3254 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3255 (vect_detect_hybrid_slp_stmts): Likewise.
3256 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3258 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3260 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3261 (wide_int_set_zero_nonzero_bits): ...this.
3262 (zero_nonzero_bits_from_vr): Rename to...
3263 (vrp_set_zero_nonzero_bits): ...this.
3264 (extract_range_from_multiplicative_op_1): Abstract wide int
3266 (wide_int_range_multiplicative_op): ...here.
3267 (extract_range_from_binary_expr_1): Extract wide int binary
3268 operations into their own functions.
3269 (wide_int_range_lshift): New.
3270 (wide_int_range_can_optimize_bit_op): New.
3271 (wide_int_range_shift_undefined_p): New.
3272 (wide_int_range_bit_xor): New.
3273 (wide_int_range_bit_ior): New.
3274 (wide_int_range_bit_and): New.
3275 (wide_int_range_trunc_mod): New.
3276 (extract_range_into_wide_ints): New.
3277 (vrp_shift_undefined_p): New.
3278 (extract_range_from_multiplicative_op): New.
3279 (vrp_can_optimize_bit_op): New.
3280 * tree-vrp.h (value_range::dump): New.
3281 (wide_int_range_multiplicative_op): New.
3282 (wide_int_range_lshift):New.
3283 (wide_int_range_shift_undefined_p): New.
3284 (wide_int_range_bit_xor): New.
3285 (wide_int_range_bit_ior): New.
3286 (wide_int_range_bit_and): New.
3287 (wide_int_range_trunc_mod): New.
3288 (zero_nonzero_bits_from_bounds): Rename to...
3289 (wide_int_set_zero_nonzero_bits): ...this.
3290 (zero_nonzero_bits_from_vr): Rename to...
3291 (vrp_set_zero_nonzero_bits): ...this.
3292 (range_easy_mask_min_max): Rename to...
3293 (wide_int_range_can_optimize_bit_op): this.
3294 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3295 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3297 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3299 * tree-vectorizer.h (vect_orig_stmt): New function.
3300 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3301 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3302 (vect_create_epilog_for_reduction): Likewise.
3303 (vectorizable_live_operation): Likewise.
3304 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3305 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3306 * tree-vect-stmts.c (vectorizable_call): Likewise.
3307 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3309 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3311 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3313 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3314 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3315 (vect_transform_loop): Likewise.
3316 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3318 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3320 * tree-vectorizer.h (vect_schedule_slp): Return void.
3321 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3322 (vect_schedule_slp): Likewise.
3324 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3326 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3328 (vect_transform_loop): Update calls accordingly. Schedule SLP
3329 instances before the main loop, if any exist.
3331 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3333 PR tree-optimization/86749
3334 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3335 If the lhs is used in a COND_EXPR, check that it is being used
3336 as the "then" or "else" value.
3338 2018-08-01 Tom de Vries <tdevries@suse.de>
3341 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3342 speculation_safe_value_not_needed.
3344 2018-08-01 Richard Biener <rguenther@suse.de>
3346 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3349 2018-08-01 Martin Liska <mliska@suse.cz>
3351 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3352 format how successful transformation is dumped.
3353 (gimple_mod_pow2_value_transform): Likewise.
3354 (gimple_mod_subtract_transform): Likewise.
3355 (gimple_stringops_transform): Likewise.
3357 2018-08-01 Martin Liska <mliska@suse.cz>
3360 * value-prof.c (interesting_stringop_to_profile_p):
3361 Simplify the code and add BUILT_IN_MEMMOVE.
3362 (gimple_stringops_transform): Likewise.
3364 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3366 * config/aarch64/aarch64-simd.md
3367 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3368 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3369 use GPI iterator instead of SI mode.
3371 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3373 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3374 rs6000_speculation_barrier.
3375 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3376 new barrier pattern name.
3378 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3380 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3381 (speculation_barrier): New insn.
3383 2018-08-01 Richard Biener <rguenther@suse.de>
3386 * graphite.h: Include isl/id.h and isl/space.h to allow build
3389 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3392 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3393 mode for COFF targets.
3394 * defaults.h (TARGET_COFF): Define.
3395 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3396 TARGET_COFF): Define.
3397 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3398 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3399 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3401 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3403 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3404 * gimple-streamer-out.c (output_bb): Save it.
3405 * lto-streamer-in.c (input_struct_function_base): Restore
3406 instance discriminator if available. Create map on demand.
3407 * lto-streamer-out.c (output_struct_function_base): Save it if
3409 * final.c (decl_to_instance_map): Document LTO strategy.
3411 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3412 Olivier Hainque <hainque@adacore.com>
3414 * debug.h (decl_to_instance_map_t): New type.
3415 (decl_to_instance_map): Declare.
3416 (maybe_create_decl_to_instance_map): New inline function.
3417 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3418 to track basic block discriminators.
3419 (final_start_function_1): Initialize them.
3420 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3422 (decl_to_instance_map): New variable.
3423 (map_decl_to_instance, maybe_set_discriminator): New functions.
3424 (notice_source_line): Set discriminator.
3426 2018-07-31 Ian Lance Taylor <iant@golang.org>
3428 * targhooks.c (default_have_speculation_safe_value): Add
3431 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3433 * dump-context.h: Include "pretty-print.h".
3434 (dump_context::refresh_dumps_are_enabled): New decl.
3435 (dump_context::emit_item): New decl.
3436 (class dump_context): Add fields "m_test_pp" and
3438 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3439 (temp_dump_context::get_dumped_text): New decl.
3440 (class temp_dump_context): Add field "m_pp".
3441 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3442 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3444 (set_dump_file): Update for above change.
3445 (set_alt_dump_file): Likewise.
3446 (dump_loc): New overload, taking a pretty_printer *.
3447 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3448 to any test pretty-printer.
3449 (make_item_for_dump_gimple_stmt): New function, adapted from
3450 optinfo::add_gimple_stmt.
3451 (dump_context::dump_gimple_stmt): Call it, and use the result,
3452 eliminating the direct usage of dump_file and alt_dump_file in
3453 favor of indirectly using them via emit_item.
3454 (make_item_for_dump_gimple_expr): New function, adapted from
3455 optinfo::add_gimple_expr.
3456 (dump_context::dump_gimple_expr): Call it, and use the result,
3457 eliminating the direct usage of dump_file and alt_dump_file in
3458 favor of indirectly using them via emit_item.
3459 (make_item_for_dump_generic_expr): New function, adapted from
3461 (dump_context::dump_generic_expr): Call it, and use the result,
3462 eliminating the direct usage of dump_file and alt_dump_file in
3463 favor of indirectly using them via emit_item.
3464 (make_item_for_dump_printf_va): New function, adapted from
3465 optinfo::add_printf_va.
3466 (make_item_for_dump_printf): New function.
3467 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3468 and use the result, eliminating the direct usage of dump_file and
3469 alt_dump_file in favor of indirectly using them via emit_item.
3470 (make_item_for_dump_dec): New function.
3471 (dump_context::dump_dec): Call it, and use the result,
3472 eliminating the direct usage of dump_file and alt_dump_file in
3473 favor of indirectly using them via emit_item.
3474 (make_item_for_dump_symtab_node): New function, adapted from
3475 optinfo::add_symtab_node.
3476 (dump_context::dump_symtab_node): Call it, and use the result,
3477 eliminating the direct usage of dump_file and alt_dump_file in
3478 favor of indirectly using them via emit_item.
3479 (dump_context::begin_scope): Reimplement, avoiding direct usage
3480 of dump_file and alt_dump_file in favor of indirectly using them
3482 (dump_context::emit_item): New member function.
3483 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3484 Set up test pretty-printer on the underlying context. Call
3485 refresh_dumps_are_enabled.
3486 (temp_dump_context::~temp_dump_context): Call
3487 refresh_dumps_are_enabled.
3488 (temp_dump_context::get_dumped_text): New member function.
3489 (selftest::verify_dumped_text): New function.
3490 (ASSERT_DUMPED_TEXT_EQ): New macro.
3491 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3492 and then without optinfo enabled. Add uses of
3493 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3494 * dumpfile.h: Update comment for the dump_* API.
3495 * optinfo-emit-json.cc
3496 (selftest::test_building_json_from_dump_calls): Update for new
3497 param for temp_dump_context ctor.
3498 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3499 and "m_owned" field.
3500 (optinfo_item::~optinfo_item): Likewise.
3501 (optinfo::add_item): New member function.
3502 (optinfo::emit): Update comment.
3503 (optinfo::add_string): Delete.
3504 (optinfo::add_printf): Delete.
3505 (optinfo::add_printf_va): Delete.
3506 (optinfo::add_gimple_stmt): Delete.
3507 (optinfo::add_gimple_expr): Delete.
3508 (optinfo::add_tree): Delete.
3509 (optinfo::add_symtab_node): Delete.
3510 (optinfo::add_dec): Delete.
3511 * optinfo.h (class dump_context): New forward decl.
3512 (optinfo::add_item): New decl.
3513 (optinfo::add_string): Delete.
3514 (optinfo::add_printf): Delete.
3515 (optinfo::add_printf_va): Delete.
3516 (optinfo::add_gimple_stmt): Delete.
3517 (optinfo::add_gimple_expr): Delete.
3518 (optinfo::add_tree): Delete.
3519 (optinfo::add_symtab_node): Delete.
3520 (optinfo::add_dec): Delete.
3521 (optinfo::add_poly_int): Delete.
3522 (optinfo_item::optinfo_item): Remove "owned" param.
3523 (class optinfo_item): Remove field "m_owned".
3525 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3528 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3529 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3530 requested variable alignment.
3531 (expand_one_ssa_partition): Likewise.
3532 (expand_one_var): Likewise.
3534 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3536 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3537 to speculation_safe_value_not_needed.
3539 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3541 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3542 * targhooks.c (speculation_safe_value_not_needed): New function.
3543 * target.def (have_speculation_safe_value): Update documentation.
3544 * doc/tm.texi: Regenerated.
3546 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3548 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3549 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3551 (despeculate_copy<ALLI:mode>_insn): New insn.
3552 (despeculate_copyti_insn): New insn.
3553 (despeculate_simple<ALLI:mode>): New insn
3554 (despeculate_simpleti): New insn.
3555 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3557 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3558 aarch64_speculation_safe_value.
3559 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3561 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3563 * config/aarch64/aarch64-speculation.cc: New file.
3564 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3565 before pass_reorder_blocks.
3566 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3568 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3569 X14 and X15 when tracking speculation.
3570 * config/aarch64/aarch64.md (register name constants): Add
3571 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3572 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3573 (speculation_barrier): New insn attribute.
3574 (cmp<mode>): Allow SP in comparisons.
3575 (speculation_tracker): New insn.
3576 (speculation_barrier): Add speculation_barrier attribute.
3577 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3578 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3579 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3581 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3583 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3584 aarch64_track_speculation is true.
3585 (tb<optab><mode>1): Likewise.
3586 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3587 generate CB[N]Z when tracking speculation.
3588 (aarch64_split_compare_and_swap): Likewise.
3589 (aarch64_split_atomic_op): Likewise.
3591 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3593 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3595 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3597 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3598 (speculation_barrier): New insn.
3600 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3602 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3603 * config/arm/arm.md (speculation_barrier): New expand.
3604 (speculation_barrier_insn): New pattern.
3606 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3608 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3609 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3610 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3611 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3613 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3614 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3615 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3616 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3617 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3618 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3619 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3620 * builtins.c (expand_speculation_safe_value): New function.
3621 (expand_builtin): Call it.
3622 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3623 * doc/extend.texi: Document __builtin_speculation_safe_value.
3624 * doc/md.texi: Document "speculation_barrier" pattern.
3625 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3626 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3627 * doc/tm.texi: Regenerated.
3628 * target.def (have_speculation_safe_value, speculation_safe_value): New
3630 * targhooks.c (default_have_speculation_safe_value): New function.
3631 (default_speculation_safe_value): New function.
3632 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3633 (default_speculation_safe_value): Add prototype.
3635 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3637 * dump-context.h (dump_context::dump_loc): New decl.
3638 * dumpfile.c (dump_context::dump_loc): New member function.
3639 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3640 and dump_gimple_stmt.
3641 (dump_context::dump_gimple_expr_loc): Likewise, using
3643 (dump_context::dump_generic_expr_loc): Likewise, using
3645 (dump_context::dump_printf_loc_va): Likewise, using
3647 (dump_context::begin_scope): Explicitly using the global function
3648 "dump_loc", rather than the member function.
3650 2018-07-31 Martin Sebor <msebor@redhat.com>
3652 PR tree-optimization/86741
3653 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3655 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3657 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3658 depend on whether prefetch instructions will be emitted or not.
3659 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3660 will be emitted or not.
3661 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3662 (TARGET_SETMEM_PFD): New macros.
3664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3666 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3667 (NULL_STMT_VEC_INFO): Delete.
3668 (stmt_vec_info::operator*): Likewise.
3669 (stmt_vec_info::operator gimple *): Likewise.
3670 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3671 of NULL_STMT_VEC_INFO.
3672 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3673 (vect_reassociating_reduction_p): Likewise.
3674 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3675 (vectorizable_store): Likewise.
3676 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3677 (vec_info::free_stmt_vec_infos): Likewise.
3679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3681 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3682 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3686 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3687 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3688 (vec_info::free_stmt_vec_info): New private member functions.
3689 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3690 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3691 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3692 set_stmt_vec_info_vec and free_stmt_vec_infos.
3693 * tree-vect-loop.c (_loop_vec_info): Remove call to
3694 set_stmt_vec_info_vec.
3695 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3696 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3697 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3698 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3699 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3700 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3701 with the clearing in the xcalloc.
3702 (stmt_vec_info_vec): Delete.
3703 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3704 (vectorize_loops): Likewise.
3705 (vec_info::~vec_info): Remove argument from call to
3706 free_stmt_vec_infos.
3707 (vec_info::add_stmt): Remove vinfo argument from call to
3710 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3712 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3713 rather than a gimple stmt.
3714 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3715 information for pattern statements when passed the original
3716 statement; instead wait to be passed the pattern statement itself.
3717 Don't call set_vinfo_for_stmt here.
3718 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3719 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3720 stmt_vec_infos here.
3721 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3722 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3723 stmt_vec_infos entry.
3725 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3727 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3728 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3729 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3730 * tree-vect-stmts.c (vectorizable_call): Likewise.
3731 (vectorizable_simd_clone_call): Likewise.
3733 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3735 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3736 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3737 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3738 * tree-vect-loop.c (vect_transform_loop): Likewise.
3739 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3740 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3744 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3745 (vect_dr_stmt): Delete.
3746 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3747 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3749 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3750 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3751 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3752 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3753 (vect_analyze_data_refs): Likewise.
3754 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3756 (vect_find_same_alignment_drs): Likewise.
3757 (vect_slp_analyze_node_dependences): Update calls accordingly.
3758 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3759 instead of DR_VECT_AUX.
3760 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3761 of a vector data references. Use vec_info::lookup_dr instead of
3763 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3764 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3765 instead of DR_VECT_AUX.
3767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3769 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3771 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3773 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3774 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3775 (vect_gen_prolog_loop_niters): Likewise.
3777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3779 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3780 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3781 (vect_known_alignment_in_bytes, vect_dr_behavior)
3782 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3783 instead of data_references. Update calls to other routines for
3784 which the same change has been made.
3785 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3786 dr_vec_infos instead of stmt_vec_infos.
3787 (vect_analyze_data_ref_dependence): Update call accordingly.
3788 (vect_slp_analyze_data_ref_dependence)
3789 (vect_record_base_alignments): Use DR_VECT_AUX.
3790 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3791 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3792 (vector_alignment_reachable_p, vect_get_data_access_cost)
3793 (vect_peeling_supportable, vect_analyze_group_access_1)
3794 (vect_analyze_group_access, vect_analyze_data_ref_access)
3795 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3796 (vect_compile_time_alias, vect_small_gap_p)
3797 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3798 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3799 instead of data_references. Update calls to other routines for
3800 which the same change has been made.
3801 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3802 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3803 (vect_slp_analyze_and_verify_node_alignment)
3804 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3805 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3806 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3808 (_vect_peel_info::dr): Replace with...
3809 (_vect_peel_info::dr_info): ...this new field.
3810 (vect_peeling_hash_get_most_frequent)
3811 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3812 (vect_peeling_hash_get_lowest_cost):
3813 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3814 routines for which the same change has been made.
3815 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3817 * tree-vect-loop-manip.c (get_misalign_in_elems)
3818 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3820 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3821 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3822 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3823 (get_group_load_store_type, get_negative_load_store_type)
3824 (vect_get_data_ptr_increment, vectorizable_store)
3825 (vectorizable_load): Likewise.
3826 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3827 Update calls to other routines for which the same change has been made.
3829 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3831 * tree-vectorizer.h (vec_info::move_dr): New member function.
3832 (dataref_aux): Rename to...
3833 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3834 (_stmt_vec_info::dr_aux): Update accordingly.
3835 (_stmt_vec_info::data_ref_info): Delete.
3836 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3837 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3838 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3839 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3841 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3842 (STMT_VINFO_DR_INFO): New macro.
3843 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3844 (set_dr_misalignment): Update after rename of dataref_aux.
3845 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3846 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3847 initialization of STMT_VINFO_DATA_REF.
3848 * tree-vectorizer.c (vec_info::move_dr): New function.
3849 * tree-vect-patterns.c (vect_recog_bool_pattern)
3850 (vect_recog_mask_conversion_pattern)
3851 (vect_recog_gather_scatter_pattern): Use it.
3852 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3853 the "dr" and "stmt" fields of dr_vec_info instead of
3854 STMT_VINFO_DATA_REF.
3856 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3858 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3859 (is_pattern_stmt_p): Use it.
3860 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3861 on pattern statements.
3863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3865 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3866 original stmt as a stmt_vec_info rather than a gimple stmt.
3867 (vect_pattern_recog_1): Take the statement directly as a
3868 stmt_vec_info, rather than via a gimple_stmt_iterator.
3869 Update call to vect_mark_pattern_stmts.
3870 (vect_pattern_recog): Update calls accordingly.
3872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3874 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3875 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3876 a vect_def_type for the first argument.
3877 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3878 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3879 operand if it isn't defined by a vectorized statement.
3880 (vect_build_gather_load_calls): Remove the mask_dt argument and
3881 update calls to vect_get_vec_def_for_stmt_copy.
3882 (vectorizable_bswap): Likewise the dt argument.
3883 (vectorizable_call): Update calls to vectorizable_bswap and
3884 vect_get_vec_def_for_stmt_copy.
3885 (vectorizable_simd_clone_call, vectorizable_assignment)
3886 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3887 (vectorizable_comparison): Update calls to
3888 vect_get_vec_def_for_stmt_copy.
3889 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3891 (vect_get_loop_based_defs): Remove dt argument and update call
3892 to vect_get_vec_def_for_stmt_copy.
3893 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3894 and vect_get_vec_def_for_stmt_copy.
3895 (vectorizable_load): Update calls to vect_build_gather_load_calls
3896 and vect_get_vec_def_for_stmt_copy.
3897 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3898 (vectorizable_reduction, vectorizable_live_operation): Update calls
3899 to vect_get_vec_def_for_stmt_copy.
3901 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3903 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3904 and gimple stmt arguments with a stmt_vec_info.
3905 (vect_record_base_alignments): Update calls accordingly.
3906 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3907 and gimple stmt arguments with a stmt_vec_info.
3908 (vect_build_slp_tree_1): Remove vinfo argument and update call
3909 to vect_record_max_nunits.
3910 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3911 and vect_record_max_nunits.
3913 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3915 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3916 file and take a stmt_vec_info instead of a gimple stmt.
3917 (supportable_widening_operation, vect_finish_replace_stmt)
3918 (vect_finish_stmt_generation, vect_get_store_rhs)
3919 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3920 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3921 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3922 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3923 (vect_create_data_ref_ptr, bump_vector_ptr)
3924 (vect_permute_store_chain, vect_setup_realignment)
3925 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3926 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3927 (vectorizable_reduction, vectorizable_induction)
3928 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3929 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3930 than gimple stmts as arguments.
3931 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3932 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3933 (can_group_stmts_p, vect_check_gather_scatter)
3934 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3935 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3936 (vect_permute_load_chain, vect_shift_permute_load_chain)
3937 (vect_transform_grouped_load)
3938 (vect_record_grouped_load_vectors): Likewise.
3939 * tree-vect-loop.c (vect_fixup_reduc_chain)
3940 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3941 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3942 (vectorizable_reduction, vectorizable_induction)
3943 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3944 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3945 (vect_get_load_store_mask): Likewise.
3946 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3947 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3948 * tree-vect-stmts.c (vect_mark_relevant)
3949 (is_simple_and_all_uses_invariant)
3950 (exist_non_indexing_operands_for_use_p, process_use)
3951 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3952 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3953 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3954 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3955 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3956 (get_negative_load_store_type, get_load_store_type)
3957 (vect_check_load_store_mask, vect_check_store_rhs)
3958 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3959 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3960 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3961 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3962 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3963 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3964 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3965 (supportable_widening_operation): Likewise.
3967 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3969 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3970 a stmt_vec_info instead of a gcall.
3971 (vect_check_gather_scatter): Update call accordingly.
3972 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3974 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3975 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3976 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3977 instead of a gimple stmt.
3978 (vect_transform_loop): Update calls accordingly.
3979 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3980 stmt_vec_infos instead of gimple stmts.
3981 (vect_analyze_slp_instance): Update use accordingly.
3982 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3983 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3984 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3985 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3986 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3987 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3988 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3989 down to subroutines.
3991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3993 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3994 of the worklist from a vector of gimple stmts to a vector of
3996 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3997 (vect_mark_stmts_to_be_vectorized): Likewise
3999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4001 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4002 statement before passing it to vect_analyze_stmt.
4003 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4004 the chain of phi vector definitions. Track the exit phi via its
4006 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4007 STMT_VINFO_REDUC_DEF.
4008 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4009 stmt_vec_infos to handle the statement chains.
4010 (vect_get_slp_defs): Record the first statement in the node
4011 using a stmt_vec_info.
4012 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4013 statements here and pass their stmt_vec_info down to subroutines.
4014 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4015 down to vect_finish_stmt_generation.
4016 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4017 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4018 stmt_vec_infos to subroutines.
4019 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4022 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4024 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4025 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4026 (vect_permute_store_chain, vect_setup_realignment)
4027 (vect_permute_load_chain, vect_shift_permute_load_chain)
4028 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4029 stmts internally, and when passing values to other vectorizer routines.
4030 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4031 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4032 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4033 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4034 (vectorizable_reduction, vectorizable_induction)
4035 (vectorizable_live_operation, vect_transform_loop_stmt)
4036 (vect_transform_loop): Likewise.
4037 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4038 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4039 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4040 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4041 (vect_slp_analyze_node_operations_1): Likewise.
4042 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4043 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4044 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4045 (vect_finish_stmt_generation_1, get_group_load_store_type)
4046 (get_load_store_type, vect_build_gather_load_calls)
4047 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4048 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4049 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4050 (vectorizable_store, vectorizable_load, vectorizable_condition)
4051 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4052 (supportable_widening_operation): Likewise.
4053 (vect_get_vector_types_for_stmt): Likewise.
4054 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4058 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4059 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4060 (vect_permute_store_chain, vect_permute_load_chain)
4061 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4062 repeated stmt_vec_info lookups.
4063 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4064 (vect_update_ivs_after_vectorizer): Likewise.
4065 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4066 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4067 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4068 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4069 (vect_bb_slp_scalar_cost): Likewise.
4070 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4072 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4074 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4075 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4076 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4077 to get gassigns and gcalls, rather than operating on generc gimple
4079 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4080 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4081 (vectorizable_load, vect_analyze_stmt): Likewise.
4082 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4084 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4086 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4087 return stmt_vec_infos rather than gimple stmts. Do not accept
4089 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4091 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4092 Update use of get_later_stmt.
4093 (vect_get_constant_vectors): Update call accordingly.
4094 (vect_schedule_slp_instance): Likewise
4095 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4096 (vect_slp_analyze_instance_dependence): Likewise.
4097 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4099 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4101 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4102 (stmt_info_for_cost::stmt_info): ...this new field.
4103 (add_stmt_costs): Update accordingly.
4104 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4105 (vect_get_known_peeling_cost): Likewise.
4106 (vect_estimate_min_profitable_iters): Likewise.
4107 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4111 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4112 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4113 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4115 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4119 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4120 a gimple stmt to a stmt_vec_info.
4121 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4125 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4126 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4127 (_loop_vec_info::reduction_chains): Likewise.
4128 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4130 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4134 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4135 a gimple stmt to a stmt_vec_info.
4136 (_stmt_vec_info::next_element): Likewise.
4137 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4138 (vect_slp_analyze_and_verify_node_alignment)
4139 (vect_analyze_group_access_1, vect_analyze_group_access)
4140 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4141 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4142 (vect_supportable_dr_alignment): Update accordingly.
4143 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4144 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4145 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4146 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4147 * tree-vect-slp.c (vect_build_slp_tree_1)
4148 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4149 (vect_split_slp_store_group, vect_analyze_slp_instance)
4150 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4151 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4152 (get_group_load_store_type, get_load_store_type)
4153 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4154 (vect_transform_stmt, vect_remove_stores): Likewise.
4156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4158 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4160 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4161 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4162 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4163 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4164 (vector_alignment_reachable_p, vect_get_data_access_cost)
4165 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4166 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4167 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4168 (vect_analyze_group_access_1, vect_analyze_group_access)
4169 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4170 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4171 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4172 result of vect_dr_stmt and use the stmt_vec_info instead of
4173 the associated gimple stmt.
4174 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4175 (vect_gen_prolog_loop_niters): Likewise.
4176 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4180 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4181 to a vec<stmt_vec_info>.
4182 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4183 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4185 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4186 to a vec<stmt_vec_info>.
4187 (bst_traits::value_type, bst_traits::value_type): Likewise.
4188 (bst_traits::hash): Update accordingly.
4189 (vect_get_and_check_slp_defs): Change the stmts parameter from
4190 a vec<gimple *> to a vec<stmt_vec_info>.
4191 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4192 (vect_build_slp_tree): Likewise.
4193 (vect_build_slp_tree_2): Likewise. Update uses of
4194 SLP_TREE_SCALAR_STMTS.
4195 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4196 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4197 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4198 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4199 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4200 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4201 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4202 (vect_get_constant_vectors, vect_get_slp_defs)
4203 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4204 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4205 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4206 instead of gimple stmts.
4207 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4208 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4209 (vect_slp_analyze_instance_dependence): Update uses of
4210 SLP_TREE_SCALAR_STMTS.
4211 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4212 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4213 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4214 (get_initial_defs_for_reduction): Likewise.
4215 (vect_create_epilog_for_reduction): Likewise.
4216 (vectorize_fold_left_reduction): Likewise.
4217 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4218 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4219 (can_vectorize_live_stmts): Likewise.
4221 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4223 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4224 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4225 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4227 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4229 (gather_scalar_reductions): Update after above interface changes.
4230 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4231 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4233 (vect_force_simple_reduction): Likewise.
4234 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4235 LOOP_VINFO_REDUCTIONS.
4236 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4238 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4240 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4241 a gimple stmt to a stmt_vec_info.
4242 * tree-vect-loop.c (vect_active_double_reduction_p)
4243 (vect_force_simple_reduction, vectorizable_reduction): Update
4246 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4248 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4249 vec<gimple *> to a vec<stmt_vec_info>.
4250 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4251 the reduction_phis argument from a vec<gimple *> to a
4253 (vectorizable_reduction): Likewise the phis local variable that
4254 is passed to vect_create_epilog_for_reduction. Update for new type
4255 of SLP_TREE_VEC_STMTS.
4256 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4257 (vectorizable_live_operation): Likewise.
4258 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4259 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4263 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4264 a gimple stmt to a stmt_vec_info.
4265 (vectorizable_condition, vectorizable_live_operation)
4266 (vectorizable_reduction, vectorizable_induction): Pass back the
4267 vectorized statement as a stmt_vec_info.
4268 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4269 use of STMT_VINFO_VEC_STMT.
4270 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4271 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4272 as stmt_vec_infos rather than gimple stmts.
4273 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4275 (vectorizable_live_operation): Likewise.
4276 (vectorizable_reduction, vectorizable_induction): Likewise,
4277 updating use of STMT_VINFO_VEC_STMT.
4278 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4279 of STMT_VINFO_VEC_STMT.
4280 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4281 (vectorizable_simd_clone_call, vectorizable_conversion)
4282 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4283 (vectorizable_store, vectorizable_load, vectorizable_condition)
4284 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4285 from a gimple stmt to a stmt_vec_info.
4286 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4287 pointer to a stmt_vec_info to the vectorizable_* routines.
4289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4291 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4292 a gimple stmt to a stmt_vec_info.
4293 (is_pattern_stmt_p): Update accordingly.
4294 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4295 (vect_record_grouped_load_vectors): Likewise.
4296 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4297 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4298 (vect_model_reduction_cost): Likewise.
4299 (vect_create_epilog_for_reduction): Likewise.
4300 (vectorizable_reduction, vectorizable_induction): Likewise.
4301 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4302 Return the stmt_vec_info for the pattern statement.
4303 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4304 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4305 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4306 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4307 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4308 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4309 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4310 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4312 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4314 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4315 (vect_finish_stmt_generation): Likewise.
4316 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4317 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4318 (vect_build_gather_load_calls): Use the return value of the above
4319 functions instead of a separate call to vinfo_for_stmt. Use narrow
4320 scopes for the input gimple stmt and wider scopes for the associated
4321 stmt_vec_info. Use vec_info::lookup_def when setting these
4322 stmt_vec_infos from an SSA_NAME definition.
4323 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4324 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4325 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4326 (vectorizable_store, vectorizable_load, vectorizable_condition)
4327 (vectorizable_comparison): Likewise.
4328 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4329 (vectorizable_reduction): Likewise.
4331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4333 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4334 stmt_vec_info * parameter before the optional gimple **.
4335 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4336 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4337 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4338 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4339 (vectorizable_live_operation): Likewise.
4340 * tree-vect-patterns.c (type_conversion_p): Likewise.
4341 (vect_look_through_possible_promotion): Likewise.
4342 (vect_recog_rotate_pattern): Likewise.
4343 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4345 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4347 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4348 a typedef to a wrapper class.
4349 (NULL_STMT_VEC_INFO): New macro.
4350 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4351 (stmt_vec_info::operator*): New function.
4352 (stmt_vec_info::operator gimple *): Likewise.
4353 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4354 (add_stmt_costs): Likewise.
4355 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4356 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4357 (vect_get_known_peeling_cost): Likewise.
4358 (vect_estimate_min_profitable_iters): Likewise.
4359 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4360 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4361 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4362 (vectorizable_store, free_stmt_vec_infos): Likewise.
4363 (new_stmt_vec_info): Change return type of xcalloc to
4366 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4368 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4369 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4370 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4371 a single_imm_use-based sequence.
4372 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4376 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4377 * tree-vectorizer.c (vec_info::lookup_def): New function.
4378 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4379 (vect_widened_op_tree): Likewise.
4380 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4381 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4382 (vectorizable_reduction): Likewise.
4383 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4385 (vect_is_slp_reduction): Update calls accordingly. Use
4386 vec_info::lookup_def.
4387 (vect_is_simple_reduction): Likewise
4388 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4392 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4393 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4394 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4396 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4397 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4398 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4399 (vect_is_slp_reduction, vectorizable_induction)
4400 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4401 * tree-vect-patterns.c (vect_init_pattern_stmt):
4402 (vect_determine_min_output_precision_1, vect_determine_precisions)
4403 (vect_pattern_recog): Likewise.
4404 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4405 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4406 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4407 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4408 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4409 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4410 info field from a loop to a loop_vec_info.
4412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4414 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4415 (vec_info::add_stmt): Declare.
4416 * tree-vectorizer.c (vec_info::add_stmt): New function.
4417 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4418 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4419 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4420 (vectorizable_induction): Likewise.
4421 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4422 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4423 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4424 (vectorizable_load): Likewise.
4425 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4426 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4427 (vect_recog_gather_scatter_pattern): Likewise.
4428 (append_pattern_def_seq): Likewise. Remove a check that is
4429 performed by add_stmt itself.
4431 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4433 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4434 which make_ssa_name was called with new_stmt before new_stmt
4437 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4439 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4441 (vect_is_slp_reduction): ...here...
4442 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4443 that are already known to be false.
4445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4447 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4448 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4449 STMT_VINFO_NUM_SLP_USES when it's true.
4450 (vect_free_slp_instance): Add a final_p parameter and pass it to
4452 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4453 (vect_analyze_slp_instance): Likewise.
4454 (vect_slp_analyze_operations): Likewise.
4455 (vect_slp_analyze_bb_1): Likewise.
4456 * tree-vectorizer.c (vec_info): Likewise.
4457 * tree-vect-loop.c (vect_transform_loop): Likewise.
4459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4461 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4462 function is not called for second and subsequent members of
4465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4467 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4468 cases for nested loops from here to ...
4469 (vect_create_epilog_for_reduction): ...here. Only call
4470 vect_is_simple_use for inner-loop reductions.
4472 2018-07-31 Martin Liska <mliska@suse.cz>
4474 PR gcov-profile/85338
4475 PR gcov-profile/85350
4476 PR gcov-profile/85372
4477 * profile.c (struct location_triplet): New.
4478 (struct location_triplet_hash): Likewise.
4479 (output_location): Do not output a BB that
4480 is already recorded for a line.
4481 (branch_prob): Use streamed_locations.
4483 2018-07-31 Martin Liska <mliska@suse.cz>
4485 PR gcov-profile/85370
4486 * coverage.c (coverage_begin_function): Do not mark target
4487 clones as artificial functions.
4489 2018-07-31 Martin Liska <mliska@suse.cz>
4491 PR gcov-profile/83813
4492 PR gcov-profile/84758
4493 PR gcov-profile/85217
4494 PR gcov-profile/85332
4495 * profile.c (branch_prob): Do not record GOTO expressions
4496 for GIMPLE statements which locations are already streamed.
4498 2018-07-31 Olivier Hainque <hainque@adacore.com>
4500 * gcc.c (handle_spec_function): Accept a soft_matched_part
4501 argument, as do_spec_1. Pass it down to ...
4502 (eval_spec_function): Accept a soft_matched_part argument,
4503 and pass it down to ...
4504 (do_spec_2): Accept a soft_matched_part argument, and pass
4505 it down to do_spec_1.
4506 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4507 (handle_braces): Update call to handle_spec_function.
4508 (driver::set_up_specs): Update calls to do_spec_2.
4509 (compare_debug_dump_opt_spec_function): Likewise.
4510 (compare_debug_self_opt_spec_function): Likewise.
4512 2018-07-31 Olivier Hainque <hainque@adacore.com>
4514 * common.opt (nolibc): New option.
4515 * doc/invoke.texi (Link Options): Document it.
4516 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4517 * config/alpha/linux.h: Likewise.
4518 * config/arc/elf.h: Likewise.
4519 * config/arm/uclinux-elf.h: Likewise.
4520 * config/arm/unknown-elf.h: Likewise.
4521 * config/avr/avrlibc.h: Likewise.
4522 * config/bfin/bfin.h: Likewise.
4523 * config/bfin/linux.h: Likewise.
4524 * config/bfin/uclinux.h: Likewise.
4525 * config/darwin.h: Likewise.
4526 * config/darwin10.h: Likewise.
4527 * config/darwin12.h: Likewise.
4528 * config/gnu-user.h: Likewise.
4529 * config/lm32/uclinux-elf.h: Likewise.
4530 * config/pa/pa-hpux11.h: Likewise.
4531 * config/pa/pa64-hpux.h: Likewise.
4532 * config/sparc/sparc.h: Likewise.
4534 2018-07-31 Olivier Hainque <hainque@adacore.com>
4536 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4537 undefined variables.
4539 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4542 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4545 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4547 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4548 terminated string literal.
4550 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4552 PR rtl-optimization/85160
4553 * combine.c (is_just_move): New function.
4554 (try_combine): Allow combining two instructions into two if neither of
4555 the original instructions was a move.
4557 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4560 * doc/extend.texi (Global Register Variables): Discourage use of type
4562 (Local Register Variables): Likewise.
4564 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4566 PR tree-optimization/86506
4567 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4569 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4572 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4573 hard_regno, make sure no insn between `from` and `to` clobbers it.
4575 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4576 Tom de Vries <tdevries@suse.de>
4578 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4579 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4580 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4581 PTX_DEFAULT_RUNTIME_DIM.
4582 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4584 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4586 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4587 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4588 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4590 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4592 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4594 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4595 predicate to reflect toc fusion has been deleted.
4596 (toc_fusion_mem_raw): Delete, no longer used.
4597 (toc_fusion_mem_wrapped): Likewise.
4598 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4600 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4601 Delete, no longer used.
4602 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4603 meant to be used for toc fusion.
4604 (rs6000_debug_print_mode): Delete toc fusion debugging.
4605 (rs6000_debug_reg_global): Likewise.
4606 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4607 fusion and secondary reload support that were never used.
4608 (rs6000_option_override_internal): Delete TOC fusion, that was only
4609 partially defined, and it did not work unless you also used the
4611 (rs6000_legitimate_address_p): Delete TOC fusion support.
4612 (rs6000_opt_masks): Likewise.
4613 (fusion_wrap_memory_address): Delete function, no longer used.
4614 (fusion_split_address); Delete TOC fusion support.
4615 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4616 longer used with toc fusion being deleted.
4617 (TARGET_TOC_FUSION_FP): Likewise.
4618 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4620 (toc fusion spliter): Delete TOC fusion support.
4621 (toc_fusionload_<mode>): Likewise.
4622 (toc_fusionload_di): Likewise.
4623 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4624 longer needs to be named. Rename predicate to delete TOC fusion.
4625 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4626 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4627 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4628 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4629 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4631 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4633 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4634 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4635 __int128 in built-in function prototypes.
4636 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4637 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4639 2018-07-27 Martin Sebor <msebor@redhat.com>
4641 PR tree-optimization/86696
4642 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4643 types, including enums.
4644 (handle_char_store): Be prepared for the above function to fail.
4646 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4648 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4649 when optimization level is lower than 2 or optimize for size.
4651 2018-07-26 Martin Sebor <msebor@redhat.com>
4653 PR tree-optimization/86043
4654 PR tree-optimization/86042
4655 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4656 (get_string_cst_length): Rename...
4657 (get_min_string_length): ...to this. Add argument.
4658 (handle_char_store): Extend to handle multi-character stores by
4660 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4661 * tree.h (initializer_zerop): Add argument.
4663 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4666 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4667 declare target to variables if they have always,{to,from,tofrom} map
4670 2018-07-26 Martin Liska <mliska@suse.cz>
4673 * lto-wrapper.c: Add linker_output as prefix
4674 for ltrans_output_file.
4676 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4678 PR rtl-optimization/85805
4679 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4680 value for hard registers if that was written in the same mode.
4682 2018-07-26 Martin Liska <mliska@suse.cz>
4684 PR gcov-profile/86536
4685 * gcov.c (format_gcov): Use printf format %.*f directly
4686 and do not handle special values.
4688 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4690 * common/config/arc/arc-common.c (arc_option_optimization_table):
4691 Update default optimizations for size.
4693 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4695 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4696 * config/arc/constraints.md (CfZ): New constraint.
4697 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4698 (subsf3_fpu): Likewise.
4699 (cmpsf_fpu): Likewise.
4700 (cmpsf_fpu_uneq): Likewise.
4702 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4704 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4706 (arc_is_uncached_mem_p): uncached applies to both the variable and
4709 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4711 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4714 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4716 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4717 field "m_scopes" from vec to auto_vec.
4719 2018-07-25 Martin Liska <mliska@suse.cz>
4721 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4724 2018-07-25 Richard Biener <rguenther@suse.de>
4727 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4728 special wrt context_die late.
4729 (gen_subprogram_die): Re-use DIEs in local scope.
4731 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4733 PR tree-optimization/86644
4734 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4736 2018-07-25 Martin Liska <mliska@suse.cz>
4739 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4740 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4742 2018-07-25 Martin Liska <mliska@suse.cz>
4745 * params.def: Explain ASan abbreviation and provide
4746 a documentation link.
4748 2018-07-24 Martin Sebor <msebor@redhat.com>
4750 PR tree-optimization/86622
4751 PR tree-optimization/86532
4752 * builtins.h (string_length): Declare.
4753 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4754 (check_access): Be prepared for non-constant length ranges.
4755 (string_length): Make extern.
4756 * expr.c (string_constant): Only handle the minor non-constant
4757 array index. Use string_constant to compute the length of
4758 a generic string constant.
4760 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4762 PR tree-optimization/86618
4763 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4764 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4766 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4768 PR tree-optimization/86636
4769 * json.cc (json::object::set): Fix comment. Add assertions.
4770 (json::array::append): Move here from json.h. Add comment and an
4772 (json::string::string): Likewise.
4773 * json.h (json::array::append): Move to json.cc.
4774 (json::string::string): Likewise.
4775 * optinfo-emit-json.cc
4776 (optrecord_json_writer::impl_location_to_json): Assert that we
4777 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4778 wrapper around it. Expand the location once, rather than three
4780 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4781 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4783 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4784 places. Fix some overlong lines.
4786 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4788 * config/aarch64/aarch64-simd.md
4789 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4790 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4791 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4792 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4793 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4794 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4795 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4796 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4797 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4799 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4802 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4803 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4804 and abs_d == d, do the power of two handling if profitable.
4806 2018-07-24 Richard Biener <rguenther@suse.de>
4808 * match.pd: Add BIT_FIELD_REF canonicalizations.
4810 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4813 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4815 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4817 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4818 terminated STRING_CST object.
4820 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4822 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4824 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4826 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4827 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4828 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4829 the elements into a register.
4830 (rs6000_split_v4si_init_di_reg): Delete.
4831 (rs6000_split_v4si_init): Delete.
4832 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4833 (vsx_init_v4si): Rewrite as a define_expand.
4835 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4837 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4838 zero_extend argument from memory): New.
4840 2018-07-22 Martin Sebor <msebor@redhat.com>
4843 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4844 diagnosing calls with unknown arguments unless -Walloca-larger-than
4845 is restricted to less than PTRDIFF_MAX bytes.
4847 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4849 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4851 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4853 * pretty-print.c (text_info::set_location): Remove redundant
4854 "line_table" parameter from call to rich_location::set_range.
4856 2018-07-20 Martin Sebor <msebor@redhat.com>
4859 * builtins.c (expand_builtin_alloca): Adjust.
4860 * calls.c (alloc_max_size): Simplify.
4861 * cgraphunit.c (cgraph_node::expand): Adjust.
4862 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4864 (frame_larger_than_size): Same.
4865 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4866 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4868 * doc/invoke.texi (GCC Command Options): Document option arguments.
4869 Explain byte-size arguments and suffixes.
4870 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4871 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4872 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4873 * doc/options.texi (UInteger): Expand.
4874 (Host_Wide_Int, ByteSize): Document new properties.
4875 * final.c (final_start_function_1): Include sizes in an error message.
4876 * function.c (frame_offset_overflow): Same.
4877 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4878 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4879 Diagnose unbounded alloca calls only for limits of less than
4881 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4882 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4884 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4885 only for limits of less than PTRDIFF_MAX.
4886 * langhooks-def.h (lhd_handle_option): Change function argument
4888 * langhooks.c (lhd_handle_option): Same.
4889 * langhooks.h (handle_option): Same.
4890 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4892 (var_type, var_type_struct): Same.
4893 (var_set): Handle ByteSize flag.
4894 * optc-gen.awk: Add comments to output to ease debugging. Make
4895 use of HOST_WIDE_INT where appropriate.
4896 * opts-gen-save.awk: Use %lx to format unsigned long.
4897 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4898 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4899 arguments. Parse bytes-size suffixes.
4900 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4901 (enum_value_to_arg): Same.
4902 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4903 (handle_option): Adjust.
4904 (generate_option): Change function argument to HOST_WIDE_INT.
4905 (cmdline_handle_error): Adjust.
4906 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4907 (set_option): Change function argument to HOST_WIDE_INT.
4908 (option_enabled): Handle cl_host_wide_int.
4909 (get_option_state): Handle CLVC_SIZE.
4910 (control_warning_option): Same.
4911 * opts.c (common_handle_option): Change function argument to
4912 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4913 OPT_Wvla_larger_than_.
4914 * opts.h (enum cl_var_type): Add an enumerator.
4915 * stor-layout.c (layout_decl): Print a more meaningful warning.
4916 * toplev.c (output_stack_usage): Adjust.
4918 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4920 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4921 call to inline_expand_builtin_string_cmp.
4922 (expand_builtin_strcmp): Likewise.
4923 (expand_builtin_strncmp): Likewise.
4924 (inline_string_cmp): Delete the last parameter, change char_type_node
4925 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4927 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4928 the inlining expansion on target where the type of the call has same or
4929 narrower precision than unsigned char.
4931 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4933 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4934 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4935 * common.opt (fsave-optimization-record): New option.
4936 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4937 * doc/invoke.texi (-fsave-optimization-record): New option.
4938 * dumpfile.c: Include "optinfo-emit-json.h".
4939 (struct kv_pair): Move to coretypes.h.
4940 (optgroup_options): Make non-static.
4941 (dump_context::end_scope): Call
4942 optimization_records_maybe_pop_dump_scope.
4943 * dumpfile.h (optgroup_options): New decl.
4944 * json.cc: New file.
4946 * optinfo-emit-json.cc: New file.
4947 * optinfo-emit-json.h: New file.
4948 * optinfo.cc: Include "optinfo-emit-json.h".
4949 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4950 (optinfo_enabled_p): Check optimization_records_enabled_p.
4951 (optinfo_wants_inlining_info_p): Likewise.
4952 * optinfo.h: Update comment.
4953 * profile-count.c (profile_quality_as_string): New function.
4954 * profile-count.h (profile_quality_as_string): New decl.
4955 (profile_count::quality): New accessor.
4956 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4957 and optinfo_emit_json_cc_tests.
4958 * selftest.h (selftest::json_cc_tests): New decl.
4959 (selftest::optinfo_emit_json_cc_tests): New decl.
4960 * toplev.c: Include "optinfo-emit-json.h".
4961 (compile_file): Call optimization_records_finish.
4962 (do_compile): Call optimization_records_start.
4963 * tree-ssa-live.c: Include optinfo.h.
4964 (remove_unused_scope_block_p): Retain inlining information if
4965 optinfo_wants_inlining_info_p returns true.
4967 2018-07-20 Richard Biener <rguenther@suse.de>
4970 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4971 to cover -flto-partition=none.
4973 2018-07-20 Martin Liska <mliska@suse.cz>
4975 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4976 (get_decl_source_range): Remove unused function.
4978 2018-07-20 Richard Biener <rguenther@suse.de>
4980 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4981 (struct vn_phi_s): Likewise.
4982 (struct vn_reference_s): Likewise.
4983 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4984 for searching the slot of an entry known to be in the hash itself.
4985 (vn_phi_hasher::equal): Likewise.
4986 (vn_reference_hasher::equal): Likewise.
4987 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4989 (optimistic_info, current_info): Remove, keeping only valid_info.
4990 (vn_reference_lookup_1): Remove fallback lookup.
4991 (vn_reference_lookup_2): Likewise.
4992 (vn_nary_op_lookup_1): Likewise.
4993 (vn_phi_lookup): Likewise.
4994 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4996 (vn_reference_insert): Adjust, chain the inserted hash element
4997 at last_inserted_ref.
4998 (vn_reference_insert_pieces): Likewise.
4999 (visit_reference_op_call): Likewise.
5000 (vn_nary_op_insert_into): Chain the inserted hash element at
5002 (vn_nary_op_insert_pieces): Adjust.
5003 (vn_nary_op_insert): Likewise.
5004 (vn_nary_op_insert_stmt): Likewise.
5005 (vn_phi_insert): Adjust, chain the inserted hash element at
5007 (process_scc): Remove clearing and copying the optimistic
5008 table. Instead remove elements inserted during an optimistic
5009 iteration from the single table we maintain.
5010 (init_scc_vn): Adjust.
5011 (free_scc_vn): Likewise.
5012 (sccvn_dom_walker::record_cond): Likewise.
5013 (sccvn_dom_walker::after_dom_children): Likewise.
5015 2018-07-19 Martin Sebor <msebor@redhat.com>
5017 PR tree-optimization/84047
5018 PR tree-optimization/83776
5019 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5020 (check_array_bounds): Call it.
5022 2018-07-19 Martin Sebor <msebor@redhat.com>
5024 * align.h (align_flags): Use member initialization.
5026 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5028 * Makefile.in (OBJS): Add optinfo.o.
5029 * coretypes.h (class symtab_node): New forward decl.
5030 (struct cgraph_node): New forward decl.
5031 (class varpool_node): New forward decl.
5032 * dump-context.h: New file.
5033 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5035 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5036 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5037 (set_alt_dump_file): Likewise.
5038 (dump_context::~dump_context): New dtor.
5039 (dump_gimple_stmt): Move implementation to...
5040 (dump_context::dump_gimple_stmt): ...this new member function.
5041 Add the stmt to any pending optinfo, creating one if need be.
5042 (dump_gimple_stmt_loc): Move implementation to...
5043 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5044 Start a new optinfo and add the stmt to it.
5045 (dump_gimple_expr): Move implementation to...
5046 (dump_context::dump_gimple_expr): ...this new member function.
5047 Add the stmt to any pending optinfo, creating one if need be.
5048 (dump_gimple_expr_loc): Move implementation to...
5049 (dump_context::dump_gimple_expr_loc): ...this new member function.
5050 Start a new optinfo and add the stmt to it.
5051 (dump_generic_expr): Move implementation to...
5052 (dump_context::dump_generic_expr): ...this new member function.
5053 Add the tree to any pending optinfo, creating one if need be.
5054 (dump_generic_expr_loc): Move implementation to...
5055 (dump_context::dump_generic_expr_loc): ...this new member
5056 function. Add the tree to any pending optinfo, creating one if
5058 (dump_printf): Move implementation to...
5059 (dump_context::dump_printf_va): ...this new member function. Add
5060 the text to any pending optinfo, creating one if need be.
5061 (dump_printf_loc): Move implementation to...
5062 (dump_context::dump_printf_loc_va): ...this new member function.
5063 Start a new optinfo and add the stmt to it.
5064 (dump_dec): Move implementation to...
5065 (dump_context::dump_dec): ...this new member function. Add the
5066 value to any pending optinfo, creating one if need be.
5067 (dump_context::dump_symtab_node): New member function.
5068 (dump_context::get_scope_depth): New member function.
5069 (dump_context::begin_scope): New member function.
5070 (dump_context::end_scope): New member function.
5071 (dump_context::ensure_pending_optinfo): New member function.
5072 (dump_context::begin_next_optinfo): New member function.
5073 (dump_context::end_any_optinfo): New member function.
5074 (dump_context::s_current): New global.
5075 (dump_context::s_default): New global.
5076 (dump_scope_depth): Delete global.
5077 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5078 (dump_symtab_node): New function.
5079 (get_dump_scope_depth): Reimplement in terms of dump_context.
5080 (dump_begin_scope): Likewise.
5081 (dump_end_scope): Likewise.
5082 (selftest::temp_dump_context::temp_dump_context): New ctor.
5083 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5084 (selftest::verify_item): New function.
5085 (ASSERT_IS_TEXT): New macro.
5086 (ASSERT_IS_TREE): New macro.
5087 (ASSERT_IS_GIMPLE): New macro.
5088 (selftest::test_capture_of_dump_calls): New test.
5089 (selftest::dumpfile_c_tests): Call it.
5090 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5091 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5092 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5093 descriptive comment.
5094 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5095 (dump_node, dump_bb): Move these unrelated decls.
5096 (class dump_manager): Add leading comment.
5097 * optinfo.cc: New file.
5098 * optinfo.h: New file.
5100 2018-07-19 Michael Collison <michael.collison@arm.com>
5101 Richard Henderson <rth@redhat.com>
5103 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5104 (subti): Handle op1 zero.
5105 (subvti4, usub4ti4): New.
5106 (*sub<GPI>3_compare1_imm): New.
5107 (sub<GPI>3_carryinCV): New.
5108 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5109 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5111 2018-07-19 Michael Collison <michael.collison@arm.com>
5112 Richard Henderson <rth@redhat.com>
5114 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5115 (addti3): Create simpler code if low part is already known to be 0.
5116 (addvti4, uaddvti4): New.
5117 (*add<GPI>3_compareC_cconly_imm): New.
5118 (*add<GPI>3_compareC_cconly): New.
5119 (*add<GPI>3_compareC_imm): New.
5120 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5121 handle constants within this pattern..
5122 (*add<GPI>3_compareV_cconly_imm): New.
5123 (*add<GPI>3_compareV_cconly): New.
5124 (*add<GPI>3_compareV_imm): New.
5125 (add<GPI>3_compareV): New.
5126 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5127 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5128 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5129 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5130 with 'comparison' operator.
5131 (*add<GPI>3_compareV_cconly_imm): Ditto.
5132 (*add<GPI>3_compareV_cconly): Ditto.
5133 (*add<GPI>3_compareV_imm): Ditto.
5134 (add<GPI>3_compareV): Ditto.
5135 (add<mode>3_carryinC): Ditto.
5136 (*add<mode>3_carryinC_zero): Ditto.
5137 (*add<mode>3_carryinC): Ditto.
5138 (add<mode>3_carryinV): Ditto.
5139 (*add<mode>3_carryinV_zero): Ditto.
5140 (*add<mode>3_carryinV): Ditto.
5142 2018-07-19 Michael Collison <michael.collison@arm.com>
5143 Richard Henderson <rth@redhat.com>
5145 * config/aarch64/aarch64-modes.def (CC_V): New.
5146 * config/aarch64/aarch64-protos.h
5147 (aarch64_addti_scratch_regs): Declare
5148 (aarch64_subvti_scratch_regs): Declare.
5149 (aarch64_expand_subvti): Declare.
5150 (aarch64_gen_unlikely_cbranch): Declare
5151 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5152 for signed overflow using CC_Vmode.
5153 (aarch64_get_condition_code_1): Handle CC_Vmode.
5154 (aarch64_gen_unlikely_cbranch): New function.
5155 (aarch64_addti_scratch_regs): New function.
5156 (aarch64_subvti_scratch_regs): New function.
5157 (aarch64_expand_subvti): New function.
5159 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5161 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5163 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5164 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5167 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5170 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5171 address check not strict.
5173 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5175 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5177 (store_pair_lanes<mode>): Likewise.
5178 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5179 enum value 'ADDR_QUERY_LDP_STP_N'.
5180 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5181 (aarch64_print_address_internal): Add declaration.
5182 (aarch64_print_ldpstp_address): Remove.
5183 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5184 (aarch64_print_operand): Change printing of 'y'.
5185 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5186 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5187 'true' rather than '1'.
5188 * config/aarch64/constraints.md (Uml): Likewise.
5189 (Uml): Rename to Umn.
5192 2018-07-19 Richard Biener <rguenther@suse.de>
5194 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5196 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5197 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5198 (vn_reference_hasher): Likewise.
5199 (struct vn_tables_s): Remove obstack and alloc-pool members.
5200 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5201 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5202 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5203 (vn_reference_insert_pieces): Likewise.
5204 (alloc_vn_nary_op_noinit): Adjust.
5205 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5206 (vn_phi_eq): Adjust.
5207 (shared_lookup_phiargs): Remove.
5208 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5209 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5210 (visit_reference_op_call): Likewise.
5211 (copy_nary, copy_phi, copy_reference): Remove.
5212 (process_scc): Rewind the obstack when iterating. Do not
5213 copy the elements to valid_info but just move them from one
5214 hashtable to the other.
5215 (allocate_vn_table): Adjust.
5216 (free_vn_table): Likewise.
5217 (init_scc_vn): Likewise.
5218 (free_scc_vn): Likewise.
5220 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5223 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5224 indirect_return as function type attribute.
5225 (ix86_attribute_table): Change indirect_return to function
5227 * doc/extend.texi: Update indirect_return attribute.
5229 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5231 * wide-int.h (widest2_int): New.
5232 * gimple-fold.c (arith_overflowed_p): Use it.
5233 * tree.h (widest2_int_cst): New.
5234 * tree-vrp.c (wide_int_binop_overflow): Rename from
5235 vrp_int_const_binop.
5236 Rewrite to work on trees.
5237 (extract_range_from_multiplicative_op_1): Abstract code to...
5238 (wide_int_range_min_max): ...here.
5239 (wide_int_range_cross_product): ...and here.
5240 (extract_range_from_binary_expr_1): Abstract overflow code to...
5241 (wide_int_range_mult_wrapping): ...here.
5242 * tree-vrp.h (wide_int_range_cross_product): New.
5243 (wide_int_range_mult_wrapping): New.
5245 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5246 Julia Koval <julia.koval@intel.com>
5248 * config/i386/x86-tune-costs.h (skylake_memcpy,
5249 skylake_memset): Replace rep_prefix with unrolling for size 512.
5251 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5254 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5255 comparision with EQ_EXPR in last stmt.
5257 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5259 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5260 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5261 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5262 previously known as "PowerPC AltiVec Built-in Functions". Move
5263 some material to new subsubsections "PowerPC AltiVec Built-in
5264 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5266 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5267 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5268 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5269 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5271 2018-07-18 Richard Biener <rguenther@suse.de>
5273 PR tree-optimization/86557
5274 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5277 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5279 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5281 2018-07-17 Jeff Law <law@redhat.com>
5283 * config/arm/arm.c (get_label_padding): Update for recent
5284 changes to label_to_alignment.
5286 PR tree-optimization/86010
5287 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5289 * config/mips/mips.c (vr4130_align_insns): Update for recent
5290 changes to label_to_alignment.
5292 * config/frv/frv.c (frv_label_align): Update for recent changes
5293 to label_to_alignment.
5295 * config/nios2/nios2.c (nios2_label_align): Update for recent
5296 changes which dropped ALIGN_LABELS_LOG.
5298 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5300 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5301 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5303 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5305 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5306 deprecated align_labels_log.
5308 2018-07-17 Richard Biener <rguenther@suse.de>
5311 * dwarf2out.c (init_sections_and_labels): Always generate
5312 a debug_line_str_section for early LTO debug.
5313 (dwarf2out_finish): Reset debug_line_str_hash output early.
5314 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5316 (dwarf2out_early_finish): Output debug_line_str.
5318 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5320 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5321 index register on z196 or later.
5323 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5325 * config/s390/s390.c (s390_default_align): Set default function
5327 (s390_override_options_after_change): Call s390_default align.
5328 (s390_option_override_internal): Call s390_default_align.
5329 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5331 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5334 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5335 to _looptemp_ clauses, other than the first two.
5337 2018-07-17 Martin Liska <mliska@suse.cz>
5339 * opts.c: Do not enable OPT_falign_* for -Os.
5341 2018-07-17 Martin Liska <mliska@suse.cz>
5343 * align.h (MAX_CODE_ALIGN): New.
5344 (MAX_CODE_ALIGN_VALUE): New.
5345 * common/config/i386/i386-common.c (ix86_handle_option):
5346 (MAX_CODE_ALIGN): Moved to align.h.
5347 * final.c (MAX_CODE_ALIGN): Likewise.
5348 * opts.c (parse_and_check_align_values):
5349 (MAX_CODE_ALIGN): Likewise.
5350 (MAX_CODE_ALIGN_VALUE): Likewise.
5352 2018-07-17 Martin Liska <mliska@suse.cz>
5354 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5355 in order to fulfil coding style.
5356 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5357 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5358 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5359 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5360 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5361 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5362 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5363 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5364 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5366 2018-07-17 Martin Liska <mliska@suse.cz>
5368 * align.h: New file.
5369 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5371 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5372 align_flags of label_to_alignment.
5373 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5375 * config/m68k/m68k.c: Do not use removed align_labels_value and
5377 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5378 (LOOP_ALIGN): Likewise.
5379 (LABEL_ALIGN): Likewise.
5380 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5381 Remove not used macro.
5382 (rs6000_loop_align): Change return type to align_flags.
5383 (rs6000_loop_align_max_skip): Remove.
5384 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5385 Change return type to align_flags.
5386 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5387 Remove not used macro.
5388 (rs6000_loop_align): Change return type to align_flags.
5389 (rs6000_loop_align_max_skip): Remove.
5390 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5391 * config/rx/rx-protos.h (rx_align_for_label): Make it
5393 * config/rx/rx.c (rx_align_for_label): Change return type
5395 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5397 into align_flags class.
5398 (LABEL_ALIGN): Likewise.
5399 (LOOP_ALIGN): Likewise.
5400 * config/s390/s390.c (s390_label_align): Use align_flags
5402 (s390_asm_output_function_label): Likewise.
5403 * config/sh/sh.c (sh_override_options_after_change):
5404 Use align_flags class directly without macros.
5405 (find_barrier): Likewise.
5406 (barrier_align): Likewise.
5407 (sh_loop_align): Likewise.
5408 * config/spu/spu.c (spu_option_override):
5409 Use align_flags_tuple::get_value instead of removed macros.
5410 (spu_sched_init): Likewise.
5411 * config/spu/spu.h (GTY): Likewise.
5412 * config/visium/visium.c (visium_option_override):
5413 Set "8" as default secondary alignment.
5414 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5415 in order to guarantee secondary alignment of 8.
5416 * coretypes.h: Include align.h header file.
5417 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5418 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5419 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5420 * doc/tm.texi.in: Likewise.
5421 * final.c (struct label_alignment): Remove not used structure.
5422 (LABEL_ALIGN): Change type to align_flags.
5423 (LOOP_ALIGN): Likewise.
5424 (JUMP_ALIGN): Likewise.
5425 (default_loop_align_max_skip): Remove.
5426 (default_label_align_max_skip): Likewise.
5427 (default_jump_align_max_skip): Likewise.
5428 (default_label_align_after_barrier_max_skip):
5429 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5430 (LABEL_TO_MAX_SKIP): Remove.
5431 (label_to_alignment): Return align_flags type instead of integer.
5432 (label_to_max_skip): Remove.
5433 (align_fuzz): Use align_flags type.
5434 (compute_alignments): Use align_flags type and use align_flags::max
5435 to combine multiple alignments.
5436 (grow_label_align): Grow vec instead of C array.
5437 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5438 (shorten_branches): Use align_flags type and use align_flags::max
5439 to combine multiple alignments.
5440 (final_scan_insn_1): Remove usage of secondary alignment that comes
5441 from label alignment, but instead use proper secondary alignment
5442 which is computed in grow_label_align.
5443 * flags.h (struct align_flags_tuple): Move to align.h.
5444 (struct align_flags): Likewise.
5445 (state_align_loops): Rename to align_loops.
5446 (state_align_jumps): Rename to align_jumps.
5447 (state_align_labels): Rename to align_labels.
5448 (state_align_functions): Rename to align_functions.
5449 (align_loops_log): Remove.
5450 (align_jumps_log): Remove.
5451 (align_labels_log): Remove.
5452 (align_functions_log): Remove.
5453 (align_loops_max_skip): Remove.
5454 (align_jumps_max_skip): Remove.
5455 (align_labels_max_skip): Remove.
5456 (align_functions_max_skip): Remove.
5457 (align_loops_value): Remove.
5458 (align_jumps_value): Remove.
5459 (align_labels_value): Remove.
5460 (align_functions_value): Remove.
5461 * output.h (label_to_alignment): Change return type to align_flags.
5462 (label_to_max_skip): Remove.
5463 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5464 jump_align_max_skip macros.
5465 * targhooks.h (default_loop_align_max_skip): Remove.
5466 (default_label_align_max_skip): Likewise.
5467 (default_jump_align_max_skip): Likewise.
5468 (default_label_align_after_barrier_max_skip): Remove.
5469 * toplev.c (read_log_maxskip): Use ::normalize function.
5470 (parse_N_M): Remove not used argument and also call ::normalize.
5471 (parse_alignment_opts): Do not pass unused arguments.
5472 * varasm.c (assemble_start_function): Use directly align_functions
5473 instead of removed macros.
5474 * system.h: Do not poison removed macros.
5476 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5479 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5480 and cond temporaries don't have reference type if iterator has
5481 pointer type. For init use &for_pre_body instead of pre_p if
5482 for_pre_body is non-empty.
5484 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5486 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5487 double-double modes to SFmode directly directly.
5488 (trunc<mode>sf2_fprs): Delete.
5490 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5492 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5493 for conversions between IFmode and the decimal floating point modes.
5494 (init_float128_ieee): Use the correct names for conversions between
5495 KFmode and the decimal floating point modes.
5497 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5499 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5500 for the conversions between TDmode and IFmode.
5501 (init_float128_ieee): Use more correct names for the conversions
5502 between TDmode and KFmode.
5504 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5506 PR tree-optimization/86526
5507 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5508 (inline_expand_builtin_string_cmp): Likewise.
5509 (inline_string_cmp): Likewise. Use c_readstr instead of
5510 builtin_memcpy_read_str. Add unit_mode temporary.
5512 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5515 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5516 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5518 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5520 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5521 Alphabetize prototypes of built-in functions, separating out
5522 built-in functions that are listed in this section but should be
5523 described elsewhere.
5525 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5528 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5529 conditional move when trapping comparison was split to a
5530 non-trapping one (and vice versa).
5532 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5534 * config/s390/s390.c (s390_function_profiler): Generate nops
5535 instead of profiler call sequences.
5536 * config/s390/s390.opt: Add the new option.
5538 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5540 * config/s390/s390.c (s390_function_profiler): Generate
5541 __mcount_loc section.
5542 * config/s390/s390.opt: Add the new option.
5544 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5546 * common.opt: Add the new warning.
5547 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5548 %r0,__fentry__" when -mfentry is specified.
5549 (s390_option_override_internal): Disallow -mfentry for 31-bit
5551 * config/s390/s390.opt: Add the new option.
5553 2018-07-16 Richard Biener <rguenther@suse.de>
5556 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5557 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5559 2018-07-16 Martin Liska <mliska@suse.cz>
5562 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5565 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5567 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5569 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5571 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5573 * config/arc/arc-cpus.def (hs4x): New cpu.
5575 * config/arc/arc-tables.opt: Regenerate.
5576 * config/arc/arc.c (arc_sched_issue_rate): New function.
5577 (TARGET_SCHED_ISSUE_RATE): Define.
5578 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5579 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5581 (attr tune): Add ARCHS4x tune values.
5582 (attr tune_dspmpy): Define.
5583 (*tst): Correct instruction type.
5584 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5585 * config/arc/arcHS4x.md: New file.
5586 * config/arc/fpu.md: Update instruction type attributes.
5587 * config/arc/t-multilib: Regenerate.
5589 2018-07-16 Tom de Vries <tdevries@suse.de>
5592 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5594 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5596 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5599 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5601 PR tree-optimization/86514
5602 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5603 conversion to a boolean type from a type with greater precision.
5605 2018-07-16 Tom de Vries <tdevries@suse.de>
5607 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5608 dump_flags request TDF_SLIM.
5610 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5612 * fold-const.c (int_const_binop_1): Abstract...
5613 (wide_int_binop): ...wide int code here.
5614 (poly_int_binop): ...poly int code here.
5615 Abstract the rest of int_const_binop_1 into int_const_binop.
5616 * fold-const.h (wide_int_binop): New.
5617 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5618 Remove useless PLUS/MINUS_EXPR case.
5619 (zero_nonzero_bits_from_vr): Move wide int code...
5620 (zero_nonzero_bits_from_bounds): ...here.
5621 (extract_range_from_binary_expr_1): Move mask optimization code...
5622 (range_easy_mask_min_max): ...here.
5623 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5624 (range_easy_mask_min_max): New.
5626 2018-07-15 Jeff Law <law@redhat.com>
5629 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5632 2018-07-14 Jim Wilson <jimw@sifive.com>
5634 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5636 2018-07-14 Paul Koning <ni1d@arrl.net>
5638 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5640 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5642 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5645 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5646 Steve Munroe <munroesj52@gmail.com>
5648 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5649 (_mm_andnot_si128): Likewise.
5650 (_mm_or_si128): Likewise.
5651 (_mm_xor_si128): Likewise.
5653 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5656 * builtins.c (expand_builtin_memcmp): Inline the calls first
5657 when result_eq is false.
5658 (expand_builtin_strcmp): Inline the calls first.
5659 (expand_builtin_strncmp): Likewise.
5660 (inline_string_cmp): New routine. Expand a string compare
5661 call by using a sequence of char comparison.
5662 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5663 a call to str(n)cmp/memcmp.
5664 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5666 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5668 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5670 * config/arm/driver-arm.c: Include arm-native.h.
5671 (host_detect_local_cpu): Use auto-generated data tables.
5672 (vendors, arm_cpu_table): Delete. Move part information to ...
5673 * config/arm/arm-cpus.in: ... here.
5674 * config/arm/parsecpu.awk (gen_native): New function.
5675 (vendor, part): New CPU fields.
5676 (END): Add support for building the native CPU detection tables.
5677 * config/arm/t-arm (arm-native.h): Add build rule.
5678 (driver-arm.o): Add dependency on arm-native.h.
5680 2018-07-13 Richard Biener <rguenther@suse.de>
5683 * match.pd (addr1 - addr2): Allow either of the operand to
5686 2018-07-13 Tom de Vries <tdevries@suse.de>
5688 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5691 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5693 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5694 arrays instead of numbered variables.
5696 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5698 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5699 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5701 2018-07-13 Richard Biener <rguenther@suse.de>
5704 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5705 instead of get_context_die.
5707 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5708 Richard Biener <rguenther@suse.de>
5711 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5712 that the loop latch destination where phi is defined.
5714 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5716 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5717 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5718 (riscv_set_current_function): Extract getting interrupt type to new
5720 (riscv_get_interrupt_type): New function.
5721 (riscv_merge_decl_attributes): New function, checking interrupt type is
5723 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5725 2018-07-12 Paul Koning <ni1d@arrl.net>
5727 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5730 2018-07-12 Paul Koning <ni1d@arrl.net>
5732 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5733 zero reference, add doloop_end instead.
5734 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5735 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5736 detail for doloop_end.
5738 2018-07-12 Martin Sebor <msebor@redhat.com>
5741 * attribs.c (decl_attributes): Reject conflicting attributes before
5742 calling attribute handlers.
5744 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5746 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5748 (gcc::dump_manager::get_dump_file_name): likewise.
5749 (dump_begin): Likewise.
5750 * dumpfile.h (dump_begin): Update prototype.
5751 (gcc::dump_manager::get_dump_file_name,
5752 gcc::dump_manager::get_dump_file_name): Update prototype.
5754 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5756 * internal-fn.h (vectorizable_internal_fn_p): New function.
5757 * tree-vect-slp.c (compatible_calls_p): Likewise.
5758 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5759 to internal functions.
5760 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5762 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5764 * fold-const.h (inverse_conditions_p): Declare.
5765 * fold-const.c (inverse_conditions_p): New function.
5766 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5767 that test the inverse condition of a conditional internal function.
5768 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5769 * internal-fn.c (internal_fn_mask_index): Handle conditional
5771 (vectorized_internal_fn_supported_p): New function.
5772 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5773 (any_pred_load_store): Replace with...
5774 (need_to_predicate): ...this new variable.
5775 (redundant_ssa_names): New variable.
5776 (ifcvt_can_use_mask_load_store): Move initial checks to...
5777 (ifcvt_can_predicate): ...this new function. Handle tree codes
5778 for which a conditional internal function exists.
5779 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5780 instead of ifcvt_can_use_mask_load_store. Update after variable
5782 (predicate_load_or_store): New function, split out from
5783 predicate_mem_writes.
5784 (check_redundant_cond_expr): New function.
5785 (value_available_p): Likewise.
5786 (predicate_rhs_code): Likewise.
5787 (predicate_mem_writes): Rename to...
5788 (predicate_statements): ...this. Use predicate_load_or_store
5789 and predicate_rhs_code.
5790 (combine_blocks, tree_if_conversion): Update after above name changes.
5791 (ifcvt_local_dce): Handle redundant_ssa_names.
5792 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5793 general conditional functions.
5794 * tree-vect-stmts.c (vectorizable_call): Likewise.
5796 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5797 Alan Hayward <alan.hayward@arm.com>
5798 David Sherwood <david.sherwood@arm.com>
5800 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5801 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5802 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5803 plus and minus and convert them into IFN_COND_FMA-based sequences.
5804 (convert_mult_to_fma): Handle conditional plus and minus.
5806 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5808 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5809 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5810 (cond_fnms_optab): New optabs.
5811 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5813 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5814 * internal-fn.h (get_conditional_internal_fn): Declare.
5815 (get_unconditional_internal_fn): Likewise.
5816 * internal-fn.c (cond_ternary_direct): New macro.
5817 (expand_cond_ternary_optab_fn): Likewise.
5818 (direct_cond_ternary_optab_supported_p): Likewise.
5819 (FOR_EACH_COND_FN_PAIR): Likewise.
5820 (get_conditional_internal_fn): New function.
5821 (get_unconditional_internal_fn): Likewise.
5822 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5823 (gimple_match_op::gimple_match_op): Add a new overload for 5
5825 (gimple_match_op::set_op): Likewise.
5826 (gimple_resimplify5): Declare.
5827 * genmatch.c (decision_tree::gen): Generate simplifications for
5829 * gimple-match-head.c (gimple_simplify): Define an overload for
5830 5 operands. Handle calls with 5 arguments in the top-level overload.
5831 (convert_conditional_op): Handle conversions from unconditional
5832 internal functions to conditional ones.
5833 (gimple_resimplify5): New function.
5834 (build_call_internal): Pass a fifth operand.
5835 (maybe_push_res_to_seq): Likewise.
5836 (try_conditional_simplification): Try converting conditional
5837 internal functions to unconditional internal functions.
5838 Handle 3-operand unconditional forms.
5839 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5840 Define ternary equivalents of the current rules for binary conditional
5842 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5844 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5845 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5846 (optab): Handle them.
5847 (SVE_COND_FP_TERNARY): New int iterator.
5848 (sve_fmla_op, sve_fmad_op): New int attributes.
5849 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5850 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5851 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5853 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5855 * target.def (preferred_else_value): New target hook.
5856 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5857 * doc/tm.texi: Regenerate.
5858 * targhooks.h (default_preferred_else_value): Declare.
5859 * targhooks.c (default_preferred_else_value): New function.
5860 * internal-fn.h (conditional_internal_fn_code): Declare.
5861 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5862 (get_conditional_internal_fn): Use it.
5863 (conditional_internal_fn_code): New function.
5864 * gimple-match.h (gimple_match_cond): New struct.
5865 (gimple_match_op): Add a cond member function.
5866 (gimple_match_op::gimple_match_op): Update all forms to take a
5868 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5869 for the suboperation, but don't specify a particular else_value.
5870 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5871 (visit_nary_op, visit_reference_op_load): Pass
5872 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5873 * gimple-match-head.c: Include tree-eh.h
5874 (convert_conditional_op): New function.
5875 (maybe_resimplify_conditional_op): Likewise.
5876 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5877 (gimple_resimplify2): Likewise.
5878 (gimple_resimplify3): Likewise.
5879 (gimple_resimplify4): Likewise.
5880 (maybe_push_res_to_seq): Return null for conditional operations.
5881 (try_conditional_simplification): New function.
5882 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5884 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5886 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5888 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5890 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5892 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5894 (hash_tree): Do not hash DECL_FCONTEXT
5895 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5896 Do not stream DECL_FCONTEXT.
5897 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5898 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5900 2018-07-12 Richard Biener <rguenther@suse.de>
5903 * dwarf2out.c (gen_block_die): Only output blocks when they have
5904 at least one !DECL_IGNORED_P variable.
5906 2018-07-12 Richard Biener <rguenther@suse.de>
5909 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5910 Remove -mieee-fp handling.
5912 2018-07-12 Richard Biener <rguenther@suse.de>
5914 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5915 left-over from last patch.
5917 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5919 PR tree-optimization/86492
5920 * gimple-ssa-store-merging.c
5921 (imm_store_chain_info::coalesce_immediate_stores): Call
5922 check_no_overlap even for the merge_overlapping case. Formatting fix.
5924 2018-07-12 Richard Biener <rguenther@suse.de>
5927 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5928 move possibly trapping operations into the conditional.
5930 2018-07-12 Richard Biener <rguenther@suse.de>
5932 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5933 (vn_lookup_simplify_result): Remove recursion limit applied
5935 (vn_nary_build_or_lookup_1): Adjust.
5936 (try_to_simplify): Likewise.
5937 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5939 (gimple_resimplify2): Likewise.
5940 (gimple_resimplify3): Likewise.
5941 (gimple_resimplify4): Likewise.
5943 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5945 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5946 Use __mmask64 type instead of __mmask8 for __M argument.
5947 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5948 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5950 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5951 __mmask16 for __M argument.
5952 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5953 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5954 to __mmask16 instead of __mmask8.
5955 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5956 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5957 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5958 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5959 instead of __mmask16 for __U argument.
5960 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5961 __mmask16 instead of __mmask8 for __U argument.
5962 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5964 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5966 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5968 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5970 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5972 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5974 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5976 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5978 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5980 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5982 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5983 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5984 return type as well as __M argument type and all casts from __mmask8
5986 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5987 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5988 return type as well as __M argument type and all casts from __mmask8
5990 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5991 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5992 return type as well as __M argument type and all casts from __mmask8
5994 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5995 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5996 return type as well as __M argument type and all casts from __mmask8
5998 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5999 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6002 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6004 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6005 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6008 2018-07-11 Paul Koning <ni1d@arrl.net>
6010 * doc/md.texi (define_subst): Document how multiple occurrences of
6011 the same argument in the replacement pattern are handled.
6013 2018-07-11 Paul Koning <ni1d@arrl.net>
6015 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6017 (Common Type Attributes): Add "mode" attribute.
6019 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6021 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6022 stream DECL_ORIGINAL_TYPE.
6023 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6024 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6025 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6026 Do not walk original type.
6027 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6029 (write_ts_decl_non_common_tree_pointers): Do not stream
6031 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6032 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6034 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6036 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6037 thread twice from the same starting edge.
6039 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6041 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6042 * gimple.c (gimple_call_nonnull_result_p): ...here...
6043 (gimple_call_nonnull_arg): ...and here.
6044 * gimple.h (gimple_call_nonnull_result_p): New.
6045 (gimple_call_nonnull_arg): New.
6047 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6049 * config/arm/arm-cpus.in: Move information from fpu field of each
6050 cpu definition to the isa field.
6051 * config/arm/parsecpu.awk (fpu): Delete match rule.
6052 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6054 2018-07-11 Richard Biener <rguenther@suse.de>
6057 * dwarf2out.c (init_sections_and_labels): Use
6058 output_asm_line_debug_info consistently.
6059 (dwarf2out_early_finish): Likewise.
6060 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6063 2018-07-11 Richard Biener <rguenther@suse.de>
6065 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6066 Rework father_bb setting in a way to avoid propagating constants
6067 multiple times on a loop body.
6069 2018-07-10 Mark Wielaard <mark@klomp.org>
6072 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6074 2018-07-10 Richard Biener <rguenther@suse.de>
6076 * hash-map.h (hash_map::iterator::operator*): Return
6077 references to key and value.
6079 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6082 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6083 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6084 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6085 (gimplify_omp_for): For composite loops, move outer
6086 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6087 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6088 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6089 TREE_LIST for both the original class iterator and the "last" helper
6090 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6091 loop, remember has_decl_expr from outer composite loops for the
6092 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6094 2018-07-09 Martin Sebor <msebor@redhat.com>
6098 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6099 accessing implicitly initialized array elements.
6100 * expr.c (string_constant): Handle string initializers of
6101 character arrays within aggregates.
6102 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6103 Store element offset. As a special case, handle zero size.
6104 (fold_nonarray_ctor_reference): Same.
6105 (fold_ctor_reference): Add argument. Store subobject offset.
6106 * gimple-fold.h (fold_ctor_reference): Add argument.
6108 2018-07-09 Paul Koning <ni1d@arrl.net>
6110 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6111 (pdp11_insn_cost): New function.
6112 (pdp11_md_asm_adjust): New function.
6113 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6114 (pdp11_rtx_costs): Update to match machine better.
6115 (output_addr_const_pdp11): Correct format mismatch warnings.
6116 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6117 * config/pdp11/pdp11.md: General change to add base_cost and/or
6118 length attributes for use by new pdp11_insn_cost function.
6119 (MIN_BRANCH): Correct definition.
6121 (doloop_end): Use standard pattern name for looping pattern.
6122 (doloop_end_nocc): New.
6123 (movsf): Add another constraint alternative.
6124 (zero_extendqihi2): Add constraint alternatives for not in place
6126 (zero_extendhisi2): Remove.
6127 (shift patterns): Add CC handling variants.
6131 (define_peephole2): New peephole to recognize mov that sets CC for
6134 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6136 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6137 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6140 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6143 * real.c (real_nextafter): Return true if result is denormal.
6145 2018-07-09 Martin Liska <mliska@suse.cz>
6147 * common.opt: Add back wrongly removed attribute.
6149 2018-07-09 Richard Biener <rguenther@suse.de>
6152 * dwarf2out.c (gen_block_die): For an early generated DIE
6153 always output high/low PC attributes.
6155 2018-07-09 Tom de Vries <tdevries@suse.de>
6157 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6158 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6159 onto VAR_DECL with abstract origin.
6161 2018-07-07 Jim Wilson <jimw@sifive.com>
6163 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6165 2018-07-07 Tom de Vries <tdevries@suse.de>
6167 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6169 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6171 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6173 (combine_bound): Use wide-int overflow calculation instead of
6175 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6177 * fold-const.c (int_const_binop_2): Same.
6178 (extract_muldiv_1): Same.
6179 (fold_div_compare): Same.
6180 (fold_abs_const): Same.
6182 * poly-int.h (add): Same.
6186 * predict.c (predict_iv_comparison): Same.
6187 * profile-count.c (slow_safe_scale_64bit): Same.
6188 * simplify-rtx.c (simplify_const_binary_operation): Same.
6189 * tree-chrec.c (tree_fold_binomial): Same.
6190 * tree-data-ref.c (split_constant_offset_1): Same.
6191 * tree-if-conv.c (idx_within_array_bound): Same.
6192 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6193 * tree-ssa-phiopt.c (minmax_replacement): Same.
6194 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6195 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6196 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6197 * wide-int.cc (wi::add_large): Same.
6198 (wi::mul_internal): Same.
6199 (wi::sub_large): Same.
6200 (wi::divmod_internal): Same.
6201 * wide-int.h: Change overflow type to overflow_type for neg, add,
6202 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6203 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6204 mul_internal, divmod_internal.
6205 (overflow_type): New enum.
6206 (accumulate_overflow): New.
6208 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6210 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6211 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6213 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6215 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6216 argument is checked for zero before entering loop, avoid checking again.
6218 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6220 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6221 * gimplify.h (generic_expr_could_trap_p): Likwise.
6222 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6224 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6226 PR tree-optimization/86401
6227 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6228 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6229 (fold_bit_and_mask): ... here. New helper function for match.pd.
6230 * fold-const.h (fold_bit_and_mask): Declare.
6231 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6233 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6236 * target.def (translate_mode_attribute): New hook.
6237 * targhooks.h (default_translate_mode_attribute): Declare.
6238 * targhooks.c (default_translate_mode_attribute): New function.
6239 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6240 * doc/tm.texi: Regenerate.
6241 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6242 (rs6000_translate_mode_attribute): New function.
6244 2018-07-06 Paul Koning <ni1d@arrl.net>
6246 * doc/md.texi (define_split): Document DONE and FAIL.
6247 (define_peephole2): Ditto.
6249 2018-07-05 Jeff Law <law@redhat.com>
6251 PR tree-optimization/86010
6252 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6253 both the head and tail of mem* and str* calls.
6255 2018-07-05 Jim Wilson <jimw@sifive.com>
6257 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6259 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6261 * config/aarch64/aarch64-simd.md: correct flags text for
6262 MIN_EXPR replacement.
6264 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6266 * configure: Regenerated.
6268 2018-07-05 Carl Love <cel@us.ibm.com>
6270 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6271 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6272 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6273 VSX_BUILTIN_DOUBLEL_V4SF.
6275 2018-07-05 Martin Sebor <msebor@redhat.com>
6278 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6279 than its domain to compute its the upper bound of a char array.
6281 2018-07-05 Nathan Sidwell <nathan@acm.org>
6283 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6284 * doc/cpp.texi: Update comment.
6285 * doc/tm.texi: Rebuilt.
6286 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6287 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6288 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6289 headers affected by extern "C".
6290 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6291 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6292 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6293 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6294 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6295 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6296 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6297 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6298 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6299 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6300 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6301 config/sparc/sp64-elf.h, config/spu/spu.h,
6302 config/stormy16/stormy16.h, config/v850/v850.h,
6303 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6304 define NO_IMPLICIT_EXTERN_C.
6305 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6307 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6310 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6311 instead of GET_MODE_SIZE when comparing Units.
6313 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6316 * rtlanal.c (set_noop_p): Constrain on mode change,
6317 include hard-reg-set.h
6319 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6321 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6323 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6326 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6329 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6331 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6333 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6336 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6338 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6340 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6343 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6345 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6347 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6348 neg_*_op* variables.
6350 2018-07-04 Martin Liska <mliska@suse.cz>
6352 * tree-switch-conversion.c: Define
6353 max_ratio_for_speed and max_ratio_for_size constants.
6355 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6356 Martin Liska <mliska@suse.cz>
6361 * common.opt: Rename align options with 'str_' prefix.
6362 * common/config/i386/i386-common.c (set_malign_value): New
6364 (ix86_handle_option): Use it to set -falign-* options/
6365 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6366 type from int to string.
6367 * config/aarch64/aarch64.c: Update default values from int
6369 * config/alpha/alpha.c (alpha_override_options_after_change):
6371 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6372 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6373 max skip conditionally.
6374 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6375 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6376 max skip conditionally.
6377 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6378 max skip conditionally.
6379 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6380 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6381 max skip conditionally.
6382 * config/i386/i386.c (struct ptt): Change type from int to
6384 (ix86_default_align): Set default values.
6385 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6386 max skip conditionally.
6387 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6388 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6389 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6390 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6391 max skip conditionally.
6392 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6393 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6394 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6395 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6396 max skip conditionally.
6397 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6398 * config/ia64/ia64.c (ia64_option_override): Set default values
6399 for alignment options.
6400 * config/m68k/m68k.c: Handle new str_align_* options.
6401 * config/mips/mips.c (mips_set_compression_mode): Change
6403 (mips_option_override): Set default values for options.
6404 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6406 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6408 * config/rx/rx.c (rx_option_override): Likewise.
6409 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6410 (LABEL_ALIGN): Use align_labels_log.
6411 (LOOP_ALIGN): Use align_loops_align.
6412 * config/s390/s390.c (s390_asm_output_function_label): Use new
6414 * config/sh/sh.c (sh_override_options_after_change):
6415 Change type of constants.
6416 * config/spu/spu.c (spu_sched_init): Likewise.
6417 * config/sparc/sparc.c (sparc_option_override): Set default
6419 * config/visium/visium.c (visium_option_override): Likewise.
6420 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6421 emit p2align format with last argument if it's not needed.
6422 * doc/invoke.texi: Document extended format of -falign-*.
6423 * final.c: Use align_labels alignment.
6424 * flags.h (struct target_flag_state): Change type to use
6426 (struct align_flags_tuple): New.
6427 (struct align_flags): Likewise.
6428 (align_loops_log): Redefine macro to use new types.
6429 (align_loops_max_skip): Redefine macro to use new types.
6430 (align_jumps_log): Redefine macro to use new types.
6431 (align_jumps_max_skip): Redefine macro to use new types.
6432 (align_labels_log): Redefine macro to use new types.
6433 (align_labels_max_skip): Redefine macro to use new types.
6434 (align_functions_log): Redefine macro to use new types.
6435 (align_loops): Redefine macro to use new types.
6436 (align_jumps): Redefine macro to use new types.
6437 (align_labels): Redefine macro to use new types.
6438 (align_functions): Redefine macro to use new types.
6439 (align_functions_max_skip): Redefine macro to use new types.
6440 (align_loops_value): New macro.
6441 (align_jumps_value): New macro.
6442 (align_labels_value): New macro.
6443 (align_functions_value): New macro.
6444 * function.c (invoke_set_current_function_hook): Propagate
6445 alignment values from flags to global variables default in
6447 * ipa-icf.c (sem_function::equals_wpa): Use
6448 cl_optimization_option_eq instead of memcmp.
6449 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6451 (cl_optimization_stream_in): Likewise.
6452 * optc-save-gen.awk: Support strings in cl_optimization.
6453 * opth-gen.awk: Likewise.
6454 * opts.c (finish_options): Remove error checking of invalid
6456 (MAX_CODE_ALIGN): Remove.
6457 (MAX_CODE_ALIGN_VALUE): Likewise.
6458 (parse_and_check_align_values): New function.
6459 (check_alignment_argument): Likewise.
6460 (common_handle_option): Use check_alignment_argument.
6461 * opts.h (parse_and_check_align_values): Declare.
6462 * toplev.c (init_alignments): Remove.
6463 (read_log_maxskip): New.
6464 (parse_N_M): Likewise.
6465 (parse_alignment_opts): Likewise.
6466 (backend_init_target): Remove usage of init_alignments.
6467 * toplev.h (parse_alignment_opts): Declare.
6468 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6470 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6471 * tree.c (cl_option_hasher::equal): New.
6472 * varasm.c: Use new global macros.
6474 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6476 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6477 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6478 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6479 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6480 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6481 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6482 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6483 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6484 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6485 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6486 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6487 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6488 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6490 2018-07-04 Martin Liska <mliska@suse.cz>
6491 Jonathan Wakely <jwakely@redhat.com>
6493 * coverage.c: Use correct type.
6494 * doc/invoke.texi: Language correction.
6496 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6499 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6500 ENDBRANCH for non-tail call which may return via indirect branch.
6501 * doc/extend.texi: Document indirect_return attribute.
6503 2018-07-03 Martin Sebor <msebor@redhat.com>
6505 PR tree-optimization/86274
6506 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6508 (format_floating): Correct handling of infinities and NaNs.
6510 2018-07-03 Martin Sebor <msebor@redhat.com>
6512 * print-tree.c (print_real_cst): New function.
6513 (print_node_brief): Call it.
6514 (print_node): Ditto.
6516 2018-07-03 Jeff Law <law@redhat.com>
6518 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6519 into a single pattern.
6521 * config/h8300/h8300.md (ors code_iterator): New.
6522 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6523 a single pattern and single splitter.
6524 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6525 (iorqi3_1, xorqi3_1): Likewise.
6526 (iorqi3, xorqi3 expanders): Similarly.
6528 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6529 (movmd_internal) into a single pattern using the P mode iterator.
6530 (movmd splitters): Similarly.
6531 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6532 (movsd splitters): Similarly.
6534 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6535 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6536 right table based on the size of the operand.
6537 * config/h8300/h8300.md (length_table): Corresponding changes. All
6538 references to "addb", "addw" and "addl" changed to "add".
6539 (btst patterns): Merge two variants into a single pattern.
6540 (tstqi, tsthi): Likewise.
6541 (addhi3_incdec, addsi3_incdec): Likewise.
6542 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6543 (mulhi3, mulsi3): Likewise.
6544 (udivhi3, udivsi3): Likewise.
6545 (divhi3, divsi3): Likewise.
6546 (andorqi3, andorhi3, andorsi3): Likewise.
6548 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6551 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6552 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6554 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6556 PR tree-optimization/85694
6557 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6558 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6560 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6561 (<u>avg<mode>3_ceil): New patterns.
6563 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6565 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6566 scan-tree-dump directive.
6567 * gcc.dg/vect/slp-perm-2.c: Likewise.
6568 * gcc.dg/vect/slp-perm-3.c: Likewise.
6569 * gcc.dg/vect/slp-perm-5.c: Likewise.
6570 * gcc.dg/vect/slp-perm-6.c: Likewise.
6571 * gcc.dg/vect/slp-perm-7.c: Likewise.
6572 * gcc.dg/vect/slp-perm-8.c: Likewise.
6574 2018-07-03 Marek Polacek <polacek@redhat.com>
6577 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6579 2018-07-03 Richard Biener <rguenther@suse.de>
6582 * tree-ssa-structalias.c (find_func_clobbers): Properly
6583 handle indirect calls.
6585 2018-07-03 Jeff Law <law@redhat.com>
6587 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6588 (shifts): New code iterator.
6589 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6590 expander. Fix HImode handling on H8/SX.
6591 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6592 (subqi3, subhi3, subsi3 expanders): Likewise.
6593 (andqi3, andhi3, andsi3 expanders): Likewise.
6594 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6595 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6596 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6597 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6598 (zero_extendqihi2, zero_extendqisi2): Likewise.
6599 (extendqihi2, extendqisi2): Likewise.
6600 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6601 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6602 (rotlqi3_1, rotlhi3_1): Likewise.
6603 (logicalhi3_sn, logicalsi3_sn): Likewise.
6604 (logicalhi3, logicalsi3): Likewise.
6606 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6608 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6609 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6610 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6611 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6612 type to append_pattern_def_seq instead of creating a stmt_vec_info
6614 (build_mask_conversion): Likewise. Remove vinfo argument.
6615 (vect_add_conversion_to_patterm): Likewise, renaming to...
6616 (vect_add_conversion_to_pattern): ...this.
6617 (vect_recog_mask_conversion_pattern): Update call to
6618 build_mask_conversion. Pass the vector type to
6619 append_pattern_def_seq here too.
6620 (vect_recog_gather_scatter_pattern): Update call to
6621 vect_add_conversion_to_pattern.
6623 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6625 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6626 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6627 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6628 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6629 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6630 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6631 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6632 append_pattern_def_seq instead of new_pattern_def_seq.
6633 (vect_recog_divmod_pattern): Do both of the above.
6634 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6637 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6639 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6640 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6641 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6642 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6643 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6644 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6645 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6646 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6647 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6648 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6649 parameter with a single stmt_vec_info.
6650 (vect_recog_func_ptr): Likewise.
6651 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6652 (vect_try_gather_scatter_pattern): ...this.
6653 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6654 the stmt_vec_info of the statement to be matched. Don't clear
6655 STMT_VINFO_RELATED_STMT.
6656 (vect_pattern_recog): Update call accordingly.
6658 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6660 PR tree-optimization/85694
6661 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6662 (uavgM3_ceil): Document new optabs.
6663 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6664 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6666 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6667 (savg_ceil_optab): New optabs.
6668 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6669 (vect_vect_recog_func_ptrs): Add it.
6670 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6671 constant directly from the associated lhs.
6673 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6675 * tree-vect-patterns.c (vect_split_statement): New function.
6676 (vect_convert_input): Use it to try to split an existing cast.
6678 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6680 * poly-int.h (print_hex): New function.
6681 * dumpfile.h (dump_dec, dump_hex): Declare.
6682 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6683 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6684 min_input_precision, operation_precision and operation_sign.
6685 * tree-vect-patterns.c (vect_get_range_info): New function.
6686 (vect_same_loop_or_bb_p, vect_single_imm_use)
6687 (vect_operation_fits_smaller_type): Delete.
6688 (vect_look_through_possible_promotion): Add an optional
6689 single_use_p parameter.
6690 (vect_recog_over_widening_pattern): Rewrite to use new
6691 stmt_vec_info infomration. Handle one operation at a time.
6692 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6693 (vect_truncatable_operation_p, vect_set_operation_type)
6694 (vect_set_min_input_precision): New functions.
6695 (vect_determine_min_output_precision_1): Likewise.
6696 (vect_determine_min_output_precision): Likewise.
6697 (vect_determine_precisions_from_range): Likewise.
6698 (vect_determine_precisions_from_users): Likewise.
6699 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6700 (vect_vect_recog_func_ptrs): Put over_widening first.
6702 (vect_pattern_recog): Call vect_determine_precisions.
6704 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6706 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6707 statements that have been replaced by further pattern statements.
6708 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6710 2018-07-03 Richard Biener <rguenther@suse.de>
6712 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6713 always set *dt. Dump vectype in vectype overload.
6714 * dumpfile.h (dump_gimple_expr): New function.
6715 (dump_gimple_expr_loc): Likewise.
6716 * dumpfile.c (dump_gimple_expr): New function.
6717 (dump_gimple_expr_loc): Likewise.
6719 2018-07-02 Jeff Law <law@redhat.com>
6721 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6722 the H8/300, H8/300H and H8/S variants into a single pattern.
6723 (movhi_h8300, movqi_h8300hs): Similarly.
6724 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6725 (QHI mode iterator): New.
6727 * config/h8300/h8300.md: Remove trailing whitespace.
6729 2018-07-02 Jim Wilson <jimw@sifive.com>
6731 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6732 instead of emit_insn for interrupt returns.
6733 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6734 (riscv_sret, riscv_uret): Likewise.
6736 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6738 * pretty-print.c (selftest::test_pp_format): Move save and restore
6739 of quotes to class auto_fix_quotes, and add an instance.
6740 * selftest.c: Include "intl.h".
6741 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6742 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6743 * selftest.h (selftest::auto_fix_quotes): New class.
6745 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6747 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6748 (aarch64_sve_prepare_conditional_op): Remove.
6749 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6750 Allow aarch64_simd_reg_or_zero as select operand; remove
6751 the aarch64_sve_prepare_conditional_op call.
6752 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6753 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6754 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6755 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6756 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6757 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6758 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6759 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6760 and a splitters to match all of the *_any patterns.
6761 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6763 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6764 (SVE_COND_FP_BINARY_REV): Remove.
6765 (sve_int_op_rev, sve_fp_op_rev): New.
6766 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6767 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6768 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6769 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6770 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6771 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6772 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6773 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6774 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6776 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6777 Remove match_dup 1 from the inner unspec.
6778 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6780 * config/aarch64/aarch64.md (movprfx): New attr.
6781 (length): Default movprfx to 8.
6782 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6783 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6784 (*<su>mul<SVE_I>3_highpart): Likewise.
6785 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6786 (*v<ASHIFT><SVE_I>3): Likewise.
6787 (*<su><MAXMIN><SVE_I>3): Likewise.
6788 (*<su><MAXMIN><SVE_F>3): Likewise.
6789 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6790 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6791 (*div<SVE_F>4): Likewise.
6793 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6795 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6798 2018-07-02 Richard Biener <rguenther@suse.de>
6800 PR tree-optimization/86363
6801 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6802 memset argument refers to a non-variable address.
6804 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6806 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6807 {PLUS,MINUS}_EXPR code to...
6808 (adjust_symbolic_bound): ...here,
6809 (combine_bound): ...here,
6810 (set_value_range_with_overflow): ...and here.
6812 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6814 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6816 (extract_range_from_abs_expr): ...here.
6818 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6820 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6821 -fno-omit-frame-pointer when not optimizing.
6823 2018-07-02 Martin Liska <mliska@suse.cz>
6826 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6827 (propagate_nothrow): Likewise.
6829 2018-07-02 Martin Liska <mliska@suse.cz>
6832 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6834 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6836 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6837 function in r262149, changing "loc" param from source_location to
6838 const dump_location_t &.
6839 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6840 declaration, as above.
6842 2018-07-01 Paul Koning <ni1d@arrl.net>
6844 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6845 -munit-asm, -mgnu-asm, -mdec-asm.
6846 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6847 (pdp11_output_labelref): New.
6848 (pdp11_output_def): New.
6849 (pdp11_output_addr_vec_elt): New.
6850 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6851 %# and %@ format codes.
6852 (pdp11_option_override): New.
6853 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6854 (pdp11_output_ident): New.
6855 (pdp11_asm_named_section): New.
6856 (pdp11_asm_init_sections): New.
6857 (pdp11_file_start): New.
6858 (pdp11_file_end): New.
6859 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6860 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6861 %o, like %c but octal.
6862 (pdp11_option_override): New.
6863 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6865 (DATA_SECTION_ASM_OP): Ditto.
6866 (READONLY_DATA_SECTION_ASM_OP): New.
6867 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6868 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6869 (ASM_OUTPUT_LABELREF): Ditto.
6870 (ASM_OUTPUT_DEF): Ditto.
6871 (ASM_OUTPUT_EXTERNAL): New.
6872 (ASM_OUTPUT_SOURCE_FILENAME): New.
6873 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6874 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6875 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6876 %# and %@ format codes.
6877 * config/pdp11/pdp11.opt (mgnu-asm): New.
6878 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6879 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6880 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6882 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6884 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6885 dereferencing path[] beyond its length.
6887 (debug_all_paths): New.
6888 (rewire_first_differing_edge): New.
6889 (adjust_paths_after_duplication): New.
6890 (duplicate_thread_path): Call adjust_paths_after_duplication.
6892 (thread_through_all_blocks): Add new argument to
6893 duplicate_thread_path.
6895 2018-06-30 Jim Wilson <jimw@sifive.com>
6897 * config/riscv/predicates.md (p2m1_shift_operand): New.
6898 (high_mask_shift_operand): New.
6899 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6900 pattern using p2m1_shift_operand.
6901 (lshsi3_zero_extend_3+2): New combiner pattern using
6902 high_mask_shift_operand.
6904 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6906 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6908 (vect_recog_rotate_pattern): ...here.
6909 (vect_convert_input): Try to insert casts of invariants in the
6911 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6912 preheader to be empty.
6914 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6916 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6917 vector type. If given, install it in the new statement's
6919 (vect_element_precision): New function.
6920 (vect_unpromoted_value): New struct.
6921 (vect_unpromoted_value::vect_unpromoted_value): New function.
6922 (vect_unpromoted_value::set_op): Likewise.
6923 (vect_look_through_possible_promotion): Likewise.
6924 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6925 (vect_widened_op_tree, vect_convert_input): Likewise.
6926 (vect_convert_inputs, vect_convert_output): Likewise.
6927 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6928 to handle the optional cast of the multiplication result and
6929 vect_widened_op_tree to detect the widened multiplication itself.
6930 Do not require the input and output of promotion casts to have
6931 the same sign, but base the signedness of the operation on the
6932 input rather than the result. If the pattern includes two
6933 promotions, check that those promotions have the same sign.
6934 Do not restrict the MULT_EXPR handling to a double-width result;
6935 handle quadruple-width results and wider. Use vect_convert_inputs
6936 to convert the inputs to the common type.
6937 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6938 to handle the optional cast of the ABS result. Also allow a sign
6939 change or a sign extension between the ABS and MINUS.
6940 Use vect_widened_op_tree to detect the widened subtraction and use
6941 vect_convert_inputs to convert the inputs to the common type.
6942 (vect_handle_widen_op_by_const): Delete.
6943 (vect_recog_widen_op_pattern): New function.
6944 (vect_recog_widen_mult_pattern): Use it.
6945 (vect_recog_widen_shift_pattern): Likewise.
6946 (vect_recog_widen_sum_pattern): Use
6947 vect_look_through_possible_promotion to handle the promoted
6950 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6952 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6953 the containing gimple_seq *.
6954 * gimple-iterator.h (gsi_for_stmt): Declare it.
6955 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6956 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6957 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6958 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6959 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6961 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6963 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6964 statement being replaced is part of an existing pattern
6965 definition sequence, inserting the new pattern statements before
6967 (vect_pattern_recog_1): Don't return a bool. If the statement
6968 is already part of a pattern, instead apply pattern matching
6969 to the pattern definition statements. Don't clear the
6970 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6971 (vect_pattern_recog): Don't break after the first match;
6972 continue processing the pattern definition statements instead.
6973 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6975 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6977 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6978 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6979 (vect_recog_widen_sum_pattern): Use it.
6981 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6983 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6984 phi is not a pattern statement and has not been replaced by
6985 a pattern statement.
6986 * tree-vect-patterns.c (type_conversion_p): Don't check
6987 STMT_VINFO_IN_PATTERN_P.
6988 (vect_recog_vector_vector_shift_pattern): Likewise.
6989 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6990 the pattern statement rather than the original statement; check
6991 directly for a WIDEN_MULT_EXPR here.
6992 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6993 vect_is_simple_use to return the pattern statement rather
6994 than the original statement; use is_pattern_stmt_p to check
6995 for such a pattern statement.
6996 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6997 to return the pattern statement rather than the original statement;
6998 don't do the same transformation here.
6999 (vect_is_simple_use): If the defining statement has been replaced
7000 by a pattern statement, return the pattern statement instead.
7001 Remove the corresponding (local) transformation from the vectype
7004 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7006 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7007 end and default to null.
7008 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7009 (vectorizable_reduction): Update calls accordingly, dropping the
7010 gimple ** argument if the passed-back statement isn't needed.
7011 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7012 (vect_recog_rotate_pattern): Likewise.
7013 (vect_recog_mask_conversion_pattern): Likewise.
7014 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7015 (vect_mask_constant_operand_p): Likewise.
7016 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7017 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7018 (get_group_load_store_type, get_load_store_type): Likewise.
7019 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7020 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7021 (vectorizable_conversion, vectorizable_assignment): Likewise.
7022 (vectorizable_shift, vectorizable_operation): Likewise.
7023 (vectorizable_store, vect_is_simple_cond): Likewise.
7024 (vectorizable_condition, vectorizable_comparison): Likewise.
7025 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7026 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7027 and move it to the end. Cope with null def_stmt_outs.
7029 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7031 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7033 2018-06-29 Jeff Law <law@redhat.com>
7035 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7036 displacements for TARGET_V850E2V3 and newer.
7037 (TARGET_LRA_P): Remove. Defaults to LRA now.
7038 * config/v850/v850.md (sign23byte_load): Remove.
7039 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7040 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7042 2018-06-29 Martin Liska <mliska@suse.cz>
7045 * coverage.c (coverage_init): Mangle full path name.
7046 * doc/invoke.texi: Document the change.
7047 * gcov-io.c (mangle_path): New.
7048 * gcov-io.h (mangle_path): Likewise.
7049 * gcov.c (mangle_name): Use mangle_path for path mangling.
7051 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7053 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7054 if starting source register is not even.
7056 2018-06-29 Martin Liska <mliska@suse.cz>
7058 PR tree-optimization/86263
7059 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7060 Make edge redirection.
7062 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7064 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7065 (dump_scope_depth): New variable.
7066 (get_dump_scope_depth): New function.
7067 (dump_begin_scope): New function.
7068 (dump_end_scope): New function.
7069 * dumpfile.h (get_dump_scope_depth): New declaration.
7070 (dump_begin_scope): New declaration.
7071 (dump_end_scope): New declaration.
7072 (class auto_dump_scope): New class.
7073 (AUTO_DUMP_SCOPE): New macro.
7074 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7077 2018-06-29 Richard Biener <rguenther@suse.de>
7079 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7080 compute_all_dependences succeeds.
7081 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7082 exceed --param loop-max-datarefs-for-datadeps.
7084 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7086 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7088 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7091 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7092 alternative 0 in preferred_for_speed attribute.
7094 2018-06-28 Paul Koning <ni1d@arrl.net>
7096 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7097 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7098 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7099 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7100 for shift insn patterns.
7102 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7104 * cgraph.c (cgraph_node::get_body): Replace assignments to
7105 "dump_file" with calls to set_dump_file.
7106 * dumpfile.c (alt_dump_file): Make static, and group with...
7107 (alt_flags): ...this definition.
7108 (dumps_are_enabled): New variable.
7109 (refresh_dumps_are_enabled): New function.
7110 (set_dump_file): New function.
7111 (set_alt_dump_file): New function.
7112 (gcc::dump_manager::dump_start): Replace assignments to
7113 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7115 (gcc::dump_manager::dump_finish): Likewise.
7116 * dumpfile.h (alt_dump_file): Delete decl.
7117 (dumps_are_enabled): New variable decl.
7118 (set_dump_file): New function decl.
7119 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7121 * tree-nested.c (lower_nested_functions): Replace assignments to
7122 "dump_file" with calls to set_dump_file.
7124 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7126 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7127 goto_locus of each outgoing edge of each basic block.
7129 2018-06-28 Richard Biener <rguenther@suse.de>
7131 * dwarf2out.c (decl_scope_table): Remove.
7132 (push_decl_scope): Likewise.
7133 (pop_decl_scope): Likewise.
7134 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7135 (gen_struct_or_union_type_die): Likewise.
7136 (gen_tagged_type_die): Likewise.
7137 (dwarf2out_init): Do not initialize decl_scope_table.
7138 (dwarf2out_c_finalize): Do not free it.
7140 2018-06-28 Richard Biener <rguenther@suse.de>
7142 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7143 deciding whether to not re-use a DIE.
7145 2018-06-28 Richard Biener <rguenther@suse.de>
7147 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7148 DW_AT_abstract_origin attribute.
7150 2018-06-28 Martin Liska <mliska@suse.cz>
7152 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7153 Use newly introduced constants.
7154 * tree-switch-conversion.h (struct jump_table_cluster):
7155 Define max_ratio_for_size and max_ratio_for_speed.
7157 2018-06-28 Martin Liska <mliska@suse.cz>
7159 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7160 Add new checking assert to catch invalid state.
7161 (jump_table_cluster::can_be_handled): Handle single case
7163 (jump_table_cluster::is_beneficial): Bail out for such case.
7164 (bit_test_cluster::find_bit_tests):
7165 Add new checking assert to catch invalid state.
7166 (bit_test_cluster::can_be_handled): Handle single case
7168 (bit_test_cluster::is_beneficial): Bail out for such case.
7169 (switch_decision_tree::analyze_switch_statement):
7172 2018-06-28 Martin Liska <mliska@suse.cz>
7174 * common.opt: Introduce -completion option.
7175 * gcc.c (driver_handle_option): Handle it.
7176 (driver::main): Print completions if completion
7178 * opt-suggestions.c (option_proposer::get_completions):
7180 (option_proposer::suggest_completion): Likewise.
7181 (option_proposer::find_param_completions): Likewise.
7182 (verify_autocompletions): Likewise.
7183 (test_completion_valid_options): Likewise.
7184 (test_completion_valid_params): Likewise.
7185 (in_completion_p): Likewise.
7186 (empty_completion_p): Likewise.
7187 (test_completion_partial_match): Likewise.
7188 (test_completion_garbage): Likewise.
7189 (opt_proposer_c_tests): Likewise.
7190 * opt-suggestions.h: Declare new functions.
7191 * opts.c (common_handle_option): Handle OPT__completion_.
7192 * selftest-run-tests.c (selftest::run_tests): Add
7193 opt_proposer_c_tests.
7194 * selftest.c (assert_str_startswith): New.
7195 * selftest.h (assert_str_startswith): Likewise.
7196 (opt_proposer_c_tests): New.
7197 (ASSERT_STR_STARTSWITH): Likewise.
7199 2018-06-28 Martin Liska <mliska@suse.cz>
7201 * Makefile.in: Add opt-suggestions.o.
7202 * gcc-main.c: Include opt-suggestions.h.
7203 * gcc.c (driver::driver): Likewise.
7204 (driver::~driver): Remove m_option_suggestions.
7205 (driver::build_option_suggestions): Moved to option_proposer.
7206 (driver::suggest_option): Likewise.
7207 (driver::handle_unrecognized_options): Use option_proposer.
7208 * gcc.h (class driver): Add new memver m_option_proposer.
7209 * opt-suggestions.c: New file.
7210 * opt-suggestions.h: New file.
7212 2018-06-28 Martin Liska <mliska@suse.cz>
7214 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7215 (auto_string_vec::~auto_string_vec): Likewise.
7217 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7219 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7220 prevent_decl_creation_for_types fields up and add reset_location field.
7221 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7222 statement if id->reset_location is true.
7223 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7224 id->reset_location is true.
7225 (copy_phis_for_bb): Force input_location on the arguments if
7226 id->reset_location is true.
7227 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7228 is set on the function to be inlined.
7230 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7232 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7234 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7236 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7237 registers for Pmode.
7238 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7239 hard registers for the clobbered pseudo.
7241 2018-06-27 Paul Koning <ni1d@arrl.net>
7243 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7244 mutually exclusive options.
7245 * config/pdp11/constraints.md (h): New constraint.
7246 (O): Update definition to match shift code generation.
7247 (D): New constraint.
7248 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7250 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7252 (output_jump): Change arguments.
7253 (pdp11_fixed_cc_regs): New function.
7254 (pdp11_cc_mode): Ditto.
7255 (pdp11_expand_shift): Ditto.
7256 (pdp11_assemble_shift): Ditto.
7257 (pdp11_small_shift): Ditto.
7258 (pdp11_branch_cost): Remove.
7259 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7261 (pdp11_register_move_cost): Update for CC registers.
7262 (pdp11_rtx_costs): Add case for LSHIFTRT.
7263 (pdp11_output_jump): Add CCNZ mode conditional branches.
7264 (notice_update_cc_on_set): Remove.
7265 (pdp11_cc_mode): New function.
7266 (simple_memory_operand): Correct pre/post decrement case.
7267 (no_side_effect_operand): New function.
7268 (pdp11_regno_reg_class): Add CC_REGS class.
7269 (pdp11_fixed_cc_regs): New function.
7270 (pdp11_small_shift): New function.
7271 (pdp11_expand_shift): New function to expand shift insns.
7272 (pdp11_assemble_shift): New function to output shifts.
7273 (pdp11_branch_cost): Remove.
7274 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7275 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7276 (WCHAR_TYPE): Ditto.
7277 (PTRDIFF_TYPE): Ditto.
7278 (ADJUST_INSN_LENGTH): New macro.
7279 (FIXED_REGISTERS): Add CC registers.
7280 (CALL_USED_REGISTERS): Ditto.
7282 (REG_CLASS_NAMES): Ditto.
7283 (REG_CLASS_CONTENTS): Ditto.
7284 (SELECT_CC_MODE): Use new function.
7285 (TARGET_FLAGS_REGNUM): New macro.
7286 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7287 (cc0_reg_rtx): Remove.
7288 (CC_STATUS_MDEP): Remove.
7289 (CC_STATUS_MDEFP_INIT): Remove.
7290 (CC_IN_FPU): Remove.
7291 (NOTICE_UPDATE_CC): Remove.
7292 (REGISTER_NAMES): Add CC registers.
7293 (BRANCH_COST): Change to constant 1.
7294 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7296 * config/pdp11/pdp11.opt (mbcopy): Remove.
7297 (mbcopy-builtin): Remove.
7298 (mbranch-cheap): Remove.
7299 (mbranch-expensive): Remove.
7300 * config/pdp11/predicates.md (expand_shift_operand): Update to
7301 match shift code generation.
7302 (ccnz_operator): New predicate.
7303 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7304 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7305 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7307 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7308 description of O constraint.
7310 2018-06-27 Jeff Law <law@redhat.com>
7311 Austin Law <austinklaw@gmail.com>
7313 * config/v850/v850.md (addsi3_set_flags): New pattern.
7314 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7315 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7316 (zero_extendhisi2_v850_set_flags): Likewise.
7317 (zero_extendqisi2_v850_set_flags): Likewise.
7318 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7319 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7320 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7322 * config/v850/v850-protos.h (notice_update_cc): Remove.
7323 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7324 (v850_print_operand): Handle 'D' and "d".
7325 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7326 Add handling of arithmetic/logical operations compared against zero.
7327 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7328 Do not look at v850_compare_op, instead get mode from last argument.
7329 (v850_gen_compare): Remove
7330 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7331 after reload for prologue insns.
7332 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7334 (construct_save_jarl): Likewise.
7335 (TARGET_FLAGS_REGNUM): Define.
7336 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7337 (NOTICE_UPDATE_CC): Remove.
7338 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7339 than cc0. Conditionalize on reload_completed.
7340 (cmpsi_insn, setfcc_insn): Likewise.
7341 (tst1 splitter): Turn into define_and_split which sets the flags
7343 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7344 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7345 (cstoresf4, cstoredf4): Clobber the flags.
7346 (cmpsi, cmpsf, cmpdf): Remove expanders.
7347 (setf_insn): Remove pattern.
7348 (addsi3): Turn into define_and_split which clobbers the flags after
7349 reload and a suitable pattern (addsi3_clobber_flags) for use after
7351 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7352 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7353 (ashrsi3, ashrsi3_v850e2): Likewise.
7354 (bins): Clobber the flags.
7355 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7356 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7357 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7358 (call_value_internal_short, call_value_internal_long): Likewise.
7359 (callt_save_interrupt, callt_return_interrupt): Likewise.
7360 (save_interrupt, return_interrupt): Likewise.
7361 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7362 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7363 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7364 (All FP comparisons): Only allow after reload has completed.
7366 (divh, divhu): Tweak output template.
7367 (branch_z_normal, branch_z_invert): Remove
7368 (branch_nz_normal, branch_nz_invert): Likewise.
7369 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7371 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7372 * config/v850/v850.c (notice_update_cc): Remove.
7373 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7374 (CC_NO_CARRY): Likewise.
7375 (NOTICE_UPDATE_CC): Define to nothing.
7376 * config/v850/v850.md: Remove block comment on cc0 handling
7377 Remove "cc" attribute from all patterns. Remove cc_status handling
7378 from all patterns. Minor formatting fixes.
7380 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7382 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7383 (cortex-a76.cortex-a55): Likewise.
7384 * config/aarch64/aarch64-tune.md: Regenerate.
7385 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7386 cortex-a76.cortex-a55.
7388 2018-06-27 Jeff Law <law@redhat.com>
7390 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7391 (MULTILIB_DIRNAMES): Similarly.
7393 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7395 * gimple.h (gimple_return_retbnd): Delete.
7396 (gimple_return_set_retbnd): Likewise.
7397 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7398 gimple_return_set_retbnd.
7399 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7400 gimple_return_retbnd and adjust.
7401 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7402 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7403 Explicitly return NULL in a couple more cases. Move assertion
7404 on debug statements and remove unreachable code.
7405 (reset_debug_binding): Do not test id->retbnd.
7406 (expand_call_inline): Do not set it.
7408 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7410 * configure.ac: Add --disable-gcov option.
7411 * configure: Regenerate.
7412 * Makefile.in: Honour @enable_gcov@.
7413 * doc/install.texi: Document --disable-gcov.
7415 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7417 * config/arm/arm-cpus.in (cortex-a76): New entry.
7418 (cortex-a76.cortex-a55): Likewise.
7419 * config/arm/arm-tables.opt: Regenerate.
7420 * config/arm/arm-tune.md: Likewise.
7421 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7422 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7423 cortex-a76.cortex-a55.
7425 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7428 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7430 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7432 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7434 (EPILOGUE_USES): Likewise.
7436 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7438 * tree-inline.c (remap_location): New function extracted from...
7439 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7440 (copy_phis_for_bb): ...here. Call remap_location.
7441 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7443 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7445 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7446 unaligned vsx for 16B memset.
7448 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7451 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7452 ieee128_float_type_node to long_double_type_node unless
7453 TARGET_LONG_DOUBLE_128 is set.
7455 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7457 * cfgloop.c (get_loop_location): Convert return type from
7458 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7459 by implicit construction from rtx_insn *, and using
7460 dump_user_location_t::from_function_decl for the fallback case.
7461 * cfgloop.h (get_loop_location): Convert return type from
7462 location_t to dump_user_location_t.
7463 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7464 dump_printf_loc to pass in a dump_location_t rather than a
7465 location_t, via the gimple stmt.
7466 * coverage.c (get_coverage_counts): Update calls to
7467 dump_printf_loc to pass in dump_location_t rather than a
7469 * doc/optinfo.texi (Dump types): Convert example of
7470 dump_printf_loc from taking "locus" to taking "insn". Update
7471 description of the "_loc" calls to cover dump_location_t.
7472 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7474 (dump_user_location_t::dump_user_location_t): New constructors,
7475 from gimple *stmt and rtx_insn *.
7476 (dump_user_location_t::from_function_decl): New function.
7477 (dump_loc): Make static.
7478 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7479 const dump_location_t &.
7480 (dump_generic_expr_loc): Delete.
7481 (dump_printf_loc): Convert param "loc" from location_t to
7482 const dump_location_t &.
7483 (selftest::test_impl_location): New function.
7484 (selftest::dumpfile_c_tests): New function.
7485 * dumpfile.h: Include "profile-count.h".
7486 (class dump_user_location_t): New class.
7487 (struct dump_impl_location_t): New struct.
7488 (class dump_location_t): New class.
7489 (dump_printf_loc): Convert 2nd param from source_location to
7490 const dump_location_t &.
7491 (dump_generic_expr_loc): Delete.
7492 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7493 const dump_location_t &.
7494 * gimple-fold.c (fold_gimple_assign): Update call to
7495 dump_printf_loc to pass in a dump_location_t rather than a
7496 location_t, via the gimple stmt.
7497 (gimple_fold_call): Likewise.
7498 * gimple-loop-interchange.cc
7499 (loop_cand::analyze_iloop_reduction_var): Update for change to
7500 check_reduction_path.
7501 (tree_loop_interchange::interchange): Update for change to
7503 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7504 change in return-type of find_loop_location.
7505 (graphite_regenerate_ast_isl): Likewise.
7506 * graphite-optimize-isl.c (optimize_isl): Likewise.
7507 * graphite.c (graphite_transform_loops): Likewise.
7508 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7509 pass in a dump_location_t rather than a location_t, via the
7511 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7512 * ipa.c (walk_polymorphic_call_targets): Likewise.
7513 * loop-unroll.c (report_unroll): Convert "locus" param from
7514 location_t to dump_location_t.
7515 (decide_unrolling): Update for change to get_loop_location's
7517 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7518 location_t to dump_user_location_t.
7519 (grid_find_single_omp_among_assignments_1): Updates calls to
7520 dump_printf_loc to pass in a dump_location_t rather than a
7521 location_t, via the gimple stmt.
7522 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7523 location_t to dump_location_t. Updates calls to dump_printf_loc
7524 to pass in a dump_location_t rather than a location_t, via the
7526 (grid_inner_loop_gridifiable_p): Likewise.
7527 (grid_dist_follows_simple_pattern): Likewise.
7528 (grid_gfor_follows_tiling_pattern): Likewise.
7529 (grid_target_follows_gridifiable_pattern): Likewise.
7530 (grid_attempt_target_gridification): Convert initialization
7531 of local "grid" from memset to zero-initialization; FIXME: does
7532 this require C++11? Update call to dump_printf_loc to pass in a
7533 optinfo_location rather than a location_t, via the gimple stmt.
7534 * profile.c (read_profile_edge_counts): Updates call to
7535 dump_printf_loc to pass in a dump_location_t rather than a
7537 (compute_branch_probabilities): Likewise.
7538 * selftest-run-tests.c (selftest::run_tests): Call
7540 * selftest.h (dumpfile_c_tests): New decl.
7541 * tree-loop-distribution.c (pass_loop_distribution::execute):
7542 Update for change in return type of find_loop_location.
7543 * tree-parloops.c (parallelize_loops): Likewise.
7544 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7545 "locus" from location_t to dump_user_location_t.
7546 (canonicalize_loop_induction_variables): Likewise.
7547 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7548 for change in return type of find_loop_location.
7549 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7550 to dump_printf_loc to pass in a dump_location_t rather than a
7551 location_t, via the stmt.
7552 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7554 * tree-vect-loop-manip.c (find_loop_location): Convert return
7555 type from source_location to dump_user_location_t.
7556 (vect_do_peeling): Update for above change.
7557 (vect_loop_versioning): Update for change in type of
7559 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7560 from location_t to dump_user_location_t.
7561 (vect_estimate_min_profitable_iters): Update for change in type
7563 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7564 location_t to dump_location_t.
7565 (vect_slp_bb): Update for change in type of vect_location.
7566 * tree-vectorizer.c (vect_location): Convert from source_location
7567 to dump_user_location_t.
7568 (try_vectorize_loop_1): Update for change in vect_location's type.
7569 (vectorize_loops): Likewise.
7570 (increase_alignment): Likewise.
7571 * tree-vectorizer.h (vect_location): Convert from source_location
7572 to dump_user_location_t.
7573 (find_loop_location): Convert return type from source_location to
7574 dump_user_location_t.
7575 (check_reduction_path): Convert 1st param from location_t to
7576 dump_user_location_t.
7577 * value-prof.c (check_counter): Update call to dump_printf_loc to
7578 pass in a dump_user_location_t rather than a location_t; update
7579 call to error_at for change in type of "locus".
7580 (check_ic_target): Update call to dump_printf_loc to
7581 pass in a dump_user_location_t rather than a location_t, via the
7584 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7586 * config/s390/s390.h (enum processor_flags): Do not use
7587 default tune parameter when -march was specified.
7589 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7592 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7593 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7596 2018-06-26 Richard Biener <rguenther@suse.de>
7598 PR tree-optimization/86287
7600 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7601 (vect_analyze_loop): Initialize n_stmts.
7603 2018-06-26 Richard Biener <rguenther@suse.de>
7606 * fold-const.c (fold_convertible_p): Pointer extension
7609 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7612 * dwarf2out.c (loc_list_has_views): Adjust comments.
7613 (dw_loc_list): Split single cross-partition range with
7616 2018-06-25 Jeff Law <law@redhat.com>
7618 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7619 on -mbig-switch by default.
7621 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7623 (const_float_0_operand): Remove unused predicate.
7624 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7625 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7626 (recipsf2): New expander. Original pattern now called
7628 (recipdf2, recipdf2_insn): Similarly.
7629 (rsqrtsf2, rsqrtsf2_insn): Similarly
7630 (rsqrtdf2, rsqrtdf2_insn): Similarly
7632 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7634 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7635 Simplify logic for FreeBSD (twice).
7637 2018-06-25 Martin Sebor <msebor@redhat.com>
7639 PR tree-optimization/86204
7640 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7641 a strnlen result if it's less than the length of the string.
7643 2018-06-25 Martin Sebor <msebor@redhat.com>
7645 PR tree-optimization/85700
7646 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7647 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7648 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7650 2018-06-25 Martin Sebor <msebor@redhat.com>
7652 * doc/extend.texi (Zero-length arrays): Update and clarify.
7654 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7656 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7657 added IEEE/IBM long double multilib support on PowerPC little
7658 endian Linux systems.
7659 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7660 (MULTILIB_DEFAULTS): Likewise.
7661 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7663 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7664 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7665 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7667 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7670 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7671 (REORDER_45): Likewise.
7673 2018-06-25 Jeff Law <law@redhat.com>
7675 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7676 dividend to 32 bits. Adjust length.
7677 (udivmodhi4): Cleanup output template. Fix length.
7679 2018-06-25 Carl Love <cel@us.ibm.com>
7681 * config/rs6000/vsx.md: Change word selector to prefered location.
7683 2018-06-25 Richard Biener <rguenther@suse.de>
7685 PR tree-optimization/86304
7686 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7687 epilogue-if-converted loops as well.
7689 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7691 * lto-section-out.c (lto_begin_section): Do not print section
7692 name for noaddr and unnumbered dumps.
7694 2018-06-25 Richard Biener <rguenther@suse.de>
7696 * tree-vectorizer.h (struct vec_info_shared): New structure
7697 with parts split out from struct vec_info and loop_nest from
7698 struct _loop_vec_info.
7699 (struct vec_info): Adjust accordingly.
7700 (struct _loop_vec_info): Likewise.
7701 (LOOP_VINFO_LOOP_NEST): Adjust.
7702 (LOOP_VINFO_DATAREFS): Likewise.
7703 (LOOP_VINFO_DDRS): Likewise.
7704 (struct _bb_vec_info): Likewise.
7705 (BB_VINFO_DATAREFS): Likewise.
7706 (BB_VINFO_DDRS): Likewise.
7707 (struct _stmt_vec_info): Add dr_aux member.
7708 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7709 (DR_MISALIGNMENT_UNINITIALIZED): New.
7710 (set_dr_misalignment): Adjust.
7711 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7712 (vect_analyze_loop): Adjust prototype.
7713 (vect_analyze_loop_form): Likewise.
7714 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7715 Compute dependences lazily.
7716 (vect_record_base_alignments): Use shared datarefs/ddrs.
7717 (vect_verify_datarefs_alignment): Likewise.
7718 (vect_analyze_data_refs_alignment): Likewise.
7719 (vect_analyze_data_ref_accesses): Likewise.
7720 (vect_analyze_data_refs): Likewise.
7721 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7722 constructor parameter for shared part.
7723 (vect_analyze_loop_form): Pass in shared part and adjust.
7724 (vect_analyze_loop_2): Pass in storage for the number of
7725 stmts. Move loop nest finding to the caller. Compute
7727 (vect_analyze_loop): Pass in shared part.
7728 (vect_transform_loop): Verify shared datarefs are unchanged.
7729 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7730 constructor parameter for shared part.
7731 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7732 (vect_slp_bb): Verify shared datarefs are unchanged before
7734 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7736 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7737 DR_MISALIGNMENT_UNINITIALIZED.
7738 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7739 parameter for shared part.
7740 (vec_info::~vec_info): Adjust.
7741 (vec_info_shared::vec_info_shared): New.
7742 (vec_info_shared::~vec_info_shared): Likewise.
7743 (vec_info_shared::save_datarefs): Likewise.
7744 (vec_info_shared::check_datarefs): Likewise.
7745 (try_vectorize_loop_1): Construct shared part live for analyses
7746 of a single loop for multiple vector sizes.
7747 * tree-parloops.c (gather_scalar_reductions): Adjust.
7749 2018-06-25 Richard Biener <rguenther@suse.de>
7751 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7752 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7753 (vect_analyze_data_refs): Remove similar code from here and
7754 simplify accordingly.
7756 2018-06-25 Richard Biener <rguenther@suse.de>
7758 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7759 for reverse storage order accesses rather than asserting
7760 they cannot happen here.
7762 2018-06-25 Tom de Vries <tdevries@suse.de>
7765 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7766 Use data16 instead of .byte for insn prefix.
7768 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7771 * parser.c (make_char_string_pack): Pass this literal chars
7772 through cpp_interpret_string.
7773 (cp_parser_userdef_numeric_literal): Check the result of
7774 make_char_string_pack.
7776 2018-06-24 Maya Rashish <coypu@sdf.org>
7778 * ginclude/stddef.h: Simplify conditions around avoiding
7779 re-definition of __size_t.
7781 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7783 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7784 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7786 2018-06-22 Maya Rashish <coypu@sdf.org>
7788 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7789 made to OpenBSD and NetBSD through the years.
7791 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7793 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7794 behavior of vec_pack (vector double, vector double) to match
7795 behavior of vec_float2 (vector double, vector double).
7797 2018-06-22 Olivier Hainque <hainque@adacore.com>
7799 * gimplify.c (gimplify_function_tree): Prevent creation
7800 of a trampoline for the address of the current function
7801 passed to entry/exit instrumentation hooks.
7803 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7806 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7809 2018-06-22 Martin Liska <mliska@suse.cz>
7811 PR tree-optimization/86263
7812 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7813 Bail out if is_enabled is false.
7814 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7816 (jump_table_cluster::is_enabled): New function.
7818 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7820 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7821 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7822 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7823 (lto_input_ts_binfo_tree_pointers): Likewise.
7824 * tree-streamer-out.c (streamer_write_tree_bitfields,
7825 write_ts_binfo_tree_pointers): Likewise.
7826 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7828 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7830 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7832 2018-06-22 Martin Liska <mliska@suse.cz>
7834 * symbol-summary.h (get): Make it pure and inline move
7835 functionality from ::get function.
7836 (get): Remove and inline into ::get and ::get_create.
7837 (get_create): Move code from ::get function.
7839 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7842 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7843 -x assembler-with-cpp.
7845 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7847 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7848 _FILE_OFFSET_BITS=64 for C++.
7850 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7852 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7853 conversion insn that shows up when pr85657-3.c is compiled using
7854 IEEE 128-bit long double.
7855 (neg<mode>2_internal): Use the correct mode to check whether the
7856 mode is IBM extended.
7857 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7858 multiply and divide external functions from being created more
7861 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7863 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7865 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7866 the edge can be forwarded.
7867 (cfg_layout_merge_blocks): Likewise.
7869 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7871 * except.c (finish_eh_generation): Commit edge insertions only after
7872 the EH edges have been redirected from post-landing to landing pads.
7874 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7876 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7877 create_tmp_var_for to create the FRAME decl.
7878 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7880 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7882 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7883 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7884 debug statement when resetting its value.
7885 (expand_call_inline): Copy the locus of the call onto the assignment
7886 of the return value, if any. Use local variable in more cases.
7888 2018-06-21 Martin Liska <mliska@suse.cz>
7890 * ipa-pure-const.c (propagate_nothrow): Use
7891 funct_state_summaries->get.
7892 (dump_malloc_lattice): Likewise.
7893 (propagate_malloc): Likewise.
7895 2018-06-21 Richard Biener <rguenther@suse.de>
7897 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7898 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7899 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7901 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7902 BLOCK_ABSTRACT_ORIGIN unconditionally.
7904 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7906 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7908 * ipa-reference.c (ipa_reference_c_finalize): Delete
7909 ipa_ref_opt_sum_summaries and set it to NULL.
7911 2018-06-21 Tom de Vries <tdevries@suse.de>
7913 PR tree-optimization/85859
7914 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7915 test with comment from bb_no_side_effects_p.
7917 2018-06-21 Richard Biener <rguenther@suse.de>
7919 PR tree-optimization/86232
7920 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7921 max for constant niter.
7923 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7925 * config/aarch64/aarch64-simd.md
7926 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7928 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7930 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7931 Make opernads of the unspec commutative.
7933 2018-06-21 Richard Biener <rguenther@suse.de>
7935 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7936 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7937 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7938 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7940 (vect_record_base_alignments): Do not record base alignment
7941 for gathers or scatters.
7942 (vect_compute_data_ref_alignment): Drop return value that is always
7943 true. Bail out early for gathers or scatters.
7944 (vect_enhance_data_refs_alignment): Bail out early for gathers
7946 (vect_find_same_alignment_drs): Likewise.
7947 (vect_analyze_data_refs_alignment): Remove dead code.
7948 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7949 (vect_analyze_data_refs): For possible gathers or scatters do
7950 not create an alternate DR, just check their possible validity
7951 and mark them. Adjust DECL_NONALIASED handling to not rely
7953 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7954 update inits of gathers or scatters.
7955 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7956 Also copy gather/scatter flag to pattern vinfo.
7958 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7960 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7961 behavior of vec_packsu (vector unsigned long long, vector unsigned
7962 long long) to match behavior of vec_packs with same signature.
7964 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7965 Thomas Schwinge <thomas@codesourcery.com>
7966 Cesar Philippidis <cesar@codesourcery.com>
7968 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7969 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7970 (gimplify_adjust_omp_clauses): Likewise.
7971 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7972 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7973 (gimplify_omp_target_update): Update handling of acc update and
7975 * omp-low.c (install_var_field): Remove unused parameter
7976 base_pointers_restrict.
7977 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7978 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7980 (omp_target_base_pointers_restrict_p): Delete.
7981 (scan_omp_target): Update call to scan_sharing_clauses.
7982 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7984 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7985 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7986 (convert_local_omp_clauses): Likewise.
7987 * tree-pretty-print.c (dump_omp_clause): Likewise.
7988 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7990 (omp_clause_code_name): Likewise.
7992 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7995 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7998 PR tree-optimization/86231
7999 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8000 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8002 2018-06-20 Tom de Vries <tdevries@suse.de>
8004 PR tree-optimization/86097
8005 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8006 iv type if signedness of iv type is not the same as that of *nit.
8008 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8010 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8011 EDGE_EH edges, verify they are all EDGE_EH.
8013 2018-06-20 Maya Rashish <coypu@sdf.org>
8015 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8017 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8019 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8020 * config/aarch64/aarch64.c (xgene1_tunings): Add
8021 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8022 (aarch64_mode_valid_for_sched_fusion_p):
8023 Allow 16-byte modes.
8024 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8025 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8027 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8029 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8030 * config/aarch64/iterators.md (VQ2): New mode iterator.
8032 2018-06-20 Martin Liska <mliska@suse.cz>
8034 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8035 Change default ratio from 10 to 8.
8037 2018-06-20 Martin Liska <mliska@suse.cz>
8039 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8041 (bit_test_cluster::find_bit_tests): Likewise.
8042 (switch_decision_tree::analyze_switch_statement): Find clusters.
8043 * tree-switch-conversion.h (struct jump_table_cluster): Document
8046 2018-06-20 Martin Liska <mliska@suse.cz>
8048 * tree-switch-conversion.c (switch_conversion::collect):
8049 Record m_uniq property.
8050 (switch_conversion::expand): Bail out for special conditions.
8051 (group_cluster::~group_cluster): New.
8052 (group_cluster::group_cluster): Likewise.
8053 (group_cluster::dump): Likewise.
8054 (jump_table_cluster::emit): New.
8055 (switch_decision_tree::fix_phi_operands_for_edges): New.
8056 (struct case_node): Remove struct.
8057 (jump_table_cluster::can_be_handled): New.
8058 (case_values_threshold): Moved to header.
8059 (reset_out_edges_aux): Likewise.
8060 (jump_table_cluster::is_beneficial): New.
8061 (bit_test_cluster::can_be_handled): Likewise.
8062 (add_case_node): Remove.
8063 (bit_test_cluster::is_beneficial): New.
8064 (case_bit_test::cmp): New.
8065 (bit_test_cluster::emit): New.
8066 (expand_switch_as_decision_tree_p): Remove.
8067 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8068 (fix_phi_operands_for_edge): Likewise.
8069 (switch_decision_tree::analyze_switch_statement): New.
8070 (compute_cases_per_edge): Move ...
8071 (switch_decision_tree::compute_cases_per_edge): ... here.
8072 (try_switch_expansion): Likewise.
8073 (switch_decision_tree::try_switch_expansion): Likewise.
8074 (record_phi_operand_mapping): Likewise.
8075 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8076 (emit_case_decision_tree): Likewise.
8077 (switch_decision_tree::emit): Likewise.
8078 (balance_case_nodes): Likewise.
8079 (switch_decision_tree::balance_case_nodes): Likewise.
8080 (dump_case_nodes): Likewise.
8081 (switch_decision_tree::dump_case_nodes): Likewise.
8082 (emit_jump): Likewise.
8083 (switch_decision_tree::emit_jump): Likewise.
8084 (emit_cmp_and_jump_insns): Likewise.
8085 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8086 (emit_case_nodes): Likewise.
8087 (switch_decision_tree::emit_case_nodes): Likewise.
8088 (conditional_probability): Remove.
8089 * tree-switch-conversion.h (enum cluster_type): New.
8091 (struct cluster): Likewise.
8092 (cluster::cluster): Likewise.
8093 (struct simple_cluster): Likewise.
8094 (simple_cluster::simple_cluster): Likewise.
8095 (struct group_cluster): Likewise.
8096 (struct jump_table_cluster): Likewise.
8097 (struct bit_test_cluster): Likewise.
8098 (struct min_cluster_item): Likewise.
8099 (struct case_tree_node): Likewise.
8100 (case_tree_node::case_tree_node): Likewise.
8101 (jump_table_cluster::case_values_threshold): Likewise.
8102 (struct case_bit_test): Likewise.
8103 (struct switch_decision_tree): Likewise.
8104 (struct switch_conversion): Likewise.
8105 (switch_decision_tree::reset_out_edges_aux): Likewise.
8107 2018-06-20 Martin Liska <mliska@suse.cz>
8109 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8110 (hoist_edge_and_branch_if_true): Likewise.
8111 (expand_switch_using_bit_tests_p): Likewise.
8112 (struct case_bit_test): Likewise.
8113 (case_bit_test_cmp): Likewise.
8114 (emit_case_bit_tests): Likewise.
8115 (switch_conversion::switch_conversion): New class.
8116 (struct switch_conv_info): Remove old struct.
8117 (collect_switch_conv_info): More to ...
8118 (switch_conversion::collect): ... this.
8119 (check_range): Likewise.
8120 (switch_conversion::check_range): Likewise.
8121 (check_all_empty_except_final): Likewise.
8122 (switch_conversion::check_all_empty_except_final): Likewise.
8123 (check_final_bb): Likewise.
8124 (switch_conversion::check_final_bb): Likewise.
8125 (create_temp_arrays): Likewise.
8126 (switch_conversion::create_temp_arrays): Likewise.
8127 (free_temp_arrays): Likewise.
8128 (gather_default_values): Likewise.
8129 (switch_conversion::gather_default_values): Likewise.
8130 (build_constructors): Likewise.
8131 (switch_conversion::build_constructors): Likewise.
8132 (constructor_contains_same_values_p): Likewise.
8133 (switch_conversion::contains_same_values_p): Likewise.
8134 (array_value_type): Likewise.
8135 (switch_conversion::array_value_type): Likewise.
8136 (build_one_array): Likewise.
8137 (switch_conversion::build_one_array): Likewise.
8138 (build_arrays): Likewise.
8139 (switch_conversion::build_arrays): Likewise.
8140 (gen_def_assigns): Likewise.
8141 (switch_conversion::gen_def_assigns): Likewise.
8142 (prune_bbs): Likewise.
8143 (switch_conversion::prune_bbs): Likewise.
8144 (fix_phi_nodes): Likewise.
8145 (switch_conversion::fix_phi_nodes): Likewise.
8146 (gen_inbound_check): Likewise.
8147 (switch_conversion::gen_inbound_check): Likewise.
8148 (process_switch): Use the newly created class.
8149 (switch_conversion::expand): New.
8150 (switch_conversion::~switch_conversion): New.
8151 * tree-switch-conversion.h: New file.
8153 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8155 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8156 tree-vect-patterns.c.
8157 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8158 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8159 (vect_recog_sad_pattern): Likewise.
8160 (vect_recog_widen_sum_pattern): Likewise.
8161 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8162 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8163 (vect_recog_rotate_pattern): Likewise.
8164 (vect_recog_mult_pattern): Likewise.
8165 (vect_recog_vector_vector_shift_pattern): Likewise.
8166 (vect_recog_divmod_pattern): Likewise.
8167 (vect_recog_mixed_size_cond_pattern): Likewise.
8168 (vect_recog_bool_pattern): Likewise.
8169 (vect_recog_mask_conversion_pattern): Likewise.
8170 (vect_try_gather_scatter_pattern): Likewise.
8171 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8172 (vect_recog_over_widening_pattern): Likewise.
8173 (vect_recog_gather_scatter_pattern): Likewise.
8174 (vect_recog_func_ptr): Move from tree-vectorizer.h
8175 (vect_vect_recog_func_ptrs): Move further down the file.
8176 (vect_recog_func): Likewise. Remove the third argument.
8177 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8178 (vect_pattern_recog_1): Expect the pattern function to do any
8179 necessary target tests. Also expect it to provide a vector type.
8180 Remove the type_in handling.
8182 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8184 * tree-vect-patterns.c (vect_pattern_detected): New function.
8185 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8186 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8187 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8188 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8189 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8190 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8191 (vect_recog_mask_conversion_pattern)
8192 (vect_try_gather_scatter_pattern): Likewise.
8194 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8196 * tree-vect-patterns.c (vect_get_internal_def): New function.
8197 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8198 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8199 (search_type_for_mask_1): Use it.
8201 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8203 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8204 redundant WIDEN_SUM_EXPR handling.
8205 (vect_recog_sad_pattern): Likewise.
8207 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8209 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8210 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8211 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8212 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8213 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8215 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8217 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8218 use the stmt_vec_info of the original bb statement for the
8219 new zero assignment, even if the call is part of a pattern.
8221 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8223 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8224 that the sequence is attached to the original statement rather
8225 than the pattern statement.
8226 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8227 PATTERN_DEF_SEQ from the original statement rather than
8228 the main pattern statement.
8229 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8230 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8231 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8233 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8235 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8236 definition statements before the early exit for statements that aren't
8238 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8240 (vect_transform_loop): ...here. Process pattern definition
8241 statements without first checking whether the main pattern
8242 statement is live or relevant.
8244 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8246 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8247 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8249 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8251 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8252 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8253 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8254 (expand_block_compare): Change select_block_compare_mode call.
8255 (expand_strncmp_align_check): Use new functions, fix comment.
8256 (emit_final_str_compare_gpr): New function.
8257 (expand_strn_compare): Refactor and clean up code.
8258 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8260 2018-06-19 Tony Reix <tony.reix@atos.com>
8261 Damien Bergamini <damien.bergamini@atos.com>
8262 David Edelsohn <dje.gcc@gmail.com>
8264 * collect2.c (static_obj): New variable.
8265 (static_libs): New variable.
8266 (is_in_list): Uncomment declaration.
8267 (main): Track AIX libraries linked statically.
8268 (is_in_list): Uncomment definition.
8269 (scan_prog_file): Don't add AIX shared libraries initializer
8270 to constructor list if linking statically.
8272 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8274 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8276 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8278 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8280 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8283 2018-06-19 Martin Liska <mliska@suse.cz>
8285 * config/i386/i386.c (ix86_can_inline_p): Do not use
8286 ipa_fn_summaries::get_create.
8287 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8289 (devirtualization_time_bonus): Likewise.
8290 (ipcp_propagate_stage): Likewise.
8291 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8292 (edge_set_predicate): Likewise.
8293 (evaluate_conditions_for_known_args): Likewise.
8294 (evaluate_properties_for_edge): Likewise.
8295 (ipa_call_summary::reset): Tranform to ...
8296 (ipa_call_summary::~ipa_call_summary): ... this.
8297 (ipa_fn_summary::reset): Transform to ...
8298 (ipa_fn_summary::~ipa_fn_summary): ... this.
8299 (ipa_fn_summary_t::remove): Rename to ...
8300 (ipa_fn_summary_t::remove_callees): ... this.
8301 (ipa_fn_summary_t::duplicate): Use placement new
8302 instead of memory copy.
8303 (ipa_call_summary_t::duplicate): Likewise.
8304 (ipa_call_summary_t::remove): Remove.
8305 (dump_ipa_call_summary): Change get_create to get.
8306 (ipa_dump_fn_summary): Dump only when summary exists.
8307 (analyze_function_body): Use symbol_summary::get instead
8309 (compute_fn_summary): Likewise.
8310 (estimate_edge_devirt_benefit): Likewise.
8311 (estimate_edge_size_and_time): Likewise.
8312 (inline_update_callee_summaries): Likewise.
8313 (remap_edge_change_prob): Likewise.
8314 (remap_edge_summaries): Likewise.
8315 (ipa_merge_fn_summary_after_inlining): Likewise.
8316 (write_ipa_call_summary): Likewise.
8317 (ipa_fn_summary_write): Likewise.
8318 (ipa_free_fn_summary): Likewise.
8319 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8320 (struct ipa_call_summary): Likewise.
8321 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8323 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8324 (estimate_size_after_inlining): Likewise.
8325 (estimate_growth): Likewise.
8326 (growth_likely_positive): Likewise.
8327 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8328 (inline_call): Likewise.
8329 * ipa-inline.c (caller_growth_limits): Likewise.
8330 (can_inline_edge_p): Likewise.
8331 (can_inline_edge_by_limits_p): Likewise.
8332 (compute_uninlined_call_time): Likewise.
8333 (compute_inlined_call_time): Likewise.
8334 (want_inline_small_function_p): Likewise.
8335 (edge_badness): Likewise.
8336 (update_caller_keys): Likewise.
8337 (update_callee_keys): Likewise.
8338 (inline_small_functions): Likewise.
8339 (inline_to_all_callers_1): Likewise.
8340 (dump_overall_stats): Likewise.
8341 (early_inline_small_functions): Likewise.
8342 (early_inliner): Likewise.
8343 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8344 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8345 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8346 * ipa-split.c (execute_split_functions): Likewise.
8347 * symbol-summary.h: Likewise.
8348 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8350 2018-06-19 Richard Biener <rguenther@suse.de>
8352 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8353 (vectorize_loops): ... here. Fix dbgcnt handling.
8354 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8356 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8359 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8360 ieee128 argument takes up only one (vector) register, not two (floating
8363 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8365 * gimplify.c (gimplify_init_constructor): Really never clear for an
8366 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8368 2018-06-19 Richard Biener <rguenther@suse.de>
8370 PR tree-optimization/86179
8371 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8372 after failed recognition.
8374 2018-06-18 Martin Sebor <msebor@redhat.com>
8377 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8378 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8379 Handle integer subtraction.
8380 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8381 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8383 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8385 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8386 param from rtx to rtx_insn *.
8387 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8389 (frv_ifcvt_modify_insn): Likwise.
8390 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8391 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8392 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8393 as_a <rtx_insn *> cast to local "unprotected_region" once
8394 it's been established that it's not NULL or pc_rtx.
8395 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8396 param "sethi" from rtx to rtx_insn *.
8397 (nds32_group_float_insns): Likewise for param "insn".
8398 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8400 (vax_output_int_subtract): Likewise.
8401 * config/vax/vax.c (vax_output_int_add): Likewise for param
8403 (vax_output_int_subtract): Likewise.
8404 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8405 (emit_pattern_after): Likewise for param "after".
8406 (emit_insn_after): Likewise.
8407 (emit_jump_insn_after): Likewise.
8408 (emit_call_insn_after): Likewise.
8409 (emit_debug_insn_after): Likewise.
8410 (emit_pattern_before): Likewise for param "before".
8411 (emit_insn_before): Likewise.
8412 (emit_jump_insn_before): Likewise.
8413 * final.c (get_insn_template): Likewise for param "insn", removing
8415 * output.h (get_insn_template): Likewise for 2nd param.
8416 * rtl.h (emit_insn_before): Likewise.
8417 (emit_jump_insn_before): Likewise.
8418 (emit_debug_insn_before_noloc): Likewise.
8419 (emit_insn_after): Likewise.
8420 (emit_jump_insn_after): Likewise.
8421 (emit_call_insn_after): Likewise.
8422 (emit_debug_insn_after): Likewise.
8423 (set_insn_deleted): Likewise for param.
8425 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8428 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8429 floating point modes, so that IFmode is numerically greater than
8430 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8431 to declare the ordering. This prevents IFmode from being
8432 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8433 machine. Include rs6000-modes.h to share the fractional values
8434 between genmodes* and the rest of the compiler.
8438 * config/rs6000/rs6000-modes.h: New file.
8439 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8440 meaning of rs6000_long_double_size so that 126..128 selects an
8441 appropriate 128-bit floating point type.
8442 (rs6000_option_override_internal): Likewise.
8443 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8444 (TARGET_LONG_DOUBLE_128): Change the meaning of
8445 rs6000_long_double_size so that 126..128 selects an appropriate
8446 128-bit floating point type.
8447 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8448 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8449 source and destination to match the standard usage.
8450 (truncifkf2): Likewise.
8451 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8452 ISA 2.07 to use an explicit clobber, instead of passing in a
8454 (copysign<mode>3_soft): Likewise.
8456 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8458 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8459 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8460 (vect_slp_analyze_instance_dependence): Likewise.
8461 (vect_enhance_data_refs_alignment): Likewise.
8462 (vect_analyze_data_refs_alignment): Likewise.
8463 (vect_slp_analyze_and_verify_instance_alignment
8464 (vect_analyze_data_ref_accesses): Likewise.
8465 (vect_prune_runtime_alias_test_list): Likewise.
8466 (vect_analyze_data_refs): Likewise.
8467 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8468 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8469 (vect_analyze_scalar_cycles_1): Likewise.
8470 (vect_get_loop_niters): Likewise.
8471 (vect_analyze_loop_form_1): Likewise.
8472 (vect_update_vf_for_slp): Likewise.
8473 (vect_analyze_loop_operations): Likewise.
8474 (vect_analyze_loop): Likewise.
8475 (vectorizable_induction): Likewise.
8476 (vect_transform_loop): Likewise.
8477 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8478 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8479 (vect_make_slp_decision): Likewise.
8480 (vect_detect_hybrid_slp): Likewise.
8481 (vect_slp_analyze_operations): Likewise.
8482 (vect_slp_bb): Likewise.
8483 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8484 (vectorizable_bswap): Likewise.
8485 (vectorizable_call): Likewise.
8486 (vectorizable_simd_clone_call): Likewise.
8487 (vectorizable_conversion): Likewise.
8488 (vectorizable_assignment): Likewise.
8489 (vectorizable_shift): Likewise.
8490 (vectorizable_operation): Likewise.
8491 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8493 2018-06-18 Martin Sebor <msebor@redhat.com>
8495 PR tree-optimization/81384
8496 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8497 * builtins.c (expand_builtin_strnlen): New function.
8498 (expand_builtin): Call it.
8499 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8500 * builtins.def (BUILT_IN_STRNLEN): New.
8501 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8502 Warn for bounds in excess of maximum object size.
8503 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8504 single-value ranges. Handle strnlen.
8505 (handle_builtin_strlen): Handle strnlen.
8506 (strlen_check_and_optimize_stmt): Same.
8507 * doc/extend.texi (Other Builtins): Document strnlen.
8509 2018-06-18 Maya Rashish <coypu@sdf.org>
8511 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8512 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8513 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8515 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8517 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8519 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8521 * tree.c (escaped_string::escape): Replace cast to char * by
8522 const_cast<char *> (unescaped).
8524 2018-06-18 Nick Clifton <nickc@redhat.com>
8527 * tree.c (escaped_string): New class. Converts an unescaped
8528 string into its escaped equivalent.
8529 (warn_deprecated_use): Use the new class to convert the
8530 deprecation message, if present.
8531 (test_escaped_strings): New self test.
8532 (test_c_tests): Add test_escaped_strings.
8533 * doc/extend.texi (deprecated): Add a note that the
8534 deprecation message is affected by the -fmessage-length
8535 option, and that control characters will be escaped.
8536 (#pragma GCC error): Document this pragma.
8537 (#pragma GCC warning): Likewise.
8538 * doc/invoke.texi (-fmessage-length): Document this option's
8539 effect on the #warning and #error preprocessor directives and
8540 the deprecated attribute.
8542 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8544 * tree.c (decl_value_expr_lookup): Revert latest change.
8545 (decl_value_expr_insert): Likewise.
8547 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8549 * gimplify.c (nonlocal_vlas): Delete.
8550 (nonlocal_vla_vars): Likewise.
8551 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8553 (gimplify_body): Do not create and destroy nonlocal_vlas.
8554 * tree-nested.c: Include diagnostic.h.
8555 (use_pointer_in_frame): Tweak.
8556 (lookup_field_for_decl): Add assertion and declare the transformation.
8557 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8558 internal error when the reference is in a wrong context. Do not
8559 create a debug decl by default.
8560 (note_nonlocal_block_vlas): Delete.
8561 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8562 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8563 create a debug decl by default.
8564 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8565 call is in a wrong context.
8566 (fixup_vla_decls): New function.
8567 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8568 debug variables were created.
8569 * tree.c (decl_value_expr_lookup): Add checking assertion.
8570 (decl_value_expr_insert): Likewise.
8572 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8575 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8576 * tree-scalar-evolution.c (interpret_expr): Likewise.
8577 (expression_expensive_p): Likewise.
8578 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8579 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8580 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8581 (ssa_defined_by_minus_one_stmt_p): New.
8583 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8586 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8587 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8588 * dojump.c (do_jump): Likewise.
8589 * expr.c (expand_expr_real_2): Check operand type's sign.
8590 * fold-const.c (const_unop): Handle ABSU_EXPR.
8591 (fold_abs_const): Likewise.
8592 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8593 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8594 (strip_sign_op_1): Likesise.
8595 * match.pd: Add new pattern to generate ABSU_EXPR.
8596 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8597 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8598 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8599 * tree-inline.c (estimate_operator_cost): Likewise.
8600 * tree-pretty-print.c (dump_generic_node): Likewise.
8601 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8602 * tree.def (ABSU_EXPR): New.
8604 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8607 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8608 documented as preserved for backward compatibility only.
8609 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8611 PR rtl-optimization/86108
8612 * bb-reorder.c (create_forwarder_block): Renamed to ...
8613 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8614 jump from new landing pad to the second part.
8615 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8618 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8621 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8622 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8623 Only call store_expr for halves if the mode is the same.
8626 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8627 Fix up comment formatting.
8629 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8631 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8632 (typed_splay_tree::closure,
8633 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8634 (typed_splay_tree::typed_splay_tree,
8635 typed_splay_tree::operator =): Declared private.
8636 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8637 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8638 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8639 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8640 typed_splay_tree::splay_tree_splay,
8641 typed_splay_tree::splay_tree_foreach_helper,
8642 typed_splay_tree::splay_tree_insert,
8643 typed_splay_tree::splay_tree_remove,
8644 typed_splay_tree::splay_tree_lookup,
8645 typed_splay_tree::splay_tree_predecessor,
8646 typed_splay_tree::splay_tree_successor,
8647 typed_splay_tree::splay_tree_min,
8648 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8649 (typed_splay_tree::root, typed_splay_tree::comp,
8650 typed_splay_tree::delete_key,
8651 typed_splay_tree::delete_value): New data members.
8652 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8653 typed_splay_tree::remove.
8655 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8657 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8658 -mginv and -mno-ginv to the assembler.
8659 * config/mips/mips.opt (-mcrc): New option.
8661 * doc/invoke.text (-mcrc): Document.
8664 2018-06-15 Nick Clifton <nickc@redhat.com>
8667 * tree.c (escaped_string): New class. Converts an unescaped
8668 string into its escaped equivalent.
8669 (warn_deprecated_use): Use the new class to convert the
8670 deprecation message, if present.
8671 (test_escaped_strings): New self test.
8672 (test_c_tests): Add test_escaped_strings.
8673 * doc/extend.texi (deprecated): Add a note that the
8674 deprecation message is affected by the -fmessage-length
8675 option, and that control characters will be escaped.
8676 (#pragma GCC error): Document this pragma.
8677 (#pragma GCC warning): Likewise.
8678 * doc/invoke.texi (-fmessage-length): Document this option's
8679 effect on the #warning and #error preprocessor directives and
8680 the deprecated attribute.
8682 2018-06-15 Richard Biener <rguenther@suse.de>
8684 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8685 here, also noting vector size used.
8686 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8687 size used in MSG_OPTIMIZED_LOCATIONS dump.
8688 (pass_slp_vectorize::execute): Adjust.
8690 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8693 * config/arc/arc.c (arc_return_address_register): Fix
8696 2018-06-15 Richard Biener <rguenther@suse.de>
8699 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8700 leave useless conversion stripping to force_gimple_operand_gsi.
8701 (gimplify_build2): Likewise.
8702 (gimplify_build1): Likewise.
8704 2018-06-15 Richard Biener <rguenther@suse.de>
8707 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8708 before adjusting their block.
8710 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8712 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8713 multilibs for *-*-rtems*.
8714 * config/riscv/t-rtems: New file.
8716 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8719 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8720 unsigned_type_for returns NULL.
8723 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8724 subregs of multi-word pseudos unless the float mode has word size.
8726 2018-06-14 Richard Biener <rguenther@suse.de>
8729 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8730 duplicate and harmful type_hash_canon.
8731 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8733 2018-06-14 Richard Biener <rguenther@suse.de>
8736 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8739 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8741 * config/rtems.h (STDINT_LONG32): Define.
8743 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8744 Prachi Godbole <prachi.godbole@imgtec.com>
8746 * config/mips/mips-cpus.def: Define P6600.
8747 * config/mips/mips-tables.opt: Regenerate.
8748 * config/mips/mips.c (mips_ucbranch_type): New enum.
8749 (mips_rtx_cost_data): Add support for P6600.
8750 (mips_issue_rate): Likewise.
8751 (mips_multipass_dfa_lookahead): Likewise.
8752 (mips_avoid_hazard): Likewise.
8753 (mips_reorg_process_insns): Likewise.
8754 (mips_classify_branch_p6600): New function.
8755 * config/mips/mips.h (TUNE_P6600): New define.
8756 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8757 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8758 * config/mips/mips.md: Include p6600.md.
8759 (processor): Add p6600.
8760 * config/mips/p6600.md: New file.
8761 * doc/invoke.texi: Add p6600 to supported architectures.
8763 2018-06-13 Martin Sebor <msebor@redhat.com>
8765 PR tree-optimization/86114
8766 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8768 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8770 2018-06-13 Richard Biener <rguenther@suse.de>
8772 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8773 Properly set vector type of the intermediate stmt.
8774 * tree-vect-stmts.c (vectorizable_operation): The destination
8775 var always has vectype_out type.
8777 2018-06-13 Jeff Law <law@redhat.com>
8779 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8780 integer 0 for argument to print_rtl_with_bb.
8781 (rl78_reorg): Likewise.
8783 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8785 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8786 from rtx to rtx_insn *.
8787 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8789 (add_sched_insns_for_speculation): Likewise for local "target",
8790 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8791 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8792 from rtx_insn ** to rtx_code_label **.
8793 (reorg_emit_nops): Likewise.
8794 (c6x_reorg): Likewise for local "call_labels".
8795 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8797 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8798 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8799 the loops over LABEL_REFS.
8800 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8802 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8803 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8804 (split_branches): Strengthen local "olabel" from rtx to
8805 rtx_insn *, adding a safe_as_a cast.
8806 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8808 (add_insn_after): Likewise for first two params.
8809 (add_insn_before): Likewise.
8810 (remove_insn): Likewise for param.
8811 (emit_pattern_before_noloc): Likewise for second and third params.
8812 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8813 (emit_call_insn_before_noloc): Likewise.
8814 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8816 (emit_barrier_before): Likewise.
8817 (emit_label_before): Strengthen "label" param from "rtx" to
8818 "rtx_code_label *". Strengthen "before" param from "rtx" to
8820 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8822 (emit_pattern_after_noloc): Likewise.
8823 (emit_insn_after_noloc): Likewise.
8824 (emit_jump_insn_after_noloc): Likewise.
8825 (emit_call_insn_after_noloc): Likewise.
8826 (emit_debug_insn_after_noloc): Likewise.
8827 (emit_barrier_after): Likewise.
8828 (emit_label_after): Likewise for both params.
8829 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8830 "loc" param from "int" to "location_t".
8831 (emit_insn_after_setloc): Likewise.
8832 (emit_jump_insn_after_setloc): Likewise.
8833 (emit_call_insn_after_setloc): Likewise.
8834 (emit_debug_insn_after_setloc): Likewise.
8835 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8836 "loc" param from "int" to "location_t".
8837 (emit_pattern_before): Convert NULL_RTX to NULL.
8838 (emit_insn_before_setloc): Convert "loc" param from "int" to
8840 (emit_jump_insn_before_setloc): Likewise.
8841 (emit_call_insn_before_setloc): Likewise.
8842 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8843 rtx_insn *. Convert "loc" param from "int" to "location_t".
8844 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8845 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8846 Convert 3rd param from "int" to "location_t".
8847 (emit_barrier_before, emit_barrier_after, next_real_insn):
8848 Strengthen param from rtx to rtx_insn *.
8849 (emit_label_before): Strengthen 1st param from "rtx" to
8850 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8852 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8853 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8854 Strengthen 2nd param from "rtx" to "rtx_insn *".
8855 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8856 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8857 Likewise. Convert 3rd param from "int" to "location_t".
8858 (emit_label_after): Strengthen 1st param from "rtx" to
8860 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8862 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8863 from "rtx" to "rtx_insn *".
8865 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8867 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8868 bodies streamed in with -Q.
8869 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8870 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8871 * gimple-streamer-out.c: Include gimple-pretty-print.h
8872 (output_bb): Dump stmts streamed.
8873 * lto-section-out.c: Include print-tree.h
8874 (lto_begin_section): Dump sections created.
8875 (lto_output_decl_index): Dump decl encoded.
8876 * lto-streamer-out.c: Include print-tree.h
8877 (create_output_block): Dump output block created.
8878 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8879 (output_function): Dump function output.
8880 (output_constructor): Dump constructor streamed.
8881 (write_global_stream): Output indexes encoded.
8882 (produce_asm_for_decls): Dump streams encoded.
8883 * lto-streamer.c (streamer_dump_file): New global var.
8884 * lto-streamer.h (streamer_dump_file): Declare.
8885 * passes.c (ipa_write_summaries): Initialize streamer dump.
8886 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8889 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8892 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8893 offsets for register save directives. Emit a second batch of save
8894 directives, if need be, when the function accesses prior frames.
8896 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8898 * config/arc/fpu.md (fmasf4): Force operand to register.
8899 (fnmasf4): Likewise.
8901 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8903 * config/arc/arc-protos.h (arc_pad_return): Remove.
8904 * config/arc/arc.c (machine_function): Remove force_short_suffix
8906 (arc_print_operand): Adjust printing of '&'.
8907 (arc_verify_short): Remove conditional printing of short suffix.
8908 (arc_final_prescan_insn): Remove reference to size_reason.
8909 (pad_return): New function.
8910 (arc_reorg): Call pad_return.
8911 (arc_pad_return): Remove.
8912 (arc_init_machine_status): Remove reference to force_short_suffix.
8913 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8914 (attr length): When attribute iscompact is true force to 2
8915 regardless; in the case of maybe check if we want to force the
8916 instruction to have 4 bytes length.
8917 (nopv): Change it to generate 4 byte long nop as well.
8918 (blockage): New pattern.
8919 (simple_return): Remove call to arc_pad_return.
8920 (p_return_i): Likewise.
8922 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8924 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8926 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8928 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8931 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8933 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8934 for ARC700 and ARCv2.
8936 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8939 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8940 operands[2] instead of operands[1].
8943 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8945 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8946 case, check whether the outer register overlaps an unallocatable
8947 register, not just whether it fits the required class.
8949 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8951 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8953 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8954 (memrefs_conflict_p): Likewise.
8955 (init_alias_analysis): Likewise.
8956 * cfgexpand.c (expand_debug_expr): Likewise.
8957 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8958 * cse.c (fold_rtx): Likewise.
8959 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8960 * expr.c (emit_block_move_hints): Likewise.
8961 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8962 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8963 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8964 (emit_group_store): Likewise.
8965 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8966 to read the PRE/POST_MODIFY increment.
8967 * calls.c (store_one_arg): Use strip_offset.
8968 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8970 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8972 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8973 (simplify_binary_operation_1): Extend CONST_INT handling to
8975 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8976 than a HOST_WIDE_INT.
8977 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8979 (adjust_mems, add_stores): Update accodingly.
8980 (vt_canonicalize_addr): Track polynomial offsets.
8981 (emit_note_insn_var_location): Likewise.
8982 (vt_add_function_parameter): Likewise.
8983 (vt_initialize): Likewise.
8985 2018-06-12 Jeff Law <law@redhat.com>
8987 * config.gcc (alpha*-*-freebsd*): Remove.
8988 * config/alpha/freebsd.h: Remove.
8990 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8993 * spellcheck-tree.c (levenshtein_distance): Rename to...
8994 (get_edit_distance): ...this, and update for underlying renaming.
8995 * spellcheck-tree.h (levenshtein_distance): Rename to...
8996 (get_edit_distance): ...this.
8997 * spellcheck.c (levenshtein_distance): Rename to...
8998 (get_edit_distance): ...this. Convert from Levenshtein distance
8999 to Damerau-Levenshtein distance by supporting transpositions of
9000 adjacent characters. Rename "v1" to "v_next" and "v0" to
9002 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9003 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9004 update for underlying renaming.
9005 (selftest::levenshtein_distance_unit_test): Rename to...
9006 (selftest::test_get_edit_distance_unit): ...this, and update for
9007 underlying renaming.
9008 (selftest::test_find_closest_string): Add example from PR 69968
9009 where transposition helps
9010 (selftest::test_metric_conditions): Update for renaming.
9011 (selftest::test_metric_conditions): Likewise.
9012 (selftest::spellcheck_c_tests): Likewise.
9013 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9014 (get_edit_distance): ...this.
9015 (best_match::consider): Update for renaming.
9017 2018-06-12 Martin Sebor <msebor@redhat.com>
9019 PR tree-optimization/85259
9020 * builtins.c (compute_objsize): Handle constant offsets.
9021 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9022 true iff a warning has been issued.
9023 * gimple.h (gimple_nonartificial_location): New function.
9024 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9025 gimple_nonartificial_location and handle -Wno-system-headers.
9026 (handle_builtin_stxncpy): Same.
9028 2018-06-12 Martin Sebor <msebor@redhat.com>
9031 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9033 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9035 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9036 BUILTIN_VEC_XST entries for pointer to double and long long.
9038 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9041 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9043 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9046 2018-06-12 Martin Liska <mliska@suse.cz>
9048 * doc/options.texi: Document IntegerRange.
9050 2018-06-12 Martin Liska <mliska@suse.cz>
9052 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9053 * opt-functions.awk: Handle Deprecated flag.
9054 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9056 (read_cmdline_option): Report warning for a deprecated option.
9057 * opts.h (struct cl_option): Add new field cl_deprecated.
9058 (CL_ERR_DEPRECATED): New.
9060 2018-06-12 Martin Liska <mliska@suse.cz>
9062 * doc/options.texi: Document Deprecated option flag.
9064 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9066 * config/arc/arc-arch.h (arc_extras): New enum.
9067 (arc_cpu_t):Add field extra.
9068 (arc_cpu_types): Consider the extras.
9069 * config/arc/arc-cpus.def: Add extras info.
9070 * config/arc/arc-opts.h (processor_type): Consider extra field.
9071 * config/arc/arc.c (arc_override_options): Handle extra field.
9073 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9075 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9076 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9078 * config/arc/arc.c (arc_init): Update pic warning.
9079 (irq_range): Update irq range parsing warnings.
9080 (arc_override_options): Update various warning messages.
9081 (arc_handle_aux_attribute): Likewise.
9083 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9085 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9087 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9089 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9090 compiler messages directives.
9092 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9094 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9095 * config/mips/mips-tables.opt: Regenerate.
9096 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9098 * doc/invoke.texi: Document -march=i6500.
9100 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9102 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9103 (i6400_gpmul): Add cpu_unit.
9104 (i6400_gpdiv): Likewise.
9105 (i6400_msa_add_d): Update reservations.
9106 (i6400_msa_int_add) Likewise.
9107 (i6400_msa_short_logic3) Likewise.
9108 (i6400_msa_short_logic2) Likewise.
9109 (i6400_msa_short_logic) Likewise.
9110 (i6400_msa_move) Likewise.
9111 (i6400_msa_cmp) Likewise.
9112 (i6400_msa_short_float2) Likewise.
9113 (i6400_msa_div_d) Likewise.
9114 (i6400_msa_long_logic1) Likewise.
9115 (i6400_msa_long_logic2) Likewise.
9116 (i6400_msa_mult) Likewise.
9117 (i6400_msa_long_float2) Likewise.
9118 (i6400_msa_long_float4) Likewise.
9119 (i6400_msa_long_float5) Likewise.
9120 (i6400_msa_long_float8) Likewise.
9121 (i6400_fpu_fadd): Include frint type.
9122 (i6400_fpu_store): New define_insn_reservation.
9123 (i6400_fpu_load): Likewise.
9124 (i6400_fpu_move): Likewise.
9125 (i6400_fpu_fcmp): Likewise.
9126 (i6400_fpu_fmadd): Likewise.
9127 (i6400_int_mult): Include imul3nc type and update reservation.
9128 (i6400_int_div): Include idiv3 type and update reservation.
9129 (i6400_int_load): Update to check type not move_type.
9130 (i6400_int_store): Likewise.
9131 (i6400_int_prefetch): Set zero latency.
9133 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9135 * gcc.c: Document new %@{...} sequence.
9136 (LINK_COMMAND_SPEC): Use it for the -L switches.
9137 (cpp_unique_options): Use it for the -I switches.
9138 (at_file_argbuf): New global variable.
9139 (in_at_file): Likewise.
9140 (alloc_args): Create at_file_argbuf.
9141 (clear_args): Truncate at_file_argbuf.
9142 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9143 (open_at_file): New function.
9144 (close_at_file): Likewise.
9145 (create_at_file): Delete.
9146 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9149 (validate_switches_from_spec): Deal with %@{...} sequence.
9150 (validate_switches): Likewise.
9151 (driver::finalize): Call clear_args.
9153 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9155 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9157 2018-06-11 Martin Sebor <msebor@redhat.com>
9159 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9160 (Wno-class-memaccess): Add @opindex.
9161 (Wno-templates, Wno-multiple-inheritance): Same.
9162 (Wno-virtual-inheritance, Wno-namespaces): Same.
9163 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9164 (Wno-format-overflow, Wno-format-truncation): Same.
9165 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9166 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9167 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9168 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9169 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9170 (Wno-misspelled-isr): Same.
9172 2018-06-11 Martin Sebor <msebor@redhat.com>
9174 * PR tree-optimization/86083
9175 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9177 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9179 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9181 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9184 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9185 on the correct operand.
9186 (*movdi_internal64): Ditto.
9188 2018-06-11 Martin Liska <mliska@suse.cz>
9190 PR tree-optimization/86089
9191 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9193 2018-06-11 Julia Koval <julia.koval@intel.com>
9195 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9196 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9197 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9199 2018-06-11 Olivier Hainque <hainque@adacore.com>
9201 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9202 for Ada with strict dwarf2.
9204 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9207 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9210 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9212 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9214 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9216 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9219 2018-06-08 Martin Liska <mliska@suse.cz>
9221 * tree-cfg.h (debug_function): Fix argument type to match
9224 2018-06-08 Martin Liska <mliska@suse.cz>
9226 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9227 Remove usage of MPX-related (and removed) fields.
9228 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9230 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9232 * cfg.c (debug): Use TDF_NONE rather than 0.
9233 * cfghooks.c (debug): Likewise.
9234 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9235 (struct dump_option_value_info): Convert to...
9236 (struct kv_pair): ...this template type.
9237 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9239 (optinfo_verbosity_options): Likewise.
9240 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9242 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9243 than int for "optgroup_flags" param.
9244 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9246 (dump_dec): Likewise.
9247 (dump_finish): Use TDF_NONE rather than 0.
9248 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9249 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9250 than 0. Update for change to option_ptr.
9251 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9252 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9253 0. Update for changes to optinfo_verbosity_options and
9255 (opt_info_switch_p): Convert optgroup_flags from int to
9257 (dump_basic_block): Use dump_flags_t rather than int
9258 for "dump_kind" param.
9259 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9260 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9261 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9262 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9263 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9264 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9265 TDF_NONE): Convert from macros to...
9266 (enum dump_flag): ...this new enum.
9267 (dump_flags_t): Update to use enum.
9268 (operator|, operator&, operator~, operator|=, operator&=):
9269 Implement for dump_flags_t.
9270 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9271 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9272 Convert from macros to...
9273 (enum optgroup_flag): ...this new enum.
9274 (optgroup_flags_t): New typedef.
9275 (operator|, operator|=): Implement for optgroup_flags_t.
9276 (struct dump_file_info): Convert field "alt_flags" to
9277 dump_flags_t. Convert field "optgroup_flags" to
9279 (dump_basic_block): Use dump_flags_t rather than int for param.
9280 (dump_generic_expr_loc): Likewise.
9281 (dump_dec): Likewise.
9282 (dump_register): Convert param "optgroup_flags" to
9284 (opt_info_enable_passes): Likewise.
9285 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9287 * gimple-pretty-print.c (debug): Likewise.
9288 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9289 (merged_store_group::apply_stores): Likewise.
9290 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9291 * gimple.c (verify_gimple_pp): Likewise.
9292 * graphite-poly.c (print_pbb_body): Likewise.
9293 * passes.c (pass_manager::register_one_dump_file): Convert
9294 local "optgroup_flags" to optgroup_flags_t.
9295 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9297 (debug_body): Likewise.
9298 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9299 to optgroup_flags_t.
9300 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9302 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9303 (convert_mult_to_fma): Likewise.
9304 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9305 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9306 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9307 "dump_kind" to dump_flags_t.
9309 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9311 * config/rs6000/rs6000.c (min, max): Delete.
9313 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9315 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9316 -mabi=spe and -mabi=no-spe.
9318 2018-06-08 Martin Liska <mliska@suse.cz>
9320 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9321 where we expect an existing summary.
9323 2018-06-08 Martin Liska <mliska@suse.cz>
9325 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9326 * ipa-inline.h (estimate_edge_growth): Likewise.
9328 2018-06-08 Martin Liska <mliska@suse.cz>
9330 * cgraph.c (function_version_hasher::hash): Use
9331 cgraph_node::get_uid ().
9332 (function_version_hasher::equal):
9333 * cgraph.h (cgraph_node::get_uid): New method.
9334 * ipa-inline.c (update_caller_keys): Use
9335 cgraph_node::get_uid ().
9336 (update_callee_keys): Likewise.
9337 * ipa-utils.c (searchc): Likewise.
9338 (ipa_reduced_postorder): Likewise.
9339 * lto-cgraph.c (input_node): Likewise.
9340 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9341 * symbol-summary.h (symtab_insertion): Likewise.
9342 (symtab_removal): Likewise.
9343 (symtab_duplication): Likewise.
9344 * tree-pretty-print.c (dump_function_header): Likewise.
9345 * tree-sra.c (convert_callers_for_node): Likewise.
9347 2018-06-08 Martin Liska <mliska@suse.cz>
9349 * cgraph.c (symbol_table::create_edge): Always assign a new
9351 (symbol_table::free_edge): Do not recycle numbers.
9352 * cgraph.h (cgraph_edge::get): New method.
9353 * symbol-summary.h (symtab_removal): Use it.
9354 (symtab_duplication): Likewise.
9355 (call_summary::hashable_uid): Remove.
9357 2018-06-08 Martin Liska <mliska@suse.cz>
9359 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9360 (initialize_growth_caches): Remove.
9361 (free_growth_caches): Likewise.
9362 (do_estimate_edge_time): Use edge_growth_cache.
9363 (do_estimate_edge_size): Likewise.
9364 (do_estimate_edge_hints): Likewise.
9365 * ipa-inline.c (reset_edge_caches): Likewise.
9366 (recursive_inlining): Likewise.
9367 (inline_small_functions): Likewise.
9368 * ipa-inline.h (initialize_growth_caches): Remove.
9369 (estimate_edge_size): Likewise.
9370 (estimate_edge_time): Likewise.
9371 (estimate_edge_hints): Likewise.
9372 (reset_edge_growth_cache): Likewise.
9373 * symbol-summary.h (call_summary::remove): New method.
9375 2018-06-08 Martin Liska <mliska@suse.cz>
9377 * ipa-cp.c (class edge_clone_summary): New summary.
9378 (grow_edge_clone_vectors): Remove.
9379 (ipcp_edge_duplication_hook): Remove.
9380 (class edge_clone_summary_t): New call_summary class.
9381 (ipcp_edge_removal_hook): Remove.
9382 (edge_clone_summary_t::duplicate): New function.
9383 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9384 (create_specialized_node): Likewise.
9385 (ipcp_driver): Initialize edge_clone_summaries and do not
9388 2018-06-08 Martin Liska <mliska@suse.cz>
9390 * symbol-summary.h (get): New function.
9391 (call_summary::m_initialize_when_cloning): New class member.
9393 2018-06-08 Martin Liska <mliska@suse.cz>
9395 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9396 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9397 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9398 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9399 (remove_cgraph_node_from_order): Use the removed_nodes set.
9400 (do_per_function_toporder): Likwise.
9401 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9402 instead of summary_uid.
9403 (symtab_removal): Likewise.
9404 (symtab_duplication): Likewise.
9406 2018-06-08 Martin Liska <mliska@suse.cz>
9408 * ipa-cp.c (ipcp_store_bits_results): Use
9409 ipcp_transformation_sum.
9410 (ipcp_store_vr_results): Likewise.
9411 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9413 (ipcp_transformation_initialize): ... this.
9414 (ipa_set_node_agg_value_chain):
9415 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9416 (write_ipcp_transformation_info): Likewise.
9417 (read_ipcp_transformation_info): Likewise.
9418 (ipcp_update_bits): Likewise.
9419 (ipcp_update_vr): Likewise.
9420 (ipcp_transform_function): Likewise.
9421 * ipa-prop.h: Rename ipcp_transformation_summary to
9422 ipcp_transformation.
9423 (class ipcp_transformation_t): New function summary.
9424 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9425 (ipa_get_agg_replacements_for_node): Likewise.
9427 2018-06-08 Martin Liska <mliska@suse.cz>
9429 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9431 (class funct_state_summary_t): New function_summary class.
9432 (has_function_state): Remove.
9433 (get_function_state): Likewise.
9434 (set_function_state): Likewise.
9435 (add_new_function): Likewise.
9436 (funct_state_summary_t::insert): New function.
9437 (duplicate_node_data): Remove.
9438 (remove_node_data): Remove.
9439 (funct_state_summary_t::duplicate): New function.
9440 (register_hooks): Create new funct_state_summaries.
9441 (pure_const_generate_summary): Use it.
9442 (pure_const_write_summary): Likewise.
9443 (pure_const_read_summary): Likewise.
9444 (propagate_pure_const): Likewise.
9445 (propagate_nothrow): Likewise.
9446 (dump_malloc_lattice): Likewise.
9447 (propagate_malloc): Likewise.
9448 (execute): Do not register hooks, just remove summary
9450 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9453 2018-06-08 Martin Liska <mliska@suse.cz>
9455 * ipa-reference.c (remove_node_data): Remove.
9456 (duplicate_node_data): Likewise.
9457 (class ipa_ref_var_info_summary_t): New class.
9458 (class ipa_ref_opt_summary_t): Likewise.
9459 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9460 (get_reference_optimization_summary): Use
9461 ipa_ref_opt_sum_summaries.
9462 (set_reference_vars_info): Remove.
9463 (set_reference_optimization_summary): Likewise.
9464 (ipa_init): Create summaries.
9465 (init_function_info): Use function summary.
9466 (ipa_ref_opt_summary_t::duplicate): New function.
9467 (ipa_ref_opt_summary_t::remove): New function.
9468 (get_read_write_all_from_node): Fix GNU coding style.
9469 (propagate): Use function summary.
9470 (write_node_summary_p): Fix GNU coding style.
9471 (stream_out_bitmap): Likewise.
9472 (ipa_reference_read_optimization_summary): Use function summary.
9473 (ipa_reference_c_finalize): Do not release hooks.
9475 2018-06-08 Martin Liska <mliska@suse.cz>
9477 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9478 (analyze_function_body): Extract multiple calls of get_create.
9479 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9480 * ipa-inline.c (recursive_inlining): Use ::get method.
9481 * ipa-inline.h (estimate_edge_growth): Likewise.
9483 2018-06-08 Martin Liska <mliska@suse.cz>
9485 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9487 (hsa_function_summary::hsa_function_summary): Use the new enum
9489 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9490 * hsa-gen.c (hsa_get_host_function): Likewise.
9491 (get_brig_function_name): Likewise.
9492 * ipa-hsa.c (process_hsa_functions): Likewise.
9493 (ipa_hsa_write_summary): Likewise.
9494 * symbol-summary.h (symtab_duplication): Use ::get function/
9495 (get): New function.
9497 2018-06-08 Martin Liska <mliska@suse.cz>
9499 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9501 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9502 (hsa_register_kernel): Likewise.
9503 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9504 * hsa-gen.c (hsa_get_host_function): Likewise.
9505 (get_brig_function_name): Likewise.
9506 (generate_hsa): Likewise.
9507 (pass_gen_hsail::execute): Likewise.
9508 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9509 (devirtualization_time_bonus): Likewise.
9510 (ipcp_propagate_stage): Likewise.
9511 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9512 (edge_set_predicate): Likewise.
9513 (evaluate_conditions_for_known_args): Likewise.
9514 (evaluate_properties_for_edge): Likewise.
9515 (ipa_fn_summary::reset): Likewise.
9516 (ipa_fn_summary_t::duplicate): Likewise.
9517 (dump_ipa_call_summary): Likewise.
9518 (ipa_dump_fn_summary): Likewise.
9519 (analyze_function_body): Likewise.
9520 (compute_fn_summary): Likewise.
9521 (estimate_edge_devirt_benefit): Likewise.
9522 (estimate_edge_size_and_time): Likewise.
9523 (estimate_calls_size_and_time): Likewise.
9524 (estimate_node_size_and_time): Likewise.
9525 (inline_update_callee_summaries): Likewise.
9526 (remap_edge_change_prob): Likewise.
9527 (remap_edge_summaries): Likewise.
9528 (ipa_merge_fn_summary_after_inlining): Likewise.
9529 (ipa_update_overall_fn_summary): Likewise.
9530 (read_ipa_call_summary): Likewise.
9531 (inline_read_section): Likewise.
9532 (write_ipa_call_summary): Likewise.
9533 (ipa_fn_summary_write): Likewise.
9534 (ipa_free_fn_summary): Likewise.
9535 * ipa-hsa.c (process_hsa_functions): Likewise.
9536 (ipa_hsa_write_summary): Likewise.
9537 (ipa_hsa_read_section): Likewise.
9538 * ipa-icf.c (sem_function::merge): Likewise.
9539 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9540 (do_estimate_edge_time): Likewise.
9541 (estimate_size_after_inlining): Likewise.
9542 (estimate_growth): Likewise.
9543 (growth_likely_positive): Likewise.
9544 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9545 (inline_call): Likewise.
9546 * ipa-inline.c (caller_growth_limits): Likewise.
9547 (can_inline_edge_p): Likewise.
9548 (can_inline_edge_by_limits_p): Likewise.
9549 (compute_uninlined_call_time): Likewise.
9550 (compute_inlined_call_time): Likewise.
9551 (want_inline_small_function_p): Likewise.
9552 (edge_badness): Likewise.
9553 (update_caller_keys): Likewise.
9554 (update_callee_keys): Likewise.
9555 (recursive_inlining): Likewise.
9556 (inline_small_functions): Likewise.
9557 (inline_to_all_callers_1): Likewise.
9558 (dump_overall_stats): Likewise.
9559 (early_inline_small_functions): Likewise.
9560 (early_inliner): Likewise.
9561 * ipa-inline.h (estimate_edge_growth): Likewise.
9562 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9563 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9564 * ipa-prop.h (IPA_NODE_REF): Likewise.
9565 (IPA_EDGE_REF): Likewise.
9566 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9567 (propagate_malloc): Likewise.
9568 * ipa-split.c (execute_split_functions): Likewise.
9569 * symbol-summary.h: Rename get to get_create.
9571 (get_create): Likewise.
9572 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9574 2018-06-08 Martin Liska <mliska@suse.cz>
9576 * symbol-summary.h (release): Move definition out of class
9578 (symtab_removal): Likewise.
9579 (symtab_duplication): Likewise.
9581 2018-06-08 Martin Liska <mliska@suse.cz>
9583 * symbol-summary.h (function_summary): Move constructor
9584 implementation out of class declaration.
9585 (release): Likewise.
9586 (symtab_insertion): Likewise.
9587 (symtab_removal): Likewise.
9588 (symtab_duplication): Likewise.
9591 2018-06-08 Martin Liska <mliska@suse.cz>
9593 * Makefile.in: Remove support for MPX (macros, related functions,
9594 fields in cgraph_node, ...).
9595 * builtin-types.def (BT_BND): Likewise.
9596 (BT_FN_BND_CONST_PTR): Likewise.
9597 (BT_FN_CONST_PTR_BND): Likewise.
9598 (BT_FN_VOID_PTR_BND): Likewise.
9599 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9600 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9601 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9602 (expand_builtin_mempcpy_with_bounds): Likewise.
9603 (expand_builtin_memset_with_bounds): Likewise.
9604 (expand_builtin_memset_args): Likewise.
9605 (std_expand_builtin_va_start): Likewise.
9606 (expand_builtin): Likewise.
9607 (expand_builtin_with_bounds): Likewise.
9608 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9609 (DEF_LIB_BUILTIN_CHKP): Likewise.
9610 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9611 (DEF_CHKP_BUILTIN): Likewise.
9612 (BUILT_IN_MEMCPY): Likewise.
9613 (BUILT_IN_MEMMOVE): Likewise.
9614 (BUILT_IN_MEMPCPY): Likewise.
9615 (BUILT_IN_MEMSET): Likewise.
9616 (BUILT_IN_STPCPY): Likewise.
9617 (BUILT_IN_STRCAT): Likewise.
9618 (BUILT_IN_STRCHR): Likewise.
9619 (BUILT_IN_STRCPY): Likewise.
9620 (BUILT_IN_STRLEN): Likewise.
9621 (BUILT_IN_MEMCPY_CHK): Likewise.
9622 (BUILT_IN_MEMMOVE_CHK): Likewise.
9623 (BUILT_IN_MEMPCPY_CHK): Likewise.
9624 (BUILT_IN_MEMSET_CHK): Likewise.
9625 (BUILT_IN_STPCPY_CHK): Likewise.
9626 (BUILT_IN_STRCAT_CHK): Likewise.
9627 (BUILT_IN_STRCPY_CHK): Likewise.
9628 * calls.c (store_bounds): Likewise.
9629 (emit_call_1): Likewise.
9630 (special_function_p): Likewise.
9631 (maybe_warn_nonstring_arg): Likewise.
9632 (initialize_argument_information): Likewise.
9633 (finalize_must_preallocate): Likewise.
9634 (compute_argument_addresses): Likewise.
9635 (expand_call): Likewise.
9636 * cfgexpand.c (expand_call_stmt): Likewise.
9637 (expand_return): Likewise.
9638 (expand_gimple_stmt_1): Likewise.
9639 (pass_expand::execute): Likewise.
9640 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9641 (cgraph_node::remove): Likewise.
9642 (cgraph_node::dump): Likewise.
9643 (cgraph_node::verify_node): Likewise.
9644 * cgraph.h (chkp_function_instrumented_p): Likewise.
9645 (symtab_node::get_alias_target): Likewise.
9646 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9647 (cgraph_local_p): Likewise.
9648 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9649 (cgraph_edge::rebuild_references): Likewise.
9650 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9651 (walk_polymorphic_call_targets): Likewise.
9652 (cgraph_node::expand_thunk): Likewise.
9653 (symbol_table::output_weakrefs): Likewise.
9654 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9655 (ix86_handle_option): Likewise.
9656 * config/i386/constraints.md: Likewise.
9657 * config/i386/i386-builtin-types.def (BND): Likewise.
9661 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9662 (BDESC_FIRST): Likewise.
9664 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9665 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9666 * config/i386/i386.c (enum reg_class): Likewise.
9667 (ix86_target_string): Likewise.
9668 (ix86_option_override_internal): Likewise.
9669 (ix86_conditional_register_usage): Likewise.
9670 (ix86_valid_target_attribute_inner_p): Likewise.
9671 (ix86_set_indirect_branch_type): Likewise.
9672 (ix86_set_current_function): Likewise.
9673 (ix86_function_arg_regno_p): Likewise.
9674 (init_cumulative_args): Likewise.
9675 (ix86_function_arg_advance): Likewise.
9676 (ix86_function_arg): Likewise.
9677 (ix86_pass_by_reference): Likewise.
9678 (ix86_function_value_regno_p): Likewise.
9679 (ix86_function_value_1): Likewise.
9680 (ix86_function_value_bounds): Likewise.
9681 (ix86_return_in_memory): Likewise.
9682 (ix86_setup_incoming_vararg_bounds): Likewise.
9683 (ix86_va_start): Likewise.
9684 (indirect_thunk_need_prefix): Likewise.
9685 (print_reg): Likewise.
9686 (ix86_print_operand): Likewise.
9687 (ix86_expand_call): Likewise.
9688 (ix86_output_function_return): Likewise.
9689 (reg_encoded_number): Likewise.
9690 (BDESC_VERIFYS): Likewise.
9691 (ix86_init_mpx_builtins): Likewise.
9692 (ix86_init_builtins): Likewise.
9693 (ix86_emit_cmove): Likewise.
9694 (ix86_emit_move_max): Likewise.
9695 (ix86_expand_builtin): Likewise.
9696 (ix86_builtin_mpx_function): Likewise.
9697 (ix86_get_arg_address_for_bt): Likewise.
9698 (ix86_load_bounds): Likewise.
9699 (ix86_store_bounds): Likewise.
9700 (ix86_load_returned_bounds): Likewise.
9701 (ix86_store_returned_bounds): Likewise.
9702 (ix86_class_likely_spilled_p): Likewise.
9703 (ix86_hard_regno_mode_ok): Likewise.
9704 (x86_order_regs_for_local_alloc): Likewise.
9705 (ix86_mitigate_rop): Likewise.
9706 (ix86_bnd_prefixed_insn_p): Likewise.
9707 (ix86_mpx_bound_mode): Likewise.
9708 (ix86_make_bounds_constant): Likewise.
9709 (ix86_initialize_bounds): Likewise.
9710 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9711 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9712 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9713 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9714 (TARGET_CHKP_BOUND_MODE): Likewise.
9715 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9716 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9717 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9718 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9719 * config/i386/i386.h (TARGET_MPX): Likewise.
9720 (TARGET_MPX_P): Likewise.
9721 (VALID_BND_REG_MODE): Likewise.
9722 (FIRST_BND_REG): Likewise.
9723 (LAST_BND_REG): Likewise.
9724 (enum reg_class): Likewise.
9725 (BND_REG_P): Likewise.
9726 (BND_REGNO_P): Likewise.
9727 (BNDmode): Likewise.
9728 (ADJUST_INSN_LENGTH): Likewise.
9729 * config/i386/i386.md: Likewise.
9730 * config/i386/i386.opt: Likewise.
9731 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9732 (defined): Likewise.
9733 (LINK_MPX): Likewise.
9734 (MPX_SPEC): Likewise.
9735 (LIBMPX_SPEC): Likewise.
9736 (LIBMPXWRAPPERS_SPEC): Likewise.
9737 (CHKP_SPEC): Likewise.
9738 * config/i386/predicates.md: Likewise.
9739 * dbxout.c (dbxout_type): Likewise.
9740 * doc/extend.texi: Likewise.
9741 * doc/invoke.texi: Likewise.
9742 * doc/md.texi: Likewise.
9743 * doc/tm.texi: Likewise.
9744 * doc/tm.texi.in: Likewise.
9745 * dwarf2out.c (is_base_type): Likewise.
9746 (gen_formal_types_die): Likewise.
9747 (gen_subprogram_die): Likewise.
9748 (gen_type_die_with_usage): Likewise.
9749 (gen_decl_die): Likewise.
9750 (dwarf2out_late_global_decl): Likewise.
9751 * expr.c (expand_assignment): Likewise.
9752 (emit_storent_insn): Likewise.
9753 (store_expr_with_bounds): Likewise.
9754 (store_expr): Likewise.
9755 (expand_expr_real_1): Likewise.
9756 * expr.h (store_expr_with_bounds): Likewise.
9757 * function.c (use_register_for_decl): Likewise.
9758 (struct bounds_parm_data): Likewise.
9759 (assign_parms_augmented_arg_list): Likewise.
9760 (assign_parm_find_entry_rtl): Likewise.
9761 (assign_parm_is_stack_parm): Likewise.
9762 (assign_parm_load_bounds): Likewise.
9763 (assign_bounds): Likewise.
9764 (assign_parms): Likewise.
9765 (expand_function_start): Likewise.
9766 * gcc.c (CHKP_SPEC): Likewise.
9767 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9768 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9769 (wrestrict_dom_walker::check_call): Likewise.
9770 * gimple.c (gimple_build_call_from_tree): Likewise.
9771 * gimple.h (enum gf_mask): Likewise.
9772 (gimple_call_with_bounds_p): Likewise.
9773 (gimple_call_set_with_bounds): Likewise.
9774 * gimplify.c (gimplify_init_constructor): Likewise.
9775 * ipa-cp.c (initialize_node_lattices): Likewise.
9776 (propagate_constants_across_call): Likewise.
9777 (find_more_scalar_values_for_callers_subset): Likewise.
9778 * ipa-hsa.c (process_hsa_functions): Likewise.
9779 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9780 * ipa-icf.c (sem_function::merge): Likewise.
9781 * ipa-inline.c (early_inliner): Likewise.
9782 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9783 (warn_function_cold): Likewise.
9784 (propagate_pure_const): Likewise.
9785 * ipa-ref.h (enum GTY): Likewise.
9786 * ipa-split.c (find_retbnd): Likewise.
9787 (consider_split): Likewise.
9788 (split_function): Likewise.
9789 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9790 * ipa.c (walk_polymorphic_call_targets): Likewise.
9791 (symbol_table::remove_unreachable_nodes): Likewise.
9792 (process_references): Likewise.
9793 (cgraph_build_static_cdtor_1): Likewise.
9794 * lto-cgraph.c (lto_output_node): Likewise.
9795 (output_refs): Likewise.
9796 (compute_ltrans_boundary): Likewise.
9797 (input_overwrite_node): Likewise.
9798 (input_node): Likewise.
9799 (input_cgraph_1): Likewise.
9800 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9801 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9802 (class pass_chkp_instrumentation_passes): Likewise.
9803 (make_pass_chkp_instrumentation_passes): Likewise.
9804 * passes.def: Likewise.
9805 * rtl.h (struct GTY): Likewise.
9806 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9807 * stor-layout.c (layout_type): Likewise.
9808 * symtab.c: Likewise.
9809 * target.def: Likewise.
9810 * targhooks.c (default_chkp_bound_type): Likewise.
9811 (default_chkp_bound_mode): Likewise.
9812 (default_builtin_chkp_function): Likewise.
9813 (default_chkp_function_value_bounds): Likewise.
9814 (default_chkp_make_bounds_constant): Likewise.
9815 (default_chkp_initialize_bounds): Likewise.
9816 * targhooks.h (default_chkp_bound_type): Likewise.
9817 (default_chkp_bound_mode): Likewise.
9818 (default_builtin_chkp_function): Likewise.
9819 (default_chkp_function_value_bounds): Likewise.
9820 (default_chkp_make_bounds_constant): Likewise.
9821 (default_chkp_initialize_bounds): Likewise.
9822 * toplev.c (compile_file): Likewise.
9823 (process_options): Likewise.
9824 * tree-core.h (DEF_BUILTIN): Likewise.
9825 (DEF_BUILTIN_CHKP): Likewise.
9826 * tree-inline.c (declare_return_variable): Likewise.
9827 (remap_gimple_stmt): Likewise.
9828 (copy_bb): Likewise.
9829 (initialize_inlined_parameters): Likewise.
9830 (expand_call_inline): Likewise.
9831 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9832 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9833 (make_pass_ipa_chkp_produce_thunks): Likewise.
9834 (make_pass_chkp): Likewise.
9835 (make_pass_chkp_opt): Likewise.
9836 (make_pass_chkp_instrumentation_passes): Likewise.
9837 * tree-pretty-print.c (dump_generic_node): Likewise.
9838 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9839 * tree-ssa-dce.c (propagate_necessity): Likewise.
9840 (eliminate_unnecessary_stmts): Likewise.
9841 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9842 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9843 * tree-ssa-sccvn.h: Likewise.
9844 * tree-ssa-strlen.c (get_string_length): Likewise.
9845 (valid_builtin_call): Likewise.
9846 (adjust_last_stmt): Likewise.
9847 (handle_builtin_strchr): Likewise.
9848 (handle_builtin_strcpy): Likewise.
9849 (handle_builtin_stxncpy): Likewise.
9850 (handle_builtin_memcpy): Likewise.
9851 (handle_builtin_strcat): Likewise.
9852 (strlen_check_and_optimize_stmt): Likewise.
9853 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9854 * tree-streamer-in.c: Likewise.
9855 * tree-streamer.c (record_common_node): Likewise.
9856 * tree.c (tree_code_size): Likewise.
9857 (wide_int_to_tree_1): Likewise.
9858 (type_contains_placeholder_1): Likewise.
9859 (build_common_tree_nodes): Likewise.
9860 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9861 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9862 (POINTER_BOUNDS_P): Likewise.
9863 (BOUNDED_TYPE_P): Likewise.
9864 (BOUNDED_P): Likewise.
9865 (CALL_WITH_BOUNDS_P): Likewise.
9866 (pointer_bounds_type_node): Likewise.
9867 * value-prof.c (gimple_ic): Likewise.
9868 * var-tracking.c (vt_add_function_parameters): Likewise.
9869 * varasm.c (make_decl_rtl): Likewise.
9870 (assemble_start_function): Likewise.
9871 (output_constant): Likewise.
9872 (maybe_assemble_visibility): Likewise.
9873 * varpool.c (ctor_for_folding): Likewise.
9874 * chkp-builtins.def: Remove.
9875 * ipa-chkp.c: Remove.
9876 * ipa-chkp.h: Remove.
9877 * rtl-chkp.c: Remove.
9878 * rtl-chkp.h: Remove.
9879 * tree-chkp-opt.c: Remove.
9880 * tree-chkp.c: Remove.
9881 * tree-chkp.h: Remove.
9883 2018-06-07 Carl Love <cel@us.ibm.com>
9885 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9886 vextract_fp_from_shortl): Add BE support.
9888 2018-06-07 Paul Koning <ni1d@arrl.net>
9890 * compare-elim.c (try_merge_compare): Don't merge compare if
9891 address contains a side effect.
9892 (try_eliminate_compare): Likewise.
9894 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9896 * config.gcc: Support "tremont".
9897 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9898 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9900 * config/i386/i386.c (m_TREMONT): Define.
9901 (processor_target_table): Add "tremont".
9902 (PTA_TREMONT): Define.
9903 (ix86_lea_outperforms): Add TARGET_TREMONT.
9904 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9905 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9906 and M_INTEL_GOLDMONT_PLUS.
9907 (fold_builtin_cpu): Add "tremont".
9908 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9909 (ix86_option_override_internal): Add "tremont".
9910 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9911 (processor_type): Add PROCESSOR_TREMONT.
9912 * config/i386/x86-tune.def: Add m_TREMONT.
9913 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9915 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9917 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9918 symbol defined for msp430i* devices to be lower case.
9920 2018-06-07 Richard Biener <rguenther@suse.de>
9922 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9923 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9924 Properly wrap signed arithmetic if overflow wraps.
9926 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9928 PR tree-optimization/69615
9929 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9930 of a cast from a same precision integral SSA_NAME in a bb dominated
9931 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9932 cast to utype if rhs2 has already a compatible type.
9934 2018-06-07 Richard Biener <rguenther@suse.de>
9936 PR tree-optimization/85935
9937 * graphite-scop-detection.c (find_params_in_bb): Analyze
9938 condition operands with respect to the correct loop. Assert
9939 the analysis doesn't fail.
9941 2018-06-04 Carl Love <cel@us.ibm.com>
9943 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9944 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9945 as it is slightly cheaper.
9946 (first_match_or_eos_index_<mode>):
9947 Calculate index using natural element order.
9948 (first_match_index_<mode>):
9949 Calculate index using natural element order.
9950 (first_match_or_eos_index_<mode>):
9951 Calculate index using natural order.
9952 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9953 for BE and LE modes.
9954 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9955 P9V_BUILTIN_VCLZLSBB_V16QI.
9956 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9959 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9961 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9962 indentation and line wrap for many prototypes. Add missing
9963 @smallexample directives around block of prototypes for vec_xl and
9966 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9968 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9969 track if we pass or return IEEE 128-bit floating point.
9970 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9971 C++ mangling that is compatible with GCC 8.1.
9972 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9973 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9974 floating point types.
9975 (rs6000_function_arg_advance_1): Likewise.
9976 (rs6000_mangle_type): Optionally generate mangled names that match
9977 what GCC 8.1 generated for IEEE 128-bit floating point types.
9978 (rs6000_globalize_decl_name): If we have an external function that
9979 passes or returns IEEE 128-bit types, generate a weak reference
9980 from the mangled name used in GCC 8.1 to the current mangled
9982 (rs6000_init_builtins): Make __ibm128 use the long double type if
9983 long double is IBM extended double. Make __float128 use the long
9984 double type if long double is IEEE 128-bit.
9987 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9988 macro for __ibm128 built-in functions.
9989 (PACK_IF): Add __ibm128 pack/unpack functions.
9990 (UNPACK_IF): Likewise.
9991 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9992 enable long double built-in functions if long double is IEEE
9993 128-bit floating point.
9994 (rs6000_invalid_builtin): Update long double built-in function
9996 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9997 functions, adjust the built-in function to use the long double
9998 built-in function if __ibm128 and long double are the same type.
9999 * doc/extend.texi (PowerPC builtins): Update documention for
10000 __builtin_{,un}pack_longdouble. Add documentation for
10001 __builtin_{,un}pack_ibm128.
10003 2018-06-06 Jim Wilson <jimw@sifive.com>
10005 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10006 (struct machine_function): New field interrupt_mode.
10007 (riscv_handle_type_attribute): New function. Add forward declaration.
10008 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10009 (riscv_expand_epilogue): Check interrupt_mode field.
10010 (riscv_set_current_function): Check interrupt attribute args and
10011 set interrupt_mode field.
10012 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10013 (riscv_sret, riscv_uret): New.
10014 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10015 new arguments to interrupt attribute.
10017 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10020 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10021 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10023 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10025 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10026 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10027 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10028 several redundant entries.
10030 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10032 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10033 type from "rtx" to "rtx_insn *".
10034 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10035 for local "call_insn", removing cast.
10036 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10038 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10040 PR tree-optimization/86066
10041 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10042 for BIT_INSERT_EXPR stores.
10044 2018-06-06 Richard Biener <rguenther@suse.de>
10046 PR tree-optimization/86062
10047 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10048 component refs ontop
10049 of to be offsetted base.
10051 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10053 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10054 to be static and remove check on interrupt attribute name.
10056 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10058 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10059 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10061 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10064 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10066 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10067 Remove second argument, change how error is called.
10068 (aarch64_layout_arg): Remove second argument from
10069 aarch64_err_no_fpadvsimd call.
10070 (aarch64_init_cumulative_args): Ditto.
10071 (aarch64_gimplify_va_arg_expr): Ditto.
10072 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10074 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10076 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10077 (*simple_return_indirect_internal<mode>): Rename from
10078 simple_return_indirect_internal. Use W mode iterator.
10079 (rstorssp): New expander.
10080 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10081 (clrssbsy): New expander.
10082 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10084 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10086 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10088 (cmse_check_pointed_object): Likewise.
10090 2018-06-05 Martin Liska <mliska@suse.cz>
10092 PR gcov-profile/47618
10093 * doc/invoke.texi: Document how -fprofile-dir format
10096 2018-06-05 Richard Biener <rguenther@suse.de>
10098 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10099 removal pretend DOM info isn't available so we do not update
10100 it and only remove edges, not dominated blocks. Actually free
10101 DOM info in case we removed something. Remove unreachable blocks.
10102 (mfb_keep_latches): Work with either DOM info or marked backedges.
10103 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10104 first. Mark backedges if DOM info isn't available.
10105 (Re-)compute DOM info after cleanup_control_flow_pre.
10107 2018-06-05 Richard Biener <rguenther@suse.de>
10109 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10110 (locus_discrim_hasher::hash): Adjust.
10111 (locus_discrim_hasher::equal): Likewise.
10112 (next_discriminator_for_locus): Work on line directly.
10113 (same_line_p): Pass in expanded locus1 as well.
10114 (assign_discriminators): Avoid redundant location expansions.
10116 2018-06-05 Richard Biener <rguenther@suse.de>
10118 PR tree-optimization/86046
10119 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10120 if required after clearing TREE_ADDRESSABLE.
10122 2018-06-05 Richard Biener <rguenther@suse.de>
10124 PR tree-optimization/86047
10125 * tree-ssa-loop.c (for_each_index): Glob handling of all
10126 decls and constants and really handle all of them.
10128 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10131 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10132 qualifier_void_pointer and qualifier_const_void_pointer.
10133 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10134 (arm_init_builtins): Handle the above.
10135 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10136 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10137 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10140 2018-06-05 Martin Liska <mliska@suse.cz>
10142 * auto-profile.c (read_autofdo_file): Do not use
10143 gcov_ctr_summary struct.
10144 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10145 * coverage.c (struct counts_entry): Likewise.
10146 (read_counts_file): Read just single summary entry.
10147 (get_coverage_counts): Use gcov_summary struct.
10148 * coverage.h (get_coverage_counts): Likewise.
10149 * gcov-dump.c (dump_working_sets): Likewise.
10150 (tag_summary): Dump just single summary.
10151 * gcov-io.c (gcov_write_summary): Write just histogram
10153 (gcov_read_summary): Read just single summary.
10154 (compute_working_sets): Use gcov_summary struct.
10155 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10156 of GCOV_COUNTERS_SUMMABLE.
10157 (GCOV_COUNTERS_SUMMABLE): Remove.
10158 (GCOV_FIRST_VALUE_COUNTER): Replace with
10159 GCOV_COUNTER_V_INTERVAL.
10160 (struct gcov_ctr_summary): Remove.
10161 (struct gcov_summary): Directly use fields of former
10163 (compute_working_sets): Use gcov_summary struct.
10164 * gcov.c (read_count_file): Do not use ctrs fields.
10165 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10167 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10169 * profile.c: Likewise.
10170 * profile.h: Likewise.
10172 2018-06-05 Martin Liska <mliska@suse.cz>
10174 PR gcov-profile/84846
10175 * gcov.c (output_lines): Print working directory only
10176 in intermediate format.
10178 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10180 * config/s390/s390-builtin-types.def: Add void function type.
10181 * config/s390/s390-builtins.def: Use the function type for the
10184 2018-06-04 Jim Wilson <jimw@sifive.com>
10186 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10188 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10189 and maybe_eh_return. Change regno to unsigned int. Use new args to
10190 handle EH_RETURN_DATA_REGNO registers properly.
10191 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10192 (riscv_expand_epilogue): Update comment. Change argument name and
10193 type. Update code to use new name and type. Pass new args to
10194 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10196 * config/riscv/riscv.md (NORMAL_RETURN): New.
10197 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10198 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10199 (eh_return): Call gen_eh_return_internal and emit barrier.
10200 (eh_return_internal): Call riscv_expand_epilogue.
10202 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10204 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10205 bit_insertion field and declare can_be_merged_into method.
10206 (merged_store_group::can_be_merged_into): New method.
10207 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10208 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10209 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10211 2018-06-04 Richard Biener <rguenther@suse.de>
10213 PR tree-optimization/85955
10214 * builtins.c (fold_builtin_sincos): Convert pointers to
10215 destination to appropriate type before dereferencing.
10217 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10219 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10221 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10223 * expr.c (expand_expr_real_1): Force the operand into memory if
10224 its TYPE_MODE is BLKmode and if there is no integer mode for
10225 the number of bits being extracted.
10227 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10231 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10232 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10234 2018-06-04 Richard Biener <rguenther@suse.de>
10236 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10237 (cleanup_tree_cfg_noloop): ... single caller. Do
10238 start_recording_case_labels later.
10240 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10242 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10243 to _IMMINTRIN_H_INCLUDED.
10244 * config/i386/pconfigintrin.h: Ditto.
10245 * config/i386/waitpkgintrin.h: Ditto.
10246 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10247 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10248 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10249 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10250 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10251 waitpkgintrin.h and cldemoteintrin.h.
10253 2018-06-04 Richard Biener <rguenther@suse.de>
10255 PR tree-optimization/86038
10256 * tracer.c (find_best_successor): Check probability for
10257 being initialized, bail out if not.
10259 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10262 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10263 of bits to ignore when comparing architectures.
10265 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10267 PR tree-optimization/69615
10268 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10269 maximum or minimum of the type, try to merge it also as if
10270 range1 is + [-, x - 1] or + [x + 1, -].
10273 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10275 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10277 PR tree-optimization/86034
10278 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10279 the unsigned bitfield type in a bit insertion sequence if it does not
10280 have a larger precision than the bitfield size.
10281 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10283 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10285 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10287 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10289 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10290 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10291 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10292 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10294 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10296 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10297 Disable -fdelete-null-pointer-checks for ELF toolchain.
10299 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10300 Kito Cheng <kito.cheng@gmail.com>
10302 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10303 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10304 (nds32*-*-*): Add glibc and uclibc conditions.
10305 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10306 (TARGET_EXCEPT_UNWIND_INFO): Define.
10307 * config/nds32/elf.h: New file.
10308 * config/nds32/linux.h: New file.
10309 * config/nds32/nds32-elf.opt: New file.
10310 * config/nds32/nds32-linux.opt: New file.
10311 * config/nds32/nds32-fp-as-gp.c
10312 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10313 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10315 (nds32_asm_file_end): Ditto.
10316 (nds32_print_operand): Ditto.
10317 (nds32_insert_attributes): Ditto.
10318 (nds32_init_libfuncs): New function.
10319 (TARGET_HAVE_TLS): Define.
10320 (TARGET_INIT_LIBFUNCS): Define.
10321 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10323 (TARGET_ELF): Apply different mcmodel setting.
10324 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10325 been migrated into elf.h and linux.h files.
10326 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10327 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10328 (mcmodel): The content has been migrated into nds32-elf.opt and
10329 nds32-linux.opt files.
10330 * config/nds32/t-elf: New file.
10331 * config/nds32/t-linux: New file.
10333 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10334 Shiva Chen <shiva0217@gmail.com>
10336 * config/nds32/constants.md (unspec_volatile_element): Add
10337 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10338 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10340 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10341 (make_pass_nds32_fp_as_gp): Declare.
10342 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10344 (nds32_asm_function_end_prologue): Remove unused asm output.
10345 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10346 (nds32_asm_file_start): Output necessary fp_as_gp information.
10347 (nds32_option_override): Adjust register usage.
10348 (nds32_expand_prologue): Consider fp_as_gp situation.
10349 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10350 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10353 (simple_return): Ditto.
10354 (omit_fp_begin): Output special directive for fp_as_gp.
10355 (omit_fp_end): Output special directive for fp_as_gp.
10356 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10357 mforbid-fp-as-gp): New options.
10359 2018-06-01 Mark Wielaard <mark@klomp.org>
10361 * dwarf2out.c (dwarf2out_finish): Remove generation of
10362 DW_AT_loclists_base.
10364 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10366 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10367 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10368 (struct merged_store_group): Add bit_insertion field.
10369 (dump_char_array): Use standard hexadecimal format.
10370 (merged_store_group::merged_store_group): Set bit_insertion to false.
10371 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10372 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10373 also print the mask in the dump file.
10374 (pass_store_merging::gate): Minor tweak.
10375 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10376 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10377 stores with INTEGER_CST stores.
10378 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10379 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10380 and use it throughout. Generate bit insertion sequences if need be.
10381 (pass_store_merging::process_store): Remove redundant condition.
10382 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10384 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10386 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10387 the 128-bit floating point types. Fix function comment.
10389 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10391 * config/aarch64/aarch64-simd.md
10392 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10394 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10397 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10399 PR tree-optimization/85989
10400 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10402 (backprop::intersect_uses): Check it when deciding whether this
10403 is a backedge reference.
10404 (backprop::process_block): Add each phi to m_visited_phis
10405 after visiting it, then clear it at the end.
10407 2018-06-01 Richard Biener <rguenther@suse.de>
10409 * tree-vectorizer.h (vect_dr_stmt): New function.
10410 (vect_get_load_cost): Adjust.
10411 (vect_get_store_cost): Likewise.
10412 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10413 Use vect_dr_stmt instead of DR_SMTT.
10414 (vect_record_base_alignments): Likewise.
10415 (vect_calculate_target_alignment): Likewise.
10416 (vect_compute_data_ref_alignment): Likewise and make static.
10417 (vect_update_misalignment_for_peel): Likewise.
10418 (vect_verify_datarefs_alignment): Likewise.
10419 (vector_alignment_reachable_p): Likewise.
10420 (vect_get_data_access_cost): Likewise. Pass down
10421 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10422 (vect_get_peeling_costs_all_drs): Likewise.
10423 (vect_peeling_hash_get_lowest_cost): Likewise.
10424 (vect_enhance_data_refs_alignment): Likewise.
10425 (vect_find_same_alignment_drs): Likewise.
10426 (vect_analyze_data_refs_alignment): Likewise.
10427 (vect_analyze_group_access_1): Likewise.
10428 (vect_analyze_group_access): Likewise.
10429 (vect_analyze_data_ref_access): Likewise.
10430 (vect_analyze_data_ref_accesses): Likewise.
10431 (vect_vfa_segment_size): Likewise.
10432 (vect_small_gap_p): Likewise.
10433 (vectorizable_with_step_bound_p): Likewise.
10434 (vect_prune_runtime_alias_test_list): Likewise.
10435 (vect_analyze_data_refs): Likewise.
10436 (vect_supportable_dr_alignment): Likewise.
10437 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10438 (vect_gen_prolog_loop_niters): Likewise.
10439 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10440 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10442 (vect_recog_mask_conversion_pattern): Likewise.
10443 (vect_try_gather_scatter_pattern): Likewise.
10444 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10445 to vect_get_store_cost.
10446 (vect_get_store_cost): Get stmt_info instead of DR.
10447 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10448 (vect_get_load_cost): Get stmt_info instead of DR.
10450 2018-06-01 Richard Biener <rguenther@suse.de>
10452 PR middle-end/86017
10453 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10454 vars wrapped in MEM_REFs.
10456 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10458 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10459 Fix subreg tests so that we only return a choice between
10460 GENERAL_REGS and FP_REGS if the original classes included both.
10462 2018-06-01 Richard Biener <rguenther@suse.de>
10465 * tree-ssa-structalias.c (get_function_part_constraint):
10466 Handle NULL fi->decl.
10467 (find_func_aliases_for_call): Properly handle indirect
10468 fi from direct call.
10469 (find_func_clobbers): Likewise.
10470 (ipa_pta_execute): Likewise.
10471 (create_variable_info_for): For functions that are ifunc_resolver
10472 resolve to a varinfo that contains the result of the resolver call.
10473 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10476 2018-05-31 Michael Collison <michael.collison@arm.com>
10478 * config/aarch64/aarch64.md:
10479 (*fix_to_zero_extenddfdi2): New pattern.
10480 * gcc.target/aarch64/fix_extend1.c: New testcase.
10482 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10484 PR middle-end/78809
10485 PR middle-end/83026
10486 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10487 and BUILT_IN_STRNCMP_EQ.
10488 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10489 BUILT_IN_STRNCMP_EQ.
10490 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10491 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10492 (gimple_fold_builtin): Likewise.
10493 * tree-ssa-strlen.c (compute_string_length): New function.
10494 (determine_min_obsize): New function.
10495 (handle_builtin_string_cmp): New function to handle calls to
10496 string compare functions.
10497 (strlen_optimize_stmt): Add handling to builtin string compare
10499 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10500 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10501 * tree.c (build_common_builtin_nodes): Add new defines of
10502 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10504 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10507 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10508 functions with naked attribute.
10510 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10512 * config/i386/sse.md (avx_vec_concat<mode>):
10513 Substitute concat_tg_mode mode attribute with xtg_mode.
10514 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10515 (concat_tg_mode): Remove mode attribute.
10517 2018-05-31 Martin Sebor <msebor@redhat.com>
10520 * calls.c (alloc_max_size): Correct a logic error/typo.
10521 Treat excessive arguments as infinite. Warn for invalid arguments.
10522 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10524 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10527 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10528 and movx for Haswell.
10530 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10531 Cesar Philippidis <cesar@codesourcery.com>
10533 PR middle-end/85879
10534 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10535 when emitting error on private/firstprivate reductions.
10536 * omp-low.c (lower_omp_target): Avoid reference-type processing
10537 on pointers for firstprivate clause.
10539 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10541 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10544 * config/aarch64/aarch64-simd.md
10545 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10546 (aarch64_ld1_x3_<mode>): Likewise
10547 (aarch64_st1x2<VALLDIF:mode>): Likewise
10548 (aarch64_st1_x2_<mode>): Likewise
10549 (aarch64_st1x3<VALLDIF:mode>): Likewise
10550 (aarch64_st1_x3_<mode>): Likewise
10551 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10552 (vld1_s8_x3): Likewise.
10553 (vld1_u16_x3): Likewise.
10554 (vld1_s16_x3): Likewise.
10555 (vld1_u32_x3): Likewise.
10556 (vld1_s32_x3): Likewise.
10557 (vld1_u64_x3): Likewise.
10558 (vld1_s64_x3): Likewise.
10559 (vld1_f16_x3): Likewise.
10560 (vld1_f32_x3): Likewise.
10561 (vld1_f64_x3): Likewise.
10562 (vld1_p8_x3): Likewise.
10563 (vld1_p16_x3): Likewise.
10564 (vld1_p64_x3): Likewise.
10565 (vld1q_u8_x3): Likewise.
10566 (vld1q_s8_x3): Likewise.
10567 (vld1q_u16_x3): Likewise.
10568 (vld1q_s16_x3): Likewise.
10569 (vld1q_u32_x3): Likewise.
10570 (vld1q_s32_x3): Likewise.
10571 (vld1q_u64_x3): Likewise.
10572 (vld1q_s64_x3): Likewise.
10573 (vld1q_f16_x3): Likewise.
10574 (vld1q_f32_x3): Likewise.
10575 (vld1q_f64_x3): Likewise.
10576 (vld1q_p8_x3): Likewise.
10577 (vld1q_p16_x3): Likewise.
10578 (vld1q_p64_x3): Likewise.
10579 (vst1_s64_x2): Likewise.
10580 (vst1_u64_x2): Likewise.
10581 (vst1_f64_x2): Likewise.
10582 (vst1_s8_x2): Likewise.
10583 (vst1_p8_x2): Likewise.
10584 (vst1_s16_x2): Likewise.
10585 (vst1_p16_x2): Likewise.
10586 (vst1_s32_x2): Likewise.
10587 (vst1_u8_x2): Likewise.
10588 (vst1_u16_x2): Likewise.
10589 (vst1_u32_x2): Likewise.
10590 (vst1_f16_x2): Likewise.
10591 (vst1_f32_x2): Likewise.
10592 (vst1_p64_x2): Likewise.
10593 (vst1q_s8_x2): Likewise.
10594 (vst1q_p8_x2): Likewise.
10595 (vst1q_s16_x2): Likewise.
10596 (vst1q_p16_x2): Likewise.
10597 (vst1q_s32_x2): Likewise.
10598 (vst1q_s64_x2): Likewise.
10599 (vst1q_u8_x2): Likewise.
10600 (vst1q_u16_x2): Likewise.
10601 (vst1q_u32_x2): Likewise.
10602 (vst1q_u64_x2): Likewise.
10603 (vst1q_f16_x2): Likewise.
10604 (vst1q_f32_x2): Likewise.
10605 (vst1q_f64_x2): Likewise.
10606 (vst1q_p64_x2): Likewise.
10607 (vst1_s64_x3): Likewise.
10608 (vst1_u64_x3): Likewise.
10609 (vst1_f64_x3): Likewise.
10610 (vst1_s8_x3): Likewise.
10611 (vst1_p8_x3): Likewise.
10612 (vst1_s16_x3): Likewise.
10613 (vst1_p16_x3): Likewise.
10614 (vst1_s32_x3): Likewise.
10615 (vst1_u8_x3): Likewise.
10616 (vst1_u16_x3): Likewise.
10617 (vst1_u32_x3): Likewise.
10618 (vst1_f16_x3): Likewise.
10619 (vst1_f32_x3): Likewise.
10620 (vst1_p64_x3): Likewise.
10621 (vst1q_s8_x3): Likewise.
10622 (vst1q_p8_x3): Likewise.
10623 (vst1q_s16_x3): Likewise.
10624 (vst1q_p16_x3): Likewise.
10625 (vst1q_s32_x3): Likewise.
10626 (vst1q_s64_x3): Likewise.
10627 (vst1q_u8_x3): Likewise.
10628 (vst1q_u16_x3): Likewise.
10629 (vst1q_u32_x3): Likewise.
10630 (vst1q_u64_x3): Likewise.
10631 (vst1q_f16_x3): Likewise.
10632 (vst1q_f32_x3): Likewise.
10633 (vst1q_f64_x3): Likewise.
10634 (vst1q_p64_x3): Likewise.
10636 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10638 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10639 user_label_prefix to name.
10641 * tree-core.h: Update comment about the format of NAME string
10642 passed to handler in attribute_spec.
10644 * config/msp430/msp430.md: Remove erroneous subreg expression from
10645 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10646 zero_extend{q,h}isi2.
10648 2018-05-30 Borislav Petkov <bp@suse.de>
10650 * doc/extend.texi: Document some architecture specific
10651 constraints and sort entries.
10653 2018-05-30 Martin Sebor <msebor@redhat.com>
10655 PR middle-end/85369
10656 * builtins.c (expand_builtin_stpcpy_1): New function.
10657 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10658 only if the former succeeds.
10660 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10662 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10665 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10667 * doc/invoke.texi (-flinker-output): Document
10669 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10671 * passes.c (ipa_write_summaries): Only modify statements if body
10673 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10674 incrementally linking.
10675 (ipa_passes): Likewise.
10676 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10677 pass down resolution info.
10678 * common.opt (flag_incremental_link): Update info.
10679 * gcc.c (plugin specs): Turn flinker-output=* to
10680 -plugin-opt=-linker-output-known
10681 * toplev.c (compile_file): Also cut compilation when doing incremental
10683 * flag-types. (enum lto_partition_model): Add
10684 LTO_LINKER_OUTPUT_NOLTOREL.
10685 (invoke.texi): Add -flinker-output docs.
10686 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10687 link same way as WPA; do not stream in dead initializers.
10689 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10690 darf2out_register_external_decl): Support incremental link.
10692 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10694 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10696 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10698 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10699 it down to simple_object_copy_lto_debug_sections.
10700 (run_gcc): Determine incremental LTO link time and configure
10701 lto1 into non-wpa mode, disable renaming of debug sections.
10703 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10705 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10706 descriptions of various incorrectly documented functions.
10708 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10711 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10712 address check not strict.
10714 2018-05-30 Richard Biener <rguenther@suse.de>
10716 PR tree-optimization/85964
10717 * tracer.c (better_p): Drop initialized count check, we only
10718 call the function with initialized counts now.
10719 (find_best_successor): Do find a best edge if one
10720 has uninitialized count.
10721 (find_best_predecessor): Likewise. Do BB frequency check only
10722 if count is initialized.
10724 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10726 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10727 (aarch64_ldrstr_offset_compare): New.
10728 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10729 load/store orderings.
10730 (aarch64_gen_adjusted_ldpstp): Likewise.
10732 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10734 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10735 Check for subset of GENERAL_REGS and FP_REGS.
10736 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10739 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10741 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10742 and wi::to_poly_offset. Add the current offset and then check
10743 whether the sum fits, rather than using an unchecked addition of
10744 a checked term. Check for a shwi rather than a uhwi.
10745 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10746 (store_constructor): Use poly_int_tree_p.
10747 (expand_expr_real_1): Likewise.
10748 * function.c (assign_temp): Likewise.
10749 * fold-const.c (const_binop): Use poly_int_tree_p and
10750 wi::to_poly_offset.
10751 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10753 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10754 to_poly_offset for MEM offsets.
10755 * ipa-icf.c (sem_variable::equals): Likewise.
10756 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10757 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10758 wi::to_poly_offset for BIT_FIELD_REF offsets.
10759 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10760 wi::to_poly_offset.
10761 * var-tracking.c (emit_note_insn_var_location): Use
10762 tree_to_poly_uint64.
10764 2018-05-29 Jim Wilson <jimw@sifive.com>
10766 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10768 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10771 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10772 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10774 (sse4_1_round<mode>2): Use nonimmediate_operand
10775 for operand 1 predicate.
10777 2018-05-29 Martin Sebor <msebor@redhat.com>
10778 Richard Biener <rguenther@suse.de>
10781 * calls.c (get_size_range): Call determine_value_range instead
10782 of get_value_range..
10783 * tree-vrp.h (determine_value_range): Declared new function.
10784 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10786 2018-05-29 Richard Biener <rguenther@suse.de>
10788 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10789 sure to use non-pattern stmts for get_earlier_stmt arguments.
10790 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10791 called on pattern stmts.
10792 (get_later_stmt): Likewise.
10794 2018-05-29 Martin Liska <mliska@suse.cz>
10796 PR gcov-profile/85759
10797 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10800 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10802 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10804 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10808 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10809 VEC_PACK_FLOAT_EXPR): New tree codes.
10810 * tree-pretty-print.c (op_code_prio): Handle
10811 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10812 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10813 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10814 * tree-inline.c (estimate_operator_cost): Likewise.
10815 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10816 * fold-const.c (const_binop): Likewise.
10817 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10818 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10819 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10820 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10821 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10822 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10823 * expr.c (expand_expr_real_2): Likewise.
10824 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10825 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10826 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10828 * optabs.c (expand_widen_pattern_expr): For
10829 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10830 sign from result type rather than operand's type.
10831 (expand_binop_directly): For vec_packu_float_optab and
10832 vec_packs_float_optab allow result type to be different from operand's
10834 * optabs-tree.c (optab_for_tree_code): Handle
10835 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10836 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10837 * tree-vect-generic.c (expand_vector_operations_1): Handle
10838 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10839 VEC_PACK_FLOAT_EXPR.
10840 * tree-vect-stmts.c (supportable_widening_operation): Handle
10842 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10843 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10844 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10845 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10846 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10848 (vec_pack<floatprefix>_float_<mode>): New expander.
10849 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10851 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10852 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10853 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10854 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10855 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10857 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10858 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10859 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10860 VEC_PACK_FLOAT_EXPR): Document.
10862 2018-05-29 Richard Biener <rguenther@suse.de>
10864 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10866 (stmt_vec_info_vec): Make pointer.
10867 (init_stmt_vec_info_vec): Remove.
10868 (free_stmt_vec_info_vec): Likewise.
10869 (set_stmt_vec_info_vec): New function.
10870 (free_stmt_vec_infos): Likewise.
10871 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10872 (set_vinfo_for_stmt): Likewise.
10873 (get_earlier_stmt): Likewise.
10874 (get_later_stmt): Likewise.
10875 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10876 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10877 (vec_info::~vec_info): Free stmt_vec_infos.
10878 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10879 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10880 (pass_slp_vectorize::execute): Likewise.
10881 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10882 (free_stmt_vec_info_vec): Likewise.
10883 (set_stmt_vec_info_vec): New function.
10884 (free_stmt_vec_infos): Likewise.
10885 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10886 the global stmt_vec_info_vec.
10887 * tree-parloops.c (gather_scalar_reductions): Use
10888 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10891 2018-05-29 Richard Biener <rguenther@suse.de>
10893 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10895 2018-05-29 Martin Liska <mliska@suse.cz>
10896 David Malcolm <dmalcolm@redhat.com>
10898 * vec.c (test_reverse): New.
10899 (vec_c_tests): Add new test.
10900 * vec.h (vl_ptr>::reverse): New function.
10902 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10904 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10906 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10909 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10911 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10913 2018-05-28 Richard Biener <rguenther@suse.de>
10915 PR tree-optimization/85933
10916 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10917 look at stmts marked as vectorizable.
10919 2018-05-28 Richard Biener <rguenther@suse.de>
10921 PR tree-optimization/85934
10922 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10923 vector boolean check before scalar optimization.
10925 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10927 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10930 2018-05-28 Mark Wielaard <mark@klomp.org>
10932 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10933 if it is an expression containing a minus sign.
10935 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10937 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10939 2018-05-27 Paul Koning <ni1d@arrl.net>
10941 * config/pdp11/pdp11.md (truncsihi2): Remove.
10943 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10944 Chung-Ju Wu <jasonwucj@gmail.com>
10946 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10948 (unaligned_store_dw): Ditto.
10949 * config/nds32/nds32-memory-manipulation.c
10950 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10951 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10952 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10953 (emit_setmem_word_loop): Rename to ...
10954 (emit_setmem_doubleword_loop): ... this.
10955 (nds32_gen_dup_4_byte_to_word_value): New function.
10956 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10957 (nds32_expand_setmem_loop): Refine implementation.
10958 (nds32_expand_setmem_loop_v3m): Ditto.
10959 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10962 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10964 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10966 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10968 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10969 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10970 machine->attr_no_prologue_p.
10971 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10972 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10973 (nds32_expand_epilogue): Consider attr_naked_p.
10974 (nds32_expand_epilogue_v3pop): Likewise.
10975 (nds32_can_use_return_insn): Likewise.
10976 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10977 attr_no_prologue_p fields.
10978 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10980 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10983 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10985 * config/i386/sse.md
10986 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10988 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10990 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10992 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10994 (*<floatsuffix>floatv2div2sf2): Rename to ...
10995 (*float<floatunssuffix>v2div2sf2): ... this.
10996 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10997 (float<floatunssuffix>v2div2sf2_mask): ... this.
10998 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10999 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11000 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11002 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11004 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11006 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11008 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11010 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11012 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11013 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11014 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11015 gen_ufix_truncv8dfv8si2.
11016 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11017 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11018 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11019 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11020 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11021 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11022 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11023 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11025 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11029 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11031 2018-05-25 Jim Wilson <jimw@sifive.com>
11033 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11034 * config/riscv/riscv.c (struct machine_function): Add
11035 interrupt_handler_p and attribute_checked_p fields.
11036 (riscv_attribute_table): Add interrupt.
11037 (riscv_interrupt_type_p): New.
11038 (riscv_save_reg_p): Save extra regs for interrupt handler.
11039 (riscv_use_save_libcall): Return false for interrupt handler.
11040 (riscv_first_stack_step): Add forward declaration.
11041 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11042 for interrupt handler with large frame. Use it for saved reg list.
11043 (riscv_expand_prologue): Move flag_stack_usage_info support to
11044 eliminate duplication.
11045 (riscv_expand_epilogue): Generate mret for interrupt handler.
11046 (riscv_epilogue_uses): New.
11047 (riscv_can_use_return_insn): Return false for interrupt handler.
11048 (riscv_function_ok_for_sibcall): Likewise.
11049 (riscv_set_current_function): Add interrupt handler support.
11050 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11051 * config/riscv/riscv.md (UNSPECV_MRET): New.
11053 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11055 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11057 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11059 PR tree-optimization/85712
11060 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11061 this candidate has already been replaced in-situ by a copy.
11063 2018-05-25 Jason Merrill <jason@redhat.com>
11065 PR c++/80485 - inline function non-zero address.
11066 * symtab.c (nonzero_address): Check DECL_COMDAT.
11068 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11071 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11072 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11073 extension of SImode operation. Use const123_operand predicate.
11074 (*saddsi_1): Remove.
11075 (*saddl_se_1): Ditto.
11076 (*ssubsi_1): Ditto.
11077 (*ssubl_se_1): Ditto.
11078 * config/alpha/predicates.md (const123_operand): New predicate.
11079 * config/alpha/constraints.md (P): Use IN_RANGE.
11081 2018-05-25 Richard Biener <rguenther@suse.de>
11083 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11085 (ref_maybe_used_by_stmt_p): Likewise.
11086 (stmt_may_clobber_ref_p): Likewise.
11087 (stmt_may_clobber_ref_p_1): Likewise.
11088 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11090 (ref_maybe_used_by_stmt_p): Likewise.
11091 (stmt_may_clobber_ref_p): Likewise.
11092 (stmt_may_clobber_ref_p_1): Likewise.
11093 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11094 the alias oracle to disambiguate DRs with stmts DR analysis
11096 (vect_analyze_data_refs): Do not give up on not analyzable
11097 DRs for BB vectorization. Remove code truncating the dataref
11100 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11103 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11104 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11105 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11107 2018-05-25 Richard Biener <rguenther@suse.de>
11109 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11110 function, combining stmt data ref gathering and fatal analysis
11112 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11113 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11114 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11115 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11116 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11118 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11120 PR tree-optimization/85720
11121 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11122 SCC if all partitions are builtins.
11123 (version_loop_by_alias_check): New parameter. Generate cancelable
11124 runtime alias check if all partitions are builtins.
11125 (distribute_loop): Update call to above function.
11127 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11129 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11130 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11131 (parm_default_def_partition_arg): Ditto.
11132 (set_parm_default_def_partition): Ditto.
11133 (get_parm_default_def_partitions): Ditto and make it static.
11134 (get_undefined_value_partitions): Ditto and make it static.
11135 (remove_ssa_form): Refactor call to init_var_map here.
11136 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11137 computation for loop region.
11138 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11139 (register_default_def): Delete.
11140 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11141 (parm_default_def_partition_arg): Ditto.
11142 (set_parm_default_def_partition): Ditto.
11143 (get_parm_default_def_partitions): Ditto and make it static.
11144 (get_undefined_value_partitions): Ditto and make it static.
11145 (coalesce_with_default, coalesce_with_default): Update comment.
11146 (create_coalesce_list_for_region): New func factored out from
11147 create_outofssa_var_map.
11148 (populate_coalesce_list_for_outofssa): New func factored out from
11149 create_outofssa_var_map and coalesce_ssa_name.
11150 (create_outofssa_var_map): Delete.
11151 (coalesce_ssa_name): Refactor to support live range computation.
11152 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11153 (get_parm_default_def_partitions): Delete.
11154 (get_undefined_value_partitions): Ditto.
11155 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11156 computation for loop region.
11157 (new_tree_live_info, loe_visit_block): Ditto.
11158 (live_worklist, set_var_live_on_entry): Ditto.
11159 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11160 * tree-ssa-live.h (struct _var_map): New fields.
11161 (init_var_map): Change decl.
11162 (region_contains_p): New.
11164 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11166 * tree-ssa-live.h (live_merge_and_clear): Delete.
11168 2018-05-25 Richard Biener <rguenther@suse.de>
11171 * tree-dump.c (dequeue_and_dump): Remove access to removed
11172 operand 2 of a SWITCH_EXPR.
11174 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11176 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11177 multiplication and division.
11178 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11179 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11180 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11181 (cond_udiv_optab, cond_umod_optab): New optabs.
11182 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11183 (IFN_COND_RDIV): New internal functions.
11184 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11185 TRUNC_MOD_EXPR and RDIV_EXPR.
11186 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11187 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11189 (SVE_INT_BINARY): Include mult.
11190 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11191 (optab, sve_int_op): Handle mult.
11192 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11194 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11195 for SVE_INT_BINARY_SD.
11197 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11199 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11200 (optab, sve_int_op): Handle div and udiv.
11201 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11202 for SVE_INT_BINARY_SD.
11203 (*<optab><mode>3): New insn for the same.
11205 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11207 * tree-vect-patterns.c: Include predict.h.
11208 (vect_recog_divmod_pattern): Restrict check for division support
11209 to when optimizing for size.
11211 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11213 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11214 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11215 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11216 (gimple_match_op::set_op): Likewise.
11217 (gimple_resimplify4): Declare.
11218 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11219 (expr::gen_transform): Likewise.
11220 (decision_tree::gen): Generate a simplification routine for 4 operands.
11221 * gimple-match-head.c (gimple_simplify): Add an overload for
11222 4 operands. In the top-level function, handle up to 4 call
11223 arguments and call gimple_resimplify4.
11224 (gimple_resimplify4): New function.
11225 (build_call_internal): Pass a fourth operand.
11226 (maybe_push_to_seq): Likewise.
11227 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11228 Fold VEC_COND_EXPRs of an operation and a default value into
11229 an IFN_COND_* function if possible.
11230 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11232 (SVE_COND_FP_BINARY): Include them.
11233 (optab, sve_fp_op): Handle them.
11234 (SVE_INT_BINARY_REV): New code iterator.
11235 (SVE_COND_FP_BINARY_REV): New int iterator.
11236 (commutative): New int attribute.
11237 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11239 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11241 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11242 (*cond_<optab><mode>): New patterns for reversed operands.
11244 2018-05-25 Richard Biener <rguenther@suse.de>
11246 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11247 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11248 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11249 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11250 * tree-vect-data-refs.c (everywhere): Adjust users.
11251 * tree-vect-loop.c (everywhere): Likewise.
11252 * tree-vect-slp.c (everywhere): Likewise.
11253 * tree-vect-stmts.c (everywhere): Likewise.
11254 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11256 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11258 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11260 (gcc_cv_as_section_exclude): ... this.
11261 Try Solaris as #exclude syntax.
11262 * configure: Regenerate.
11263 * config.in: Regenerate.
11264 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11266 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11267 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11269 * varasm.c (default_elf_asm_named_section): Don't check if
11270 HAVE_GAS_SECTION_EXCLUDE is defined.
11272 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11274 * doc/md.texi: Update the documentation of the cond_* optabs
11275 to mention the new final operand. Fix GET_MODE_NUNITS call.
11276 Describe the scalar case too.
11277 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11278 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11280 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11281 (get_conditional_internal_fn): Update comment.
11282 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11283 accumulator value as a final argument to conditional functions.
11284 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11285 a define_expand and add an "else" operand. Assert for now that
11286 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11287 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11288 (*cond_<optab><mode>): New patterns.
11289 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11290 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11291 (UNSPEC_COND_EOR): Delete.
11292 (optab): Remove associated mappings.
11293 (SVE_INT_BINARY): New code iterator.
11294 (sve_int_op): Remove int attribute and add "minus" to the code
11296 (SVE_COND_INT_OP): Delete.
11297 (SVE_COND_FP_OP): Rename to...
11298 (SVE_COND_FP_BINARY): ...this.
11300 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11302 * optabs.c (can_reuse_operands_p): New function.
11303 (maybe_legitimize_operands): Try to reuse the results for
11306 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11308 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11309 Add {q} suffix to insn mnemonic.
11311 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11313 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11314 (msp430_warn_func_return): New.
11316 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11318 * fold-const.c (tree_nonzero_bits): New function.
11319 * fold-const.h (tree_nonzero_bits): Likewise.
11320 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11321 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11323 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11327 * varasm.c (assemble_alias): Check ifunc_resolver only on
11330 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11333 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11334 when memory input operand is handled.
11336 2018-05-24 Luis Machado <luis.machado@linaro.org>
11338 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11340 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11342 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11344 * match.pd: Delay FMA folds until after vectorization.
11346 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11349 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11350 address check not strict.
11352 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11354 * gimple-match.h (gimple_match_op): New class.
11355 (mprts_hook): Replace parameters with a gimple_match_op *.
11356 (maybe_build_generic_op): Likewise.
11357 (gimple_simplified_result_is_gimple_val): Replace parameters with
11358 a const gimple_match_op *.
11359 (gimple_simplify): Replace code_helper * and tree * parameters with
11360 a gimple_match_op * parameter.
11361 (gimple_resimplify1): Replace code_helper *, tree and tree *
11362 parameters with a gimple_match_op * parameter.
11363 (gimple_resimplify2): Likewise.
11364 (gimple_resimplify3): Likewise.
11365 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11366 parameters with a gimple_match_op * parameter.
11367 * gimple-match-head.c (gimple_simplify): Change prototypes of
11368 auto-generated functions to take a gimple_match_op * instead of
11369 separate code_helper * and tree * parameters. Make the same
11370 change in the top-level overload and update calls to the
11371 gimple_resimplify routines. Update calls to the auto-generated
11372 functions and to maybe_push_res_to_seq in the publicly-facing
11373 operation-specific gimple_simplify overloads.
11374 (gimple_match_op::MAX_NUM_OPS): Define.
11375 (gimple_resimplify1): Replace rcode and ops with a single res_op
11376 parameter. Update call to gimple_simplify.
11377 (gimple_resimplify2): Likewise.
11378 (gimple_resimplify3): Likewise.
11379 (mprts_hook): Replace parameters with a gimple_match_op *.
11380 (maybe_build_generic_op): Likewise.
11381 (build_call_internal): Replace type, nargs and ops with
11382 a gimple_match_op *.
11383 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11384 with a single gimple_match_op *. Update calls to mprts_hook,
11385 build_call_internal and gimple_simplified_result_is_gimple_val.
11386 Factor out code that is common to the tree_code and combined_fn cases.
11387 * genmatch.c (expr::gen_transform): Replace tem_code and
11388 tem_ops with a gimple_match_op called tem_op. Update calls
11389 to the gimple_resimplify functions and maybe_push_res_to_seq.
11390 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11391 res_ops. Update call to the gimple_resimplify functions.
11392 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11393 (decision_tree::gen): Make the functions take a gimple_match_op *
11394 called res_op instead of separate res_code and res_ops parameters.
11395 Update call accordingly.
11396 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11397 and ops with a single res_op parameter. Update calls to
11398 maybe_build_generic_op and maybe_push_res_to_seq.
11399 (fold_stmt_1): Update calls to gimple_simplify and
11400 replace_stmt_with_simplification.
11401 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11402 and gimple_simplified_result_is_gimple_val.
11403 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11405 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11406 with a gimple_match_op *.
11407 (vn_nary_build_or_lookup): Likewise. Update call to
11408 vn_nary_build_or_lookup_1.
11409 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11410 gimple_match_op *. Update calls to the gimple_resimplify routines
11411 and to gimple_simplified_result_is_gimple_val.
11412 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11413 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11414 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11415 (visit_nary_op): Likewise.
11416 (visit_reference_op_load): Likewise.
11418 2018-05-23 Luis Machado <luis.machado@linaro.org>
11420 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11421 modifier for printing the step amount.
11423 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11426 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11429 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11431 * doc/sourcebuild.texi (Endianness): New subsubsection.
11433 2018-05-23 Luis Machado <luis.machado@linaro.org>
11435 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11436 <prefetch_dynamic_strides>: New const bool field.
11437 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11438 prefetch_dynamic_strides.
11439 (exynosm1_prefetch_tune): Likewise.
11440 (thunderxt88_prefetch_tune): Likewise.
11441 (thunderx_prefetch_tune): Likewise.
11442 (thunderx2t99_prefetch_tune): Likewise.
11443 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11445 (aarch64_override_options_internal): Update to set
11446 PARAM_PREFETCH_DYNAMIC_STRIDES.
11447 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11448 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11449 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11450 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11451 prefetch-dynamic-strides setting.
11453 2018-05-23 Luis Machado <luis.machado@linaro.org>
11455 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11456 <minimum_stride>: New const int field.
11457 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11458 minimum_stride field defaulting to -1.
11459 (exynosm1_prefetch_tune): Likewise.
11460 (thunderxt88_prefetch_tune): Likewise.
11461 (thunderx_prefetch_tune): Likewise.
11462 (thunderx2t99_prefetch_tune): Likewise.
11463 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11464 <default_opt_level>: Set to 3.
11465 (aarch64_override_options_internal): Update to set
11466 PARAM_PREFETCH_MINIMUM_STRIDE.
11467 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11468 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11469 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11470 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11471 stride is constant and is below the minimum stride threshold.
11473 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11475 * config/arm/arm-cpus.in (mode26): Delete.
11476 (armv4): Delete mode26 reference.
11477 * config/arm/arm.c (arm_configure_build_target): Delete use of
11480 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11482 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11484 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11485 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11487 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11488 (floatunsdidf2): Ditto.
11490 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11492 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11493 (fixuns_trunc<mode>si2_avx512f): Ditto.
11494 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11495 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11496 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11498 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11500 PR rtl-optimization/79985
11501 * df-scan.c (df_insn_refs_collect): Remove special case for
11502 global registers and asm statements.
11504 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11506 * extend.texi (Global Register Variables): Rewrite the bullet list.
11507 Note that the register is available for allocation. Note that access
11508 via inline asm must use constraints. Add note about async-signal
11509 handlers. Remove paragraph about automagic register selection.
11511 2018-05-23 Richard Biener <rguenther@suse.de>
11513 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11514 of fixed offset from memset VN.
11516 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11518 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11519 first_interp field.
11520 (alloc_cand_and_find_basis): Initialize first_interp field.
11521 (slsr_process_mul): Modify first_interp field.
11522 (slsr_process_add): Likewise.
11523 (slsr_process_cast): Modify first_interp field for each new
11525 (slsr_process_copy): Likewise.
11526 (dump_candidate): Dump first_interp field.
11527 (replace_mult_candidate): Process all interpretations, not just
11529 (replace_rhs_if_not_dup): Likewise.
11530 (replace_one_candidate): Likewise.
11532 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11534 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11536 (aarch64_needs_frame_chain): New function.
11537 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11539 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11542 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11543 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11544 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11545 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11546 as true for strict-align.
11547 (aarch64_can_inline_p): Perform checks even when callee has no
11548 attributes to check for strict alignment.
11549 * doc/extend.texi (AArch64 Function Attributes): Document
11551 * doc/invoke.texi: (AArch64 Options): Likewise.
11553 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11555 PR tree-optimization/85853
11556 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11557 the handling of the root of the node to...
11558 (vect_slp_analyze_node_operations_1): ...this new function,
11559 and run the whole thing with the child nodes' def types
11560 set according to their SLP node's def type.
11562 2018-05-23 Richard Biener <rguenther@suse.de>
11564 PR middle-end/85874
11565 * tree-data-ref.c (create_runtime_alias_checks): Defer
11566 and ignore overflow warnings.
11568 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11570 PR tree-optimization/85822
11571 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11574 2018-05-23 Richard Biener <rguenther@suse.de>
11576 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11577 memset constants via native_interpret_expr.
11579 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11582 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11584 (cgraph_node::create_alias): Likewise.
11585 (cgraph_node::get_availability): Check ifunc_resolver instead
11586 of looking up ifunc attribute.
11587 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11588 * varasm.c (do_assemble_alias): Likewise.
11589 (assemble_alias): Likewise.
11590 (default_binds_local_p_3): Likewise.
11591 * cgraph.h (cgraph_node): Add ifunc_resolver.
11592 (cgraph_node::only_called_directly_or_aliased_p): Return false
11593 for IFUNC resolver.
11594 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11596 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11597 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11598 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11599 instead of looking up ifunc attribute.
11601 2018-05-22 Luis Machado <luis.machado@linaro.org>
11603 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11605 2018-05-22 Martin Sebor <msebor@redhat.com>
11607 PR middle-end/85359
11608 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11609 only when expasion succeeds.
11610 (expand_builtin_strcmp): Same.
11611 (expand_builtin_strncmp): Same.
11613 2018-05-22 Martin Sebor <msebor@redhat.com>
11615 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11617 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11618 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11620 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11621 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11623 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11624 Add check for legitimate_address.
11625 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11626 (aarch64_swap_ldrstr_operands): New.
11627 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11630 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11631 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11633 * config/aarch64/aarch64.md: New patterns to generate stp
11635 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11636 single words and double words.
11637 (load_pair_sw, load_pair_dw): Likewise.
11638 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11640 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11642 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11643 for different mode ldpstp and add peephole for merged zero stores.
11644 Likewise for loads.
11645 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11647 (aarch64_gen_store_pair): Rename calls to match new patterns.
11648 (aarch64_gen_load_pair): Rename calls to match new patterns.
11649 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11650 (load_pair<DREG:mode><DREG2:mode>): ... This.
11651 (store_pair<mode>): Rename to...
11652 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11653 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11654 New mode iterators.
11655 (V_INT_EQUIV): Handle SImode.
11656 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11659 2018-05-22 Martin Sebor <msebor@redhat.com>
11662 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11663 or ajust the presumed bound on an operation to avoid unnecessary
11666 2018-05-22 Martin Sebor <msebor@redhat.com>
11668 PR tree-optimization/85826
11669 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11670 assuming that a DECL necesarily has a constant size.
11672 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11674 PR middle-end/85862
11675 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11677 2018-05-22 Richard Biener <rguenther@suse.de>
11679 PR tree-optimization/85834
11680 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11681 non-constant and non-zero memset arguments.
11683 2018-05-22 Martin Liska <mliska@suse.cz>
11686 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11688 2018-05-22 Richard Biener <rguenther@suse.de>
11690 PR tree-optimization/85863
11691 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11692 comparisons when vectype is specified.
11693 (vectorizable_condition): Do not specify vectype for
11694 vect_is_simple_cond when SLP vectorizing.
11696 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11699 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11700 define __ibm128 as long double.
11701 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11702 as a distinct type when IEEE 128-bit support is enabled.
11703 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11704 128-bit types to use the correct functions.
11705 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11706 convert between 128-bit floating point types that have different
11707 modes but the same representation, instead of using gen_lowpart to
11709 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11711 (IFKF_reg): New attributes to give the register constraints for
11713 (extend<mode>tf2_internal): New insns to mark an explicit
11714 conversion between 128-bit floating point types that have a
11715 different mode but share the same representation.
11717 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11719 PR tree-optimization/85814
11720 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11721 a null return from get_strinfo when unsharing the next
11722 strinfo in the chain.
11724 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11727 * varasm.c (weak_finish): Clean up weak_decls.
11729 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11731 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11732 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11733 UNSPEC_UADALP values.
11734 * config/aarch64/iterators.md (ABAL): New int iterator.
11737 (sur): Add mappings for the above.
11738 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11740 (aarch64_<sur>abal<mode>_4): Likewise.
11741 (aarch64_<sur>adalp<mode>_3): Likewise.
11742 (<sur>sadv16qi): New define_expand.
11744 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11746 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11747 (*movdf_internal): Ditto.
11748 (*rcpsf2_sse): Ditto.
11749 (*rsqrtsf2_sse): Ditto.
11750 (*sqrt<mode>2_sse): Ditto.
11752 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11754 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11756 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11757 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11758 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11759 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11761 * config/aarch64/arm_neon.h: Likewise.
11762 * config/aarch64/iterators.md (VQ_I): New.
11764 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11766 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11768 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11771 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11773 * config/nds32/constraints.md (S): New constraint.
11774 * config/nds32/nds32.md (call_internal): Use constraint S.
11775 (call_value_internal): Likewise.
11776 (sibcall_internal): Likewise.
11777 (sibcall_value_internal): Likewise.
11779 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11780 Chung-Ju Wu <jasonwucj@gmail.com>
11782 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11783 into consideration.
11785 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11786 Chung-Ju Wu <jasonwucj@gmail.com>
11788 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11789 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11790 (nds32_rtx_costs_impl): Simplify.
11791 (nds32_address_cost_impl): Simplify.
11792 (nds32_init_rtx_costs): New function.
11793 (nds32_rtx_costs_speed_prefer): Likewise.
11794 (nds32_rtx_costs_size_prefer): Likewise.
11795 (nds32_address_cost_speed_prefer): Likewise.
11796 (nds32_address_cost_speed_fwprop): Likewise.
11797 (nds32_address_cost_size_prefer): Likewise.
11798 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11799 * config/nds32/nds32.c (nds32_option_override): Use
11800 nds32_init_rtx_costs function.
11802 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11804 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11805 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11806 (TARGET_PIPELINE_N8): Likewise.
11807 (TARGET_PIPELINE_N10): Likewise.
11808 (TARGET_PIPELINE_N13): Likewise.
11809 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11811 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11813 * config/nds32/nds32-fpu.md: Update copyright year.
11815 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11817 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11819 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11821 * config/nds32/nds32.c
11822 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11823 * config/nds32/nds32.opt (minline-asm-r15): New option.
11825 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11827 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11829 * config/nds32/nds32.md (abssi2): New pattern.
11831 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11833 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11834 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11835 Merge insn pattern from sse_cvtsi2ss<round_name> and
11836 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11837 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11838 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11839 using SWI48 mode iterator.
11840 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11841 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11842 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11843 pattern from sse_cvttss2si<round_saeonly_name>
11844 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11845 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11846 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11847 using SWI48 mode iterator.
11848 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11849 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11850 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11851 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11852 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11853 using SWI48 mode iterator.
11854 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11855 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11856 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11857 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11858 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11859 SWI48 mode iterator.
11860 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11861 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11862 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11863 pattern from sse_cvttsd2si<round_saeonly_name>
11864 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11866 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11868 * config/nds32/nds32-md-auxiliary.c
11869 (nds32_valid_smw_lwm_base_p): Refine.
11870 (nds32_output_smw_single_word): Refine.
11871 (nds32_output_smw_double_word): New.
11872 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11874 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11876 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11877 (nds32_output_stack_pop): Refine.
11878 (nds32_expand_unaligned_load): Refine.
11879 (nds32_expand_unaligned_store): Refine.
11881 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11882 Chung-Ju Wu <jasonwucj@gmail.com>
11884 * config/nds32/constants.md: Add TP_REGNUM constant.
11885 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11886 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11888 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11889 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11890 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11891 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11892 and PIC code generation.
11893 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11895 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11897 * config/nds32/nds32.md: Support TLS and PIC.
11898 * config/nds32/nds32.c: Support TLS and PIC.
11899 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11900 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11903 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11905 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11906 mode with E_ prefix.
11908 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11909 Chung-Ju Wu <jasonwucj@gmail.com>
11911 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11912 * config/nds32/nds32-md-auxiliary.c
11913 (symbolic_reference_mentioned_p): New.
11914 (nds32_legitimize_ict_address): New.
11915 (nds32_expand_ict_move): New.
11916 (nds32_indirect_call_referenced_p): New.
11917 (nds32_symbol_binds_local_p): Delete.
11918 (nds32_long_call_p): Modify.
11919 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11920 * config/nds32/nds32-protos.h
11921 (symbolic_reference_mentioned_p): Declare.
11922 (nds32_legitimize_ict_address): Declare.
11923 (nds32_expand_ict_move): Declare.
11924 (nds32_indirect_call_referenced_p): Declare.
11925 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11926 (nds32_relax_group): Use nds32_ict_const_p as condition.
11927 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11928 (nds32_asm_file_start): Output ict_model directive in asm code.
11929 (nds32_legitimate_address_p): Consider indirect call.
11930 (nds32_print_operand): Consider indirect call.
11931 (nds32_print_operand_address): Consider indirect call.
11932 (nds32_insert_attributes): Handle "indirect_call" attribute.
11933 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11934 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11935 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11936 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11937 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11938 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11939 (TARGET_ICT_MODEL_SMALL): Define.
11940 (TARGET_ICT_MODEL_LARGE): Define.
11941 * config/nds32/nds32.md (movsi): Consider ict model.
11942 (call, call_value): Consider ict model.
11943 (sibcall, sibcall_value): Consider ict model.
11944 * config/nds32/nds32.opt (mict-model): New option.
11945 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11948 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11949 Monk Chiang <sh.chiang04@gmail.com>
11950 Jim Wilson <jimw@sifive.com>
11952 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11953 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11954 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11955 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11956 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11957 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11958 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11959 compute save_libcall_adjustment properly.
11960 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11961 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11962 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11963 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11964 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11965 (ABI_SPEC): Handle mabi=ilp32e.
11966 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11967 (RVE): Add RVE mask.
11968 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11969 <-march>: Add rv32e as an example.
11971 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11974 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11975 (intra_create_variable_infos): Handle C++ constructors.
11977 2018-05-18 Martin Liska <mliska@suse.cz>
11979 * passes.def: Remove a redundant pass.
11981 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11984 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11986 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11988 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11990 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11992 (armv2, armv2a, armv3, armv3m): Delete architectures.
11993 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11994 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11995 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11997 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11998 (*mulsidi3adddi): Likewise.
11999 (mulsidi3): Likewise.
12000 (*mulsidi3_nov6): Likewise.
12001 (umulsidi3): Likewise.
12002 (umulsidi3_nov6): Likewise.
12003 (umaddsidi4): Likewise.
12004 (*umulsidi3adddi): Likewise.
12005 (smulsi3_highpart): Likewise.
12006 (*smulsi3_highpart_nov6): Likewise.
12007 (umulsi3_highpart): Likewise.
12008 (*umulsi3_highpart_nov6): Likewise.
12009 * config/arm/arm.h (arm_arch3m): Delete.
12010 * config/arm/arm.c (arm_arch3m): Delete.
12011 (arm_option_override_internal): Update armv3-related comment.
12012 (arm_configure_build_target): Delete use of isa_bit_mode32.
12013 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12014 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12015 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12016 (mulsa3): Likewise.
12017 (mulusa3): Likewise.
12018 * config/arm/arm-protos.h (arm_arch3m): Delete.
12019 * config/arm/arm-tables.opt: Regenerate.
12020 * config/arm/arm-tune.md: Likewise.
12021 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12022 deleted architectures.
12024 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12026 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12027 (armv5t, armv5te): New features.
12028 (ARMv5, ARMv5e): Delete fgroups.
12029 (ARMv5t, ARMv5te): Adjust for above changes.
12030 (ARMv6m): Likewise.
12031 (armv5, armv5e): Delete arches.
12032 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12034 (*call_reg_arm): Likewise.
12035 (*call_value_reg_armv5): Likewise.
12036 (*call_value_reg_arm): Likewise.
12037 (*call_symbol): Likewise.
12038 (*call_value_symbol): Likewise.
12039 (*sibcall_insn): Likewise.
12040 (*sibcall_value_insn): Likewise.
12041 (clzsi2): Likewise.
12042 (prefetch): Likewise.
12043 (define_split and define_peephole2 dependent on arm_arch5):
12045 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12047 (TARGET_ARM_QBIT): Likewise.
12048 (TARGET_DSP_MULTIPLY): Likewise.
12049 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12050 (arm_arch5, arm_arch5e): Delete.
12051 (arm_arch5t, arm_arch5te): Declare.
12052 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12053 (arm_arch5t): Declare.
12054 (arm_option_reconfigure_globals): Update for the above.
12055 (arm_options_perform_arch_sanity_checks): Update comment, replace
12056 use of arm_arch5 with arm_arch5t.
12057 (use_return_insn): Likewise.
12058 (arm_emit_call_insn): Likewise.
12059 (output_return_instruction): Likewise.
12060 (arm_final_prescan_insn): Likewise.
12061 (arm_coproc_builtin_available): Likewise.
12062 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12063 arm_arch5e with arm_arch5t and arm_arch5te.
12064 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12065 (arm_arch5t, arm_arch5te): Declare.
12066 * config/arm/arm-tables.opt: Regenerate.
12067 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12068 * config/arm/t-multilib: Likewise.
12069 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12070 instead of arm_arch5.
12071 (*call_reg_thumb1): Likewise.
12072 (*call_value_reg_thumb1_v5): Likewise.
12073 (*call_value_reg_thumb1): Likewise.
12074 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12076 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12078 2018-05-18 Martin Liska <mliska@suse.cz>
12080 PR gcov-profile/84846
12081 * doc/gcov.texi: Document -t option of gcov tool.
12083 2018-05-18 Martin Liska <mliska@suse.cz>
12085 PR gcov-profile/84846
12086 * gcov.c (print_usage): Add new -t option.
12087 (process_args): Handle the option.
12088 (generate_results): Use stdout as output when requested by
12091 2018-05-18 Martin Liska <mliska@suse.cz>
12093 PR gcov-profile/84846
12094 * coverage.c (coverage_init): Write PWD to .gcno file.
12095 * doc/gcov.texi: Document how working directory is printed.
12096 * gcov-dump.c (dump_gcov_file): Print PWD.
12097 * gcov.c (output_intermediate_file): Likewise.
12098 (read_graph_file): Read PWD string.
12099 (output_lines): Print PWD.
12101 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12103 PR middle-end/85817
12104 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12105 for retval and return false if all args to phi are zero.
12107 2018-05-18 Richard Biener <rguenther@suse.de>
12109 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12111 (evrp_dom_walker::before_dom_children): Call it.
12113 2018-05-18 Richard Biener <rguenther@suse.de>
12115 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12116 results when processing array refs with variable index.
12118 2018-05-18 Toon Moene <toon@moene.org>
12120 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12121 directly after that of -floop-interchange. Indicate that both
12122 options are enabled by default when specifying -O3.
12124 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12126 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12127 iterator. Delete separate integer-mode vec_set<mode> expander.
12128 (aarch64_simd_vec_setv2di): Delete.
12129 (vec_setv2di): Delete.
12130 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12131 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12132 the "w, r" alternative.
12134 2018-05-18 Martin Liska <mliska@suse.cz>
12136 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12137 * tree-pass.h (make_pass_lower_switch_O0): New function.
12138 * tree-switch-conversion.c (node_has_low_bound): Remove.
12139 (node_has_high_bound): Likewise.
12140 (node_is_bounded): Likewise.
12141 (class pass_lower_switch): Make it a template type and create
12143 (pass_lower_switch::execute): Add template argument.
12144 (make_pass_lower_switch): New function.
12145 (make_pass_lower_switch_O0): New function.
12146 (do_jump_if_equal): Remove.
12147 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12148 all the hard work to tree optimization passes.
12150 2018-05-18 Martin Liska <mliska@suse.cz>
12152 * dbgcnt.c (limit_low): Renamed from limit.
12153 (limit_high): New variable.
12154 (dbg_cnt_is_enabled): Check for upper limit.
12155 (dbg_cnt): Adjust dumping.
12156 (dbg_cnt_set_limit_by_index): Add new argument for high
12158 (dbg_cnt_set_limit_by_name): Likewise.
12159 (dbg_cnt_process_single_pair): Parse new format.
12160 (dbg_cnt_process_opt): Use strtok.
12161 (dbg_cnt_list_all_counters): Remove 'value' and add
12163 * doc/invoke.texi: Document changes.
12165 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12167 * doc/sourcebuild.texi (scalar_all_fma): Document.
12168 * tree.def (FMA_EXPR): Delete.
12169 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12170 * internal-fn.c (ternary_direct): New macro.
12171 (expand_ternary_optab_fn): Likewise.
12172 (direct_ternary_optab_supported_p): Likewise.
12173 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12174 * builtins.c (fold_builtin_fma): Delete.
12175 (fold_builtin_3): Don't call it.
12176 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12177 * expr.c (expand_expr_real_2): Likewise.
12178 * fold-const.c (operand_equal_p): Likewise.
12179 (fold_ternary_loc): Likewise.
12180 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12181 * gimple.c (DEFTREECODE): Likewise.
12182 * gimplify.c (gimplify_expr): Likewise.
12183 * optabs-tree.c (optab_for_tree_code): Likewise.
12184 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12185 * tree-eh.c (operation_could_trap_p): Likewise.
12186 (stmt_could_throw_1_p): Likewise.
12187 * tree-inline.c (estimate_operator_cost): Likewise.
12188 * tree-pretty-print.c (dump_generic_node): Likewise.
12189 (op_code_prio): Likewise.
12190 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12191 * tree-ssa-operands.c (get_expr_operands): Likewise.
12192 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12193 * fold-const-call.h (fold_fma): Delete.
12194 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12195 CFN_FNMA and CFN_FNMS.
12196 (fold_fma): Delete.
12197 * genmatch.c (combined_fn): New enum.
12198 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12199 (commutative_op): New function.
12200 (commutate): Use it. Handle more than 2 operands.
12201 (dt_operand::gen_gimple_expr): Use commutative_op.
12202 (parser::parse_expr): Allow :c to be used with non-binary
12203 operators if the commutative operand is known.
12204 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12205 CFN_FMS, CFN_FNMA and CFN_FNMS.
12206 (backprop::process_assign_use): Remove FMA_EXPR handling.
12207 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12208 (gen_hsa_fma): New function.
12209 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12210 IFN_FNMA and IFN_FNMS.
12211 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12212 * gimple-fold.h (follow_all_ssa_edges): Declare.
12213 * gimple-fold.c (follow_all_ssa_edges): New function.
12214 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12215 gimple_build interface and use follow_all_ssa_edges to fold the result.
12216 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12217 instead of checking for optabs directly.
12218 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12219 rather than FMA_EXPRs.
12220 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12221 call to IFN_FMA instead of an FMA_EXPR.
12223 2018-05-17 Jim Wilson <jimw@sifive.com>
12225 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12226 sign extended promoted subreg, and the range does not have the sign bit
12227 set, then do a sign extend.
12229 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12230 test, check for sign extended subreg and/or constant operands, and
12231 do a sign extend in that case.
12233 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12235 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12236 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12238 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12239 Change logics_shift_reg to logics_shift_imm.
12240 (thunderx2t99_fp_loadpair_basic): Delete.
12241 (thunderx2t99_fp_storepair_basic): Delete.
12242 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12243 (thunderx2t99_asimd_polynomial): Delete.
12244 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12245 and neon_fp_mul_d_scalar_q.
12246 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12247 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12248 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12249 (thunderx2t99_asimd_lut): Add missing tbl types.
12250 (thunderx2t99_asimd_ext): Delete.
12251 (thunderx2t99_asimd_load1_1_mult): Delete.
12252 (thunderx2t99_asimd_load1_2_mult): Delete.
12253 (thunderx2t99_asimd_load1_ldp): New.
12254 (thunderx2t99_asimd_load1): New.
12255 (thunderx2t99_asimd_load2): Add missing *load2* types.
12256 (thunderx2t99_asimd_load3): New.
12257 (thunderx2t99_asimd_load4): New.
12258 (thunderx2t99_asimd_store1_1_mult): Delete.
12259 (thunderx2t99_asimd_store1_2_mult): Delete.
12260 (thunderx2t99_asimd_store2_mult): Delete.
12261 (thunderx2t99_asimd_store2_onelane): Delete.
12262 (thunderx2t99_asimd_store_stp): New.
12263 (thunderx2t99_asimd_store1): New.
12264 (thunderx2t99_asimd_store2): New.
12265 (thunderx2t99_asimd_store3): New.
12266 (thunderx2t99_asimd_store4): New.
12268 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12270 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12271 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12273 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12274 Segher Boessenkool <segher@kernel.crashing.org>
12277 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12280 2018-05-17 Richard Biener <rguenther@suse.de>
12282 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12283 for pruning loop and prune defs feeding only already visited PHIs.
12285 2018-05-17 Richard Biener <rguenther@suse.de>
12287 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12289 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12290 Richard Biener <rguenther@suse.de>
12292 PR tree-optimization/85793
12293 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12294 for VMAT_ELEMENTWISE.
12296 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12298 * internal-fn.h (lookup_internal_fn): Declare
12299 * internal-fn.c (lookup_internal_fn): New function.
12300 * gimple.c (gimple_build_call_from_tree): Handle calls to
12301 internal functions.
12302 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12303 internal function names.
12304 * tree-pretty-print.c (dump_generic_node): Likewise.
12305 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12307 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12309 * gimple-fold.h (gimple_build): Make the function forms take
12310 combined_fn rather than built_in_function.
12311 (gimple_simplify): Likewise.
12312 * gimple-match-head.c (gimple_simplify): Likewise.
12313 * gimple-fold.c (gimple_build): Likewise.
12314 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12315 rather than gimple_build_call_internal.
12316 (get_initial_defs_for_reduction): Likewise.
12317 (vect_create_epilog_for_reduction): Likewise.
12318 (vectorizable_live_operation): Likewise.
12320 2018-05-17 Martin Liska <mliska@suse.cz>
12322 * gimple-ssa-sprintf.c (format_directive): Do not use
12323 space in between 'G_' and '('.
12325 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12328 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12329 even if the mask is not all ones.
12332 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12334 (ix86_gimple_fold_builtin): Likewise.
12337 * config/i386/i386.c: Include tree-vector-builder.h.
12338 (ix86_vector_shift_count): New function.
12339 (ix86_fold_builtin): Fold shift builtins by scalar count.
12340 (ix86_gimple_fold_builtin): Likewise.
12342 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12343 _mm512_setzero): New intrinsics.
12345 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12346 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12348 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12349 code generation for cases where splatting a value is not useful.
12350 * simplify-rtx.c (simplify_ternary_operation): Simplify
12351 vec_merge across a vec_duplicate and a paradoxical subreg forming
12352 a vector mode to a vec_concat.
12354 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12356 * config.gcc: Support "goldmont-plus".
12357 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12359 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12360 PROCESSOR_GOLDMONT_PLUS.
12361 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12362 (processor_target_table): Add "goldmont-plus".
12363 (PTA_GOLDMONT_PLUS): Define.
12364 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12365 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12366 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12367 (fold_builtin_cpu): Add "goldmont-plus".
12368 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12369 (ix86_option_override_internal): Add "goldmont-plus".
12370 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12371 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12372 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12373 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12375 2018-05-17 Richard Biener <rguenther@suse.de>
12377 PR tree-optimization/85757
12378 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12379 remove defs that only feed that PHI from further processing.
12381 2018-05-16 Jim Wilson <jimw@sifive.com>
12383 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12385 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12387 2018-05-16 Mark Wielaard <mark@klomp.org>
12389 * dwarf2out.c (count_index_strings): New function.
12390 (output_indirect_strings): Call count_index_strings and generate
12391 header for dwarf_version >= 5.
12393 2018-05-16 Mark Wielaard <mark@klomp.org>
12395 * dwarf2out.c (dwarf_FORM): New function.
12396 (set_indirect_string): Use dwarf_FORM.
12397 (reset_indirect_string): Likewise.
12398 (size_of_die): Likewise.
12399 (value_format): Likewise.
12400 (output_die): Likewise.
12401 (add_skeleton_AT_string): Likewise.
12402 (output_macinfo_op): Likewise.
12403 (index_string): Likewise.
12404 (output_index_string_offset): Likewise.
12405 (output_index_string): Likewise.
12406 (count_index_strings): Likewise.
12408 2018-05-16 Carl Love <cel@us.ibm.com>
12410 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12411 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12413 2018-05-16 Martin Jambor <mjambor@suse.cz>
12415 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12416 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12418 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12420 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12421 (fnma<mode>4): Likewise.
12422 (fms<mode>4): Likewise.
12423 (fnms<mode>4): Likewise.
12424 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12425 (aarch64_fnma<mode>4): Likewise.
12426 (aarch64_fms<mode>4): Likewise.
12427 (aarch64_fnms<mode>4): Likewise.
12428 (aarch64_fnmadd<mode>4): Likewise.
12430 2018-05-16 Jason Merrill <jason@redhat.com>
12432 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12434 2018-05-16 Richard Biener <rguenther@suse.de>
12436 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12437 (dump_stmt_cost): Declare.
12438 (add_stmt_cost): Dump cost we add.
12439 (add_stmt_costs): New function.
12440 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12441 No longer exported.
12442 (vect_analyze_stmt): Adjust prototype.
12443 (vectorizable_condition): Likewise.
12444 (vectorizable_live_operation): Likewise.
12445 (vectorizable_reduction): Likewise.
12446 (vectorizable_induction): Likewise.
12447 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12448 cost vector to pass to vectorizable_ and record afterwards.
12449 (vect_model_reduction_cost): Take cost vector argument and adjust.
12450 (vect_model_induction_cost): Likewise.
12451 (vectorizable_reduction): Likewise.
12452 (vectorizable_induction): Likewise.
12453 (vectorizable_live_operation): Likewise.
12454 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12455 SLP_TREE_NUMBER_OF_VEC_STMTS.
12456 (vect_analyze_slp_cost_1): Remove.
12457 (vect_analyze_slp_cost): Likewise.
12458 (vect_slp_analyze_node_operations): Take visited args and
12459 a target cost vector. Avoid processing already visited stmt sets.
12460 (vect_slp_analyze_operations): Use a local cost vector to gather
12461 costs and register those of non-discarded instances.
12462 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12463 (vect_schedule_slp_instance): Remove copying of
12464 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12466 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12467 adding cost. Record cost entry location.
12468 (vect_prologue_cost_for_slp_op): Function to compute cost of
12469 a constant or invariant generated for SLP vect in the prologue,
12470 split out from vect_analyze_slp_cost_1.
12471 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12472 (vect_model_promotion_demotion_cost): Likewise.
12473 (vect_model_store_cost): Likewise, make static.
12474 (vect_model_load_cost): Likewise.
12475 (vectorizable_bswap): Add cost vector arg and adjust.
12476 (vectorizable_call): Likewise.
12477 (vectorizable_simd_clone_call): Likewise.
12478 (vectorizable_conversion): Likewise.
12479 (vectorizable_assignment): Likewise.
12480 (vectorizable_shift): Likewise.
12481 (vectorizable_operation): Likewise.
12482 (vectorizable_store): Likewise.
12483 (vectorizable_load): Likewise.
12484 (vectorizable_condition): Likewise.
12485 (vectorizable_comparison): Likewise.
12486 (can_vectorize_live_stmts): Likewise.
12487 (vect_analyze_stmt): Likewise.
12488 (vect_transform_stmt): Adjust calls to vectorizable_*.
12489 * tree-vectorizer.c: Include gimple-pretty-print.h.
12490 (dump_stmt_cost): New function.
12492 2018-05-16 Richard Biener <rguenther@suse.de>
12494 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12495 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12496 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12497 (check_name): New callback.
12498 (dse_classify_store): Track cycles via a visited bitmap of PHI
12499 defs and simplify handling of in-loop and across loop dead stores
12500 and properly fail for loop-variant refs. Handle byte-tracking with
12501 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12504 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12506 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12507 (vect_get_mask_type_for_stmt): Likewise.
12508 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12510 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12511 to determine the statement's vector type and the vector type that
12512 should be used for calculating nunits. Deal with cases in which
12513 the type has to be deferred.
12514 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12515 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12516 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12517 (vect_determine_vf_for_stmt): New functions, split out from...
12518 (vect_determine_vectorization_factor): ...here.
12519 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12520 (vect_get_mask_type_for_stmt): New functions, split out from
12521 vect_determine_vectorization_factor.
12523 2018-05-16 Richard Biener <rguenther@suse.de>
12525 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12526 verify the [VEC_]COND_EXPR embedded comparison.
12528 2018-05-15 Martin Sebor <msebor@redhat.com>
12530 PR tree-optimization/85753
12531 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12532 RECORD_TYPE in addition to ARRAY_TYPE.
12534 2018-05-15 Martin Sebor <msebor@redhat.com>
12536 PR middle-end/85643
12537 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12539 2018-05-15 Richard Biener <rguenther@suse.de>
12541 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12542 add by_clobber_p one. Change algorithm to collect all defs
12543 representing uses we need to walk and try reducing them to
12544 a single one before failing.
12545 (dse_dom_walker::dse_optimize_stmt): Adjust.
12547 2018-05-13 Mark Wielaard <mark@klomp.org>
12549 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12550 (size_of_loc_descr): Likewise.
12551 (output_loc_operands): Likewise.
12552 (output_loc_operands_raw): Likewise.
12553 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12554 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12555 (hash_loc_operands): Likewise.
12556 (compare_loc_operands): Likewise.
12558 2018-05-14 Mark Wielaard <mark@klomp.org>
12560 * dwarf2out.c (count_index_addrs): New function.
12561 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12563 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12565 PR tree-optimization/83648
12566 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12567 return value as malloc candidate.
12569 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12572 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12573 param as true in call to suggest_attribute.
12575 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12577 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12578 -mreadonly-in-sdata.
12580 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12582 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12584 (aarch64_crypto_aesd_fused): Likewise.
12586 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12588 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12589 (movsi_aarch64): Likewise.
12590 (load_pairsi): Likewise.
12591 (load_pairdi): Likewise.
12592 (store_pairsi): Likewise.
12593 (store_pairdi): Likewise.
12594 (load_pairsf): Likewise.
12595 (load_pairdf): Likewise.
12596 (store_pairsf): Likewise.
12597 (store_pairdf): Likewise.
12598 (zero_extend): Likewise.
12599 (trunc): Swap alternatives.
12600 (fcvt_target): Add '?' to prefer w over r.
12602 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12605 * config/i386/i386.md: Disallow non-commutative arithmetics in
12606 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12607 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12608 in the peephole2 before it.
12610 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12612 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12613 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12614 (ix86_handle_option): Handle -mcldemote.
12615 * config.gcc: New header.
12616 * config/i386/cldemoteintrin.h: New file.
12617 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12618 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12620 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12621 OPTION_MASK_ISA_CLDEMOTE.
12622 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12623 (ix86_valid_target_attribute_inner_p): Ditto.
12624 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12625 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12626 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12627 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12628 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12630 * config/i386/i386.opt: Add -mcldemote.
12631 * config/i386/x86intrin.h: New header.
12632 * doc/invoke.texi: Add -mcldemote.
12634 2018-05-14 Richard Biener <rguenther@suse.de>
12636 * doc/match-and-simplify.texi: Adjust :s documentation.
12638 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12640 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12641 intended memcpy size.
12642 (REORDER_45): Likewise.
12644 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12646 * sort.cc: New file.
12647 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12648 * vec.c (qsort_chk): Use gcc_qsort.
12649 * Makefile.in (OBJS-libcommon): Add sort.o.
12650 (build/sort.o): New target. Use it...
12651 (BUILD_RTL): ... here, and...
12652 (build/gencfn-macros): ... here, and...
12653 (build/genmatch): ... here.
12655 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12656 Chung-Ju Wu <jasonwucj@gmail.com>
12658 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12659 * config/nds32/nds32-graywolf.md: New file.
12660 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12661 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12663 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12664 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12665 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12666 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12667 * config/nds32/pipelines.md: Include n15 settings.
12669 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12670 Chung-Ju Wu <jasonwucj@gmail.com>
12672 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12673 * config/nds32/nds32-n13.md: New file.
12674 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12675 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12677 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12678 * config/nds32/nds32.md (pipeline_model): Add n13.
12679 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12680 * config/nds32/pipelines.md: Include n13 settings.
12682 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12683 Chung-Ju Wu <jasonwucj@gmail.com>
12685 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12686 * config/nds32/nds32-n10.md: New file.
12687 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12688 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12690 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12691 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12692 * config/nds32/nds32.md (pipeline_model): Add n10.
12693 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12694 * config/nds32/pipelines.md: Include n10 settings.
12696 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12697 Kito Cheng <kito.cheng@gmail.com>
12698 Chung-Ju Wu <jasonwucj@gmail.com>
12700 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12701 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12702 Add enum values for DSP extension instructions.
12703 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12705 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12706 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12707 New code iterators.
12708 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12709 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12710 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12711 * config/nds32/nds32-intrinsic.md: Likewise.
12712 * config/nds32/nds32_intrinsic.h: Likewise.
12713 * config/nds32/nds32-md-auxiliary.c: Likewise.
12714 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12715 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12716 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12717 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12718 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12719 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12720 TYPE_DMAC in switch statement.
12721 * config/nds32/nds32.c: New checking and implementation for DSP
12722 extension instructions.
12723 * config/nds32/nds32.h: Likewise.
12724 * config/nds32/nds32.md: Likewise.
12725 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12726 * config/nds32/predicates.md: Implement new predicates for DSP
12729 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12731 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12732 Reformat alternatives and attributes so it is easier to identify
12733 which constraints/attributes go with which instruction.
12734 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12735 (mov<mode>_softfloat32, FMOVE64): Likewise.
12736 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12737 (mov<mode>_softfloat64, FMOVE64): Likewise.
12739 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12741 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12743 (Basic PowerPC Built-in Functions): The new name of the
12744 subsection previously known as "PowerPC Built-in Functions".
12745 (Basic PowerPC Built-in Functions Available on all Configurations):
12747 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12748 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12749 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12750 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12752 2018-05-11 Martin Jambor <mjambor@suse.cz>
12755 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12758 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12761 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12763 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12765 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12766 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12767 (ix86_handle_option): Handle -mwaitpkg.
12768 * config.gcc: New header.
12769 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12770 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12771 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12773 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12774 OPTION_MASK_ISA_WAITPKG.
12775 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12776 (ix86_option_override_internal): Add PTA_WAITPKG.
12777 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12778 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12779 IX86_BUILTIN_TPAUSE.
12780 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12781 __builtin_ia32_umwait and __builtin_ia32_tpause.
12782 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12783 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12784 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12785 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12786 UNSPECV_TPAUSE): New.
12787 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12788 * config/i386/i386.opt: Add -mwaitpkg.
12789 * config/i386/waitpkgintrin.h: New file.
12790 * config/i386/x86intrin.h: New header.
12791 * doc/invoke.texi: Add -mwaitpkg.
12793 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12796 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12798 (cortex-m0): Use armv6s-m isa.
12799 (cortex-m0plus): Likewise.
12800 (cortex-m1): Likewise.
12801 (cortex-m0.small-multiply): Likewise.
12802 (cortex-m0plus.small-multiply): Likewise.
12803 (cortex-m1.small-multiply): Likewise.
12805 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12806 Jakub Jelinek <jakub@redhat.com>
12808 PR tree-optimization/85692
12809 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12810 source permute as well.
12812 2018-05-11 Martin Liska <mliska@suse.cz>
12815 * doc/extend.texi: Document LLVM style format for no_sanitize
12818 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12820 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12821 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12822 (mode_supports_vsx_dform_quad): Likewise.
12823 (mode_supports_vmx_dform): Move these functions to be next to the
12824 other mode_supports functions.
12825 (mode_supports_dq_form): Likewise.
12826 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12827 mode_supports_dq_form.
12828 (reg_offset_addressing_ok_p): Likewise.
12829 (offsettable_ok_by_alignment): Likewise.
12830 (rs6000_legitimate_offset_address_p): Likewise.
12831 (legitimate_lo_sum_address_p): Likewise.
12832 (rs6000_legitimize_address): Likewise.
12833 (rs6000_legitimize_reload_address): Likewise.
12834 (rs6000_secondary_reload_inner): Likewise.
12835 (rs6000_preferred_reload_class): Likewise.
12836 (rs6000_output_move_128bit): Likewise.
12838 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12840 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12841 Generate SImode target register for null target.
12842 <case IX86_BUILTIN_XGETBV>: Ditto.
12843 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12844 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12846 2018-05-10 Carl Love <cel@us.ibm.com>
12848 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12849 dcbtt and dcbtstt if operands[2] is 0.
12851 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12854 * config/i386/sse.md (usadv64qi): New expander.
12856 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12858 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12859 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12860 -maltivec=be support.
12861 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12862 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12863 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12864 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12865 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12866 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12867 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12868 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12869 altivec_vsumsws): Adjust.
12870 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12871 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12872 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12874 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12875 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12876 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12877 (altivec_lve<VI_char>x): Delete expand.
12878 (*altivec_lve<VI_char>x_internal): Rename to...
12879 (altivec_lve<VI_char>x): ... this.
12880 (altivec_lvxl_<mode>): Delete expand.
12881 (*altivec_lvxl_<mode>_internal): Rename to ...
12882 (altivec_lvxl_<mode>): ... this.
12883 (altivec_stvxl_<mode>): Delete expand.
12884 (*altivec_stvxl_<mode>_internal): Rename to ...
12885 (altivec_stvxl_<mode>): ... this.
12886 (altivec_stve<VI_char>x): Delete expand.
12887 (*altivec_stve<VI_char>x_internal): Rename to ...
12888 (altivec_stve<VI_char>x): ... this.
12889 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12890 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12891 reduc_plus_scal_<mode>): Adjust.
12892 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12894 (rs6000_cpu_cpp_builtins): Adjust.
12895 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12896 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12897 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12898 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12899 -maltivec=be support.
12900 (rs6000_split_vec_extract_var): Adjust.
12901 (rs6000_split_v4si_init): Adjust.
12902 (swap_selector_for_mode): Delete.
12903 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12904 altivec_expand_stvex_be): Delete.
12905 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12906 -maltivec=be support.
12907 (rs6000_gimple_fold_builtin): Ditto.
12908 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12910 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12911 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12912 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12913 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12914 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12915 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12916 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12917 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12918 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12919 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12920 anonymous split): Adjust.
12921 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12922 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12924 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12926 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12927 when --with-gxx-include-dir is also specified.
12928 * configure: Regenerate.
12930 2018-05-09 Jim Wilson <jimw@sifive.com>
12933 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12934 * config/riscv/t-withmultilib: New.
12935 * config/riscv/withmultilib.h: New.
12936 * doc/install.texi: Document RISC-V --with-multilib-list support.
12938 2018-05-09 Richard Biener <rguenther@suse.de>
12940 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12942 (vect_bb_vectorization_profitable_p): Adjust. Compute
12943 actual scalar cost using the cost vector and the add_stmt_cost
12946 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12948 PR rtl-optimization/85645
12949 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12950 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12952 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12954 PR rtl-optimization/85645
12955 * shrink-wrap.c (spread_components): Return a boolean saying if
12956 anything was changed.
12957 (try_shrink_wrapping_separate): Iterate spread_components until
12958 nothing changes anymore.
12960 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12962 PR rtl-optimization/85645
12963 * regrename.c (build_def_use): Also kill the chains that include the
12964 destination of a REG_CFA_REGISTER note.
12966 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12968 PR rtl-optimization/85645
12969 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12970 insn that has a REG_CFA_REGISTER note.
12972 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12974 * cfgexpand.c (expand_clobber): New function.
12975 (expand_gimple_stmt_1): Use it.
12976 * tree-vect-stmts.c (vect_clobber_variable): New function,
12978 (vectorizable_simd_clone_call): ...here.
12979 (vectorizable_store): Emit a clobber either side of an
12980 IFN_STORE_LANES sequence.
12981 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12983 2018-05-09 Tom de Vries <tom@codesourcery.com>
12986 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12987 (define_insn "trap_if_false"): Add exit after trap.
12989 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12991 PR rtl-optimization/85638
12992 * bb-reorder.c: Include common/common-target.h.
12993 (create_forwarder_block): New function extracted from...
12994 (fix_up_crossing_landing_pad): ...here. Rename into...
12995 (dw2_fix_up_crossing_landing_pad): ...this.
12996 (sjlj_fix_up_crossing_landing_pad): New function.
12997 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12998 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12999 from both partitions and exit the loop after one iteration.
13001 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13004 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13006 (Basic PowerPC Built-in Functions): The new name of the
13007 subsection previously known as "PowerPC Built-in Functions".
13008 (Basic PowerPC Built-in Functions Available on all Configurations):
13010 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13012 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13014 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13016 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13019 2018-05-08 Jim Wilson <jimw@sifive.com>
13021 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13022 (LD_EMUL_SUFFIX): New.
13023 (LINK_SPEC): Use it.
13025 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13027 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13029 (Basic PowerPC Built-in Functions): The new name of the
13030 subsection previously known as "PowerPC Built-in Functions".
13031 (Basic PowerPC Built-in Functions Available on all Configurations):
13033 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13035 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13037 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13039 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13042 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13045 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13046 after cmpelim optimization.
13048 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13050 * config.gcc: Support "goldmont".
13051 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13052 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13053 PROCESSOR_GOLDMONT.
13054 * config/i386/i386.c (m_GOLDMONT): Define.
13055 (processor_target_table): Add "goldmont".
13056 (PTA_GOLDMONT): Define.
13057 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13058 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13059 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13060 (fold_builtin_cpu): Add "goldmont".
13061 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13062 (ix86_option_override_internal): Add "goldmont".
13063 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13064 (processor_type): Add PROCESSOR_GOLDMONT.
13065 * config/i386/i386.md: Add CPU "glm".
13066 * config/i386/glm.md: New file.
13067 * config/i386/x86-tune.def: Add m_GOLDMONT.
13068 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13070 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13073 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13075 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13076 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13077 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13080 * config/i386/i386.c (ix86_fold_builtin): Handle
13081 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13084 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13085 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13087 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13090 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13091 (check_arch): Likewise.
13092 (check_fpu): Return the result rather than printing it.
13093 (end arch): Fix operator precedence.
13094 (end cpu): Likewise.
13095 (END): Print the result from check_fpu.
13097 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13098 Alan Hayward <alan.hayward@arm.com>
13099 David Sherwood <david.sherwood@arm.com>
13101 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13102 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13103 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13104 (*fcmuo<mode>_and): New patterns.
13106 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13108 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13109 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13110 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13111 (cmp_op, sve_imm_con): New code attributes.
13112 (SVE_COND_INT_CMP, imm_con): Delete.
13113 (cmp_op): Remove above unspecs from int attribute.
13114 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13116 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13117 comparison-specific unspecs.
13118 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13119 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13120 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13121 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13122 (*vec_fcm<cmp_op><mode>): Rename to...
13123 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13124 (*vec_fcmuo<mode>): Rename to...
13125 (*fcmuo<mode>): ...this and adjust likewise.
13126 (*pred_fcm<cmp_op><mode>): New pattern.
13127 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13128 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13130 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13132 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13133 (aarch64_emit_sve_predicated_cond): New function.
13134 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13135 (aarch64_emit_unspec_cond_or): Replace with...
13136 (aarch64_emit_sve_or_conds): ...this new function. Use
13137 aarch64_emit_sve_ptrue_op for the individual comparisons and
13138 aarch64_emit_binop to OR them together.
13139 (aarch64_emit_inverted_unspec_cond): Replace with...
13140 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13141 aarch64_emit_sve_ptrue_op for the comparison and
13142 aarch64_emit_unop to invert the result.
13143 (aarch64_expand_sve_vec_cmp_float): Update after the above
13144 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13146 2018-05-07 Nathan Sidwell <nathan@acm.org>
13148 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13149 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13150 (Backwards Compatibility): Likewise.
13152 2018-05-07 Luis Machado <luis.machado@linaro.org>
13156 2018-05-07 Luis Machado <luis.machado@linaro.org>
13158 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13159 <prefetch_dynamic_strides>: New const bool field.
13160 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13161 prefetch_dynamic_strides.
13162 (exynosm1_prefetch_tune): Likewise.
13163 (thunderxt88_prefetch_tune): Likewise.
13164 (thunderx_prefetch_tune): Likewise.
13165 (thunderx2t99_prefetch_tune): Likewise.
13166 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13168 (aarch64_override_options_internal): Update to set
13169 PARAM_PREFETCH_DYNAMIC_STRIDES.
13170 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13171 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13172 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13173 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13174 prefetch-dynamic-strides setting.
13176 2018-05-07 Luis Machado <luis.machado@linaro.org>
13178 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13179 <minimum_stride>: New const int field.
13180 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13181 minimum_stride field.
13182 (exynosm1_prefetch_tune): Likewise.
13183 (thunderxt88_prefetch_tune): Likewise.
13184 (thunderx_prefetch_tune): Likewise.
13185 (thunderx2t99_prefetch_tune): Likewise.
13186 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13187 (aarch64_override_options_internal): Update to set
13188 PARAM_PREFETCH_MINIMUM_STRIDE.
13189 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13190 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13191 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13192 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13193 stride is constant and is below the minimum stride threshold.
13195 2018-05-07 Luis Machado <luis.machado@linaro.org>
13197 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13200 2018-05-07 Luis Machado <luis.machado@linaro.org>
13202 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13203 <prefetch_dynamic_strides>: New const bool field.
13204 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13205 prefetch_dynamic_strides.
13206 (exynosm1_prefetch_tune): Likewise.
13207 (thunderxt88_prefetch_tune): Likewise.
13208 (thunderx_prefetch_tune): Likewise.
13209 (thunderx2t99_prefetch_tune): Likewise.
13210 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13212 (aarch64_override_options_internal): Update to set
13213 PARAM_PREFETCH_DYNAMIC_STRIDES.
13214 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13215 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13216 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13217 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13218 prefetch-dynamic-strides setting.
13220 2018-05-07 Luis Machado <luis.machado@linaro.org>
13222 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13223 <minimum_stride>: New const int field.
13224 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13225 minimum_stride field.
13226 (exynosm1_prefetch_tune): Likewise.
13227 (thunderxt88_prefetch_tune): Likewise.
13228 (thunderx_prefetch_tune): Likewise.
13229 (thunderx2t99_prefetch_tune): Likewise.
13230 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13231 (aarch64_override_options_internal): Update to set
13232 PARAM_PREFETCH_MINIMUM_STRIDE.
13233 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13234 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13235 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13236 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13237 stride is constant and is below the minimum stride threshold.
13239 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13242 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13243 the type is addressable. Don't force op into register if it has
13246 2018-05-05 Roland McGrath <mcgrathr@google.com>
13249 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13250 any section for which we don't know a specific type it should have,
13251 regardless of name. Previously this was done only for the exact
13252 names ".init_array", ".fini_array", and ".preinit_array".
13253 (default_elf_asm_named_section): Add comment about
13254 relationship with default_section_type_flags and SECTION_NOTYPE.
13255 (get_section): Don't consider it a type conflict if one side has
13256 SECTION_NOTYPE and the other doesn't, as long as neither has the
13257 SECTION_BSS et al used in the default_section_type_flags logic.
13259 2018-05-05 Tom de Vries <tom@codesourcery.com>
13262 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13263 (workaround_barsyncs): New function.
13264 (nvptx_reorg): Use workaround_barsyncs.
13265 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13266 (define_expand "nvptx_membar_cta"): New define_expand.
13267 (define_insn "*nvptx_membar_cta"): New insn.
13269 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13271 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13272 To improve optimization opportunities.
13273 * builtin-types.def: The new needed builtin types for the above.
13275 2018-05-04 Richard Biener <rguenther@suse.de>
13277 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13278 * gimple-ssa-store-merging.c
13279 (imm_store_chain_info::output_merged_store): Remove redundant create,
13280 release split_store vector contents on failure.
13281 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13282 scalar stmt vector on cache hit.
13284 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13286 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13288 * config.gcc (powerpc-xilinx-eabi*): Remove.
13289 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13291 (fusion_addis_mem_combo_load): Ditto.
13292 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13294 (rs6000_cpu_cpp_builtins): Ditto.
13295 * config/rs6000/rs6000-linux.c
13296 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13297 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13298 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13300 (rs6000_setup_reg_addr_masks): Ditto.
13301 (rs6000_init_hard_regno_mode_ok): Ditto.
13302 (rs6000_option_override_internal): Ditto.
13303 (legitimate_lo_sum_address_p): Ditto.
13304 (rs6000_legitimize_address): Ditto.
13305 (rs6000_legitimize_reload_address): Ditto.
13306 (rs6000_legitimate_address_p): Ditto.
13307 (abi_v4_pass_in_fpr): Ditto.
13308 (setup_incoming_varargs): Ditto.
13309 (rs6000_gimplify_va_arg): Ditto.
13310 (rs6000_split_multireg_move): Ditto.
13311 (rs6000_savres_strategy): Ditto.
13312 (rs6000_emit_prologue_components): Ditto.
13313 (rs6000_emit_epilogue_components): Ditto.
13314 (rs6000_emit_prologue): Ditto.
13315 (rs6000_emit_epilogue): Ditto.
13316 (rs6000_elf_file_end): Ditto.
13317 (rs6000_function_value): Ditto.
13318 (rs6000_libcall_value): Ditto.
13319 * config/rs6000/rs6000.h: Ditto.
13320 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13321 (TARGET_MINMAX): ... this. New.
13322 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13323 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13324 (*movsi_internal1_single): Delete.
13325 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13326 mfpu=, mxilinx-fpu): Delete.
13327 * config/rs6000/singlefp.h: Delete.
13328 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13329 * config/rs6000/t-rs6000: Ditto.
13330 * config/rs6000/t-xilinx: Delete.
13331 * config/rs6000/titan.md: Adjust for fp_type removal.
13332 * config/rs6000/vsx.md: Remove Xilinx FP support.
13333 (VStype_simple): Delete.
13334 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13335 * config/rs6000/xfpu.h: Delete.
13336 * config/rs6000/xfpu.md: Delete.
13337 * config/rs6000/xilinx.h: Delete.
13338 * config/rs6000/xilinx.opt: Delete.
13339 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13340 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13342 2018-05-04 Tom de Vries <tom@codesourcery.com>
13345 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13348 2018-05-04 Richard Biener <rguenther@suse.de>
13350 PR middle-end/85627
13351 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13352 (expand_complex_div_wide): Likewise.
13353 (expand_complex_operations_1): Likewise.
13354 (expand_complex_libcall): Preserve EH info of the original stmt.
13355 (tree_lower_complex): Handle removed blocks.
13356 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13357 on complex multiplication and division libcall builtins.
13359 2018-05-04 Richard Biener <rguenther@suse.de>
13361 PR middle-end/85574
13362 * fold-const.c (negate_expr_p): Restrict negation of operand
13363 zero of a division to when we know that can happen without
13365 (fold_negate_expr_1): Likewise.
13367 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13370 * real.h (real_nextafter): Declare.
13371 * real.c (real_nextafter): New function.
13372 * fold-const-call.c (fold_const_nextafter): New function.
13373 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13374 CASE_CFN_NEXTTOWARD.
13375 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13376 even when arg1_mode is different from arg0_mode.
13378 2018-05-03 Nathan Sidwell <nathan@acm.org>
13380 * doc/extend.texi (Deprecated Features): Remove
13381 -ffriend-injection.
13382 (Backwards Compatibility): Likewise.
13383 * doc/invoke.texi (C++ Language Options): Likewise.
13384 (C++ Dialect Options): Likewise.
13386 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13389 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13390 _mm512_mask_mullox_epi64): New intrinsics.
13392 2018-05-03 Tom de Vries <tom@codesourcery.com>
13395 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13396 dump files): Add offload-tree.
13398 2018-05-03 Richard Biener <rguenther@suse.de>
13400 PR tree-optimization/85615
13401 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13402 to loops not nested in BBs loop father to avoid creating multi-entry
13405 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13407 PR tree-optimization/70291
13408 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13409 arguments. Change return type to tree. Emit libcall as a new
13410 statement rather than replacing existing one when inplace_p is true.
13411 (expand_complex_multiplication_components): New function.
13412 (expand_complex_multiplication): Expand floating-point complex
13413 multiplication using the above.
13414 (expand_complex_division): Rename inner_type parameter to type.
13415 Update expand_complex_libcall call-site.
13416 (expand_complex_operations_1): Update expand_complex_multiplication
13417 and expand_complex_division call-sites.
13419 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13422 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13423 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13424 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13425 the highest significant bit of the shift count mask is clear. In
13426 check whether and[sq]i3 is needed verify that all significant bits
13427 of the shift count other than the highest are set.
13429 2018-05-02 Tom de Vries <tom@codesourcery.com>
13432 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13433 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13434 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13435 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13436 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13437 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13438 __builtin_goacc_parlevel_size.
13440 2018-05-02 Richard Biener <rguenther@suse.de>
13442 PR tree-optimization/85597
13443 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13444 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13447 2018-05-02 Tom de Vries <tom@codesourcery.com>
13450 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13451 dump files): Add ltrans-tree.
13453 2018-05-02 Tom de Vries <tom@codesourcery.com>
13456 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13457 dump files): Add wpa-ipa.
13459 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13461 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13462 powerpc*-*-linux*paired* target.
13463 * config/rs6000/750cl.h: Delete.
13464 * config/rs6000/paired.h: Delete.
13465 * config/rs6000/paired.md: Delete.
13466 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13468 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13469 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13470 comment. Remove paired float support.
13471 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13472 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13474 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13475 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13477 * config/rs6000/rs6000.c: Remove paired float support.
13478 (paired_expand_vector_init, paired_expand_vector_move,
13479 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13480 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13481 paired_expand_builtin, paired_expand_predicate_builtin,
13482 paired_init_builtins): Delete.
13483 * config/rs6000/rs6000.h: Remove paired float support.
13484 * config/rs6000/rs6000.md: Remove paired float support.
13485 (move_from_CR_ov_bit): Delete.
13486 * config/rs6000/rs6000.opt (mpaired): Delete.
13487 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13488 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13490 2018-05-02 Richard Biener <rguenther@suse.de>
13492 PR middle-end/85567
13493 * gimplify.c (gimplify_save_expr): When in SSA form allow
13494 SAVE_EXPRs to compute to SSA vars.
13496 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13499 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13500 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13501 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13502 clobber operands[2], instead use a new pseudo. Formatting fixes.
13504 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13506 PR tree-optimization/85586
13507 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13508 exit early for statements in the same group if the accesses are
13511 2018-05-02 Tom de Vries <tom@codesourcery.com>
13514 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13517 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13519 PR tree-optimization/85143
13520 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13522 2018-05-01 Tom de Vries <tom@codesourcery.com>
13525 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13526 not found" error message.
13528 2018-05-01 Tom de Vries <tom@codesourcery.com>
13531 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13532 * vec.c (test_ordered_remove_if): New function.
13533 (vec_c_tests): Call test_ordered_remove_if.
13534 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13535 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13536 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13537 VEC_ORDERED_REMOVE_IF.
13539 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13541 PR tree-optimization/82665
13542 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13543 pointer subtraction where arguments come from a memchr call.
13545 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13547 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13548 --push-state --as-needed and --pop-state instead of --as-needed and
13549 --no-as-needed if ld supports it.
13550 * configure: Regenerated.
13553 * doc/install.texi2html: Replace _002d with - and _002a with * in
13554 generated html files using sed.
13556 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13559 * gcc-rich-location.c (blank_line_before_p): New function.
13560 (use_new_line): New function.
13561 (gcc_rich_location::add_fixit_insert_formatted): New function.
13562 * gcc-rich-location.h
13563 (gcc_rich_location::add_fixit_insert_formatted): New function.
13565 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13567 * selftest.c (assert_streq): Rename "expected" and "actual" to
13568 "val1" and "val2". Extend NULL-handling to cover both inputs
13569 symmetrically, while still requiring both to be non-NULL for a pass.
13570 * selftest.h (assert_streq): Rename "expected" and "actual" to
13572 (ASSERT_EQ): Likewise.
13573 (ASSERT_EQ_AT): Likewise.
13574 (ASSERT_KNOWN_EQ): Likewise.
13575 (ASSERT_KNOWN_EQ_AT): Likewise.
13576 (ASSERT_NE): Likewise.
13577 (ASSERT_MAYBE_NE): Likewise.
13578 (ASSERT_MAYBE_NE_AT): Likewise.
13579 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13580 the assertion to pass.
13581 (ASSERT_STREQ_AT): Likewise.
13583 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13585 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13586 interaction with -pie.
13588 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13590 * selftest.h: Fix alphabetization of per-source-file selftest
13593 2018-04-30 Jason Merrill <jason@redhat.com>
13595 PR c++/61982 - dead stores to destroyed objects.
13596 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13599 2018-04-30 Jason Merrill <jason@redhat.com>
13601 * tree.c (build_clobber): New.
13602 * tree.h: Declare it.
13603 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13605 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13607 * diagnostic-show-locus.c (layout::layout): Update for
13608 location_get_source_line returning a char_span.
13609 (struct char_span): Move to input.h.
13610 (struct correction): Update for fields in char_span becoming
13612 (struct source_line): Update for location_get_source_line
13613 returning a char_span.
13614 (layout::print_line): Likewise.
13615 * edit-context.c (edited_file::print_content): Likewise.
13616 (edited_file::print_diff_hunk): Likewise.
13617 (edited_file::print_run_of_changed_lines): Likewise.
13618 (edited_file::get_num_lines): Likewise.
13619 (edited_line::edited_line): Likewise.
13620 * final.c (asm_show_source): Likewise.
13621 * input.c (location_get_source_line): Convert return type
13622 from const char * to char_span, losing the final "line_len"
13624 (dump_location_info): Update for the above.
13625 (get_substring_ranges_for_loc): Likewise. Use a char_span
13626 when handling the literal within the line.
13627 (test_reading_source_line): Update for location_get_source_line
13628 returning a char_span.
13629 * input.h (class char_span): Move here from
13630 diagnostic-show-locus.c, converting from a struct to a class.
13631 Make data members private.
13632 (char_span::operator bool): New.
13633 (char_span::length): New.
13634 (char_span::get_buffer): New.
13635 (char_span::operator[]): New.
13636 (char_span::subspan): Make const.
13637 (char_span::xstrdup): New.
13638 (location_get_source_line): Convert return type from const char *
13639 to char_span, losing the final "line_size" param.
13641 2018-04-30 Jan Hubicka <jh@suse.cz>
13643 * lto-wrapper.c (ltrans_priorities): New static var.
13644 (cmp_priority): New.
13645 (run_gcc): Read priorities and if doing parallel build order
13646 the Makefile by them.
13648 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13650 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13652 2018-04-30 Richard Biener <rguenther@suse.de>
13654 * tree-cfg.c (verify_address): Remove base argument, add
13655 flag whether to check TREE_ADDRESSABLE and do that.
13656 (verify_expr): Remove.
13657 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13658 (verify_gimple_assign_single): Likewise.
13659 (verify_gimple_switch): Likewise.
13660 (verify_expr_location_1): Dereference tp once. Add (disabled)
13661 piece from verify_expr.
13662 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13664 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13666 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13668 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13670 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13671 (small_data_pattern): Likewise.
13672 (arc_rewrite_small_data): Likewise.
13673 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13674 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13675 (get_symbol_alignment): New function.
13676 (legitimate_small_data_address_p): Likewise.
13677 (legitimate_scaled_address): Update, call
13678 legitimate_small_data_address_p.
13679 (output_sdata): New static variable.
13680 (arc_print_operand): Update how we handle small data operands.
13681 (arc_print_operand_address): Likewise.
13682 (arc_legitimate_address_p): Update, use
13683 legitimate_small_data_address_p.
13684 (arc_rewrite_small_data_p): Remove.
13685 (arc_rewrite_small_data_1): Likewise.
13686 (arc_rewrite_small_data): Likewise.
13687 (small_data_pattern): Likewise.
13688 (compact_sda_memory_operand): Update to use
13689 legitimate_small_data_address_p and get_symbol_alignment.
13690 (prepare_move_operands): Don't rewite sdata pattern.
13691 (prepare_extend_operands): Remove.
13692 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13694 (zero_extendqisi2): Likewise.
13695 (zero_extendhisi2): Likewise.
13696 (extendqihi2): Likewise.
13697 (extendqisi2): Likewise.
13698 (extendhisi2): Likewise.
13699 (addsi3): Likewise.
13700 (subsi3): Likewise.
13701 (andsi3): Likewise.
13702 * config/arc/constraints.md (Usd): Change it to memory constraint.
13704 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13706 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13707 as source of std instructions.
13708 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13709 allow 6-bit constants as source for store instructions.
13710 (movdi_insn): Update instruction pattern to allow 6-bit constants
13711 as source for store instructions.
13713 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13715 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13717 2018-04-30 Nathan Sidwell <nathan@acm.org>
13718 Sandra Loosemore <sandra@codesourcery.com>
13720 * dumpfile.c (dump_open): Allow '-' for stdout.
13721 * doc/invoke.texi (Developer Options): Document dump filename
13722 determination early. Document stdin/stdout selection.
13724 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13726 Microblaze Target: PIC data text relative
13728 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13729 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13731 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13732 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13733 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13734 New addressing mode for data-text relative position indepenedent code.
13735 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13736 'ADDRESS_SYMBOLIC_TXT_REL'.
13737 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13738 (microblaze_legitimate_pic_operand): Exclude function calls from
13739 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13740 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13742 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13743 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13744 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13745 for 'address + offset'.
13746 (microblaze_expand_prologue): Add new function prologue call for
13748 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13749 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13750 table in case of TARGET_PIC_DATA_TEXT_REL.
13751 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13752 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13753 Add new macros 'UNSPEC_TEXT',
13754 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13755 + exclude function calls from 'UNSPEC_PLT' in case of data text
13757 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13758 new target hook for generating address diff vector tables in case of
13760 * doc/tm.texi : Regenerate.
13761 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13762 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13763 of addr diff vector generation.
13764 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13765 target hook definition.
13766 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13767 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13768 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13769 option for data text relative.
13771 2018-04-30 Richard Biener <rguenther@suse.de>
13773 * tree-chrec.h (evolution_function_is_constant_p): Remove
13775 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13777 2018-04-30 Richard Biener <rguenther@suse.de>
13780 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13782 2018-04-30 Richard Biener <rguenther@suse.de>
13784 PR tree-optimization/28364
13785 PR tree-optimization/85275
13786 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13787 copying first exit test.
13789 2018-04-28 Mark Wielaard <mark@klomp.org>
13791 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13792 dwarf_version >= 5.
13793 (dwarf_AT): Handle DW_AT_addr_base.
13794 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13796 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13799 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13800 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13801 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13802 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13804 2018-04-28 Richard Biener <rguenther@suse.de>
13806 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13807 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13808 to reflect use. Only add interesting stmts.
13810 2018-04-27 Martin Jambor <mjambor@suse.cz>
13813 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13814 the jump function allows for passing through aggregate values.
13816 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13818 * input.h (in_system_header_at): Convert from macro to inline
13820 (from_macro_expansion_at): Likewise.
13821 (from_macro_definition_at): Likewise.
13823 2018-04-27 Jeff Law <law@redhat.com>
13825 * config.gcc: Mark tile* targets as deprecated/obsolete.
13827 2018-04-27 Richard Biener <rguenther@suse.de>
13829 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13832 2018-04-27 Richard Biener <rguenther@suse.de>
13834 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13836 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13838 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13839 with Yd constraint. Set "preferred_for_speed" attribute from
13840 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13841 with Yd constraint.
13842 (*movdi_internal): Ditto.
13843 (movti_interunit splitters): Remove
13844 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13845 (movdi_interunit splitters): Ditto.
13846 * config/i386/constraints.md (Ye): Remove.
13847 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13849 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13852 * config/aarch64/constraints.md (Usg): Limit to 31.
13853 (Usj): Limit to 63.
13855 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13857 PR tree-optimization/85529
13858 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13859 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13860 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13861 zero extension or masking of the MSB bit.
13862 (optimize_range_tests): Add FIRST_BB argument, pass it through
13863 to optimize_range_tests_var_bound.
13864 (maybe_optimize_range_tests, reassociate_bb): Adjust
13865 optimize_range_tests callers.
13867 2018-04-26 Richard Biener <rguenther@suse.de>
13868 Jakub Jelinek <jakub@redhat.com>
13870 * cgraph.h (symbol_table): Just declare debug method here.
13871 * symtab.c (symbol_table::debug): Define.
13873 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13875 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13877 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13879 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13880 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13881 (*movdi_internal): Substitute Yi and Yj constraint with x
13882 and Ym and Yn constraint with y constraint. Update "isa"
13883 attribute and set "preferred_for_speed" attribute from
13884 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13885 (*movsi_internal): Ditto.
13886 (*movdf_internal): Ditto.
13887 (*movsf_internal): Ditto.
13888 (*zero_extendsidi2): Ditto.
13889 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13890 (sse2_loadld): Ditto.
13891 (*vec_extract<ssevecmodelower>_0): Ditto.
13892 (*vec_extractv4si_0_zext_sse4): Ditto.
13893 (vec_concatv2di): Ditto.
13894 (*vec_dup<mode>): Ditto.
13895 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13896 * config/i386/constraints.md (Yi): Remove.
13901 2018-04-26 Nathan Sidwell <nathan@acm.org>
13903 * dumpfile.c (dump_open): New.
13904 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13905 (dump_finish): Detect stdio/stderr by value not name.
13907 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13909 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13911 2018-04-26 Tom de Vries <tom@codesourcery.com>
13914 * config/nvptx/nvptx.c (verify_neutering_jumps)
13915 (verify_neutering_labels): New function
13916 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13918 2018-04-26 Tom de Vries <tom@codesourcery.com>
13921 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13922 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13925 2018-04-26 Richard Biener <rguenther@suse.de>
13926 Tom de Vries <tom@codesourcery.com>
13929 * lto-streamer-out.c (output_function): Fixup loops if required to match
13930 discovery done in the reader.
13932 2018-04-26 Richard Biener <rguenther@suse.de>
13934 PR tree-optimization/85116
13935 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13936 have a loop exit from the single latch predecessor. Remove
13937 case of header with just condition.
13938 (ch_base::copy_headers): Exclude infinite loops from any
13940 (pass_ch::execute): Record exits.
13942 2018-04-26 Richard Biener <rguenther@suse.de>
13944 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13945 prologue cost vector and pass it to vect_get_load_cost.
13946 (vect_get_peeling_costs_all_drs): Likewise.
13947 (vect_peeling_hash_get_lowest_cost): Likewise.
13948 (vect_enhance_data_refs_alignment): Likewise.
13950 2018-04-26 Richard Biener <rguenther@suse.de>
13952 PR middle-end/85450
13953 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13954 checking of integer<->pointer conversions.
13955 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13956 sign-/zero-extending pointer types.
13957 (expand_omp_for_static_chunk): Likewise.
13959 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13960 Jean Lee <xiaoyur347@gmail.com>
13962 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13963 (TARGET_ASAN_SHADOW_OFFSET): Define.
13964 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13965 true for -fsanitize=address.
13967 2018-04-25 Mark Wielaard <mark@klomp.org>
13969 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13972 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13974 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13975 than "alu", remove explicit "memory" and "imm_disp" attributes.
13976 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13978 PR middle-end/85414
13979 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13980 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13981 gen_lowpart_no_emit.
13983 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13986 * config/i386/i386.c (ix86_expand_builtin): Change memory
13987 operand to XI, extend p0 to Pmode.
13988 * config/i386/i386.md: Change unspec volatile and operand
13989 1 mode to XI, change operand 0 mode to P.
13991 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13993 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13994 GET_MODE_MASK before any checking.
13995 (nds32_can_use_bset_p): Likewise.
13996 (nds32_can_use_btgl_p): Likewise.
13998 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14000 * config/nds32/nds32-doubleword.md: New define_split pattern for
14001 illegal register number.
14003 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14005 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14007 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14009 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14011 2018-04-25 Richard Biener <rguenther@suse.de>
14013 * lto-streamer.h (LTO_major_version): Bump to 8.
14015 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14017 * BASE-VER: Set to 9.0.0.
14019 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14021 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14022 in __abskf2 and __powikf2.
14024 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14027 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14028 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14029 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14030 Use the above on operand 2. Reindent.
14031 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14033 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14036 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14038 * config/i386/i386.opt (mcet): Removed.
14039 * doc/install.texi: Remove -mcet documentation.
14040 * doc/invoke.texi: Likewise.
14042 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14045 * doc/install.texi: Remove -mcet from bootstrap-cet.
14047 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14050 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14051 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14055 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14056 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14057 containing a CONST_VECTOR.
14059 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14061 * doc/install.texi: Update newlib dependency for nvptx.
14063 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14066 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14067 instead of INTVAL when shifting x left.
14069 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14071 PR tree-optimization/85478
14072 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14073 vect_grouped_store_supported for single element vectors.
14075 2018-04-24 Richard Biener <rguenther@suse.de>
14078 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14079 load cost increase to the case of non-constant step.
14081 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14084 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14085 destination if any_malformed_asm.
14087 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14089 PR middle-end/85496
14090 * expr.c (store_field): In the bitfield case, if the value comes from
14091 a function call and is returned in registers by means of a PARALLEL,
14092 do not change the mode of the temporary unless BLKmode and VOIDmode.
14094 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14096 PR rtl-optimization/85423
14097 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14098 dependencies to debug insns when the previous insn is non-debug.
14100 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14102 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14103 enums into a single definition.
14104 (fls): Fix predicates and printing.
14107 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14109 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14110 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14111 and short u6 immediate.
14112 (check_if_valid_sleep_operand): Remove.
14113 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14115 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14117 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14118 flag_always_save_lp condition.
14119 * config/nds32/nds32.opt (malways-save-lp): New option.
14121 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14123 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14124 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14125 * config/nds32/nds32.h
14126 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14127 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14129 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14131 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14132 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14134 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14135 Chung-Ju Wu <jasonwucj@gmail.com>
14137 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14139 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14140 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14142 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14144 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14146 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14148 * config/nds32/nds32-protos.h (nds32_data_alignment,
14149 nds32_local_alignment): Declare.
14150 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14151 nds32_local_alignment): New functions.
14152 (TARGET_CONSTANT_ALIGNMENT): Define.
14153 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14155 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14157 * config/nds32/nds32.c
14158 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14159 (TARGET_MODES_TIEABLE_P): Likewise.
14161 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14163 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14164 level Ofast and Og.
14166 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14167 Chung-Ju Wu <jasonwucj@gmail.com>
14169 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14170 for unaligned access.
14171 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14173 * config/nds32/nds32-intrinsic.md: Likewise.
14174 * config/nds32/nds32_intrinsic.h: Likewise.
14175 * config/nds32/nds32.h (nds32_builtins): Likewise.
14176 * config/nds32/nds32.opt (munaligned-access): New option.
14177 * config/nds32/nds32.c (nds32_asm_file_start): Display
14178 flag_unaligned_access status.
14180 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14182 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14183 -mno-relax is present.
14184 * config/riscv/linux.h (LINK_SPEC): Ditto.
14186 2018-04-20 Martin Sebor <msebor@redhat.com>
14189 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14191 (gimple_fold_builtin_stxcpy_chk): Same.
14192 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14194 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14197 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14198 __powikf2 when long double is IEEE 128-bit.
14200 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14202 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14203 step to make sure stack always aligned.
14205 2018-04-20 Carl Love <cel@us.ibm.com>
14208 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14209 size check for arg0.
14211 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14212 Tom de Vries <tom@codesourcery.com>
14215 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14216 Emit insns for calls too.
14217 (nvptx_find_par): Always look for worker-level predecessor insn.
14218 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14220 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14221 (nvptx_process_pars): Propagate frames for calls.
14223 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14226 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14228 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14229 (ix86_handle_option): Don't handle OPT_mibt.
14230 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14232 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14234 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14235 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14236 (ix86_target_macros): Define __CET__ with flag_cf_protection
14237 for -fcf-protection.
14238 * config/i386/i386.c (isa2_opts): Remove -mibt.
14239 * config/i386/i386.h (TARGET_IBT): Removed.
14240 (TARGET_IBT_P): Likewise.
14241 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14242 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14243 * config/i386/i386.opt (mcet): Update help message.
14244 (mshstk): Likewise.
14246 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14247 -mcet as an alias for -mshstk.
14249 2018-04-20 Richard Biener <rguenther@suse.de>
14251 PR middle-end/85475
14252 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14253 complexity by forcing a single use of the multiply operand.
14255 2018-04-20 Martin Jambor <mjambor@suse.cz>
14258 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14259 recursion dependency to only apply to non-clones.
14261 2018-04-20 Martin Jambor <mjambor@suse.cz>
14264 * ipa-cp.c (create_specialized_node): Check that clones of
14265 self-recursive edges exist during IPA-CP.
14267 2018-04-19 Toon Moene <toon@moene.org>
14269 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14272 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14274 PR tree-optimization/85467
14275 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14276 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14277 VECTOR_CST element to type.
14279 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14282 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14283 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14284 (builtin_longjmp): Likewise.
14285 (save_stack_nonlocal): New pattern.
14286 (restore_stack_nonlocal): Likewise.
14288 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14291 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14292 Replace ASM_OUTPUT_LABEL with fprintf.
14294 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14297 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14298 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14299 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14300 define __IBT__ and __SHSTK__ for -fcf-protection.
14301 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14303 (ix86_trampoline_init): Likewise.
14304 (x86_output_mi_thunk): Likewise.
14305 (ix86_notrack_prefixed_insn_p): Likewise.
14306 (ix86_option_override_internal): Don't disallow -fcf-protection.
14307 * config/i386/i386.md (rdssp<mode>): Also enable for
14309 (incssp<mode>): Likewise.
14310 (nop_endbr): Likewise.
14311 * config/i386/i386.opt (mcet): Change help message to built-in
14314 (mshstk): Likewise.
14315 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14316 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14317 enable CET built-in functions.
14319 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14321 * common/config/i386/i386-common.c
14322 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14323 OPTION_MASK_ISA_MOVDIRI_UNSET,
14324 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14325 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14326 * config.gcc (movdirintrin.h): New header.
14327 * config/i386/cpuid.h (bit_MOVDIRI,
14328 bit_MOVDIR64B): New bits.
14329 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14331 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14332 (VOID, PVOID, PCVOID)): New function types.
14333 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14334 __builtin_ia32_directstoreu_u64,
14335 __builtin_ia32_movdir64b): New builtins.
14336 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14337 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14339 (ix86_valid_target_attribute_inner_p): Ditto.
14340 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14341 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14342 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14343 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14344 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14345 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14346 (movdiri<mode>, movdir64b_<mode>): New.
14347 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14348 * config/i386/immintrin.h: Include movdirintrin.h.
14349 * config/i386/movdirintrin.h: New file.
14350 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14352 2018-04-19 Richard Biener <rguenther@suse.de>
14354 PR middle-end/85455
14355 * cfg.c (clear_bb_flags): When loop state says we have
14356 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14358 2018-04-19 Richard Biener <rguenther@suse.de>
14360 PR tree-optimization/84737
14361 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14362 copying restrict info.
14363 (vect_setup_realignment): Use it.
14364 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14365 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14366 the first DR to all generated stores.
14367 (vectorizable_load): Likewise for loads.
14369 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14371 PR tree-optimization/85446
14372 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14373 the integral and pointer types to have the same precision.
14375 * doc/install.texi: Document --disable-cet being the default and
14378 2018-04-18 Martin Liska <mliska@suse.cz>
14380 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14383 2018-04-18 Martin Liska <mliska@suse.cz>
14386 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14389 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14390 arguments if they are comparable.
14392 2018-04-18 Martin Liska <mliska@suse.cz>
14395 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14398 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14401 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14404 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14405 ENDBR after calling __morestack.
14407 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14410 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14411 by using gcc_base_ver to generate a gcc_driver_version, and use
14412 it when generating GCC_DRIVER_NAME.
14413 * configure: Regenerate.
14415 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14418 * config.gcc: Obsolete powerpc*-*-*spe*.
14420 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14423 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14424 (stabstr_D): Change type of unum from unsigned int to
14425 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14428 2018-04-17 Jim Wilson <jimw@sifive.com>
14431 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14432 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14433 Set arg_pointer_offset after using pretend_args_size.
14435 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14437 PR rtl-optimization/85431
14438 * dse.c (record_store): Ignore zero width stores.
14441 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14442 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14443 __builtin_stack_restore rather than after it.
14444 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14445 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14446 argument instead of virtual_dynamic_stack_rtx.
14448 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14450 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14452 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14453 Add note to error message to explain internal mapping of overloaded
14454 built-in function name to non-overloaded built-in function name.
14455 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14458 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14461 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14462 where the inputs overlap with the output.
14464 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14466 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14467 (=v, v) alternative and explicit "memory" attribute.
14468 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14469 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14471 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14472 "sselog1" type instead of "sselog".
14473 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14474 "sselog". Remove explicit "memory" attribute.
14475 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14476 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14478 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14479 "sselog1" type instead of "sselog". Remove explicit "memory"
14481 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14482 use "sselog1" type instead of "sselog". Remove explicit "memory"
14484 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14485 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14487 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14488 "sselog1" type instead of "sselog". Remove explicit "memory"
14490 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14491 use "sselog1" type instead of "sselog". Remove explicit "memory"
14495 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14497 PR middle-end/85414
14498 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14501 2018-04-17 Martin Jambor <mjambor@suse.cz>
14504 * ipa-cp.c (create_specialized_node): Call
14505 expand_all_artificial_thunks if necessary.
14507 2018-04-17 Martin Liska <mliska@suse.cz>
14510 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14511 in message, remote space in between '_G' and '('.
14513 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14516 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14517 avx512f_vmcmp<mode>3<round_saeonly_name>,
14518 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14519 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14520 avx512f_rndscale<mode><round_saeonly_name>,
14521 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14522 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14523 Use %<iptr>2 instead of %2 for -masm=intel.
14524 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14525 avx512f_vcvttss2usi<round_saeonly_name>,
14526 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14528 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14529 avx512f_vcvttsd2usi<round_saeonly_name>,
14530 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14531 Use %q1 instead of %1 for -masm=intel.
14532 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14533 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14534 of %3 for -masm=intel.
14535 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14537 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14539 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14541 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14542 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14544 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14546 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14547 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14548 %g1 and one with %0 and %1.
14549 (avx512er_vmrcp28<mode><round_saeonly_name>,
14550 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14551 %1 for -masm=intel.
14552 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14553 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14554 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14555 of %0 and %{%4%} for -masm=intel.
14556 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14557 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14558 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14559 order of %0 and %{%5%}%{z%} for -masm=intel.
14561 2018-04-17 Jan Hubicka <jh@suse.cz>
14564 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14566 2018-04-17 Martin Liska <mliska@suse.cz>
14569 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14570 for target_clone error message. Make default implementation
14571 clone to be a local declaration.
14572 (separate_attrs): Add new argument and check for an empty
14574 (expand_target_clones): Handle it.
14575 (ipa_target_clone): Make redirection just for target_clones
14578 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14579 Tom de Vries <tom@codesourcery.com>
14581 PR middle-end/84955
14582 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14583 tiled basic blocks without omp continue statements.
14585 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14588 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14589 vec_extract expression as having side effects to make sure it gets
14592 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14595 * config/i386/i386.c (get_builtin_code_for_version): Check
14598 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14601 * config.gcc: Support "skylake".
14602 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14604 * config/i386/i386.c (m_SKYLAKE): Define.
14605 (processor_target_table): Add "skylake".
14606 (ix86_option_override_internal): Add "skylake".
14607 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14608 PROCESSOR_CANNONLAKE.
14609 (get_builtin_code_for_version): Fix priority for
14610 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14611 PROCESSOR_SKYLAKE-AVX512.
14612 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14613 (processor_type): Add PROCESSOR_SKYLAKE.
14615 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14616 Jason Merrill <jason@redhat.com>
14619 * convert.c (convert_to_integer_1): Use direct recursion for
14620 enumeral types and types with a precision less than the number
14621 of bits in their mode.
14623 2018-04-16 Julia Koval <julia.koval@intel.com>
14626 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14627 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14629 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14632 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14633 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14634 and -mno-direct-move.
14636 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14639 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14640 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14641 Ensure negative shifts result in {0}.
14643 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14645 PR rtl-optimization/79916
14646 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14647 regs (if any) to define how to gnerate SD moves when LRA is in
14650 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14652 PR rtl-optimization/85393
14653 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14654 * except.c (expand_dw2_landing_pad_for_region): Make static.
14655 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14656 a label and unconditional jump to old_bb, rather than
14657 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14660 PR rtl-optimization/85376
14661 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14662 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14663 instead of a specific value.
14665 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14666 Bin Cheng <bin.cheng@arm.com>
14668 PR tree-optimization/82965
14669 PR tree-optimization/83991
14670 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14671 by_profile_only parameter.
14672 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14673 information if the loop was predicted to iterate too many times.
14674 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14676 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14679 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14682 2018-04-13 Martin Liska <mliska@suse.cz>
14683 Jakub Jelinek <jakub@redhat.com>
14685 PR middle-end/81657
14686 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14687 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14688 * builtins.c (expand_builtin_memory_copy_args): Use
14689 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14690 handle dest_addr == pc_rtx.
14692 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14695 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14696 asked to not generate direct moves.
14697 (fix_trunc<mode>si2_stfiwx): Similar.
14698 (fix_trunc<mode>si2_internal): Similar.
14700 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14703 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14704 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14705 lookup if dest in some wider mode is known to be const0_rtx and
14706 if so, record permanent equivalence for it to be ZERO_EXTEND of
14707 the narrower mode destination.
14709 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14711 * lto-streamer-out.c (output_function): Revert 259346.
14712 * omp-expand.c (expand_oacc_for): Likewise.
14714 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14716 PR rtl-optimization/85354
14717 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14718 * sel-sched.c (sel_global_init): ... here.
14720 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14723 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14724 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14725 mode for PE-COFF targets.
14726 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14727 (i386_pe_asm_lto_end): Likewise.
14728 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14729 (TARGET_ASM_LTO_END): Likewise.
14730 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14731 (i386_pe_asm_lto_start): New function.
14732 (i386_pe_asm_lto_end): Likewise.
14734 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14735 Richard Biener <rguenther@suse.de>
14737 PR middle-end/84955
14738 * lto-streamer-out.c (output_function): Fix CFG loop state before
14740 * omp-expand.c (expand_oacc_for): Handle calls to internal
14741 functions like regular functions.
14743 2018-04-12 Richard Biener <rguenther@suse.de>
14746 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14747 for the early LTO debug to properly generate references to it
14748 during DIE emission. Do not re-use that for the skeleton for
14750 (dwarf2out_early_finish): Likewise.
14752 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14755 * config/i386/sse.md
14756 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14757 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14758 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14759 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14760 and output is a reg, avoid creating invalid lowpart subreg, but
14761 instead split into a 512-bit move. Don't split if not AVX512VL,
14762 input is xmm16+ reg and output is a mem.
14763 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14764 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14765 xmm16+ reg and output is a mem.
14767 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14769 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14770 also for flag_dwarf2_cfi_asm.
14772 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14774 PR rtl-optimization/85342
14775 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14776 a bool scalar var inside of the loop instead. Don't try to update
14777 recog_data.operand after failed apply_change_group.
14779 2018-04-12 Tom de Vries <tom@codesourcery.com>
14782 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14783 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14784 array with flexible array member as array without given dimension.
14785 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14786 argument for undefined param to true.
14788 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14791 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14792 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14793 from PowerPC section.
14794 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14795 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14796 help text that is too long.
14797 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14798 help text that is too long.
14799 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14800 help text that is too long.
14802 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14804 * config/alpha/alpha.md (stack_probe_internal): Rename
14805 from "probe_stack". Update all callers.
14807 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14809 PR rtl-optimization/84566
14810 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14811 sched_macro_fuse_insns.
14813 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14816 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14817 (compute_block_dependences): ... from here.
14819 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14821 PR tree-optimization/85331
14822 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14823 from int to HOST_WIDE_INT.
14825 2018-04-11 Martin Jambor <mjambor@suse.cz>
14828 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14829 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14830 not the same as the source val.
14831 (cgraph_edge_brings_value_p): New parameter.
14832 (gather_edges_for_value): Pass destination value to
14833 cgraph_edge_brings_value_p.
14834 (perhaps_add_new_callers): Likewise.
14835 (get_info_about_necessary_edges): Likewise and exclude values brought
14836 only by self-recursive edges.
14837 (create_specialized_node): Redirect only clones of self-calling edges.
14838 (+self_recursive_pass_through_p): New function.
14839 (find_more_scalar_values_for_callers_subset): Use it.
14840 (find_aggregate_values_for_callers_subset): Likewise.
14841 (known_aggs_to_agg_replacement_list): Removed.
14842 (decide_whether_version_node): Re-calculate known constants for all
14843 remaining context clones.
14845 2018-04-11 Richard Biener <rguenther@suse.de>
14848 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14849 from early DWARF output.
14850 (dwarf2out_early_finish): Output line info unconditionally into
14851 early DWARF and add reference to it.
14853 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14856 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14857 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14858 other than V2DFmode using iptr mode attribute.
14859 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14861 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14863 PR rtl-optimization/84659
14864 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14866 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14869 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14871 (output_loc_list): Pass address of a dummy size variable even in the
14872 locview handling loop.
14873 (index_location_lists): Add comment on why skip_loc_list_entry can't
14876 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14879 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14882 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14885 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14886 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14887 and -mstring-compare-inline-limit.
14889 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14892 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14893 for stack clash protection in a register whenever we need it to be in
14896 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14898 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14899 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14901 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14904 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14906 (mlong-double-): Ditto.
14907 * config/rs6000/sysv4.opt (msdata=): Ditto.
14908 (mtls-size=): Ditto.
14910 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14912 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14913 erroneous entries for
14914 "vector int vec_ldl (int, long int *)", and
14915 "vector unsigned int vec_ldl (int, unsigned long int *)".
14916 Add comments and entries for
14917 "vector bool char vec_ldl (int, bool char *)",
14918 "vector bool short vec_ldl (int, bool short *)",
14919 "vector bool int vec_ldl (int, bool int *)",
14920 "vector bool long long vec_ldl (int, bool long long *)",
14921 "vector pixel vec_ldl (int, pixel *)",
14922 "vector long long vec_ldl (int, long long *)",
14923 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14924 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14925 type tree bool_long_long_type_node and correct definition of
14926 bool_V2DI_type_node to make reference to this new type tree.
14927 (rs6000_mangle_type): Replace erroneous reference to
14928 bool_long_type_node with bool_long_long_type_node.
14929 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14930 comments to emphasize sign distinctions for char and int types and
14931 replace RS6000_BTI_bool_long constant with
14932 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14933 use of RS6000_BTI_pixel.
14934 (bool_long_type_node): Remove this macro definition.
14935 (bool_long_long_type_node): New macro definition
14937 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14939 PR rtl-optimization/85300
14940 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14941 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14942 simplify_unary_operation fails.
14944 2018-04-10 Martin Liska <mliska@suse.cz>
14946 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14947 cgraph_edge and ipa_ref.
14949 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14953 * config/i386/sse.md
14954 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14955 computation of the VEC_MERGE selector from mask.
14956 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14957 Fix decoding of the VEC_MERGE selector into mask.
14959 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14961 PR tree-optimization/85286
14962 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14964 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14966 * final.c (final_1): Set insn_last_address as well as
14967 insn_current_address.
14969 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14972 * explow.c (emit_stack_probe): Call validize_mem on memory location
14973 before passing it to gen_probe_stack. Create address operand and
14974 legitimize it for the probe_stack_address case.
14976 2018-04-09 Jan Hubicka <jh@suse.cz>
14979 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14980 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14981 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14983 (free_lang_data): Rebuild type inheritance graph.
14985 2018-04-09 Martin Sebor <msebor@redhat.com>
14987 * invoke.texi (-finline-small-functions): Mention other optimization
14989 (-findirect-inlining, -fpartial-inlining): Same.
14990 (-finline-functions-called-once): Same.
14991 (-freorder-blocks-and-partition): Same.
14993 2018-04-09 Jan Hubicka <jh@suse.cz>
14996 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14997 jumps; choose last target that matches the criteria (i.e.
14998 no partition changes for non-crossing jumps).
14999 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15000 support for redirecting crossing jumps to non-crossing.
15002 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15004 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15005 also for naked functions.
15007 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15009 * config/arc/arc.md (add_shift): New pattern.
15010 (add_shift2): Likewise.
15011 (sub_shift): Likewise.
15012 (sub_shift_cmp0_noout): Likewise.
15013 (compare_si_ashiftsi): Likewise.
15014 (xbfu_cmp0_noout): New combine pattern.
15015 (xbfu_cmp0"): Likewise.
15016 (movsi_set_cc_insn): Place the predicable variant first.
15017 (commutative_binary_cmp0_noout): Remove clobber.
15018 (commutative_binary_cmp0): New pattern.
15019 (noncommutative_binary_cmp0): Likewise.
15020 (noncommutative_binary_cmp0_noout): Likewise.
15021 (noncommutative_binary_comparison_result_used): Removed.
15022 (rsub_cmp0): New pattern.
15023 (rsub_cmp0_noout): Likewise.
15024 (extzvsi): Changed, keep only meaningful variants.
15025 (SQH, SEZ): New iterators.
15026 (SQH_postfix): New mode attribute.
15027 (SEZ_prefix): New code attribute.
15028 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15029 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15030 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15031 of numerical value.
15032 (noncommutative_operator): Check the availability of barrel
15035 2018-04-09 Richard Biener <rguenther@suse.de>
15037 PR tree-optimization/85284
15038 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15039 Only use the niter constraining form of simple_iv when the exit
15040 is always executed.
15042 2018-04-09 Tom de Vries <tom@codesourcery.com>
15045 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15046 (define_expand "*memory_barrier"): New define_expand.
15047 (define_insn "memory_barrier"): New insn.
15049 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15051 PR rtl-optimization/80463
15052 PR rtl-optimization/83972
15053 PR rtl-optimization/83480
15055 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15056 correct producer for the insn.
15057 (tidy_control_flow): Fixup seqnos in case of debug insns.
15059 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15061 PR rtl-optimization/83913
15063 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15064 different sched-times when merging exprs.
15066 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15068 PR rtl-optimization/83962
15070 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15071 tidy_fallthru_edge and tidy_control_flow.
15073 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15075 PR rtl-optimization/83530
15077 * sel-sched.c (force_next_insn): New global variable.
15078 (remove_insn_for_debug): When force_next_insn is true, also leave only
15079 next insn in the ready list.
15080 (sel_sched_region): When the region wasn't scheduled, make another pass
15081 over it with force_next_insn set to 1.
15083 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15085 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15087 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15088 for interrupt control.
15089 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15090 functions for interrupt control.
15091 * config/nds32/nds32-intrinsic.md: Likewise.
15092 * config/nds32/nds32_intrinsic.h: Likewise.
15093 * config/nds32/nds32.h (nds32_builtins): Likewise.
15095 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15097 * config/nds32/nds32.c (nds32_init_machine_status,
15098 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15099 strict_aligned_p field.
15100 (nds32_expand_to_rtl_hook): New function.
15101 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15102 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15104 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15105 Chung-Ju Wu <jasonwucj@gmail.com>
15107 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15108 * config/nds32/nds32-n7.md: New file.
15109 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15110 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15112 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15113 * config/nds32/nds32.md (pipeline_model): Add n7.
15114 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15115 * config/nds32/pipelines.md: Include n7 settings.
15117 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15118 Chung-Ju Wu <jasonwucj@gmail.com>
15120 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15121 * config/nds32/nds32-e8.md: New file.
15122 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15123 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15125 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15126 * config/nds32/nds32.md (pipeline_model): Add e8.
15127 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15128 * config/nds32/pipelines.md: Include e8 settings.
15130 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15131 Chung-Ju Wu <jasonwucj@gmail.com>
15133 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15134 * config/nds32/nds32-n8.md: New file.
15135 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15136 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15138 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15139 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15140 * config/nds32/nds32.md (pipeline_model): Add n8.
15141 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15142 * config/nds32/pipelines.md: Include n8 settings.
15144 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15145 Chung-Ju Wu <jasonwucj@gmail.com>
15147 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15148 * config/nds32/nds32-n9-2r1w.md: New file.
15149 * config/nds32/nds32-n9-3r2w.md: New file.
15150 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15151 nds32_register_ports): New or modify for cpu n9.
15152 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15154 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15155 * config/nds32/nds32-utils.c: New file.
15156 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15157 TARGET_MUL_SLOW): Define.
15158 * config/nds32/nds32.md (pipeline_model): New attribute.
15159 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15160 New options that support cpu n9.
15161 * config/nds32/pipelines.md: Include n9 settings.
15162 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15164 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15166 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15167 information if necessary.
15168 (output_cond_branch_compare_zero): Likewise.
15169 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15170 (nds32_target_alignment): Refine for alignment.
15171 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15172 (FUNCTION_BOUNDARY): Modify.
15173 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15175 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15177 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15179 * config/nds32/constants.md (unspec_volatile_element): Add values for
15180 TLB operation and data prefetch.
15181 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15182 functions for TLB operation and data prefetch.
15183 * config/nds32/nds32-intrinsic.md: Likewise.
15184 * config/nds32/nds32_intrinsic.h: Likewise.
15185 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15186 (nds32_print_operand): Likewise.
15187 * config/nds32/nds32.h (nds32_builtins): Likewise.
15189 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15190 Andrew Pinski <pinsika@gcc.gnu.org>
15192 PR middle-end/82976
15193 * match.pd: Use constant_boolean_node of correct type instead of
15194 boolean_true_node or boolean_false_node for simplifying
15195 pointer comparisons to zero.
15197 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15199 PR tree-optimization/80021
15200 * tree.c (verify_type_variant): Make error call in verify_variant_match
15201 translatable and remove final full stop.
15203 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15205 * config/nds32/constants.md (unspec_volatile_element): Add
15206 UNSPEC_VOLATILE_EH_RETURN.
15207 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15208 nds32_output_stack_pop): Support dwarf exception handling process.
15209 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15210 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15211 exception handling process.
15212 (nds32_compute_stack_frame): Likewise.
15213 (nds32_return_addr_rtx): Likewise.
15214 (nds32_initial_elimination_offset): Likewise.
15215 (nds32_expand_prologue): Likewise.
15216 (nds32_expand_epilogue): Likewise.
15217 (nds32_dynamic_chain_address): New function.
15218 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15219 exception handling.
15220 (DYNAMIC_CHAIN_ADDRESS): Define.
15221 (EH_RETURN_DATA_REGNO): Define.
15222 (EH_RETURN_STACKADJ_RTX): Define.
15223 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15224 patterns for dwarf exception handling.
15226 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15228 * config/nds32/nds32.h: Clean up obsolete macros.
15230 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15232 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15233 Add enum values for particular instructions.
15234 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15235 particular intrinsic functions.
15236 * config/nds32/nds32-intrinsic.md: Likewise.
15237 * config/nds32/nds32_intrinsic.h: Likewise.
15238 * config/nds32/nds32.h (nds32_builtins): Likewise.
15239 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15240 (btst, ave): New patterns for particular instructions.
15242 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15244 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15245 Add enum values for atomic load/store and memory sync.
15246 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15248 * config/nds32/nds32-intrinsic.md: Likewise.
15249 * config/nds32/nds32_intrinsic.h: Likewise.
15250 * config/nds32/nds32.h (nds32_builtins): Likewise.
15252 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15254 PR tree-optimization/85257
15255 * fold-const.c (native_encode_vector): If not all elts could fit
15256 and off is -1, return 0 rather than offset.
15257 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15258 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15259 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15260 adjust buffer in native_interpret_expr call.
15262 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15264 * config/nds32/constants.md (unspec_volatile_element): Add cache
15265 control enum values.
15266 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15267 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15268 * config/nds32/nds32.c (nds32_cctl_names): New.
15269 (nds32_print_operand): Handle cache control register names.
15270 * config/nds32/nds32.h (nds32_builtins): New enum values.
15271 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15273 * config/nds32/nds32.md (type): Add mmu.
15274 * config/nds32/pipelines.md (simple_insn): Add mmu.
15276 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15278 * config/nds32/nds32.md (type): Remove call.
15279 * config/nds32/pipelines.md (simple_insn): Likewise.
15281 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15283 * config/nds32/constants.md (unspec_volatile_element): Add
15284 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15285 UNSPEC_VOLATILE_FMFCFG.
15286 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15287 description for fmfcfg and fmfcsr.
15288 (bdesc_1arg): Add fmtcsr.
15289 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15290 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15291 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15292 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15293 unspec_fmfcfg): New patterns.
15294 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15295 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15296 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15297 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15298 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15299 __nds32__fmfcfg): Define.
15301 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15303 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15304 intrinsic register names.
15305 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15306 intrinsic register enum values and macros.
15308 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15310 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15311 for load/store addressing form.
15312 (nds32_print_operand_address): Likewise.
15314 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15317 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15318 based on LABEL_REF. Remove useless assertion.
15319 (pic_address_needs_scratch): Fix formatting.
15320 (sparc_legitimize_pic_address): Minor tweaks.
15321 (sparc_delegitimize_address): Adjust assertion accordingly.
15322 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15323 into symbolic_operand.
15324 (movsi_high_pic_label_ref): Likewise.
15325 (movsi_lo_sum_pic_label_ref): Likewise.
15326 (movdi_pic_label_ref): Likewise.
15327 (movdi_high_pic_label_ref): Likewise.
15328 (movdi_lo_sum_pic_label_ref): Likewise.
15330 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15332 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15333 custom LIB_SPEC setup.
15335 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15336 Kito Cheng <kito.cheng@gmail.com>
15338 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15339 * config/riscv/freebsd.h: New.
15341 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15343 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15344 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15347 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15348 Kito Cheng <kito.cheng@gmail.com>
15350 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15351 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15352 * config/nds32/nds32-protos.h (nds32_output_call,
15353 nds32_output_return): Declare.
15354 * config/nds32/nds32.md: Refine all the call and return patterns.
15356 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15359 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15360 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15362 PR rtl-optimization/84872
15363 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15364 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15365 EDGE_CROSSING edge.
15367 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15369 * expr.c (copy_blkmode_to_reg): Revert 254862.
15370 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15372 2018-04-06 Richard Biener <rguenther@suse.de>
15374 PR middle-end/85244
15375 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15376 after seeing a component reference with an adjacent field. Treat
15377 refs to arrays at struct end of external decls similar to
15378 refs to unconstrained commons.
15380 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15383 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15384 look through SAVE_EXPRs with non-side-effects argument. Adjust
15386 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15389 2018-04-06 Richard Biener <rguenther@suse.de>
15391 PR middle-end/85180
15392 * alias.c (find_base_term): New wrapper around find_base_term
15393 unwinding CSELIB_VAL_PTR changes.
15394 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15397 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15399 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15401 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15402 constant definitions.
15403 ("nop"): lr 0,0 -> nopr r0
15404 ("nop_lr0", "nop_lr1"): New insn definitions.
15406 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15408 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15409 NDS32_V3PUSH_AVAILABLE_P macro.
15411 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15412 Chung-Ju Wu <jasonwucj@gmail.com>
15414 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15415 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15416 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15417 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15418 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15419 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15420 * config/nds32/constraints.md: New constraints and checking for hard
15421 float configuration.
15422 * config/nds32/iterators.md: New mode iterator and attribute for hard
15423 float configuration.
15424 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15426 * config/nds32/nds32-fpu.md: New file.
15427 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15428 deal with hard float code generation.
15429 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15431 (abi_type, float_reg_number): New enum type.
15432 * config/nds32/nds32-predicates.c: New predicates for hard float.
15433 * config/nds32/nds32-protos.h: Declare functions for hard float.
15434 * config/nds32/nds32.c: Implementation for hard float configuration.
15435 * config/nds32/nds32.h: Definitions for hard float configuration.
15436 * config/nds32/nds32.md: Include hard float machine description and
15437 modify patterns for hard float configuration.
15438 * config/nds32/nds32.opt: New options for hard float configuration.
15439 * config/nds32/predicates.md: New predicates for hard float
15442 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15444 * common/config/nds32/nds32-common.c
15445 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15447 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15449 PR middle-end/85195
15450 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15451 CONSTRUCTOR_ELT (ctor, ...)->value.
15453 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15456 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15458 2018-04-05 Tom de Vries <tom@codesourcery.com>
15461 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15464 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15465 Kito Cheng <kito.cheng@gmail.com>
15467 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15468 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15469 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15470 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15472 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15473 Kito Cheng <kito.cheng@gmail.com>
15475 * config/nds32/constraints.md (Ufe): New memory constraint.
15476 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15477 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15478 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15480 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15481 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15483 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15485 * config/nds32/nds32.md: Use optimize_size in the condition for
15486 alu-shift instructions.
15488 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15490 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15492 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15494 * config/nds32/nds32.md (negsi2): Refine pattern.
15496 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15497 Chung-Ju Wu <jasonwucj@gmail.com>
15499 * config/nds32/iterators.md (shift_rotate): New code iterator.
15500 (shift): New code attribute.
15501 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15502 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15503 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15504 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15505 bit-wise operations.
15506 (andsi3, *andsi3): Ditto.
15507 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15508 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15509 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15510 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15511 nds32_ior_operand, nds32_xor_operand): New predicates.
15513 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15515 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15516 (addsi3, subsi3): ... this.
15518 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15520 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15522 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15524 * config/nds32/nds32.md: Adjust indention.
15526 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15528 * config/nds32/nds32.md (feature): New attribute.
15530 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15532 * config/nds32/nds32.md (subtype): New attribute.
15534 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15537 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15538 expansion to perform a bitwise AND of the argument followed by a
15539 boolean negation of the result.
15541 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15543 PR rtl-optimization/84878
15544 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15545 the basic block. Assert the use reference is not artificial and that
15546 it has an associated insn.
15548 2018-04-04 Michael Matz <matz@suse.de>
15550 * builtins.c (compute_objsize): Pass correct operand
15551 to array_at_struct_end_p.
15553 2018-04-04 Richard Biener <rguenther@suse.de>
15556 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15557 from contexts for DINFO_LEVEL_TERSE and below.
15559 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15561 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15562 resiter_operand condition.
15563 * config/nds32/nds32.md (*move<mode>): Ditto.
15565 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15566 Monk Chiang <sh.chiang04@gmail.com>
15568 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15570 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15572 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15574 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15575 Kito Cheng <kito.cheng@gmail.com>
15577 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15578 nds32_cond_code_str, output_cond_branch,
15579 output_cond_branch_compare_zero, nds32_expand_cbranch,
15580 nds32_expand_cstore, nds32_expand_movcc,
15581 nds32_output_cbranchsi4_equality_zero,
15582 nds32_output_cbranchsi4_equality_reg,
15583 nds32_output_cbranchsi4_equality_reg_or_const_int,
15584 nds32_output_cbranchsi4_greater_less_zero: New functions.
15585 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15586 nds32_expand_cstore, nds32_expand_movcc,
15587 nds32_output_cbranchsi4_equality_zero,
15588 nds32_output_cbranchsi4_equality_reg,
15589 nds32_output_cbranchsi4_equality_reg_or_const_int,
15590 nds32_output_cbranchsi4_greater_less_zero): Declare.
15591 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15592 nds32_rimm11s_operand): New predicates.
15593 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15594 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15597 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15599 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15600 * config/nds32/nds32.md: Ditto.
15601 * config/nds32/pipelines.md: Ditto.
15603 2018-04-04 Richard Biener <rguenther@suse.de>
15605 PR tree-optimization/85168
15606 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15607 propagating abnormals.
15609 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15611 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15613 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15614 Kito Cheng <kito.cheng@gmail.com>
15616 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15617 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15618 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15619 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15620 * config/nds32/nds32.md (sibcall_internal): New.
15621 (sibcall_register): Remove.
15622 (sibcall_immediate): Remove.
15623 (sibcall_value_internal): New.
15624 (sibcall_value_register): Remove.
15625 (sibcall_value_immediate): Remove.
15626 * config/nds32/predicates.md (nds32_general_register_operand): New.
15627 (nds32_call_address_operand): New.
15629 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15631 PR rtl-optimization/85167
15632 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15633 bb_defs if *split_p, instead preinitialize it to NULL.
15635 PR tree-optimization/85156
15636 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15637 evaluating the argument multiple times.
15639 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15641 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15643 (_mm_cvtpd_ps): Likewise.
15644 (_mm_cvttpd_epi32): Likewise.
15645 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15646 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15647 vector, pixel, and bool following altivec.h include.
15649 2018-04-03 Martin Sebor <msebor@redhat.com>
15651 * doc/extend.texi (Common Function Attributes): Clarify.
15652 (const attribute): Likewise.
15653 (pure attribute): Likewise.
15655 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15658 * config/i386/i386.c (ix86_expand_vector_set): Use
15659 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15661 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15663 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15664 instructions when changing rounding bits to preserve precision bits
15665 in the x87 control word.
15667 2018-04-03 Martin Liska <mliska@suse.cz>
15669 PR tree-optimization/82491
15670 * rtl.h (strip_offset_and_add): Replace += suboffset with
15671 poly_uint64 () + suboffset.
15673 2018-03-29 Martin Liska <mliska@suse.cz>
15674 Martin Jambor <mjambor@suse.cz>
15677 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15678 param_type is not an integral or pointer type.
15680 2018-04-03 Richard Biener <rguenther@suse.de>
15682 * sese.h (recompute_all_dominators): Remove.
15684 2018-04-02 Martin Sebor <msebor@redhat.com>
15686 * doc/invoke.texi (-Wrestrict): Fix typos.
15688 2018-04-02 Jim Wilson <jimw@sifive.com>
15690 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15691 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15692 (<optab>di3, <optab>si3_extend): Likewise.
15693 (<optab>si3_mask, <optab>si3_mask_1): New.
15694 (<optab>di3_mask, <optab>di3_mask_1): New.
15695 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15696 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15697 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15699 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15701 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15704 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15706 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15707 (nds32_canonicalize_comparison): New function.
15709 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15710 Kito Cheng <kito.cheng@gmail.com>
15711 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15713 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15714 * config/nds32/constants.md (unspec_volatile_element): Add
15715 UNSPEC_VOLATILE_RELAX_GROUP.
15716 * config/nds32/nds32-relax-opt.c: New file.
15717 * config/nds32/nds32-predicates.c
15718 (nds32_symbol_load_store_p): New function.
15719 * config/nds32/nds32-protos.h
15720 (nds32_symbol_load_store_p): Declare function.
15721 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15722 * config/nds32/nds32.c
15723 (nds32_register_pass): New function to register pass.
15724 (nds32_register_passes): New function to register passes.
15725 * config/nds32/nds32.md (relax_group): New pattern.
15726 * config/nds32/nds32.opt (mrelax-hint): New option.
15727 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15729 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15731 * config/nds32/t-nds32: Modify files dependency.
15733 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15735 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15736 (PROFILE_HOOK): Define its implementation.
15738 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15740 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15741 type and 32-bit size.
15743 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15745 PR middle-end/85090
15746 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15747 (V_128_256): New mode iterator.
15748 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15749 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15750 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15752 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15753 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15755 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15758 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15759 NaN inputs correctly.
15761 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15764 * config/rs6000/vsx.md (??r): New mode attribute.
15765 (*vsx_mov<mode>_64bit): Use it.
15766 (*vsx_mov<mode>_32bit): Likewise.
15768 2018-03-30 Martin Sebor <msebor@redhat.com>
15770 PR tree-optimization/84818
15771 * builtins.c (check_access): Use warning_n.
15773 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15776 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15778 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15781 2018-03-30 Julia Koval <julia.koval@intel.com>
15784 * x86-tune.def (movx, partial_reg_dependency): Enable for
15787 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15789 PR inline-asm/84985
15790 * lra-constraints.c (process_alt_operands): Move setting
15791 this_alternative_matches below.
15793 2018-03-29 Martin Liska <mliska@suse.cz>
15796 * doc/invoke.texi: Document how LTO works with debug info.
15797 Describe auto-load support of binutils. Mention 'x86-64'
15798 as valid option value of -march option.
15800 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15802 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15805 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15806 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15807 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15810 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15813 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15814 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15815 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15816 for RS6000_BTM_POWERPC64.
15817 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15818 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15819 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15822 (DIVDEU): Likewise.
15824 2018-03-28 Carl Love <cel@us.ibm.com>
15827 2017-09-27 Carl Love <cel@us.ibm.com>
15829 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15830 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15831 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15834 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15836 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15837 instead of __vector bool.
15838 (_mm_max_pu8): Likewise.
15839 (_mm_min_pi16): Likewise.
15841 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15844 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15845 (DIVWEUO): Likewise.
15846 (DIVDEO): Likewise.
15847 (DIVDEUO): Likewise.
15848 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15849 DIVWEUO and DIVDEUO.
15850 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15851 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15852 (div_extend): Likewise.
15853 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15855 (__builtin_divweuo): Likewise.
15856 (__builtin_divdeo): Likewise.
15857 (__builtin_divdeuo): Likewise.
15859 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15862 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15863 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15865 PR tree-optimization/82004
15866 * gimple-match-head.c (optimize_pow_to_exp): New function.
15867 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15868 Don't fold to exp if optimize_pow_to_exp is false.
15870 2018-03-28 Martin Liska <mliska@suse.cz>
15873 * calls.c (initialize_argument_information): Fix trailing space.
15874 * common.opt: Fix typo and provide better explanation for
15875 -fsanitize-coverage option.
15876 * config/i386/i386.opt: Fix typo.
15878 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15879 Martin Liska <mliska@suse.cz>
15882 * gimplify.c (asan_poison_variable): Don't do the check for
15883 gimplify_omp_ctxp here.
15884 (gimplify_decl_expr): Do it here.
15885 (gimplify_target_expr): Likewise.
15887 2018-03-28 Martin Liska <mliska@suse.cz>
15890 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15891 chkp_type_bounds_count if MPX is not enabled.
15893 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15895 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15897 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15900 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15901 function to create the function decl for complex long double
15902 multiply and divide for -mabi=ieeelongdouble.
15903 (init_float128_ieee): Call it.
15905 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15908 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15909 -fcf-protection=branch -mibt.
15910 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15912 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15915 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15916 arm_word_relocations.
15918 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15921 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15922 extern array declarations.
15924 2018-03-27 Richard Biener <rguenther@suse.de>
15926 PR middle-end/84067
15927 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15928 explicit single_use checks.
15930 2018-03-27 Richard Biener <rguenther@suse.de>
15932 PR tree-optimization/85082
15933 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15936 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15938 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15939 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15940 Turn on fasynchronous-unwind-tables and funwind-tables.
15942 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15945 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15946 (*bmi_blsr_<mode>_ccz): Ditto.
15948 2018-03-26 Tom de Vries <tom@codesourcery.com>
15950 PR tree-optimization/85063
15951 * omp-general.c (offloading_function_p): New function. Factor out
15953 * omp-offload.c (pass_omp_target_link::gate): ... here.
15954 * omp-general.h (offloading_function_p): Declare.
15955 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15956 with attribute omp declare target for offloading functions.
15958 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15960 PR tree-optimization/84005
15961 * tree-data-ref.h (get_base_for_alignment): Declare.
15962 * tree-data-ref.c (get_base_for_alignment_1): New function.
15963 (get_base_for_alignment): Likewise.
15964 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15965 get_base_for_alignment to find a suitable base object, instead
15966 of always using drb->base_address.
15968 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15970 PR inline-asm/85022
15971 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15972 known size by default.
15974 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15976 PR inline-asm/85030
15977 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15978 and non BLKmode operands.
15980 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15983 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15984 Clean up attributes.
15986 2018-03-23 Richard Biener <rguenther@suse.de>
15989 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15990 we are going to emit early debug for LTO.
15992 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15994 PR inline-asm/85034
15995 * function.c (match_asm_constraints_1): Don't optimize if input
15996 doesn't satisfy general_operand predicate for output's mode.
15998 PR inline-asm/85022
15999 * alias.c (write_dependence_p): Don't require for x_canonicalized
16000 non-VOIDmode if x has VOIDmode.
16003 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16004 just don't try to optimize it rather than assert it never happens.
16006 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16008 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16009 macro expansions for definition of ST_INTERNAL_<mode> and
16010 LD_INTERNAL_<mode> builtins.
16011 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16013 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16015 (altivec_expand_st_builtin): Likewise.
16016 (altivec_expand_builtin): Remove calls to deleted functions.
16017 (rs6000_address_for_altivec): Delete this function.
16018 * config/rs6000/vector.md: Remove expands for
16019 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16021 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16024 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16025 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16026 re-computing once computed.
16027 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16028 (arm_init_machine_status): Initialize
16029 machine->static_chain_stack_bytes.
16031 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16034 * doc/extend.texi: Add four new prototypes for vec_ld.
16035 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16036 definitions for more logical presentation.
16037 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16038 entries for V1TI variants of __builtin_altivec_ld builtin.
16039 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16040 handling of V1TI variant of LVX icode pattern.
16041 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16042 (rs6000_gimple_fold_builtin): Likewise.
16043 (altivec_init_builtins): Add code to define
16044 __builtin_altivec_lvx_v1ti function.
16046 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16048 PR inline-asm/84941
16049 * function.c (match_asm_constraints_1): Don't do the optimization
16050 if input isn't a REG, SUBREG, MEM or constant.
16052 2018-03-22 Tom de Vries <tom@codesourcery.com>
16054 PR tree-optimization/84956
16055 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16056 bb_has_abnormal_pred.
16058 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16061 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16062 DECL_INITIAL (decl) to decl at the end.
16063 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16064 adjust the comment.
16066 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16068 * doc/extend.texi (__builtin_tgmath): Document when complex
16069 integer types are treated as _Complex _Float64.
16071 2018-03-21 Tom de Vries <tom@codesourcery.com>
16073 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16075 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16077 PR tree-optimization/84960
16078 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16079 if it is ENTRY block, move them into single succ of ENTRY in that case.
16081 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16083 PR tree-optimization/84811
16084 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16085 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16086 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16087 (known_subrange_p): Update accordingly. Cast each value involved
16088 in the size comparison, rather than casting the result of the
16091 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16093 PR tree-optimization/84982
16094 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16095 by flipping the least significant bit rather than all bits from
16096 bitpos to bitpos + bitsize - 1.
16098 2018-03-21 Nathan Sidwell <nathan@acm.org>
16100 * doc/extend.texi (Deprecated Features): Remove mention of
16101 long-deleted deprecations.
16103 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16106 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16107 * configure: Regenerate.
16109 2018-03-21 Tom de Vries <tom@codesourcery.com>
16111 PR tree-optimization/83126
16112 * tree-parloops.c (num_phis): New function.
16113 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16115 2018-03-21 Nathan Sidwell <nathan@acm.org>
16117 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16118 mention anon-struct/union members and trailing attributes.
16120 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16122 PR tree-optimization/84969
16123 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16124 builtin memset partitions if they set different rhs values.
16126 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16128 PR rtl-optimization/84989
16129 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16130 VEC_DUPLICATE with scalar result mode.
16132 2018-03-21 Martin Liska <mliska@suse.cz>
16135 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16136 not intended return statement.
16138 2018-03-21 Martin Liska <mliska@suse.cz>
16141 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16142 (chkp_find_bound_slots_1): Limit number of iterations.
16144 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16147 * Minor grammar fixes for x86 options.
16149 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16152 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16153 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16155 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16158 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16159 (altivec_lvx_<mode>_1op): Likewise.
16160 (altivec_stvx_<mode>_2op): Likewise.
16161 (altivec_stvx_<mode>_1op): Likewise.
16162 (altivec_lvx_<VM2:mode>): New define_expand.
16163 (altivec_stvx_<VM2:mode>): Likewise.
16164 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16165 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16166 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16167 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16168 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16169 (rs6000_gen_lvx): Likewise.
16170 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16171 (altivec_expand_stv_builtin): Likewise.
16172 (altivec_expand_builtin): Likewise.
16173 * config/rs6000/vector.md: Likewise.
16175 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16178 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16181 2018-03-20 Richard Biener <rguenther@suse.de>
16184 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16185 sign-conversions as zero, fall back to standard scalar_stmt
16188 2018-03-20 Martin Liska <mliska@suse.cz>
16191 * predict.c (rebuild_frequencies): Handle case when we have
16192 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16194 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16197 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16198 flag_section_anchors.
16199 * varasm.c (use_blocks_for_decl_p): Remove hack for
16200 dw2_force_const_mem.
16203 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16205 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16206 be created, use lowpart_subreg of operands[0] rather than operands[0]
16208 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16209 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16210 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16211 and n constraint instead of aarch64_shift_imm_di and Usd.
16212 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16213 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16215 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16218 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16219 to favor GPR over NEON registers.
16220 (<shift>di3_neon): Likewise.
16222 2018-03-20 Tom de Vries <tom@codesourcery.com>
16225 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16226 (nvptx_process_pars): Emit bar.sync asap and alap.
16228 2018-03-20 Tom de Vries <tom@codesourcery.com>
16231 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16232 seen_label if seen_label is already set.
16234 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16237 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16238 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16239 Use 1U instead of 1. Formatting fixes.
16242 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16243 instead of TREE_TYPE (s1) for the return value.
16245 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16247 PR tree-optimization/84946
16248 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16249 bitsize + bitsize in poly_uint64 rather than poly_int64.
16252 * dwarf2asm.c: Include fold-const.c.
16253 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16254 of decl rather than decl itself.
16256 PR rtl-optimization/84643
16257 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16259 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16262 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16263 calling assemble_variable.
16265 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16268 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16269 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16271 2018-03-19 Jim Wilson <jimw@sifive.com>
16274 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16275 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16276 (riscv_first_stack_step): Likewise.
16277 (riscv_option_override): Use STACK_BOUNDARY instead of
16278 MIN_STACK_BOUNDARY.
16279 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16280 MIN_STACK_BOUNDARY.
16281 (BIGGEST_ALIGNMENT): Set to 128.
16282 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16283 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16286 2018-03-19 Richard Biener <rguenther@suse.de>
16288 PR tree-optimization/84933
16289 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16290 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16292 2018-03-19 Richard Biener <rguenther@suse.de>
16294 PR tree-optimization/84859
16295 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16296 (cond_if_else_store_replacement): Perform sinking operation on
16297 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16298 Generalize what a BB with a single eligible store is.
16300 2018-03-19 Richard Biener <rguenther@suse.de>
16302 PR tree-optimization/84929
16303 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16304 chrec_is_positive against non-chrec arg.
16306 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16309 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16311 2018-03-18 Martin Liska <mliska@suse.cz>
16313 PR rtl-optimization/84635
16314 * regrename.c (build_def_use): Use matches_mode only when
16317 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16319 PR tree-optimization/84913
16320 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16321 vectorize chains of COND_EXPRs.
16323 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16325 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16327 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16329 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16331 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16333 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16335 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16336 Kito Cheng <kito.cheng@gmail.com>
16338 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16339 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16340 (nds32_adjust_reg_alloc_order): New function.
16341 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16343 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16345 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16346 nds32_print_operand, nds32_print_operand_address): Use
16347 HOST_WIDE_INT_PRINT_DEC instead.
16349 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16351 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16353 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16356 * config/i386/i386.c (initial_ix86_tune_features,
16357 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16358 unsigned long long.
16359 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16360 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16361 rather than 1u << ix86_tune. Formatting fix.
16362 (ix86_option_override_internal): Change ix86_arch_mask from
16363 unsigned int to unsigned HOST_WIDE_INT, initialize to
16364 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16365 (ix86_function_specific_restore): Likewise.
16367 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16370 * postreload.c (reload_combine_recognize_pattern): Perform
16371 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16372 truncate_int_for_mode the result for the destination's mode.
16375 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16376 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16378 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16381 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16384 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16385 regno_allocno_class_array and sorted_pseudos.
16386 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16387 insns where regno is used.
16389 2018-03-16 Martin Liska <mliska@suse.cz>
16392 * multiple_target.c (create_dispatcher_calls): Redirect
16393 reference in the symbol table.
16395 2018-03-16 Martin Liska <mliska@suse.cz>
16398 * multiple_target.c (create_dispatcher_calls): Redirect also
16401 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16405 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16406 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16407 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16409 2018-03-16 Julia Koval <julia.koval@intel.com>
16411 * doc/invoke.texi (Skylake Server): Add CLWB.
16412 Cannonlake): Remove CLWB.
16414 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16416 PR tree-optimization/84841
16417 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16419 (FLOAT_ONE_CONST_TYPE): Define.
16420 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16421 (sort_by_operand_rank): Put entries with higher constant_type last
16422 rather than first to match comments.
16424 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16426 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16429 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16432 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16433 check and use address of target always.
16435 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16438 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16439 (indirect_thunk_bnd_needed): Likewise.
16440 (indirect_thunks_used): Likewise.
16441 (indirect_thunks_bnd_used): Likewise.
16442 (indirect_return_needed): New.
16443 (indirect_return_bnd_needed): Likewise.
16444 (output_indirect_thunk_function): Add a bool argument for
16446 (output_indirect_thunk_function): Don't generate alias for
16447 function return thunk.
16448 (ix86_code_end): Call output_indirect_thunk_function to generate
16449 function return thunks.
16450 (ix86_output_function_return): Set indirect_return_bnd_needed
16451 and indirect_return_needed instead of indirect_thunk_bnd_needed
16452 and indirect_thunk_needed.
16454 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16456 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16457 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16458 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16460 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16461 Paul Hua <paul.hua.gm@gmail.com>
16464 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16466 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16468 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16469 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16470 resp. SFmode cases.
16472 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16475 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16476 instead of GET_MODE_SIZE when comparing Units.
16478 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16481 * varasm.c (hash_section): Return an unchangeble hash value
16482 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16483 Return !aarch64_can_use_per_function_literal_pools_p ().
16485 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16488 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16489 rather than address of cmode as last argument to prepare_cmp_insn.
16491 2018-03-15 Julia Koval <julia.koval@intel.com>
16493 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16494 F_AVX512VNNI, F_AVX512BITALG): New.
16496 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16499 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16500 insn for floating-point loads and stores.
16502 2018-03-14 Carl Love <cel@us.ibm.com>
16504 * config/rs6000/rs6000-c.c: Add macro definitions for
16505 ALTIVEC_BUILTIN_VEC_PERMXOR.
16506 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16507 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16508 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16509 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16511 * config/doc/extend.texi: Add prototypes for vec_permxor.
16513 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16516 * diagnostic-show-locus.c (class layout_point): Convert m_line
16517 from int to linenum_type.
16518 (line_span::comparator): Use linenum "compare" function when
16519 comparing line numbers.
16520 (test_line_span): New function.
16521 (layout_range::contains_point): Convert param "row" from int to
16523 (layout_range::intersects_line_p): Likewise.
16524 (layout::will_show_line_p): Likewise.
16525 (layout::print_source_line): Likewise.
16526 (layout::should_print_annotation_line_p): Likewise.
16527 (layout::print_annotation_line): Likewise.
16528 (layout::print_leading_fixits): Likewise.
16529 (layout::annotation_line_showed_range_p): Likewise.
16530 (struct line_corrections): Likewise for field m_row.
16531 (line_corrections::line_corrections): Likewise for param "row".
16532 (layout::print_trailing_fixits): Likewise.
16533 (layout::get_state_at_point): Likewise.
16534 (layout::get_x_bound_for_row): Likewise.
16535 (layout::print_line): Likewise.
16536 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16537 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16538 * input.c (selftest::test_linenum_comparisons): New function.
16539 (selftest::input_c_tests): Call it.
16540 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16541 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16542 * selftest.h (ASSERT_GT): New macro.
16543 (ASSERT_GT_AT): New macro.
16544 (ASSERT_LT): New macro.
16545 (ASSERT_LT_AT): New macro.
16547 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16549 PR rtl-optimization/84780
16550 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16552 2018-03-14 Martin Liska <mliska@suse.cz>
16554 * tree.c (record_node_allocation_statistics): Use
16555 get_stats_node_kind.
16556 (get_stats_node_kind): New function extracted from
16557 record_node_allocation_statistics.
16558 (free_node): Use get_stats_node_kind.
16560 2018-03-14 Richard Biener <rguenther@suse.de>
16562 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16563 that the value-set of ANTIC_IN doesn't grow.
16566 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16568 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16569 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16571 2018-03-14 Julia Koval <julia.koval@intel.com>
16573 * config.gcc (icelake-client, icelake-server): New.
16575 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16576 (initial_ix86_arch_features): Ditto.
16577 (PTA_SKYLAKE): Add SGX.
16578 (PTA_ICELAKE): Remove.
16579 (PTA_ICELAKE_CLIENT): New.
16580 (PTA_ICELAKE_SERVER): New.
16581 (ix86_option_override_internal): Split up icelake on icelake client and
16583 (get_builtin_code_for_version): Ditto.
16584 (fold_builtin_cpu): Ditto.
16585 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16586 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16587 * config/i386/i386.h (processor_type): Ditto.
16588 * doc/invoke.texi: Ditto.
16590 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16593 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16594 INTEGER_CST offset, add it together with bitpos / 8 and
16595 sign extend based on POINTER_SIZE.
16599 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16602 * config/i386/constraints.md (Yc): New register constraint.
16603 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16604 Use Yc constraint for alternative 2 of operand 0. Remove
16605 preferred_for_speed attribute.
16607 2018-03-14 Richard Biener <rguenther@suse.de>
16609 PR tree-optimization/84830
16610 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16611 with the old one to avoid oscillations.
16613 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16616 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16618 (assign_by_spills): Return a flag of reload assignment failure.
16619 Do not process the reload assignment failures. Do not spill other
16620 reload pseudos if they has the same reg class. Update n if
16622 (lra_assign): Add a return arg. Set up from the result of
16623 assign_by_spills call.
16624 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16625 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16626 usage_insns if it is not NULL.
16627 (spill_hard_reg_in_range): New function.
16628 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16629 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16630 function prototypes.
16631 (lra_assign): Change prototype.
16632 * lra.c (lra): Add code to deal with fails by splitting hard reg
16635 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16637 * config/riscv/riscv.opt (mrelax): New option.
16638 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16639 "norelax" when riscv_mrelax is disabled.
16640 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16642 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16645 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16646 reassociation for int modes.
16648 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16650 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16651 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16653 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16654 * config/aarch64/aarch64-sve.md
16655 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16656 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16657 (*extend<mode><Vwide>2): Rename to...
16658 (aarch64_sve_extend<mode><Vwide>2): ...this.
16659 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16660 renaming the old pattern to...
16661 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16663 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16664 define_expand, renaming the old pattern to...
16665 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16666 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16667 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16668 account when deciding which SVE instruction the optab should use.
16669 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16671 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16673 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16674 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16675 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16676 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16677 (tlsdesc_small_<mode>): Turn a define_expand and use
16678 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16679 (tlsdesc_small_advsimd_<mode>): ...this.
16680 (tlsdesc_small_sve_<mode>): New pattern.
16682 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16684 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16685 (UNSPEC_UMUL_HIGHPART): New constants.
16686 (MUL_HIGHPART): New int iteraor.
16687 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16688 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16690 (*<su>mul<mode>3_highpart): New define_insn.
16692 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16695 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16698 2018-03-13 Martin Liska <mliska@suse.cz>
16701 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16703 (sem_item_optimizer::~sem_item_optimizer): Release it.
16704 (sem_item_optimizer::merge_classes): Register variable aliases.
16705 (sem_item_optimizer::fixup_pt_set): New function.
16706 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16707 * ipa-icf.h: Declare new variables and functions.
16709 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16711 PR middle-end/84834
16712 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16713 integer_pow2p@2 and test integer_pow2p in condition.
16714 (A < 0 ? C : 0): Similarly for @1.
16716 PR middle-end/84831
16717 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16718 characters starting at p contain '\0' character, don't look beyond
16722 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16723 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16726 * reg-stack.c (change_stack): Change update_end var from int to
16727 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16728 also call set_block_for_insn on the newly added insns and rescan.
16731 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16732 on the last operand.
16735 * tree.c (stabilize_reference_1): Return save_expr (e) for
16736 STATEMENT_LIST even if it doesn't have side-effects.
16738 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16740 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16742 2018-03-12 Renlin Li <renlin.li@arm.com>
16744 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16745 aarch64_output_scalar_simd_mov_immediate.
16747 2018-03-12 Martin Sebor <msebor@redhat.com>
16749 PR tree-optimization/83456
16750 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16751 for perfectly overlapping calls to memcpy.
16752 (gimple_fold_builtin_memory_chk): Same.
16753 (gimple_fold_builtin_strcpy): Handle no-warning.
16754 (gimple_fold_builtin_stxcpy_chk): Same.
16755 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16757 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16759 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16760 parameter. Use it for SFmode.
16761 (rs6000_function_arg_advance_1): Adjust.
16762 (rs6000_function_arg): Adjust.
16763 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16765 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16767 PR rtl-optimization/84169
16768 PR rtl-optimization/84780
16769 * combine.c (can_combine_p): Check for a 2-insn combination whether
16770 the destination register is used between the two insns, too.
16772 2018-03-12 Richard Biener <rguenther@suse.de>
16774 PR tree-optimization/84803
16775 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16776 for refs DR analysis didn't process.
16778 2018-03-12 Richard Biener <rguenther@suse.de>
16780 PR tree-optimization/84777
16781 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16782 force-vectorize loops ignore whether we are optimizing for size.
16784 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16786 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16787 (TARGET_MD_ASM_ADJUST): Define.
16789 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16790 Kito Cheng <kito.cheng@gmail.com>
16791 Chung-Ju Wu <jasonwucj@gmail.com>
16793 * config/nds32/nds32.c (nds32_compute_stack_frame,
16794 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16795 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16796 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16797 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16798 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16799 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16800 * config/nds32/nds32.md (prologue, epilogue): Use macro
16801 NDS32_V3PUSH_AVAILABLE_P to do checking.
16803 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16806 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16807 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16808 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16809 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16810 addition of most attributes on !orig_type_die or the attribute not
16811 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16813 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16814 Chung-Ju Wu <jasonwucj@gmail.com>
16816 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16817 __NDS32_VH__ macro.
16818 * config/nds32/nds32.opt (mvh): New option.
16820 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16821 Chung-Ju Wu <jasonwucj@gmail.com>
16823 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16825 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16826 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16829 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16830 Chung-Ju Wu <jasonwucj@gmail.com>
16832 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16834 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16835 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16837 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16838 Kito Cheng <kito.cheng@gmail.com>
16839 Chung-Ju Wu <jasonwucj@gmail.com>
16841 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16842 UNSPEC_FFMISM and UNSPEC_FLMISM.
16843 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16844 for ffb, ffmism and flmism.
16845 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16846 (unspec_ffmism): Ditto.
16847 (unspec_flmism): Ditto.
16848 (nds32_expand_builtin_impl): Check if string extension is available.
16849 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16850 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16852 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16855 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16858 * lra-assigns.c (assign_by_spills): Return a flag of reload
16859 assignment failure. Do not process the reload assignment
16860 failures. Do not spill other reload pseudos if they has the same
16862 (lra_assign): Add a return arg. Set up from the result of
16863 assign_by_spills call.
16864 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16865 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16866 usage_insns if it is not NULL.
16867 (spill_hard_reg_in_range): New function.
16868 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16869 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16870 function prototypes.
16871 (lra_assign): Change prototype.
16872 * lra.c (lra): Add code to deal with fails by splitting hard reg
16875 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16878 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16880 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16883 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16884 (dw_val_node): Add val_symbolic_view.
16885 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16886 (symview_upper_bound): New.
16887 (new_line_info_table): Initialize symviews_since_reset.
16888 (dwarf2out_source_line): Count symviews_since_reset and set
16889 symview_upper_bound.
16890 (dw_val_equal_p): Handle symview.
16891 (add_AT_symview): New.
16892 (print_dw_val): Handle symview.
16893 (attr_checksum, attr_checksum_ordered): Likewise.
16894 (same_dw_val_p, size_of_die): Likewise.
16895 (value_format, output_die): Likewise.
16896 (add_high_low_attributes): Use add_AT_symview for entry_view.
16897 (dwarf2out_finish): Reset symview_upper_bound, clear
16900 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16903 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16904 Add strict argument and use it.
16905 (rs6000_split_multireg_move): Update for new strict argument.
16906 (mem_operand_gpr): Disallow all non-offsettable addresses.
16907 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16909 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16912 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16913 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16914 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16917 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16918 decl, use remap_type if we want to use the type.
16920 2018-03-09 Martin Sebor <msebor@redhat.com>
16922 PR tree-optimization/84526
16923 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16925 (builtin_access::generic_overlap): Be prepared to handle non-array
16928 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16930 PR rtl-optimization/84682
16931 * lra-constraints.c (process_address_1): Check is_address flag
16932 for address constraints.
16933 (process_alt_operands): Likewise.
16934 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16935 preprocess_constraints.
16936 * recog.h (preprocess_constraints): Add oploc parameter.
16938 * recog.c (preprocess_constraints): Test address_operand for
16939 CT_ADDRESS constraints.
16941 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16944 * lra-assigns.c (assign_by_spills): Return a flag of reload
16945 assignment failure. Do not process the reload assignment
16946 failures. Do not spill other reload pseudos if they has the same
16948 (lra_assign): Add a return arg. Set up from the result of
16949 assign_by_spills call.
16950 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16951 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16952 usage_insns if it is not NULL.
16953 (spill_hard_reg_in_range): New function.
16954 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16955 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16956 function prototypes.
16957 (lra_assign): Change prototype.
16958 * lra.c (lra): Add code to deal with fails by splitting hard reg
16961 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16964 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16965 Accept complain bool parameter. Only emit errors if it is true.
16966 (arm_parse_cpu_option_name): Likewise.
16967 (arm_target_thumb_only): Adjust callers of the above.
16968 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16969 prototype to take a default true bool parameter.
16970 (arm_parse_arch_option_name): Likewise.
16972 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16973 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16977 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16978 * configure: Regenerate.
16979 * configure.ac ("linker --version-script option"): New.
16980 ("linker soname option"): New.
16982 2018-03-09 Richard Biener <rguenther@suse.de>
16984 PR tree-optimization/84775
16985 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16986 immediate uses of predicate stmts and mark them modified.
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-09 Eric Botcazou <ebotcazou@adacore.com>
16999 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17000 when the function accesses prior frames.
17002 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17005 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17006 gen_llsym, otherwise call maybe_gen_llsym.
17008 PR inline-asm/84742
17009 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17010 has ',' character inside of it.
17012 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17015 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17016 as clobbering CC_REGNUM.
17018 2018-03-08 Richard Biener <rguenther@suse.de>
17020 PR middle-end/84552
17021 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17022 (follow_copies_to_constant): Do not follow SSA names registered
17025 2018-03-08 Richard Biener <rguenther@suse.de>
17027 PR tree-optimization/84178
17028 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17030 (version_loop_for_if_conversion): Delay update_ssa call.
17031 (tree_if_conversion): Delay update_ssa until after predicate
17034 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17036 PR tree-optimization/84178
17037 * tree-if-conv.c (release_bb_predicate): Remove the
17038 the assertion that the stmts have NULL use_ops.
17039 Discard the statements, asserting that they haven't
17040 yet been added to a BB.
17042 2018-03-08 Richard Biener <rguenther@suse.de>
17044 PR tree-optimization/84746
17045 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17046 (phi_translate): Pass in destination ANTIC_OUT set.
17047 (phi_translate_1): Likewise. For a simplified result lookup
17048 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17049 (phi_translate_set): Adjust.
17050 (do_pre_regular_insertion): Likewise.
17051 (do_pre_partial_partial_insertion): Likewise.
17053 2018-03-08 Martin Liska <mliska@suse.cz>
17055 PR gcov-profile/84735
17056 * doc/gcov.texi: Document usage of profile files.
17057 * gcov-io.h: Document changes in the format.
17059 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17063 * dwarf2out.c (struct dw_line_info_table): Update comments for
17065 (FORCE_RESET_NEXT_VIEW): New.
17066 (FORCE_RESETTING_VIEW_P): New.
17067 (RESETTING_VIEW_P): Check for -1 too.
17068 (ZERO_VIEW_P): Likewise.
17069 (new_line_info_table): Force-reset next view.
17070 (dwarf2out_begin_function): Likewise.
17071 (dwarf2out_source_line): Simplify zero_view_p initialization.
17072 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17073 view directly. Omit view when omitting .loc at line 0.
17075 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17077 PR tree-optimization/84740
17078 * tree-switch-conversion.c (process_switch): Call build_constructors
17079 only if info.phi_count is non-zero.
17081 PR tree-optimization/84739
17082 * tree-tailcall.c (find_tail_calls): Check call arguments against
17083 DECL_ARGUMENTS (current_function_decl) rather than
17084 DECL_ARGUMENTS (func) when checking for tail recursion.
17086 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17088 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17089 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17090 Volker Reichelt's entry and add entries for people that perform
17091 GCC fuzzy testing and report numerous bugs.
17093 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17096 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17097 readonly data in sdata, if that is disabled.
17098 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17099 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17100 -mreadonly-in-sdata option.
17102 2018-03-07 Martin Sebor <msebor@redhat.com>
17104 PR tree-optimization/84468
17105 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17106 basic block when looking for nul assignment.
17108 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17111 * except.h (output_function_exception_table): Adjust prototype.
17112 * except.c (output_function_exception_table): Remove FNNAME parameter
17113 and add SECTION parameter. Ouput one part of the table at a time.
17114 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17115 the first part of the exception table and emit unwind directives.
17116 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17117 (i386_pe_seh_cold_init): Likewise.
17118 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17119 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17120 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17121 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17122 * config/i386/winnt.c: Include except.h.
17123 (struct seh_frame_state): Add reg_offset, after_prologue and
17124 in_cold_section fields.
17125 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17126 (i386_pe_seh_cold_init): New function.
17127 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17128 to seh->in_cold_section.
17129 (seh_emit_push): Record the offset of the push.
17130 (seh_emit_save): Record the offet of the save.
17131 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17132 Test seh->after_prologue to disregard the epilogue.
17133 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17134 (i386_pe_end_cold_function): New function.
17136 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17139 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17140 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17143 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17145 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17146 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17148 PR middle-end/84723
17149 * multiple_target.c: Include tree-inline.h and intl.h.
17150 (expand_target_clones): Diagnose and fail if node->definition and
17151 !tree_versionable_function_p (node->decl).
17153 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17155 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17157 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17158 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17159 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17161 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17164 * combine.c (try_combine): Use reg_or_subregno instead of handling
17165 just paradoxical SUBREGs and REGs.
17167 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17169 * config/arc/arc.c (arc_finalize_pic): Remove function.
17170 (arc_must_save_register): We use single base PIC register, remove
17171 checks to save/restore the PIC register.
17172 (arc_expand_prologue): Likewise.
17173 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17175 (arc_verify_short): Likewise.
17176 (arc_attr_type): Likewise.
17177 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17178 (walk_stores): Likewise.
17179 (arc_address_cost): Make it static.
17180 (arc_verify_short): Likewise.
17181 (branch_dest): Likewise.
17182 (arc_attr_type): Likewise.
17183 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17184 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17185 (arc_final_prescan_insn): Remove inserting the nops due to
17186 hardware hazards. It is done in reorg step.
17187 (insn_length_variant_t): Remove.
17188 (insn_length_parameters_t): Likewise.
17189 (arc_insn_length_parameters): Likewise.
17190 (arc_get_insn_variants): Likewise.
17191 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17193 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17195 PR inline-asm/84683
17196 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17199 PR tree-optimization/84687
17200 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17202 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17204 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17206 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17207 Rename to ppc_speculation_barrier.
17208 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17209 __builtin_ppc_speculation_barrier.
17211 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17214 * combine.c (combine_simplify_rtx): Don't try to simplify if
17215 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17218 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17220 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17221 to 32 bytes when compiling for POWER9.
17223 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17226 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17227 regparm >= 3 with no arg reg available also for calls with
17228 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17231 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17233 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17235 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17238 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17240 2018-03-05 Richard Biener <rguenther@suse.de>
17242 PR tree-optimization/84486
17243 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17244 When inserting a __builtin_assume_aligned call set the LHS
17245 SSA name alignment info accordingly.
17247 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17249 PR tree-optimization/84114
17250 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17251 Avoid reassociation of FLOAT_MODE addition.
17253 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17255 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17256 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17257 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17258 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17259 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17260 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17261 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17263 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17264 __builtin_ia32_wbinvd): New builtins.
17265 (SPECIAL_ARGS2): New.
17266 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17267 (SPECIAL_ARGS2): New.
17268 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17269 (ix86_valid_target_attribute_inner_p): Ditto.
17270 (ix86_init_mmx_sse_builtins): Add special_args2.
17271 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17272 TARGET_WBNOINVD_P): New.
17273 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17274 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17275 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17276 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17277 * config/i386/pconfigintrin.h: New file.
17278 * config/i386/wbnoinvdintrin.h: Ditto.
17279 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17281 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17283 2018-03-05 Richard Biener <rguenther@suse.de>
17285 PR tree-optimization/84670
17286 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17288 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17289 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17290 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17291 doesn't grow if all successors (recursively) were visited at least
17294 2018-03-05 Richard Biener <rguenther@suse.de>
17296 PR tree-optimization/84650
17297 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17298 if executed in the loop pipeline.
17300 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17302 * doc/configfiles.texi (Configuration Files): Move info about
17303 conditionalizing $target-protos.h to...
17304 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17305 differs from $target-protos.h.
17307 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17308 Chung-Ju Wu <jasonwucj@gmail.com>
17310 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17311 * config/nds32/nds32-multiple.md (setmemsi): Define.
17312 * config/nds32/nds32-memory-manipulation.c
17313 (nds32_gen_dup_4_byte_to_word_value): New.
17314 (emit_setmem_word_loop): New.
17315 (emit_setmem_byte_loop): New.
17316 (nds32_expand_setmem_loop): New.
17317 (nds32_expand_setmem_loop_v3m): New.
17318 (nds32_expand_setmem_unroll): New.
17319 (nds32_expand_setmem): New.
17321 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17322 Chung-Ju Wu <jasonwucj@gmail.com>
17324 * config/nds32/nds32-memory-manipulation.c
17325 (nds32_emit_load_store): New.
17326 (nds32_emit_post_inc_load_store): New.
17327 (nds32_emit_mem_move): New.
17328 (nds32_emit_mem_move_block): New.
17329 (nds32_expand_movmemsi_loop_unknown_size): New.
17330 (nds32_expand_movmemsi_loop_known_size): New.
17331 (nds32_expand_movmemsi_loop): New.
17332 (nds32_expand_movmemsi_unroll): New.
17333 (nds32_expand_movmemqi): Rename ...
17334 (nds32_expand_movmemsi): ... to this.
17335 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17336 (movmemsi): ... to this.
17337 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17338 (nds32_expand_movmemsi): ... to this.
17340 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17341 Monk Chiang <sh.chiang04@gmail.com>
17342 Chung-Ju Wu <jasonwucj@gmail.com>
17344 * config/nds32/nds32-protos.h
17345 (nds32_expand_load_multiple): New arguments.
17346 (nds32_expand_store_multiple): Ditto.
17347 (nds32_valid_multiple_load_store): Rename ...
17348 (nds32_valid_multiple_load_store_p): ... to this.
17349 * config/nds32/nds32-memory-manipulation.c
17350 (nds32_expand_load_multiple): Refine implementation.
17351 (nds32_expand_store_multiple): Ditto.
17352 * config/nds32/nds32-multiple.md
17353 (load_multiple): Update nds32_expand_load_multiple interface.
17354 (store_multiple): Update nds32_expand_store_multiple interface.
17355 * config/nds32/nds32-predicates.c
17356 (nds32_valid_multiple_load_store): Rename ...
17357 (nds32_valid_multiple_load_store_p): ... to this and refine
17359 * config/nds32/predicates.md
17360 (nds32_load_multiple_and_update_address_operation): New predicate.
17361 (nds32_store_multiple_and_update_address_operation): New predicate.
17363 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17364 Chung-Ju Wu <jasonwucj@gmail.com>
17366 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17367 (combo): New attribute.
17368 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17370 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17372 * config/nds32/nds32.opt: Change -mcmodel= default value.
17374 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17375 Monk Chiang <sh.chiang04@gmail.com>
17376 Chung-Ju Wu <jasonwucj@gmail.com>
17378 * config/nds32/constants.md (unspec_element): New enum.
17379 * config/nds32/constraints.md (Umw): New constraint.
17380 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17381 * config/nds32/nds32-intrinsic.md: Likewise.
17382 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17383 (nds32_valid_smw_lwm_base_p): New.
17384 (nds32_output_smw_single_word): New.
17385 (nds32_output_lmw_single_word): New.
17386 (nds32_expand_unaligned_load): New.
17387 (nds32_expand_unaligned_store): New.
17388 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17389 (nds32_output_smw_single_word): Declare.
17390 (nds32_output_lmw_single_word): Declare.
17391 (nds32_expand_unaligned_load): Declare.
17392 (nds32_expand_unaligned_store): Declare.
17393 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17394 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17395 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17396 NDS32_BUILTIN_UASTORE_DW.
17397 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17400 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17401 Kito Cheng <kito.cheng@gmail.com>
17402 Chung-Ju Wu <jasonwucj@gmail.com>
17404 * config/nds32/nds32-intrinsic.c
17405 (nds32_expand_builtin_null_ftype_reg): Delete.
17406 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17407 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17408 (nds32_read_argument): New.
17409 (nds32_legitimize_target): Ditto.
17410 (nds32_legitimize_argument): Ditto.
17411 (nds32_check_constant_argument): Ditto.
17412 (nds32_expand_unop_builtin): Ditto.
17413 (nds32_expand_unopimm_builtin): Ditto.
17414 (nds32_expand_binop_builtin): Ditto.
17415 (nds32_builtin_decl_impl): Ditto.
17416 (builtin_description): Ditto.
17417 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17418 (nds32_init_builtins_impl): Ditto.
17419 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17420 (nds32_builtin_decl): New.
17421 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17422 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17424 2018-03-02 Jeff Law <law@redhat.com>
17426 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17427 (redundant_insn, fill_simple_delay_slots): Likewise.
17428 (fill_slots_from_thread): Likewise.
17429 * resource.c (mark_referenced_resources): Likewise.
17430 (mark_set_resources, find_dead_or_set_registers): Likewise.
17432 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17434 * substring-locations.h (format_warning_va): Formatting fix for
17435 ATTRIBUTE_GCC_DIAG.
17436 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17438 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17439 * substring-locations.c: Include intl.h.
17440 (format_warning_va): Turned into small wrapper around
17441 format_warning_n_va, renamed to ...
17442 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17443 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17445 (format_warning_at_substring_n): New function.
17446 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17447 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17448 format_warning_at_substring with just a shorter name instead of
17449 const function pointer.
17450 (fmtwarn_n): New function.
17451 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17452 appropriate, get rid of all the fmtstr temporaries, move conditionals
17453 with G_() wrapped string literals directly into fmtwarn arguments,
17454 cast dir.len to (int), formatting fixes.
17456 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17458 * doc/invoke.texi: Remove "Cilk Plus" references.
17460 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17461 Richard Biener <rguenther@suse.de>
17464 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17465 for error or warning attributes if CALL_FROM_THUNK_P is set.
17468 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17471 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17472 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17475 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17476 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17478 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17479 instead of -1U in last predictors element's probability member.
17481 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17484 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17485 arguments if they are comparable.
17487 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17489 PR tree-optimization/84634
17490 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17491 masks and masked_loop_p with a single loop_masks, making sure it's
17492 null for bb vectorization.
17494 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17496 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17497 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17498 loop->force_vectorize to check whether there is no alias.
17500 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17503 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17505 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17507 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17508 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17509 instead of a loop around prev_real_insn.
17510 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17513 PR inline-asm/84625
17514 * config/i386/i386.c (ix86_print_operand): Use conditional
17515 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17518 2018-03-02 Richard Biener <rguenther@suse.de>
17520 PR tree-optimization/84427
17521 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17522 (bitmap_set_subtract_values): Rewrite to handle multiple
17525 (prune_clobbered_mems): Likewise.
17526 (phi_translate): Take edge instead of pred/phiblock.
17527 (phi_translate_1): Likewise.
17528 (phi_translate_set): Likewise. Insert all translated
17529 exprs for a value into the set, keeping possibly multiple
17530 expressions per value.
17531 (compute_antic_aux): Adjust for phi_translate changes.
17532 When intersecting union the expressions and prune those
17533 not in the final value set, keeping possibly multiple
17534 expressions per value. Do not use value-insertion
17535 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17536 all expressions. Add verification that the value-sets
17537 only shrink during iteration.
17538 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17539 (do_pre_regular_insertion): Likewise.
17540 (do_pre_partial_partial_insertion): Likewise.
17542 2018-03-02 Richard Biener <rguenther@suse.de>
17545 * config/darwin.c (saved_debug_info_level): New static global.
17546 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17547 (darwin_asm_lto_end): Restore debug info generation settings.
17549 2018-03-01 Martin Liska <mliska@suse.cz>
17552 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17553 volatile arguments.
17555 2018-03-01 Richard Biener <rguenther@suse.de>
17558 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17559 type annotation with LTO when debug was disabled at compile-time.
17561 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17563 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17565 (mips_final_postscan_insn): Likewise.
17567 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17569 PR rtl-optimization/84528
17570 * alias.c (init_alias_target): Add commentary.
17571 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17572 a unique base value if the frame pointer is not eliminated
17573 to the stack pointer.
17575 2018-03-01 Tom de Vries <tom@codesourcery.com>
17577 PR rtl-optimization/83327
17578 * lra-int.h (hard_regs_spilled_into): Declare.
17579 * lra.c (hard_regs_spilled_into): Define.
17580 (init_reg_info): Init hard_regs_spilled_into.
17581 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17582 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17583 (process_bb_lives): Handle hard_regs_spilled_into.
17584 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17585 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17587 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17589 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17590 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17591 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17592 * config/rs6000/aix72.h: New file.
17594 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17596 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17597 instead of warning_at with conditional singular and plural messages
17601 * stor-layout.c (update_alignment_for_field): For
17602 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17603 && !DECL_PACKED (field), do the alignment update, just use
17604 only desired_align instead of MAX (type_align, desired_align)
17606 (place_field): Don't do known_align < desired_align handling
17607 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17608 is non-NULL, instead do it after rli->prev_field handling and
17609 only if not within a bitfield word. For DECL_PACKED (field)
17610 use type_align of BITS_PER_UNIT.
17612 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17614 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17615 superfluous parentheses and trailing spaces.
17617 2018-02-28 Richard Biener <rguenther@suse.de>
17619 PR tree-optimization/84584
17620 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17621 SCoPs with fake exit edge.
17623 2018-02-28 Martin Liska <mliska@suse.cz>
17626 * timevar.c (timer::print): Fix format to properly print 100%
17629 2018-02-28 Richard Biener <rguenther@suse.de>
17631 PR middle-end/84607
17632 * genmatch.c (capture_info::walk_match): Do not mark
17633 captured expressions without operands as expr_p given
17634 they act more like predicates and should be subject to
17635 "lost tail" side-effect preserving.
17637 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17639 PR rtl-optimization/81611
17640 * auto-inc-dec.c (attempt_change): Move dead note from
17641 mem_insn if it's the next use of regno
17642 (find_address): Take address use of reg holding
17643 non-incremented value. Add parm to limit search to the named
17645 (merge_in_block): Attempt to use a mem insn that is the next
17646 use of the original regno.
17648 2018-02-27 Martin Sebor <msebor@redhat.com>
17651 * doc/invoke.texi (-Wmissing-attributes): New option.
17652 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17654 2018-02-27 Martin Sebor <msebor@redhat.com>
17656 PR translation/84207
17657 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17658 n argument to unsigned HOST_WIDE_INT.
17659 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17660 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17661 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17662 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17664 2018-02-27 Richard Biener <rguenther@suse.de>
17666 PR tree-optimization/84512
17667 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17668 Do not use the estimate returned from record_stmt_cost for
17669 the scalar iteration cost but sum properly using add_stmt_cost.
17671 2018-02-27 Richard Biener <rguenther@suse.de>
17673 PR tree-optimization/84466
17674 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17675 Adjust last change to less strictly validate use operands.
17677 2018-02-27 Martin Liska <mliska@suse.cz>
17679 PR gcov-profile/84548
17680 * gcov.c (process_file): Allow partial overlap and consider it
17681 also as group functions.
17682 (output_lines): Properly calculate range of lines for a group.
17684 2018-02-27 Martin Liska <mliska@suse.cz>
17686 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17687 'ggc' suffixes. Change first column width.
17688 (timer::print): Fix formatting of the column.
17690 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17692 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17693 preserve inline entry blocks for the sake of debug inline
17694 entry point markers alone.
17695 (remove_unused_locals): Suggest in comments a better place to
17696 force the preservation of inline entry blocks that are
17697 otherwise unused, but do not preserve them.
17699 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17701 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17703 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17706 * config/i386/constraints.md (Bs): Replace
17707 ix86_indirect_branch_register with
17708 TARGET_INDIRECT_BRANCH_REGISTER.
17710 * config/i386/i386.md (indirect_jump): Likewise.
17711 (tablejump): Likewise.
17712 (*sibcall_memory): Likewise.
17713 (*sibcall_value_memory): Likewise.
17714 Peepholes of indirect call and jump via memory: Likewise.
17715 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17716 (*sibcall_value_GOT_32): Likewise.
17717 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17718 (GOT_memory_operand): Likewise.
17719 (call_insn_operand): Likewise.
17720 (sibcall_insn_operand): Likewise.
17721 (GOT32_symbol_operand): Likewise.
17722 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17724 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17726 PR rtl-optimization/83496
17727 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17728 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17729 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17730 redundant insn, if any.
17731 (relax_delay_slots): Likewise.
17732 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17734 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17736 PR tree-optimization/83965
17737 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17738 that grouped statements are part of a reduction chain. Return
17739 true if the statement is not marked as a reduction itself but
17740 is part of a group.
17741 (vect_recog_dot_prod_pattern): Don't check whether the statement
17742 is part of a group here.
17743 (vect_recog_sad_pattern): Likewise.
17744 (vect_recog_widen_sum_pattern): Likewise.
17746 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17749 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17751 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17754 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17756 (ix86_output_indirect_function_return): New prototype.
17757 (ix86_split_simple_return_pop_internal): Likewise.
17758 * config/i386/i386.c (indirect_return_via_cx): New.
17759 (indirect_return_via_cx_bnd): Likewise.
17760 (indirect_thunk_name): Handle return va CX_REG.
17761 (output_indirect_thunk_function): Create alias for
17762 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17763 (ix86_output_indirect_jmp): Remove the bool argument.
17764 (ix86_output_indirect_function_return): New function.
17765 (ix86_split_simple_return_pop_internal): Likewise.
17766 * config/i386/i386.md (*indirect_jump): Don't pass false
17767 to ix86_output_indirect_jmp.
17768 (*tablejump_1): Likewise.
17769 (simple_return_pop_internal): Change it to define_insn_and_split.
17770 Call ix86_split_simple_return_pop_internal to split it for
17771 -mfunction-return=.
17772 (simple_return_indirect_internal): Call
17773 ix86_output_indirect_function_return instead of
17774 ix86_output_indirect_jmp.
17776 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17779 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17780 memset and value initialization afterwards.
17782 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17784 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17786 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17789 * common/config/aarch64/aarch64-common.c
17790 (aarch_option_optimization_table[]): Switch
17791 off fomit-frame-pointer
17793 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17794 Chung-Ju Wu <jasonwucj@gmail.com>
17796 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17798 (store_multiple): Ditto.
17800 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17802 * config.gcc: Add --with-cpu support for nds32 target.
17803 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17804 * config/nds32/nds32.opt: Add -mcpu= option.
17806 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17808 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17809 isel=yes): Warn for these deprecated options.
17811 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17813 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17814 ISA_2_5_MASKS_EMBEDDED.
17816 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17818 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17819 p->max as pointers rather than using iterative_hash_expr.
17821 2018-02-23 Carl Love <cel@us.ibm.com>
17823 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17824 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17826 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17827 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17828 P8V_BUILTIN_VEC_VUNSIGNED2.
17830 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17833 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17834 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17836 * lra-constraints.c (curr_insn_transform): Set up
17837 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17839 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17840 * lra-eliminations.c (spill_pseudos): Ditto.
17841 (process_insn_for_elimination): Ditto.
17842 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17843 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17844 LRA_NON_CLOBBERED_ALT.
17846 2018-02-22 Martin Sebor <msebor@redhat.com>
17848 PR tree-optimization/84480
17849 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17850 to maybe_diag_stxncpy_trunc. Call it.
17851 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17852 from gimple_fold_builtin_strcpy. Print inlining stack.
17853 (handle_builtin_stxncpy): Print inlining stack.
17854 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17856 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17859 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17860 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17861 and -fcheck-pointer-bounds are used together.
17862 (indirect_thunk_prefix): New enum.
17863 (indirect_thunk_need_prefix): New function.
17864 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17865 "_nt" instead of "_bnd" for NOTRACK prefix.
17866 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17867 (output_indirect_thunk_function): Likewise.
17869 (ix86_code_end): Update output_indirect_thunk_function calls.
17870 (ix86_output_indirect_branch_via_reg): Replace
17871 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17872 (ix86_output_indirect_branch_via_push): Likewise.
17873 (ix86_output_function_return): Likewise.
17874 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17875 incompatible with -fcf-protection=branch and
17876 -fcheck-pointer-bounds.
17878 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17881 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17882 Change gcc_assert call to output_operand_lossage.
17884 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17886 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17888 2018-02-22 DJ Delorie <dj@redhat.com>
17889 Sebastian Perta <sebastian.perta@renesas.com>
17890 Oleg Endo <olegendo@gcc.gnu.org>
17892 * config/rx/rx.c (rx_rtx_costs): New function.
17893 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17895 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17897 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17899 2018-02-22 Martin Liska <mliska@suse.cz>
17902 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17903 Add "native" as a possible value.
17905 2018-02-22 Martin Liska <mliska@suse.cz>
17908 * config/i386/i386.c (ix86_option_override_internal):
17909 Add "native" as a possible value for -march and -mtune.
17911 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17914 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17915 to all type variants.
17917 PR tree-optimization/84503
17918 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17919 width as info->bitpos + info->bitsize - start.
17920 (merged_store_group::merge_overlapping): Simplify width computation.
17921 (check_no_overlap): New function.
17922 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17923 start + width and last_order of the group, fail if check_no_overlap
17925 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17926 to group if check_no_overlap fails.
17928 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17930 * config/rs6000/altivec.md: Delete contraint arguments to
17931 define_expand, define_split, and define_peephole2, and in
17932 define_insn_and_split if always unused.
17933 * config/rs6000/darwin.md: Ditto.
17934 * config/rs6000/dfp.md: Ditto.
17935 * config/rs6000/rs6000.md: Ditto.
17936 * config/rs6000/sync.md: Ditto.
17937 * config/rs6000/vector.md: Ditto.
17938 * config/rs6000/vsx.md: Ditto.
17940 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17942 * config/rs6000/altivec.md: Write output control strings as braced
17943 blocks instead of double-quoted strings.
17944 * config/rs6000/darwin.md: Ditto.
17945 * config/rs6000/rs6000.md: Ditto.
17946 * config/rs6000/vector.md: Ditto.
17947 * config/rs6000/vsx.md: Ditto.
17949 2018-02-21 Jason Merrill <jason@redhat.com>
17951 PR c++/84314 - ICE with templates and fastcall attribute.
17952 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17954 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17956 * ipa-cp.c (determine_versionability): Fix comment typos.
17958 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17961 * ipa-cp.c (determine_versionability): Do not version functions caling
17964 2018-02-21 Martin Liska <mliska@suse.cz>
17967 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17968 Add "native" as a possible value.
17969 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17970 the macro when native cpu detection is available.
17972 2018-02-21 Martin Liska <mliska@suse.cz>
17975 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17976 Add "native" as a possible value.
17977 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17978 when native cpu detection is available.
17980 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17981 Martin Sebor <msebor@redhat.com>
17983 PR tree-optimization/84478
17984 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17986 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17987 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17988 support which is conservatively correct, for 2 only stay conservative
17989 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17990 argument to the 2 argument get_range_strlen, adjust 6 arg
17991 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17993 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17994 (gimple_fold_builtin_strlen): Pass true as last argument to
17997 2018-02-20 Martin Sebor <msebor@redhat.com>
17999 PR middle-end/84095
18000 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18001 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18002 (builtin_memref::builtin_memref): Factor out parts into
18003 set_base_and_offset and call it.
18005 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18007 PR middle-end/84406
18008 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18009 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18010 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18011 search at the associated MODE_INT.
18013 2018-02-20 Jeff Law <law@redhat.com>
18015 PR middle-end/82123
18016 PR tree-optimization/81592
18017 PR middle-end/79257
18018 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18019 for range data rather than using global data.
18020 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18021 range data rather than using global data.
18022 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18023 pass it to children as needed.
18024 (struct directive::fmtresult): Similarly.
18025 (struct directive::set_width): Similarly.
18026 (struct directive::set_precision): Similarly.
18027 (format_integer, format_directive, parse_directive): Similarly.
18028 (format_none): Accept unnamed vr_values parameter.
18029 (format_percent, format_floating, format_character): Similarly.
18030 (format_string, format_plain): Similarly.
18031 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18032 the EVRP range analyzer for range data rather than using global data.
18033 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18034 gimple-ssa-evrp-analyze.h
18035 (class sprintf_dom_walker): Add after_dom_children member function.
18036 Add evrp_range_analyzer member.
18037 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18038 range analyzer as needed.
18039 (sprintf_dom_walker::after_dom_children): New member function.
18040 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18042 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18043 (evrp_range_analyzer::pop_to_marker): Likewise.
18045 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18047 PR tree-optimization/84419
18048 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18049 with the required type if its current type is compatible but
18052 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18054 PR middle-end/82004
18055 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18056 after vectorization.
18058 2018-02-20 Martin Liska <mliska@suse.cz>
18061 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18062 possible values if we don't have a hint.
18064 2018-02-20 Martin Liska <mliska@suse.cz>
18068 * final.c (shorten_branches): Build align_tab array with one
18070 * opts.c (finish_options): Add alignment option limit check.
18071 (MAX_CODE_ALIGN): Likewise.
18072 (MAX_CODE_ALIGN_VALUE): Likewise.
18073 * doc/invoke.texi: Document maximum allowed option value for
18074 all -falign-* options.
18076 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18079 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18080 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18081 * var-tracking.c (emit_note_insn_var_location): Remove all references
18082 to NOTE_INSN_CALL_ARG_LOCATION.
18083 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18084 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18085 Use copy_rtx_if_shared.
18086 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18087 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18088 (dwarf2out_var_location): Remove handling of
18089 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18091 * final.c (final_scan_insn): Remove all references to
18092 NOTE_INSN_CALL_ARG_LOCATION.
18093 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18094 before dumping final insns.
18095 * except.c (emit_note_eh_region_end): Remove all references to
18096 NOTE_INSN_CALL_ARG_LOCATION.
18097 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18098 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18099 * config/arc/arc.c (hwloop_optimize): Likewise.
18100 * config/arm/arm.c (create_fix_barrier): Likewise.
18101 * config/s390/s390.c (s390_chunkify_start): Likewise.
18102 * config/sh/sh.c (find_barrier): Likewise.
18103 * config/i386/i386.c (rest_of_insert_endbranch,
18104 ix86_seh_fixup_eh_fallthru): Likewise.
18105 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18106 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18107 * config/frv/frv.c (frv_function_prologue): Likewise.
18108 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18110 (note_outside_basic_block_p): Remove all references to
18111 NOTE_INSN_CALL_ARG_LOCATION.
18112 * gengtype.c (adjust_field_rtx_def): Likewise.
18113 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18115 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18116 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18119 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18122 PR tree-optimization/84452
18123 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18124 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18127 2018-02-19 Martin Liska <mliska@suse.cz>
18130 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18132 2018-02-19 Martin Liska <mliska@suse.cz>
18133 Richard Sandiford <richard.sandiford@linaro.org>
18135 PR tree-optimization/82491
18136 * gimple-fold.c (get_base_constructor): Make earlier bail out
18139 2018-02-19 Carl Love <cel@us.ibm.com>
18141 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18142 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18144 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18145 P8V_BUILTIN_VEC_NEG.
18147 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18149 * config/rl78/rl78.md (movdf): New define expand.
18151 2018-02-19 Martin Liska <mliska@suse.cz>
18154 * doc/invoke.texi: Fix typo.
18155 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18157 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18159 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18160 handle rs6000_single_float and rs6000_double_float specially for
18163 2018-02-16 Jeff Law <law@redhat.com>
18165 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18166 (pop_regs): Use it.
18168 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18171 * ipa-inline.c (inline_small_functions): Fix a typo.
18173 2018-02-16 Nathan Sidwell <nathan@acm.org>
18175 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18177 2018-02-16 Carl Love <cel@us.ibm.com>
18179 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18180 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18181 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18182 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18183 expansion to P8V_BUILTIN_VEC_FLOAT2.
18185 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18187 PR rtl-optimization/70023
18188 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18189 src_regno into account.
18191 2018-02-16 Carl Love <cel@us.ibm.com>
18193 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18194 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18195 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18196 * config/rs6000/rs6000.c: Remove case statements for
18197 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18198 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18199 and P9V_BUILTIN_VEC_VINSERT4B.
18200 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18201 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18202 * config/rs6000/vsx.md:
18203 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18206 2018-02-16 Carl Love <cel@us.ibm.com>
18208 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18210 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18212 * config/rs6000/rs6000-c.c: Add the definitions for
18213 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18214 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18215 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18216 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18217 definition for insert4b and define insn *insert3b_internal.
18218 * doc/extend.texi: Add documentation for vec_extract4b.
18220 2018-02-16 Nathan Sidwell <nathan@acm.org>
18222 * doc/extend.texi (Backwards Compatibility): Mention friend
18223 injection. Note for-scope is deprecated.
18224 * doc/invoke.texi (-ffriend-injection): Deprecate.
18226 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18228 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18229 that moved to I2, also allow destinations that are a paradoxical
18230 subreg (instead of a normal reg).
18232 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18235 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18238 2018-02-16 Richard Biener <rguenther@suse.de>
18240 PR tree-optimization/84037
18241 PR tree-optimization/84016
18243 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18244 Adjust vec_construct for the fact we need additional higher latency
18245 128bit inserts for AVX256 and AVX512 vector builds.
18246 (ix86_add_stmt_cost): Scale vector construction cost for
18249 2018-02-16 Richard Biener <rguenther@suse.de>
18251 PR tree-optimization/84417
18252 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18253 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18254 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18256 2018-02-16 Martin Liska <mliska@suse.cz>
18259 * internal-fn.def (ASAN_CHECK): Set proper flags.
18260 (ASAN_MARK): Likewise.
18262 2018-02-16 Julia Koval <julia.koval@intel.com>
18264 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18265 from PTA_CANNONLAKE.
18267 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18270 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18271 Use ++iter rather than iter++ for std::list iterators.
18272 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18273 defer deleting them until all nodes in the forest are processed. Do
18274 free even leaf nodes. Change to_process into auto_vec.
18277 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18278 * vec.h (vec_default_construct): Use memset instead of placement new
18279 if BROKEN_VALUE_INITIALIZATION is defined.
18280 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18281 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18284 PR rtl-optimization/83723
18285 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18286 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18287 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18289 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18291 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18293 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18295 PR rtl-optimization/81443
18296 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18297 from inner REGs to paradoxical SUBREGs.
18299 2018-02-16 Richard Biener <rguenther@suse.de>
18301 PR tree-optimization/84399
18302 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18303 For operands we can analyze at their definition make sure we can
18304 analyze them at each use as well.
18306 2018-02-16 Richard Biener <rguenther@suse.de>
18308 PR tree-optimization/84190
18309 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18310 volatile accesses if the decl isn't volatile.
18312 2018-02-15 Jason Merrill <jason@redhat.com>
18314 PR c++/84314 - ICE with templates and fastcall attribute.
18315 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18316 TYPE_CANONICAL on an existing type.
18318 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18320 PR tree-optimization/84383
18321 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18322 dstoff nor call operand_equal_p if dstbase is NULL.
18324 PR tree-optimization/84334
18325 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18326 also a CONSTANT_CLASS_P, punt.
18328 2018-02-14 Jim Wilson <jimw@sifive.com>
18330 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18331 first SMALL_OPERAND check. New local min_second_step. Move assert
18332 to where locals are set. Add TARGET_RVC support.
18333 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18335 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18337 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18339 2018-02-14 Martin Sebor <msebor@redhat.com>
18341 PR tree-optimization/83698
18342 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18343 arrays constrain the offset range to their bounds.
18344 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18345 (builtin_access::overlap): Avoid setting the size of overlap if it's
18347 (maybe_diag_overlap): Also consider arrays when deciding what values
18348 of offsets to include in diagnostics.
18350 2018-02-14 Martin Sebor <msebor@redhat.com>
18353 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18354 that correspond to the kind of a declaration.
18356 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18359 * config/pa/pa.md: Load address of PIC label using the linkage table
18360 if the label is nonlocal.
18362 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18364 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18365 warning message if user requests -maltivec=be.
18366 * doc/invoke.texi: Document deprecation of -maltivec=be.
18368 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18371 * config/rs6000/rs6000-c.c: Update definitions for
18372 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18373 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18375 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18378 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18379 add _get_ssp intrinsics. Remove argument from
18380 __builtin_ia32_rdssp[d|q].
18381 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18382 * config/i386/i386-builtin.def: Remove argument from
18383 __builtin_ia32_rdssp[d|q].
18384 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18385 ix86_expand_special_args_builtin for _rdssp[d|q].
18386 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18387 Clear register before usage.
18388 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18389 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18391 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18393 PR tree-optimization/84357
18394 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18395 operand 1 of an ARRAY_REF too.
18397 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18400 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18401 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18403 (set_of_reg): New struct.
18404 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18405 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18406 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18408 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18409 Split into bitclr, bitset, bitinvert patterns if appropriate.
18410 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18411 use rx_fuse_in_memory_bitop.
18412 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18413 to named insn, correct maximum insn length.
18415 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18418 * machmode.def: Define a complex mode for PARTIAL_INT.
18419 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18421 * doc/rtl.texi: Document CSPImode.
18422 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18424 (msp430_hard_regno_nregs_with_padding): Likewise.
18426 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18429 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18431 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18433 PR rtl-optimization/84169
18434 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18435 we generated a parallel as new i3 and we split that to new i2 and i3
18436 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18437 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18438 those to i2, not i1. Partially rewrite this scan code.
18440 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18443 * stor-layout.c (place_field): For variable length fields, adjust
18444 offset_align afterwards not just based on the field's alignment,
18445 but also on the size.
18447 PR middle-end/84309
18448 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18449 of exps and logs in the use_exp2 case.
18451 2018-02-13 Jeff Law <law@redhat.com>
18453 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18454 entry for "vector".
18456 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18459 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18463 * common.opt (gas-loc-support, gas-locview-support): New.
18464 (ginline-points, ginternal-reset-location-views): New.
18465 * doc/invoke.texi: Document them. Use @itemx where intended.
18466 (gvariable-location-views): Adjust.
18467 * target.def (reset_location_view): New.
18468 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18469 (TARGET_RESET_LOCATION_VIEW): New.
18470 * doc/tm.texi: Rebuilt.
18471 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18472 (dwarf2out_default_as_locview_support): New.
18473 (output_asm_line_debug_info): Use option variables.
18474 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18475 (output_loc_list): Likewise.
18476 (add_high_low_attributes): Check option variables.
18477 Don't output entry view attribute in strict mode.
18478 (gen_inlined_subroutine_die): Check option variables.
18479 (dwarf2out_inline_entry): Likewise.
18480 (init_sections_and_labels): Likewise.
18481 (dwarf2out_early_finish): Likewise.
18482 (maybe_reset_location_view): New, from...
18483 (dwarf2out_var_location): ... here. Call it.
18484 * debug.h (dwarf2out_default_as_loc_support): Declare.
18485 (dwarf2out_default_as_locview_support): Declare.
18486 * hooks.c (hook_int_rtx_insn_0): New.
18487 * hooks.h (hook_int_rtx_insn_0): Declare.
18488 * toplev.c (process_options): Take -gas-loc-support and
18489 -gas-locview-support from dwarf2out. Enable
18490 -gvariable-location-views by default only with locview
18491 assembler support. Enable -ginternal-reset-location-views by
18492 default only if the target defines the corresponding hook.
18493 Enable -ginline-points by default if location views are
18494 enabled; force it disabled if statement frontiers are
18496 * tree-inline.c (expand_call_inline): Check option variables.
18497 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18499 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18501 PR tree-optimization/84321
18502 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18503 handling. Also check whether the anti-range contains any values
18504 that satisfy the mask; switch to a VR_RANGE if not.
18506 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18509 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18511 2018-02-13 Martin Jambor <mjambor@suse.cz>
18514 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18515 of call statements, also set location of a load to a temporary.
18517 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18519 * config/rl78/rl78.c (add_vector_labels): New function.
18520 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18521 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18522 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18523 which checks that no arguments are passed.
18524 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18525 * doc/extend.texi: Documentation for the new attribute.
18527 2018-02-13 Andreas Schwab <schwab@suse.de>
18529 * config/riscv/linux.h (CPP_SPEC): Define.
18531 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18534 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18535 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18536 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18537 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18538 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18539 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18540 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18541 temporarily for AES and PCLMUL builtins.
18543 PR tree-optimization/84339
18544 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18545 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18548 PR middle-end/84309
18549 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18550 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18551 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18553 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18555 * omp-simd-clone.h: New file.
18556 * omp-simd-clone.c: Include omp-simd-clone.h.
18557 (expand_simd_clones): No longer static.
18558 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18559 cgraph.h and omp-simd-clone.h.
18560 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18561 (vect_recog_widen_shift_pattern): Formatting fix.
18562 (vect_pattern_recog_1): Don't check optab for calls.
18565 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18566 operands[2] into a REG before using gen_lowpart on it.
18568 2018-02-12 Jeff Law <law@redhat.com>
18571 * config/sh/sh.c (find_barrier): Consider a sibling call
18574 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18575 successfully back substituting a reg.
18577 2018-02-12 Richard Biener <rguenther@suse.de>
18579 PR tree-optimization/84037
18580 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18581 parameter, move visited init to caller.
18582 (vect_slp_analyze_operations): Separate cost from validity
18583 check, initialize visited once for all instances.
18584 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18586 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18588 (vect_model_promotion_demotion_cost): Likewise.
18589 (vectorizable_bswap): Guard cost modeling with !slp_node
18590 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18592 (vectorizable_call): Likewise.
18593 (vectorizable_conversion): Likewise.
18594 (vectorizable_assignment): Likewise.
18595 (vectorizable_shift): Likewise.
18596 (vectorizable_operation): Likewise.
18597 (vectorizable_store): Likewise.
18598 (vectorizable_load): Likewise.
18599 (vectorizable_condition): Likewise.
18600 (vectorizable_comparison): Likewise.
18602 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18605 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18606 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18607 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18609 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18611 PR middle-end/83665
18612 * params.def (inline-min-speedup): Increase from 8 to 15.
18613 (max-inline-insns-auto): Decrease from 40 to 30.
18614 * ipa-split.c (consider_split): Add some buffer for function to
18615 be considered inlining candidate.
18616 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18619 2018-02-12 Richard Biener <rguenther@suse.de>
18621 PR tree-optimization/84037
18622 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18623 matched stmts if we cannot swap the non-matched ones.
18625 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18627 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18628 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18629 _mm_maskz_scalef_round_ss): New intrinsics.
18630 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18631 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18632 __builtin_ia32_scalefss_round): Remove.
18633 (__builtin_ia32_scalefsd_mask_round,
18634 __builtin_ia32_scalefss_mask_round): New intrinsics.
18635 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18636 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18637 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18638 "<round_constraint>")): Changed to ...
18639 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18640 "<round_scalar_constraint>")): ... this.
18641 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18642 %0, %1, %2<round_op3>}"): Changed to ...
18643 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18644 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18645 %2<round_scalar_mask_op3>}"): ... this.
18646 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18648 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18650 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18651 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18652 (_mm_maskz_sqrt_round_ss): New intrinsics.
18653 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18654 (__builtin_ia32_sqrtsd_mask_round)
18655 (__builtin_ia32_sqrtss_mask_round): New builtins.
18656 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18657 (__builtin_ia32_sqrtss_round): Remove.
18658 (__builtin_ia32_sqrtsd_mask_round)
18659 (__builtin_ia32_sqrtss_mask_round): New builtins.
18660 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18661 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18662 ((match_operand:VF_128 1 "vector_operand"
18663 "xBm,<round_constraint>")): Changed to ...
18664 ((match_operand:VF_128 1 "vector_operand"
18665 "xBm,<round_scalar_constraint>")): ... this.
18666 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18667 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18668 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18669 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18670 %<iptr>1<round_scalar_mask_op3>}): ... this.
18671 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18672 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18674 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18677 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18678 Cast vec_cmpeq result to correct type.
18679 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18680 Cast vec_cmpgt result to correct type.
18682 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18684 * final.c (final_scan_insn_1): Renamed from...
18685 (final_scan_insn): ... this. New wrapper, to recover
18686 seen from the outermost call in recursive ones.
18687 * config/sparc/sparc.c (output_return): Drop seen from call.
18688 (output_sibcall): Likewise.
18689 * config/visium/visium.c (output_branch): Likewise.
18691 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18693 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18696 2018-02-10 Alan Modra <amodra@gmail.com>
18699 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18700 Specify LR as an input.
18702 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18705 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18706 remove_member_access_dummy_vars): New functions.
18707 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18708 lower_omp_1, execute_lower_omp): Use them.
18710 PR rtl-optimization/84308
18711 * shrink-wrap.c (spread_components): Release todo vector.
18713 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18715 PR rtl-optimization/57193
18716 * ira-color.c (struct allocno_color_data): Add member
18717 conflict_allocno_hard_prefs.
18718 (update_conflict_allocno_hard_prefs): New.
18719 (bucket_allocno_compare_func): Add a preference based on
18720 conflict_allocno_hard_prefs.
18721 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18722 (color_allocnos): Remove a dead code. Initiate
18723 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18725 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18728 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18729 constraint from =wa to wa. Avoid a subreg on the output operand,
18730 instead use a pseudo and subreg it in a move.
18731 (p9_xxbrd_<mode>): Changed to ...
18732 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18733 (p9_xxbrd_v2df): New expander.
18734 (p9_xxbrw_<mode>): Changed to ...
18735 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18736 (p9_xxbrw_v4sf): New expander.
18738 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18740 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18742 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18745 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18746 multiply in 32-bit mode.
18747 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18748 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18751 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18753 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18754 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18755 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18756 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18758 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18761 * dwarf2out.c (is_trivial_indirect_ref): New function.
18762 (dwarf2out_late_global_decl): Do not generate a location
18763 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18764 and that are not defined in the current unit.
18766 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18768 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18769 instead of a libcall for UNORDERED.
18771 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18774 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18775 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18777 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18780 * config/s390/s390.c (s390_set_current_function): Invoke
18781 s390_indirect_branch_settings also if fndecl didn't change.
18783 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18785 * config/rs6000/rs6000.md (blockage): Set length to zero.
18787 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18789 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18791 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18794 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18795 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18799 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18800 PARALLEL incoming that failed vt_get_decl_and_offset check.
18802 PR middle-end/84237
18803 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18804 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18806 (get_variable_section): For decls in named .bss* sections pass true as
18807 second argument to bss_initializer_p.
18809 2018-02-09 Marek Polacek <polacek@redhat.com>
18810 Jakub Jelinek <jakub@redhat.com>
18813 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18814 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18815 Sync some changes from cxx_fold_indirect_ref.
18817 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18819 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18821 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18822 (BLOCK_INLINE_ENTRY_LABEL): New.
18823 (dwarf2out_var_location): Disregard inline entry markers.
18824 (inline_entry_data): New struct.
18825 (inline_entry_data_hasher): New hashtable type.
18826 (inline_entry_data_hasher::hash): New.
18827 (inline_entry_data_hasher::equal): New.
18828 (inline_entry_data_table): New variable.
18829 (add_high_low_attributes): Add DW_AT_entry_pc and
18830 DW_AT_GNU_entry_view attributes if a pending entry is found
18831 in inline_entry_data_table. Add old entry_pc attribute only
18832 if debug nonbinding markers are disabled.
18833 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18834 markers are enabled.
18835 (block_within_block_p, dwarf2out_inline_entry): New.
18836 (dwarf2out_finish): Check that no entries remained in
18837 inline_entry_data_table.
18838 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18839 (final_scan_insn, notice_source_line): Likewise.
18840 (rest_of_clean_state): Skip inline entry markers.
18841 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18843 * gimple.c (gimple_build_debug_inline_entry): New.
18844 * gimple.h (enum gimple_debug_subcode): Add
18845 GIMPLE_DEBUG_INLINE_ENTRY.
18846 (gimple_build_debug_inline_entry): Declare.
18847 (gimple_debug_inline_entry_p): New.
18848 (gimple_debug_nonbind_marker_p): Adjust.
18849 * insn-notes.def (INLINE_ENTRY): New.
18850 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18851 inline entry marker notes.
18852 (print_insn): Likewise.
18853 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18854 (INSN_DEBUG_MARKER_KIND): Likewise.
18855 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18856 * tree-inline.c (expand_call_inline): Build and insert
18857 debug_inline_entry stmt.
18858 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18859 inline entry blocks early, if nonbind markers are enabled.
18860 (dump_scope_block): Dump fragment info.
18861 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18862 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18863 (gimple_build_debug_inline_entry): New.
18864 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18865 Enable/disable inline entry points too.
18866 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18867 (DEBUG_INSN): Describe inline entry markers.
18869 * common.opt (gvariable-location-views): New.
18870 (gvariable-location-views=incompat5): New.
18871 * config.in: Rebuilt.
18872 * configure: Rebuilt.
18873 * configure.ac: Test assembler for view support.
18874 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18875 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18876 * dwarf2out.c (var_loc_view): New typedef.
18877 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18878 (dwarf2out_locviews_in_attribute): New.
18879 (dwarf2out_locviews_in_loclist): New.
18880 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18881 (enum dw_line_info_opcode): Add LI_adv_address.
18882 (struct dw_line_info_table): Add view.
18883 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18884 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18885 (zero_view_p): New variable.
18886 (ZERO_VIEW_P): New macro.
18887 (output_asm_line_debug_info): New.
18888 (struct var_loc_node): Add view.
18889 (add_AT_view_list, AT_loc_list): New.
18890 (add_var_loc_to_decl): Add view param. Test it against last.
18891 (new_loc_list): Add view params. Record them.
18892 (AT_loc_list_ptr): Handle loc and view lists.
18893 (view_list_to_loc_list_val_node): New.
18894 (print_dw_val): Handle dw_val_class_view_list.
18895 (size_of_die): Likewise.
18896 (value_format): Likewise.
18897 (loc_list_has_views): New.
18898 (gen_llsym): Set vl_symbol too.
18899 (maybe_gen_llsym, skip_loc_list_entry): New.
18900 (dwarf2out_maybe_output_loclist_view_pair): New.
18901 (output_loc_list): Output view list or entries too.
18902 (output_view_list_offset): New.
18903 (output_die): Handle dw_val_class_view_list.
18904 (output_dwarf_version): New.
18905 (output_compilation_unit_header): Use it.
18906 (output_skeleton_debug_sections): Likewise.
18907 (output_rnglists, output_line_info): Likewise.
18908 (output_pubnames, output_aranges): Update version comments.
18909 (output_one_line_info_table): Output view numbers in asm comments.
18910 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18911 Call maybe_gen_llsym.
18912 (loc_list_from_tree_1): Adjust.
18913 (add_AT_location_description): Create view list attribute if
18914 needed, check it's absent otherwise.
18915 (convert_cfa_to_fb_loc_list): Adjust.
18916 (maybe_emit_file): Call output_asm_line_debug_info for test.
18917 (dwarf2out_var_location): Reset views as needed. Precompute
18918 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18919 attribute. Set view.
18920 (new_line_info_table): Reset next view.
18921 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18922 (dwarf2out_source_line): Likewise. Output view resets and labels to
18923 the assembler, or select appropriate line info opcodes.
18924 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18925 (optimize_string_length): Catch it. Adjust.
18926 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18927 dw_val_class_view_list, and remove it if no longer needed.
18928 (hash_loc_list): Hash view numbers.
18929 (loc_list_hasher::equal): Compare them.
18930 (optimize_location_lists): Check whether a view list symbol is
18931 needed, and whether the locview attribute is present, and
18932 whether they match. Remove the locview attribute if no longer
18934 (index_location_lists): Call skip_loc_list_entry for test.
18935 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18936 Use output_dwarf_version.
18937 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18938 (struct dw_val_node): Add val_view_list.
18939 * final.c (SEEN_NEXT_VIEW): New.
18940 (set_next_view_needed): New.
18941 (clear_next_view_needed): New.
18942 (maybe_output_next_view): New.
18943 (final_start_function): Rename to...
18944 (final_start_function_1): ... this. Take pointer to FIRST,
18945 add SEEN parameter. Emit param bindings in the initial view.
18946 (final_start_function): Reintroduce SEEN-less interface.
18947 (final): Rename to...
18948 (final_1): ... this. Take SEEN parameter. Output final pending
18949 next view at the end.
18950 (final): Reintroduce seen-less interface.
18951 (final_scan_insn): Output pending next view before switching
18952 sections or ending a block. Mark the next view as needed when
18953 outputting variable locations. Notify debug backend of section
18954 changes, and of location view changes.
18955 (rest_of_handle_final): Adjust.
18956 * toplev.c (process_options): Autodetect value for debug variable
18957 location views option. Warn on incompat5 without -gdwarf-5.
18958 * doc/invoke.texi (gvariable-location-views): New.
18959 (gvariable-location-views=incompat5): New.
18960 (gno-variable-location-views): New.
18962 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18964 PR tree-optimization/84136
18965 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18966 that the result of find_edge is non-NULL.
18968 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18971 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18972 storing integer register in SImode. Fix cost of 256 and 512
18973 byte aligned SSE register store.
18975 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18977 * config/i386/i386.c (ix86_multiplication_cost): Fix
18978 multiplication cost for TARGET_AVX512DQ.
18980 2018-02-08 Marek Polacek <polacek@redhat.com>
18982 PR tree-optimization/84238
18983 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18986 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18988 PR tree-optimization/84265
18989 * tree-vect-stmts.c (vectorizable_store): Don't treat
18990 VMAT_CONTIGUOUS accesses as grouped.
18991 (vectorizable_load): Likewise.
18993 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18995 PR tree-optimization/81635
18996 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18997 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18998 (test_round_for_mask): New functions.
18999 (wide_int_cc_tests): Call test_round_for_mask.
19000 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19001 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19002 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19003 range returned by get_range_info.
19005 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19008 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19009 * symtab.c: Include builtins.h
19010 (symtab_node::output_to_lto_symbol_table_p): Move here
19011 from lto-streamer-out.c:output_symbol_p.
19012 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19013 (output_symbol_p): Move all logic to symtab.c
19014 (produce_symtab): Update.
19016 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19018 * config/s390/s390-opts.h (enum indirect_branch): Define.
19019 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19020 (s390_indirect_branch_via_thunk)
19021 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19022 (enum s390_indirect_branch_type): Define.
19023 * config/s390/s390.c (struct s390_frame_layout, struct
19024 machine_function): Remove.
19025 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19026 (indirect_branch_table_label_no, indirect_branch_table_name):
19028 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19029 (enum s390_indirect_branch_option): Define.
19030 (s390_return_addr_from_memory): New function.
19031 (s390_handle_string_attribute): New function.
19032 (s390_attribute_table): Add new attribute handler.
19033 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19034 (s390_indirect_branch_via_thunk): New function.
19035 (s390_indirect_branch_via_inline_thunk): New function.
19036 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19037 sibling call optimization for non z10 compiles.
19038 (s390_emit_call): Force indirect branch target to be a single
19039 register. Add r1 clobber for non-z10 compiles.
19040 (s390_emit_epilogue): Emit return jump via return_use expander.
19041 (s390_reorg): Handle JUMP_INSNs as execute targets.
19042 (s390_option_override_internal): Perform validity checks for the
19043 new command line options.
19044 (s390_indirect_branch_attrvalue): New function.
19045 (s390_indirect_branch_settings): New function.
19046 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19047 (s390_output_indirect_thunk_function): New function.
19048 (s390_code_end): Implement target hook.
19049 (s390_case_values_threshold): Implement target hook.
19050 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19052 * config/s390/s390.h (struct s390_frame_layout)
19053 (struct machine_function): Move here from s390.c.
19054 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19055 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19056 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19057 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19058 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19059 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19060 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19061 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19062 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19063 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19064 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19065 (mnemonic attribute): Add values which aren't recognized
19067 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19068 pattern for branch conversion. Fix mnemonic attribute.
19069 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19070 indirect branch via thunk if requested.
19071 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19072 ("*indirect_jump"): Disable for branch conversion using out of
19074 ("indirect_jump_via_thunk<mode>_z10")
19075 ("indirect_jump_via_thunk<mode>")
19076 ("indirect_jump_via_inlinethunk<mode>_z10")
19077 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19078 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19079 ("casesi_jump_via_inlinethunk<mode>_z10")
19080 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19081 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19082 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19083 ("*indirect2_jump"): Disable for branch conversion.
19084 ("casesi_jump"): Turn into expander and expand patterns for branch
19086 ("return_use"): New expander.
19087 ("*return"): Emit return via thunk and rename it to ...
19088 ("*return<mode>"): ... this one.
19089 * config/s390/s390.opt: Add new options and and enum for the
19092 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19094 * lra-constraints.c (match_reload): Unconditionally use
19095 gen_lowpart_SUBREG, rather than selecting between that
19096 and equivalent gen_rtx_SUBREG code.
19098 2018-02-08 Richard Biener <rguenther@suse.de>
19100 PR tree-optimization/84233
19101 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19102 changed flag instead of boguously re-using phi_inserted.
19104 2018-02-08 Martin Jambor <mjambor@suse.cz>
19106 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19107 static local variables.
19109 2018-02-08 Richard Biener <rguenther@suse.de>
19111 PR tree-optimization/84278
19112 * tree-vect-stmts.c (vectorizable_store): When looking for
19113 smaller vector types to perform grouped strided loads/stores
19114 make sure the mode is supported by the target.
19115 (vectorizable_load): Likewise.
19117 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19119 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19120 Increase LDP/STP opportunities by adding adjacent callee-saves.
19122 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19124 PR rtl-optimization/84068
19125 PR rtl-optimization/83459
19126 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19128 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19130 PR tree-optimization/84224
19131 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19132 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19133 non-zero arguments.
19135 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19138 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19139 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19140 count, remove one USE.
19142 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19144 * doc/install.texi (Configuration): Document the
19145 --with-long-double-format={ibm,ieee} PowerPC configuration
19149 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19150 Convert from define_expand to be define_insn_and_split. Rework
19151 float/double/_Float128 conversions to QI/HI/SImode to work with
19152 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19153 conversions to QI/HImode types did a store and then a load to
19154 truncate the value. For conversions to VSX registers, don't split
19155 the insn, instead emit the code directly. Use the code iterator
19156 any_fix to combine signed and unsigned conversions.
19157 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19158 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19159 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19160 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19161 (fix_<mode>di2_hw): Likewise.
19162 (fixuns_<mode>di2_hw): Likewise.
19163 (fix_<mode>si2_hw): Likewise.
19164 (fixuns_<mode>si2_hw): Likewise.
19165 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19166 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19167 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19168 fix<uns>_trunc<SFDF:mode>si2_p8.
19169 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19170 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19171 (fix<uns>_<mode>_mem): Likewise.
19172 (fctiw<u>z_<mode>_mem): Likewise.
19173 (fix<uns>_<mode>_mem): Likewise.
19174 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19175 the register allocator from doing a direct move to the GPRs to do
19176 a store, and instead use the ISA 3.0 store byte/half-word from
19177 vector register instruction. For IEEE 128-bit floating point,
19178 also optimize stores of 32-bit ints.
19179 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19181 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19183 * genextract.c (push_pathstr_operand): New function to support
19185 (walk_rtx): Call push_pathstr_operand.
19186 (print_path): Support [a-zA-Z].
19188 2018-02-07 Richard Biener <rguenther@suse.de>
19190 PR tree-optimization/84037
19191 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19192 (cse_and_gimplify_to_preheader): Declare.
19193 (vect_get_place_in_interleaving_chain): Likewise.
19194 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19196 (_loop_vec_info::~_loop_vec_info): Delete it.
19197 (cse_and_gimplify_to_preheader): New function.
19198 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19199 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19200 (vectorizable_load): Likewise. For grouped stores always base
19201 the IV on the first element.
19202 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19203 condition before gimplifying.
19205 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19207 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19208 *DIV_EXPR and *MOD_EXPR.
19210 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19213 * config/i386/i386.c (ix86_option_override_internal): Mask out
19214 the CF_SET bit when checking -fcf-protection.
19216 2018-02-07 Tom de Vries <tom@codesourcery.com>
19219 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19222 2018-02-07 Richard Biener <rguenther@suse.de>
19224 PR tree-optimization/84204
19225 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19228 PR tree-optimization/84205
19229 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19230 special-case isl_ast_op_zdiv_r.
19232 PR tree-optimization/84223
19233 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19234 Only add conditions from within the region.
19235 (gather_bbs::after_dom_children): Adjust.
19237 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19240 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19241 * config/avr/avr.md: Only post-reload split REG-REG moves if
19242 either register is GENERAL_REG_P.
19244 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19246 PR tree-optimization/84235
19247 * tree-ssa-scopedtables.c
19248 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19249 if the subtraction is performed in floating point type where NaNs are
19250 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19251 build 1. Formatting fix.
19253 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19256 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19257 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19258 and skip it regardless of bb boundaries. Use CALL_P macro,
19259 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19260 unnecessarily, formatting fix.
19262 2018-02-06 Michael Collison <michael.collison@arm.com>
19264 * config/arm/thumb2.md:
19265 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19266 (*thumb_mov_notscc): Ditto.
19268 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19271 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19272 unsigned_fix, not "s".
19274 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19276 * configure.ac (gcc_fn_eh_frame_ro): New function.
19277 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19278 correct .eh_frame permissions.
19279 * configure: Regenerate.
19281 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19283 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19284 irrelevant options.
19286 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19288 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19289 Display warning message for -mno-speculate-indirect-jumps.
19291 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19293 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19295 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19297 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19299 PR tree-optimization/84225
19300 * tree-eh.c (find_trapping_overflow): Only call
19301 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19303 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19306 * config/i386/i386.c: Reimplement the check of possible options
19307 -mibt/-mshstk conbination. Change error messages.
19308 * doc/invoke.texi: Fix a typo: remove extra '='.
19310 2018-02-06 Marek Polacek <polacek@redhat.com>
19312 PR tree-optimization/84228
19313 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19315 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19318 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19319 emitted arch directives.
19320 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19321 __ARM_FEATURE_COPROC before changing architectures.
19323 2018-02-06 Richard Biener <rguenther@suse.de>
19325 * config/i386/i386.c (print_reg): Fix typo.
19326 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19328 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19330 * configure: Regenerate.
19332 2018-02-05 Martin Sebor <msebor@redhat.com>
19334 PR tree-optimization/83369
19335 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19338 2018-02-05 Martin Liska <mliska@suse.cz>
19340 * doc/invoke.texi: Cherry-pick upstream r323995.
19342 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19344 * ira.c (ira_init_register_move_cost): Adjust comment.
19346 2018-02-05 Martin Liska <mliska@suse.cz>
19348 PR gcov-profile/84137
19349 * doc/gcov.texi: Fix typo in documentation.
19351 2018-02-05 Martin Liska <mliska@suse.cz>
19353 PR gcov-profile/83879
19354 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19355 using dlopen functionality.
19357 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19359 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19360 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19361 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19362 _mm_maskz_range_round_ss): New intrinsics.
19363 (__builtin_ia32_rangesd128_round)
19364 (__builtin_ia32_rangess128_round): Remove.
19365 (__builtin_ia32_rangesd128_mask_round,
19366 __builtin_ia32_rangess128_mask_round): New builtins.
19367 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19368 __builtin_ia32_rangess128_round): Remove.
19369 (__builtin_ia32_rangesd128_mask_round,
19370 __builtin_ia32_rangess128_mask_round): New builtins.
19371 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19372 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19373 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19374 "<round_saeonly_constraint>")): Changed to ...
19375 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19376 "<round_saeonly_scalar_constraint>")): ... this.
19377 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19378 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19379 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19380 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19381 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19383 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19385 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19387 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19388 Remove all values except native, 8540 and 8548.
19390 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19392 * config/i386/i386.c (ix86_output_function_return): Pass
19393 INVALID_REGNUM, instead of -1, as invalid register number to
19394 indirect_thunk_name and output_indirect_thunk.
19396 2018-02-02 Julia Koval <julia.koval@intel.com>
19398 * config.gcc: Add -march=icelake.
19399 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19400 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19401 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19402 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19403 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19404 (processor_target_table): Add icelake.
19405 (ix86_option_override_internal): Handle new PTAs.
19406 (get_builtin_code_for_version): Handle icelake.
19407 (M_INTEL_COREI7_ICELAKE): New.
19408 (fold_builtin_cpu): Handle icelake.
19409 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19410 * doc/invoke.texi: Add -march=icelake.
19412 2018-02-02 Julia Koval <julia.koval@intel.com>
19414 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19415 to wide_int_bitmask.
19416 * wide-int-bitmask.h: New.
19418 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19421 * config/i386/i386.md: Replace Pmode with word_mode in
19422 builtin_setjmp_setup and builtin_longjmp to support x32.
19424 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19428 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19430 (rs6000_supported_cpu_names): New static variable.
19431 (linux_cpu_translation_table): Likewise.
19432 (elf_platform) <cpu>: Define new static variable and use it.
19433 Translate kernel AT_PLATFORM name to canonical name if needed.
19434 Error if platform name is unknown.
19436 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19439 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19441 2018-02-01 Jeff Law <law@redhat.com>
19444 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19445 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19446 the scratch if RELEASE_VIA_POP is false.
19447 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19448 If we have to save a temporary register, decrement SIZE appropriately.
19449 Pass new arguments to release_scratch_register_on_entry.
19450 (ix86_adjust_stack_and_probe): Likewise.
19451 (ix86_emit_probe_stack_range): Pass new arguments to
19452 release_scratch_register_on_entry.
19454 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19456 PR rtl-optimization/84157
19457 * combine.c (change_zero_ext): Use REG_P predicate in
19458 front of HARD_REGISTER_P predicate.
19460 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19462 * config/avr/avr.c (avr_option_override): Move disabling of
19463 -fdelete-null-pointer-checks to...
19464 * common/config/avr/avr-common.c (avr_option_optimization_table):
19467 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19469 PR tree-optimization/81635
19470 * tree-data-ref.c (split_constant_offset_1): For types that
19471 wrap on overflow, try to use range info to prove that wrapping
19474 2018-02-01 Renlin Li <renlin.li@arm.com>
19477 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19478 TAILCALL_ADDR_REGS.
19479 (aarch64_register_move_cost): Likewise.
19480 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19481 TAILCALL_ADDR_REGS.
19482 (REG_CLASS_NAMES): Likewise.
19483 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19484 TAILCALL_ADDR_REGS. Remove IP registers.
19485 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19487 2018-02-01 Richard Biener <rguenther@suse.de>
19489 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19490 for specifying RPO order and allow NULL for that.
19491 * domwalk.c (dom_walker::dom_walker): Likewise.
19492 (dom_walker::walk): Handle NULL RPO order.
19493 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19495 (rewrite_update_dom_walker): Likewise.
19496 (mark_def_dom_walker): Likewise.
19498 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19500 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19501 (aarch64_maybe_expand_sve_subreg_move): Declare.
19502 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19503 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19505 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19506 that are semantically a reverse operation.
19507 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19508 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19509 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19511 (aarch64_can_change_mode_class): For big-endian, forbid changes
19512 between two SVE modes if they have different element sizes.
19514 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19516 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19517 the TImode handling for big-endian targets.
19519 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19521 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19522 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19524 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19525 Remove BSWAP handing for big-endian targets and use the form of
19526 LD1RQ appropariate for the mode.
19528 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19530 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19531 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19532 duplicated element.
19534 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19537 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19538 check for operands that need to go through aarch64_sve_reload_be.
19540 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19542 PR tree-optimization/81661
19543 PR tree-optimization/84117
19544 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19545 * tree-eh.c: Include gimplify.h.
19546 (find_trapping_overflow, replace_trapping_overflow,
19547 rewrite_to_non_trapping_overflow): New functions.
19548 * tree-vect-loop.c: Include tree-eh.h.
19549 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19550 * tree-data-ref.c: Include tree-eh.h.
19551 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19553 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19555 PR rtl-optimization/84123
19556 * combine.c (change_zero_ext): Check if hard register satisfies
19557 can_change_dest_mode before calling gen_lowpart_SUBREG.
19559 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19562 * ira.c (ira_init_register_move_cost): Remove assert.
19564 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19566 PR rtl-optimization/84071
19567 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19568 * doc/tm.texi: Regenerate.
19570 2018-01-31 Richard Biener <rguenther@suse.de>
19572 PR tree-optimization/84132
19573 * tree-data-ref.c (analyze_miv_subscript): Properly
19574 check whether evolution_function_is_affine_multivariate_p
19575 before calling gcd_of_steps_may_divide_p.
19577 2018-01-31 Julia Koval <julia.koval@intel.com>
19580 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19581 * config/i386/i386.md (rdpid_rex64) New.
19582 (rdpid): Make 32bit only.
19584 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19587 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19588 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19590 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19593 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19595 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19597 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19599 PR rtl-optimization/84071
19600 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19601 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19603 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19605 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19606 (arc_attribute_table): Add 'aux' attribute.
19607 (arc_in_small_data_p): Consider aux like variables.
19608 (arc_is_aux_reg_p): New function.
19609 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19610 (arc_get_aux_arg): New function.
19611 (prepare_move_operands): Handle aux-register access.
19612 (arc_handle_aux_attribute): New function.
19613 * doc/extend.texi (ARC Variable attributes): Add subsection.
19615 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19617 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19618 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19619 (arc_attribute_table): Add 'uncached' attribute.
19620 (arc_print_operand): Print '.di' flag for uncached memory
19622 (arc_in_small_data_p): Do not consider for small data the uncached
19624 (arc_is_uncached_mem_p): New function.
19625 * config/arc/predicates.md (compact_store_memory_operand): Check
19626 for uncached memory accesses.
19627 (nonvol_nonimm_operand): Likewise.
19628 * doc/extend.texi (ARC Type Attribute): New subsection.
19630 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19633 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19634 falign-loops=): Add Optimization flag.
19636 2018-01-30 Jeff Law <law@redhat.com>
19639 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19640 INT_REGISTERS_SAVED. Check it prior to calling
19641 get_scratch_register_on_entry.
19642 (ix86_adjust_stack_and_probe): Similarly.
19643 (ix86_emit_probe_stack_range): Similarly.
19644 (ix86_expand_prologue): Corresponding changes.
19646 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19649 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19650 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19652 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19655 * lra-constraints.c (curr_insn_transform): Process AND in the
19658 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19660 PR rtl-optimization/83986
19661 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19662 dependence against last_pending_memory_flush in addition to
19663 pending_jump_insns.
19665 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19667 PR tree-optimization/81611
19668 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19671 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19674 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19677 2018-01-30 Richard Biener <rguenther@suse.de>
19678 Jakub Jelinek <jakub@redhat.com>
19680 PR tree-optimization/84111
19681 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19682 inner loops added during recursion, as they don't have up-to-date
19685 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19688 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19689 (can_inline_edge_by_limits_p): ... here.
19690 (can_early_inline_edge_p, check_callers,
19691 update_caller_keys, update_callee_keys, recursive_inlining,
19692 add_new_edges_to_heap, speculation_useful_p,
19693 inline_small_functions,
19694 inline_small_functions, flatten_function,
19695 inline_to_all_callers_1): Update.
19697 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19699 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19702 2018-01-30 Richard Biener <rguenther@suse.de>
19704 PR tree-optimization/83008
19705 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19706 invariant and constant vector uses in stmts when they need
19707 more than one stmt.
19709 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19712 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19713 * configure: Regenerate.
19715 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19717 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19719 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19720 Use gen_rtx_REG rather than gen_lowpart.
19722 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19724 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19725 rather than 0 when creating partial subregs.
19727 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19729 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19732 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19735 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19736 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19737 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19738 flags. This restores the settings used before the 2017-07-24.
19739 Turning off pre increment/decrement/modify allows IVOPTS to
19740 optimize DF/SF loops where the index is an int.
19742 2018-01-29 Richard Biener <rguenther@suse.de>
19743 Kelvin Nilsen <kelvin@gcc.gnu.org>
19746 * tree-vect-stmts.c (vectorizable_call): Don't call
19747 targetm.vectorize_builtin_md_vectorized_function if callee is
19750 2018-01-22 Carl Love <cel@us.ibm.com>
19752 * doc/extend.tex: Fix typo in second arg in
19753 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19755 2018-01-29 Richard Biener <rguenther@suse.de>
19757 PR tree-optimization/84086
19758 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19759 (flush_ssaname_freelist): When SSA names were released reset
19760 the SCEV hash table.
19762 2018-01-29 Richard Biener <rguenther@suse.de>
19764 PR tree-optimization/84057
19765 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19766 removed paths when removing edges.
19768 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19770 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19771 -mfunction-return=@var{choice}.
19773 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19775 PR diagnostic/84034
19776 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19777 Handle CR like TAB.
19778 (layout::print_source_line): Likewise.
19779 (test_get_line_width_without_trailing_whitespace): Add test cases.
19781 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19783 PR middle-end/84040
19784 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19787 2018-01-26 Jim Wilson <jimw@sifive.com>
19789 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19791 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19794 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19796 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19797 and CMP + SUB-immediate -> SUBS.
19799 2018-01-26 Martin Sebor <msebor@redhat.com>
19801 PR tree-optimization/83896
19802 * tree-ssa-strlen.c (get_string_len): Rename...
19803 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19804 Avoid assuming length is constant.
19805 (handle_char_store): Use HOST_WIDE_INT for string length.
19807 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19810 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19811 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19813 2018-01-26 Richard Biener <rguenther@suse.de>
19815 PR rtl-optimization/84003
19816 * dse.c (record_store): Only record redundant stores when
19817 the earlier store aliases at least all accesses the later one does.
19819 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19821 PR rtl-optimization/83985
19822 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19823 REG_CFA_RESTORE insns.
19824 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19825 REG_CFA_RESTORE insns here.
19828 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19829 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19831 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19833 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19834 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19835 (arc_init): Likewise.
19836 (arc_override_options): Likewise.
19837 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19839 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19841 * config/arc/arc.h (TARGET_DBNZ): Define.
19842 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19843 properly set the tune attribute.
19844 (dbnz): Use TARGET_DBNZ guard.
19845 * config/arc/arc.opt (mtune): Add core3 option.
19847 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19849 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19850 recognize new pic like addresses.
19851 (arc_delegitimize_address): Clean up.
19853 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19855 * config/arc/arc-arches.def: Option mrf16 valid for all
19857 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19858 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19859 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19860 * config/arc/arc-tables.opt: Regenerate.
19861 * config/arc/arc.c (arc_conditional_register_usage): Handle
19862 reduced register file case.
19863 (arc_file_start): Set must have build attributes.
19864 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19865 mrf16 option value.
19866 * config/arc/arc.opt (mrf16): Add new option.
19867 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19868 * config/arc/genmultilib.awk: Handle new mrf16 option.
19869 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19870 * config/arc/t-multilib: Regenerate.
19871 * doc/invoke.texi (ARC Options): Document mrf16 option.
19873 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19875 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19876 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19877 (arc_attribute_table): Add 'secure_call' attribute.
19878 (arc_print_operand): Print secure call operand.
19879 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19881 (arc_is_secure_call_p): New function. * config/arc/arc.md
19882 (call_i): Add support for sjli instruction.
19883 (call_value_i): Likewise.
19884 * config/arc/constraints.md (Csc): New constraint.
19886 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19887 John Eric Martin <John.Martin@emmicro-us.com>
19889 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19890 * config/arc/arc.c (_arc_jli_section): New struct.
19891 (arc_jli_section): New type.
19892 (rc_jli_sections): New static variable.
19893 (arc_handle_jli_attribute): New function.
19894 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19895 (arc_file_end): New function.
19896 (TARGET_ASM_FILE_END): Define.
19897 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19898 (arc_add_jli_section): New function.
19899 (jli_call_scan): Likewise.
19900 (arc_reorg): Call jli_call_scan.
19901 (arc_output_addsi): Remove 'S' from printing asm operand.
19902 (arc_is_jli_call_p): New function.
19903 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19905 (movhi_insn): Likewise.
19906 (movsi_insn): Likewise.
19907 (movsi_set_cc_insn): Likewise.
19908 (loadqi_update): Likewise.
19909 (load_zeroextendqisi_update): Likewise.
19910 (load_signextendqisi_update): Likewise.
19911 (loadhi_update): Likewise.
19912 (load_zeroextendhisi_update): Likewise.
19913 (load_signextendhisi_update): Likewise.
19914 (loadsi_update): Likewise.
19915 (loadsf_update): Likewise.
19916 (movsicc_insn): Likewise.
19917 (bset_insn): Likewise.
19918 (bxor_insn): Likewise.
19919 (bclr_insn): Likewise.
19920 (bmsk_insn): Likewise.
19921 (bicsi3_insn): Likewise.
19922 (cmpsi_cc_c_insn): Likewise.
19923 (movsi_ne): Likewise.
19924 (movsi_cond_exec): Likewise.
19925 (clrsbsi2): Likewise.
19926 (norm_f): Likewise.
19936 (call_i): Remove 'S' asm letter, add jli instruction.
19937 (call_value_i): Likewise.
19938 * config/arc/arc.op (mjli-always): New option.
19939 * config/arc/constraints.md (Cji): New constraint.
19940 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19942 (subsf3_fpx): Likewise.
19943 (mulsf3_fpx): Likewise.
19944 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19946 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19947 function attrbutes.
19948 * doc/invoke.texi (ARC): Document mjli-always option.
19950 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19952 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19953 avoid addition with 0 and use incw and decw where possible.
19955 2018-01-26 Richard Biener <rguenther@suse.de>
19957 PR tree-optimization/81082
19958 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19959 association if it requires casting to unsigned.
19960 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19961 from fold_plusminus_mult_expr to catch important cases late when
19962 range info is available.
19964 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19966 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19967 * configure.ac (hidden_linkonce): New test.
19968 * configure: Regenerate.
19969 * config.in: Regenerate.
19971 2018-01-26 Julia Koval <julia.koval@intel.com>
19973 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19974 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19975 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19976 _mm_mask_bitshuffle_epi64_mask): Fix type.
19977 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19978 USI_FTYPE_V4DI_V4DI_USI): Remove.
19979 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19980 __builtin_ia32_vpshufbitqmb256_mask,
19981 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19982 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19983 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19985 2018-01-26 Alan Modra <amodra@gmail.com>
19988 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19989 UNSPEC_VBPERMQ. Sort other unspecs.
19991 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19993 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19995 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19997 PR middle-end/83055
19998 * predict.c (drop_profile): Do not push/pop cfun; update also
20000 (handle_missing_profiles): Fix logic looking for zero profiles.
20002 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20004 PR middle-end/83977
20005 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20006 on functions with #pragma omp declare simd or functions with simd
20008 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20009 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20010 Remove trailing \n from warning_at calls.
20012 2018-01-25 Tom de Vries <tom@codesourcery.com>
20015 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20016 for neutered workers.
20018 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20021 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20022 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20024 2018-01-24 Jeff Law <law@redhat.com>
20027 * i386.c (get_probe_interval): Move to earlier point.
20028 (ix86_compute_frame_layout): If -fstack-clash-protection and
20029 the frame is larger than the probe interval, then use pushes
20030 to save registers rather than reg->mem moves.
20031 (ix86_expand_prologue): Remove conditional for int_registers_saved
20034 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20037 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20038 min/max for never referenced object.
20040 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20042 PR middle-end/83977
20043 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20045 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20046 attributes from DECL_ATTRIBUTES (decl) without affecting
20047 DECL_ATTRIBUTES (current_function_decl).
20048 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20049 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20051 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20053 PR tree-optimization/83979
20054 * fold-const.c (fold_comparison): Use constant_boolean_node
20055 instead of boolean_{true,false}_node.
20057 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20059 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20062 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20064 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20065 Simplify the clause that sets the length attribute.
20066 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20067 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20068 clause that sets the length attribute.
20069 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20071 2018-01-24 Tom de Vries <tom@codesourcery.com>
20074 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20075 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20076 Add strict parameter.
20077 (prevent_branch_around_nothing): Insert dummy insn between branch to
20078 label and label with no ptx insn inbetween.
20079 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20081 2018-01-24 Tom de Vries <tom@codesourcery.com>
20084 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20085 for neutered threads in warp.
20086 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20088 2018-01-24 Richard Biener <rguenther@suse.de>
20090 PR tree-optimization/83176
20091 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20094 2018-01-24 Richard Biener <rguenther@suse.de>
20096 PR tree-optimization/82819
20097 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20098 code generating pluses that are no-ops in the target precision.
20100 2018-01-24 Richard Biener <rguenther@suse.de>
20102 PR middle-end/84000
20103 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20105 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20107 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20108 to merge probabilities.
20109 * predict.c (probably_never_executed): Also mark as cold functions
20110 with global 0 profile and guessed local profile.
20111 * profile-count.c (profile_probability::combine_with_count): New
20113 * profile-count.h (profile_probability::operator*,
20114 profile_probability::operator*=, profile_probability::operator/,
20115 profile_probability::operator/=): Reduce precision to adjusted
20116 and set value to guessed on contradictory divisions.
20117 (profile_probability::combine_with_freq): Remove.
20118 (profile_probability::combine_wiht_count): Declare.
20119 (profile_count::force_nonzero):: Set to adjusted.
20120 (profile_count::probability_in):: Set quality to adjusted.
20121 * tree-ssa-tail-merge.c (replace_block_by): Use
20122 combine_with_count.
20124 2018-01-23 Andrew Waterman <andrew@sifive.com>
20125 Jim Wilson <jimw@sifive.com>
20127 * config/riscv/riscv.c (riscv_stack_boundary): New.
20128 (riscv_option_override): Set riscv_stack_boundary. Handle
20129 riscv_preferred_stack_boundary_arg.
20130 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20131 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20132 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20133 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20134 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20135 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20137 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20140 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20141 of struct ix86_frame.
20142 (ix86_expand_epilogue): Likewise. Add a local variable for
20143 the reg_save_offset field in struct ix86_frame.
20145 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20147 PR tree-optimization/82604
20148 * tree-loop-distribution.c (enum partition_kind): New enum item
20149 PKIND_PARTIAL_MEMSET.
20150 (partition_builtin_p): Support above new enum item.
20151 (generate_code_for_partition): Ditto.
20152 (compute_access_range): Differentiate cases that equality can be
20153 proven at all loops, the innermost loops or no loops.
20154 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20155 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20156 (finalize_partitions, distribute_loop): Don't fuse partition of
20157 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20158 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20159 parloop is enabled.
20161 2018-01-23 Martin Liska <mliska@suse.cz>
20163 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20164 order to ignore the predictor.
20165 (PRED_POLYMORPHIC_CALL): Likewise.
20166 (PRED_RECURSIVE_CALL): Likewise.
20168 2018-01-23 Martin Liska <mliska@suse.cz>
20170 * tree-profile.c (tree_profiling): Print function header to
20171 aware reader which function we are working on.
20172 * value-prof.c (gimple_find_values_to_profile): Do not print
20173 not interesting value histograms.
20175 2018-01-23 Martin Liska <mliska@suse.cz>
20177 * profile-count.h (enum profile_quality): Add
20178 profile_uninitialized as the first value. Do not number values
20179 as they are zero based.
20180 (profile_count::verify): Update sanity check.
20181 (profile_probability::verify): Likewise.
20183 2018-01-23 Nathan Sidwell <nathan@acm.org>
20185 * doc/invoke.texi (ffor-scope): Deprecate.
20187 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20189 PR tree-optimization/83510
20190 * domwalk.c (set_all_edges_as_executable): New function.
20191 (dom_walker::dom_walker): Convert bool param
20192 "skip_unreachable_blocks" to enum reachability. Move setup of
20193 edge flags to set_all_edges_as_executable and only do it when
20194 reachability is REACHABLE_BLOCKS.
20195 * domwalk.h (enum dom_walker::reachability): New enum.
20196 (dom_walker::dom_walker): Convert bool param
20197 "skip_unreachable_blocks" to enum reachability.
20198 (set_all_edges_as_executable): New decl.
20199 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20200 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20202 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20203 but converting true to REACHABLE_BLOCKS.
20204 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20206 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20207 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20208 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20210 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20211 if check_all_array_refs will be called.
20213 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20215 * tree.c (selftest::test_location_wrappers): Add more test
20218 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20220 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20221 (selftest::test_bit_in_range): Likewise.
20223 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20226 * doc/sourcebuild.texi (vect_float): Say that the selector
20227 only describes the situation when -funsafe-math-optimizations is on.
20228 (vect_float_strict): Document.
20230 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20232 PR tree-optimization/83965
20233 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20234 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20235 instead of checking only for a reduction.
20236 (vect_recog_widen_sum_pattern): Likewise.
20238 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20240 * predict.c (probably_never_executed): Only use precise profile info.
20241 (compute_function_frequency): Skip after inlining hack since we now
20242 have quality checking.
20244 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20246 * profile-count.h (profile_probability::very_unlikely,
20247 profile_probability::unlikely, profile_probability::even): Set
20248 precision to guessed.
20250 2018-01-23 Richard Biener <rguenther@suse.de>
20252 PR tree-optimization/83963
20253 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20254 Properly terminate dominator walk when crossing the exit edge not
20255 when visiting its source block.
20257 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20260 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20261 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20263 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20265 PR tree-optimization/83957
20266 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20267 semicolon after for body surrounded by braces.
20269 PR tree-optimization/83081
20270 * profile-count.h (profile_probability::split): New method.
20271 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20272 Use profile_probability::split.
20273 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20274 when splitting a single conditional jump into 2.
20276 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20278 PR tree-optimization/69452
20279 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20282 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20284 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20285 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20286 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20288 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20290 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20292 * config/rl78/rl78.md (movdi): New define_expand.
20293 * config/rl78/rl78.c (rl78_split_movdi): New function.
20295 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20298 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20300 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20301 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20302 128-bit to produce an UNSPEC move to get the double word with the
20303 signbit and then a shift directly to do signbit.
20304 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20305 implementation with a new version that just does either a direct
20306 move or a regular move. Move memory interface to separate insns.
20307 Move insns so they are next to the expander.
20308 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20309 with signbit move. Split big and little endian case.
20310 (signbit<mode>2_dm_mem_le): Likewise.
20311 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20312 (signbit<mode>2_dm2): Likewise.
20314 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20316 * config/rl78/rl78.md (anddi3): New define_expand.
20318 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20320 * config/rl78/rl78.md (umindi3): New define_expand.
20322 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20324 * config/rl78/rl78.md (smindi3): New define_expand.
20326 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20328 * config/rl78/rl78.md (smaxdi3): New define_expand.
20330 2018-01-22 Carl Love <cel@us.ibm.com>
20332 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20333 LVX_V1TI): Add macro expansion.
20334 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20335 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20336 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20337 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20338 Change check to determine if the instruction is a byte reversing
20339 entry. Fix typo in comment.
20340 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20341 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20342 Add def_builtin calls for new builtins.
20343 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20344 Add define_insn expansion.
20346 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20348 * config/rl78/rl78.md (umaxdi3): New define_expand.
20350 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20352 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20353 for non-QImode registers.
20355 2018-01-22 Richard Biener <rguenther@suse.de>
20357 PR tree-optimization/83963
20358 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20359 including the loop exit block.
20360 (scop_detection::merge_sese): Likewise.
20361 (scop_detection::add_scop): Do it here instead.
20363 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20365 * doc/sourcebuild.texi (arm_softfloat): Document.
20367 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20370 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20371 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20372 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20374 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20375 David Edelsohn <dje.gcc@gmail.com>
20378 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20379 Change "crset eq" to "crset 2".
20380 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20381 (*call_indirect_aix<mode>_nospec): Likewise.
20382 (*call_value_indirect_aix<mode>_nospec): Likewise.
20383 (*call_indirect_elfv2<mode>_nospec): Likewise.
20384 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20385 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20386 change assembly output from . to $.
20387 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20388 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20389 (*tablejump<mode>_internal1_nospec): Likewise.
20391 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20394 * config/sh/sh_optimize_sett_clrt.cc:
20395 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20397 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20399 PR tree-optimization/83940
20400 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20401 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20402 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20403 use it to pass back the definition type.
20404 (vect_check_store_rhs): Likewise rhs_dt_out.
20405 (vect_build_gather_load_calls): Add a mask_dt argument and use
20406 it instead of a call to vect_is_simple_use.
20407 (vectorizable_store): Update calls to vect_check_load_store_mask
20408 and vect_check_store_rhs. Use the dt returned by the latter instead
20409 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20410 instead of calls to vect_is_simple_use. Pass the scalar rather
20411 than the vector operand to vect_is_simple_use when handling
20412 second and subsequent copies of an rhs value.
20413 (vectorizable_load): Update calls to vect_check_load_store_mask
20414 and vect_build_gather_load_calls. Use the cached mask_dt and
20415 gs_info.offset_dt instead of calls to vect_is_simple_use.
20417 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20419 PR middle-end/83945
20420 * tree-emutls.c: Include gimplify.h.
20421 (lower_emutls_2): New function.
20422 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20423 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20424 it before further processing.
20427 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20428 UINTVAL (trueop1) instead of INTVAL (op1).
20430 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20434 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20435 INCOMING_FRAME_SP_OFFSET if not defined.
20436 (scan_trace): Add ENTRY argument. If true and
20437 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20438 emit a note to adjust the CFA offset.
20439 (create_cfi_notes): Adjust scan_trace callers.
20440 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20441 INCOMING_FRAME_SP_OFFSET in the CIE.
20442 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20443 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20445 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20446 * doc/tm.texi: Regenerated.
20448 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20450 PR rtl-optimization/83147
20451 * lra-constraints.c (remove_inheritance_pseudos): Use
20452 lra_substitute_pseudo_within_insn.
20454 2018-01-19 Tom de Vries <tom@codesourcery.com>
20455 Cesar Philippidis <cesar@codesourcery.com>
20458 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20460 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20463 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20464 spaces for function labels.
20466 2018-01-19 Martin Liska <mliska@suse.cz>
20468 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20469 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20470 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20471 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20472 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20473 (PRED_CONST_RETURN): Change from 69 to 65.
20474 (PRED_NULL_RETURN): Change from 91 to 71.
20475 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20476 (PRED_LOOP_GUARD): Change from 66 to 73.
20478 2018-01-19 Martin Liska <mliska@suse.cz>
20480 * predict.c (predict_insn_def): Add new assert.
20481 (struct branch_predictor): Change type to signed integer.
20482 (test_prediction_value_range): Amend test to cover
20483 PROB_UNINITIALIZED.
20484 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20485 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20486 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20487 (PRED_LOOP_IV_COMPARE): Likewise.
20488 * predict.h (PROB_UNINITIALIZED): Define new constant.
20490 2018-01-19 Martin Liska <mliska@suse.cz>
20492 * predict.c (dump_prediction): Add new format for
20493 analyze_brprob.py script which is enabled with -details
20495 * profile-count.h (precise_p): New function.
20497 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20499 PR tree-optimization/83922
20500 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20501 there are no statements that need masking.
20502 (vect_active_double_reduction_p): New function.
20503 (vect_analyze_loop_operations): Use it when handling phis that
20504 are not in the loop header.
20506 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20508 PR tree-optimization/83914
20509 * tree-vect-loop.c (vectorizable_induction): Don't convert
20510 init_expr or apply the peeling adjustment for inductions
20511 that are nested within the vectorized loop.
20513 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20515 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20518 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20522 * function.h (gimplify_parameters): Add gimple_seq * argument.
20523 * function.c: Include gimple.h and options.h.
20524 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20525 for the added local temporaries if needed.
20526 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20527 if there are any parameter cleanups, wrap whole body into a
20528 try/finally with the cleanups.
20530 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20533 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20534 Use GET_MODE_CLASS for scalar floating point.
20536 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20540 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20541 Fix call of call_cgraph_insertion_hooks.
20543 2018-01-18 Martin Sebor <msebor@redhat.com>
20545 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20547 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20550 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20553 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20556 * common.opt: (-ffile-prefix-map): New option.
20557 * opts.c (common_handle_option): Defer it.
20558 * opts-global.c (handle_common_deferred_options): Handle it.
20559 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20560 * file-prefix-map.h: New file.
20561 (remap_debug_filename, add_debug_prefix_map): ...here.
20562 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20563 * final.c (debug_prefix_map, add_debug_prefix_map
20564 remap_debug_filename): Move to...
20565 * file-prefix-map.c: New file.
20566 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20567 generalize, get rid of alloca(), use strrchr() instead of strchr().
20568 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20569 Implement in terms of add_prefix_map().
20570 (remap_macro_filename, remap_debug_filename): Implement in term of
20572 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20573 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20574 * dbxout.c: Include file-prefix-map.h.
20575 * varasm.c: Likewise.
20576 * vmsdbgout.c: Likewise.
20577 * xcoffout.c: Likewise.
20578 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20579 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20580 * doc/invoke.texi (-ffile-prefix-map): Document.
20581 (-fdebug-prefix-map): Update description.
20583 2018-01-18 Martin Liska <mliska@suse.cz>
20585 * config/i386/i386.c (indirect_thunk_name): Document that also
20587 (output_indirect_thunk): Document why both instructions
20588 (pause and lfence) are generated.
20590 2018-01-18 Richard Biener <rguenther@suse.de>
20592 PR tree-optimization/83887
20593 * graphite-scop-detection.c
20594 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20595 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20596 (scop_detection::merge_sese): Re-implement with a flood-fill
20597 algorithm that properly finds a SESE region if it exists.
20599 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20602 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20603 pointer_diff optimizations use view_convert instead of convert.
20605 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20607 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20608 Generate different code for -mno-speculate-indirect-jumps.
20609 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20610 (*call_indirect_aix<mode>): Disable for
20611 -mno-speculate-indirect-jumps.
20612 (*call_indirect_aix<mode>_nospec): New define_insn.
20613 (*call_value_indirect_aix<mode>): Disable for
20614 -mno-speculate-indirect-jumps.
20615 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20616 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20617 -mno-speculate-indirect-jumps.
20618 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20620 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20622 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20623 long double type, set the flags for noting the default long double
20624 type, even if we don't pass or return a long double type.
20626 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20629 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20632 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20634 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20635 support for merge[hl].
20636 (fold_mergehl_helper): New helper function.
20637 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20638 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20639 (altivec_vmrglw_direct): Add xxmrglw insn.
20641 2018-01-17 Andrew Waterman <andrew@sifive.com>
20643 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20644 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20646 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20649 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20650 call the lto_location_cache before reading the
20651 DECL_SOURCE_LOCATION of the types.
20653 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20654 Richard Sandiford <richard.sandiford@linaro.org>
20656 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20657 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20658 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20659 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20660 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20662 * config/aarch64/constraints.md (aarch64_movti_operand):
20664 * config/aarch64/predicates.md (Uti): Add new constraint.
20666 2018-01-17 Carl Love <cel@us.ibm.com>
20668 * config/rs6000/vsx.md (define_expand xl_len_r,
20669 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20670 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20672 (define_expand, define_insn): Move the shift left from the
20673 define_insn to the define_expand for lxvl and stxvl instructions.
20674 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20675 and XL_LEN_R definitions to PURE.
20677 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20679 * config/i386/i386.c (indirect_thunk_name): Declare regno
20680 as unsigned int. Compare regno with INVALID_REGNUM.
20681 (output_indirect_thunk): Ditto.
20682 (output_indirect_thunk_function): Ditto.
20683 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20684 in the call to output_indirect_thunk_function.
20686 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20688 PR middle-end/83884
20689 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20690 rather than the size of inner_type to determine the stack slot size
20691 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20693 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20696 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20699 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20701 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20702 endian Linux systems to optionally enable multilibs for selecting
20703 the long double type if the user configured an explicit type.
20704 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20705 have no long double multilibs if not defined.
20706 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20707 warn if the user used -mabi={ieee,ibm}longdouble and we built
20708 multilibs for long double.
20709 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20710 appropriate multilib option.
20711 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20713 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20714 for building long double multilibs.
20715 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20717 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20719 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20722 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20724 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20727 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20730 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20733 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20735 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20736 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20738 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20740 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20741 different rtl trees depending on TARGET_64BIT.
20742 (rs6000_gen_lvx): Likewise.
20744 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20746 * config/visium/visium.md (nop): Tweak comment.
20747 (hazard_nop): Likewise.
20749 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20751 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20752 -mspeculate-indirect-jumps.
20753 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20754 for -mno-speculate-indirect-jumps.
20755 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20756 (*call_value_indirect_elfv2<mode>): Disable for
20757 -mno-speculate-indirect-jumps.
20758 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20759 (indirect_jump): Emit different RTL for
20760 -mno-speculate-indirect-jumps.
20761 (*indirect_jump<mode>): Disable for
20762 -mno-speculate-indirect-jumps.
20763 (*indirect_jump<mode>_nospec): New define_insn.
20764 (tablejump): Emit different RTL for
20765 -mno-speculate-indirect-jumps.
20766 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20767 (tablejumpsi_nospec): New define_expand.
20768 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20769 (tablejumpdi_nospec): New define_expand.
20770 (*tablejump<mode>_internal1): Disable for
20771 -mno-speculate-indirect-jumps.
20772 (*tablejump<mode>_internal1_nospec): New define_insn.
20773 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20776 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20778 * caller-save.c (insert_save): Drop unnecessary parameter. All
20781 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20782 Richard Biener <rguenth@suse.de>
20785 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20786 return early, inline manually is_gimple_sizepos. Make sure if we
20787 call gimplify_expr we don't end up with a gimple constant.
20788 * tree.c (variably_modified_type_p): Don't return true for
20789 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20790 * gimplify.h (is_gimple_sizepos): Remove.
20792 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20794 PR tree-optimization/83857
20795 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20796 vectorizable_live_operation for pure SLP statements.
20797 (vectorizable_live_operation): Handle PHIs.
20799 2018-01-16 Richard Biener <rguenther@suse.de>
20801 PR tree-optimization/83867
20802 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20803 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20805 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20808 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20809 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20810 If off is not INTEGER_CST, issue a may not be aligned warning
20811 rather than isn't aligned. Use isn%'t rather than isn't.
20812 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20814 <case MULT_EXPR>: Improve the case when bottom and one of the
20815 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20816 operand, in that case check if the other operand is multiple of
20817 bottom divided by the INTEGER_CST operand.
20819 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20822 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20823 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20824 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20825 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20826 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20827 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20828 (pa_function_arg_size): New function.
20830 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20832 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20833 in a separate statement.
20835 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20837 PR tree-optimization/83847
20838 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20839 group gathers and scatters.
20841 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20843 PR rtl-optimization/86620
20844 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20846 PR rtl-optimization/83213
20847 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20848 to last if both are JUMP_INSNs.
20850 PR tree-optimization/83843
20851 * gimple-ssa-store-merging.c
20852 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20853 store_immediate_info for bswap/nop orig_stores.
20855 2018-01-15 Andrew Waterman <andrew@sifive.com>
20857 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20859 <UDIV>: Increase cost if !TARGET_DIV.
20861 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20863 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20864 (define_attr "cr_logical_3op"): New.
20865 (cceq_ior_compare): Adjust.
20866 (cceq_ior_compare_complement): Adjust.
20867 (*cceq_rev_compare): Adjust.
20868 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20869 (is_cracked_insn): Adjust.
20870 (insn_must_be_first_in_group): Adjust.
20871 * config/rs6000/40x.md: Adjust.
20872 * config/rs6000/440.md: Adjust.
20873 * config/rs6000/476.md: Adjust.
20874 * config/rs6000/601.md: Adjust.
20875 * config/rs6000/603.md: Adjust.
20876 * config/rs6000/6xx.md: Adjust.
20877 * config/rs6000/7450.md: Adjust.
20878 * config/rs6000/7xx.md: Adjust.
20879 * config/rs6000/8540.md: Adjust.
20880 * config/rs6000/cell.md: Adjust.
20881 * config/rs6000/e300c2c3.md: Adjust.
20882 * config/rs6000/e500mc.md: Adjust.
20883 * config/rs6000/e500mc64.md: Adjust.
20884 * config/rs6000/e5500.md: Adjust.
20885 * config/rs6000/e6500.md: Adjust.
20886 * config/rs6000/mpc.md: Adjust.
20887 * config/rs6000/power4.md: Adjust.
20888 * config/rs6000/power5.md: Adjust.
20889 * config/rs6000/power6.md: Adjust.
20890 * config/rs6000/power7.md: Adjust.
20891 * config/rs6000/power8.md: Adjust.
20892 * config/rs6000/power9.md: Adjust.
20893 * config/rs6000/rs64.md: Adjust.
20894 * config/rs6000/titan.md: Adjust.
20896 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20898 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20899 ix86_indirect_branch_register logic.
20901 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20903 * config/i386/constraints.md (Bs): Update
20904 ix86_indirect_branch_register check. Don't check
20905 ix86_indirect_branch_register with GOT_memory_operand.
20907 * config/i386/predicates.md (GOT_memory_operand): Don't check
20908 ix86_indirect_branch_register here.
20909 (GOT32_symbol_operand): Likewise.
20911 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20913 * config/i386/predicates.md (constant_call_address_operand):
20914 Rewrite ix86_indirect_branch_register logic.
20915 (sibcall_insn_operand): Likewise.
20917 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20919 * config/i386/constraints.md (Bs): Replace
20920 ix86_indirect_branch_thunk_register with
20921 ix86_indirect_branch_register.
20923 * config/i386/i386.md (indirect_jump): Likewise.
20924 (tablejump): Likewise.
20925 (*sibcall_memory): Likewise.
20926 (*sibcall_value_memory): Likewise.
20927 Peepholes of indirect call and jump via memory: Likewise.
20928 * config/i386/i386.opt: Likewise.
20929 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20930 (GOT_memory_operand): Likewise.
20931 (call_insn_operand): Likewise.
20932 (sibcall_insn_operand): Likewise.
20933 (GOT32_symbol_operand): Likewise.
20935 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20937 PR middle-end/83837
20938 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20939 type rather than type addr's type points to.
20940 (expand_omp_atomic_mutex): Likewise.
20941 (expand_omp_atomic): Likewise.
20943 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20946 * config/i386/i386.c (output_indirect_thunk_function): Use
20947 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20948 for __x86_return_thunk.
20950 2018-01-15 Richard Biener <rguenther@suse.de>
20952 PR middle-end/83850
20953 * expmed.c (extract_bit_field_1): Fix typo.
20955 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20958 * config/arm/iterators.md (VF): New mode iterator.
20959 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20960 Remove integer-related logic from pattern.
20961 (neon_vabd<mode>_3): Likewise.
20963 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20965 PR middle-end/82694
20966 * common.opt (fstrict-overflow): No longer an alias.
20967 (fwrapv-pointer): New option.
20968 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20969 also for pointer types based on flag_wrapv_pointer.
20970 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20971 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20972 opts->x_flag_wrapv got set.
20973 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20974 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20975 POINTER_TYPE_OVERFLOW_UNDEFINED.
20976 * match.pd: Likewise in address comparison pattern.
20977 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20979 2018-01-15 Richard Biener <rguenther@suse.de>
20982 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20983 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20984 Reset type names to their identifier if their TYPE_DECL doesn't
20985 have linkage (and thus is used for ODR and devirt).
20986 (save_debug_info_for_decl): Remove.
20987 (save_debug_info_for_type): Likewise.
20988 (add_tree_to_fld_list): Adjust.
20989 * tree-pretty-print.c (dump_generic_node): Make dumping of
20990 type names more robust.
20992 2018-01-15 Richard Biener <rguenther@suse.de>
20994 * BASE-VER: Bump to 8.0.1.
20996 2018-01-14 Martin Sebor <msebor@redhat.com>
20999 * builtins.c (check_access): Avoid warning when the no-warning bit
21002 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21004 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21005 * ira-color (allocno_hard_regs_compare): Likewise.
21007 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21010 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21011 Use .pushsection/.popsection.
21013 2018-01-14 Martin Sebor <msebor@redhat.com>
21016 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21018 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21020 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21021 entry from extra_headers.
21022 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21023 extra_headers, make the list bitwise identical to the i?86-*-* one.
21025 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21027 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21028 -mcmodel=large with -mindirect-branch=thunk,
21029 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21030 -mfunction-return=thunk-extern.
21031 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21032 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21033 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21035 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21037 * config/i386/i386.c (print_reg): Print the name of the full
21038 integer register without '%'.
21039 (ix86_print_operand): Handle 'V'.
21040 * doc/extend.texi: Document 'V' modifier.
21042 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21044 * config/i386/constraints.md (Bs): Disallow memory operand for
21045 -mindirect-branch-register.
21047 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21048 (GOT_memory_operand): Likewise.
21049 (call_insn_operand): Likewise.
21050 (sibcall_insn_operand): Likewise.
21051 (GOT32_symbol_operand): Likewise.
21052 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21053 for -mindirect-branch-register.
21054 (tablejump): Likewise.
21055 (*sibcall_memory): Likewise.
21056 (*sibcall_value_memory): Likewise.
21057 Disallow peepholes of indirect call and jump via memory for
21058 -mindirect-branch-register.
21059 (*call_pop): Replace m with Bw.
21060 (*call_value_pop): Likewise.
21061 (*sibcall_pop_memory): Replace m with Bs.
21062 * config/i386/i386.opt (mindirect-branch-register): New option.
21063 * doc/invoke.texi: Document -mindirect-branch-register option.
21065 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21067 * config/i386/i386-protos.h (ix86_output_function_return): New.
21068 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21069 set function_return_type.
21070 (indirect_thunk_name): Add ret_p to indicate thunk for function
21072 (output_indirect_thunk_function): Pass false to
21073 indirect_thunk_name.
21074 (ix86_output_indirect_branch_via_reg): Likewise.
21075 (ix86_output_indirect_branch_via_push): Likewise.
21076 (output_indirect_thunk_function): Create alias for function
21077 return thunk if regno < 0.
21078 (ix86_output_function_return): New function.
21079 (ix86_handle_fndecl_attribute): Handle function_return.
21080 (ix86_attribute_table): Add function_return.
21081 * config/i386/i386.h (machine_function): Add
21082 function_return_type.
21083 * config/i386/i386.md (simple_return_internal): Use
21084 ix86_output_function_return.
21085 (simple_return_internal_long): Likewise.
21086 * config/i386/i386.opt (mfunction-return=): New option.
21087 (indirect_branch): Mention -mfunction-return=.
21088 * doc/extend.texi: Document function_return function attribute.
21089 * doc/invoke.texi: Document -mfunction-return= option.
21091 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21093 * config/i386/i386-opts.h (indirect_branch): New.
21094 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21095 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21096 with local indirect jump when converting indirect call and jump.
21097 (ix86_set_indirect_branch_type): New.
21098 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21099 (indirectlabelno): New.
21100 (indirect_thunk_needed): Likewise.
21101 (indirect_thunk_bnd_needed): Likewise.
21102 (indirect_thunks_used): Likewise.
21103 (indirect_thunks_bnd_used): Likewise.
21104 (INDIRECT_LABEL): Likewise.
21105 (indirect_thunk_name): Likewise.
21106 (output_indirect_thunk): Likewise.
21107 (output_indirect_thunk_function): Likewise.
21108 (ix86_output_indirect_branch_via_reg): Likewise.
21109 (ix86_output_indirect_branch_via_push): Likewise.
21110 (ix86_output_indirect_branch): Likewise.
21111 (ix86_output_indirect_jmp): Likewise.
21112 (ix86_code_end): Call output_indirect_thunk_function if needed.
21113 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21115 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21116 (ix86_attribute_table): Add indirect_branch.
21117 * config/i386/i386.h (machine_function): Add indirect_branch_type
21118 and has_local_indirect_jump.
21119 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21121 (tablejump): Likewise.
21122 (*indirect_jump): Use ix86_output_indirect_jmp.
21123 (*tablejump_1): Likewise.
21124 (simple_return_indirect_internal): Likewise.
21125 * config/i386/i386.opt (mindirect-branch=): New option.
21126 (indirect_branch): New.
21129 (thunk-inline): Likewise.
21130 (thunk-extern): Likewise.
21131 * doc/extend.texi: Document indirect_branch function attribute.
21132 * doc/invoke.texi: Document -mindirect-branch= option.
21134 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21137 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21139 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21141 * ipa-inline.c (want_inline_small_function_p): Return false if
21142 inlining has already failed with CIF_FINAL_ERROR.
21143 (update_caller_keys): Call want_inline_small_function_p before
21145 (update_callee_keys): Likewise.
21147 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21149 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21151 (rs6000_quadword_masked_address_p): Likewise.
21152 (quad_aligned_load_p): Likewise.
21153 (quad_aligned_store_p): Likewise.
21154 (const_load_sequence_p): Add comment to describe the outer-most loop.
21155 (mimic_memory_attributes_and_flags): New function.
21156 (rs6000_gen_stvx): Likewise.
21157 (replace_swapped_aligned_store): Likewise.
21158 (rs6000_gen_lvx): Likewise.
21159 (replace_swapped_aligned_load): Likewise.
21160 (replace_swapped_load_constant): Capitalize argument name in
21161 comment describing this function.
21162 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21163 and stores that access quad-word aligned addresses and replace
21164 with stvx or lvx instructions when appropriate.
21165 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21166 New function prototype.
21167 (rs6000_quadword_masked_address_p): Likewise.
21168 (rs6000_gen_lvx): Likewise.
21169 (rs6000_gen_stvx): Likewise.
21170 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21171 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21172 when memory address is aligned.
21173 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21174 this split to select lvx instruction when memory address is aligned.
21175 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21176 instruction when memory address is aligned.
21177 (*vsx_le_perm_load_v16qi): Likewise.
21178 (four unnamed splitters): Modify to select the stvx instruction
21179 when memory is aligned.
21181 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21183 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21184 which appears in the queue multiple times.
21186 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21187 Alan Hayward <alan.hayward@arm.com>
21188 David Sherwood <david.sherwood@arm.com>
21190 * tree-vectorizer.h (vec_lower_bound): New structure.
21191 (_loop_vec_info): Add check_nonzero and lower_bounds.
21192 (LOOP_VINFO_CHECK_NONZERO): New macro.
21193 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21194 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21195 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21196 fields. Make seg_len the distance travelled, not including the
21198 (dr_direction_indicator): Declare.
21199 (dr_zero_step_indicator): Likewise.
21200 (dr_known_forward_stride_p): Likewise.
21201 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21203 (runtime_alias_check_p): Allow runtime alias checks with
21205 (operator ==): Compare access_size and align.
21206 (prune_runtime_alias_test_list): Rework for new distinction between
21207 the access_size and seg_len.
21208 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21210 (get_segment_min_max): New function.
21211 (create_intersect_range_checks): Use it.
21212 (dr_step_indicator): New function.
21213 (dr_direction_indicator): Likewise.
21214 (dr_zero_step_indicator): Likewise.
21215 (dr_known_forward_stride_p): Likewise.
21216 * tree-loop-distribution.c (data_ref_segment_size): Return
21217 DR_STEP * (niters - 1).
21218 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21220 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21221 (vect_preserves_scalar_order_p): New function, split out from...
21222 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21223 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21224 (vect_vfa_access_size): New function.
21225 (vect_vfa_align): Likewise.
21226 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21227 (dump_lower_bound): New function.
21228 (vect_check_lower_bound): Likewise.
21229 (vect_small_gap_p): Likewise.
21230 (vectorizable_with_step_bound_p): Likewise.
21231 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21232 depencies if the vectorization factor is 1. Convert the checks
21233 for nonzero steps into checks on the bounds of DR_STEP. Try using
21234 a bunds check for variable steps if the minimum required step is
21235 relatively small. Update calls to the dr_with_seg_len
21236 constructor and to vect_compile_time_alias.
21237 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21239 (vect_loop_versioning): Call it.
21240 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21242 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21245 Alan Hayward <alan.hayward@arm.com>
21246 David Sherwood <david.sherwood@arm.com>
21248 * doc/sourcebuild.texi (vect_scatter_store): Document.
21249 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21251 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21253 * genopinit.c (main): Add supports_vec_scatter_store and
21254 supports_vec_scatter_store_cached to target_optabs.
21255 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21256 IFN_MASK_SCATTER_STORE.
21257 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21259 * internal-fn.h (internal_store_fn_p): Declare.
21260 (internal_fn_stored_value_index): Likewise.
21261 * internal-fn.c (scatter_store_direct): New macro.
21262 (expand_scatter_store_optab_fn): New function.
21263 (direct_scatter_store_optab_supported_p): New macro.
21264 (internal_store_fn_p): New function.
21265 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21266 IFN_MASK_SCATTER_STORE.
21267 (internal_fn_mask_index): Likewise.
21268 (internal_fn_stored_value_index): New function.
21269 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21270 for scatter stores.
21271 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21272 * optabs-query.c (supports_vec_scatter_store_p): New function.
21273 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21274 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21275 true for scatter stores.
21276 (vect_gather_scatter_fn_p): Handle scatter stores too.
21277 (vect_check_gather_scatter): Consider using scatter stores if
21278 supports_vec_scatter_store_p.
21279 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21280 scatter stores too.
21281 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21282 internal_fn_stored_value_index.
21283 (check_load_store_masking): Handle scatter stores too.
21284 (vect_get_store_rhs): Make public.
21285 (vectorizable_call): Use internal_store_fn_p.
21286 (vectorizable_store): Handle scatter store internal functions.
21287 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21288 when deciding whether the end of the group has been reached.
21289 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21290 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21291 (mask_scatter_store<mode>): New insns.
21293 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21294 Alan Hayward <alan.hayward@arm.com>
21295 David Sherwood <david.sherwood@arm.com>
21297 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21298 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21299 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21301 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21302 Use vect_truncate_gather_scatter_offset if we can't treat the
21303 operation as a normal gather load or scatter store.
21304 (get_group_load_store_type): Take the gather_scatter_info
21305 as argument. Try using a gather load or scatter store for
21306 single-element groups.
21307 (get_load_store_type): Update calls to get_group_load_store_type
21308 and vect_use_strided_gather_scatters_p.
21310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21311 Alan Hayward <alan.hayward@arm.com>
21312 David Sherwood <david.sherwood@arm.com>
21314 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21315 optional tree argument.
21316 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21318 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21319 but continue to use the current value as a fallback.
21320 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21321 to compare the updates.
21322 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21323 (get_load_store_type): Use it when handling a strided access.
21324 (vect_get_strided_load_store_ops): New function.
21325 (vect_get_data_ptr_increment): Likewise.
21326 (vectorizable_load): Handle strided gather loads. Always pass
21327 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21329 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21330 Alan Hayward <alan.hayward@arm.com>
21331 David Sherwood <david.sherwood@arm.com>
21333 * doc/md.texi (gather_load@var{m}): Document.
21334 (mask_gather_load@var{m}): Likewise.
21335 * genopinit.c (main): Add supports_vec_gather_load and
21336 supports_vec_gather_load_cached to target_optabs.
21337 * optabs-tree.c (init_tree_optimization_optabs): Use
21338 ggc_cleared_alloc to allocate target_optabs.
21339 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21340 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21342 * internal-fn.h (internal_load_fn_p): Declare.
21343 (internal_gather_scatter_fn_p): Likewise.
21344 (internal_fn_mask_index): Likewise.
21345 (internal_gather_scatter_fn_supported_p): Likewise.
21346 * internal-fn.c (gather_load_direct): New macro.
21347 (expand_gather_load_optab_fn): New function.
21348 (direct_gather_load_optab_supported_p): New macro.
21349 (direct_internal_fn_optab): New function.
21350 (internal_load_fn_p): Likewise.
21351 (internal_gather_scatter_fn_p): Likewise.
21352 (internal_fn_mask_index): Likewise.
21353 (internal_gather_scatter_fn_supported_p): Likewise.
21354 * optabs-query.c (supports_at_least_one_mode_p): New function.
21355 (supports_vec_gather_load_p): Likewise.
21356 * optabs-query.h (supports_vec_gather_load_p): Declare.
21357 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21358 and memory_type field.
21359 (NUM_PATTERNS): Bump to 15.
21360 * tree-vect-data-refs.c: Include internal-fn.h.
21361 (vect_gather_scatter_fn_p): New function.
21362 (vect_describe_gather_scatter_call): Likewise.
21363 (vect_check_gather_scatter): Try using internal functions for
21364 gather loads. Recognize existing calls to a gather load function.
21365 (vect_analyze_data_refs): Consider using gather loads if
21366 supports_vec_gather_load_p.
21367 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21368 (vect_get_gather_scatter_offset_type): Likewise.
21369 (vect_convert_mask_for_vectype): Likewise.
21370 (vect_add_conversion_to_patterm): Likewise.
21371 (vect_try_gather_scatter_pattern): Likewise.
21372 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21373 (vect_vect_recog_func_ptrs): Add it.
21374 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21375 internal_fn_mask_index and internal_gather_scatter_fn_p.
21376 (check_load_store_masking): Take the gather_scatter_info as an
21377 argument and handle gather loads.
21378 (vect_get_gather_scatter_ops): New function.
21379 (vectorizable_call): Check internal_load_fn_p.
21380 (vectorizable_load): Likewise. Handle gather load internal
21382 (vectorizable_store): Update call to check_load_store_masking.
21383 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21384 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21385 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21386 (aarch64_gather_scale_operand_d): New predicates.
21387 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21388 (mask_gather_load<mode>): New insns.
21390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21391 Alan Hayward <alan.hayward@arm.com>
21392 David Sherwood <david.sherwood@arm.com>
21394 * optabs.def (fold_left_plus_optab): New optab.
21395 * doc/md.texi (fold_left_plus_@var{m}): Document.
21396 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21397 * internal-fn.c (fold_left_direct): Define.
21398 (expand_fold_left_optab_fn): Likewise.
21399 (direct_fold_left_optab_supported_p): Likewise.
21400 * fold-const-call.c (fold_const_fold_left): New function.
21401 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21402 * tree-parloops.c (valid_reduction_p): New function.
21403 (gather_scalar_reductions): Use it.
21404 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21405 (vect_finish_replace_stmt): Declare.
21406 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21407 (needs_fold_left_reduction_p): New function, split out from...
21408 (vect_is_simple_reduction): ...here. Accept reductions that
21409 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21410 (vect_force_simple_reduction): Also store the reduction type in
21411 the assignment's STMT_VINFO_REDUC_TYPE.
21412 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21413 (merge_with_identity): New function.
21414 (vect_expand_fold_left): Likewise.
21415 (vectorize_fold_left_reduction): Likewise.
21416 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21417 scalar phi in place for it. Check for target support and reject
21418 cases that would reassociate the operation. Defer the transform
21419 phase to vectorize_fold_left_reduction.
21420 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21421 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21422 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21426 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21427 call to ifc_temp_var.
21429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21430 Alan Hayward <alan.hayward@arm.com>
21431 David Sherwood <david.sherwood@arm.com>
21433 * target.def (legitimize_address_displacement): Take the original
21434 offset as a poly_int.
21435 * targhooks.h (default_legitimize_address_displacement): Update
21437 * targhooks.c (default_legitimize_address_displacement): Likewise.
21438 * doc/tm.texi: Regenerate.
21439 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21440 as an argument, moving assert of ad->disp == ad->disp_term to...
21441 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21442 Try calling targetm.legitimize_address_displacement before expanding
21443 the address rather than afterwards, and adjust for the new interface.
21444 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21445 Match the new hook interface. Handle SVE addresses.
21446 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21447 new hook interface.
21449 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21451 * Makefile.in (OBJS): Add early-remat.o.
21452 * target.def (select_early_remat_modes): New hook.
21453 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21454 * doc/tm.texi: Regenerate.
21455 * targhooks.h (default_select_early_remat_modes): Declare.
21456 * targhooks.c (default_select_early_remat_modes): New function.
21457 * timevar.def (TV_EARLY_REMAT): New timevar.
21458 * passes.def (pass_early_remat): New pass.
21459 * tree-pass.h (make_pass_early_remat): Declare.
21460 * early-remat.c: New file.
21461 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21463 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21465 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21466 Alan Hayward <alan.hayward@arm.com>
21467 David Sherwood <david.sherwood@arm.com>
21469 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21470 vfm1 with a bound_epilog parameter.
21471 (vect_do_peeling): Update calls accordingly, and move the prologue
21472 call earlier in the function. Treat the base bound_epilog as 0 for
21473 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21474 this base when peeling for gaps.
21475 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21476 with fully-masked loops.
21477 (vect_estimate_min_profitable_iters): Handle the single peeled
21478 iteration in that case.
21480 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21481 Alan Hayward <alan.hayward@arm.com>
21482 David Sherwood <david.sherwood@arm.com>
21484 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21485 single-element interleaving even if the size is not a power of 2.
21486 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21487 accesses for single-element interleaving if the group size is
21490 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21491 Alan Hayward <alan.hayward@arm.com>
21492 David Sherwood <david.sherwood@arm.com>
21494 * doc/md.texi (fold_extract_last_@var{m}): Document.
21495 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21496 * optabs.def (fold_extract_last_optab): New optab.
21497 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21498 * internal-fn.c (fold_extract_direct): New macro.
21499 (expand_fold_extract_optab_fn): Likewise.
21500 (direct_fold_extract_optab_supported_p): Likewise.
21501 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21502 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21503 EXTRACT_LAST_REDUCTION.
21504 (get_initial_def_for_reduction): Do not create an initial vector
21505 for EXTRACT_LAST_REDUCTION reductions.
21506 (vectorizable_reduction): Leave the scalar phi in place for
21507 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21508 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21509 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21510 transform phase to vectorizable_condition.
21511 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21513 (vect_finish_stmt_generation): ...here.
21514 (vect_finish_replace_stmt): New function.
21515 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21516 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21518 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21521 Alan Hayward <alan.hayward@arm.com>
21522 David Sherwood <david.sherwood@arm.com>
21524 * doc/md.texi (extract_last_@var{m}): Document.
21525 * optabs.def (extract_last_optab): New optab.
21526 * internal-fn.def (EXTRACT_LAST): New internal function.
21527 * internal-fn.c (cond_unary_direct): New macro.
21528 (expand_cond_unary_optab_fn): Likewise.
21529 (direct_cond_unary_optab_supported_p): Likewise.
21530 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21531 loops using EXTRACT_LAST.
21532 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21533 (extract_last_<mode>): ...this optab.
21534 (vec_extract<mode><Vel>): Update accordingly.
21536 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21537 Alan Hayward <alan.hayward@arm.com>
21538 David Sherwood <david.sherwood@arm.com>
21540 * target.def (empty_mask_is_expensive): New hook.
21541 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21542 * doc/tm.texi: Regenerate.
21543 * targhooks.h (default_empty_mask_is_expensive): Declare.
21544 * targhooks.c (default_empty_mask_is_expensive): New function.
21545 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21546 if the target says that empty masks are expensive.
21547 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21549 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21551 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21552 Alan Hayward <alan.hayward@arm.com>
21553 David Sherwood <david.sherwood@arm.com>
21555 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21556 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21557 (vect_use_loop_mask_for_alignment_p): New function.
21558 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21559 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21560 niters_skip argument. Make sure that the first niters_skip elements
21561 of the first iteration are inactive.
21562 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21563 Update call to vect_set_loop_masks_directly.
21564 (get_misalign_in_elems): New function, split out from...
21565 (vect_gen_prolog_loop_niters): ...here.
21566 (vect_update_init_of_dr): Take a code argument that specifies whether
21567 the adjustment should be added or subtracted.
21568 (vect_update_init_of_drs): Likewise.
21569 (vect_prepare_for_masked_peels): New function.
21570 (vect_do_peeling): Skip prologue peeling if we're using a mask
21571 instead. Update call to vect_update_inits_of_drs.
21572 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21574 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21575 alignment. Do not include the number of peeled iterations in
21576 the minimum threshold in that case.
21577 (vectorizable_induction): Adjust the start value down by
21578 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21579 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21580 Take the number of skipped iterations into account when calculating
21582 * tree-vect-stmts.c (vect_gen_while_not): New function.
21584 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21585 Alan Hayward <alan.hayward@arm.com>
21586 David Sherwood <david.sherwood@arm.com>
21588 * doc/sourcebuild.texi (vect_fully_masked): Document.
21589 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21590 default value to 0.
21591 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21593 (vect_analyze_loop_2): ...here. Don't check the vectorization
21594 factor against the number of loop iterations if the loop is
21597 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21598 Alan Hayward <alan.hayward@arm.com>
21599 David Sherwood <david.sherwood@arm.com>
21601 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21602 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21603 (dump_groups): Update accordingly.
21604 (iv_use::mem_type): New member variable.
21605 (address_p): New function.
21606 (record_use): Add a mem_type argument and initialize the new
21608 (record_group_use): Add a mem_type argument. Use address_p.
21609 Remove obsolete null checks of base_object. Update call to record_use.
21610 (find_interesting_uses_op): Update call to record_group_use.
21611 (find_interesting_uses_cond): Likewise.
21612 (find_interesting_uses_address): Likewise.
21613 (get_mem_type_for_internal_fn): New function.
21614 (find_address_like_use): Likewise.
21615 (find_interesting_uses_stmt): Try find_address_like_use before
21616 calling find_interesting_uses_op.
21617 (addr_offset_valid_p): Use the iv mem_type field as the type
21618 of the addressed memory.
21619 (add_autoinc_candidates): Likewise.
21620 (get_address_cost): Likewise.
21621 (split_small_address_groups_p): Use address_p.
21622 (split_address_groups): Likewise.
21623 (add_iv_candidate_for_use): Likewise.
21624 (autoinc_possible_for_pair): Likewise.
21625 (rewrite_groups): Likewise.
21626 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21627 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21628 (get_alias_ptr_type_for_ptr_address): New function.
21629 (rewrite_use_address): Rewrite address uses in calls that were
21630 identified by find_address_like_use.
21632 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21633 Alan Hayward <alan.hayward@arm.com>
21634 David Sherwood <david.sherwood@arm.com>
21636 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21638 * gimple-expr.h (is_gimple_addressable: Likewise.
21639 * gimple-expr.c (is_gimple_address): Likewise.
21640 * internal-fn.c (expand_call_mem_ref): New function.
21641 (expand_mask_load_optab_fn): Use it.
21642 (expand_mask_store_optab_fn): Likewise.
21644 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21645 Alan Hayward <alan.hayward@arm.com>
21646 David Sherwood <david.sherwood@arm.com>
21648 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21649 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21650 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21651 (cond_umax@var{mode}): Document.
21652 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21653 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21654 (cond_umin_optab, cond_umax_optab): New optabs.
21655 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21656 (COND_IOR, COND_XOR): New internal functions.
21657 * internal-fn.h (get_conditional_internal_fn): Declare.
21658 * internal-fn.c (cond_binary_direct): New macro.
21659 (expand_cond_binary_optab_fn): Likewise.
21660 (direct_cond_binary_optab_supported_p): Likewise.
21661 (get_conditional_internal_fn): New function.
21662 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21663 Cope with reduction statements that are vectorized as calls rather
21665 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21666 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21667 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21668 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21669 (UNSPEC_COND_EOR): New unspecs.
21670 (optab): Add mappings for them.
21671 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21672 (sve_int_op, sve_fp_op): New int attributes.
21674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21675 Alan Hayward <alan.hayward@arm.com>
21676 David Sherwood <david.sherwood@arm.com>
21678 * optabs.def (while_ult_optab): New optab.
21679 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21680 * internal-fn.def (WHILE_ULT): New internal function.
21681 * internal-fn.h (direct_internal_fn_supported_p): New override
21682 that takes two types as argument.
21683 * internal-fn.c (while_direct): New macro.
21684 (expand_while_optab_fn): New function.
21685 (convert_optab_supported_p): Likewise.
21686 (direct_while_optab_supported_p): New macro.
21687 * wide-int.h (wi::udiv_ceil): New function.
21688 * tree-vectorizer.h (rgroup_masks): New structure.
21689 (vec_loop_masks): New typedef.
21690 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21691 and fully_masked_p.
21692 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21693 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21694 (vect_max_vf): New function.
21695 (slpeel_make_loop_iterate_ntimes): Delete.
21696 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21697 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21698 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21699 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21700 internal-fn.h, stor-layout.h and optabs-query.h.
21701 (vect_set_loop_mask): New function.
21702 (add_preheader_seq): Likewise.
21703 (add_header_seq): Likewise.
21704 (interleave_supported_p): Likewise.
21705 (vect_maybe_permute_loop_masks): Likewise.
21706 (vect_set_loop_masks_directly): Likewise.
21707 (vect_set_loop_condition_masked): Likewise.
21708 (vect_set_loop_condition_unmasked): New function, split out from
21709 slpeel_make_loop_iterate_ntimes.
21710 (slpeel_make_loop_iterate_ntimes): Rename to..
21711 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21712 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21713 (vect_do_peeling): Update call accordingly.
21714 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21716 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21717 mask_compare_type, can_fully_mask_p and fully_masked_p.
21718 (release_vec_loop_masks): New function.
21719 (_loop_vec_info): Use it to free the loop masks.
21720 (can_produce_all_loop_masks_p): New function.
21721 (vect_get_max_nscalars_per_iter): Likewise.
21722 (vect_verify_full_masking): Likewise.
21723 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21724 retries, and free the mask rgroups before retrying. Check loop-wide
21725 reasons for disallowing fully-masked loops. Make the final decision
21726 about whether use a fully-masked loop or not.
21727 (vect_estimate_min_profitable_iters): Do not assume that peeling
21728 for the number of iterations will be needed for fully-masked loops.
21729 (vectorizable_reduction): Disable fully-masked loops.
21730 (vectorizable_live_operation): Likewise.
21731 (vect_halve_mask_nunits): New function.
21732 (vect_double_mask_nunits): Likewise.
21733 (vect_record_loop_mask): Likewise.
21734 (vect_get_loop_mask): Likewise.
21735 (vect_transform_loop): Handle the case in which the final loop
21736 iteration might handle a partial vector. Call vect_set_loop_condition
21737 instead of slpeel_make_loop_iterate_ntimes.
21738 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21739 (check_load_store_masking): New function.
21740 (prepare_load_store_mask): Likewise.
21741 (vectorizable_store): Handle fully-masked loops.
21742 (vectorizable_load): Likewise.
21743 (supportable_widening_operation): Use vect_halve_mask_nunits for
21745 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21746 (vect_gen_while): New function.
21747 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21748 (aarch64_uqdec<mode>): New insn.
21750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21751 Alan Hayward <alan.hayward@arm.com>
21752 David Sherwood <david.sherwood@arm.com>
21754 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21755 (reduc_xor_scal_optab): New optabs.
21756 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21757 (reduc_xor_scal_@var{m}): Document.
21758 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21759 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21760 internal functions.
21761 * fold-const-call.c (fold_const_call): Handle them.
21762 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21763 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21764 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21765 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21766 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21767 (UNSPEC_XORV): New unspecs.
21768 (optab): Add entries for them.
21769 (BITWISEV): New int iterator.
21770 (bit_reduc_op): New int attributes.
21772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21773 Alan Hayward <alan.hayward@arm.com>
21774 David Sherwood <david.sherwood@arm.com>
21776 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21777 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21778 * optabs.def (vec_shl_insert_optab): New optab.
21779 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21780 (duplicate_and_interleave): Likewise.
21781 * tree-vect-loop.c: Include internal-fn.h.
21782 (neutral_op_for_slp_reduction): New function, split out from
21783 get_initial_defs_for_reduction.
21784 (get_initial_def_for_reduction): Handle option 2 for variable-length
21785 vectors by loading the neutral value into a vector and then shifting
21786 the initial value into element 0.
21787 (get_initial_defs_for_reduction): Replace the code argument with
21788 the neutral value calculated by neutral_op_for_slp_reduction.
21789 Use gimple_build_vector for constant-length vectors.
21790 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21791 but the first group_size elements have a neutral value.
21792 Use duplicate_and_interleave otherwise.
21793 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21794 Update call to get_initial_defs_for_reduction. Handle SLP
21795 reductions for variable-length vectors by creating one vector
21796 result for each scalar result, with the elements associated
21797 with other scalar results stubbed out with the neutral value.
21798 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21799 Require IFN_VEC_SHL_INSERT for double reductions on
21800 variable-length vectors, or SLP reductions that have
21801 a neutral value. Require can_duplicate_and_interleave_p
21802 support for variable-length unchained SLP reductions if there
21803 is no neutral value, such as for MIN/MAX reductions. Also require
21804 the number of vector elements to be a multiple of the number of
21805 SLP statements when doing variable-length unchained SLP reductions.
21806 Update call to vect_create_epilog_for_reduction.
21807 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21808 and remove initial values.
21809 (duplicate_and_interleave): Make public.
21810 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21811 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21814 Alan Hayward <alan.hayward@arm.com>
21815 David Sherwood <david.sherwood@arm.com>
21817 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21818 (can_duplicate_and_interleave_p): New function.
21819 (vect_get_and_check_slp_defs): Take the vector of statements
21820 rather than just the current one. Remove excess parentheses.
21821 Restriction rejectinon of vect_constant_def and vect_external_def
21822 for variable-length vectors to boolean types, or types for which
21823 can_duplicate_and_interleave_p is false.
21824 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21825 (duplicate_and_interleave): New function.
21826 (vect_get_constant_vectors): Use gimple_build_vector for
21827 constant-length vectors and suitable variable-length constant
21828 vectors. Use duplicate_and_interleave for other variable-length
21829 vectors. Don't defer the update when inserting new statements.
21831 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21832 Alan Hayward <alan.hayward@arm.com>
21833 David Sherwood <david.sherwood@arm.com>
21835 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21836 min_profitable_iters doesn't go negative.
21838 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21839 Alan Hayward <alan.hayward@arm.com>
21840 David Sherwood <david.sherwood@arm.com>
21842 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21843 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21844 * optabs.def (vec_mask_load_lanes_optab): New optab.
21845 (vec_mask_store_lanes_optab): Likewise.
21846 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21847 (MASK_STORE_LANES): Likewise.
21848 * internal-fn.c (mask_load_lanes_direct): New macro.
21849 (mask_store_lanes_direct): Likewise.
21850 (expand_mask_load_optab_fn): Handle masked operations.
21851 (expand_mask_load_lanes_optab_fn): New macro.
21852 (expand_mask_store_optab_fn): Handle masked operations.
21853 (expand_mask_store_lanes_optab_fn): New macro.
21854 (direct_mask_load_lanes_optab_supported_p): Likewise.
21855 (direct_mask_store_lanes_optab_supported_p): Likewise.
21856 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21858 (vect_load_lanes_supported): Likewise.
21859 * tree-vect-data-refs.c (strip_conversion): New function.
21860 (can_group_stmts_p): Likewise.
21861 (vect_analyze_data_ref_accesses): Use it instead of checking
21862 for a pair of assignments.
21863 (vect_store_lanes_supported): Take a masked_p parameter.
21864 (vect_load_lanes_supported): Likewise.
21865 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21866 vect_store_lanes_supported and vect_load_lanes_supported.
21867 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21868 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21869 parameter. Don't allow gaps for masked accesses.
21870 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21871 and vect_load_lanes_supported.
21872 (get_load_store_type): Take a masked_p parameter and update
21873 call to get_group_load_store_type.
21874 (vectorizable_store): Update call to get_load_store_type.
21875 Handle IFN_MASK_STORE_LANES.
21876 (vectorizable_load): Update call to get_load_store_type.
21877 Handle IFN_MASK_LOAD_LANES.
21879 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21880 Alan Hayward <alan.hayward@arm.com>
21881 David Sherwood <david.sherwood@arm.com>
21883 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21885 * config/aarch64/aarch64-protos.h
21886 (aarch64_sve_struct_memory_operand_p): Declare.
21887 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21888 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21889 (VPRED, vpred): Handle SVE structure modes.
21890 * config/aarch64/constraints.md (Utx): New constraint.
21891 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21892 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21893 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21894 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21895 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21896 structure modes. Split into pieces after RA.
21897 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21898 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21900 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21901 SVE structure modes.
21902 (aarch64_classify_address): Likewise.
21903 (sizetochar): Move earlier in file.
21904 (aarch64_print_operand): Handle SVE register lists.
21905 (aarch64_array_mode): New function.
21906 (aarch64_sve_struct_memory_operand_p): Likewise.
21907 (TARGET_ARRAY_MODE): Redefine.
21909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21910 Alan Hayward <alan.hayward@arm.com>
21911 David Sherwood <david.sherwood@arm.com>
21913 * target.def (array_mode): New target hook.
21914 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21915 * doc/tm.texi: Regenerate.
21916 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21917 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21918 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21919 targetm.array_mode.
21920 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21923 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21924 Alan Hayward <alan.hayward@arm.com>
21925 David Sherwood <david.sherwood@arm.com>
21927 * fold-const.c (fold_binary_loc): Check the argument types
21928 rather than the result type when testing for a vector operation.
21930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21932 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21933 * doc/tm.texi: Regenerate.
21935 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21936 Alan Hayward <alan.hayward@arm.com>
21937 David Sherwood <david.sherwood@arm.com>
21939 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21940 (sve): Document new AArch64 extension.
21941 * doc/md.texi (w): Extend the description of the AArch64
21942 constraint to include SVE vectors.
21943 (Upl, Upa): Document new AArch64 predicate constraints.
21944 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21946 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21947 (msve-vector-bits=): New option.
21948 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21949 SVE when these are disabled.
21950 (sve): New extension.
21951 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21952 modes. Adjust their number of units based on aarch64_sve_vg.
21953 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21954 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21955 aarch64_addr_query_type.
21956 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21957 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21958 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21959 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21960 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21961 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21962 (aarch64_simd_imm_zero_p): Delete.
21963 (aarch64_check_zero_based_sve_index_immediate): Declare.
21964 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21965 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21966 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21967 (aarch64_sve_float_mul_immediate_p): Likewise.
21968 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21969 rather than an rtx.
21970 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21971 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21972 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21973 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21974 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21975 (aarch64_regmode_natural_size): Likewise.
21976 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21977 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21979 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21980 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21981 for VG and the SVE predicate registers.
21982 (V_ALIASES): Add a "z"-prefixed alias.
21983 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21984 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21985 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21986 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21987 (REG_CLASS_NAMES): Add entries for them.
21988 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21989 and the predicate registers.
21990 (aarch64_sve_vg): Declare.
21991 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21992 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21993 (REGMODE_NATURAL_SIZE): Define.
21994 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21996 * config/aarch64/aarch64.c: Include cfgrtl.h.
21997 (simd_immediate_info): Add a constructor for series vectors,
21998 and an associated step field.
21999 (aarch64_sve_vg): New variable.
22000 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22001 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22002 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22003 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22004 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22005 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22006 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22007 (aarch64_get_mask_mode): New functions.
22008 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22009 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22010 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22011 predicate modes and predicate registers. Explicitly restrict
22012 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22013 to store a vector mode if it is recognized by
22014 aarch64_classify_vector_mode.
22015 (aarch64_regmode_natural_size): New function.
22016 (aarch64_hard_regno_caller_save_mode): Return the original mode
22018 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22019 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22020 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22021 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22023 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22024 does not overlap dest if the function is frame-related. Handle
22026 (aarch64_split_add_offset): New function.
22027 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22028 them aarch64_add_offset.
22029 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22030 and update call to aarch64_sub_sp.
22031 (aarch64_add_cfa_expression): New function.
22032 (aarch64_expand_prologue): Pass extra temporary registers to the
22033 functions above. Handle the case in which we need to emit new
22034 DW_CFA_expressions for registers that were originally saved
22035 relative to the stack pointer, but now have to be expressed
22036 relative to the frame pointer.
22037 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22039 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22040 IP0 and IP1 values for SVE frames.
22041 (aarch64_expand_vec_series): New function.
22042 (aarch64_expand_sve_widened_duplicate): Likewise.
22043 (aarch64_expand_sve_const_vector): Likewise.
22044 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22045 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22046 into the register, rather than emitting a SET directly.
22047 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22048 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22049 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22050 (offset_9bit_signed_scaled_p): New functions.
22051 (aarch64_replicate_bitmask_imm): New function.
22052 (aarch64_bitmask_imm): Use it.
22053 (aarch64_cannot_force_const_mem): Reject expressions involving
22054 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22055 (aarch64_classify_index): Handle SVE indices, by requiring
22056 a plain register index with a scale that matches the element size.
22057 (aarch64_classify_address): Handle SVE addresses. Assert that
22058 the mode of the address is VOIDmode or an integer mode.
22059 Update call to aarch64_classify_symbol.
22060 (aarch64_classify_symbolic_expression): Update call to
22061 aarch64_classify_symbol.
22062 (aarch64_const_vec_all_in_range_p): New function.
22063 (aarch64_print_vector_float_operand): Likewise.
22064 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22065 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22066 and the FP immediates 1.0 and 0.5.
22067 (aarch64_print_address_internal): Handle SVE addresses.
22068 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22069 (aarch64_regno_regclass): Handle predicate registers.
22070 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22072 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22073 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22074 (aarch64_convert_sve_vector_bits): New function.
22075 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22076 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22077 rather than an rtx.
22078 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22079 Handle SVE vector and predicate modes. Accept VL-based constants
22080 that need only one temporary register, and VL offsets that require
22081 no temporary registers.
22082 (aarch64_conditional_register_usage): Mark the predicate registers
22083 as fixed if SVE isn't available.
22084 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22085 Return true for SVE vector and predicate modes.
22086 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22087 rather than an unsigned int. Handle SVE modes.
22088 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22090 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22092 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22093 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22094 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22095 (aarch64_sve_float_mul_immediate_p): New functions.
22096 (aarch64_sve_valid_immediate): New function.
22097 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22098 Explicitly reject structure modes. Check for INDEX constants.
22099 Handle PTRUE and PFALSE constants.
22100 (aarch64_check_zero_based_sve_index_immediate): New function.
22101 (aarch64_simd_imm_zero_p): Delete.
22102 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22103 vector modes. Accept constants in the range of CNT[BHWD].
22104 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22105 ask for an Advanced SIMD mode.
22106 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22107 (aarch64_simd_vector_alignment): Handle SVE predicates.
22108 (aarch64_vectorize_preferred_vector_alignment): New function.
22109 (aarch64_simd_vector_alignment_reachable): Use it instead of
22111 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22112 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22114 (MAX_VECT_LEN): Delete.
22115 (expand_vec_perm_d): Add a vec_flags field.
22116 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22117 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22118 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22120 (aarch64_evpc_rev): Rename to...
22121 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22122 (aarch64_evpc_rev_global): New function.
22123 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22124 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22126 (aarch64_evpc_sve_tbl): New function.
22127 (aarch64_expand_vec_perm_const_1): Update after rename of
22128 aarch64_evpc_rev. Handle SVE permutes too, trying
22129 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22130 than aarch64_evpc_tbl.
22131 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22132 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22133 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22134 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22135 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22136 (aarch64_expand_sve_vcond): New functions.
22137 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22138 of aarch64_vector_mode_p.
22139 (aarch64_dwarf_poly_indeterminate_value): New function.
22140 (aarch64_compute_pressure_classes): Likewise.
22141 (aarch64_can_change_mode_class): Likewise.
22142 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22143 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22144 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22145 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22146 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22147 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22148 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22149 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22151 (Dn, Dl, Dr): Accept const as well as const_vector.
22152 (Dz): Likewise. Compare against CONST0_RTX.
22153 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22154 of "vector" where appropriate.
22155 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22156 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22157 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22158 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22159 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22160 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22161 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22162 (v_int_equiv): Extend to SVE modes.
22163 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22165 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22166 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22167 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22168 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22169 (SVE_COND_FP_CMP): New int iterators.
22170 (perm_hilo): Handle the new unpack unspecs.
22171 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22173 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22174 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22175 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22176 (aarch64_equality_operator, aarch64_constant_vector_operand)
22177 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22178 (aarch64_sve_nonimmediate_operand): Likewise.
22179 (aarch64_sve_general_operand): Likewise.
22180 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22181 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22182 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22183 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22184 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22185 (aarch64_sve_float_arith_immediate): Likewise.
22186 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22187 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22188 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22189 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22190 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22191 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22192 (aarch64_sve_float_arith_operand): Likewise.
22193 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22194 (aarch64_sve_float_mul_operand): Likewise.
22195 (aarch64_sve_vec_perm_operand): Likewise.
22196 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22197 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22198 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22199 as well as const_vector.
22200 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22201 in file. Use CONST0_RTX and CONSTM1_RTX.
22202 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22203 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22204 Use aarch64_simd_imm_zero.
22205 * config/aarch64/aarch64-sve.md: New file.
22206 * config/aarch64/aarch64.md: Include it.
22207 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22208 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22209 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22210 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22211 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22212 (sve): New attribute.
22213 (enabled): Disable instructions with the sve attribute unless
22215 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22216 aarch64_expand_mov_immediate.
22217 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22218 CNT[BHSD] immediates.
22219 (movti): Split CONST_POLY_INT moves into two halves.
22220 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22221 Split additions that need a temporary here if the destination
22222 is the stack pointer.
22223 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22224 (*add<mode>3_poly_1): New instruction.
22225 (set_clobber_cc): New expander.
22227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22229 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22230 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22231 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22232 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22233 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22234 Change innermode from fixed_mode_size to machine_mode.
22235 (simplify_subreg): Update call accordingly. Handle a constant-sized
22236 subreg of a variable-length CONST_VECTOR.
22238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22239 Alan Hayward <alan.hayward@arm.com>
22240 David Sherwood <david.sherwood@arm.com>
22242 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22243 (add_offset_to_base): New function, split out from...
22244 (create_mem_ref): ...here. When handling a scale other than 1,
22245 check first whether the address is valid without the offset.
22246 Add it into the base if so, leaving the index and scale as-is.
22248 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22251 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22252 fold_for_warn before checking if arg2 is INTEGER_CST.
22254 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22256 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22257 (store_multiple_operation): Delete.
22258 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22259 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22260 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22261 guarded by TARGET_STRING.
22262 (rs6000_output_load_multiple): Delete.
22263 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22264 OPTION_MASK_STRING / TARGET_STRING handling.
22265 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22266 (const rs6000_opt_masks) <"string">: Change mask to 0.
22267 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22268 (MASK_STRING): Delete.
22269 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22271 (load_multiple): Delete.
22278 (store_multiple): Delete.
22285 (movmemsi_8reg): Delete.
22286 (corresponding unnamed define_insn): Delete.
22287 (movmemsi_6reg): Delete.
22288 (corresponding unnamed define_insn): Delete.
22289 (movmemsi_4reg): Delete.
22290 (corresponding unnamed define_insn): Delete.
22291 (movmemsi_2reg): Delete.
22292 (corresponding unnamed define_insn): Delete.
22293 (movmemsi_1reg): Delete.
22294 (corresponding unnamed define_insn): Delete.
22295 * config/rs6000/rs6000.opt (mno-string): New.
22296 (mstring): Replace by deprecation warning stub.
22297 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22299 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22301 * regrename.c (regrename_do_replace): If replacing the same
22302 reg multiple times, try to reuse last created gen_raw_REG.
22305 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22306 main to workaround a bug in GDB.
22308 2018-01-12 Tom de Vries <tom@codesourcery.com>
22311 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22313 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22315 PR rtl-optimization/80481
22316 * ira-color.c (get_cap_member): New function.
22317 (allocnos_conflict_by_live_ranges_p): Use it.
22318 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22319 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22321 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22324 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22325 (*saddl_se_1): Ditto.
22326 (*ssubsi_1): Ditto.
22327 (*ssubl_se_1): Ditto.
22329 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22331 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22332 rather than wi::to_widest for DR_INITs.
22333 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22334 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22335 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22337 (vect_analyze_group_access_1): Note that here.
22339 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22341 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22342 polynomial type sizes.
22344 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22346 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22347 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22348 (gimple_add_tmp_var): Likewise.
22350 2018-01-12 Martin Liska <mliska@suse.cz>
22352 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22353 (gimple_alloc_sizes): Likewise.
22354 (dump_gimple_statistics): Use PRIu64 in printf format.
22355 * gimple.h: Change uint64_t to int.
22357 2018-01-12 Martin Liska <mliska@suse.cz>
22359 * tree-core.h: Use uint64_t instead of int.
22360 * tree.c (tree_node_counts): Likewise.
22361 (tree_node_sizes): Likewise.
22362 (dump_tree_statistics): Use PRIu64 in printf format.
22364 2018-01-12 Martin Liska <mliska@suse.cz>
22366 * Makefile.in: As qsort_chk is implemented in vec.c, add
22367 vec.o to linkage of gencfn-macros.
22368 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22369 passing the info to record_node_allocation_statistics.
22370 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22372 * ggc-common.c (struct ggc_usage): Add operator== and use
22373 it in operator< and compare function.
22374 * mem-stats.h (struct mem_usage): Likewise.
22375 * vec.c (struct vec_usage): Remove operator< and compare
22376 function. Can be simply inherited.
22378 2018-01-12 Martin Jambor <mjambor@suse.cz>
22381 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22382 * tree-ssa-math-opts.c: Include domwalk.h.
22383 (convert_mult_to_fma_1): New function.
22384 (fma_transformation_info): New type.
22385 (fma_deferring_state): Likewise.
22386 (cancel_fma_deferring): New function.
22387 (result_of_phi): Likewise.
22388 (last_fma_candidate_feeds_initial_phi): Likewise.
22389 (convert_mult_to_fma): Added deferring logic, split actual
22390 transformation to convert_mult_to_fma_1.
22391 (math_opts_dom_walker): New type.
22392 (math_opts_dom_walker::after_dom_children): New method, body moved
22393 here from pass_optimize_widening_mul::execute, added deferring logic
22395 (pass_optimize_widening_mul::execute): Moved most of code to
22396 math_opts_dom_walker::after_dom_children.
22397 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22398 * config/i386/i386.c (ix86_option_override_internal): Added
22399 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22401 2018-01-12 Richard Biener <rguenther@suse.de>
22404 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22405 inline instance vars.
22407 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22410 * config/rx/rx.c (rx_is_restricted_memory_address):
22411 Handle SUBREG case.
22413 2018-01-12 Richard Biener <rguenther@suse.de>
22415 PR tree-optimization/80846
22416 * target.def (split_reduction): New target hook.
22417 * targhooks.c (default_split_reduction): New function.
22418 * targhooks.h (default_split_reduction): Declare.
22419 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22420 target requests first reduce vectors by combining low and high
22422 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22423 (get_vectype_for_scalar_type_and_size): Export.
22424 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22425 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22426 * doc/tm.texi: Regenerate.
22427 * config/i386/i386.c (ix86_split_reduction): Implement
22428 TARGET_VECTORIZE_SPLIT_REDUCTION.
22430 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22433 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22434 in PIC mode except for TARGET_VXWORKS_RTP.
22435 * config/sparc/sparc.c: Include cfgrtl.h.
22436 (TARGET_INIT_PIC_REG): Define.
22437 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22438 (sparc_pic_register_p): New predicate.
22439 (sparc_legitimate_address_p): Use it.
22440 (sparc_legitimize_pic_address): Likewise.
22441 (sparc_delegitimize_address): Likewise.
22442 (sparc_mode_dependent_address_p): Likewise.
22443 (gen_load_pcrel_sym): Remove 4th parameter.
22444 (load_got_register): Adjust call to above. Remove obsolete stuff.
22445 (sparc_expand_prologue): Do not call load_got_register here.
22446 (sparc_flat_expand_prologue): Likewise.
22447 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22448 (sparc_use_pseudo_pic_reg): New function.
22449 (sparc_init_pic_reg): Likewise.
22450 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22451 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22453 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22455 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22456 Add item for branch_cost.
22458 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22460 PR rtl-optimization/83565
22461 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22462 not extend the result to a larger mode for rotate operations.
22463 (num_sign_bit_copies1): Likewise.
22465 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22468 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22470 Use values-Xc.o for -pedantic.
22471 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22473 2018-01-12 Martin Liska <mliska@suse.cz>
22476 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22478 (possible_polymorphic_call_targets): Use it.
22479 (ipa_devirt): Likewise.
22481 2018-01-12 Martin Liska <mliska@suse.cz>
22483 * profile-count.h (enum profile_quality): Use 0 as invalid
22484 enum value of profile_quality.
22486 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22488 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22489 -mext-string options.
22491 2018-01-12 Richard Biener <rguenther@suse.de>
22493 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22494 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22495 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22497 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22499 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22501 * configure.ac (--with-long-double-format): Add support for the
22502 configuration option to change the default long double format on
22504 * config.gcc (powerpc*-linux*-*): Likewise.
22505 * configure: Regenerate.
22506 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22507 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22508 used without modification.
22510 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22512 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22513 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22514 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22515 MISC_BUILTIN_SPEC_BARRIER.
22516 (rs6000_init_builtins): Likewise.
22517 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22519 (speculation_barrier): New define_insn.
22520 * doc/extend.texi: Document __builtin_speculation_barrier.
22522 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22525 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22526 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22527 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22529 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22530 integral modes instead of "ss" and "sd".
22531 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22532 vectors with 32-bit and 64-bit elements.
22533 (vecdupssescalarmodesuffix): New mode attribute.
22534 (vec_dup<mode>): Use it.
22536 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22539 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22540 frame if argument is passed on stack.
22542 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22545 * ree.c (combine_reaching_defs): Optimize also
22546 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22547 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22549 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22551 PR middle-end/83189
22552 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22554 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22556 PR middle-end/83718
22557 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22558 after they are computed.
22560 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22562 PR tree-optimization/83695
22563 * gimple-loop-linterchange.cc
22564 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22565 reset cached scev information after interchange.
22566 (pass_linterchange::execute): Remove call to scev_reset_htab.
22568 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22570 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22571 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22572 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22573 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22574 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22575 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22576 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22577 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22578 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22579 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22580 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22581 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22582 (V_lane_reg): Likewise.
22583 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22585 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22586 (vfmal_lane_low<mode>_intrinsic,
22587 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22588 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22589 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22590 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22591 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22592 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22594 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22596 * config/arm/arm-cpus.in (fp16fml): New feature.
22597 (ALL_SIMD): Add fp16fml.
22598 (armv8.2-a): Add fp16fml as an option.
22599 (armv8.3-a): Likewise.
22600 (armv8.4-a): Add fp16fml as part of fp16.
22601 * config/arm/arm.h (TARGET_FP16FML): Define.
22602 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22604 * config/arm/arm-modes.def (V2HF): Define.
22605 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22606 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22607 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22608 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22609 vfmsl_low, vfmsl_high): New set of builtins.
22610 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22611 (vfml_op): New code attribute.
22612 (VFMLHALVES): New int iterator.
22613 (VFML, VFMLSEL): New mode attributes.
22614 (V_reg): Define mapping for V2HF.
22615 (V_hi, V_lo): New mode attributes.
22616 (VF_constraint): Likewise.
22617 (vfml_half, vfml_half_selector): New int attributes.
22618 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22620 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22621 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22623 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22624 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22625 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22626 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22628 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22629 Document new effective target and option set.
22631 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22633 * config/arm/arm-cpus.in (armv8_4): New feature.
22634 (ARMv8_4a): New fgroup.
22635 (armv8.4-a): New arch.
22636 * config/arm/arm-tables.opt: Regenerate.
22637 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22638 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22639 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22640 Add matching rules for -march=armv8.4-a and extensions.
22641 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22643 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22646 * config/rx/rx.md (BW): New mode attribute.
22647 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22649 2018-01-11 Richard Biener <rguenther@suse.de>
22651 PR tree-optimization/83435
22652 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22653 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22654 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22656 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22657 Alan Hayward <alan.hayward@arm.com>
22658 David Sherwood <david.sherwood@arm.com>
22660 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22662 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22663 (aarch64_print_address_internal): Use it to check for a zero offset.
22665 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22666 Alan Hayward <alan.hayward@arm.com>
22667 David Sherwood <david.sherwood@arm.com>
22669 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22670 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22671 Return a poly_int64 rather than a HOST_WIDE_INT.
22672 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22673 rather than a HOST_WIDE_INT.
22674 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22675 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22676 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22677 final_offset from HOST_WIDE_INT to poly_int64.
22678 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22679 to_constant when getting the number of units in an Advanced SIMD
22681 (aarch64_builtin_vectorized_function): Check for a constant number
22683 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22685 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22686 attribute instead of GET_MODE_NUNITS.
22687 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22688 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22689 GET_MODE_SIZE for fixed-size registers.
22690 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22691 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22692 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22693 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22694 (aarch64_print_operand, aarch64_print_address_internal)
22695 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22696 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22697 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22698 Handle polynomial GET_MODE_SIZE.
22699 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22700 wider than SImode without modification.
22701 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22702 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22703 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22704 passing and returning SVE modes.
22705 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22706 rather than GEN_INT.
22707 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22708 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22709 (aarch64_allocate_and_probe_stack_space): Likewise.
22710 (aarch64_layout_frame): Cope with polynomial offsets.
22711 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22712 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22713 polynomial offsets.
22714 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22715 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22716 poly_int64 rather than a HOST_WIDE_INT.
22717 (aarch64_get_separate_components, aarch64_process_components)
22718 (aarch64_expand_prologue, aarch64_expand_epilogue)
22719 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22720 (aarch64_anchor_offset): New function, split out from...
22721 (aarch64_legitimize_address): ...here.
22722 (aarch64_builtin_vectorization_cost): Handle polynomial
22723 TYPE_VECTOR_SUBPARTS.
22724 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22726 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22727 number of elements from the PARALLEL rather than the mode.
22728 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22729 rather than GET_MODE_BITSIZE.
22730 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22731 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22732 (aarch64_expand_vec_perm_const_1): Handle polynomial
22733 d->perm.length () and d->perm elements.
22734 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22735 Apply to_constant to d->perm elements.
22736 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22737 polynomial CONST_VECTOR_NUNITS.
22738 (aarch64_move_pointer): Take amount as a poly_int64 rather
22740 (aarch64_progress_pointer): Avoid temporary variable.
22741 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22742 the mode attribute instead of GET_MODE.
22744 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22745 Alan Hayward <alan.hayward@arm.com>
22746 David Sherwood <david.sherwood@arm.com>
22748 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22749 x exists before using it.
22750 (aarch64_add_constant_internal): Rename to...
22751 (aarch64_add_offset_1): ...this. Replace regnum with separate
22752 src and dest rtxes. Handle the case in which they're different,
22753 including when the offset is zero. Replace scratchreg with an rtx.
22754 Use 2 additions if there is no spare register into which we can
22755 move a 16-bit constant.
22756 (aarch64_add_constant): Delete.
22757 (aarch64_add_offset): Replace reg with separate src and dest
22758 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22759 Use aarch64_add_offset_1.
22760 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22761 an rtx rather than an int. Take the delta as a poly_int64
22762 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22763 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22764 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22765 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22766 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22767 and aarch64_add_sp.
22768 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22769 aarch64_add_constant.
22771 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22773 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22774 Use scalar_float_mode.
22776 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22778 * config/aarch64/aarch64-simd.md
22779 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22780 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22781 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22782 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22783 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22784 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22785 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22786 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22787 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22788 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22790 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22793 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22794 targ_options->x_arm_arch_string is non NULL.
22796 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22798 * config/aarch64/aarch64.h
22799 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22801 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22804 * expmed.c (emit_store_flag_force): Swap if const op0
22805 and change VOIDmode to mode of op0.
22807 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22809 PR rtl-optimization/83761
22810 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22811 than bytes to mode_for_size.
22813 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22815 PR middle-end/83189
22816 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22817 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22820 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22822 PR middle-end/83575
22823 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22824 when in layout mode.
22825 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22826 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22829 2018-01-10 Michael Collison <michael.collison@arm.com>
22831 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22832 * config/aarch64/aarch64-option-extension.def: Add
22833 AARCH64_OPT_EXTENSION of 'fp16fml'.
22834 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22835 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22836 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22837 * config/aarch64/constraints.md (Ui7): New constraint.
22838 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22839 (VFMLA_SEL_W): Ditto.
22842 (VFMLA16_LOW): New int iterator.
22843 (VFMLA16_HIGH): Ditto.
22844 (UNSPEC_FMLAL): New unspec.
22845 (UNSPEC_FMLSL): Ditto.
22846 (UNSPEC_FMLAL2): Ditto.
22847 (UNSPEC_FMLSL2): Ditto.
22848 (f16mac): New code attribute.
22849 * config/aarch64/aarch64-simd-builtins.def
22850 (aarch64_fmlal_lowv2sf): Ditto.
22851 (aarch64_fmlsl_lowv2sf): Ditto.
22852 (aarch64_fmlalq_lowv4sf): Ditto.
22853 (aarch64_fmlslq_lowv4sf): Ditto.
22854 (aarch64_fmlal_highv2sf): Ditto.
22855 (aarch64_fmlsl_highv2sf): Ditto.
22856 (aarch64_fmlalq_highv4sf): Ditto.
22857 (aarch64_fmlslq_highv4sf): Ditto.
22858 (aarch64_fmlal_lane_lowv2sf): Ditto.
22859 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22860 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22861 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22862 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22863 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22864 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22865 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22866 (aarch64_fmlal_lane_highv2sf): Ditto.
22867 (aarch64_fmlsl_lane_highv2sf): Ditto.
22868 (aarch64_fmlal_laneq_highv2sf): Ditto.
22869 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22870 (aarch64_fmlalq_lane_highv4sf): Ditto.
22871 (aarch64_fmlsl_lane_highv4sf): Ditto.
22872 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22873 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22874 * config/aarch64/aarch64-simd.md:
22875 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22876 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22877 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22878 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22879 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22880 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22881 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22882 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22883 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22884 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22885 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22886 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22887 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22888 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22889 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22890 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22891 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22892 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22893 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22894 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22895 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22896 (vfmlsl_low_u32): Ditto.
22897 (vfmlalq_low_u32): Ditto.
22898 (vfmlslq_low_u32): Ditto.
22899 (vfmlal_high_u32): Ditto.
22900 (vfmlsl_high_u32): Ditto.
22901 (vfmlalq_high_u32): Ditto.
22902 (vfmlslq_high_u32): Ditto.
22903 (vfmlal_lane_low_u32): Ditto.
22904 (vfmlsl_lane_low_u32): Ditto.
22905 (vfmlal_laneq_low_u32): Ditto.
22906 (vfmlsl_laneq_low_u32): Ditto.
22907 (vfmlalq_lane_low_u32): Ditto.
22908 (vfmlslq_lane_low_u32): Ditto.
22909 (vfmlalq_laneq_low_u32): Ditto.
22910 (vfmlslq_laneq_low_u32): Ditto.
22911 (vfmlal_lane_high_u32): Ditto.
22912 (vfmlsl_lane_high_u32): Ditto.
22913 (vfmlal_laneq_high_u32): Ditto.
22914 (vfmlsl_laneq_high_u32): Ditto.
22915 (vfmlalq_lane_high_u32): Ditto.
22916 (vfmlslq_lane_high_u32): Ditto.
22917 (vfmlalq_laneq_high_u32): Ditto.
22918 (vfmlslq_laneq_high_u32): Ditto.
22919 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22920 (AARCH64_FL_FOR_ARCH8_4): New.
22921 (AARCH64_ISA_F16FML): New ISA flag.
22922 (TARGET_F16FML): New feature flag for fp16fml.
22923 (doc/invoke.texi): Document new fp16fml option.
22925 2018-01-10 Michael Collison <michael.collison@arm.com>
22927 * config/aarch64/aarch64-builtins.c:
22928 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22929 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22930 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22931 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22932 (AARCH64_ISA_SHA3): New ISA flag.
22933 (TARGET_SHA3): New feature flag for sha3.
22934 * config/aarch64/iterators.md (sha512_op): New int attribute.
22935 (CRYPTO_SHA512): New int iterator.
22936 (UNSPEC_SHA512H): New unspec.
22937 (UNSPEC_SHA512H2): Ditto.
22938 (UNSPEC_SHA512SU0): Ditto.
22939 (UNSPEC_SHA512SU1): Ditto.
22940 * config/aarch64/aarch64-simd-builtins.def
22941 (aarch64_crypto_sha512hqv2di): New builtin.
22942 (aarch64_crypto_sha512h2qv2di): Ditto.
22943 (aarch64_crypto_sha512su0qv2di): Ditto.
22944 (aarch64_crypto_sha512su1qv2di): Ditto.
22945 (aarch64_eor3qv8hi): Ditto.
22946 (aarch64_rax1qv2di): Ditto.
22947 (aarch64_xarqv2di): Ditto.
22948 (aarch64_bcaxqv8hi): Ditto.
22949 * config/aarch64/aarch64-simd.md:
22950 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22951 (aarch64_crypto_sha512su0qv2di): Ditto.
22952 (aarch64_crypto_sha512su1qv2di): Ditto.
22953 (aarch64_eor3qv8hi): Ditto.
22954 (aarch64_rax1qv2di): Ditto.
22955 (aarch64_xarqv2di): Ditto.
22956 (aarch64_bcaxqv8hi): Ditto.
22957 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22958 (vsha512h2q_u64): Ditto.
22959 (vsha512su0q_u64): Ditto.
22960 (vsha512su1q_u64): Ditto.
22961 (veor3q_u16): Ditto.
22962 (vrax1q_u64): Ditto.
22963 (vxarq_u64): Ditto.
22964 (vbcaxq_u16): Ditto.
22965 * config/arm/types.md (crypto_sha512): New type attribute.
22966 (crypto_sha3): Ditto.
22967 (doc/invoke.texi): Document new sha3 option.
22969 2018-01-10 Michael Collison <michael.collison@arm.com>
22971 * config/aarch64/aarch64-builtins.c:
22972 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22973 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22974 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22975 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22976 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22977 (AARCH64_ISA_SM4): New ISA flag.
22978 (TARGET_SM4): New feature flag for sm4.
22979 * config/aarch64/aarch64-simd-builtins.def
22980 (aarch64_sm3ss1qv4si): Ditto.
22981 (aarch64_sm3tt1aq4si): Ditto.
22982 (aarch64_sm3tt1bq4si): Ditto.
22983 (aarch64_sm3tt2aq4si): Ditto.
22984 (aarch64_sm3tt2bq4si): Ditto.
22985 (aarch64_sm3partw1qv4si): Ditto.
22986 (aarch64_sm3partw2qv4si): Ditto.
22987 (aarch64_sm4eqv4si): Ditto.
22988 (aarch64_sm4ekeyqv4si): Ditto.
22989 * config/aarch64/aarch64-simd.md:
22990 (aarch64_sm3ss1qv4si): Ditto.
22991 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22992 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22993 (aarch64_sm4eqv4si): Ditto.
22994 (aarch64_sm4ekeyqv4si): Ditto.
22995 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22996 (sm3part_op): Ditto.
22997 (CRYPTO_SM3TT): Ditto.
22998 (CRYPTO_SM3PART): Ditto.
22999 (UNSPEC_SM3SS1): New unspec.
23000 (UNSPEC_SM3TT1A): Ditto.
23001 (UNSPEC_SM3TT1B): Ditto.
23002 (UNSPEC_SM3TT2A): Ditto.
23003 (UNSPEC_SM3TT2B): Ditto.
23004 (UNSPEC_SM3PARTW1): Ditto.
23005 (UNSPEC_SM3PARTW2): Ditto.
23006 (UNSPEC_SM4E): Ditto.
23007 (UNSPEC_SM4EKEY): Ditto.
23008 * config/aarch64/constraints.md (Ui2): New constraint.
23009 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23010 * config/arm/types.md (crypto_sm3): New type attribute.
23011 (crypto_sm4): Ditto.
23012 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23013 (vsm3tt1aq_u32): Ditto.
23014 (vsm3tt1bq_u32): Ditto.
23015 (vsm3tt2aq_u32): Ditto.
23016 (vsm3tt2bq_u32): Ditto.
23017 (vsm3partw1q_u32): Ditto.
23018 (vsm3partw2q_u32): Ditto.
23019 (vsm4eq_u32): Ditto.
23020 (vsm4ekeyq_u32): Ditto.
23021 (doc/invoke.texi): Document new sm4 option.
23023 2018-01-10 Michael Collison <michael.collison@arm.com>
23025 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23026 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23027 (AARCH64_FL_FOR_ARCH8_4): New.
23028 (AARCH64_FL_V8_4): New flag.
23029 (doc/invoke.texi): Document new armv8.4-a option.
23031 2018-01-10 Michael Collison <michael.collison@arm.com>
23033 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23034 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23035 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23036 * config/aarch64/aarch64-option-extension.def: Add
23037 AARCH64_OPT_EXTENSION of 'sha2'.
23038 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23039 (crypto): Disable sha2 and aes if crypto disabled.
23040 (crypto): Enable aes and sha2 if enabled.
23041 (simd): Disable sha2 and aes if simd disabled.
23042 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23044 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23045 (TARGET_SHA2): New feature flag for sha2.
23046 (TARGET_AES): New feature flag for aes.
23047 * config/aarch64/aarch64-simd.md:
23048 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23049 conditional on TARGET_AES.
23050 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23051 (aarch64_crypto_sha1hsi): Make pattern conditional
23053 (aarch64_crypto_sha1hv4si): Ditto.
23054 (aarch64_be_crypto_sha1hv4si): Ditto.
23055 (aarch64_crypto_sha1su1v4si): Ditto.
23056 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23057 (aarch64_crypto_sha1su0v4si): Ditto.
23058 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23059 (aarch64_crypto_sha256su0v4si): Ditto.
23060 (aarch64_crypto_sha256su1v4si): Ditto.
23061 (doc/invoke.texi): Document new aes and sha2 options.
23063 2018-01-10 Martin Sebor <msebor@redhat.com>
23065 PR tree-optimization/83781
23066 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23069 2018-01-11 Martin Sebor <msebor@gmail.com>
23070 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23072 PR tree-optimization/83501
23073 PR tree-optimization/81703
23075 * tree-ssa-strlen.c (get_string_cst): Rename...
23076 (get_string_len): ...to this. Handle global constants.
23077 (handle_char_store): Adjust.
23079 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23080 Jim Wilson <jimw@sifive.com>
23082 * config/riscv/riscv-protos.h (riscv_output_return): New.
23083 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23084 (riscv_attribute_table, riscv_output_return),
23085 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23086 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23087 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23089 (riscv_expand_prologue): Add early return for naked function.
23090 (riscv_expand_epilogue): Likewise.
23091 (riscv_function_ok_for_sibcall): Return false for naked function.
23092 (riscv_set_current_function): New.
23093 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23094 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23095 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23096 * doc/extend.texi (RISC-V Function Attributes): New.
23098 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23100 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23101 check for 128-bit long double before checking TCmode.
23102 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23103 128-bit long doubles before checking TFmode or TCmode.
23104 (FLOAT128_IBM_P): Likewise.
23106 2018-01-10 Martin Sebor <msebor@redhat.com>
23108 PR tree-optimization/83671
23109 * builtins.c (c_strlen): Unconditionally return zero for the empty
23111 Use -Warray-bounds for warnings.
23112 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23113 for non-constant array indices with COMPONENT_REF, arrays of
23114 arrays, and pointers to arrays.
23115 (gimple_fold_builtin_strlen): Determine and set length range for
23116 non-constant character arrays.
23118 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23120 PR middle-end/81897
23121 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23124 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23126 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23128 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23131 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23132 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23133 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23134 indexed_or_indirect_operand predicate.
23135 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23136 (*vsx_le_perm_load_v8hi): Likewise.
23137 (*vsx_le_perm_load_v16qi): Likewise.
23138 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23139 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23140 (*vsx_le_perm_store_v8hi): Likewise.
23141 (*vsx_le_perm_store_v16qi): Likewise.
23142 (eight unnamed splitters): Likewise.
23144 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23146 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23147 * config/rs6000/emmintrin.h: Likewise.
23148 * config/rs6000/mmintrin.h: Likewise.
23149 * config/rs6000/xmmintrin.h: Likewise.
23151 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23154 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23156 * tree.c (tree_nop_conversion): Return true for location wrapper
23158 (maybe_wrap_with_location): New function.
23159 (selftest::check_strip_nops): New function.
23160 (selftest::test_location_wrappers): New function.
23161 (selftest::tree_c_tests): Call it.
23162 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23163 (maybe_wrap_with_location): New decl.
23164 (EXPR_LOCATION_WRAPPER_P): New macro.
23165 (location_wrapper_p): New inline function.
23166 (tree_strip_any_location_wrapper): New inline function.
23168 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23171 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23172 stack_realign_offset for the largest alignment of stack slot
23174 (ix86_find_max_used_stack_alignment): New function.
23175 (ix86_finalize_stack_frame_flags): Use it. Set
23176 max_used_stack_alignment if we don't realign stack.
23177 * config/i386/i386.h (machine_function): Add
23178 max_used_stack_alignment.
23180 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23182 * config/arm/arm.opt (-mbranch-cost): New option.
23183 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23186 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23189 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23190 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23192 2018-01-10 Richard Biener <rguenther@suse.de>
23195 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23196 early out so it also covers the case where we have a non-NULL
23199 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23201 PR tree-optimization/83753
23202 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23203 for non-strided grouped accesses if the number of elements is 1.
23205 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23208 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23209 * i386.h (TARGET_USE_GATHER): Define.
23210 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23212 2018-01-10 Martin Liska <mliska@suse.cz>
23215 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23216 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23218 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23219 CLEANUP_NO_PARTITIONING is not set.
23221 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23223 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23224 for vectors, as a partial revert of r254296.
23225 * rtl.h (const_vec_p): Delete.
23226 (const_vec_duplicate_p): Don't test for vector CONSTs.
23227 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23228 * expmed.c (make_tree): Likewise.
23231 * common.md (E, F): Use CONSTANT_P instead of checking for
23233 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23234 checking for CONST_VECTOR.
23236 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23238 PR middle-end/83575
23239 * predict.c (force_edge_cold): Handle in more sane way edges
23240 with no prediction.
23242 2018-01-09 Carl Love <cel@us.ibm.com>
23244 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23246 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23247 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23248 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23249 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23250 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23251 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23252 * config/rs6000/rs6000-protos.h: Add extern defition for
23253 rs6000_generate_float2_double_code.
23254 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23256 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23257 (float2_v2df): Add define_expand.
23259 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23262 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23263 op_mode in the force_to_mode call.
23265 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23267 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23268 instead of checking each element individually.
23269 (aarch64_evpc_uzp): Likewise.
23270 (aarch64_evpc_zip): Likewise.
23271 (aarch64_evpc_ext): Likewise.
23272 (aarch64_evpc_rev): Likewise.
23273 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23274 instead of checking each element individually. Return true without
23276 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23277 whether all selected elements come from the same input, instead of
23278 checking each element individually. Remove calls to gen_rtx_REG,
23279 start_sequence and end_sequence and instead assert that no rtl is
23282 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23284 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23285 order of HIGH and CONST checks.
23287 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23289 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23290 if the destination isn't an SSA_NAME.
23292 2018-01-09 Richard Biener <rguenther@suse.de>
23294 PR tree-optimization/83668
23295 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23297 (canonicalize_loop_form): ... here, renamed from ...
23298 (canonicalize_loop_closed_ssa_form): ... this and amended to
23299 swap successor edges for loop exit blocks to make us use
23300 the RPO order we need for initial schedule generation.
23302 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23304 PR tree-optimization/64811
23305 * match.pd: When optimizing comparisons with Inf, avoid
23306 introducing or losing exceptions from comparisons with NaN.
23308 2018-01-09 Martin Liska <mliska@suse.cz>
23311 * asan.c (shadow_mem_size): Add gcc_assert.
23313 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23315 Don't save registers in main().
23318 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23319 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23320 * config/avr/avr.c (avr_set_current_function): Don't error if
23321 naked, OS_task or OS_main are specified at the same time.
23322 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23324 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23326 * common/config/avr/avr-common.c (avr_option_optimization_table):
23327 Switch on -mmain-is-OS_task for optimizing compilations.
23329 2018-01-09 Richard Biener <rguenther@suse.de>
23331 PR tree-optimization/83572
23332 * graphite.c: Include cfganal.h.
23333 (graphite_transform_loops): Connect infinite loops to exit
23334 and remove fake edges at the end.
23336 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23338 * ipa-inline.c (edge_badness): Revert accidental checkin.
23340 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23343 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23344 symbols; not inline clones.
23346 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23349 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23350 hard registers. Formatting fixes.
23352 PR preprocessor/83722
23353 * gcc.c (try_generate_repro): Pass
23354 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23355 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23358 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23359 Kito Cheng <kito.cheng@gmail.com>
23361 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23362 (riscv_leaf_function_p): Delete.
23363 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23365 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23367 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23369 (do_ifelse): New function.
23370 (do_isel): New function.
23371 (do_sub3): New function.
23372 (do_add3): New function.
23373 (do_load_mask_compare): New function.
23374 (do_overlap_load_compare): New function.
23375 (expand_compare_loop): New function.
23376 (expand_block_compare): Call expand_compare_loop() when appropriate.
23377 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23378 option description.
23379 (-mblock-compare-inline-loop-limit): New option.
23381 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23384 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23385 Reverse order of second and third operands in first alternative.
23386 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23387 of first and second elements in UNSPEC_VPERMR vector.
23388 (altivec_expand_vec_perm_le): Likewise.
23390 2018-01-08 Jeff Law <law@redhat.com>
23392 PR rtl-optimizatin/81308
23393 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23394 (process_switch): If group_case_labels makes a change, then set
23396 (pass_convert_switch::execute): If a switch is converted, then
23397 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23399 PR rtl-optimization/81308
23400 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23403 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23405 PR target/83663 - Revert r255946
23406 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23407 generation for cases where splatting a value is not useful.
23408 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23409 across a vec_duplicate and a paradoxical subreg forming a vector
23410 mode to a vec_concat.
23412 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23414 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23415 -march=armv8.3-a variants.
23416 * config/arm/t-multilib: Likewise.
23417 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23419 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23421 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23423 (cceq_ior_compare_complement): Give it a name so I can use it, and
23424 change boolean_or_operator predicate to boolean_operator so it can
23425 be used to generate a crand.
23426 (eqne): New code iterator.
23427 (bd/bd_neg): New code_attrs.
23428 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23429 a single define_insn.
23430 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23431 decrement (bdnzt/bdnzf/bdzt/bdzf).
23432 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23433 with the new names of the branch decrement patterns, and added the
23434 names of the branch decrement conditional patterns.
23436 2018-01-08 Richard Biener <rguenther@suse.de>
23438 PR tree-optimization/83563
23439 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23442 2018-01-08 Richard Biener <rguenther@suse.de>
23444 PR middle-end/83713
23445 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23447 2018-01-08 Richard Biener <rguenther@suse.de>
23449 PR tree-optimization/83685
23450 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23451 references to abnormals.
23453 2018-01-08 Richard Biener <rguenther@suse.de>
23456 * dwarf2out.c (output_indirect_strings): Handle empty
23457 skeleton_debug_str_hash.
23458 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23460 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23462 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23463 (emit_store_direct): Likewise.
23464 (arc_trampoline_adjust_address): Likewise.
23465 (arc_asm_trampoline_template): New function.
23466 (arc_initialize_trampoline): Use asm_trampoline_template.
23467 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23468 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23469 * config/arc/arc.md (flush_icache): Delete pattern.
23471 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23473 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23474 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23477 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23480 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23481 by not USED_FOR_TARGET.
23482 (make_pass_resolve_sw_modes): Likewise.
23484 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23486 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23489 2018-01-08 Richard Biener <rguenther@suse.de>
23491 PR middle-end/83580
23492 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23494 2018-01-08 Richard Biener <rguenther@suse.de>
23496 PR middle-end/83517
23497 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23499 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23501 PR middle-end/81897
23502 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23503 basic blocks with a small number of successors.
23504 (convert_control_dep_chain_into_preds): Improve handling of
23506 (dump_predicates): Split apart into...
23507 (dump_pred_chain): ...here...
23508 (dump_pred_info): ...and here.
23509 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23510 (can_chain_union_be_invalidated_p): Improve check for invalidation
23512 (uninit_uses_cannot_happen): Avoid unnecessary if
23513 convert_control_dep_chain_into_preds yielded nothing.
23515 2018-01-06 Martin Sebor <msebor@redhat.com>
23517 PR tree-optimization/83640
23518 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23519 subtracting negative offset from size.
23520 (builtin_access::overlap): Adjust offset bounds of the access to fall
23521 within the size of the object if possible.
23523 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23525 PR rtl-optimization/83699
23526 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23527 extract_bit_field_as_subreg to cases in which the extracted
23528 value is also a vector.
23530 * lra-constraints.c (process_alt_operands): Test for the equivalence
23531 substitutions when detecting a possible reload cycle.
23533 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23536 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23537 by default if flag_selective_schedling{,2}. Formatting fixes.
23539 PR rtl-optimization/83682
23540 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23541 if it has non-VECTOR_MODE element mode.
23542 (vec_duplicate_p): Likewise.
23544 PR middle-end/83694
23545 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23546 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23548 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23551 * config/i386/i386-builtin.def
23552 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23553 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23554 Require also OPTION_MASK_ISA_AVX512F in addition to
23555 OPTION_MASK_ISA_GFNI.
23556 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23557 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23558 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23559 to OPTION_MASK_ISA_GFNI.
23560 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23561 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23562 OPTION_MASK_ISA_AVX512BW.
23563 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23564 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23565 addition to OPTION_MASK_ISA_GFNI.
23566 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23567 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23568 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23569 to OPTION_MASK_ISA_GFNI.
23570 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23571 a requirement for all ISAs rather than any of them with a few
23573 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23575 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23576 bitmasks to be enabled with 3 exceptions, instead of requiring any
23577 enabled ISA with lots of exceptions.
23578 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23579 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23580 Change avx512bw in isa attribute to avx512f.
23581 * config/i386/sgxintrin.h: Add license boilerplate.
23582 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23583 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23584 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23585 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23587 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23588 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23589 temporarily sse2 rather than sse if not enabled already.
23592 * config/i386/sse.md (VI248_VLBW): Rename to ...
23593 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23594 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23595 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23596 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23597 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23598 mode iterator instead of VI248_VLBW.
23600 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23602 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23603 (record_modified): Skip clobbers; add debug output.
23604 (param_change_prob): Use sreal frequencies.
23606 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23608 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23609 punt for user-aligned variables.
23611 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23613 * tree-chrec.c (chrec_contains_symbols): Return true for
23616 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23619 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23620 of (x|y) == x for BICS pattern.
23622 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23624 PR tree-optimization/83605
23625 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23626 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23629 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23631 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23632 * config/epiphany/rtems.h: New file.
23634 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23635 Uros Bizjak <ubizjak@gmail.com>
23638 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23639 QIreg_operand instead of register_operand predicate.
23640 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23641 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23642 comments instead of -fmitigate[-_]rop.
23644 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23647 * cgraphunit.c (symbol_table::compile): Switch to text_section
23648 before calling assembly_start debug hook.
23649 * run-rtl-passes.c (run_rtl_passes): Likewise.
23652 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23654 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23655 range_int_cst_p rather than !symbolic_range_p before calling
23656 extract_range_from_multiplicative_op_1.
23658 2018-01-04 Jeff Law <law@redhat.com>
23660 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23661 redundant test in assertion.
23663 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23665 * doc/rtl.texi: Document machine_mode wrapper classes.
23667 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23669 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23670 using tree_to_uhwi.
23672 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23674 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23675 the VEC_PERM_EXPR fold to fail.
23677 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23680 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23681 to switched_sections.
23683 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23686 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23687 test for d.testing.
23689 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23692 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23693 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23695 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23698 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23699 is BLKmode and bitpos not zero or mode change is needed.
23701 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23704 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23707 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23710 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23711 instead of MULT rtx. Update all corresponding splitters.
23712 (*saddl_se): Ditto.
23713 (*ssub<modesuffix>): Ditto.
23714 (*ssubl_se): Ditto.
23715 (*cmp_sadd_di): Update split patterns.
23716 (*cmp_sadd_si): Ditto.
23717 (*cmp_sadd_sidi): Ditto.
23718 (*cmp_ssub_di): Ditto.
23719 (*cmp_ssub_si): Ditto.
23720 (*cmp_ssub_sidi): Ditto.
23721 * config/alpha/predicates.md (const23_operand): New predicate.
23722 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23723 Look for ASHIFT, not MULT inner operand.
23724 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23726 2018-01-04 Martin Liska <mliska@suse.cz>
23728 PR gcov-profile/83669
23729 * gcov.c (output_intermediate_file): Add version to intermediate
23731 * doc/gcov.texi: Document new field 'version' in intermediate
23732 file format. Fix location of '-k' option of gcov command.
23734 2018-01-04 Martin Liska <mliska@suse.cz>
23737 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23739 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23741 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23743 2018-01-03 Martin Sebor <msebor@redhat.com>
23745 PR tree-optimization/83655
23746 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23747 checking calls with invalid arguments.
23749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23751 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23752 (vectorizable_mask_load_store): Delete.
23753 (vectorizable_call): Return false for masked loads and stores.
23754 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23755 instead of gimple_assign_rhs1.
23756 (vectorizable_load): Handle IFN_MASK_LOAD.
23757 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23761 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23763 (vectorizable_mask_load_store): ...here.
23764 (vectorizable_load): ...and here.
23766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23768 * tree-vect-stmts.c (vect_build_all_ones_mask)
23769 (vect_build_zero_merge_argument): New functions, split out from...
23770 (vectorizable_load): ...here.
23772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23774 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23776 (vectorizable_mask_load_store): ...here.
23777 (vectorizable_store): ...and here.
23779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23781 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23783 (vectorizable_mask_load_store): ...here.
23785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23787 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23788 (vect_model_store_cost): Take a vec_load_store_type instead of a
23790 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23791 (vect_model_store_cost): Take a vec_load_store_type instead of a
23793 (vectorizable_mask_load_store): Update accordingly.
23794 (vectorizable_store): Likewise.
23795 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23797 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23799 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23800 IFN_MASK_LOAD calls here rather than...
23801 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23804 Alan Hayward <alan.hayward@arm.com>
23805 David Sherwood <david.sherwood@arm.com>
23807 * expmed.c (extract_bit_field_1): For vector extracts,
23808 fall back to extract_bit_field_as_subreg if vec_extract
23811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23812 Alan Hayward <alan.hayward@arm.com>
23813 David Sherwood <david.sherwood@arm.com>
23815 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23816 they are variable or constant sized.
23817 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23818 slots for constant-sized data.
23820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23821 Alan Hayward <alan.hayward@arm.com>
23822 David Sherwood <david.sherwood@arm.com>
23824 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23825 handling COND_EXPRs with boolean comparisons, try to find a better
23826 basis for the mask type than the boolean itself.
23828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23830 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23831 is calculated and how it can be overridden.
23832 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23833 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23835 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23839 Alan Hayward <alan.hayward@arm.com>
23840 David Sherwood <david.sherwood@arm.com>
23842 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23843 Remove the mode argument.
23844 (aarch64_simd_valid_immediate): Remove the mode and inverse
23846 * config/aarch64/iterators.md (bitsize): New iterator.
23847 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23848 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23849 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23850 aarch64_simd_valid_immediate.
23851 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23852 (aarch64_reg_or_bic_imm): Likewise.
23853 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23854 with an insn_type enum and msl with a modifier_type enum.
23855 Replace element_width with a scalar_mode. Change the shift
23856 to unsigned int. Add constructors for scalar_float_mode and
23857 scalar_int_mode elements.
23858 (aarch64_vect_float_const_representable_p): Delete.
23859 (aarch64_can_const_movi_rtx_p)
23860 (aarch64_simd_scalar_immediate_valid_for_move)
23861 (aarch64_simd_make_constant): Update call to
23862 aarch64_simd_valid_immediate.
23863 (aarch64_advsimd_valid_immediate_hs): New function.
23864 (aarch64_advsimd_valid_immediate): Likewise.
23865 (aarch64_simd_valid_immediate): Remove mode and inverse
23866 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23867 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23868 and aarch64_float_const_representable_p on the result.
23869 (aarch64_output_simd_mov_immediate): Remove mode argument.
23870 Update call to aarch64_simd_valid_immediate and use of
23871 simd_immediate_info.
23872 (aarch64_output_scalar_simd_mov_immediate): Update call
23875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23876 Alan Hayward <alan.hayward@arm.com>
23877 David Sherwood <david.sherwood@arm.com>
23879 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23880 (mode_nunits): Likewise CONST_MODE_NUNITS.
23881 * machmode.def (ADJUST_NUNITS): Document.
23882 * genmodes.c (mode_data::need_nunits_adj): New field.
23883 (blank_mode): Update accordingly.
23884 (adj_nunits): New variable.
23885 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23887 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23888 listed in adj_nunits.
23889 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23890 listed in adj_nunits. Don't emit case statements for such modes.
23891 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23892 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23893 nothing if adj_nunits is nonnull.
23894 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23895 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23896 (emit_mode_fbit): Update use of print_maybe_const_decl.
23897 (emit_move_size): Likewise. Treat the array as non-const
23899 (emit_mode_adjustments): Handle adj_nunits.
23901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23903 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23904 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23905 (VECTOR_MODES): Use it.
23906 (make_vector_modes): Take the prefix as an argument.
23908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23909 Alan Hayward <alan.hayward@arm.com>
23910 David Sherwood <david.sherwood@arm.com>
23912 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23913 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23914 for MODE_VECTOR_BOOL.
23915 * machmode.def (VECTOR_BOOL_MODE): Document.
23916 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23917 (make_vector_bool_mode): New function.
23918 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23920 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23921 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23923 * stor-layout.c (int_mode_for_mode): Likewise.
23924 * tree.c (build_vector_type_for_mode): Likewise.
23925 * varasm.c (output_constant_pool_2): Likewise.
23926 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23927 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23928 for MODE_VECTOR_BOOL.
23929 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23930 of mode class checks.
23931 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23932 instead of a list of mode class checks.
23933 (expand_vector_scalar_condition): Likewise.
23934 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23937 Alan Hayward <alan.hayward@arm.com>
23938 David Sherwood <david.sherwood@arm.com>
23940 * machmode.h (mode_size): Change from unsigned short to
23942 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23943 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23944 or if measurement_type is not polynomial.
23945 (fixed_size_mode::includes_p): Check for constant-sized modes.
23946 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23947 return a poly_uint16 rather than an unsigned short.
23948 (emit_mode_size): Change the type of mode_size from unsigned short
23949 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23950 (emit_mode_adjustments): Cope with polynomial vector sizes.
23951 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23953 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23955 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23956 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23957 * caller-save.c (setup_save_areas): Likewise.
23958 (replace_reg_with_saved_mem): Likewise.
23959 * calls.c (emit_library_call_value_1): Likewise.
23960 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23961 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23962 (gen_lowpart_for_combine): Likewise.
23963 * convert.c (convert_to_integer_1): Likewise.
23964 * cse.c (equiv_constant, cse_insn): Likewise.
23965 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23966 (cselib_subst_to_values): Likewise.
23967 * dce.c (word_dce_process_block): Likewise.
23968 * df-problems.c (df_word_lr_mark_ref): Likewise.
23969 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23970 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23971 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23972 (rtl_for_decl_location): Likewise.
23973 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23974 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23975 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23976 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23977 (expand_expr_real_1): Likewise.
23978 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23979 (pad_below): Likewise.
23980 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23981 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23982 * ira.c (get_subreg_tracking_sizes): Likewise.
23983 * ira-build.c (ira_create_allocno_objects): Likewise.
23984 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23985 (ira_sort_regnos_for_alter_reg): Likewise.
23986 * ira-costs.c (record_operand_costs): Likewise.
23987 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23988 (resolve_simple_move): Likewise.
23989 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23990 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23991 (lra_constraints): Likewise.
23992 (CONST_POOL_OK_P): Reject variable-sized modes.
23993 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23994 (add_pseudo_to_slot, lra_spill): Likewise.
23995 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23996 * optabs-query.c (get_best_extraction_insn): Likewise.
23997 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23998 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23999 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24000 * recog.c (offsettable_address_addr_space_p): Likewise.
24001 * regcprop.c (maybe_mode_change): Likewise.
24002 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24003 * regrename.c (build_def_use): Likewise.
24004 * regstat.c (dump_reg_info): Likewise.
24005 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24006 (find_reloads, find_reloads_subreg_address): Likewise.
24007 * reload1.c (eliminate_regs_1): Likewise.
24008 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24009 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24010 (simplify_binary_operation_1, simplify_subreg): Likewise.
24011 * targhooks.c (default_function_arg_padding): Likewise.
24012 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24013 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24014 (verify_gimple_assign_ternary): Likewise.
24015 * tree-inline.c (estimate_move_cost): Likewise.
24016 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24017 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24018 (get_address_cost_ainc): Likewise.
24019 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24020 (vect_supportable_dr_alignment): Likewise.
24021 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24022 (vectorizable_reduction): Likewise.
24023 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24024 (vectorizable_operation, vectorizable_load): Likewise.
24025 * tree.c (build_same_sized_truth_vector_type): Likewise.
24026 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24027 * var-tracking.c (emit_note_insn_var_location): Likewise.
24028 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24029 (ADDR_VEC_ALIGN): Likewise.
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_to_bits): Return a poly_uint16 rather than an
24037 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24038 or if measurement_type is polynomial.
24039 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24040 * combine.c (make_extraction): Likewise.
24041 * dse.c (find_shift_sequence): Likewise.
24042 * dwarf2out.c (mem_loc_descriptor): Likewise.
24043 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24044 (extract_bit_field, extract_low_bits): Likewise.
24045 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24046 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24047 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24048 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24049 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24050 * reload.c (find_reloads): Likewise.
24051 * reload1.c (alter_reg): Likewise.
24052 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24053 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24054 * tree-if-conv.c (predicate_mem_writes): Likewise.
24055 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24056 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24057 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24058 * valtrack.c (dead_debug_insert_temp): Likewise.
24059 * varasm.c (mergeable_constant_section): Likewise.
24060 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24062 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24063 Alan Hayward <alan.hayward@arm.com>
24064 David Sherwood <david.sherwood@arm.com>
24066 * expr.c (expand_assignment): Cope with polynomial mode sizes
24067 when assigning to a CONCAT.
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 * machmode.h (mode_precision): Change from unsigned short to
24075 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24077 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24078 or if measurement_type is not polynomial.
24079 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24080 in which the mode is already known to be a scalar_int_mode.
24081 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24082 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24084 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24085 for GET_MODE_PRECISION.
24086 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24087 for GET_MODE_PRECISION.
24088 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24090 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24091 (expand_field_assignment, make_extraction): Likewise.
24092 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24093 (get_last_value): Likewise.
24094 * convert.c (convert_to_integer_1): Likewise.
24095 * cse.c (cse_insn): Likewise.
24096 * expr.c (expand_expr_real_1): Likewise.
24097 * lra-constraints.c (simplify_operand_subreg): Likewise.
24098 * optabs-query.c (can_atomic_load_p): Likewise.
24099 * optabs.c (expand_atomic_load): Likewise.
24100 (expand_atomic_store): Likewise.
24101 * ree.c (combine_reaching_defs): Likewise.
24102 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24103 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24104 * tree.h (type_has_mode_precision_p): Likewise.
24105 * ubsan.c (instrument_si_overflow): Likewise.
24107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24108 Alan Hayward <alan.hayward@arm.com>
24109 David Sherwood <david.sherwood@arm.com>
24111 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24112 polynomial numbers of units.
24113 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24114 (valid_vector_subparts_p): New function.
24115 (build_vector_type): Remove temporary shim and take the number
24116 of units as a poly_uint64 rather than an int.
24117 (build_opaque_vector_type): Take the number of units as a
24118 poly_uint64 rather than an int.
24119 * tree.c (build_vector_from_ctor): Handle polynomial
24120 TYPE_VECTOR_SUBPARTS.
24121 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24122 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24123 (build_vector_from_val): If the number of units is variable,
24124 use build_vec_duplicate_cst for constant operands and
24125 VEC_DUPLICATE_EXPR otherwise.
24126 (make_vector_type): Remove temporary is_constant ().
24127 (build_vector_type, build_opaque_vector_type): Take the number of
24128 units as a poly_uint64 rather than an int.
24129 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24131 * cfgexpand.c (expand_debug_expr): Likewise.
24132 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24133 (store_constructor, expand_expr_real_1): Likewise.
24134 (const_scalar_mask_from_tree): Likewise.
24135 * fold-const-call.c (fold_const_reduction): Likewise.
24136 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24137 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24138 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24139 (fold_relational_const): Likewise.
24140 (native_interpret_vector): Likewise. Change the size from an
24141 int to an unsigned int.
24142 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24143 TYPE_VECTOR_SUBPARTS.
24144 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24145 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24146 duplicating a non-constant operand into a variable-length vector.
24147 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24148 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24149 * ipa-icf.c (sem_variable::equals): Likewise.
24150 * match.pd: Likewise.
24151 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24152 * print-tree.c (print_node): Likewise.
24153 * stor-layout.c (layout_type): Likewise.
24154 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24155 * tree-cfg.c (verify_gimple_comparison): Likewise.
24156 (verify_gimple_assign_binary): Likewise.
24157 (verify_gimple_assign_ternary): Likewise.
24158 (verify_gimple_assign_single): Likewise.
24159 * tree-pretty-print.c (dump_generic_node): Likewise.
24160 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24161 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24162 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24163 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24164 (vect_shift_permute_load_chain): Likewise.
24165 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24166 (expand_vector_condition, optimize_vector_constructor): Likewise.
24167 (lower_vec_perm, get_compute_type): Likewise.
24168 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24169 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24170 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24171 (vect_recog_mask_conversion_pattern): Likewise.
24172 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24173 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24174 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24175 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24176 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24177 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24178 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24179 (supportable_widening_operation): Likewise.
24180 (supportable_narrowing_operation): Likewise.
24181 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24183 * varasm.c (output_constant): Likewise.
24185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24186 Alan Hayward <alan.hayward@arm.com>
24187 David Sherwood <david.sherwood@arm.com>
24189 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24190 so that both the length == 3 and length != 3 cases set up their
24191 own permute vectors. Add comments explaining why we know the
24192 number of elements is constant.
24193 (vect_permute_load_chain): Likewise.
24195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24196 Alan Hayward <alan.hayward@arm.com>
24197 David Sherwood <david.sherwood@arm.com>
24199 * machmode.h (mode_nunits): Change from unsigned char to
24201 (ONLY_FIXED_SIZE_MODES): New macro.
24202 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24203 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24204 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24206 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24207 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24208 or if measurement_type is not polynomial.
24209 * genmodes.c (ZERO_COEFFS): New macro.
24210 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24212 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24213 Use ZERO_COEFFS when emitting initializers.
24214 * data-streamer.h (bp_pack_poly_value): New function.
24215 (bp_unpack_poly_value): Likewise.
24216 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24217 for GET_MODE_NUNITS.
24218 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24219 for GET_MODE_NUNITS.
24220 * tree.c (make_vector_type): Remove temporary shim and make
24221 the real function take the number of units as a poly_uint64
24222 rather than an int.
24223 (build_vector_type_for_mode): Handle polynomial nunits.
24224 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24225 * emit-rtl.c (const_vec_series_p_1): Likewise.
24226 (gen_rtx_CONST_VECTOR): Likewise.
24227 * fold-const.c (test_vec_duplicate_folding): Likewise.
24228 * genrecog.c (validate_pattern): Likewise.
24229 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24230 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24231 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24232 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24233 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24234 * rtlanal.c (subreg_get_info): Likewise.
24235 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24236 (vect_grouped_load_supported): Likewise.
24237 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24238 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24239 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24240 (simplify_const_unary_operation, simplify_binary_operation_1)
24241 (simplify_const_binary_operation, simplify_ternary_operation)
24242 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24243 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24244 instead of CONST_VECTOR_NUNITS.
24245 * varasm.c (output_constant_pool_2): Likewise.
24246 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24247 explicit-encoded elements in the XVEC for variable-length vectors.
24249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24251 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24254 Alan Hayward <alan.hayward@arm.com>
24255 David Sherwood <david.sherwood@arm.com>
24257 * coretypes.h (fixed_size_mode): Declare.
24258 (fixed_size_mode_pod): New typedef.
24259 * builtins.h (target_builtins::x_apply_args_mode)
24260 (target_builtins::x_apply_result_mode): Change type to
24261 fixed_size_mode_pod.
24262 * builtins.c (apply_args_size, apply_result_size, result_vector)
24263 (expand_builtin_apply_args_1, expand_builtin_apply)
24264 (expand_builtin_return): Update accordingly.
24266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24268 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24269 * cselib.c (cselib_hash_rtx): Likewise.
24270 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24271 CONST_VECTOR encoding.
24273 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24274 Jeff Law <law@redhat.com>
24277 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24278 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24279 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24280 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24283 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24284 explicitly probe *sp in a noreturn function if there were any callee
24285 register saves or frame pointer is needed.
24287 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24290 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24291 BLKmode for ternary, binary or unary expressions.
24294 * var-tracking.c (delete_vta_debug_insn): New inline function.
24295 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24296 insns from get_insns () to NULL instead of each bb separately.
24297 Use delete_vta_debug_insn. No longer static.
24298 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24299 delete_vta_debug_insns callers.
24300 * rtl.h (delete_vta_debug_insns): Declare.
24301 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24302 instead of variable_tracking_main.
24304 2018-01-03 Martin Sebor <msebor@redhat.com>
24306 PR tree-optimization/83603
24307 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24308 arguments past the endof the argument list in functions declared
24309 without a prototype.
24310 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24311 Avoid checking when arguments are null.
24313 2018-01-03 Martin Sebor <msebor@redhat.com>
24316 * doc/extend.texi (attribute const): Fix a typo.
24317 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24318 issuing -Wsuggest-attribute for void functions.
24320 2018-01-03 Martin Sebor <msebor@redhat.com>
24322 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24323 offset_int::from instead of wide_int::to_shwi.
24324 (maybe_diag_overlap): Remove assertion.
24325 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24326 * gimple-ssa-sprintf.c (format_directive): Same.
24327 (parse_directive): Same.
24328 (sprintf_dom_walker::compute_format_length): Same.
24329 (try_substitute_return_value): Same.
24331 2018-01-03 Jeff Law <law@redhat.com>
24333 PR middle-end/83654
24334 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24335 non-constant residual for zero at runtime and avoid probing in
24336 that case. Reorganize code for trailing problem to mirror handling
24339 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24341 PR tree-optimization/83501
24342 * tree-ssa-strlen.c (get_string_cst): New.
24343 (handle_char_store): Call get_string_cst.
24345 2018-01-03 Martin Liska <mliska@suse.cz>
24347 PR tree-optimization/83593
24348 * tree-ssa-strlen.c: Include tree-cfg.h.
24349 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24350 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24351 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24353 (strlen_dom_walker::before_dom_children): Call
24354 gimple_purge_dead_eh_edges. Dump tranformation with details
24356 (strlen_dom_walker::before_dom_children): Update call by adding
24357 new argument cleanup_eh.
24358 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24360 2018-01-03 Martin Liska <mliska@suse.cz>
24363 * cif-code.def (VARIADIC_THUNK): New enum value.
24364 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24367 2018-01-03 Jan Beulich <jbeulich@suse.com>
24369 * sse.md (mov<mode>_internal): Tighten condition for when to use
24370 vmovdqu<ssescalarsize> for TI and OI modes.
24372 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24374 Update copyright years.
24376 2018-01-03 Martin Liska <mliska@suse.cz>
24379 * ipa-visibility.c (function_and_variable_visibility): Skip
24380 functions with noipa attribure.
24382 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24384 * gcc.c (process_command): Update copyright notice dates.
24385 * gcov-dump.c (print_version): Ditto.
24386 * gcov.c (print_version): Ditto.
24387 * gcov-tool.c (print_version): Ditto.
24388 * gengtype.c (create_file): Ditto.
24389 * doc/cpp.texi: Bump @copying's copyright year.
24390 * doc/cppinternals.texi: Ditto.
24391 * doc/gcc.texi: Ditto.
24392 * doc/gccint.texi: Ditto.
24393 * doc/gcov.texi: Ditto.
24394 * doc/install.texi: Ditto.
24395 * doc/invoke.texi: Ditto.
24397 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24399 * vector-builder.h (vector_builder::m_full_nelts): Change from
24400 unsigned int to poly_uint64.
24401 (vector_builder::full_nelts): Update prototype accordingly.
24402 (vector_builder::new_vector): Likewise.
24403 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24404 (vector_builder::operator ==): Likewise.
24405 (vector_builder::finalize): Likewise.
24406 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24407 Take the number of elements as a poly_uint64 rather than an
24409 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24410 from unsigned int to poly_uint64.
24411 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24412 (vec_perm_indices::new_vector): Likewise.
24413 (vec_perm_indices::length): Likewise.
24414 (vec_perm_indices::nelts_per_input): Likewise.
24415 (vec_perm_indices::input_nelts): Likewise.
24416 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24417 number of elements per input as a poly_uint64 rather than an
24418 unsigned int. Use the original encoding for variable-length
24419 vectors, rather than clamping each individual element.
24420 For the second and subsequent elements in each pattern,
24421 clamp the step and base before clamping their sum.
24422 (vec_perm_indices::series_p): Handle polynomial element counts.
24423 (vec_perm_indices::all_in_range_p): Likewise.
24424 (vec_perm_indices_to_tree): Likewise.
24425 (vec_perm_indices_to_rtx): Likewise.
24426 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24427 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24428 (tree_vector_builder::new_binary_operation): Handle polynomial
24429 element counts. Return false if we need to know the number
24430 of elements at compile time.
24431 * fold-const.c (fold_vec_perm): Punt if the number of elements
24432 isn't known at compile time.
24434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24436 * vec-perm-indices.h (vec_perm_builder): Change element type
24437 from HOST_WIDE_INT to poly_int64.
24438 (vec_perm_indices::element_type): Update accordingly.
24439 (vec_perm_indices::clamp): Handle polynomial element_types.
24440 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24441 (vec_perm_indices::all_in_range_p): Likewise.
24442 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24444 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24445 polynomial vec_perm_indices element types.
24446 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24447 * fold-const.c (fold_vec_perm): Likewise.
24448 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24449 * tree-vect-generic.c (lower_vec_perm): Likewise.
24450 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24451 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24452 element type to HOST_WIDE_INT.
24454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24455 Alan Hayward <alan.hayward@arm.com>
24456 David Sherwood <david.sherwood@arm.com>
24458 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24459 rather than an int. Use plus_constant.
24460 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24461 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24464 Alan Hayward <alan.hayward@arm.com>
24465 David Sherwood <david.sherwood@arm.com>
24467 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24468 a HOST_WIDE_INT to a poly_int64.
24470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24471 Alan Hayward <alan.hayward@arm.com>
24472 David Sherwood <david.sherwood@arm.com>
24474 * calls.c (load_register_parameters): Cope with polynomial
24475 mode sizes. Require a constant size for BLKmode parameters
24476 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24477 forces a parameter to be padded at the lsb end in order to
24478 fill a complete number of words, require the parameter size
24479 to be ordered wrt UNITS_PER_WORD.
24481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24482 Alan Hayward <alan.hayward@arm.com>
24483 David Sherwood <david.sherwood@arm.com>
24485 * reload1.c (spill_stack_slot_width): Change element type
24486 from unsigned int to poly_uint64_pod.
24487 (alter_reg): Treat mode sizes as polynomial.
24489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24490 Alan Hayward <alan.hayward@arm.com>
24491 David Sherwood <david.sherwood@arm.com>
24493 * reload.c (complex_word_subreg_p): New function.
24494 (reload_inner_reg_of_subreg, push_reload): Use it.
24496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24497 Alan Hayward <alan.hayward@arm.com>
24498 David Sherwood <david.sherwood@arm.com>
24500 * lra-constraints.c (process_alt_operands): Reject matched
24501 operands whose sizes aren't ordered.
24502 (match_reload): Refer to this check here.
24504 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24505 Alan Hayward <alan.hayward@arm.com>
24506 David Sherwood <david.sherwood@arm.com>
24508 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24509 that the mode size is in the set {1, 2, 4, 8, 16}.
24511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24512 Alan Hayward <alan.hayward@arm.com>
24513 David Sherwood <david.sherwood@arm.com>
24515 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24516 Use plus_constant instead of gen_rtx_PLUS.
24518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24519 Alan Hayward <alan.hayward@arm.com>
24520 David Sherwood <david.sherwood@arm.com>
24522 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24523 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24524 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24525 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24526 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24527 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24528 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24529 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24530 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24531 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24533 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24534 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24535 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24536 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24537 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24538 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24539 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24540 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24541 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24542 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24544 * expr.c (emit_move_resolve_push): Treat the input and result
24545 of PUSH_ROUNDING as a poly_int64.
24546 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24547 (emit_push_insn): Likewise.
24548 * lra-eliminations.c (mark_not_eliminable): Likewise.
24549 * recog.c (push_operand): Likewise.
24550 * reload1.c (elimination_effects): Likewise.
24551 * rtlanal.c (nonzero_bits1): Likewise.
24552 * calls.c (store_one_arg): Likewise. Require the padding to be
24553 known at compile time.
24555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24556 Alan Hayward <alan.hayward@arm.com>
24557 David Sherwood <david.sherwood@arm.com>
24559 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24560 Use plus_constant instead of gen_rtx_PLUS.
24562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24563 Alan Hayward <alan.hayward@arm.com>
24564 David Sherwood <david.sherwood@arm.com>
24566 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24567 rather than an int.
24569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24570 Alan Hayward <alan.hayward@arm.com>
24571 David Sherwood <david.sherwood@arm.com>
24573 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24574 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24575 via stack temporaries. Treat the mode size as polynomial too.
24577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24578 Alan Hayward <alan.hayward@arm.com>
24579 David Sherwood <david.sherwood@arm.com>
24581 * expr.c (expand_expr_real_2): When handling conversions involving
24582 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24583 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24584 as a poly_uint64 too.
24586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24587 Alan Hayward <alan.hayward@arm.com>
24588 David Sherwood <david.sherwood@arm.com>
24590 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24593 Alan Hayward <alan.hayward@arm.com>
24594 David Sherwood <david.sherwood@arm.com>
24596 * combine.c (can_change_dest_mode): Handle polynomial
24597 REGMODE_NATURAL_SIZE.
24598 * expmed.c (store_bit_field_1): Likewise.
24599 * expr.c (store_constructor): Likewise.
24600 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24601 and polynomial REGMODE_NATURAL_SIZE.
24602 (gen_lowpart_common): Likewise.
24603 * reginfo.c (record_subregs_of_mode): Likewise.
24604 * rtlanal.c (read_modify_subreg_p): Likewise.
24606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24607 Alan Hayward <alan.hayward@arm.com>
24608 David Sherwood <david.sherwood@arm.com>
24610 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24611 numbers of elements.
24613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24614 Alan Hayward <alan.hayward@arm.com>
24615 David Sherwood <david.sherwood@arm.com>
24617 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24624 in a POINTER_PLUS_EXPR.
24626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24627 Alan Hayward <alan.hayward@arm.com>
24628 David Sherwood <david.sherwood@arm.com>
24630 * omp-simd-clone.c (simd_clone_subparts): New function.
24631 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24632 (ipa_simd_modify_function_body): Likewise.
24634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24635 Alan Hayward <alan.hayward@arm.com>
24636 David Sherwood <david.sherwood@arm.com>
24638 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24639 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24640 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24641 (expand_vector_condition, vector_element): Likewise.
24642 (subparts_gt): New function.
24643 (get_compute_type): Use subparts_gt.
24644 (count_type_subparts): Delete.
24645 (expand_vector_operations_1): Use subparts_gt instead of
24646 count_type_subparts.
24648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24649 Alan Hayward <alan.hayward@arm.com>
24650 David Sherwood <david.sherwood@arm.com>
24652 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24653 (vect_compile_time_alias): ...this new function. Do the calculation
24654 on poly_ints rather than trees.
24655 (vect_prune_runtime_alias_test_list): Update call accordingly.
24657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24658 Alan Hayward <alan.hayward@arm.com>
24659 David Sherwood <david.sherwood@arm.com>
24661 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24663 (vect_schedule_slp_instance): Likewise.
24665 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24666 Alan Hayward <alan.hayward@arm.com>
24667 David Sherwood <david.sherwood@arm.com>
24669 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24670 constant and extern definitions for variable-length vectors.
24671 (vect_get_constant_vectors): Note that the number of units
24672 is known to be constant.
24674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24675 Alan Hayward <alan.hayward@arm.com>
24676 David Sherwood <david.sherwood@arm.com>
24678 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24679 of units as polynomial. Choose between WIDE and NARROW based
24682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24683 Alan Hayward <alan.hayward@arm.com>
24684 David Sherwood <david.sherwood@arm.com>
24686 * tree-vect-stmts.c (simd_clone_subparts): New function.
24687 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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-vect-stmts.c (vectorizable_call): Treat the number of
24694 vectors as polynomial. Use build_index_vector for
24695 IFN_GOMP_SIMD_LANE.
24697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24698 Alan Hayward <alan.hayward@arm.com>
24699 David Sherwood <david.sherwood@arm.com>
24701 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24702 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24703 for variable-length vectors.
24704 (vectorizable_mask_load_store): Treat the number of units as
24705 polynomial, asserting that it is constant if the condition has
24706 already been enforced.
24707 (vectorizable_store, vectorizable_load): Likewise.
24709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24710 Alan Hayward <alan.hayward@arm.com>
24711 David Sherwood <david.sherwood@arm.com>
24713 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24714 of units as polynomial. Punt if we can't tell at compile time
24715 which vector contains the final result.
24717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24718 Alan Hayward <alan.hayward@arm.com>
24719 David Sherwood <david.sherwood@arm.com>
24721 * tree-vect-loop.c (vectorizable_induction): Treat the number
24722 of units as polynomial. Punt on SLP inductions. Use an integer
24723 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24724 cast of such a series for variable-length floating-point
24727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24728 Alan Hayward <alan.hayward@arm.com>
24729 David Sherwood <david.sherwood@arm.com>
24731 * tree.h (build_index_vector): Declare.
24732 * tree.c (build_index_vector): New function.
24733 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24734 of units as polynomial, forcibly converting it to a constant if
24735 vectorizable_reduction has already enforced the condition.
24736 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24737 to create a {1,2,3,...} vector.
24738 (vectorizable_reduction): Treat the number of units as polynomial.
24739 Choose vectype_in based on the largest scalar element size rather
24740 than the smallest number of units. Enforce the restrictions
24743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24744 Alan Hayward <alan.hayward@arm.com>
24745 David Sherwood <david.sherwood@arm.com>
24747 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24748 number of units as polynomial.
24750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24751 Alan Hayward <alan.hayward@arm.com>
24752 David Sherwood <david.sherwood@arm.com>
24754 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24755 * target.def (autovectorize_vector_sizes): Return the vector sizes
24756 by pointer, using vector_sizes rather than a bitmask.
24757 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24758 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24759 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24761 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24762 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24763 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24764 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24765 * omp-general.c (omp_max_vf): Likewise.
24766 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24767 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24768 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24769 * tree-vect-slp.c (vect_slp_bb): Likewise.
24770 * doc/tm.texi: Regenerate.
24771 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24773 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24774 the vector size as a poly_uint64 rather than an unsigned int.
24775 (current_vector_size): Change from an unsigned int to a poly_uint64.
24776 (get_vectype_for_scalar_type): Update accordingly.
24777 * tree.h (build_truth_vector_type): Take the size and number of
24778 units as a poly_uint64 rather than an unsigned int.
24779 (build_vector_type): Add a temporary overload that takes
24780 the number of units as a poly_uint64 rather than an unsigned int.
24781 * tree.c (make_vector_type): Likewise.
24782 (build_truth_vector_type): Take the number of units as a poly_uint64
24783 rather than an unsigned int.
24785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24786 Alan Hayward <alan.hayward@arm.com>
24787 David Sherwood <david.sherwood@arm.com>
24789 * target.def (get_mask_mode): Take the number of units and length
24790 as poly_uint64s rather than unsigned ints.
24791 * targhooks.h (default_get_mask_mode): Update accordingly.
24792 * targhooks.c (default_get_mask_mode): Likewise.
24793 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24794 * doc/tm.texi: Regenerate.
24796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24797 Alan Hayward <alan.hayward@arm.com>
24798 David Sherwood <david.sherwood@arm.com>
24800 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24801 * omp-general.c (omp_max_vf): Likewise.
24802 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24803 (expand_omp_simd): Handle polynomial safelen.
24804 * omp-low.c (omplow_simd_context): Add a default constructor.
24805 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24806 (lower_rec_simd_input_clauses): Update accordingly.
24807 (lower_rec_input_clauses): Likewise.
24809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24810 Alan Hayward <alan.hayward@arm.com>
24811 David Sherwood <david.sherwood@arm.com>
24813 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24814 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24815 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24816 (vect_analyze_slp_cost): Likewise.
24817 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24818 (vect_model_load_cost): Likewise.
24820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24821 Alan Hayward <alan.hayward@arm.com>
24822 David Sherwood <david.sherwood@arm.com>
24824 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24825 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24826 from an unsigned int * to a poly_uint64_pod *.
24827 (calculate_unrolling_factor): New function.
24828 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24831 Alan Hayward <alan.hayward@arm.com>
24832 David Sherwood <david.sherwood@arm.com>
24834 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24835 from an unsigned int to a poly_uint64.
24836 (_loop_vec_info::slp_unrolling_factor): Likewise.
24837 (_loop_vec_info::vectorization_factor): Change from an int
24839 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24840 (vect_get_num_vectors): New function.
24841 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24842 (vect_get_num_copies): Use vect_get_num_vectors.
24843 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24844 to an unsigned int *.
24845 (vect_analyze_data_refs): Change min_vf from an int * to a
24847 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24848 than an unsigned HOST_WIDE_INT.
24849 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24850 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24851 to an unsigned int *.
24852 (vect_analyze_data_ref_dependences): Likewise.
24853 (vect_compute_data_ref_alignment): Handle polynomial vf.
24854 (vect_enhance_data_refs_alignment): Likewise.
24855 (vect_prune_runtime_alias_test_list): Likewise.
24856 (vect_shift_permute_load_chain): Likewise.
24857 (vect_supportable_dr_alignment): Likewise.
24858 (dependence_distance_ge_vf): Take the vectorization factor as a
24859 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24860 (vect_analyze_data_refs): Change min_vf from an int * to a
24862 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24863 vfm1 as a poly_uint64 rather than an int. Make the same change
24864 for the returned bound_scalar.
24865 (vect_gen_vector_loop_niters): Handle polynomial vf.
24866 (vect_do_peeling): Likewise. Update call to
24867 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24868 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24870 * tree-vect-loop.c (vect_determine_vectorization_factor)
24871 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24872 (vect_get_known_peeling_cost): Likewise.
24873 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24874 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24875 (vect_transform_loop): Likewise. Use the lowest possible VF when
24876 updating the upper bounds of the loop.
24877 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24878 rather than an int.
24879 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24880 polynomial unroll factors.
24881 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24882 (vect_make_slp_decision): Likewise.
24883 (vect_supported_load_permutation_p): Likewise, and polynomial
24885 (vect_analyze_slp_cost): Handle polynomial vf.
24886 (vect_slp_analyze_node_operations): Likewise.
24887 (vect_slp_analyze_bb_1): Likewise.
24888 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24889 than an unsigned HOST_WIDE_INT.
24890 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24891 (vectorizable_load): Handle polynomial vf.
24892 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24894 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24897 Alan Hayward <alan.hayward@arm.com>
24898 David Sherwood <david.sherwood@arm.com>
24900 * match.pd: Handle bit operations involving three constants
24901 and try to fold one pair.
24903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24905 * tree-vect-loop-manip.c: Include gimple-fold.h.
24906 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24907 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24908 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24909 Add a path that uses a step of VF instead of 1, but disable it
24911 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24912 and niters_no_overflow parameters. Update calls to
24913 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24914 Create a new SSA name if the latter choses to use a ste other
24915 than zero, and return it via niters_vector_mult_vf_var.
24916 * tree-vect-loop.c (vect_transform_loop): Update calls to
24917 vect_do_peeling, vect_gen_vector_loop_niters and
24918 slpeel_make_loop_iterate_ntimes.
24919 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24920 (vect_gen_vector_loop_niters): Update declarations after above changes.
24922 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24924 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24925 128-bit round to integer instructions.
24926 (ceil<mode>2): Likewise.
24927 (btrunc<mode>2): Likewise.
24928 (round<mode>2): Likewise.
24930 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24932 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24933 unaligned VSX load/store on P8/P9.
24934 (expand_block_clear): Allow the use of unaligned VSX
24935 load/store on P8/P9.
24937 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24939 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24941 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24942 swap associated with both a load and a store.
24944 2018-01-02 Andrew Waterman <andrew@sifive.com>
24946 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24947 * config/riscv/riscv.md (clear_cache): Use it.
24949 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24951 * web.c: Remove out-of-date comment.
24953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24955 * expr.c (fixup_args_size_notes): Check that any existing
24956 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24957 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24958 (emit_single_push_insn): ...here.
24960 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24962 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24963 (const_vector_encoded_nelts): New function.
24964 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24965 (const_vector_int_elt, const_vector_elt): Declare.
24966 * emit-rtl.c (const_vector_int_elt_1): New function.
24967 (const_vector_elt): Likewise.
24968 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24969 of CONST_VECTOR_ELT.
24971 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24973 * expr.c: Include rtx-vector-builder.h.
24974 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24975 directly on the tree encoding.
24976 (const_vector_from_tree): Likewise.
24977 * optabs.c: Include rtx-vector-builder.h.
24978 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24979 sequence of "u" values.
24980 * vec-perm-indices.c: Include rtx-vector-builder.h.
24981 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24982 directly on the vec_perm_indices encoding.
24984 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24986 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24987 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24988 * rtx-vector-builder.h: New file.
24989 * rtx-vector-builder.c: Likewise.
24990 * rtl.h (rtx_def::u2): Add a const_vector field.
24991 (CONST_VECTOR_NPATTERNS): New macro.
24992 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24993 (CONST_VECTOR_DUPLICATE_P): Likewise.
24994 (CONST_VECTOR_STEPPED_P): Likewise.
24995 (CONST_VECTOR_ENCODED_ELT): Likewise.
24996 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24997 (unwrap_const_vec_duplicate): Likewise.
24998 (const_vec_series_p): Check for a non-duplicated vector encoding.
24999 Say that the function only returns true for integer vectors.
25000 * emit-rtl.c: Include rtx-vector-builder.h.
25001 (gen_const_vec_duplicate_1): Delete.
25002 (gen_const_vector): Call gen_const_vec_duplicate instead of
25003 gen_const_vec_duplicate_1.
25004 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25005 (gen_const_vec_duplicate): Use rtx_vector_builder.
25006 (gen_const_vec_series): Likewise.
25007 (gen_rtx_CONST_VECTOR): Likewise.
25008 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25009 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25010 Build a new vector rather than modifying a CONST_VECTOR in-place.
25011 (handle_special_swappables): Update call accordingly.
25012 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25013 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25014 Build a new vector rather than modifying a CONST_VECTOR in-place.
25015 (handle_special_swappables): Update call accordingly.
25017 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25019 * simplify-rtx.c (simplify_const_binary_operation): Use
25020 CONST_VECTOR_ELT instead of XVECEXP.
25022 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25024 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25025 the selector elements to be different from the data elements
25026 if the selector is a VECTOR_CST.
25027 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25028 ssizetype for the selector.
25030 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25032 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25033 before testing each element individually.
25034 * tree-vect-generic.c (lower_vec_perm): Likewise.
25036 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25038 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25039 * selftest-run-tests.c (selftest::run_tests): Call it.
25040 * vector-builder.h (vector_builder::operator ==): New function.
25041 (vector_builder::operator !=): Likewise.
25042 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25043 (vec_perm_indices::all_from_input_p): New function.
25044 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25045 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25046 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25047 instead of reading the VECTOR_CST directly. Detect whether both
25048 vector inputs are the same before constructing the vec_perm_indices,
25049 and update the number of inputs argument accordingly. Use the
25050 utility functions added above. Only construct sel2 if we need to.
25052 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25054 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25055 the broadcast of the low byte.
25056 (expand_mult_highpart): Use an explicit encoding for the permutes.
25057 * optabs-query.c (can_mult_highpart_p): Likewise.
25058 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25059 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25060 (vectorizable_bswap): Likewise.
25061 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25062 explicit encoding for the power-of-2 permutes.
25063 (vect_permute_store_chain): Likewise.
25064 (vect_grouped_load_supported): Likewise.
25065 (vect_permute_load_chain): Likewise.
25067 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25069 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25070 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25071 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25072 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25073 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25074 (vect_gen_perm_mask_any): Likewise.
25076 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25078 * int-vector-builder.h: New file.
25079 * vec-perm-indices.h: Include int-vector-builder.h.
25080 (vec_perm_indices): Redefine as an int_vector_builder.
25081 (auto_vec_perm_indices): Delete.
25082 (vec_perm_builder): Redefine as a stand-alone class.
25083 (vec_perm_indices::vec_perm_indices): New function.
25084 (vec_perm_indices::clamp): Likewise.
25085 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25086 (vec_perm_indices::new_vector): New function.
25087 (vec_perm_indices::new_expanded_vector): Update for new
25088 vec_perm_indices class.
25089 (vec_perm_indices::rotate_inputs): New function.
25090 (vec_perm_indices::all_in_range_p): Operate directly on the
25091 encoded form, without computing elided elements.
25092 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25093 encoding. Update for new vec_perm_indices class.
25094 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25095 the given vec_perm_builder.
25096 (expand_vec_perm_var): Update vec_perm_builder constructor.
25097 (expand_mult_highpart): Use vec_perm_builder instead of
25098 auto_vec_perm_indices.
25099 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25100 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25101 or double series encoding as appropriate.
25102 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25103 vec_perm_indices instead of auto_vec_perm_indices.
25104 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25105 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25106 (vect_permute_store_chain): Likewise.
25107 (vect_grouped_load_supported): Likewise.
25108 (vect_permute_load_chain): Likewise.
25109 (vect_shift_permute_load_chain): Likewise.
25110 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25111 (vect_transform_slp_perm_load): Likewise.
25112 (vect_schedule_slp_instance): Likewise.
25113 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25114 (vectorizable_mask_load_store): Likewise.
25115 (vectorizable_bswap): Likewise.
25116 (vectorizable_store): Likewise.
25117 (vectorizable_load): Likewise.
25118 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25119 vec_perm_indices instead of auto_vec_perm_indices. Use
25120 tree_to_vec_perm_builder to read the vector from a tree.
25121 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25122 vec_perm_builder instead of a vec_perm_indices.
25123 (have_whole_vector_shift): Use vec_perm_builder and
25124 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25125 truncation to calc_vec_perm_mask_for_shift.
25126 (vect_create_epilog_for_reduction): Likewise.
25127 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25128 from auto_vec_perm_indices to vec_perm_indices.
25129 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25130 instead of changing individual elements.
25131 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25132 the vector in d.perm.
25133 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25134 from auto_vec_perm_indices to vec_perm_indices.
25135 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25136 instead of changing individual elements.
25137 (arm_vectorize_vec_perm_const): Use new_vector to install
25138 the vector in d.perm.
25139 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25140 Update vec_perm_builder constructor.
25141 (rs6000_expand_interleave): Likewise.
25142 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25143 (rs6000_expand_interleave): Likewise.
25145 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25147 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25148 to qimode could truncate the indices.
25149 * optabs.c (expand_vec_perm_var): Likewise.
25151 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25153 * Makefile.in (OBJS): Add vec-perm-indices.o.
25154 * vec-perm-indices.h: New file.
25155 * vec-perm-indices.c: Likewise.
25156 * target.h (vec_perm_indices): Replace with a forward class
25158 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25159 * optabs.h: Include vec-perm-indices.h.
25160 (expand_vec_perm): Delete.
25161 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25162 (expand_vec_perm_const): Declare.
25163 * target.def (vec_perm_const_ok): Replace with...
25164 (vec_perm_const): ...this new hook.
25165 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25166 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25167 * doc/tm.texi: Regenerate.
25168 * optabs.def (vec_perm_const): Delete.
25169 * doc/md.texi (vec_perm_const): Likewise.
25170 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25171 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25172 expand_vec_perm for constant permutation vectors. Assert that
25173 the mode of variable permutation vectors is the integer equivalent
25174 of the mode that is being permuted.
25175 * optabs-query.h (selector_fits_mode_p): Declare.
25176 * optabs-query.c: Include vec-perm-indices.h.
25177 (selector_fits_mode_p): New function.
25178 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25179 is defined, instead of checking whether the vec_perm_const_optab
25180 exists. Use targetm.vectorize.vec_perm_const instead of
25181 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25182 fit in the vector mode before using a variable permute.
25183 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25184 vec_perm_indices instead of an rtx.
25185 (expand_vec_perm): Replace with...
25186 (expand_vec_perm_const): ...this new function. Take the selector
25187 as a vec_perm_indices rather than an rtx. Also take the mode of
25188 the selector. Update call to shift_amt_for_vec_perm_mask.
25189 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25190 Use vec_perm_indices::new_expanded_vector to expand the original
25191 selector into bytes. Check whether the indices fit in the vector
25192 mode before using a variable permute.
25193 (expand_vec_perm_var): Make global.
25194 (expand_mult_highpart): Use expand_vec_perm_const.
25195 * fold-const.c: Includes vec-perm-indices.h.
25196 * tree-ssa-forwprop.c: Likewise.
25197 * tree-vect-data-refs.c: Likewise.
25198 * tree-vect-generic.c: Likewise.
25199 * tree-vect-loop.c: Likewise.
25200 * tree-vect-slp.c: Likewise.
25201 * tree-vect-stmts.c: Likewise.
25202 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25204 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25205 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25206 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25207 (aarch64_vectorize_vec_perm_const): ...this new function.
25208 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25209 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25210 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25211 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25212 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25213 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25214 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25216 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25217 check for NEON modes.
25218 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25219 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25220 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25221 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25223 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25224 the old VEC_PERM_CONST conditions.
25225 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25226 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25227 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25228 (ia64_vectorize_vec_perm_const_ok): Merge into...
25229 (ia64_vectorize_vec_perm_const): ...this new function.
25230 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25231 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25232 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25233 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25234 * config/mips/mips.c (mips_expand_vec_perm_const)
25235 (mips_vectorize_vec_perm_const_ok): Merge into...
25236 (mips_vectorize_vec_perm_const): ...this new function.
25237 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25238 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25239 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25240 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25241 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25242 (rs6000_expand_vec_perm_const): Delete.
25243 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25245 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25246 (altivec_expand_vec_perm_const_le): Take each operand individually.
25247 Operate on constant selectors rather than rtxes.
25248 (altivec_expand_vec_perm_const): Likewise. Update call to
25249 altivec_expand_vec_perm_const_le.
25250 (rs6000_expand_vec_perm_const): Delete.
25251 (rs6000_vectorize_vec_perm_const_ok): Delete.
25252 (rs6000_vectorize_vec_perm_const): New function.
25253 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25254 an element count and rtx array.
25255 (rs6000_expand_extract_even): Update call accordingly.
25256 (rs6000_expand_interleave): Likewise.
25257 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25258 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25259 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25260 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25261 (rs6000_expand_vec_perm_const): Delete.
25262 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25263 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25264 (altivec_expand_vec_perm_const_le): Take each operand individually.
25265 Operate on constant selectors rather than rtxes.
25266 (altivec_expand_vec_perm_const): Likewise. Update call to
25267 altivec_expand_vec_perm_const_le.
25268 (rs6000_expand_vec_perm_const): Delete.
25269 (rs6000_vectorize_vec_perm_const_ok): Delete.
25270 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25271 reference to the SPE evmerge intructions.
25272 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25273 an element count and rtx array.
25274 (rs6000_expand_extract_even): Update call accordingly.
25275 (rs6000_expand_interleave): Likewise.
25276 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25277 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25279 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25281 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25283 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25284 vector mode and that that mode matches the mode of the data
25286 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25287 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25288 directly using expand_vec_perm_1 when forcing selectors into
25290 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25294 * optabs-query.h (can_vec_perm_p): Delete.
25295 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25296 * optabs-query.c (can_vec_perm_p): Split into...
25297 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25298 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25299 particular selector is valid.
25300 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25301 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25302 (vect_grouped_load_supported): Likewise.
25303 (vect_shift_permute_load_chain): Likewise.
25304 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25305 (vect_transform_slp_perm_load): Likewise.
25306 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25307 (vectorizable_bswap): Likewise.
25308 (vect_gen_perm_mask_checked): Likewise.
25309 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25310 implementations of variable permutation vectors into account
25311 when deciding which selector to use.
25312 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25313 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25314 with a false third argument.
25315 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25316 to test whether the constant selector is valid and can_vec_perm_var_p
25317 to test whether a variable selector is valid.
25319 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25321 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25322 * optabs-query.c (can_vec_perm_p): Likewise.
25323 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25324 instead of vec_perm_indices.
25325 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25326 (vect_gen_perm_mask_checked): Likewise,
25327 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25328 (vect_gen_perm_mask_checked): Likewise,
25330 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25332 * optabs-query.h (qimode_for_vec_perm): Declare.
25333 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25334 (qimode_for_vec_perm): ...this new function.
25335 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25337 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25339 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25340 does not have a conditional at the top.
25342 2018-01-02 Richard Biener <rguenther@suse.de>
25344 * ipa-inline.c (big_speedup_p): Fix expression.
25346 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25349 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25352 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25356 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25357 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25358 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25359 cond_taken_branch_cost 3->4.
25361 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25363 PR tree-optimization/83581
25364 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25365 TODO_cleanup_cfg if any changes have been made.
25367 PR middle-end/83608
25368 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25369 convert_modes if target mode has the right side, but different mode
25372 PR middle-end/83609
25373 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25374 last argument when extracting from CONCAT. If either from_real or
25375 from_imag is NULL, use expansion through memory. If result is not
25376 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25377 the parts directly to inner mode, if even that fails, use expansion
25380 PR middle-end/83623
25381 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25382 check for bswap in mode rather than HImode and use that in expand_unop
25385 Copyright (C) 2018 Free Software Foundation, Inc.
25387 Copying and distribution of this file, with or without modification,
25388 are permitted in any medium without royalty provided the copyright
25389 notice and this notice are preserved.