1 2018-09-13 Richard Biener <rguenther@suse.de>
4 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
5 (vn_nary_op_insert_pieces_predicated): Do not write useless
6 valid_dominated_by_p entry outside of the allocated storage.
8 2018-09-13 Omar Sandoval <osandov@osandov.com>
9 Tom de Vries <tdevries@suse.de>
12 * dwarf2out.c (is_c): New function.
13 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
15 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
18 * config/aarch64/aarch64.md (*aarch64_bfxil):
20 * config/aarch64/constraints.md (Ulc): Define.
21 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
23 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
26 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
28 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
29 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
30 aarch64_layout_frame call.
31 (aarch64_expand_epilogue): Likewise.
32 (aarch64_initial_elimination_offset): Likewise.
33 (aarch64_get_separate_components): Likewise.
34 (aarch64_use_return_insn_p): Likewise.
35 (aarch64_layout_frame): Remove unneeded check.
37 2018-09-13 Jakub Jelinek <jakub@redhat.com>
39 * configure.ac: Only append
40 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
41 gcc_config_arguments if it was never reconfigured or last reconfigure
42 was with different arguments.
43 * configure: Regenerated.
45 2018-09-13 Jakub Jelinek <jakub@redhat.com>
46 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
49 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
50 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
52 2018-09-13 Jakub Jelinek <jakub@redhat.com>
54 PR tree-optimization/87287
55 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
56 X % C == 0 to X % (unsigned) C == 0 optimization to ...
57 * match.pd (X % C == 0): ... here. New optimization.
59 2018-09-12 Jakub Jelinek <jakub@redhat.com>
62 * expr.h (maybe_optimize_mod_cmp): Declare.
63 * expr.c (mod_inv): New function.
64 (maybe_optimize_mod_cmp): New function.
65 (do_store_flag): Use it.
66 * cfgexpand.c (expand_gimple_cond): Likewise.
68 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
69 Julian Brown <julian@codesourcery.com>
72 * gimplify.c (gimplify_scan_omp_clauses): Set
73 target_firstprivatize_array_bases in OpenACC parallel and kernels
74 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
77 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
79 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
80 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
82 2018-09-12 Richard Biener <rguenther@suse.de>
84 PR tree-optimization/87280
85 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
86 edge but unreachable target.
87 (do_rpo_vn): For conservatively handling a PHI only mark
88 the backedge executable but not the block reachable.
90 2018-09-12 Richard Biener <rguenther@suse.de>
92 PR tree-optimization/87266
93 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
96 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
98 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
100 ("trunc<BFP:mode><DFP_ALL:mode>2")
101 ("trunc<DFP_ALL:mode><BFP:mode>2")
102 ("extend<BFP:mode><DFP_ALL:mode>2")
103 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
104 according to the target operand type.
106 2018-09-12 Jakub Jelinek <jakub@redhat.com>
107 Andreas Krebbel <krebbel@linux.ibm.com>
109 PR tree-optimization/86844
110 * gimple-ssa-store-merging.c
111 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
112 there are any overlapping stores in between them, make sure they are
113 also coalesced or we give up completely.
115 2018-09-12 Jakub Jelinek <jakub@redhat.com>
118 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
119 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
121 2018-09-12 Tom de Vries <tdevries@suse.de>
123 * common.opt (gdescribe-dies): Add option.
124 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
125 attribute for artifical and nameless decls.
126 (dwarf2out_register_external_die): Add description attribute to
127 external reference die.
128 (add_desc_attribute): New functions.
129 (gen_subprogram_die): Add description attribute to
130 DW_TAG_call_site_parameter.
131 * tree-pretty-print.c (print_generic_expr_to_str): New function.
132 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
133 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
135 (@item -gdescribe-dies): Add.
137 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
139 * tree-vrp.c (vrp_shift_undefined_p): Remove.
140 (extract_range_from_binary_expr_1: Call
141 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
142 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
145 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
147 * gimple-ssa-warn-alloca.c
148 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
149 field for ALLOCA_BOUND_*_LARGE.
151 2018-09-11 Nathan Sidwell <nathan@acm.org>
153 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
155 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
157 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
158 for clobbers. Remove obsolete comment.
160 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
162 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
163 mpxchk, mpxld and mpxst types.
164 (define_attr length_immediate): Remove all processing of mpx types.
165 (define_attr prefix_0f): Ditto.
166 (define_attr memory): Ditto.
168 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
170 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
171 (log<mode>2): Change operand 1 predicate to general_operand.
172 Extend operand 1 to XFmode and generate logxf3 insn.
173 (log10<mode>2): Change operand 1 predicate to general_operand.
174 Extend operand 1 to XFmode and generate log10xf3 insn.
175 (log2<mode>2): Change operand 1 predicate to general_operand.
176 Extend operand 1 to XFmode and generate log2xf3 insn.
177 (fyl2xp1_extend<mode>xf3_i387): Remove.
178 (log1p<mode>2): Change operand 1 predicate to general_operand.
179 Extend operand 1 to XFmode and generate log1pxf3 insn.
180 (fxtract_extend<mode>xf3_i387): Remove.
181 (logb<mode>2): Change operand 1 predicate to general_operand.
182 Extend operand 1 to XFmode and generate logbxf3 insn.
183 (ilogb<mode>2): Change operand 1 predicate to general_operand.
184 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
185 (significand<mode>2): Change operand 1 predicate to general_operand.
186 Extend operand 1 to XFmode and generate significandxf3 insn.
188 2018-09-11 Nathan Sidwell <nathan@acm.org>
190 * gcc.c (perror_with_name, pfatal_with_name): Delete.
191 (load_specs): Use fatal_error.
192 (DELETE_IF_ORDINARY, process_command): Use error.
193 (execute, run_attempt): Use fatal_error.
195 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
197 * diagnostic-core.h (sorry_at): New prototype.
198 * diagnostic.c (sorry_at): New function.
200 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
202 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
203 by zero as VR_UNDEFINED.
205 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
207 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
208 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
209 (<sincos>mode2): New expander.
210 (sincos_extend<mode>xf3_i387): Remove insn pattern.
211 (sincos -> sin, cos splitters): Remove splitter patterns.
212 (sincos<mode>3): Change operand 2 predicate to general_operand.
213 Extend operand 2 to XFmode and generate sincosxf3 insn.
214 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
215 Change operand 3 predicate to const1_operand.
216 (fptan_extend<mode>xf4_i387): Remove insn pattern.
217 (tanxf2): Update operands in the call to fptanxf4_i387.
218 (tan<mode>2): Change operand 1 predicate to general_operand.
219 Extend operand 1 to XFmode and generate tanxf3 insn.
220 (atan2xf3): Rename from *fpatanxf3_i387.
221 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
222 (atan2xf3): Remove expander.
223 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
224 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
225 (atan<mode>2): Change operand 1 predicate to general_operand.
226 Extend operand 1 to XFmode and generate atanxf3 insn.
228 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
230 * config/i386/i386.md (x87/SSE constant load splitter): Use
231 memory_operand instead of nonimmediate_operand for input operand
234 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
236 * config/i386/i386.md (float partial SSE register stall splitter): Move
237 splitter near its instruction pattern.
238 (float_extend partial SSE register stall splitter): Ditto.
239 (float_truncate partial SSE register stall splitter): Ditto.
241 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
244 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
245 to speculation_safe_value_not_needed.
248 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
249 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
250 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
251 leaf_function_p, instead use has_hard_reg_initial_val.
253 2018-09-09 Nathan Sidwell <nathan@acm.org>
255 * gcc.h (pfatal_with_name): Don't declare here.
256 * gcc.c (pfatal_with_name): Make static.
258 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
260 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
263 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
265 PR rtl-optimization/85458
266 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
267 priority hook to reduce the priority of EXPR.
269 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
271 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
272 DImode for x87 on 32bit targets. Conditionally disable x87 modes
273 with X87_ENABLE_FLOAT. Remove preparation code.
274 (*float<SWI48:mode><MODEF:mode>2): Rename from
275 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
276 math using "enabled" attribute.
277 (*floatdi<MODEF:mode>2_i387): Rename from
278 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
279 enable for 32bit targets only.
280 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
282 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
283 as operand 1 predicate. Rewrite as define_insn_and_split.
284 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
286 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
288 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
289 to fallthru to FLOAT case.
291 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
294 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
295 around folding of vec_sl to handle out of range shift values.
297 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
299 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
300 Update callers to gen_fix_trunc<mode>_i387_fisttp
301 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
302 nonimmediate_operand.
303 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
304 and corresponding splitters.
305 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
306 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
307 (fix_truncdi_i387_with_temp): Remove insn pattern
308 and corresponding splitters.
309 (fix_trunc<mode>_i387): Change operand 0 predicate to
310 nonimmediate_operand.
311 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
312 and corresponding splitters.
313 (*fistdi2_1): Remove.
315 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
316 (lrintxfdi2): Remove expander. Reimplement as define_insn.
317 (*fist<mode>2_1): Remove.
318 (fist<mode>2): Ditto.
319 (fist<mode>2_with_temp): Remove insn pattern and corresponding
321 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
322 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
323 (fistdi2_<rounding>): Change operand 0 predicate to
324 nonimmediate_operand.
325 (fistdi2_<rounding>_with_temp): Remove insn pattern
326 and corresponding splitters.
327 (fist<mode>2_<rounding>): Change operand 0 predicate to
328 nonimmediate_operand.
329 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
330 and corresponding splitters.
332 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
334 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
336 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
339 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
341 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
342 early gimple folding of vec_splat().
343 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
344 * gimple-fold.h: Add an extern define for tree_vec_extract().
346 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
348 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
349 wrappers around TREE_TYPE comparisons.
351 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
354 * config/s390/predicates.md: Add nonsym_memory_operand.
355 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
356 contains a SYMBOL_REF, load it into an intermediate pseudo.
357 (s390_emit_compare_and_swap): Legitimize operand.
358 * config/s390/s390.md: Use the new nonsym_memory_operand
359 with UNSPECV_CAS patterns.
361 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
364 * config/s390/s390-passes.def: New file.
365 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
367 (make_pass_s390_early_mach): Add declaration.
368 * config/s390/s390.c (make_pass_s390_early_mach):
369 (s390_option_override): Remove dynamic registration.
370 * config/s390/t-s390: Add s390-passes.def.
372 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
374 * config/s390/s390.c (s390_decompose_constant_pool_ref):
375 Remove UNSPEC_LTREL_BASE check.
376 (annotate_constant_pool_refs): Likewise.
377 (find_constant_pool_ref): Likewise.
378 (find_ltrel_base): Removed.
379 (replace_ltrel_base): Removed.
380 (s390_mainpool_finish): Remove replace_ltrel_base call.
381 (s390_chunkify_start): Remove pending LTREL_BASE logic.
382 (s390_chunkify_finish): Remove replace_ltrel_base call.
383 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
385 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
388 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
389 to speculation_safe_value_not_needed.
391 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
392 Bernd Schmidt <bernds_cb1@t-online.de>
394 * config/nvptx/nvptx-opts.h: New file.
395 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
396 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
398 (TARGET_SM35): New macro.
399 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
401 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
404 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
406 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
408 * config/i386/i386.md (truncdfsf2): Remove expander.
409 (truncdfsf2_with_temp): Ditto.
410 (truncxf<mode>2): Ditto.
411 (*truncdfsf_fast_mixed): Remove insn pattern.
412 (*truncdfsf_fast_i387): Ditto.
413 (*truncdfsf_mixed): Ditto.
414 (*truncdfsf_i387): Ditto.
415 (*truncdfsf2_i387_1): Ditto.
416 (*truncxfsf2_mixed): Ditto.
417 (*truncxfdf2_mixed): Ditto.
418 (*truncxf<mode>2_i387_noop): Ditto. Update callers
419 to call gen_truncxf<mode>2 instead.
420 (*truncxf<mode>2_i387): Remove.
421 (reg->reg splitters): Remove splitter pattern.
422 (reg->mem splitters): Ditto.
424 (truncdfsf2): New insn pattern.
425 (truncxf<mode>2): Ditto.
427 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
429 * tree-ssa-math-opts.c (is_mult_by): New function.
430 (is_square_of): Use the above.
431 (optimize_recip_sqrt): New function.
432 (pass_cse_reciprocals::execute): Use the above.
434 2018-09-05 Richard Biener <rguenther@suse.de>
437 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
438 to zero-init the emplaced vec.
440 2018-09-05 Martin Liska <mliska@suse.cz>
442 PR tree-optimization/87205
443 * tree-switch-conversion.c (pass_lower_switch::execute):
444 Group cases for switch statements.
446 2018-09-05 Richard Biener <rguenther@suse.de>
448 PR tree-optimization/87217
449 * tree-ssa-sccvn.c (vuse_valueize): New.
450 (vn_reference_lookup_pieces): Use it.
451 (vn_reference_lookup): Likewise.
453 2018-09-05 Nathan Sidwell <nathan@acm.org>
456 * stor-layout.c (place_field): Scan forwards to check last
457 bitfield when ms_bitfield_placement is in effect.
459 2018-09-05 Richard Biener <rguenther@suse.de>
462 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
465 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
466 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
468 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
469 * config.gcc (extra_objs): Build it.
470 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
472 * config/aarch64/aarch64-passes.def
473 (pass_tag_collision_avoidance): New pass.
474 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
475 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
476 (aarch64_classify_address): Remove static qualifier.
477 (aarch64_address_info, aarch64_address_type): Move to...
478 * config/aarch64/aarch64-protos.h: ... here.
479 (make_pass_tag_collision_avoidance): New function.
480 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
483 2018-09-05 Martin Liska <mliska@suse.cz>
485 * doc/gcov.texi: Update documentation of humar
487 * gcov.c (format_count): Print one decimal place, it provides
488 more fine number of situations like '1G' vs. '1.4G'.
490 2018-09-05 Martin Liska <mliska@suse.cz>
493 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
494 * optc-gen.awk: Allow 'Var' for Deprecated options in order
495 to generate a MASK value.
497 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
500 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
501 if frame pointer isn't used.
502 (compute_frame_pointer_to_fb_displacement): Likewise.
504 2018-09-04 Jakub Jelinek <jakub@redhat.com>
507 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
508 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
509 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
510 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
511 and OPTION_MASK_ISA_XSAVEC_UNSET.
513 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
515 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
516 XOR operations in NAND case.
518 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
520 * wide-int-range.cc (wide_int_range_convert): New.
521 * wide-int-range.h (wide_int_range_convert): New.
522 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
523 code into wide_int_range_convert.
524 (extract_range_into_wide_ints): Do not munge anti range constants
525 into the entire domain. Just return the range back.
527 2018-09-04 Martin Liska <mliska@suse.cz>
529 * genmatch.c (output_line_directive): Add new argument
531 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
533 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
535 * doc/invoke.texi (Option Summary): Add whitespace.
537 * doc/invoke.texi (Option Summary): Add -Waligned-new.
539 2018-09-04 Richard Biener <rguenther@suse.de>
541 PR tree-optimization/87211
542 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
543 backedge value we're supposed to treat as VARYING also number
544 the PHI to VARYING in case it got a different value-number already.
546 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
548 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
549 (extract_range_from_binary_expr_1): Do not call
550 vrp_can_optimize_bit_op.
551 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
553 (wide_int_range_get_mask_and_bounds): New.
554 (wide_int_range_optimize_bit_op): New.
555 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
556 (wide_int_range_bit_and): Same.
557 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
558 (wide_int_range_optimize_bit_op): New.
559 (wide_int_range_get_mask_and_bounds): New.
561 2018-09-04 Richard Biener <rguenther@suse.de>
563 PR tree-optimization/87176
564 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
565 variable. When value-numbering a virtual PHI node make sure
566 to not value-number to the backedge value.
568 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
570 * doc/extend.texi (Long Long, Hex Floats): Document support for
571 long long and hex floats in more recent versions of ISO C++.
573 2018-09-03 Richard Biener <rguenther@suse.de>
575 PR tree-optimization/87177
576 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
579 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
581 * bb-reorder.c (edge_order): Convert to C-qsort-style
582 tri-state comparator.
583 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
585 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
587 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
588 tri-state comparator.
589 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
591 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
593 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
594 (mergesort): ... here as maximum count for using netsort.
595 (gcc_qsort): Set nlim to 3 if stable sort is requested.
596 (gcc_stablesort): New.
597 * system.h (gcc_stablesort): Declare.
599 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
601 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
602 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
603 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
605 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
607 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
608 lxsdx and stxsdx alternatives.
609 (*mov<mode>_hardfloat64): Ditto.
610 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
612 2018-09-03 Richard Biener <rguenther@suse.de>
614 PR tree-optimization/87200
615 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
618 2018-09-03 Martin Liska <mliska@suse.cz>
620 PR tree-optimization/87201
621 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
622 Fix parenthesis in an expression.
624 2018-09-03 Richard Biener <rguenther@suse.de>
626 PR tree-optimization/87197
627 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
628 visited. CSE the VN_INFO hashtable lookup.
630 PR tree-optimization/87169
631 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
632 iterating make sure there's no extra backedges from irreducible
633 regions feeding the header. Mark the destination block
636 2018-09-03 Martin Liska <mliska@suse.cz>
639 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
640 * common/common-targhooks.c (default_get_valid_option_values):
642 * common/common-targhooks.h (default_get_valid_option_values):
644 * common/config/i386/i386-common.c: Move processor_target_table
646 (ix86_get_valid_option_values): New function.
647 (TARGET_GET_VALID_OPTION_VALUES): New macro.
648 * config/i386/i386.c (struct ptt): Move to i386-common.c.
649 (PTA_*): Move all defined masks into i386-common.c.
650 (ix86_function_specific_restore): Use new processor_cost_table.
651 * config/i386/i386.h (struct ptt): Moved from i386.c.
652 (struct pta): Likewise.
653 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
654 * doc/tm.texi.in: Likewise.
655 * opt-suggestions.c (option_proposer::suggest_option):
656 Pass prefix to build_option_suggestions.
657 (option_proposer::get_completions): Likewise.
658 (option_proposer::build_option_suggestions): Use the new target
660 * opts.c (struct option_help_tuple): New struct.
661 (print_filtered_help): Use the new target hook.
663 2018-09-03 Martin Liska <mliska@suse.cz>
666 * predict.c (set_even_probabilities): Add likely_edges
667 argument and handle cases where we have precisely one
669 (combine_predictions_for_bb): Catch also likely_edges.
670 (tree_predict_by_opcode): Handle gswitch statements.
671 * tree-cfg.h (find_case_label_for_value): New declaration.
672 (find_taken_edge_switch_expr): Likewise.
673 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
674 Find pivot in decision tree based on probabily, not by number of
677 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
679 * doc/standards.texi (Standards): Update Objective-C reference.
681 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
683 * doc/install.texi (Prerequisites): Update link for MPC.
685 2018-09-01 Michael Matz <matz@suse.de>
687 PR tree-optimization/87074
688 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
689 PHIs for outer-loop uses.
691 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
693 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
694 * doc/invoke.texi (C Dialect Options): Ditto.
696 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
698 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
700 2018-08-31 Richard Biener <rguenther@suse.de>
702 PR tree-optimization/87168
703 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
704 (rpo_elim::eliminate_avail): When OP was not visited it must
707 2018-08-31 David Malcolm <dmalcolm@redhat.com>
709 * tree-vrp.c (copy_value_range): Convert param "from" from
710 "value_range *" to "const value_range *".
711 (range_is_null): Likewise for param "vr".
712 (range_int_cst_p): Likewise.
713 (range_int_cst_singleton_p): Likewise.
714 (symbolic_range_p): Likewise.
715 (value_ranges_intersect_p): Likewise for both params.
716 (value_range_nonnegative_p): Likewise for param "vr".
717 (value_range_constant_singleton): Likewise.
718 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
719 (extract_range_into_wide_ints): Likewise for param "vr".
720 (extract_range_from_multiplicative_op): Likewise for params "vr0"
722 (vrp_can_optimize_bit_op): Likewise.
723 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
725 (extract_range_from_unary_expr): Likewise.
726 (debug_value_range): Likewise for param "vr".
727 (value_range::dump): Add "const" qualifier.
728 (vrp_prop::check_array_ref): Convert local "vr" from
729 "value_range *" to "const value_range *".
730 (vrp_prop::check_mem_ref): Likewise.
731 (vrp_prop::visit_stmt): Likewise for local "old_vr".
732 (vrp_intersect_ranges_1): Likewise for param "vr_1".
733 (vrp_intersect_ranges): Likewise.
734 (simplify_stmt_for_jump_threading): Likewise for local "vr".
735 (vrp_prop::vrp_finalize): Likewise.
736 * tree-vrp.h (value_range::dump): Add "const" qualifier.
737 (vrp_intersect_ranges): Add "const" qualifier to params as above.
738 (extract_range_from_unary_expr): Likewise.
739 (value_range_constant_singleton): Likewise.
740 (symbolic_range_p): Likewise.
741 (copy_value_range): Likewise.
742 (extract_range_from_binary_expr_1): Likewise.
743 (range_int_cst_p): Likewise.
744 (vrp_set_zero_nonzero_bits): Likewise.
745 (range_int_cst_singleton_p): Likewise.
747 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
749 * config/aarch64/arm_neon.h (vabsd_s64): New.
750 (vnegd_s64): Likewise.
752 2018-08-31 Martin Jambor <mjambor@suse.cz>
754 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
756 2018-08-31 Martin Liska <mliska@suse.cz>
758 * ipa-icf.c (sem_item::add_type): Use
759 sem_item::m_type_hash_cache.
760 * ipa-icf.h: Move the cache from sem_item_optimizer
763 2018-08-31 Nathan Sidwell <nathan@acm.org>
765 * doc/extend.texi (Backwards Compatibility): Remove implicit
766 extern C leeway of () being (...).
768 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
770 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
772 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
776 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
778 2018-08-31 Jakub Jelinek <jakub@redhat.com>
781 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
782 gen_int_mode. Formatting fixes.
784 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
786 * target.def (custom_function_descriptors): Improve documentation.
787 * doc/tm.texi.in (Trampolines): Expand discussion of function
788 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
789 beginning of the section.
790 * doc/tm.texi: Regenerated.
792 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
794 * cfg.h (class auto_edge_flag): Spell out the template-id of the
795 base class in the initializer list. This is a workaround for
796 building with older GCC.
797 (class auto_bb_flag): Likewise.
799 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
801 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
802 (altivec_vcmpequ<VI_char>_p): Remove star.
803 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
805 (expand_strncmp_vec_sequence): New function.
806 (emit_final_str_compare_vec): New function.
807 (expand_strn_compare): Add support for vector strncmp.
808 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
809 length specification to bytes.
810 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
811 (vcmpnezb_p): New pattern.
812 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
813 for option -mstring-compare-inline-limit.
815 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
817 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
818 (PTA_SKYLAKE): Add PTA_AES.
819 (PTA_GOLDMONT): Likewise.
821 2018-08-29 Jan Hubicka <jh@suse.cz>
824 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
825 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
827 2018-08-29 Jan Hubicka <jh@suse.cz>
829 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
831 (hash_tree): Do not visit TYPE_STUB_DECL.
832 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
833 stream TYPE_STUB_DECL.
834 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
835 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
836 after free_lang_data.
837 (type_in_anonymous_namespace_p): Likewise.
839 2018-08-29 Jan Hubicka <jh@suse.cz>
841 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
842 comment that it has to be even number.
843 (class sreal): Change m_sig type to int32_t.
844 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
845 int64_t for temporary calculations.
846 (sreal_verify_basics): Drop one bit from minimum and maximum.
848 2018-08-30 Richard Biener <rguenther@suse.de>
850 PR tree-optimization/87147
851 * tree-ssa-sccvn.c (SSA_VISITED): New function.
852 (visit_phi): When the degenerate result is from the backedge and
853 we didn't visit its definition yet drop to VARYING.
854 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
856 2018-08-29 Jan Hubicka <jh@suse.cz>
858 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
860 (hash_tree): Likewise.
862 2018-08-29 Jan Hubicka <jh@suse.cz>
864 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
865 and TYPE_NEXT_REF_TO.
867 2018-08-29 Jan Hubicka <jh@suse.cz>
869 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
870 comment that it has to be even number.
871 (class sreal): Change m_sig type to int32_t.
872 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
873 int64_t for temporary calculations.
874 (sreal_verify_basics): Drop one bit from minimum and maximum.
876 2018-08-30 Tamar Christina <tamar.christina@arm.com>
878 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
880 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
883 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
884 if to_add is negative.
886 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
889 * builtins.c (c_strlen): Improve range checks.
891 2018-08-29 Martin Sebor <msebor@redhat.com>
892 Jeff Law <law@redhat.com>
894 PR tree-optimization/86714
895 PR tree-optimization/86711
896 * builtins.c (c_strlen): Add arguments to call to string_constant.
897 * expr.c (string_constant): Add argument. Detect missing nul
898 terminator and outermost declaration it's missing in.
899 * expr.h (string_constant): Add argument.
900 * fold-const.c (read_from_constant_string): Add arguments to call to
902 (c_getstr): Likewise.
903 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
905 * tree-ssa-strlen.c (get_stridx): Likewise.
907 2018-08-29 Jan Hubicka <jh@suse.cz>
909 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
910 Do not stream DECL_VINDEX.
911 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
912 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
913 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
915 2018-08-29 Richard Biener <rguenther@suse.de>
917 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
918 virtual operands that are not default defs to honor region
920 (rpo_vn_valueize): Remove ineffective code here.
922 2018-08-29 Richard Biener <rguenther@suse.de>
924 PR tree-optimization/87132
925 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
926 when skipping defs reachable over backedges.
928 2018-08-29 Richard Biener <rguenther@suse.de>
930 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
931 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
932 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
933 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
934 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
935 (vn_reference_lookup_3): Remove use of const_parms.
936 (free_rpo_vn): Do not free const_parms.
937 (do_rpo_vn): Do not call init_const_parms.
938 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
939 SSA_NAME_POINTS_TO_READONLY_MEMORY.
940 (call_may_clobber_ref_p_1): Likewise.
942 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
945 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
947 (-ftree-scev-cprop): Document.
949 2018-08-29 Jan Hubicka <jh@suse.cz>
951 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
953 (sreal constructor): Update.
954 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
955 sreal:operator/): Update.
957 2018-08-29 Martin Liska <mliska@suse.cz>
959 * tree-switch-conversion.c (switch_conversion::expand):
960 Strenghten assumption about gswitch statements.
962 2018-08-29 Richard Biener <rguenther@suse.de>
964 PR tree-optimization/87117
965 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
966 re-value-number released SSA VDEFs.
968 2018-08-29 Richard Biener <rguenther@suse.de>
970 PR tree-optimization/87126
971 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
973 2018-08-28 Jim Wilson <jimw@sifive.com>
975 * config/riscv/pic.md: Rewrite.
976 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
978 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
979 (SOFTF, default_load, softload, softstore): New.
981 2018-08-28 Jeff Law <law@redhat.com>
983 * fold-const.c (fold_binary_loc): Remove recently added assert.
985 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
987 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
988 to OP parmeter of generated function.
990 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
992 PR tree-optimization/87009
993 * match.pd: Add boolean optimizations.
995 2018-08-28 Martin Sebor <msebor@redhat.com>
998 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
999 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1000 (pass_walloca::gate): Use it.
1001 (alloca_call_type): Same.
1002 (pass_walloca::execute): Same.
1003 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1005 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1007 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1008 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1011 2018-08-28 Richard Biener <rguenther@suse.de>
1013 PR tree-optimization/87124
1014 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1015 constants before looking up avail.
1017 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1020 * calls.c (maybe_warn_nonstring_arg): Punt early if
1021 warn_stringop_overflow is zero. Don't call get_range_strlen
1022 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1023 Swap comparison operands to have constants on rhs. Only use
1024 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1025 increment lenrng[0].
1027 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1029 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1030 use of tree_to_shwi. Remove duplicated test for the size being
1031 a whole number of bytes.
1033 2018-08-28 Richard Biener <rguenther@suse.de>
1035 PR tree-optimization/87117
1036 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1037 Handle removed stmt without LHS (GIMPLE_NOP).
1039 2018-08-28 Richard Biener <rguenther@suse.de>
1041 PR tree-optimization/87117
1042 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1043 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1045 2018-08-28 Richard Biener <rguenther@suse.de>
1047 PR tree-optimization/87117
1048 * tree-ssa-pre.c (compute_avail): Do not make expressions
1049 with predicated values available.
1050 (get_expr_value_id): Assert we do not run into predicated value
1053 2018-08-28 Richard Biener <rguenther@suse.de>
1055 PR tree-optimization/87117
1056 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1057 get virtual operands.
1058 (get_expr_operands): Handle STRING_CST like other decls.
1060 2018-08-28 Martin Liska <mliska@suse.cz>
1062 * tree.h: Update documentation of fndecl_built_in_p
1066 2018-08-27 Jeff Law <law@redhat.com>
1067 PR tree-optimization/87110
1068 * tree-ssa-dse.c (compute_trims): Handle non-constant
1071 2018-08-27 Martin Sebor <msebor@redhat.com>
1073 PR tree-optimization/86914
1074 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1076 2018-08-27 Martin Sebor <msebor@redhat.com>
1078 PR tree-optimization/87112
1079 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1080 the type of the bound argument.
1082 2018-08-27 Jeff Law <law@redhat.com>
1084 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1085 type does not have a TYPE_SIZE_UNIT.
1087 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1089 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1090 with include of backend.h.
1092 2018-08-27 Richard Biener <rguenther@suse.de>
1094 PR tree-optimization/86927
1095 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1096 use const cond reduction code.
1098 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1100 PR tree-optimization/85758
1101 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1103 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1106 * diagnostic-show-locus.c (class layout_range): Update for
1107 conversion of show_caret_p to a tri-state.
1108 (layout_range::layout_range): Likewise.
1109 (make_range): Likewise.
1110 (layout::maybe_add_location_range): Likewise.
1111 (layout::should_print_annotation_line_p): Don't show annotation
1112 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1113 (layout::get_state_at_point): Update for conversion of
1114 show_caret_p to a tri-state. Bail out early for
1115 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1116 underlining or source colorization.
1117 (gcc_rich_location::add_location_if_nearby): Update for conversion
1118 of show_caret_p to a tri-state.
1119 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1120 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1122 (selftest::test_one_liner_labels): Likewise.
1123 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1124 conversion of show_caret_p to a tri-state.
1125 * pretty-print.c (text_info::set_location): Likewise.
1126 * pretty-print.h (text_info::set_location): Likewise.
1127 * substring-locations.c (format_warning_n_va): Likewise.
1128 * tree-diagnostic.c (default_tree_printer): Likewise.
1129 * tree-pretty-print.c (newline_and_indent): Likewise.
1131 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1134 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1135 line above for line-insertion fix-it hints.
1136 (selftest::test_fixit_insert_containing_newline): Update the
1137 expected results, and add a test with line-numbering enabled.
1139 2018-08-27 Martin Liska <mliska@suse.cz>
1142 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1143 params with DECL_HAS_VALUE_EXPR_P.
1145 2018-08-27 Martin Liska <mliska@suse.cz>
1147 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1148 selected expansion strategy.
1150 2018-08-27 Martin Liska <mliska@suse.cz>
1152 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1153 * builtins.c (is_builtin_fn): Likewise.
1154 * attribs.c (diag_attr_exclusions): Use new function
1155 fndecl_built_in_p and remove check for FUNCTION_DECL if
1157 (builtin_mathfn_code): Likewise.
1158 (fold_builtin_expect): Likewise.
1159 (fold_call_expr): Likewise.
1160 (fold_builtin_call_array): Likewise.
1161 (fold_call_stmt): Likewise.
1162 (set_builtin_user_assembler_name): Likewise.
1163 (is_simple_builtin): Likewise.
1164 * calls.c (gimple_alloca_call_p): Likewise.
1165 (maybe_warn_nonstring_arg): Likewise.
1166 * cfgexpand.c (expand_call_stmt): Likewise.
1167 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1168 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1169 (cgraph_node::verify_node): Likewise.
1170 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1171 (cgraph_node::create_clone): Likewise.
1172 * config/arm/arm.c (arm_insert_attributes): Likewise.
1173 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1174 * dse.c (scan_insn): Likewise.
1175 * expr.c (expand_expr_real_1): Likewise.
1176 * fold-const.c (operand_equal_p): Likewise.
1177 (fold_binary_loc): Likewise.
1178 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1179 * gimple-low.c (lower_stmt): Likewise.
1180 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1181 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1182 * gimple.c (gimple_build_call_from_tree): Likewise.
1183 (gimple_call_builtin_p): Likewise.
1184 (gimple_call_combined_fn): Likewise.
1185 * gimplify.c (gimplify_call_expr): Likewise.
1186 (gimple_boolify): Likewise.
1187 (gimplify_modify_expr): Likewise.
1188 (gimplify_addr_expr): Likewise.
1189 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1190 * ipa-cp.c (determine_versionability): Likewise.
1191 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1192 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1193 * ipa-split.c (visit_bb): Likewise.
1194 (split_function): Likewise.
1195 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1196 * lto-cgraph.c (input_node): Likewise.
1197 * lto-streamer-out.c (write_symbol): Likewise.
1198 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1199 (lower_omp_1): Likewise.
1200 * predict.c (strip_predict_hints): Likewise.
1201 * print-tree.c (print_node): Likewise.
1202 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1203 * trans-mem.c (is_tm_irrevocable): Likewise.
1204 (is_tm_load): Likewise.
1205 (is_tm_simple_load): Likewise.
1206 (is_tm_store): Likewise.
1207 (is_tm_simple_store): Likewise.
1208 (is_tm_abort): Likewise.
1209 (tm_region_init_1): Likewise.
1210 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1211 * tree-cfg.c (verify_gimple_call): Likewise.
1212 (move_stmt_r): Likewise.
1213 (stmt_can_terminate_bb_p): Likewise.
1214 * tree-eh.c (lower_eh_constructs_2): Likewise.
1215 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1216 * tree-inline.c (remap_gimple_stmt): Likewise.
1217 (copy_bb): Likewise.
1218 (estimate_num_insns): Likewise.
1219 (fold_marked_statements): Likewise.
1220 * tree-sra.c (scan_function): Likewise.
1221 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1222 (optimize_stack_restore): Likewise.
1223 (pass_fold_builtins::execute): Likewise.
1224 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1225 (mark_all_reaching_defs_necessary_1): Likewise.
1226 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1227 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1228 (pass_forwprop::execute): Likewise.
1229 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1230 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1231 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1232 * tree-ssa-strlen.c (get_string_length): Likewise.
1233 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1234 (find_func_aliases_for_call): Likewise.
1235 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1236 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1237 * tree-tailcall.c (find_tail_calls): Likewise.
1238 * tree.c (need_assembler_name_p): Likewise.
1239 (free_lang_data_in_decl): Likewise.
1240 (get_call_combined_fn): Likewise.
1241 * ubsan.c (is_ubsan_builtin_p): Likewise.
1242 * varasm.c (incorporeal_function_p): Likewise.
1243 * tree.h (DECL_BUILT_IN): Remove and replace with
1245 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1246 (fndecl_built_in_p): New.
1248 2018-08-27 Martin Liska <mliska@suse.cz>
1250 PR tree-optimization/86847
1251 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1252 Dump also subtree probability.
1253 (switch_decision_tree::do_jump_if_equal): New function.
1254 (switch_decision_tree::emit_case_nodes): Handle special
1255 situations in balanced tree that can be emitted much simpler.
1256 Fix calculation of probabilities that happen in tree expansion.
1257 * tree-switch-conversion.h (struct cluster): Add
1259 (struct simple_cluster): Likewise.
1260 (struct case_tree_node): Add new function has_child.
1261 (do_jump_if_equal): New.
1263 2018-08-27 Martin Liska <mliska@suse.cz>
1265 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1266 Add new argument to bit_test_cluster constructor.
1267 (bit_test_cluster::emit): Set bits really number of values
1269 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1270 probability argument.
1271 * tree-switch-conversion.h (struct bit_test_cluster):
1272 Add m_handles_entire_switch.
1274 2018-08-27 Martin Liska <mliska@suse.cz>
1276 PR tree-optimization/86702
1277 * tree-switch-conversion.c (jump_table_cluster::emit):
1278 Make probabilities even for values in jump table
1279 according to number of cases handled.
1280 (switch_decision_tree::compute_cases_per_edge): Pass
1281 argument to reset_out_edges_aux function.
1282 (switch_decision_tree::analyze_switch_statement): Likewise.
1283 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1286 2018-08-27 Martin Liska <mliska@suse.cz>
1288 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1289 cfun argument explicitly.
1290 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1291 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1292 function gimple_switch_default_bb.
1293 (convert_switch_statements):
1295 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1296 * stmt.c (label_to_block_fn): Use label_to_block and pass
1297 cfun argument explicitly and use gimple_switch_label_bb.
1298 (expand_case): Likewise.
1299 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1300 cfun argument explicitly. Likewise.
1301 (make_edges_bb): Likewise.
1302 (make_cond_expr_edges): Likewise.
1303 (get_cases_for_edge): Likewise.
1304 (make_gimple_switch_edges): Likewise.
1305 (label_to_block_fn): Likewise.
1306 (label_to_block): Likewise.
1307 (make_goto_expr_edges): Likewise.
1308 (make_gimple_asm_edges): Likewise.
1309 (main_block_label): Likewise.
1310 (group_case_labels_stmt): Likewise.
1311 (find_taken_edge_computed_goto): Likewise.
1312 (find_taken_edge_switch_expr): Likewise.
1313 (gimple_verify_flow_info): Likewise.
1314 (gimple_redirect_edge_and_branch): Likewise.
1315 (gimple_switch_label_bb): New function.
1316 (gimple_switch_default_bb): Likewise.
1317 (gimple_switch_edge): Likewise.
1318 (gimple_switch_default_edge): Likewise.
1319 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1320 (label_to_block): ... with this.
1321 (gimple_switch_label_bb): New.
1322 (gimple_switch_default_bb): Likewise.
1323 (gimple_switch_edge): Likewise.
1324 (gimple_switch_default_edge): Likewise.
1325 * tree-cfgcleanup.c (convert_single_case_switch): Use
1326 new gimple functions and pass new argument to label_to_block.
1327 (cleanup_control_flow_bb):
1328 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1329 cfun argument explicitly.
1330 (make_eh_edges): Likewise.
1331 (redirect_eh_dispatch_edge): Likewise.
1332 (lower_resx): Likewise.
1333 (lower_eh_dispatch): Likewise.
1334 (maybe_remove_unreachable_handlers): Likewise.
1335 (unsplit_eh): Likewise.
1336 (cleanup_empty_eh): Likewise.
1337 (verify_eh_edges): Likewise.
1338 (verify_eh_dispatch_edge): Likewise.
1339 * tree-ssa-dom.c (record_edge_info): Likewise.
1340 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1341 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1342 (thread_through_normal_block): Likewise.
1343 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1344 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1345 * tree-switch-conversion.c (switch_conversion::collect): Use new
1347 (switch_conversion::check_final_bb): Likewise.
1348 (switch_conversion::gather_default_values): Pass new argument
1350 (switch_conversion::build_constructors): Likewise.
1351 (switch_decision_tree::compute_cases_per_edge): Use new
1352 gimple_switch_edge function.
1353 (switch_decision_tree::analyze_switch_statement): Pass new argument
1355 (switch_decision_tree::try_switch_expansion): Use
1356 gimple_switch_default_edge.
1357 * tree-vrp.c (find_switch_asserts): Pass new argument
1359 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1360 (vr_values::simplify_switch_using_ranges): Likewise.
1362 2018-08-27 Richard Biener <rguenther@suse.de>
1364 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1365 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1367 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1368 (struct vn_nary_op_s): Add unwind_to member. Add
1369 predicated_values flag and put result into a union together
1370 with a linked list of vn_pval.
1371 (struct vn_ssa_aux): Add name member to make maintaining
1372 a map of SSA name to vn_ssa_aux possible. Remove no longer
1373 needed info, dfsnum, low, visited, on_sccstack, use_processed
1374 and range_info_anti_range_p members.
1375 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1376 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1378 (vn_valueize): New global.
1379 (vn_context_bb): Likewise.
1380 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1381 VN_INFO_PTR_INFO): Remove.
1382 * tree-ssa-sccvn.c: ... (rewrite)
1383 (pass_fre::execute): For -O2+ initialize loops and run
1384 RPO VN in optimistic mode (iterating). For -O1 and -Og
1385 run RPO VN in non-optimistic mode.
1386 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1387 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1388 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1389 (rpo-vn-max-loop-depth): Document.
1390 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1391 when valuezing the VUSE signals we walked out of the region.
1392 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1393 (phi_translate): Set VN context block to use for availability
1395 (compute_avail): Likewise.
1396 (pre_valueize): New function.
1397 (pass_pre::execute): Adjust to the RPO VN API.
1399 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1400 (propagate_constants_for_unrolling): Remove.
1401 (tree_unroll_loops_completely): Perform value-numbering
1402 on the unrolled bodies loop parent.
1404 2018-08-27 Richard Biener <rguenther@suse.de>
1406 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1407 for partial antic compute.
1409 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1411 PR rtl-optimization/87065
1412 * combine.c (simplify_if_then_else): Formatting fix.
1413 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1415 (known_cond): Don't return const_true_rtx for vector modes. Use
1416 CONST0_RTX instead of const0_rtx. Formatting fixes.
1418 2018-08-27 Martin Liska <mliska@suse.cz>
1420 PR gcov-profile/87069
1421 * gcov.c (process_file): Record files already processed
1422 and warn about a file being processed multiple times.
1424 2018-08-27 Martin Liska <mliska@suse.cz>
1427 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1428 Set default values for x_aarch64_*_string strings.
1429 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1430 prefix. For -mabi do not print '=ABI' in help and use
1431 <option_value> format for -msve-vector-bits and -moverride
1434 2018-08-26 Jeff Law <law@redhat.com>
1436 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1439 2018-08-26 Marek Polacek <polacek@redhat.com>
1441 PR c++/87029, Implement -Wredundant-move.
1442 * doc/invoke.texi: Document -Wredundant-move.
1444 2018-08-25 Martin Sebor <msebor@redhat.com>
1446 PR tree-optimization/87059
1447 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1448 to the same type as the other.
1449 * fold-const.c (fold_binary_loc): Assert expectation.
1451 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1453 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1454 extraneous parentheses, dead code section and formatting.
1456 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1459 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1460 wide enough for jumps in the line-numbering to be visible.
1461 (layout::print_gap_in_line_numbering): New member function.
1462 (layout::calculate_line_spans): When using line numbering, merge
1463 line spans that are only 1 line apart.
1464 (diagnostic_show_locus): When printing line numbers, show gaps in
1465 line numbering directly, rather than printing headers.
1466 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1467 line-numbering with multiple line spans.
1468 (selftest::test_fixit_insert_containing_newline_2): Add test of
1469 line-numbering, in which the spans are close enough to be merged.
1471 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1473 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1474 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1475 * tree-vrp.c (range_is_nonnull): Remove.
1476 (range_includes_zero_p): Accept value_range instead of min/max.
1477 (extract_range_from_binary_expr_1): Do not early bail on
1479 Use range_includes_zero_p instead of range_is_nonnull.
1480 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1481 of range_is_nonnull.
1482 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1483 special case VR_ANTI_RANGE.
1484 (vrp_finalize): Same.
1485 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1487 (range_is_nonnull): Remove.
1488 * vr-values.c (vrp_stmt_computes_nonzero): Use
1489 range_includes_zero_p instead of range_is_nonnull.
1490 (extract_range_basic): Pass value_range to range_includes_zero_p
1491 instead of range_is_nonnull.
1493 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1495 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1496 * emit-rtl.h (rtl_data): Remove return_bnd.
1497 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1498 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1499 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1500 (POINTER_BOUNDS_MODE): Remove definition.
1501 (make_pointer_bounds_mode): Remove.
1502 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1503 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1504 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1505 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1506 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1507 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1508 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1510 * config/i386/i386-modes.def (BND32, BND64): Remove.
1511 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1512 (dbx64_register_map): Ditto.
1513 (svr4_dbx_register_map): Ditto.
1514 (indirect_thunk_bnd_needed): Remove.
1515 (indirect_thunks_bnd_used): Ditto.
1516 (indirect_return_bnd_needed): Ditto.
1517 (indirect_return_via_cx_bnd): Ditto.
1518 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1519 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1520 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1521 (output_indirect_thunk_function): Remove handling of
1522 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1523 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1524 (ix86_save_reg): Remove handling of crtl->return_bnd.
1525 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1526 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1527 and UNSPEC_BNDLX_ADDR.
1528 (ix86_output_indirect_branch_via_reg): Remove handling of
1529 indirect_thunk_prefix_bnd.
1530 (ix86_output_indirect_branch_via_push): Ditto.
1531 (ix86_output_function_return): Ditto.
1532 (ix86_output_indirect_function_return): Ditto.
1533 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1534 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1535 (CALL_USED_REGISTERS): Ditto.
1536 (REG_ALLOC_ORDER): Update for removal of bound registers.
1537 (HI_REGISTER_NAMES): Ditto.
1538 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1539 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1540 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1541 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1542 (FIRST_PSEUDO_REG): Update.
1543 (BND): Remove mode iterator.
1544 * config/i386/predicates.md (bnd_mem_operator): Remove.
1546 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1548 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1551 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1553 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1554 the case in which the permute needs only a single element and
1555 repeats for every vector of the result. Extend that case to
1556 handle variable-length vectors.
1557 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1559 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1562 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1563 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1565 2018-08-24 Richard Biener <rguenther@suse.de>
1567 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1568 bb_flags_allocated members.
1569 (auto_flag): New RAII class for allocating flags.
1570 (auto_edge_flag): New RAII class for allocating edge flags.
1571 (auto_bb_flag): New RAII class for allocating bb flags.
1572 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1574 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1575 in favor of temporarily allocated BB flag.
1576 * hsa-brig.c: Re-order includes.
1577 * hsa-dump.c: Likewise.
1578 * hsa-regalloc.c: Likewise.
1579 * print-rtl.c: Likewise.
1580 * profile-count.c: Likewise.
1582 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1585 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1588 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1591 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1592 from wide_int_range_multiplicative_op.
1594 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1596 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1599 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1601 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1604 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1606 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1607 full GENERIC expression used for replacement.
1609 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1611 * tree-vrp.c (abs_extent_range): Remove.
1612 (extract_range_into_wide_ints): Pass wide ints by reference.
1613 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1614 Pass wide ints by reference in all calls to
1615 extract_range_into_wide_ints.
1616 * wide-int-range.cc (wide_int_range_div): New.
1617 * wide-int-range.h (wide_int_range_div): New.
1618 (wide_int_range_includes_zero_p): New.
1619 (wide_int_range_zero_p): New.
1621 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1623 * config/aarch64/aarch64.md (arches): New enum.
1624 (arch): New enum attr.
1625 (arch_enabled): New attr.
1626 (enabled): Now uses arch_enabled only.
1627 (simd, sve, fp16): Removed attribute.
1628 (fp): Attr now defined in terms of 'arch'.
1629 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1630 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1631 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1632 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1633 attributes into 'arch'.
1634 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1635 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1636 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1637 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1638 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1639 'simd' attribute into 'arch'.
1640 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1641 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1642 Convert use of 'fp' attribute to 'arch'.
1643 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1644 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1646 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1647 (different modes) Merge 'fp' and 'simd' into 'arch'.
1648 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1651 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1653 PR rtl-optimization/87026
1654 * expmed.c (canonicalize_comparison): If we can no longer create
1655 pseudoregisters, don't.
1657 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1660 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1662 * config/arm/arm.c (speculation_barrier_libfunc): New static
1664 (arm_init_libfuncs): Initialize it.
1665 (arm_emit_speculation_barrier): New function.
1666 * config/arm/arm.md (speculation_barrier): Call
1667 arm_emit_speculation_barrier for architectures that do not have
1669 (speculation_barrier_insn): Only match on Armv7 or later.
1671 2018-08-23 Richard Biener <rguenther@suse.de>
1674 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1677 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1679 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1680 of single-vector TBLs.
1681 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1684 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1687 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1688 aarch64_evpc_tbl guard.
1690 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1692 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1695 2018-08-22 Martin Sebor <msebor@redhat.com>
1698 * tree-pretty-print.c (pretty_print_string): Add argument.
1699 (dump_generic_node): Call to pretty_print_string with string size.
1701 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1703 PR rtl-optimization/86771
1704 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1705 of two SETs into those two SETs, one to be placed at i2, if that SETs
1706 destination is modified between i2 and i3.
1708 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1710 PR tree-optimization/86725
1711 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1713 (vect_analyze_scalar_cycles_1): Check it.
1715 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1717 PR tree-optimization/86725
1718 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1719 an outer loop phi as a double reduction, make sure that the
1720 single user of the phi result is an inner loop phi.
1722 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1724 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1725 grouped stores with gaps to a strided group.
1727 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1729 * tree-vect-stmts.c (get_group_load_store_type)
1730 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1731 first statement in a group.
1733 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1735 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1736 the sequence used in gcc/gcc.c.
1738 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1741 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1744 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1746 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1747 Darwin10-specific unwinder-shim.
1748 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1749 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1750 New to cater for Darwin10 Rosetta.
1752 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1754 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1755 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1757 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1762 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1763 (dwarf2out_switch_text_section): Generate a local label for the
1764 second function sub-section and apply it as the second FDE start
1766 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1767 second sub-section start.
1769 2018-08-22 Richard Biener <rguenther@suse.de>
1771 PR tree-optimization/86988
1772 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1774 2018-08-22 Richard Biener <rguenther@suse.de>
1776 PR tree-optimization/86945
1777 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1779 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1781 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1782 a comment about how uses of r2 for .sdata2 come about.
1784 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1786 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1788 2018-08-21 Marek Polacek <polacek@redhat.com>
1790 PR c++/86981, Implement -Wpessimizing-move.
1791 * doc/invoke.texi: Document -Wpessimizing-move.
1793 2018-08-21 Jan Hubicka <jh@suse.cz>
1795 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1796 * tree.h (is_redundant_typedef): Remove.
1797 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1799 2018-08-21 Jan Hubicka <jh@suse.cz>
1801 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1804 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1806 * expmed.c (extract_low_bits): Reject invalid subregs early.
1808 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1811 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1814 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1816 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1817 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1818 * config/vxworks.c: Likewise.
1820 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1822 * config/vxworks.c: Set targetm.have_ctors_dtors
1823 if HAVE_INITFINI_ARRAY_SUPPORT.
1824 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1825 if HAVE_INITFINI_ARRAY_SUPPORT.
1827 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1829 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1830 default search path for VxWorks < 7.
1832 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1834 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1835 (get_format_string): Refer to c_getstr.
1837 2018-08-21 Tom de Vries <tdevries@suse.de>
1839 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1840 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1841 (debuginfo_early_stop): Declare.
1842 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1843 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1844 (debuginfo_early_stop): New function.
1845 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1846 and debuginfo_early_stop.
1847 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1848 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1849 (general_init): Call debuginfo_early_init.
1850 (finalize): Call debuginfo_fini.
1851 (do_compile): Call debuginfo_init.
1852 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1854 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1856 2018-08-21 Tom de Vries <tdevries@suse.de>
1858 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1859 flag_dump_noaddr and flag_dump_unnumbered.
1861 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1863 * wide-int-range.cc (wide_int_range_abs): New.
1864 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1865 * wide-int-range.h (wide_int_range_abs): New.
1866 (wide_int_range_min_max): New.
1867 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1868 case to call wide_int_range_abs.
1869 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1870 (extract_range_from_abs_expr): Delete.
1872 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1875 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1876 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1879 2018-08-20 Nathan Sidwell <nathan@acm.org>
1880 Jeff Law <law@redhat.com>
1882 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1883 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1885 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1888 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1889 (decl_attributes): Likewise.
1890 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1892 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1893 * diagnostic-core.h (class auto_diagnostic_group): New class.
1894 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1895 (diagnostic_report_diagnostic): Handle the first diagnostics within
1897 (emit_diagnostic): Add auto_diagnostic_group instance.
1899 (inform_n): Likewise.
1900 (warning): Likewise.
1901 (warning_at): Likewise.
1902 (warning_n): Likewise.
1903 (pedwarn): Likewise.
1904 (permerror): Likewise.
1906 (error_n): Likewise.
1907 (error_at): Likewise.
1909 (fatal_error): Likewise.
1910 (internal_error): Likewise.
1911 (internal_error_no_backtrace): Likewise.
1912 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1913 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1914 * diagnostic.h (struct diagnostic_context): Add fields
1915 "diagnostic_group_nesting_depth",
1916 "diagnostic_group_emission_count", "begin_group_cb",
1918 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1919 Add auto_diagnostic_group instance(s).
1920 (find_explicit_erroneous_behavior): Likewise.
1921 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1922 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1923 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1924 (gimplify_va_arg_expr): Likewise.
1925 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1926 (HSA_SORRY_AT): Likewise.
1927 * ipa-devirt.c (compare_virtual_tables): Likewise.
1928 (warn_odr): Likewise.
1929 * multiple_target.c (expand_target_clones): Likewise.
1930 * opts-common.c (cmdline_handle_error): Likewise.
1931 * reginfo.c (globalize_reg): Likewise.
1932 * substring-locations.c (format_warning_n_va): Likewise.
1933 * tree-inline.c (expand_call_inline): Likewise.
1934 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1935 * tree-ssa-loop-niter.c
1936 (do_warn_aggressive_loop_optimizations): Likewise.
1937 * tree-ssa-uninit.c (warn_uninit): Likewise.
1938 * tree.c (warn_deprecated_use): Likewise.
1940 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1943 * config/i386/i386.md (eh_return): Always update EH return
1944 address in word_mode.
1946 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1948 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1949 TARGET_SPLIT_COMPLEX_ARG is defined.
1951 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1953 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1955 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1958 * expr.c (expand_assignment): Assert that bitpos is positive.
1959 (store_field): Likewise
1960 (expand_expr_real_1): Make sure that bitpos is positive.
1961 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1964 2018-08-20 Nathan Sidwell <nathan@acm.org>
1966 * Makefile.in (CPP_ID_DATA_H): Delete.
1967 (CPP_INTERNAL_H): Don't add it.
1968 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1969 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1971 2018-08-20 Richard Biener <rguenther@suse.de>
1973 PR tree-optimization/78655
1974 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1975 pointer + offset nonnull if either operand is nonnull work.
1977 2018-08-20 Tom de Vries <tdevries@suse.de>
1979 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1980 unless the referenced die describes the added property using
1981 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1982 Otherwise, add a DW_AT_location to the referenced die.
1984 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1987 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1988 register_operand when calling ix86_set_reg_reg_cost.
1989 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1990 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1991 predicate and to 1 otherwise.
1993 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1995 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1996 emit a diagnostic that it is not supported and reset the option.
1997 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1998 supported and consume the option. (ASM_FINAL_SPEC): New.
2000 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2002 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2005 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2007 C-SKY port: Documentation
2009 * doc/extend.texi (C-SKY Function Attributes): New section.
2010 * doc/invoke.texi (Option Summary): Add C-SKY options.
2011 (C-SKY Options): New section.
2012 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2014 2018-08-17 Jojo <jijie_rong@c-sky.com>
2015 Huibin Wang <huibin_wang@c-sky.com>
2016 Sandra Loosemore <sandra@codesourcery.com>
2017 Chung-Lin Tang <cltang@codesourcery.com>
2019 C-SKY port: Backend implementation
2021 * config/csky/*: New.
2022 * common/config/csky/*: New.
2024 2018-08-17 Jojo <jijie_rong@c-sky.com>
2025 Huibin Wang <huibin_wang@c-sky.com>
2026 Sandra Loosemore <sandra@codesourcery.com>
2027 Chung-Lin Tang <cltang@codesourcery.com>
2028 Andrew Jenner <andrew@codesourcery.com>
2030 C-SKY port: Configury
2032 * config.gcc (csky-*-*): New.
2033 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2034 * configure: Regenerated.
2036 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2038 * dump-context.h: Include "dumpfile.h".
2039 (dump_context::dump_printf_va): Convert final param from va_list
2040 to va_list *. Convert from ATTRIBUTE_PRINTF to
2041 ATTRIBUTE_GCC_DUMP_PRINTF.
2042 (dump_context::dump_printf_loc_va): Likewise.
2043 * dumpfile.c: Include "stringpool.h".
2044 (make_item_for_dump_printf_va): Delete.
2045 (make_item_for_dump_printf): Delete.
2046 (class dump_pretty_printer): New class.
2047 (dump_pretty_printer::dump_pretty_printer): New ctor.
2048 (dump_pretty_printer::emit_items): New member function.
2049 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2051 (dump_pretty_printer::emit_item): New member function.
2052 (dump_pretty_printer::stash_item): New member function.
2053 (dump_pretty_printer::format_decoder_cb): New member function.
2054 (dump_pretty_printer::decode_format): New member function.
2055 (dump_context::dump_printf_va): Reimplement in terms of
2056 dump_pretty_printer.
2057 (dump_context::dump_printf_loc_va): Convert final param from va_list
2059 (dump_context::begin_scope): Reimplement call to
2060 make_item_for_dump_printf.
2061 (dump_printf): Update for change to dump_printf_va.
2062 (dump_printf_loc): Likewise.
2063 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2064 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2065 with %T, %E, and %G.
2066 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2067 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2068 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2069 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2070 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2071 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2072 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2073 within a dump_printf_loc call to "%wu".
2074 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2075 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2076 missing space after "=".
2077 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2078 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2079 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2080 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2081 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2082 duplicate "vectorized" from message.
2084 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2086 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2087 polyNxK_t element's TYPE_STRING_FLAG.
2089 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2091 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2092 (they were unnamed before). Fix comments.
2094 2018-08-17 Nathan Sidwell <nathan@acm.org>
2096 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2098 2018-08-17 Richard Biener <rguenther@suse.de>
2100 PR tree-optimization/86841
2101 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2103 2018-08-17 Martin Liska <mliska@suse.cz>
2105 * common.opt: Remove Warn, Init and Report for options with
2106 Ignore/Deprecated flag. Warning is done automatically for
2108 * config/i386/i386.opt: Likewise.
2109 * config/ia64/ia64.opt: Likewise.
2110 * config/rs6000/rs6000.opt: Likewise.
2111 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2112 Remove usage of flag_check_pointer_bounds.
2113 * lto-wrapper.c (merge_and_complain): Do not handle
2114 OPT_fcheck_pointer_bounds.
2115 (append_compiler_options): Likewise.
2116 * opt-functions.awk: Do not handle Deprecated.
2117 * optc-gen.awk: Check that Var, Report and Init are not
2118 used for an option with Ignore/Deprecated flag.
2119 * opts-common.c (decode_cmdline_option): Do not report
2121 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2123 * opts.h (struct cl_option): Remove cl_deprecated flag.
2124 (CL_ERR_DEPRECATED): Remove error enum value.
2126 2018-08-17 Richard Biener <rguenther@suse.de>
2129 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2130 across a va-arg-pack using call adjust its return value accordingly.
2132 2018-08-16 Martin Sebor <msebor@redhat.com>
2134 PR tree-optimization/86853
2135 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2136 (struct fmtresult): Add member and initialize it in ctors.
2137 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2138 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2139 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2140 (parse_directive): Handle %C same as %c.
2141 (sprintf_dom_walker::compute_format_length): Adjust.
2142 (is_call_safe): Adjust.
2144 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2146 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2147 for determining how to count the elements.
2148 * builtins.h (c_strlen): Adjust prototype.
2149 * expr.c (string_constant): Add new parameter mem_size.
2150 Set *mem_size appropriately.
2151 * expr.h (string_constant): Adjust protoype.
2152 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2153 * gimple-fold.h (get_range_strlen): Adjust prototype.
2154 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2155 (format_string): Call get_string_length with eltsize.
2157 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2159 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2160 to emit the span, rather than setting it as the prefix.
2162 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2164 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2165 "margin_char" parameter, defaulting to space. Use it in place
2166 of pp_space for the initial part of the margin.
2167 (layout::print_leading_fixits): Use '+' when filling the margin
2168 of line-insertion fix-it hints.
2170 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2172 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2175 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2177 * config/rs6000/altivec.md: Don't set length attribute to the default
2179 * config/rs6000/darwin.md: Ditto.
2180 * config/rs6000/dfp.md: Ditto.
2181 * config/rs6000/htm.md: Ditto.
2182 * config/rs6000/rs6000.md: Ditto.
2183 * config/rs6000/sync.md: Ditto.
2184 * config/rs6000/vsx.md: Ditto.
2186 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2188 * config/rs6000/altivec.md: Don't set length attribute to the default
2189 value, for branch instructions.
2190 * config/rs6000/darwin.md: Ditto.
2191 * config/rs6000/rs6000.md: Ditto.
2193 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2195 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2196 (unnamed conditional branch define_insn): Set length to 4 or 8
2197 depending on offset.
2198 (<bd>_<mode>): Similar, for alternative 0.
2199 (<bd>tf_<mode>): Ditto.
2201 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2203 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2205 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2207 * doc/rtl.texi: Replace old RTX class names with new names.
2210 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2212 * expmed.h (canonicalize_comparison): New declaration.
2213 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2214 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2215 * optabs.c (prepare_cmp_insn): Likewise.
2216 * rtl.h (unsigned_condition_p): New function which checks if a
2217 comparison operator is unsigned.
2219 2018-08-16 Nathan Sidwell <nathan@acm.org>
2221 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2222 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2224 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2227 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2228 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2229 (mov<mov>): ..this and enable unconditionally.
2231 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2233 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2235 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2237 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2238 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2239 "Common" with "Target".
2241 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2243 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2244 * doc/invoke.texi (mmitigate-rop): Remove.
2245 * config/i386/i386.c: Do not include "regrename.h".
2246 (ix86_rop_should_change_byte_p, reg_encoded_number)
2247 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2249 (ix86_reorg): Remove call to ix86_mitigate_rop.
2250 * config/i386/i386.md (attr "modrm_class"): Remove.
2251 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2252 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2253 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2255 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2257 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2258 allow folding of mergeh() and mergel() for the float and double types.
2259 (fold_mergehl_helper): Rework to handle building a permute tree
2262 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2264 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2267 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2269 * common.opt (fdiagnostics-show-labels): New option.
2270 * diagnostic-show-locus.c (class layout_range): Add field
2272 (class layout): Add field "m_show_labels_p".
2273 (layout_range::layout_range): Add param "label" and use it to
2275 (make_range): Pass in NULL for new "label" param of layout_range's
2277 (layout::layout): Initialize m_show_labels_p.
2278 (layout::maybe_add_location_range): Pass in loc_range->m_label
2279 when constructing layout_range instances.
2280 (struct line_label): New struct.
2281 (layout::print_any_labels): New member function.
2282 (layout::print_line): Call it if label-printing is enabled.
2283 (selftest::test_one_liner_labels): New test.
2284 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2285 * diagnostic.c (diagnostic_initialize): Initialize
2286 context->show_labels_p.
2287 * diagnostic.h (struct diagnostic_context): Add field
2289 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2290 -fno-diagnostics-show-labels.
2291 * dwarf2out.c (gen_producer_string): Add
2292 OPT_fdiagnostics_show_labels to the ignored options.
2293 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2295 (gcc_rich_location::maybe_add_expr): Likewise.
2296 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2297 label" param, defaulting to NULL.
2298 (gcc_rich_location::add_expr): Add "label" param.
2299 (gcc_rich_location::maybe_add_expr): Likewise.
2300 (class text_range_label): New class.
2301 (class range_label_for_type_mismatch): New class.
2302 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2303 of format_warning_va.
2304 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2305 * lto-wrapper.c (merge_and_complain): Add
2306 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2307 (append_compiler_options): Likewise to the dropped options.
2308 (append_diag_options): Likewise to the passed-on options.
2309 * opts.c (common_handle_option): Handle the new option.
2310 * selftest-diagnostic.c
2311 (test_diagnostic_context::test_diagnostic_context): Enable
2313 * substring-locations.c: Include "gcc-rich-location.h".
2314 (format_warning_n_va): Add "fmt_label" and "param_label" params
2315 and use them as appropriate.
2316 (format_warning_va): Add "fmt_label" and "param_label" params,
2317 passing them on to format_warning_n_va.
2318 (format_warning_at_substring): Likewise.
2319 (format_warning_at_substring_n): Likewise.
2320 * substring-locations.h (format_warning_va): Add "fmt_label" and
2321 "param_label" params.
2322 (format_warning_n_va): Likewise.
2323 (format_warning_at_substring): Likewise.
2324 (format_warning_at_substring_n): Likewise.
2325 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2327 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2330 * builtins.c (expand_builtin_memcmp): Do not expand the call
2331 when overflow is detected.
2333 2018-08-15 Martin Sebor <msebor@redhat.com>
2335 PR tree-optimization/71625
2336 * config/aarch64/aarch64-builtins.c
2337 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2339 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2341 * config/s390/s390.c (s390_reorg): Remove loop.
2343 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2346 (darwin_function_switched_text_sections): Delete.
2347 * gcc/config/darwin.h
2348 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2350 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2353 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2354 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2355 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2357 2018-08-15 Martin Liska <mliska@suse.cz>
2359 PR tree-optimization/86925
2360 * predict.c (expr_expected_value_1): When taking
2361 later predictor, assign also probability.
2362 Use fold_build2_initializer_loc in order to fold
2363 the expression in -frounding-math.
2365 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2367 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2369 (expand_vec_perm_1): Try the new method.
2371 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2374 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2375 Check whether lra_live_max_point is 0 before dividing.
2377 2018-08-14 Martin Sebor <msebor@redhat.com>
2379 PR tree-optimization/86650
2380 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2381 (vrp_prop::check_mem_ref): Same.
2383 2018-08-13 Liu Hao <lh_mouse@126.com>
2385 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2386 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2387 and clear it thereafter, as it only works for DBCS.
2389 2018-08-13 Liu Hao <lh_mouse@126.com>
2391 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2392 handle returned by _get_osf_handle().
2394 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2396 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2397 for folding vec_perm.
2399 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2401 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2402 Add support for gimple-folding of vec_pack() and vec_unpack()
2405 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2407 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2408 vec_xst variants to the list.
2409 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2410 vector loads and stores.
2412 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2414 * config.gcc (rs6000-ibm-aix4.x): Delete.
2415 (rs6000-ibm-aix5.1): Delete.
2416 (rs6000-ibm-aix5.2): Delete.
2417 (rs6000-ibm-aix5.3): Delete.
2418 * config/rs6000/aix43.h: Delete.
2419 * config/rs6000/aix51.h: Delete.
2420 * config/rs6000/aix52.h: Delete.
2421 * config/rs6000/t-aix43: Delete.
2423 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2425 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2427 (s390_decompose_address): Factor out constant pool ref
2430 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2432 * config/nds32/nds32-predicates.c
2433 (nds32_can_use_bclr_p): Change return type as bool.
2434 (nds32_can_use_bset_p): Ditto.
2435 (nds32_can_use_btgl_p): Ditto.
2436 (nds32_can_use_bitci_p): Ditto.
2437 * config/nds32/nds32-protos.h
2438 (nds32_can_use_bclr_p): Change declaration.
2439 (nds32_can_use_bset_p): Ditto.
2440 (nds32_can_use_btgl_p): Ditto.
2441 (nds32_can_use_bitci_p): Ditto.
2443 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2445 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2446 Support -msched-prolog-epilog option.
2447 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2449 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2451 * common/config/nds32/nds32-common.c
2452 (nds32_option_optimization_table): Enalbe -malways-align.
2454 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2456 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2458 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2459 OPT_misr_secure_ case.
2460 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2461 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2462 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2464 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2465 (nds32_isr_info): New field security_level.
2466 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2467 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2468 * config/nds32/nds32.opt (misr-secure): New option.
2469 * config/nds32/nds32_init.inc: New file.
2470 * config/nds32/nds32_isr.h: New file.
2472 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2474 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2475 Update comment for atomic instructions.
2476 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2477 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2479 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2480 load for __ATOMIC_SEQ_CST model.
2481 (atomic_loaddi_1): Remove float register target.
2482 (atomic_storedi): Handle CONST_INT values.
2483 (atomic_storedi_1): Remove float register source. Add special case
2485 (memory_barrier): New expander and insn.
2487 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2489 PR tree-optimization/86835
2490 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2491 new_stmt after def_gsi, make sure to insert new_square_stmt after
2492 that stmt, not 2 stmts before it.
2494 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2497 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2500 2018-08-10 Martin Liska <mliska@suse.cz>
2503 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2505 * builtins.c (expand_builtin_expect_with_probability):
2507 (expand_builtin_expect_with_probability): New function.
2508 (build_builtin_expect_predicate): Add new argumnet probability
2509 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2510 (fold_builtin_expect):
2513 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2514 * builtins.h (fold_builtin_expect): Set new argument.
2515 * doc/extend.texi: Document __builtin_expect_with_probability.
2516 * doc/invoke.texi: Likewise.
2517 * gimple-fold.c (gimple_fold_call): Pass new argument.
2518 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2519 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2520 * predict.c (get_predictor_value): New function.
2521 (expr_expected_value): Add new argument probability. Assume
2522 that predictor and probability are always non-null.
2523 (expr_expected_value_1): Likewise. For __builtin_expect and
2524 __builtin_expect_with_probability set probability. Handle
2525 combination in binary expressions.
2526 (tree_predict_by_opcode): Simplify code by simply calling
2527 get_predictor_value.
2528 (pass_strip_predict_hints::execute): Add handling of
2529 BUILT_IN_EXPECT_WITH_PROBABILITY.
2530 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2532 * tree.h (DECL_BUILT_IN_P): New function.
2534 2018-08-10 Martin Liska <mliska@suse.cz>
2536 PR tree-optimization/85799
2537 * passes.def: Add argument for pass_strip_predict_hints.
2538 * predict.c (class pass_strip_predict_hints): Add new argument
2540 (strip_predictor_early): New function.
2541 (pass_strip_predict_hints::execute): Call the function to
2543 (strip_predict_hints): New function.
2544 * predict.def: Fix comment.
2546 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2548 * Makefile.in: Clarify which tm.texi to copy over to assert the
2549 right to grant a GFDL license for all.
2551 2018-08-09 Jeff Law <law@redhat.com>
2553 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2556 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2558 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2561 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2563 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2564 reductions for variable-length vectors.
2566 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2569 * common.opt (fdiagnostics-show-line-numbers): New option.
2570 * diagnostic-show-locus.c (class layout): Add fields
2571 "m_show_line_numbers_p" and "m_linenum_width";
2572 (num_digits): New function.
2573 (test_num_digits): New function.
2574 (layout::layout): Initialize new fields. Update m_x_offset
2575 logic to handle any left margin.
2576 (layout::print_source_line): Print line number when requested.
2577 (layout::start_annotation_line): New member function.
2578 (layout::print_annotation_line): Call it.
2579 (layout::print_leading_fixits): Likewise.
2580 (layout::print_trailing_fixits): Likewise. Update calls to
2581 move_to_column for new parameter.
2582 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2583 it to potentially call start_annotation_line.
2584 (layout::show_ruler): Call start_annotation_line.
2585 (selftest::test_line_numbers_multiline_range): New selftest.
2586 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2587 and selftest::test_line_numbers_multiline_range.
2588 * diagnostic.c (diagnostic_initialize): Initialize
2589 show_line_numbers_p.
2590 * diagnostic.h (struct diagnostic_context): Add field
2591 "show_line_numbers_p".
2592 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2593 -fno-diagnostics-show-line-numbers.
2594 * dwarf2out.c (gen_producer_string): Add
2595 OPT_fdiagnostics_show_line_numbers to the ignored options.
2596 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2597 one setting" options.
2598 (append_compiler_options): Likewise to the dropped options.
2599 (append_diag_options): Likewise to the passed-on options.
2600 * opts.c (common_handle_option): Handle the new option.
2601 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2603 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2605 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2606 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2607 third argument of type "const signed char" to descriptions of
2608 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2609 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2610 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2611 __builtin_bcdsub_ov functions.
2613 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2615 PR tree-optimization/86858
2616 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2617 flow_bb_inside_loop_p calls.
2619 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2621 PR tree-optimization/86871
2622 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2623 instead of gimple_assign_lhs.
2625 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2628 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2629 register constraint to operand 0.
2630 (add<mode>3_carryinC): Likewise.
2631 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2633 2018-08-09 Martin Liska <mliska@suse.cz>
2636 * common.opt: Remove extra line.
2638 2018-08-09 Martin Liska <mliska@suse.cz>
2640 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2641 at the end of a line, make first letter capital and end up
2642 a sentence with a dot.
2643 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2644 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2645 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2646 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2647 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2648 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2649 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2650 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2651 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2652 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2653 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2654 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2655 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2656 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2657 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2658 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2659 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2660 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2662 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2665 * config/s390/s390.c (s390_option_override_internal): Reduce the
2666 stack-clash-protection-probe-interval param if it would be too big
2669 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2672 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2673 * config/m68k/m68k.c (handle_move_double): Don't call
2674 m68k_final_prescan_insn.
2675 (m68k_adjust_decorated_operand): Renamed from
2676 m68k_final_prescan_insn, remove first and third operand and
2678 (print_operand): Call it.
2679 (print_operand_address): Call it.
2681 2018-08-08 Nathan Sidwell <nathan@acm.org>
2683 * diagnostic.c (diagnostic_report_current_module): Use
2684 linemap_included_from & linemap_included_from_linemap.
2686 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2688 * config/aarch64/aarch64-cores.def: Add phecda core.
2689 * config/aarch64/aarch64-tune.md: Regenerate.
2690 * doc/invoke.texi: Add phecda core.
2692 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2695 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2697 * config/s390/s390.md ("movti"): Add more alternatives for
2698 constant to GPR copies.
2700 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2702 * config/s390/s390.c: Fix whitespace damage throughout the file.
2703 * config/s390/s390.h: Likewise.
2704 * config/s390/tpf.h: Likewise.
2706 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2708 * config/s390/s390.c (s390_loadrelative_operand_p):
2709 Remove TARGET_CPU_ZARCH usages.
2710 (s390_rtx_costs): Likewise.
2711 (s390_legitimate_constant_p): Likewise.
2712 (s390_cannot_force_const_mem): Likewise.
2713 (legitimate_reload_constant_p): Likewise.
2714 (s390_preferred_reload_class): Likewise.
2715 (legitimize_pic_address): Likewise.
2716 (legitimize_tls_address): Likewise.
2717 (s390_split_branches): Removed.
2718 (s390_add_execute): Removed.
2719 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2720 (s390_mainpool_start): Likewise.
2721 (s390_mainpool_finish): Likewise.
2722 (s390_mainpool_cancel): Removed.
2723 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2724 (s390_chunkify_cancel): Likewise.
2725 (s390_return_addr_rtx): Likewise.
2726 (s390_register_info): Remove split_branches_pending_p uages.
2727 (s390_optimize_register_info): Likewise.
2728 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2729 split_branches_pending_p usages.
2730 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2731 (s390_load_got): Likewise.
2732 (s390_expand_split_stack_prologue): Likewise.
2733 (output_asm_nops): Likewise.
2734 (s390_function_profiler): Likewise.
2735 (s390_emit_call): Likewise.
2736 (s390_conditional_register_usage): Likewise.
2737 (s390_optimize_prologue): Likewise.
2738 (s390_reorg): Remove TARGET_CPU_ZARCH and
2739 split_branches_pending_p usages.
2740 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2742 (s390_output_indirect_thunk_function): Likewise.
2743 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2744 (TARGET_CPU_ZARCH_P): Removed.
2745 (struct machine_function): Remove split_branches_pending_p.
2746 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2748 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2750 * common/config/s390/s390-common.c (processor_flags_table):
2752 * config.gcc: Remove with_arch/with_tune support.
2753 * config/s390/2064.md: Remove cpu attribute comparisons.
2754 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2756 * config/s390/linux.h (ASM_SPEC):
2757 Remove -march support.
2758 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2759 Use a table to get an arch level.
2760 * config/s390/s390-opts.h (enum processor_type):
2762 * config/s390/s390.c
2763 (processor_table): Remove entries, add arch_level values.
2764 (s390_issue_rate): Remove cases.
2765 (s390_option_override): Adjust
2766 s390_option_override_internal() call.
2767 (s390_option_override_internal): Remove deprecation warning.
2768 (s390_valid_target_attribute_tree): Adjust
2769 s390_option_override_internal() call.
2770 * config/s390/s390.h (struct s390_processor):
2771 Share with s390-c.c, add arch_level field.
2772 * config/s390/s390.md:
2773 Remove occurrences in cpu attribute.
2774 * config/s390/s390.opt: Remove -march/-mtune support.
2775 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2776 * doc/invoke.texi: Remove deprecation warning.
2778 2018-08-08 Luis Machado <luis.machado@linaro.org>
2780 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2782 (qdf24xx_tunings): Set vector cost structure to
2783 qdf24xx_vector_cost.
2785 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2786 <register_sextend>: Set to 3.
2788 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2791 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2792 * config/aarch64/aarch64-simd.md
2793 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2794 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2795 (aarch64_frecpx<mode>): ...this new pattern.
2796 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2797 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2799 2018-08-07 Martin Liska <mliska@suse.cz>
2802 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2803 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2804 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2805 * doc/extend.texi: Document that malloc attribute adds
2808 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2811 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2812 Define to speculation_safe_value_not_needed.
2814 2018-08-06 Jeff Law <law@redhat.com>
2816 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2817 the vr_values instance to cprop_into_stmt.
2818 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2819 (cprop_operand): Also query EVRP to determine if OP is a constant.
2821 2018-08-06 Nathan Sidwell <nathan@acm.org>
2823 * diagnostic.c (diagnostic_report_current_module): Reroll
2824 included-at loop. Translate text.
2826 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2828 * function-tests.c (selftest::test_expansion_to_rtl): Call
2829 free_after_compilation.
2831 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2833 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2835 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2837 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2838 loops with memory block operations from getting unrolled.
2840 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2843 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2844 Define to speculation_safe_value_not_needed.
2846 2018-08-06 Jeff Law <law@redhat.com>
2848 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2851 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2854 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2855 with all enabled __intN types.
2857 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2859 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2861 * alias.c (record_set): Check for clobber high.
2862 * cfgexpand.c (expand_gimple_stmt): Likewise.
2863 * combine-stack-adj.c (single_set_for_csa): Likewise.
2864 * combine.c (find_single_use_1): Likewise.
2865 (set_nonzero_bits_and_sign_copies): Likewise.
2866 (get_combine_src_dest): Likewise.
2867 (is_parallel_of_n_reg_sets): Likewise.
2868 (try_combine): Likewise.
2869 (record_dead_and_set_regs_1): Likewise.
2870 (reg_dead_at_p_1): Likewise.
2871 (reg_dead_at_p): Likewise.
2872 * dce.c (deletable_insn_p): Likewise.
2873 (mark_nonreg_stores_1): Likewise.
2874 (mark_nonreg_stores_2): Likewise.
2875 * df-scan.c (df_find_hard_reg_defs): Likewise.
2876 (df_uses_record): Likewise.
2877 (df_get_call_refs): Likewise.
2878 * dwarf2out.c (mem_loc_descriptor): Likewise.
2879 * haifa-sched.c (haifa_classify_rtx): Likewise.
2880 * ira-build.c (create_insn_allocnos): Likewise.
2881 * ira-costs.c (scan_one_insn): Likewise.
2882 * ira.c (equiv_init_movable_p): Likewise.
2883 (rtx_moveable_p): Likewise.
2884 (interesting_dest_for_shprep): Likewise.
2885 * jump.c (mark_jump_label_1): Likewise.
2886 * postreload-gcse.c (record_opr_changes): Likewise.
2887 * postreload.c (reload_cse_simplify): Likewise.
2888 (struct reg_use): Add source expr.
2889 (reload_combine): Check for clobber high.
2890 (reload_combine_note_use): Likewise.
2891 (reload_cse_move2add): Likewise.
2892 (move2add_note_store): Likewise.
2893 * print-rtl.c (print_pattern): Likewise.
2894 * recog.c (decode_asm_operands): Likewise.
2895 (store_data_bypass_p): Likewise.
2896 (if_test_bypass_p): Likewise.
2897 * regcprop.c (kill_clobbered_value): Likewise.
2898 (kill_set_value): Likewise.
2899 * reginfo.c (reg_scan_mark_refs): Likewise.
2900 * reload1.c (maybe_fix_stack_asms): Likewise.
2901 (eliminate_regs_1): Likewise.
2902 (elimination_effects): Likewise.
2903 (mark_not_eliminable): Likewise.
2904 (scan_paradoxical_subregs): Likewise.
2905 (forget_old_reloads_1): Likewise.
2906 * reorg.c (find_end_label): Likewise.
2907 (try_merge_delay_insns): Likewise.
2908 (redundant_insn): Likewise.
2909 (own_thread_p): Likewise.
2910 (fill_simple_delay_slots): Likewise.
2911 (fill_slots_from_thread): Likewise.
2912 (dbr_schedule): Likewise.
2913 * resource.c (update_live_status): Likewise.
2914 (mark_referenced_resources): Likewise.
2915 (mark_set_resources): Likewise.
2916 * rtl.c (copy_rtx): Likewise.
2917 * rtlanal.c (reg_referenced_p): Likewise.
2918 (single_set_2): Likewise.
2919 (noop_move_p): Likewise.
2920 (note_stores): Likewise.
2921 * sched-deps.c (sched_analyze_reg): Likewise.
2922 (sched_analyze_insn): Likewise.
2924 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2926 * cse.c (invalidate_reg): New function extracted from...
2927 (invalidate): ...here.
2928 (canonicalize_insn): Check for clobber high.
2929 (invalidate_from_clobbers): invalidate clobber highs.
2930 (invalidate_from_sets_and_clobbers): Likewise.
2931 (count_reg_usage): Check for clobber high.
2932 (insn_live_p): Likewise.
2933 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2934 (cselib_invalidate_regno): Check for clobber in setter.
2935 (cselib_invalidate_rtx): Pass through setter.
2936 (cselib_invalidate_rtx_note_stores):
2937 (cselib_process_insn): Check for clobber high.
2938 * cselib.h (cselib_invalidate_rtx): Add operand.
2940 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2942 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2943 (mark_not_eliminable): Likewise.
2944 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2945 * lra-lives.c (process_bb_lives): Check for clobber high.
2946 * lra.c (new_insn_reg): Remember clobber highs.
2947 (collect_non_operand_hard_regs): Check for clobber high.
2948 (lra_set_insn_recog_data): Likewise.
2949 (add_regs_to_insn_regno_info): Likewise.
2950 (lra_update_insn_regno_info): Likewise.
2952 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2954 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2955 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2957 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2959 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2960 (copy_insn_1): Likewise.
2961 (gen_hard_reg_clobber_high): New gen function.
2962 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2963 * genemit.c (gen_exp): Likewise.
2964 (gen_emit_seq): Pass through info.
2965 (gen_insn): Check for CLOBBER_HIGH.
2966 (gen_expand): Pass through info.
2967 (gen_split): Likewise.
2968 (output_add_clobbers): Likewise.
2969 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2970 (remove_clobbers): Likewise.
2971 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2973 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2975 * doc/rtl.texi (clobber_high): Add.
2976 (parallel): Add in clobber high
2977 * rtl.c (rtl_check_failed_code3): Add function.
2978 * rtl.def (CLOBBER_HIGH): Add expression.
2979 * rtl.h (RTL_CHECKC3): Add macro.
2980 (rtl_check_failed_code3): Add declaration.
2981 (XC3EXP): Add macro.
2983 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2986 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2987 cfun->machine->max_used_stack_alignment if needed.
2989 2018-08-04 Martin Sebor <msebor@redhat.com>
2991 PR tree-optimization/86571
2992 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2995 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2998 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3001 2018-08-03 Jeff Law <law@redhat.com>
3004 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3005 Define to speculation_safe_value_not_needed.
3007 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3009 * doc/gcov.texi (-x): Remove duplicate "to".
3010 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3011 (-Wif-not-aligned): Remove duplicate "is".
3012 (-flto): Remove duplicate "the".
3013 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3014 duplicate "v5.00.b".
3015 (MSP430 Options): Remove duplicate "and" from the description
3016 of "-mgprel-sec=regexp".
3017 (x86 Options): Remove duplicate copies of "vmldLog102" and
3018 vmlsLog104 from description of "-mveclibabi=type".
3020 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3022 * internal-fn.h (first_commutative_argument): Declare.
3023 * internal-fn.c (first_commutative_argument): New function.
3024 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3025 restrictions for pattern statements. Use first_commutative_argument
3026 to look for commutative operands in calls to internal functions.
3028 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3030 * Makefile.in (wide-int-range.o): New.
3031 * tree-vrp.c: Move all the wide_int_* functions to...
3032 * wide-int-range.cc: ...here.
3033 * tree-vrp.h: Move all the wide_int_* prototypes to...
3034 * wide-int-range.h: ...here.
3036 2018-08-03 Tom de Vries <tdevries@suse.de>
3038 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3040 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3041 * except.c (output_function_exception_table): Do early exit if
3042 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3044 2018-08-03 Martin Liska <mliska@suse.cz>
3046 * predict.c (dump_prediction): Change to 2 digits
3049 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3051 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3053 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3055 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3057 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3058 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3059 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3060 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3061 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3063 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3065 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3066 pp_take_prefix when saving the existing prefix.
3067 * diagnostic.c (diagnostic_append_note): Likewise.
3068 * langhooks.c (lhd_print_error_function): Likewise.
3069 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3070 param's type. Free the existing prefix.
3071 (pp_take_prefix): New function.
3072 (pretty_printer::pretty_printer): Drop the prefix parameter.
3073 Rename the length parameter to match the comment.
3074 (pretty_printer::~pretty_printer): Free the prefix.
3075 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3077 (struct pretty_printer): Drop the "const" from "prefix" field's
3078 type and clarify memory management.
3079 (pp_set_prefix): Drop the "const" from the 2nd param.
3080 (pp_take_prefix): New decl.
3082 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3084 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3085 for word_mode_ok here instead of passing as argument.
3086 (expand_block_compare): Change select_block_compare_mode() call.
3087 (expand_strncmp_gpr_sequence): New function.
3088 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3090 2018-08-02 Jeff Law <law@redhat.com>
3093 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3094 Define to speculation_safe_value_not_needed.
3097 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3098 Define to speculation_safe_value_not_needed.
3100 2018-08-02 Tom de Vries <tdevries@suse.de>
3103 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3104 function. Return UI_TARGET unconditionally.
3105 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3106 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3108 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3110 * genemit.c (print_overload_test): Fix typo.
3112 2018-08-02 Richard Biener <rguenther@suse.de>
3114 PR tree-optimization/86816
3115 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3116 which checks for value availability before querying it.
3117 (gvn_uses_equal): Use it.
3118 (same_succ_hash): Likewise.
3119 (gimple_equal_p): Likewise.
3121 2018-08-02 Nick Clifton <nickc@redhat.com>
3124 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3125 Define to speculation_safe_value_not_needed.
3128 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3129 Define to speculation_safe_value_not_needed.
3132 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3133 Define to speculation_safe_value_not_needed.
3136 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3137 Define to speculation_safe_value_not_needed.
3140 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3141 Define to speculation_safe_value_not_needed.
3144 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3145 Define to speculation_safe_value_not_needed.
3148 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3149 Define to speculation_safe_value_not_needed.
3152 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3153 Define to speculation_safe_value_not_needed.
3156 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3157 speculation_safe_value_not_needed.
3160 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3161 to speculation_safe_value_not_needed.
3163 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3165 * doc/md.texi: Expand the documentation of instruction names
3166 to mention port-local uses. Document '@' in pattern names.
3167 * read-md.h (overloaded_instance, overloaded_name): New structs.
3169 (md_reader::handle_overloaded_name): New member function.
3170 (md_reader::get_overloads): Likewise.
3171 (md_reader::m_first_overload): New member variable.
3172 (md_reader::m_next_overload_ptr): Likewise.
3173 (md_reader::m_overloads_htab): Likewise.
3174 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3175 m_next_overload_ptr and m_overloads_htab.
3176 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3177 (get_mode_token, get_code_token, get_int_token): New functions.
3178 (map_attr_string): Add an optional argument that passes back
3179 the associated iterator.
3180 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3181 (md_reader::handle_overloaded_name, add_overload_instance): New
3183 (apply_iterators): Handle '@' names. Report an error if '@'
3184 is used without iterators.
3185 (initialize_iterators): Initialize the new iterator_group fields.
3186 * genopinit.c (handle_overloaded_code_for)
3187 (handle_overloaded_gen): New functions.
3188 (main): Use them to print declarations of maybe_code_for_* and
3189 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3190 * genemit.c (print_overload_arguments, print_overload_test)
3191 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3192 (main): Use it to print definitions of maybe_code_for_* and
3193 maybe_gen_* functions.
3194 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3195 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3196 instead of explicit mode checks.
3197 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3198 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3199 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3200 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3201 (aarch64_expand_compare_and_swap): Likewise
3202 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3203 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3204 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3205 (aarch64_constant_pool_reload_icode): Delete.
3206 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3207 instead of aarch64_constant_pool_reload_icode. Use
3208 code_for_aarch64_reload_mov instead of explicit mode checks.
3209 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3210 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3211 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3212 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3213 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3214 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3215 (aarch64_atomic_load_op_code): Delete.
3216 (aarch64_emit_atomic_load_op): Likewise.
3217 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3218 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3219 instead of aarch64_emit_atomic_load_op.
3220 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3221 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3222 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3223 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3224 character before the pattern name.
3225 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3226 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3227 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3228 (aarch64_frecps<mode>): Likewise.
3229 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3230 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3231 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3232 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3233 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3235 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3237 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3238 Allow HFmode constants if TARGET_FP_F16INST.
3240 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3243 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3244 No longer check last store for clobber of address register.
3246 2018-08-02 Martin Liska <mliska@suse.cz>
3248 PR gcov-profile/86817
3249 * gcov.c (process_all_functions): New function.
3251 (process_file): Move functions processing to
3252 process_all_functions.
3254 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3256 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3257 "const" to the "gimple *" and "rtx_insn *" parameters.
3258 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3260 (dump_location_t::dump_location_t): Likewise.
3262 2018-08-01 Martin Sebor <msebor@redhat.com>
3264 PR tree-optimization/86650
3265 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3266 rather than a "gcall *". Directly pass the data of interest
3267 to percent_K_format, rather than building a temporary CALL_EXPR
3269 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3270 (gimple_fold_builtin_strncat): Adjust.
3271 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3272 gcall* argument with gimple*.
3273 * gimple-ssa-warn-restrict.c (check_call): Same.
3274 (wrestrict_dom_walker::before_dom_children): Same.
3275 (builtin_access::builtin_access): Same.
3276 (check_bounds_or_overlap): Same
3277 (maybe_diag_overlap): Same.
3278 (maybe_diag_offset_bounds): Same.
3279 * tree-diagnostic.c (default_tree_printer): Move usage of
3280 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3282 * tree-pretty-print.c (percent_K_format): Add argument.
3283 * tree-pretty-print.h: Add argument.
3284 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3285 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3286 (maybe_diag_stxncpy_trunc): Same.
3287 (handle_builtin_stxncpy): Same.
3288 (handle_builtin_strcat): Same.
3290 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3292 * match.pd: Optimise pointer range checks.
3294 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3296 PR tree-optimization/86758
3297 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3298 to remove pattern statements.
3300 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3302 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3303 result of dfs_enumerate_from when constructing stmt_vec_infos,
3304 instead of additionally calling get_loop_body.
3306 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3308 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3310 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3311 When creating an iv, assert that the step is not known to be zero.
3312 (vect_setup_realignment): Update call accordingly.
3313 * tree-vect-stmts.c (vectorizable_store): Likewise.
3314 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3316 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3318 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3319 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3320 (vectorizable_reduction): Likewise.
3321 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3322 (vect_detect_hybrid_slp_stmts): Likewise.
3323 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3325 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3327 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3328 (wide_int_set_zero_nonzero_bits): ...this.
3329 (zero_nonzero_bits_from_vr): Rename to...
3330 (vrp_set_zero_nonzero_bits): ...this.
3331 (extract_range_from_multiplicative_op_1): Abstract wide int
3333 (wide_int_range_multiplicative_op): ...here.
3334 (extract_range_from_binary_expr_1): Extract wide int binary
3335 operations into their own functions.
3336 (wide_int_range_lshift): New.
3337 (wide_int_range_can_optimize_bit_op): New.
3338 (wide_int_range_shift_undefined_p): New.
3339 (wide_int_range_bit_xor): New.
3340 (wide_int_range_bit_ior): New.
3341 (wide_int_range_bit_and): New.
3342 (wide_int_range_trunc_mod): New.
3343 (extract_range_into_wide_ints): New.
3344 (vrp_shift_undefined_p): New.
3345 (extract_range_from_multiplicative_op): New.
3346 (vrp_can_optimize_bit_op): New.
3347 * tree-vrp.h (value_range::dump): New.
3348 (wide_int_range_multiplicative_op): New.
3349 (wide_int_range_lshift):New.
3350 (wide_int_range_shift_undefined_p): New.
3351 (wide_int_range_bit_xor): New.
3352 (wide_int_range_bit_ior): New.
3353 (wide_int_range_bit_and): New.
3354 (wide_int_range_trunc_mod): New.
3355 (zero_nonzero_bits_from_bounds): Rename to...
3356 (wide_int_set_zero_nonzero_bits): ...this.
3357 (zero_nonzero_bits_from_vr): Rename to...
3358 (vrp_set_zero_nonzero_bits): ...this.
3359 (range_easy_mask_min_max): Rename to...
3360 (wide_int_range_can_optimize_bit_op): this.
3361 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3362 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3364 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3366 * tree-vectorizer.h (vect_orig_stmt): New function.
3367 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3368 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3369 (vect_create_epilog_for_reduction): Likewise.
3370 (vectorizable_live_operation): Likewise.
3371 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3372 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3373 * tree-vect-stmts.c (vectorizable_call): Likewise.
3374 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3376 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3378 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3380 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3381 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3382 (vect_transform_loop): Likewise.
3383 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3385 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3387 * tree-vectorizer.h (vect_schedule_slp): Return void.
3388 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3389 (vect_schedule_slp): Likewise.
3391 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3393 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3395 (vect_transform_loop): Update calls accordingly. Schedule SLP
3396 instances before the main loop, if any exist.
3398 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3400 PR tree-optimization/86749
3401 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3402 If the lhs is used in a COND_EXPR, check that it is being used
3403 as the "then" or "else" value.
3405 2018-08-01 Tom de Vries <tdevries@suse.de>
3408 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3409 speculation_safe_value_not_needed.
3411 2018-08-01 Richard Biener <rguenther@suse.de>
3413 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3416 2018-08-01 Martin Liska <mliska@suse.cz>
3418 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3419 format how successful transformation is dumped.
3420 (gimple_mod_pow2_value_transform): Likewise.
3421 (gimple_mod_subtract_transform): Likewise.
3422 (gimple_stringops_transform): Likewise.
3424 2018-08-01 Martin Liska <mliska@suse.cz>
3427 * value-prof.c (interesting_stringop_to_profile_p):
3428 Simplify the code and add BUILT_IN_MEMMOVE.
3429 (gimple_stringops_transform): Likewise.
3431 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3433 * config/aarch64/aarch64-simd.md
3434 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3435 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3436 use GPI iterator instead of SI mode.
3438 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3440 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3441 rs6000_speculation_barrier.
3442 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3443 new barrier pattern name.
3445 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3447 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3448 (speculation_barrier): New insn.
3450 2018-08-01 Richard Biener <rguenther@suse.de>
3453 * graphite.h: Include isl/id.h and isl/space.h to allow build
3456 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3459 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3460 mode for COFF targets.
3461 * defaults.h (TARGET_COFF): Define.
3462 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3463 TARGET_COFF): Define.
3464 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3465 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3466 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3468 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3470 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3471 * gimple-streamer-out.c (output_bb): Save it.
3472 * lto-streamer-in.c (input_struct_function_base): Restore
3473 instance discriminator if available. Create map on demand.
3474 * lto-streamer-out.c (output_struct_function_base): Save it if
3476 * final.c (decl_to_instance_map): Document LTO strategy.
3478 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3479 Olivier Hainque <hainque@adacore.com>
3481 * debug.h (decl_to_instance_map_t): New type.
3482 (decl_to_instance_map): Declare.
3483 (maybe_create_decl_to_instance_map): New inline function.
3484 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3485 to track basic block discriminators.
3486 (final_start_function_1): Initialize them.
3487 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3489 (decl_to_instance_map): New variable.
3490 (map_decl_to_instance, maybe_set_discriminator): New functions.
3491 (notice_source_line): Set discriminator.
3493 2018-07-31 Ian Lance Taylor <iant@golang.org>
3495 * targhooks.c (default_have_speculation_safe_value): Add
3498 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3500 * dump-context.h: Include "pretty-print.h".
3501 (dump_context::refresh_dumps_are_enabled): New decl.
3502 (dump_context::emit_item): New decl.
3503 (class dump_context): Add fields "m_test_pp" and
3505 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3506 (temp_dump_context::get_dumped_text): New decl.
3507 (class temp_dump_context): Add field "m_pp".
3508 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3509 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3511 (set_dump_file): Update for above change.
3512 (set_alt_dump_file): Likewise.
3513 (dump_loc): New overload, taking a pretty_printer *.
3514 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3515 to any test pretty-printer.
3516 (make_item_for_dump_gimple_stmt): New function, adapted from
3517 optinfo::add_gimple_stmt.
3518 (dump_context::dump_gimple_stmt): Call it, and use the result,
3519 eliminating the direct usage of dump_file and alt_dump_file in
3520 favor of indirectly using them via emit_item.
3521 (make_item_for_dump_gimple_expr): New function, adapted from
3522 optinfo::add_gimple_expr.
3523 (dump_context::dump_gimple_expr): Call it, and use the result,
3524 eliminating the direct usage of dump_file and alt_dump_file in
3525 favor of indirectly using them via emit_item.
3526 (make_item_for_dump_generic_expr): New function, adapted from
3528 (dump_context::dump_generic_expr): Call it, and use the result,
3529 eliminating the direct usage of dump_file and alt_dump_file in
3530 favor of indirectly using them via emit_item.
3531 (make_item_for_dump_printf_va): New function, adapted from
3532 optinfo::add_printf_va.
3533 (make_item_for_dump_printf): New function.
3534 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3535 and use the result, eliminating the direct usage of dump_file and
3536 alt_dump_file in favor of indirectly using them via emit_item.
3537 (make_item_for_dump_dec): New function.
3538 (dump_context::dump_dec): Call it, and use the result,
3539 eliminating the direct usage of dump_file and alt_dump_file in
3540 favor of indirectly using them via emit_item.
3541 (make_item_for_dump_symtab_node): New function, adapted from
3542 optinfo::add_symtab_node.
3543 (dump_context::dump_symtab_node): Call it, and use the result,
3544 eliminating the direct usage of dump_file and alt_dump_file in
3545 favor of indirectly using them via emit_item.
3546 (dump_context::begin_scope): Reimplement, avoiding direct usage
3547 of dump_file and alt_dump_file in favor of indirectly using them
3549 (dump_context::emit_item): New member function.
3550 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3551 Set up test pretty-printer on the underlying context. Call
3552 refresh_dumps_are_enabled.
3553 (temp_dump_context::~temp_dump_context): Call
3554 refresh_dumps_are_enabled.
3555 (temp_dump_context::get_dumped_text): New member function.
3556 (selftest::verify_dumped_text): New function.
3557 (ASSERT_DUMPED_TEXT_EQ): New macro.
3558 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3559 and then without optinfo enabled. Add uses of
3560 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3561 * dumpfile.h: Update comment for the dump_* API.
3562 * optinfo-emit-json.cc
3563 (selftest::test_building_json_from_dump_calls): Update for new
3564 param for temp_dump_context ctor.
3565 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3566 and "m_owned" field.
3567 (optinfo_item::~optinfo_item): Likewise.
3568 (optinfo::add_item): New member function.
3569 (optinfo::emit): Update comment.
3570 (optinfo::add_string): Delete.
3571 (optinfo::add_printf): Delete.
3572 (optinfo::add_printf_va): Delete.
3573 (optinfo::add_gimple_stmt): Delete.
3574 (optinfo::add_gimple_expr): Delete.
3575 (optinfo::add_tree): Delete.
3576 (optinfo::add_symtab_node): Delete.
3577 (optinfo::add_dec): Delete.
3578 * optinfo.h (class dump_context): New forward decl.
3579 (optinfo::add_item): New decl.
3580 (optinfo::add_string): Delete.
3581 (optinfo::add_printf): Delete.
3582 (optinfo::add_printf_va): Delete.
3583 (optinfo::add_gimple_stmt): Delete.
3584 (optinfo::add_gimple_expr): Delete.
3585 (optinfo::add_tree): Delete.
3586 (optinfo::add_symtab_node): Delete.
3587 (optinfo::add_dec): Delete.
3588 (optinfo::add_poly_int): Delete.
3589 (optinfo_item::optinfo_item): Remove "owned" param.
3590 (class optinfo_item): Remove field "m_owned".
3592 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3595 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3596 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3597 requested variable alignment.
3598 (expand_one_ssa_partition): Likewise.
3599 (expand_one_var): Likewise.
3601 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3603 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3604 to speculation_safe_value_not_needed.
3606 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3608 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3609 * targhooks.c (speculation_safe_value_not_needed): New function.
3610 * target.def (have_speculation_safe_value): Update documentation.
3611 * doc/tm.texi: Regenerated.
3613 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3615 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3616 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3618 (despeculate_copy<ALLI:mode>_insn): New insn.
3619 (despeculate_copyti_insn): New insn.
3620 (despeculate_simple<ALLI:mode>): New insn
3621 (despeculate_simpleti): New insn.
3622 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3624 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3625 aarch64_speculation_safe_value.
3626 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3628 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3630 * config/aarch64/aarch64-speculation.cc: New file.
3631 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3632 before pass_reorder_blocks.
3633 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3635 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3636 X14 and X15 when tracking speculation.
3637 * config/aarch64/aarch64.md (register name constants): Add
3638 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3639 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3640 (speculation_barrier): New insn attribute.
3641 (cmp<mode>): Allow SP in comparisons.
3642 (speculation_tracker): New insn.
3643 (speculation_barrier): Add speculation_barrier attribute.
3644 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3645 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3646 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3648 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3650 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3651 aarch64_track_speculation is true.
3652 (tb<optab><mode>1): Likewise.
3653 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3654 generate CB[N]Z when tracking speculation.
3655 (aarch64_split_compare_and_swap): Likewise.
3656 (aarch64_split_atomic_op): Likewise.
3658 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3660 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3662 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3664 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3665 (speculation_barrier): New insn.
3667 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3669 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3670 * config/arm/arm.md (speculation_barrier): New expand.
3671 (speculation_barrier_insn): New pattern.
3673 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3675 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3676 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3677 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3678 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3680 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3681 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3682 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3683 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3684 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3685 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3686 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3687 * builtins.c (expand_speculation_safe_value): New function.
3688 (expand_builtin): Call it.
3689 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3690 * doc/extend.texi: Document __builtin_speculation_safe_value.
3691 * doc/md.texi: Document "speculation_barrier" pattern.
3692 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3693 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3694 * doc/tm.texi: Regenerated.
3695 * target.def (have_speculation_safe_value, speculation_safe_value): New
3697 * targhooks.c (default_have_speculation_safe_value): New function.
3698 (default_speculation_safe_value): New function.
3699 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3700 (default_speculation_safe_value): Add prototype.
3702 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3704 * dump-context.h (dump_context::dump_loc): New decl.
3705 * dumpfile.c (dump_context::dump_loc): New member function.
3706 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3707 and dump_gimple_stmt.
3708 (dump_context::dump_gimple_expr_loc): Likewise, using
3710 (dump_context::dump_generic_expr_loc): Likewise, using
3712 (dump_context::dump_printf_loc_va): Likewise, using
3714 (dump_context::begin_scope): Explicitly using the global function
3715 "dump_loc", rather than the member function.
3717 2018-07-31 Martin Sebor <msebor@redhat.com>
3719 PR tree-optimization/86741
3720 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3722 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3724 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3725 depend on whether prefetch instructions will be emitted or not.
3726 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3727 will be emitted or not.
3728 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3729 (TARGET_SETMEM_PFD): New macros.
3731 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3733 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3734 (NULL_STMT_VEC_INFO): Delete.
3735 (stmt_vec_info::operator*): Likewise.
3736 (stmt_vec_info::operator gimple *): Likewise.
3737 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3738 of NULL_STMT_VEC_INFO.
3739 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3740 (vect_reassociating_reduction_p): Likewise.
3741 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3742 (vectorizable_store): Likewise.
3743 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3744 (vec_info::free_stmt_vec_infos): Likewise.
3746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3748 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3749 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3751 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3753 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3754 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3755 (vec_info::free_stmt_vec_info): New private member functions.
3756 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3757 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3758 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3759 set_stmt_vec_info_vec and free_stmt_vec_infos.
3760 * tree-vect-loop.c (_loop_vec_info): Remove call to
3761 set_stmt_vec_info_vec.
3762 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3763 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3764 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3765 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3766 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3767 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3768 with the clearing in the xcalloc.
3769 (stmt_vec_info_vec): Delete.
3770 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3771 (vectorize_loops): Likewise.
3772 (vec_info::~vec_info): Remove argument from call to
3773 free_stmt_vec_infos.
3774 (vec_info::add_stmt): Remove vinfo argument from call to
3777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3779 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3780 rather than a gimple stmt.
3781 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3782 information for pattern statements when passed the original
3783 statement; instead wait to be passed the pattern statement itself.
3784 Don't call set_vinfo_for_stmt here.
3785 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3786 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3787 stmt_vec_infos here.
3788 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3789 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3790 stmt_vec_infos entry.
3792 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3794 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3795 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3796 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3797 * tree-vect-stmts.c (vectorizable_call): Likewise.
3798 (vectorizable_simd_clone_call): Likewise.
3800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3802 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3803 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3804 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3805 * tree-vect-loop.c (vect_transform_loop): Likewise.
3806 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3807 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3809 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3811 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3812 (vect_dr_stmt): Delete.
3813 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3814 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3816 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3817 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3818 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3819 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3820 (vect_analyze_data_refs): Likewise.
3821 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3823 (vect_find_same_alignment_drs): Likewise.
3824 (vect_slp_analyze_node_dependences): Update calls accordingly.
3825 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3826 instead of DR_VECT_AUX.
3827 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3828 of a vector data references. Use vec_info::lookup_dr instead of
3830 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3831 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3832 instead of DR_VECT_AUX.
3834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3836 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3838 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3840 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3841 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3842 (vect_gen_prolog_loop_niters): Likewise.
3844 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3846 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3847 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3848 (vect_known_alignment_in_bytes, vect_dr_behavior)
3849 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3850 instead of data_references. Update calls to other routines for
3851 which the same change has been made.
3852 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3853 dr_vec_infos instead of stmt_vec_infos.
3854 (vect_analyze_data_ref_dependence): Update call accordingly.
3855 (vect_slp_analyze_data_ref_dependence)
3856 (vect_record_base_alignments): Use DR_VECT_AUX.
3857 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3858 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3859 (vector_alignment_reachable_p, vect_get_data_access_cost)
3860 (vect_peeling_supportable, vect_analyze_group_access_1)
3861 (vect_analyze_group_access, vect_analyze_data_ref_access)
3862 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3863 (vect_compile_time_alias, vect_small_gap_p)
3864 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3865 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3866 instead of data_references. Update calls to other routines for
3867 which the same change has been made.
3868 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3869 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3870 (vect_slp_analyze_and_verify_node_alignment)
3871 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3872 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3873 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3875 (_vect_peel_info::dr): Replace with...
3876 (_vect_peel_info::dr_info): ...this new field.
3877 (vect_peeling_hash_get_most_frequent)
3878 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3879 (vect_peeling_hash_get_lowest_cost):
3880 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3881 routines for which the same change has been made.
3882 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3884 * tree-vect-loop-manip.c (get_misalign_in_elems)
3885 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3887 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3888 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3889 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3890 (get_group_load_store_type, get_negative_load_store_type)
3891 (vect_get_data_ptr_increment, vectorizable_store)
3892 (vectorizable_load): Likewise.
3893 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3894 Update calls to other routines for which the same change has been made.
3896 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3898 * tree-vectorizer.h (vec_info::move_dr): New member function.
3899 (dataref_aux): Rename to...
3900 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3901 (_stmt_vec_info::dr_aux): Update accordingly.
3902 (_stmt_vec_info::data_ref_info): Delete.
3903 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3904 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3905 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3906 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3908 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3909 (STMT_VINFO_DR_INFO): New macro.
3910 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3911 (set_dr_misalignment): Update after rename of dataref_aux.
3912 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3913 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3914 initialization of STMT_VINFO_DATA_REF.
3915 * tree-vectorizer.c (vec_info::move_dr): New function.
3916 * tree-vect-patterns.c (vect_recog_bool_pattern)
3917 (vect_recog_mask_conversion_pattern)
3918 (vect_recog_gather_scatter_pattern): Use it.
3919 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3920 the "dr" and "stmt" fields of dr_vec_info instead of
3921 STMT_VINFO_DATA_REF.
3923 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3925 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3926 (is_pattern_stmt_p): Use it.
3927 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3928 on pattern statements.
3930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3932 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3933 original stmt as a stmt_vec_info rather than a gimple stmt.
3934 (vect_pattern_recog_1): Take the statement directly as a
3935 stmt_vec_info, rather than via a gimple_stmt_iterator.
3936 Update call to vect_mark_pattern_stmts.
3937 (vect_pattern_recog): Update calls accordingly.
3939 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3941 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3942 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3943 a vect_def_type for the first argument.
3944 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3945 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3946 operand if it isn't defined by a vectorized statement.
3947 (vect_build_gather_load_calls): Remove the mask_dt argument and
3948 update calls to vect_get_vec_def_for_stmt_copy.
3949 (vectorizable_bswap): Likewise the dt argument.
3950 (vectorizable_call): Update calls to vectorizable_bswap and
3951 vect_get_vec_def_for_stmt_copy.
3952 (vectorizable_simd_clone_call, vectorizable_assignment)
3953 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3954 (vectorizable_comparison): Update calls to
3955 vect_get_vec_def_for_stmt_copy.
3956 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3958 (vect_get_loop_based_defs): Remove dt argument and update call
3959 to vect_get_vec_def_for_stmt_copy.
3960 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3961 and vect_get_vec_def_for_stmt_copy.
3962 (vectorizable_load): Update calls to vect_build_gather_load_calls
3963 and vect_get_vec_def_for_stmt_copy.
3964 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3965 (vectorizable_reduction, vectorizable_live_operation): Update calls
3966 to vect_get_vec_def_for_stmt_copy.
3968 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3970 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3971 and gimple stmt arguments with a stmt_vec_info.
3972 (vect_record_base_alignments): Update calls accordingly.
3973 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3974 and gimple stmt arguments with a stmt_vec_info.
3975 (vect_build_slp_tree_1): Remove vinfo argument and update call
3976 to vect_record_max_nunits.
3977 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3978 and vect_record_max_nunits.
3980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3982 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3983 file and take a stmt_vec_info instead of a gimple stmt.
3984 (supportable_widening_operation, vect_finish_replace_stmt)
3985 (vect_finish_stmt_generation, vect_get_store_rhs)
3986 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3987 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3988 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3989 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3990 (vect_create_data_ref_ptr, bump_vector_ptr)
3991 (vect_permute_store_chain, vect_setup_realignment)
3992 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3993 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3994 (vectorizable_reduction, vectorizable_induction)
3995 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3996 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3997 than gimple stmts as arguments.
3998 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3999 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4000 (can_group_stmts_p, vect_check_gather_scatter)
4001 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4002 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4003 (vect_permute_load_chain, vect_shift_permute_load_chain)
4004 (vect_transform_grouped_load)
4005 (vect_record_grouped_load_vectors): Likewise.
4006 * tree-vect-loop.c (vect_fixup_reduc_chain)
4007 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4008 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4009 (vectorizable_reduction, vectorizable_induction)
4010 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4011 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4012 (vect_get_load_store_mask): Likewise.
4013 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4014 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4015 * tree-vect-stmts.c (vect_mark_relevant)
4016 (is_simple_and_all_uses_invariant)
4017 (exist_non_indexing_operands_for_use_p, process_use)
4018 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4019 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4020 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4021 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4022 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4023 (get_negative_load_store_type, get_load_store_type)
4024 (vect_check_load_store_mask, vect_check_store_rhs)
4025 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4026 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4027 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4028 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4029 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4030 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4031 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4032 (supportable_widening_operation): Likewise.
4034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4036 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4037 a stmt_vec_info instead of a gcall.
4038 (vect_check_gather_scatter): Update call accordingly.
4039 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4041 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4042 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4043 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4044 instead of a gimple stmt.
4045 (vect_transform_loop): Update calls accordingly.
4046 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4047 stmt_vec_infos instead of gimple stmts.
4048 (vect_analyze_slp_instance): Update use accordingly.
4049 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4050 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4051 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4052 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4053 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4054 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4055 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4056 down to subroutines.
4058 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4060 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4061 of the worklist from a vector of gimple stmts to a vector of
4063 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4064 (vect_mark_stmts_to_be_vectorized): Likewise
4066 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4068 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4069 statement before passing it to vect_analyze_stmt.
4070 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4071 the chain of phi vector definitions. Track the exit phi via its
4073 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4074 STMT_VINFO_REDUC_DEF.
4075 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4076 stmt_vec_infos to handle the statement chains.
4077 (vect_get_slp_defs): Record the first statement in the node
4078 using a stmt_vec_info.
4079 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4080 statements here and pass their stmt_vec_info down to subroutines.
4081 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4082 down to vect_finish_stmt_generation.
4083 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4084 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4085 stmt_vec_infos to subroutines.
4086 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4089 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4091 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4092 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4093 (vect_permute_store_chain, vect_setup_realignment)
4094 (vect_permute_load_chain, vect_shift_permute_load_chain)
4095 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4096 stmts internally, and when passing values to other vectorizer routines.
4097 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4098 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4099 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4100 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4101 (vectorizable_reduction, vectorizable_induction)
4102 (vectorizable_live_operation, vect_transform_loop_stmt)
4103 (vect_transform_loop): Likewise.
4104 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4105 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4106 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4107 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4108 (vect_slp_analyze_node_operations_1): Likewise.
4109 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4110 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4111 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4112 (vect_finish_stmt_generation_1, get_group_load_store_type)
4113 (get_load_store_type, vect_build_gather_load_calls)
4114 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4115 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4116 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4117 (vectorizable_store, vectorizable_load, vectorizable_condition)
4118 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4119 (supportable_widening_operation): Likewise.
4120 (vect_get_vector_types_for_stmt): Likewise.
4121 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4125 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4126 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4127 (vect_permute_store_chain, vect_permute_load_chain)
4128 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4129 repeated stmt_vec_info lookups.
4130 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4131 (vect_update_ivs_after_vectorizer): Likewise.
4132 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4133 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4134 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4135 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4136 (vect_bb_slp_scalar_cost): Likewise.
4137 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4139 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4141 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4142 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4143 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4144 to get gassigns and gcalls, rather than operating on generc gimple
4146 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4147 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4148 (vectorizable_load, vect_analyze_stmt): Likewise.
4149 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4153 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4154 return stmt_vec_infos rather than gimple stmts. Do not accept
4156 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4158 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4159 Update use of get_later_stmt.
4160 (vect_get_constant_vectors): Update call accordingly.
4161 (vect_schedule_slp_instance): Likewise
4162 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4163 (vect_slp_analyze_instance_dependence): Likewise.
4164 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4168 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4169 (stmt_info_for_cost::stmt_info): ...this new field.
4170 (add_stmt_costs): Update accordingly.
4171 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4172 (vect_get_known_peeling_cost): Likewise.
4173 (vect_estimate_min_profitable_iters): Likewise.
4174 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4176 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4178 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4179 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4180 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4182 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4186 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4187 a gimple stmt to a stmt_vec_info.
4188 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4192 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4193 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4194 (_loop_vec_info::reduction_chains): Likewise.
4195 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4197 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4201 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4202 a gimple stmt to a stmt_vec_info.
4203 (_stmt_vec_info::next_element): Likewise.
4204 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4205 (vect_slp_analyze_and_verify_node_alignment)
4206 (vect_analyze_group_access_1, vect_analyze_group_access)
4207 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4208 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4209 (vect_supportable_dr_alignment): Update accordingly.
4210 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4211 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4212 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4213 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4214 * tree-vect-slp.c (vect_build_slp_tree_1)
4215 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4216 (vect_split_slp_store_group, vect_analyze_slp_instance)
4217 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4218 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4219 (get_group_load_store_type, get_load_store_type)
4220 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4221 (vect_transform_stmt, vect_remove_stores): Likewise.
4223 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4225 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4227 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4228 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4229 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4230 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4231 (vector_alignment_reachable_p, vect_get_data_access_cost)
4232 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4233 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4234 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4235 (vect_analyze_group_access_1, vect_analyze_group_access)
4236 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4237 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4238 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4239 result of vect_dr_stmt and use the stmt_vec_info instead of
4240 the associated gimple stmt.
4241 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4242 (vect_gen_prolog_loop_niters): Likewise.
4243 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4247 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4248 to a vec<stmt_vec_info>.
4249 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4250 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4252 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4253 to a vec<stmt_vec_info>.
4254 (bst_traits::value_type, bst_traits::value_type): Likewise.
4255 (bst_traits::hash): Update accordingly.
4256 (vect_get_and_check_slp_defs): Change the stmts parameter from
4257 a vec<gimple *> to a vec<stmt_vec_info>.
4258 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4259 (vect_build_slp_tree): Likewise.
4260 (vect_build_slp_tree_2): Likewise. Update uses of
4261 SLP_TREE_SCALAR_STMTS.
4262 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4263 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4264 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4265 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4266 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4267 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4268 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4269 (vect_get_constant_vectors, vect_get_slp_defs)
4270 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4271 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4272 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4273 instead of gimple stmts.
4274 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4275 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4276 (vect_slp_analyze_instance_dependence): Update uses of
4277 SLP_TREE_SCALAR_STMTS.
4278 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4279 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4280 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4281 (get_initial_defs_for_reduction): Likewise.
4282 (vect_create_epilog_for_reduction): Likewise.
4283 (vectorize_fold_left_reduction): Likewise.
4284 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4285 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4286 (can_vectorize_live_stmts): Likewise.
4288 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4290 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4291 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4292 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4294 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4296 (gather_scalar_reductions): Update after above interface changes.
4297 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4298 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4300 (vect_force_simple_reduction): Likewise.
4301 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4302 LOOP_VINFO_REDUCTIONS.
4303 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4307 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4308 a gimple stmt to a stmt_vec_info.
4309 * tree-vect-loop.c (vect_active_double_reduction_p)
4310 (vect_force_simple_reduction, vectorizable_reduction): Update
4313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4315 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4316 vec<gimple *> to a vec<stmt_vec_info>.
4317 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4318 the reduction_phis argument from a vec<gimple *> to a
4320 (vectorizable_reduction): Likewise the phis local variable that
4321 is passed to vect_create_epilog_for_reduction. Update for new type
4322 of SLP_TREE_VEC_STMTS.
4323 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4324 (vectorizable_live_operation): Likewise.
4325 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4326 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4328 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4330 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4331 a gimple stmt to a stmt_vec_info.
4332 (vectorizable_condition, vectorizable_live_operation)
4333 (vectorizable_reduction, vectorizable_induction): Pass back the
4334 vectorized statement as a stmt_vec_info.
4335 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4336 use of STMT_VINFO_VEC_STMT.
4337 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4338 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4339 as stmt_vec_infos rather than gimple stmts.
4340 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4342 (vectorizable_live_operation): Likewise.
4343 (vectorizable_reduction, vectorizable_induction): Likewise,
4344 updating use of STMT_VINFO_VEC_STMT.
4345 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4346 of STMT_VINFO_VEC_STMT.
4347 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4348 (vectorizable_simd_clone_call, vectorizable_conversion)
4349 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4350 (vectorizable_store, vectorizable_load, vectorizable_condition)
4351 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4352 from a gimple stmt to a stmt_vec_info.
4353 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4354 pointer to a stmt_vec_info to the vectorizable_* routines.
4356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4358 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4359 a gimple stmt to a stmt_vec_info.
4360 (is_pattern_stmt_p): Update accordingly.
4361 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4362 (vect_record_grouped_load_vectors): Likewise.
4363 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4364 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4365 (vect_model_reduction_cost): Likewise.
4366 (vect_create_epilog_for_reduction): Likewise.
4367 (vectorizable_reduction, vectorizable_induction): Likewise.
4368 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4369 Return the stmt_vec_info for the pattern statement.
4370 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4371 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4372 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4373 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4374 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4375 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4376 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4377 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4379 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4381 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4382 (vect_finish_stmt_generation): Likewise.
4383 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4384 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4385 (vect_build_gather_load_calls): Use the return value of the above
4386 functions instead of a separate call to vinfo_for_stmt. Use narrow
4387 scopes for the input gimple stmt and wider scopes for the associated
4388 stmt_vec_info. Use vec_info::lookup_def when setting these
4389 stmt_vec_infos from an SSA_NAME definition.
4390 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4391 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4392 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4393 (vectorizable_store, vectorizable_load, vectorizable_condition)
4394 (vectorizable_comparison): Likewise.
4395 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4396 (vectorizable_reduction): Likewise.
4398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4400 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4401 stmt_vec_info * parameter before the optional gimple **.
4402 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4403 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4404 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4405 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4406 (vectorizable_live_operation): Likewise.
4407 * tree-vect-patterns.c (type_conversion_p): Likewise.
4408 (vect_look_through_possible_promotion): Likewise.
4409 (vect_recog_rotate_pattern): Likewise.
4410 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4414 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4415 a typedef to a wrapper class.
4416 (NULL_STMT_VEC_INFO): New macro.
4417 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4418 (stmt_vec_info::operator*): New function.
4419 (stmt_vec_info::operator gimple *): Likewise.
4420 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4421 (add_stmt_costs): Likewise.
4422 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4423 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4424 (vect_get_known_peeling_cost): Likewise.
4425 (vect_estimate_min_profitable_iters): Likewise.
4426 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4427 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4428 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4429 (vectorizable_store, free_stmt_vec_infos): Likewise.
4430 (new_stmt_vec_info): Change return type of xcalloc to
4433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4435 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4436 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4437 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4438 a single_imm_use-based sequence.
4439 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4441 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4443 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4444 * tree-vectorizer.c (vec_info::lookup_def): New function.
4445 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4446 (vect_widened_op_tree): Likewise.
4447 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4448 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4449 (vectorizable_reduction): Likewise.
4450 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4452 (vect_is_slp_reduction): Update calls accordingly. Use
4453 vec_info::lookup_def.
4454 (vect_is_simple_reduction): Likewise
4455 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4457 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4459 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4460 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4461 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4463 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4464 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4465 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4466 (vect_is_slp_reduction, vectorizable_induction)
4467 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4468 * tree-vect-patterns.c (vect_init_pattern_stmt):
4469 (vect_determine_min_output_precision_1, vect_determine_precisions)
4470 (vect_pattern_recog): Likewise.
4471 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4472 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4473 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4474 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4475 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4476 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4477 info field from a loop to a loop_vec_info.
4479 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4481 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4482 (vec_info::add_stmt): Declare.
4483 * tree-vectorizer.c (vec_info::add_stmt): New function.
4484 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4485 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4486 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4487 (vectorizable_induction): Likewise.
4488 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4489 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4490 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4491 (vectorizable_load): Likewise.
4492 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4493 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4494 (vect_recog_gather_scatter_pattern): Likewise.
4495 (append_pattern_def_seq): Likewise. Remove a check that is
4496 performed by add_stmt itself.
4498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4500 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4501 which make_ssa_name was called with new_stmt before new_stmt
4504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4506 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4508 (vect_is_slp_reduction): ...here...
4509 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4510 that are already known to be false.
4512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4514 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4515 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4516 STMT_VINFO_NUM_SLP_USES when it's true.
4517 (vect_free_slp_instance): Add a final_p parameter and pass it to
4519 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4520 (vect_analyze_slp_instance): Likewise.
4521 (vect_slp_analyze_operations): Likewise.
4522 (vect_slp_analyze_bb_1): Likewise.
4523 * tree-vectorizer.c (vec_info): Likewise.
4524 * tree-vect-loop.c (vect_transform_loop): Likewise.
4526 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4528 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4529 function is not called for second and subsequent members of
4532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4534 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4535 cases for nested loops from here to ...
4536 (vect_create_epilog_for_reduction): ...here. Only call
4537 vect_is_simple_use for inner-loop reductions.
4539 2018-07-31 Martin Liska <mliska@suse.cz>
4541 PR gcov-profile/85338
4542 PR gcov-profile/85350
4543 PR gcov-profile/85372
4544 * profile.c (struct location_triplet): New.
4545 (struct location_triplet_hash): Likewise.
4546 (output_location): Do not output a BB that
4547 is already recorded for a line.
4548 (branch_prob): Use streamed_locations.
4550 2018-07-31 Martin Liska <mliska@suse.cz>
4552 PR gcov-profile/85370
4553 * coverage.c (coverage_begin_function): Do not mark target
4554 clones as artificial functions.
4556 2018-07-31 Martin Liska <mliska@suse.cz>
4558 PR gcov-profile/83813
4559 PR gcov-profile/84758
4560 PR gcov-profile/85217
4561 PR gcov-profile/85332
4562 * profile.c (branch_prob): Do not record GOTO expressions
4563 for GIMPLE statements which locations are already streamed.
4565 2018-07-31 Olivier Hainque <hainque@adacore.com>
4567 * gcc.c (handle_spec_function): Accept a soft_matched_part
4568 argument, as do_spec_1. Pass it down to ...
4569 (eval_spec_function): Accept a soft_matched_part argument,
4570 and pass it down to ...
4571 (do_spec_2): Accept a soft_matched_part argument, and pass
4572 it down to do_spec_1.
4573 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4574 (handle_braces): Update call to handle_spec_function.
4575 (driver::set_up_specs): Update calls to do_spec_2.
4576 (compare_debug_dump_opt_spec_function): Likewise.
4577 (compare_debug_self_opt_spec_function): Likewise.
4579 2018-07-31 Olivier Hainque <hainque@adacore.com>
4581 * common.opt (nolibc): New option.
4582 * doc/invoke.texi (Link Options): Document it.
4583 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4584 * config/alpha/linux.h: Likewise.
4585 * config/arc/elf.h: Likewise.
4586 * config/arm/uclinux-elf.h: Likewise.
4587 * config/arm/unknown-elf.h: Likewise.
4588 * config/avr/avrlibc.h: Likewise.
4589 * config/bfin/bfin.h: Likewise.
4590 * config/bfin/linux.h: Likewise.
4591 * config/bfin/uclinux.h: Likewise.
4592 * config/darwin.h: Likewise.
4593 * config/darwin10.h: Likewise.
4594 * config/darwin12.h: Likewise.
4595 * config/gnu-user.h: Likewise.
4596 * config/lm32/uclinux-elf.h: Likewise.
4597 * config/pa/pa-hpux11.h: Likewise.
4598 * config/pa/pa64-hpux.h: Likewise.
4599 * config/sparc/sparc.h: Likewise.
4601 2018-07-31 Olivier Hainque <hainque@adacore.com>
4603 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4604 undefined variables.
4606 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4609 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4612 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4614 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4615 terminated string literal.
4617 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4619 PR rtl-optimization/85160
4620 * combine.c (is_just_move): New function.
4621 (try_combine): Allow combining two instructions into two if neither of
4622 the original instructions was a move.
4624 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4627 * doc/extend.texi (Global Register Variables): Discourage use of type
4629 (Local Register Variables): Likewise.
4631 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4633 PR tree-optimization/86506
4634 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4636 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4639 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4640 hard_regno, make sure no insn between `from` and `to` clobbers it.
4642 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4643 Tom de Vries <tdevries@suse.de>
4645 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4646 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4647 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4648 PTX_DEFAULT_RUNTIME_DIM.
4649 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4651 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4653 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4654 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4655 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4657 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4659 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4661 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4662 predicate to reflect toc fusion has been deleted.
4663 (toc_fusion_mem_raw): Delete, no longer used.
4664 (toc_fusion_mem_wrapped): Likewise.
4665 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4667 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4668 Delete, no longer used.
4669 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4670 meant to be used for toc fusion.
4671 (rs6000_debug_print_mode): Delete toc fusion debugging.
4672 (rs6000_debug_reg_global): Likewise.
4673 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4674 fusion and secondary reload support that were never used.
4675 (rs6000_option_override_internal): Delete TOC fusion, that was only
4676 partially defined, and it did not work unless you also used the
4678 (rs6000_legitimate_address_p): Delete TOC fusion support.
4679 (rs6000_opt_masks): Likewise.
4680 (fusion_wrap_memory_address): Delete function, no longer used.
4681 (fusion_split_address); Delete TOC fusion support.
4682 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4683 longer used with toc fusion being deleted.
4684 (TARGET_TOC_FUSION_FP): Likewise.
4685 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4687 (toc fusion spliter): Delete TOC fusion support.
4688 (toc_fusionload_<mode>): Likewise.
4689 (toc_fusionload_di): Likewise.
4690 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4691 longer needs to be named. Rename predicate to delete TOC fusion.
4692 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4693 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4694 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4695 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4696 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4698 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4700 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4701 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4702 __int128 in built-in function prototypes.
4703 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4704 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4706 2018-07-27 Martin Sebor <msebor@redhat.com>
4708 PR tree-optimization/86696
4709 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4710 types, including enums.
4711 (handle_char_store): Be prepared for the above function to fail.
4713 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4715 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4716 when optimization level is lower than 2 or optimize for size.
4718 2018-07-26 Martin Sebor <msebor@redhat.com>
4720 PR tree-optimization/86043
4721 PR tree-optimization/86042
4722 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4723 (get_string_cst_length): Rename...
4724 (get_min_string_length): ...to this. Add argument.
4725 (handle_char_store): Extend to handle multi-character stores by
4727 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4728 * tree.h (initializer_zerop): Add argument.
4730 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4733 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4734 declare target to variables if they have always,{to,from,tofrom} map
4737 2018-07-26 Martin Liska <mliska@suse.cz>
4740 * lto-wrapper.c: Add linker_output as prefix
4741 for ltrans_output_file.
4743 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4745 PR rtl-optimization/85805
4746 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4747 value for hard registers if that was written in the same mode.
4749 2018-07-26 Martin Liska <mliska@suse.cz>
4751 PR gcov-profile/86536
4752 * gcov.c (format_gcov): Use printf format %.*f directly
4753 and do not handle special values.
4755 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4757 * common/config/arc/arc-common.c (arc_option_optimization_table):
4758 Update default optimizations for size.
4760 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4762 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4763 * config/arc/constraints.md (CfZ): New constraint.
4764 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4765 (subsf3_fpu): Likewise.
4766 (cmpsf_fpu): Likewise.
4767 (cmpsf_fpu_uneq): Likewise.
4769 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4771 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4773 (arc_is_uncached_mem_p): uncached applies to both the variable and
4776 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4778 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4781 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4783 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4784 field "m_scopes" from vec to auto_vec.
4786 2018-07-25 Martin Liska <mliska@suse.cz>
4788 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4791 2018-07-25 Richard Biener <rguenther@suse.de>
4794 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4795 special wrt context_die late.
4796 (gen_subprogram_die): Re-use DIEs in local scope.
4798 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4800 PR tree-optimization/86644
4801 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4803 2018-07-25 Martin Liska <mliska@suse.cz>
4806 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4807 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4809 2018-07-25 Martin Liska <mliska@suse.cz>
4812 * params.def: Explain ASan abbreviation and provide
4813 a documentation link.
4815 2018-07-24 Martin Sebor <msebor@redhat.com>
4817 PR tree-optimization/86622
4818 PR tree-optimization/86532
4819 * builtins.h (string_length): Declare.
4820 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4821 (check_access): Be prepared for non-constant length ranges.
4822 (string_length): Make extern.
4823 * expr.c (string_constant): Only handle the minor non-constant
4824 array index. Use string_constant to compute the length of
4825 a generic string constant.
4827 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4829 PR tree-optimization/86618
4830 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4831 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4833 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4835 PR tree-optimization/86636
4836 * json.cc (json::object::set): Fix comment. Add assertions.
4837 (json::array::append): Move here from json.h. Add comment and an
4839 (json::string::string): Likewise.
4840 * json.h (json::array::append): Move to json.cc.
4841 (json::string::string): Likewise.
4842 * optinfo-emit-json.cc
4843 (optrecord_json_writer::impl_location_to_json): Assert that we
4844 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4845 wrapper around it. Expand the location once, rather than three
4847 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4848 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4850 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4851 places. Fix some overlong lines.
4853 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4855 * config/aarch64/aarch64-simd.md
4856 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4857 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4858 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4859 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4860 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4861 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4862 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4863 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4864 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4866 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4869 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4870 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4871 and abs_d == d, do the power of two handling if profitable.
4873 2018-07-24 Richard Biener <rguenther@suse.de>
4875 * match.pd: Add BIT_FIELD_REF canonicalizations.
4877 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4880 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4882 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4884 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4885 terminated STRING_CST object.
4887 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4889 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4891 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4893 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4894 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4895 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4896 the elements into a register.
4897 (rs6000_split_v4si_init_di_reg): Delete.
4898 (rs6000_split_v4si_init): Delete.
4899 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4900 (vsx_init_v4si): Rewrite as a define_expand.
4902 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4904 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4905 zero_extend argument from memory): New.
4907 2018-07-22 Martin Sebor <msebor@redhat.com>
4910 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4911 diagnosing calls with unknown arguments unless -Walloca-larger-than
4912 is restricted to less than PTRDIFF_MAX bytes.
4914 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4916 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4918 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4920 * pretty-print.c (text_info::set_location): Remove redundant
4921 "line_table" parameter from call to rich_location::set_range.
4923 2018-07-20 Martin Sebor <msebor@redhat.com>
4926 * builtins.c (expand_builtin_alloca): Adjust.
4927 * calls.c (alloc_max_size): Simplify.
4928 * cgraphunit.c (cgraph_node::expand): Adjust.
4929 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4931 (frame_larger_than_size): Same.
4932 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4933 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4935 * doc/invoke.texi (GCC Command Options): Document option arguments.
4936 Explain byte-size arguments and suffixes.
4937 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4938 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4939 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4940 * doc/options.texi (UInteger): Expand.
4941 (Host_Wide_Int, ByteSize): Document new properties.
4942 * final.c (final_start_function_1): Include sizes in an error message.
4943 * function.c (frame_offset_overflow): Same.
4944 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4945 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4946 Diagnose unbounded alloca calls only for limits of less than
4948 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4949 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4951 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4952 only for limits of less than PTRDIFF_MAX.
4953 * langhooks-def.h (lhd_handle_option): Change function argument
4955 * langhooks.c (lhd_handle_option): Same.
4956 * langhooks.h (handle_option): Same.
4957 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4959 (var_type, var_type_struct): Same.
4960 (var_set): Handle ByteSize flag.
4961 * optc-gen.awk: Add comments to output to ease debugging. Make
4962 use of HOST_WIDE_INT where appropriate.
4963 * opts-gen-save.awk: Use %lx to format unsigned long.
4964 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4965 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4966 arguments. Parse bytes-size suffixes.
4967 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4968 (enum_value_to_arg): Same.
4969 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4970 (handle_option): Adjust.
4971 (generate_option): Change function argument to HOST_WIDE_INT.
4972 (cmdline_handle_error): Adjust.
4973 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4974 (set_option): Change function argument to HOST_WIDE_INT.
4975 (option_enabled): Handle cl_host_wide_int.
4976 (get_option_state): Handle CLVC_SIZE.
4977 (control_warning_option): Same.
4978 * opts.c (common_handle_option): Change function argument to
4979 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4980 OPT_Wvla_larger_than_.
4981 * opts.h (enum cl_var_type): Add an enumerator.
4982 * stor-layout.c (layout_decl): Print a more meaningful warning.
4983 * toplev.c (output_stack_usage): Adjust.
4985 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4987 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4988 call to inline_expand_builtin_string_cmp.
4989 (expand_builtin_strcmp): Likewise.
4990 (expand_builtin_strncmp): Likewise.
4991 (inline_string_cmp): Delete the last parameter, change char_type_node
4992 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4994 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4995 the inlining expansion on target where the type of the call has same or
4996 narrower precision than unsigned char.
4998 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5000 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5001 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5002 * common.opt (fsave-optimization-record): New option.
5003 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5004 * doc/invoke.texi (-fsave-optimization-record): New option.
5005 * dumpfile.c: Include "optinfo-emit-json.h".
5006 (struct kv_pair): Move to coretypes.h.
5007 (optgroup_options): Make non-static.
5008 (dump_context::end_scope): Call
5009 optimization_records_maybe_pop_dump_scope.
5010 * dumpfile.h (optgroup_options): New decl.
5011 * json.cc: New file.
5013 * optinfo-emit-json.cc: New file.
5014 * optinfo-emit-json.h: New file.
5015 * optinfo.cc: Include "optinfo-emit-json.h".
5016 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5017 (optinfo_enabled_p): Check optimization_records_enabled_p.
5018 (optinfo_wants_inlining_info_p): Likewise.
5019 * optinfo.h: Update comment.
5020 * profile-count.c (profile_quality_as_string): New function.
5021 * profile-count.h (profile_quality_as_string): New decl.
5022 (profile_count::quality): New accessor.
5023 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5024 and optinfo_emit_json_cc_tests.
5025 * selftest.h (selftest::json_cc_tests): New decl.
5026 (selftest::optinfo_emit_json_cc_tests): New decl.
5027 * toplev.c: Include "optinfo-emit-json.h".
5028 (compile_file): Call optimization_records_finish.
5029 (do_compile): Call optimization_records_start.
5030 * tree-ssa-live.c: Include optinfo.h.
5031 (remove_unused_scope_block_p): Retain inlining information if
5032 optinfo_wants_inlining_info_p returns true.
5034 2018-07-20 Richard Biener <rguenther@suse.de>
5037 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5038 to cover -flto-partition=none.
5040 2018-07-20 Martin Liska <mliska@suse.cz>
5042 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5043 (get_decl_source_range): Remove unused function.
5045 2018-07-20 Richard Biener <rguenther@suse.de>
5047 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5048 (struct vn_phi_s): Likewise.
5049 (struct vn_reference_s): Likewise.
5050 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5051 for searching the slot of an entry known to be in the hash itself.
5052 (vn_phi_hasher::equal): Likewise.
5053 (vn_reference_hasher::equal): Likewise.
5054 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5056 (optimistic_info, current_info): Remove, keeping only valid_info.
5057 (vn_reference_lookup_1): Remove fallback lookup.
5058 (vn_reference_lookup_2): Likewise.
5059 (vn_nary_op_lookup_1): Likewise.
5060 (vn_phi_lookup): Likewise.
5061 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5063 (vn_reference_insert): Adjust, chain the inserted hash element
5064 at last_inserted_ref.
5065 (vn_reference_insert_pieces): Likewise.
5066 (visit_reference_op_call): Likewise.
5067 (vn_nary_op_insert_into): Chain the inserted hash element at
5069 (vn_nary_op_insert_pieces): Adjust.
5070 (vn_nary_op_insert): Likewise.
5071 (vn_nary_op_insert_stmt): Likewise.
5072 (vn_phi_insert): Adjust, chain the inserted hash element at
5074 (process_scc): Remove clearing and copying the optimistic
5075 table. Instead remove elements inserted during an optimistic
5076 iteration from the single table we maintain.
5077 (init_scc_vn): Adjust.
5078 (free_scc_vn): Likewise.
5079 (sccvn_dom_walker::record_cond): Likewise.
5080 (sccvn_dom_walker::after_dom_children): Likewise.
5082 2018-07-19 Martin Sebor <msebor@redhat.com>
5084 PR tree-optimization/84047
5085 PR tree-optimization/83776
5086 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5087 (check_array_bounds): Call it.
5089 2018-07-19 Martin Sebor <msebor@redhat.com>
5091 * align.h (align_flags): Use member initialization.
5093 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5095 * Makefile.in (OBJS): Add optinfo.o.
5096 * coretypes.h (class symtab_node): New forward decl.
5097 (struct cgraph_node): New forward decl.
5098 (class varpool_node): New forward decl.
5099 * dump-context.h: New file.
5100 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5102 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5103 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5104 (set_alt_dump_file): Likewise.
5105 (dump_context::~dump_context): New dtor.
5106 (dump_gimple_stmt): Move implementation to...
5107 (dump_context::dump_gimple_stmt): ...this new member function.
5108 Add the stmt to any pending optinfo, creating one if need be.
5109 (dump_gimple_stmt_loc): Move implementation to...
5110 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5111 Start a new optinfo and add the stmt to it.
5112 (dump_gimple_expr): Move implementation to...
5113 (dump_context::dump_gimple_expr): ...this new member function.
5114 Add the stmt to any pending optinfo, creating one if need be.
5115 (dump_gimple_expr_loc): Move implementation to...
5116 (dump_context::dump_gimple_expr_loc): ...this new member function.
5117 Start a new optinfo and add the stmt to it.
5118 (dump_generic_expr): Move implementation to...
5119 (dump_context::dump_generic_expr): ...this new member function.
5120 Add the tree to any pending optinfo, creating one if need be.
5121 (dump_generic_expr_loc): Move implementation to...
5122 (dump_context::dump_generic_expr_loc): ...this new member
5123 function. Add the tree to any pending optinfo, creating one if
5125 (dump_printf): Move implementation to...
5126 (dump_context::dump_printf_va): ...this new member function. Add
5127 the text to any pending optinfo, creating one if need be.
5128 (dump_printf_loc): Move implementation to...
5129 (dump_context::dump_printf_loc_va): ...this new member function.
5130 Start a new optinfo and add the stmt to it.
5131 (dump_dec): Move implementation to...
5132 (dump_context::dump_dec): ...this new member function. Add the
5133 value to any pending optinfo, creating one if need be.
5134 (dump_context::dump_symtab_node): New member function.
5135 (dump_context::get_scope_depth): New member function.
5136 (dump_context::begin_scope): New member function.
5137 (dump_context::end_scope): New member function.
5138 (dump_context::ensure_pending_optinfo): New member function.
5139 (dump_context::begin_next_optinfo): New member function.
5140 (dump_context::end_any_optinfo): New member function.
5141 (dump_context::s_current): New global.
5142 (dump_context::s_default): New global.
5143 (dump_scope_depth): Delete global.
5144 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5145 (dump_symtab_node): New function.
5146 (get_dump_scope_depth): Reimplement in terms of dump_context.
5147 (dump_begin_scope): Likewise.
5148 (dump_end_scope): Likewise.
5149 (selftest::temp_dump_context::temp_dump_context): New ctor.
5150 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5151 (selftest::verify_item): New function.
5152 (ASSERT_IS_TEXT): New macro.
5153 (ASSERT_IS_TREE): New macro.
5154 (ASSERT_IS_GIMPLE): New macro.
5155 (selftest::test_capture_of_dump_calls): New test.
5156 (selftest::dumpfile_c_tests): Call it.
5157 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5158 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5159 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5160 descriptive comment.
5161 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5162 (dump_node, dump_bb): Move these unrelated decls.
5163 (class dump_manager): Add leading comment.
5164 * optinfo.cc: New file.
5165 * optinfo.h: New file.
5167 2018-07-19 Michael Collison <michael.collison@arm.com>
5168 Richard Henderson <rth@redhat.com>
5170 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5171 (subti): Handle op1 zero.
5172 (subvti4, usub4ti4): New.
5173 (*sub<GPI>3_compare1_imm): New.
5174 (sub<GPI>3_carryinCV): New.
5175 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5176 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5178 2018-07-19 Michael Collison <michael.collison@arm.com>
5179 Richard Henderson <rth@redhat.com>
5181 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5182 (addti3): Create simpler code if low part is already known to be 0.
5183 (addvti4, uaddvti4): New.
5184 (*add<GPI>3_compareC_cconly_imm): New.
5185 (*add<GPI>3_compareC_cconly): New.
5186 (*add<GPI>3_compareC_imm): New.
5187 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5188 handle constants within this pattern..
5189 (*add<GPI>3_compareV_cconly_imm): New.
5190 (*add<GPI>3_compareV_cconly): New.
5191 (*add<GPI>3_compareV_imm): New.
5192 (add<GPI>3_compareV): New.
5193 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5194 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5195 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5196 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5197 with 'comparison' operator.
5198 (*add<GPI>3_compareV_cconly_imm): Ditto.
5199 (*add<GPI>3_compareV_cconly): Ditto.
5200 (*add<GPI>3_compareV_imm): Ditto.
5201 (add<GPI>3_compareV): Ditto.
5202 (add<mode>3_carryinC): Ditto.
5203 (*add<mode>3_carryinC_zero): Ditto.
5204 (*add<mode>3_carryinC): Ditto.
5205 (add<mode>3_carryinV): Ditto.
5206 (*add<mode>3_carryinV_zero): Ditto.
5207 (*add<mode>3_carryinV): Ditto.
5209 2018-07-19 Michael Collison <michael.collison@arm.com>
5210 Richard Henderson <rth@redhat.com>
5212 * config/aarch64/aarch64-modes.def (CC_V): New.
5213 * config/aarch64/aarch64-protos.h
5214 (aarch64_addti_scratch_regs): Declare
5215 (aarch64_subvti_scratch_regs): Declare.
5216 (aarch64_expand_subvti): Declare.
5217 (aarch64_gen_unlikely_cbranch): Declare
5218 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5219 for signed overflow using CC_Vmode.
5220 (aarch64_get_condition_code_1): Handle CC_Vmode.
5221 (aarch64_gen_unlikely_cbranch): New function.
5222 (aarch64_addti_scratch_regs): New function.
5223 (aarch64_subvti_scratch_regs): New function.
5224 (aarch64_expand_subvti): New function.
5226 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5228 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5230 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5231 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5234 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5237 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5238 address check not strict.
5240 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5242 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5244 (store_pair_lanes<mode>): Likewise.
5245 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5246 enum value 'ADDR_QUERY_LDP_STP_N'.
5247 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5248 (aarch64_print_address_internal): Add declaration.
5249 (aarch64_print_ldpstp_address): Remove.
5250 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5251 (aarch64_print_operand): Change printing of 'y'.
5252 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5253 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5254 'true' rather than '1'.
5255 * config/aarch64/constraints.md (Uml): Likewise.
5256 (Uml): Rename to Umn.
5259 2018-07-19 Richard Biener <rguenther@suse.de>
5261 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5263 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5264 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5265 (vn_reference_hasher): Likewise.
5266 (struct vn_tables_s): Remove obstack and alloc-pool members.
5267 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5268 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5269 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5270 (vn_reference_insert_pieces): Likewise.
5271 (alloc_vn_nary_op_noinit): Adjust.
5272 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5273 (vn_phi_eq): Adjust.
5274 (shared_lookup_phiargs): Remove.
5275 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5276 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5277 (visit_reference_op_call): Likewise.
5278 (copy_nary, copy_phi, copy_reference): Remove.
5279 (process_scc): Rewind the obstack when iterating. Do not
5280 copy the elements to valid_info but just move them from one
5281 hashtable to the other.
5282 (allocate_vn_table): Adjust.
5283 (free_vn_table): Likewise.
5284 (init_scc_vn): Likewise.
5285 (free_scc_vn): Likewise.
5287 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5290 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5291 indirect_return as function type attribute.
5292 (ix86_attribute_table): Change indirect_return to function
5294 * doc/extend.texi: Update indirect_return attribute.
5296 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5298 * wide-int.h (widest2_int): New.
5299 * gimple-fold.c (arith_overflowed_p): Use it.
5300 * tree.h (widest2_int_cst): New.
5301 * tree-vrp.c (wide_int_binop_overflow): Rename from
5302 vrp_int_const_binop.
5303 Rewrite to work on trees.
5304 (extract_range_from_multiplicative_op_1): Abstract code to...
5305 (wide_int_range_min_max): ...here.
5306 (wide_int_range_cross_product): ...and here.
5307 (extract_range_from_binary_expr_1): Abstract overflow code to...
5308 (wide_int_range_mult_wrapping): ...here.
5309 * tree-vrp.h (wide_int_range_cross_product): New.
5310 (wide_int_range_mult_wrapping): New.
5312 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5313 Julia Koval <julia.koval@intel.com>
5315 * config/i386/x86-tune-costs.h (skylake_memcpy,
5316 skylake_memset): Replace rep_prefix with unrolling for size 512.
5318 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5321 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5322 comparision with EQ_EXPR in last stmt.
5324 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5326 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5327 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5328 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5329 previously known as "PowerPC AltiVec Built-in Functions". Move
5330 some material to new subsubsections "PowerPC AltiVec Built-in
5331 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5333 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5334 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5335 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5336 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5338 2018-07-18 Richard Biener <rguenther@suse.de>
5340 PR tree-optimization/86557
5341 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5344 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5346 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5348 2018-07-17 Jeff Law <law@redhat.com>
5350 * config/arm/arm.c (get_label_padding): Update for recent
5351 changes to label_to_alignment.
5353 PR tree-optimization/86010
5354 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5356 * config/mips/mips.c (vr4130_align_insns): Update for recent
5357 changes to label_to_alignment.
5359 * config/frv/frv.c (frv_label_align): Update for recent changes
5360 to label_to_alignment.
5362 * config/nios2/nios2.c (nios2_label_align): Update for recent
5363 changes which dropped ALIGN_LABELS_LOG.
5365 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5367 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5368 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5370 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5372 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5373 deprecated align_labels_log.
5375 2018-07-17 Richard Biener <rguenther@suse.de>
5378 * dwarf2out.c (init_sections_and_labels): Always generate
5379 a debug_line_str_section for early LTO debug.
5380 (dwarf2out_finish): Reset debug_line_str_hash output early.
5381 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5383 (dwarf2out_early_finish): Output debug_line_str.
5385 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5387 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5388 index register on z196 or later.
5390 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5392 * config/s390/s390.c (s390_default_align): Set default function
5394 (s390_override_options_after_change): Call s390_default align.
5395 (s390_option_override_internal): Call s390_default_align.
5396 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5398 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5401 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5402 to _looptemp_ clauses, other than the first two.
5404 2018-07-17 Martin Liska <mliska@suse.cz>
5406 * opts.c: Do not enable OPT_falign_* for -Os.
5408 2018-07-17 Martin Liska <mliska@suse.cz>
5410 * align.h (MAX_CODE_ALIGN): New.
5411 (MAX_CODE_ALIGN_VALUE): New.
5412 * common/config/i386/i386-common.c (ix86_handle_option):
5413 (MAX_CODE_ALIGN): Moved to align.h.
5414 * final.c (MAX_CODE_ALIGN): Likewise.
5415 * opts.c (parse_and_check_align_values):
5416 (MAX_CODE_ALIGN): Likewise.
5417 (MAX_CODE_ALIGN_VALUE): Likewise.
5419 2018-07-17 Martin Liska <mliska@suse.cz>
5421 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5422 in order to fulfil coding style.
5423 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5424 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5425 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5426 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5427 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5428 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5429 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5430 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5431 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5433 2018-07-17 Martin Liska <mliska@suse.cz>
5435 * align.h: New file.
5436 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5438 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5439 align_flags of label_to_alignment.
5440 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5442 * config/m68k/m68k.c: Do not use removed align_labels_value and
5444 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5445 (LOOP_ALIGN): Likewise.
5446 (LABEL_ALIGN): Likewise.
5447 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5448 Remove not used macro.
5449 (rs6000_loop_align): Change return type to align_flags.
5450 (rs6000_loop_align_max_skip): Remove.
5451 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5452 Change return type to align_flags.
5453 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5454 Remove not used macro.
5455 (rs6000_loop_align): Change return type to align_flags.
5456 (rs6000_loop_align_max_skip): Remove.
5457 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5458 * config/rx/rx-protos.h (rx_align_for_label): Make it
5460 * config/rx/rx.c (rx_align_for_label): Change return type
5462 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5464 into align_flags class.
5465 (LABEL_ALIGN): Likewise.
5466 (LOOP_ALIGN): Likewise.
5467 * config/s390/s390.c (s390_label_align): Use align_flags
5469 (s390_asm_output_function_label): Likewise.
5470 * config/sh/sh.c (sh_override_options_after_change):
5471 Use align_flags class directly without macros.
5472 (find_barrier): Likewise.
5473 (barrier_align): Likewise.
5474 (sh_loop_align): Likewise.
5475 * config/spu/spu.c (spu_option_override):
5476 Use align_flags_tuple::get_value instead of removed macros.
5477 (spu_sched_init): Likewise.
5478 * config/spu/spu.h (GTY): Likewise.
5479 * config/visium/visium.c (visium_option_override):
5480 Set "8" as default secondary alignment.
5481 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5482 in order to guarantee secondary alignment of 8.
5483 * coretypes.h: Include align.h header file.
5484 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5485 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5486 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5487 * doc/tm.texi.in: Likewise.
5488 * final.c (struct label_alignment): Remove not used structure.
5489 (LABEL_ALIGN): Change type to align_flags.
5490 (LOOP_ALIGN): Likewise.
5491 (JUMP_ALIGN): Likewise.
5492 (default_loop_align_max_skip): Remove.
5493 (default_label_align_max_skip): Likewise.
5494 (default_jump_align_max_skip): Likewise.
5495 (default_label_align_after_barrier_max_skip):
5496 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5497 (LABEL_TO_MAX_SKIP): Remove.
5498 (label_to_alignment): Return align_flags type instead of integer.
5499 (label_to_max_skip): Remove.
5500 (align_fuzz): Use align_flags type.
5501 (compute_alignments): Use align_flags type and use align_flags::max
5502 to combine multiple alignments.
5503 (grow_label_align): Grow vec instead of C array.
5504 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5505 (shorten_branches): Use align_flags type and use align_flags::max
5506 to combine multiple alignments.
5507 (final_scan_insn_1): Remove usage of secondary alignment that comes
5508 from label alignment, but instead use proper secondary alignment
5509 which is computed in grow_label_align.
5510 * flags.h (struct align_flags_tuple): Move to align.h.
5511 (struct align_flags): Likewise.
5512 (state_align_loops): Rename to align_loops.
5513 (state_align_jumps): Rename to align_jumps.
5514 (state_align_labels): Rename to align_labels.
5515 (state_align_functions): Rename to align_functions.
5516 (align_loops_log): Remove.
5517 (align_jumps_log): Remove.
5518 (align_labels_log): Remove.
5519 (align_functions_log): Remove.
5520 (align_loops_max_skip): Remove.
5521 (align_jumps_max_skip): Remove.
5522 (align_labels_max_skip): Remove.
5523 (align_functions_max_skip): Remove.
5524 (align_loops_value): Remove.
5525 (align_jumps_value): Remove.
5526 (align_labels_value): Remove.
5527 (align_functions_value): Remove.
5528 * output.h (label_to_alignment): Change return type to align_flags.
5529 (label_to_max_skip): Remove.
5530 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5531 jump_align_max_skip macros.
5532 * targhooks.h (default_loop_align_max_skip): Remove.
5533 (default_label_align_max_skip): Likewise.
5534 (default_jump_align_max_skip): Likewise.
5535 (default_label_align_after_barrier_max_skip): Remove.
5536 * toplev.c (read_log_maxskip): Use ::normalize function.
5537 (parse_N_M): Remove not used argument and also call ::normalize.
5538 (parse_alignment_opts): Do not pass unused arguments.
5539 * varasm.c (assemble_start_function): Use directly align_functions
5540 instead of removed macros.
5541 * system.h: Do not poison removed macros.
5543 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5546 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5547 and cond temporaries don't have reference type if iterator has
5548 pointer type. For init use &for_pre_body instead of pre_p if
5549 for_pre_body is non-empty.
5551 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5553 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5554 double-double modes to SFmode directly directly.
5555 (trunc<mode>sf2_fprs): Delete.
5557 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5559 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5560 for conversions between IFmode and the decimal floating point modes.
5561 (init_float128_ieee): Use the correct names for conversions between
5562 KFmode and the decimal floating point modes.
5564 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5566 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5567 for the conversions between TDmode and IFmode.
5568 (init_float128_ieee): Use more correct names for the conversions
5569 between TDmode and KFmode.
5571 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5573 PR tree-optimization/86526
5574 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5575 (inline_expand_builtin_string_cmp): Likewise.
5576 (inline_string_cmp): Likewise. Use c_readstr instead of
5577 builtin_memcpy_read_str. Add unit_mode temporary.
5579 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5582 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5583 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5585 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5587 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5588 Alphabetize prototypes of built-in functions, separating out
5589 built-in functions that are listed in this section but should be
5590 described elsewhere.
5592 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5595 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5596 conditional move when trapping comparison was split to a
5597 non-trapping one (and vice versa).
5599 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5601 * config/s390/s390.c (s390_function_profiler): Generate nops
5602 instead of profiler call sequences.
5603 * config/s390/s390.opt: Add the new option.
5605 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5607 * config/s390/s390.c (s390_function_profiler): Generate
5608 __mcount_loc section.
5609 * config/s390/s390.opt: Add the new option.
5611 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5613 * common.opt: Add the new warning.
5614 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5615 %r0,__fentry__" when -mfentry is specified.
5616 (s390_option_override_internal): Disallow -mfentry for 31-bit
5618 * config/s390/s390.opt: Add the new option.
5620 2018-07-16 Richard Biener <rguenther@suse.de>
5623 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5624 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5626 2018-07-16 Martin Liska <mliska@suse.cz>
5629 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5632 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5634 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5636 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5638 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5640 * config/arc/arc-cpus.def (hs4x): New cpu.
5642 * config/arc/arc-tables.opt: Regenerate.
5643 * config/arc/arc.c (arc_sched_issue_rate): New function.
5644 (TARGET_SCHED_ISSUE_RATE): Define.
5645 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5646 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5648 (attr tune): Add ARCHS4x tune values.
5649 (attr tune_dspmpy): Define.
5650 (*tst): Correct instruction type.
5651 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5652 * config/arc/arcHS4x.md: New file.
5653 * config/arc/fpu.md: Update instruction type attributes.
5654 * config/arc/t-multilib: Regenerate.
5656 2018-07-16 Tom de Vries <tdevries@suse.de>
5659 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5661 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5663 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5666 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5668 PR tree-optimization/86514
5669 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5670 conversion to a boolean type from a type with greater precision.
5672 2018-07-16 Tom de Vries <tdevries@suse.de>
5674 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5675 dump_flags request TDF_SLIM.
5677 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5679 * fold-const.c (int_const_binop_1): Abstract...
5680 (wide_int_binop): ...wide int code here.
5681 (poly_int_binop): ...poly int code here.
5682 Abstract the rest of int_const_binop_1 into int_const_binop.
5683 * fold-const.h (wide_int_binop): New.
5684 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5685 Remove useless PLUS/MINUS_EXPR case.
5686 (zero_nonzero_bits_from_vr): Move wide int code...
5687 (zero_nonzero_bits_from_bounds): ...here.
5688 (extract_range_from_binary_expr_1): Move mask optimization code...
5689 (range_easy_mask_min_max): ...here.
5690 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5691 (range_easy_mask_min_max): New.
5693 2018-07-15 Jeff Law <law@redhat.com>
5696 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5699 2018-07-14 Jim Wilson <jimw@sifive.com>
5701 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5703 2018-07-14 Paul Koning <ni1d@arrl.net>
5705 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5707 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5709 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5712 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5713 Steve Munroe <munroesj52@gmail.com>
5715 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5716 (_mm_andnot_si128): Likewise.
5717 (_mm_or_si128): Likewise.
5718 (_mm_xor_si128): Likewise.
5720 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5723 * builtins.c (expand_builtin_memcmp): Inline the calls first
5724 when result_eq is false.
5725 (expand_builtin_strcmp): Inline the calls first.
5726 (expand_builtin_strncmp): Likewise.
5727 (inline_string_cmp): New routine. Expand a string compare
5728 call by using a sequence of char comparison.
5729 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5730 a call to str(n)cmp/memcmp.
5731 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5733 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5735 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5737 * config/arm/driver-arm.c: Include arm-native.h.
5738 (host_detect_local_cpu): Use auto-generated data tables.
5739 (vendors, arm_cpu_table): Delete. Move part information to ...
5740 * config/arm/arm-cpus.in: ... here.
5741 * config/arm/parsecpu.awk (gen_native): New function.
5742 (vendor, part): New CPU fields.
5743 (END): Add support for building the native CPU detection tables.
5744 * config/arm/t-arm (arm-native.h): Add build rule.
5745 (driver-arm.o): Add dependency on arm-native.h.
5747 2018-07-13 Richard Biener <rguenther@suse.de>
5750 * match.pd (addr1 - addr2): Allow either of the operand to
5753 2018-07-13 Tom de Vries <tdevries@suse.de>
5755 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5758 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5760 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5761 arrays instead of numbered variables.
5763 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5765 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5766 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5768 2018-07-13 Richard Biener <rguenther@suse.de>
5771 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5772 instead of get_context_die.
5774 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5775 Richard Biener <rguenther@suse.de>
5778 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5779 that the loop latch destination where phi is defined.
5781 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5783 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5784 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5785 (riscv_set_current_function): Extract getting interrupt type to new
5787 (riscv_get_interrupt_type): New function.
5788 (riscv_merge_decl_attributes): New function, checking interrupt type is
5790 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5792 2018-07-12 Paul Koning <ni1d@arrl.net>
5794 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5797 2018-07-12 Paul Koning <ni1d@arrl.net>
5799 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5800 zero reference, add doloop_end instead.
5801 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5802 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5803 detail for doloop_end.
5805 2018-07-12 Martin Sebor <msebor@redhat.com>
5808 * attribs.c (decl_attributes): Reject conflicting attributes before
5809 calling attribute handlers.
5811 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5813 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5815 (gcc::dump_manager::get_dump_file_name): likewise.
5816 (dump_begin): Likewise.
5817 * dumpfile.h (dump_begin): Update prototype.
5818 (gcc::dump_manager::get_dump_file_name,
5819 gcc::dump_manager::get_dump_file_name): Update prototype.
5821 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5823 * internal-fn.h (vectorizable_internal_fn_p): New function.
5824 * tree-vect-slp.c (compatible_calls_p): Likewise.
5825 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5826 to internal functions.
5827 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5829 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5831 * fold-const.h (inverse_conditions_p): Declare.
5832 * fold-const.c (inverse_conditions_p): New function.
5833 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5834 that test the inverse condition of a conditional internal function.
5835 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5836 * internal-fn.c (internal_fn_mask_index): Handle conditional
5838 (vectorized_internal_fn_supported_p): New function.
5839 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5840 (any_pred_load_store): Replace with...
5841 (need_to_predicate): ...this new variable.
5842 (redundant_ssa_names): New variable.
5843 (ifcvt_can_use_mask_load_store): Move initial checks to...
5844 (ifcvt_can_predicate): ...this new function. Handle tree codes
5845 for which a conditional internal function exists.
5846 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5847 instead of ifcvt_can_use_mask_load_store. Update after variable
5849 (predicate_load_or_store): New function, split out from
5850 predicate_mem_writes.
5851 (check_redundant_cond_expr): New function.
5852 (value_available_p): Likewise.
5853 (predicate_rhs_code): Likewise.
5854 (predicate_mem_writes): Rename to...
5855 (predicate_statements): ...this. Use predicate_load_or_store
5856 and predicate_rhs_code.
5857 (combine_blocks, tree_if_conversion): Update after above name changes.
5858 (ifcvt_local_dce): Handle redundant_ssa_names.
5859 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5860 general conditional functions.
5861 * tree-vect-stmts.c (vectorizable_call): Likewise.
5863 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5864 Alan Hayward <alan.hayward@arm.com>
5865 David Sherwood <david.sherwood@arm.com>
5867 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5868 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5869 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5870 plus and minus and convert them into IFN_COND_FMA-based sequences.
5871 (convert_mult_to_fma): Handle conditional plus and minus.
5873 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5875 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5876 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5877 (cond_fnms_optab): New optabs.
5878 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5880 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5881 * internal-fn.h (get_conditional_internal_fn): Declare.
5882 (get_unconditional_internal_fn): Likewise.
5883 * internal-fn.c (cond_ternary_direct): New macro.
5884 (expand_cond_ternary_optab_fn): Likewise.
5885 (direct_cond_ternary_optab_supported_p): Likewise.
5886 (FOR_EACH_COND_FN_PAIR): Likewise.
5887 (get_conditional_internal_fn): New function.
5888 (get_unconditional_internal_fn): Likewise.
5889 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5890 (gimple_match_op::gimple_match_op): Add a new overload for 5
5892 (gimple_match_op::set_op): Likewise.
5893 (gimple_resimplify5): Declare.
5894 * genmatch.c (decision_tree::gen): Generate simplifications for
5896 * gimple-match-head.c (gimple_simplify): Define an overload for
5897 5 operands. Handle calls with 5 arguments in the top-level overload.
5898 (convert_conditional_op): Handle conversions from unconditional
5899 internal functions to conditional ones.
5900 (gimple_resimplify5): New function.
5901 (build_call_internal): Pass a fifth operand.
5902 (maybe_push_res_to_seq): Likewise.
5903 (try_conditional_simplification): Try converting conditional
5904 internal functions to unconditional internal functions.
5905 Handle 3-operand unconditional forms.
5906 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5907 Define ternary equivalents of the current rules for binary conditional
5909 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5911 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5912 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5913 (optab): Handle them.
5914 (SVE_COND_FP_TERNARY): New int iterator.
5915 (sve_fmla_op, sve_fmad_op): New int attributes.
5916 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5917 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5918 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5920 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5922 * target.def (preferred_else_value): New target hook.
5923 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5924 * doc/tm.texi: Regenerate.
5925 * targhooks.h (default_preferred_else_value): Declare.
5926 * targhooks.c (default_preferred_else_value): New function.
5927 * internal-fn.h (conditional_internal_fn_code): Declare.
5928 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5929 (get_conditional_internal_fn): Use it.
5930 (conditional_internal_fn_code): New function.
5931 * gimple-match.h (gimple_match_cond): New struct.
5932 (gimple_match_op): Add a cond member function.
5933 (gimple_match_op::gimple_match_op): Update all forms to take a
5935 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5936 for the suboperation, but don't specify a particular else_value.
5937 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5938 (visit_nary_op, visit_reference_op_load): Pass
5939 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5940 * gimple-match-head.c: Include tree-eh.h
5941 (convert_conditional_op): New function.
5942 (maybe_resimplify_conditional_op): Likewise.
5943 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5944 (gimple_resimplify2): Likewise.
5945 (gimple_resimplify3): Likewise.
5946 (gimple_resimplify4): Likewise.
5947 (maybe_push_res_to_seq): Return null for conditional operations.
5948 (try_conditional_simplification): New function.
5949 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5951 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5953 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5955 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5957 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5959 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5961 (hash_tree): Do not hash DECL_FCONTEXT
5962 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5963 Do not stream DECL_FCONTEXT.
5964 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5965 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5967 2018-07-12 Richard Biener <rguenther@suse.de>
5970 * dwarf2out.c (gen_block_die): Only output blocks when they have
5971 at least one !DECL_IGNORED_P variable.
5973 2018-07-12 Richard Biener <rguenther@suse.de>
5976 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5977 Remove -mieee-fp handling.
5979 2018-07-12 Richard Biener <rguenther@suse.de>
5981 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5982 left-over from last patch.
5984 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5986 PR tree-optimization/86492
5987 * gimple-ssa-store-merging.c
5988 (imm_store_chain_info::coalesce_immediate_stores): Call
5989 check_no_overlap even for the merge_overlapping case. Formatting fix.
5991 2018-07-12 Richard Biener <rguenther@suse.de>
5994 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5995 move possibly trapping operations into the conditional.
5997 2018-07-12 Richard Biener <rguenther@suse.de>
5999 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6000 (vn_lookup_simplify_result): Remove recursion limit applied
6002 (vn_nary_build_or_lookup_1): Adjust.
6003 (try_to_simplify): Likewise.
6004 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6006 (gimple_resimplify2): Likewise.
6007 (gimple_resimplify3): Likewise.
6008 (gimple_resimplify4): Likewise.
6010 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6012 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6013 Use __mmask64 type instead of __mmask8 for __M argument.
6014 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6015 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6017 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6018 __mmask16 for __M argument.
6019 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6020 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6021 to __mmask16 instead of __mmask8.
6022 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6023 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6024 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6025 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6026 instead of __mmask16 for __U argument.
6027 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6028 __mmask16 instead of __mmask8 for __U argument.
6029 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6031 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6033 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6035 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6037 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6039 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6041 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6043 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6045 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6047 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6049 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6050 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6051 return type as well as __M argument type and all casts from __mmask8
6053 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6054 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6055 return type as well as __M argument type and all casts from __mmask8
6057 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6058 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6059 return type as well as __M argument type and all casts from __mmask8
6061 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6062 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6063 return type as well as __M argument type and all casts from __mmask8
6065 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6066 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6069 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6071 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6072 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6075 2018-07-11 Paul Koning <ni1d@arrl.net>
6077 * doc/md.texi (define_subst): Document how multiple occurrences of
6078 the same argument in the replacement pattern are handled.
6080 2018-07-11 Paul Koning <ni1d@arrl.net>
6082 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6084 (Common Type Attributes): Add "mode" attribute.
6086 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6088 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6089 stream DECL_ORIGINAL_TYPE.
6090 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6091 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6092 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6093 Do not walk original type.
6094 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6096 (write_ts_decl_non_common_tree_pointers): Do not stream
6098 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6099 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6101 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6103 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6104 thread twice from the same starting edge.
6106 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6108 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6109 * gimple.c (gimple_call_nonnull_result_p): ...here...
6110 (gimple_call_nonnull_arg): ...and here.
6111 * gimple.h (gimple_call_nonnull_result_p): New.
6112 (gimple_call_nonnull_arg): New.
6114 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6116 * config/arm/arm-cpus.in: Move information from fpu field of each
6117 cpu definition to the isa field.
6118 * config/arm/parsecpu.awk (fpu): Delete match rule.
6119 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6121 2018-07-11 Richard Biener <rguenther@suse.de>
6124 * dwarf2out.c (init_sections_and_labels): Use
6125 output_asm_line_debug_info consistently.
6126 (dwarf2out_early_finish): Likewise.
6127 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6130 2018-07-11 Richard Biener <rguenther@suse.de>
6132 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6133 Rework father_bb setting in a way to avoid propagating constants
6134 multiple times on a loop body.
6136 2018-07-10 Mark Wielaard <mark@klomp.org>
6139 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6141 2018-07-10 Richard Biener <rguenther@suse.de>
6143 * hash-map.h (hash_map::iterator::operator*): Return
6144 references to key and value.
6146 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6149 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6150 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6151 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6152 (gimplify_omp_for): For composite loops, move outer
6153 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6154 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6155 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6156 TREE_LIST for both the original class iterator and the "last" helper
6157 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6158 loop, remember has_decl_expr from outer composite loops for the
6159 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6161 2018-07-09 Martin Sebor <msebor@redhat.com>
6165 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6166 accessing implicitly initialized array elements.
6167 * expr.c (string_constant): Handle string initializers of
6168 character arrays within aggregates.
6169 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6170 Store element offset. As a special case, handle zero size.
6171 (fold_nonarray_ctor_reference): Same.
6172 (fold_ctor_reference): Add argument. Store subobject offset.
6173 * gimple-fold.h (fold_ctor_reference): Add argument.
6175 2018-07-09 Paul Koning <ni1d@arrl.net>
6177 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6178 (pdp11_insn_cost): New function.
6179 (pdp11_md_asm_adjust): New function.
6180 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6181 (pdp11_rtx_costs): Update to match machine better.
6182 (output_addr_const_pdp11): Correct format mismatch warnings.
6183 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6184 * config/pdp11/pdp11.md: General change to add base_cost and/or
6185 length attributes for use by new pdp11_insn_cost function.
6186 (MIN_BRANCH): Correct definition.
6188 (doloop_end): Use standard pattern name for looping pattern.
6189 (doloop_end_nocc): New.
6190 (movsf): Add another constraint alternative.
6191 (zero_extendqihi2): Add constraint alternatives for not in place
6193 (zero_extendhisi2): Remove.
6194 (shift patterns): Add CC handling variants.
6198 (define_peephole2): New peephole to recognize mov that sets CC for
6201 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6203 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6204 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6207 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6210 * real.c (real_nextafter): Return true if result is denormal.
6212 2018-07-09 Martin Liska <mliska@suse.cz>
6214 * common.opt: Add back wrongly removed attribute.
6216 2018-07-09 Richard Biener <rguenther@suse.de>
6219 * dwarf2out.c (gen_block_die): For an early generated DIE
6220 always output high/low PC attributes.
6222 2018-07-09 Tom de Vries <tdevries@suse.de>
6224 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6225 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6226 onto VAR_DECL with abstract origin.
6228 2018-07-07 Jim Wilson <jimw@sifive.com>
6230 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6232 2018-07-07 Tom de Vries <tdevries@suse.de>
6234 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6236 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6238 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6240 (combine_bound): Use wide-int overflow calculation instead of
6242 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6244 * fold-const.c (int_const_binop_2): Same.
6245 (extract_muldiv_1): Same.
6246 (fold_div_compare): Same.
6247 (fold_abs_const): Same.
6249 * poly-int.h (add): Same.
6253 * predict.c (predict_iv_comparison): Same.
6254 * profile-count.c (slow_safe_scale_64bit): Same.
6255 * simplify-rtx.c (simplify_const_binary_operation): Same.
6256 * tree-chrec.c (tree_fold_binomial): Same.
6257 * tree-data-ref.c (split_constant_offset_1): Same.
6258 * tree-if-conv.c (idx_within_array_bound): Same.
6259 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6260 * tree-ssa-phiopt.c (minmax_replacement): Same.
6261 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6262 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6263 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6264 * wide-int.cc (wi::add_large): Same.
6265 (wi::mul_internal): Same.
6266 (wi::sub_large): Same.
6267 (wi::divmod_internal): Same.
6268 * wide-int.h: Change overflow type to overflow_type for neg, add,
6269 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6270 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6271 mul_internal, divmod_internal.
6272 (overflow_type): New enum.
6273 (accumulate_overflow): New.
6275 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6277 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6278 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6280 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6282 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6283 argument is checked for zero before entering loop, avoid checking again.
6285 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6287 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6288 * gimplify.h (generic_expr_could_trap_p): Likwise.
6289 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6291 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6293 PR tree-optimization/86401
6294 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6295 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6296 (fold_bit_and_mask): ... here. New helper function for match.pd.
6297 * fold-const.h (fold_bit_and_mask): Declare.
6298 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6300 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6303 * target.def (translate_mode_attribute): New hook.
6304 * targhooks.h (default_translate_mode_attribute): Declare.
6305 * targhooks.c (default_translate_mode_attribute): New function.
6306 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6307 * doc/tm.texi: Regenerate.
6308 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6309 (rs6000_translate_mode_attribute): New function.
6311 2018-07-06 Paul Koning <ni1d@arrl.net>
6313 * doc/md.texi (define_split): Document DONE and FAIL.
6314 (define_peephole2): Ditto.
6316 2018-07-05 Jeff Law <law@redhat.com>
6318 PR tree-optimization/86010
6319 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6320 both the head and tail of mem* and str* calls.
6322 2018-07-05 Jim Wilson <jimw@sifive.com>
6324 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6326 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6328 * config/aarch64/aarch64-simd.md: correct flags text for
6329 MIN_EXPR replacement.
6331 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6333 * configure: Regenerated.
6335 2018-07-05 Carl Love <cel@us.ibm.com>
6337 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6338 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6339 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6340 VSX_BUILTIN_DOUBLEL_V4SF.
6342 2018-07-05 Martin Sebor <msebor@redhat.com>
6345 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6346 than its domain to compute its the upper bound of a char array.
6348 2018-07-05 Nathan Sidwell <nathan@acm.org>
6350 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6351 * doc/cpp.texi: Update comment.
6352 * doc/tm.texi: Rebuilt.
6353 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6354 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6355 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6356 headers affected by extern "C".
6357 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6358 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6359 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6360 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6361 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6362 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6363 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6364 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6365 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6366 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6367 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6368 config/sparc/sp64-elf.h, config/spu/spu.h,
6369 config/stormy16/stormy16.h, config/v850/v850.h,
6370 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6371 define NO_IMPLICIT_EXTERN_C.
6372 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6374 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6377 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6378 instead of GET_MODE_SIZE when comparing Units.
6380 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6383 * rtlanal.c (set_noop_p): Constrain on mode change,
6384 include hard-reg-set.h
6386 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6388 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6390 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6393 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6396 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6398 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6400 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6403 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6405 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6407 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6410 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6412 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6414 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6415 neg_*_op* variables.
6417 2018-07-04 Martin Liska <mliska@suse.cz>
6419 * tree-switch-conversion.c: Define
6420 max_ratio_for_speed and max_ratio_for_size constants.
6422 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6423 Martin Liska <mliska@suse.cz>
6428 * common.opt: Rename align options with 'str_' prefix.
6429 * common/config/i386/i386-common.c (set_malign_value): New
6431 (ix86_handle_option): Use it to set -falign-* options/
6432 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6433 type from int to string.
6434 * config/aarch64/aarch64.c: Update default values from int
6436 * config/alpha/alpha.c (alpha_override_options_after_change):
6438 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6439 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6440 max skip conditionally.
6441 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6442 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6443 max skip conditionally.
6444 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6445 max skip conditionally.
6446 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6447 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6448 max skip conditionally.
6449 * config/i386/i386.c (struct ptt): Change type from int to
6451 (ix86_default_align): Set default values.
6452 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6453 max skip conditionally.
6454 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6455 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6456 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6457 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6458 max skip conditionally.
6459 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6460 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6461 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6462 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6463 max skip conditionally.
6464 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6465 * config/ia64/ia64.c (ia64_option_override): Set default values
6466 for alignment options.
6467 * config/m68k/m68k.c: Handle new str_align_* options.
6468 * config/mips/mips.c (mips_set_compression_mode): Change
6470 (mips_option_override): Set default values for options.
6471 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6473 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6475 * config/rx/rx.c (rx_option_override): Likewise.
6476 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6477 (LABEL_ALIGN): Use align_labels_log.
6478 (LOOP_ALIGN): Use align_loops_align.
6479 * config/s390/s390.c (s390_asm_output_function_label): Use new
6481 * config/sh/sh.c (sh_override_options_after_change):
6482 Change type of constants.
6483 * config/spu/spu.c (spu_sched_init): Likewise.
6484 * config/sparc/sparc.c (sparc_option_override): Set default
6486 * config/visium/visium.c (visium_option_override): Likewise.
6487 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6488 emit p2align format with last argument if it's not needed.
6489 * doc/invoke.texi: Document extended format of -falign-*.
6490 * final.c: Use align_labels alignment.
6491 * flags.h (struct target_flag_state): Change type to use
6493 (struct align_flags_tuple): New.
6494 (struct align_flags): Likewise.
6495 (align_loops_log): Redefine macro to use new types.
6496 (align_loops_max_skip): Redefine macro to use new types.
6497 (align_jumps_log): Redefine macro to use new types.
6498 (align_jumps_max_skip): Redefine macro to use new types.
6499 (align_labels_log): Redefine macro to use new types.
6500 (align_labels_max_skip): Redefine macro to use new types.
6501 (align_functions_log): Redefine macro to use new types.
6502 (align_loops): Redefine macro to use new types.
6503 (align_jumps): Redefine macro to use new types.
6504 (align_labels): Redefine macro to use new types.
6505 (align_functions): Redefine macro to use new types.
6506 (align_functions_max_skip): Redefine macro to use new types.
6507 (align_loops_value): New macro.
6508 (align_jumps_value): New macro.
6509 (align_labels_value): New macro.
6510 (align_functions_value): New macro.
6511 * function.c (invoke_set_current_function_hook): Propagate
6512 alignment values from flags to global variables default in
6514 * ipa-icf.c (sem_function::equals_wpa): Use
6515 cl_optimization_option_eq instead of memcmp.
6516 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6518 (cl_optimization_stream_in): Likewise.
6519 * optc-save-gen.awk: Support strings in cl_optimization.
6520 * opth-gen.awk: Likewise.
6521 * opts.c (finish_options): Remove error checking of invalid
6523 (MAX_CODE_ALIGN): Remove.
6524 (MAX_CODE_ALIGN_VALUE): Likewise.
6525 (parse_and_check_align_values): New function.
6526 (check_alignment_argument): Likewise.
6527 (common_handle_option): Use check_alignment_argument.
6528 * opts.h (parse_and_check_align_values): Declare.
6529 * toplev.c (init_alignments): Remove.
6530 (read_log_maxskip): New.
6531 (parse_N_M): Likewise.
6532 (parse_alignment_opts): Likewise.
6533 (backend_init_target): Remove usage of init_alignments.
6534 * toplev.h (parse_alignment_opts): Declare.
6535 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6537 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6538 * tree.c (cl_option_hasher::equal): New.
6539 * varasm.c: Use new global macros.
6541 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6543 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6544 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6545 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6546 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6547 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6548 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6549 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6550 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6551 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6552 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6553 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6554 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6555 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6557 2018-07-04 Martin Liska <mliska@suse.cz>
6558 Jonathan Wakely <jwakely@redhat.com>
6560 * coverage.c: Use correct type.
6561 * doc/invoke.texi: Language correction.
6563 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6566 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6567 ENDBRANCH for non-tail call which may return via indirect branch.
6568 * doc/extend.texi: Document indirect_return attribute.
6570 2018-07-03 Martin Sebor <msebor@redhat.com>
6572 PR tree-optimization/86274
6573 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6575 (format_floating): Correct handling of infinities and NaNs.
6577 2018-07-03 Martin Sebor <msebor@redhat.com>
6579 * print-tree.c (print_real_cst): New function.
6580 (print_node_brief): Call it.
6581 (print_node): Ditto.
6583 2018-07-03 Jeff Law <law@redhat.com>
6585 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6586 into a single pattern.
6588 * config/h8300/h8300.md (ors code_iterator): New.
6589 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6590 a single pattern and single splitter.
6591 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6592 (iorqi3_1, xorqi3_1): Likewise.
6593 (iorqi3, xorqi3 expanders): Similarly.
6595 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6596 (movmd_internal) into a single pattern using the P mode iterator.
6597 (movmd splitters): Similarly.
6598 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6599 (movsd splitters): Similarly.
6601 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6602 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6603 right table based on the size of the operand.
6604 * config/h8300/h8300.md (length_table): Corresponding changes. All
6605 references to "addb", "addw" and "addl" changed to "add".
6606 (btst patterns): Merge two variants into a single pattern.
6607 (tstqi, tsthi): Likewise.
6608 (addhi3_incdec, addsi3_incdec): Likewise.
6609 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6610 (mulhi3, mulsi3): Likewise.
6611 (udivhi3, udivsi3): Likewise.
6612 (divhi3, divsi3): Likewise.
6613 (andorqi3, andorhi3, andorsi3): Likewise.
6615 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6618 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6619 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6621 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6623 PR tree-optimization/85694
6624 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6625 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6627 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6628 (<u>avg<mode>3_ceil): New patterns.
6630 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6632 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6633 scan-tree-dump directive.
6634 * gcc.dg/vect/slp-perm-2.c: Likewise.
6635 * gcc.dg/vect/slp-perm-3.c: Likewise.
6636 * gcc.dg/vect/slp-perm-5.c: Likewise.
6637 * gcc.dg/vect/slp-perm-6.c: Likewise.
6638 * gcc.dg/vect/slp-perm-7.c: Likewise.
6639 * gcc.dg/vect/slp-perm-8.c: Likewise.
6641 2018-07-03 Marek Polacek <polacek@redhat.com>
6644 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6646 2018-07-03 Richard Biener <rguenther@suse.de>
6649 * tree-ssa-structalias.c (find_func_clobbers): Properly
6650 handle indirect calls.
6652 2018-07-03 Jeff Law <law@redhat.com>
6654 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6655 (shifts): New code iterator.
6656 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6657 expander. Fix HImode handling on H8/SX.
6658 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6659 (subqi3, subhi3, subsi3 expanders): Likewise.
6660 (andqi3, andhi3, andsi3 expanders): Likewise.
6661 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6662 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6663 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6664 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6665 (zero_extendqihi2, zero_extendqisi2): Likewise.
6666 (extendqihi2, extendqisi2): Likewise.
6667 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6668 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6669 (rotlqi3_1, rotlhi3_1): Likewise.
6670 (logicalhi3_sn, logicalsi3_sn): Likewise.
6671 (logicalhi3, logicalsi3): Likewise.
6673 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6675 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6676 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6677 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6678 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6679 type to append_pattern_def_seq instead of creating a stmt_vec_info
6681 (build_mask_conversion): Likewise. Remove vinfo argument.
6682 (vect_add_conversion_to_patterm): Likewise, renaming to...
6683 (vect_add_conversion_to_pattern): ...this.
6684 (vect_recog_mask_conversion_pattern): Update call to
6685 build_mask_conversion. Pass the vector type to
6686 append_pattern_def_seq here too.
6687 (vect_recog_gather_scatter_pattern): Update call to
6688 vect_add_conversion_to_pattern.
6690 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6692 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6693 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6694 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6695 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6696 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6697 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6698 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6699 append_pattern_def_seq instead of new_pattern_def_seq.
6700 (vect_recog_divmod_pattern): Do both of the above.
6701 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6704 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6706 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6707 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6708 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6709 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6710 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6711 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6712 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6713 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6714 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6715 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6716 parameter with a single stmt_vec_info.
6717 (vect_recog_func_ptr): Likewise.
6718 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6719 (vect_try_gather_scatter_pattern): ...this.
6720 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6721 the stmt_vec_info of the statement to be matched. Don't clear
6722 STMT_VINFO_RELATED_STMT.
6723 (vect_pattern_recog): Update call accordingly.
6725 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6727 PR tree-optimization/85694
6728 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6729 (uavgM3_ceil): Document new optabs.
6730 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6731 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6733 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6734 (savg_ceil_optab): New optabs.
6735 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6736 (vect_vect_recog_func_ptrs): Add it.
6737 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6738 constant directly from the associated lhs.
6740 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6742 * tree-vect-patterns.c (vect_split_statement): New function.
6743 (vect_convert_input): Use it to try to split an existing cast.
6745 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6747 * poly-int.h (print_hex): New function.
6748 * dumpfile.h (dump_dec, dump_hex): Declare.
6749 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6750 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6751 min_input_precision, operation_precision and operation_sign.
6752 * tree-vect-patterns.c (vect_get_range_info): New function.
6753 (vect_same_loop_or_bb_p, vect_single_imm_use)
6754 (vect_operation_fits_smaller_type): Delete.
6755 (vect_look_through_possible_promotion): Add an optional
6756 single_use_p parameter.
6757 (vect_recog_over_widening_pattern): Rewrite to use new
6758 stmt_vec_info infomration. Handle one operation at a time.
6759 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6760 (vect_truncatable_operation_p, vect_set_operation_type)
6761 (vect_set_min_input_precision): New functions.
6762 (vect_determine_min_output_precision_1): Likewise.
6763 (vect_determine_min_output_precision): Likewise.
6764 (vect_determine_precisions_from_range): Likewise.
6765 (vect_determine_precisions_from_users): Likewise.
6766 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6767 (vect_vect_recog_func_ptrs): Put over_widening first.
6769 (vect_pattern_recog): Call vect_determine_precisions.
6771 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6773 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6774 statements that have been replaced by further pattern statements.
6775 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6777 2018-07-03 Richard Biener <rguenther@suse.de>
6779 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6780 always set *dt. Dump vectype in vectype overload.
6781 * dumpfile.h (dump_gimple_expr): New function.
6782 (dump_gimple_expr_loc): Likewise.
6783 * dumpfile.c (dump_gimple_expr): New function.
6784 (dump_gimple_expr_loc): Likewise.
6786 2018-07-02 Jeff Law <law@redhat.com>
6788 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6789 the H8/300, H8/300H and H8/S variants into a single pattern.
6790 (movhi_h8300, movqi_h8300hs): Similarly.
6791 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6792 (QHI mode iterator): New.
6794 * config/h8300/h8300.md: Remove trailing whitespace.
6796 2018-07-02 Jim Wilson <jimw@sifive.com>
6798 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6799 instead of emit_insn for interrupt returns.
6800 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6801 (riscv_sret, riscv_uret): Likewise.
6803 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6805 * pretty-print.c (selftest::test_pp_format): Move save and restore
6806 of quotes to class auto_fix_quotes, and add an instance.
6807 * selftest.c: Include "intl.h".
6808 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6809 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6810 * selftest.h (selftest::auto_fix_quotes): New class.
6812 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6814 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6815 (aarch64_sve_prepare_conditional_op): Remove.
6816 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6817 Allow aarch64_simd_reg_or_zero as select operand; remove
6818 the aarch64_sve_prepare_conditional_op call.
6819 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6820 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6821 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6822 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6823 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6824 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6825 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6826 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6827 and a splitters to match all of the *_any patterns.
6828 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6830 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6831 (SVE_COND_FP_BINARY_REV): Remove.
6832 (sve_int_op_rev, sve_fp_op_rev): New.
6833 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6834 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6835 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6836 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6837 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6838 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6839 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6840 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6841 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6843 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6844 Remove match_dup 1 from the inner unspec.
6845 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6847 * config/aarch64/aarch64.md (movprfx): New attr.
6848 (length): Default movprfx to 8.
6849 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6850 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6851 (*<su>mul<SVE_I>3_highpart): Likewise.
6852 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6853 (*v<ASHIFT><SVE_I>3): Likewise.
6854 (*<su><MAXMIN><SVE_I>3): Likewise.
6855 (*<su><MAXMIN><SVE_F>3): Likewise.
6856 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6857 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6858 (*div<SVE_F>4): Likewise.
6860 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6862 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6865 2018-07-02 Richard Biener <rguenther@suse.de>
6867 PR tree-optimization/86363
6868 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6869 memset argument refers to a non-variable address.
6871 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6873 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6874 {PLUS,MINUS}_EXPR code to...
6875 (adjust_symbolic_bound): ...here,
6876 (combine_bound): ...here,
6877 (set_value_range_with_overflow): ...and here.
6879 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6881 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6883 (extract_range_from_abs_expr): ...here.
6885 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6887 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6888 -fno-omit-frame-pointer when not optimizing.
6890 2018-07-02 Martin Liska <mliska@suse.cz>
6893 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6894 (propagate_nothrow): Likewise.
6896 2018-07-02 Martin Liska <mliska@suse.cz>
6899 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6901 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6903 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6904 function in r262149, changing "loc" param from source_location to
6905 const dump_location_t &.
6906 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6907 declaration, as above.
6909 2018-07-01 Paul Koning <ni1d@arrl.net>
6911 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6912 -munit-asm, -mgnu-asm, -mdec-asm.
6913 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6914 (pdp11_output_labelref): New.
6915 (pdp11_output_def): New.
6916 (pdp11_output_addr_vec_elt): New.
6917 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6918 %# and %@ format codes.
6919 (pdp11_option_override): New.
6920 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6921 (pdp11_output_ident): New.
6922 (pdp11_asm_named_section): New.
6923 (pdp11_asm_init_sections): New.
6924 (pdp11_file_start): New.
6925 (pdp11_file_end): New.
6926 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6927 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6928 %o, like %c but octal.
6929 (pdp11_option_override): New.
6930 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6932 (DATA_SECTION_ASM_OP): Ditto.
6933 (READONLY_DATA_SECTION_ASM_OP): New.
6934 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6935 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6936 (ASM_OUTPUT_LABELREF): Ditto.
6937 (ASM_OUTPUT_DEF): Ditto.
6938 (ASM_OUTPUT_EXTERNAL): New.
6939 (ASM_OUTPUT_SOURCE_FILENAME): New.
6940 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6941 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6942 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6943 %# and %@ format codes.
6944 * config/pdp11/pdp11.opt (mgnu-asm): New.
6945 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6946 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6947 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6949 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6951 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6952 dereferencing path[] beyond its length.
6954 (debug_all_paths): New.
6955 (rewire_first_differing_edge): New.
6956 (adjust_paths_after_duplication): New.
6957 (duplicate_thread_path): Call adjust_paths_after_duplication.
6959 (thread_through_all_blocks): Add new argument to
6960 duplicate_thread_path.
6962 2018-06-30 Jim Wilson <jimw@sifive.com>
6964 * config/riscv/predicates.md (p2m1_shift_operand): New.
6965 (high_mask_shift_operand): New.
6966 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6967 pattern using p2m1_shift_operand.
6968 (lshsi3_zero_extend_3+2): New combiner pattern using
6969 high_mask_shift_operand.
6971 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6973 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6975 (vect_recog_rotate_pattern): ...here.
6976 (vect_convert_input): Try to insert casts of invariants in the
6978 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6979 preheader to be empty.
6981 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6983 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6984 vector type. If given, install it in the new statement's
6986 (vect_element_precision): New function.
6987 (vect_unpromoted_value): New struct.
6988 (vect_unpromoted_value::vect_unpromoted_value): New function.
6989 (vect_unpromoted_value::set_op): Likewise.
6990 (vect_look_through_possible_promotion): Likewise.
6991 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6992 (vect_widened_op_tree, vect_convert_input): Likewise.
6993 (vect_convert_inputs, vect_convert_output): Likewise.
6994 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6995 to handle the optional cast of the multiplication result and
6996 vect_widened_op_tree to detect the widened multiplication itself.
6997 Do not require the input and output of promotion casts to have
6998 the same sign, but base the signedness of the operation on the
6999 input rather than the result. If the pattern includes two
7000 promotions, check that those promotions have the same sign.
7001 Do not restrict the MULT_EXPR handling to a double-width result;
7002 handle quadruple-width results and wider. Use vect_convert_inputs
7003 to convert the inputs to the common type.
7004 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7005 to handle the optional cast of the ABS result. Also allow a sign
7006 change or a sign extension between the ABS and MINUS.
7007 Use vect_widened_op_tree to detect the widened subtraction and use
7008 vect_convert_inputs to convert the inputs to the common type.
7009 (vect_handle_widen_op_by_const): Delete.
7010 (vect_recog_widen_op_pattern): New function.
7011 (vect_recog_widen_mult_pattern): Use it.
7012 (vect_recog_widen_shift_pattern): Likewise.
7013 (vect_recog_widen_sum_pattern): Use
7014 vect_look_through_possible_promotion to handle the promoted
7017 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7019 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7020 the containing gimple_seq *.
7021 * gimple-iterator.h (gsi_for_stmt): Declare it.
7022 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7023 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7024 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7025 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7026 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7028 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7030 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7031 statement being replaced is part of an existing pattern
7032 definition sequence, inserting the new pattern statements before
7034 (vect_pattern_recog_1): Don't return a bool. If the statement
7035 is already part of a pattern, instead apply pattern matching
7036 to the pattern definition statements. Don't clear the
7037 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7038 (vect_pattern_recog): Don't break after the first match;
7039 continue processing the pattern definition statements instead.
7040 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7042 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7044 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7045 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7046 (vect_recog_widen_sum_pattern): Use it.
7048 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7050 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7051 phi is not a pattern statement and has not been replaced by
7052 a pattern statement.
7053 * tree-vect-patterns.c (type_conversion_p): Don't check
7054 STMT_VINFO_IN_PATTERN_P.
7055 (vect_recog_vector_vector_shift_pattern): Likewise.
7056 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7057 the pattern statement rather than the original statement; check
7058 directly for a WIDEN_MULT_EXPR here.
7059 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7060 vect_is_simple_use to return the pattern statement rather
7061 than the original statement; use is_pattern_stmt_p to check
7062 for such a pattern statement.
7063 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7064 to return the pattern statement rather than the original statement;
7065 don't do the same transformation here.
7066 (vect_is_simple_use): If the defining statement has been replaced
7067 by a pattern statement, return the pattern statement instead.
7068 Remove the corresponding (local) transformation from the vectype
7071 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7073 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7074 end and default to null.
7075 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7076 (vectorizable_reduction): Update calls accordingly, dropping the
7077 gimple ** argument if the passed-back statement isn't needed.
7078 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7079 (vect_recog_rotate_pattern): Likewise.
7080 (vect_recog_mask_conversion_pattern): Likewise.
7081 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7082 (vect_mask_constant_operand_p): Likewise.
7083 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7084 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7085 (get_group_load_store_type, get_load_store_type): Likewise.
7086 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7087 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7088 (vectorizable_conversion, vectorizable_assignment): Likewise.
7089 (vectorizable_shift, vectorizable_operation): Likewise.
7090 (vectorizable_store, vect_is_simple_cond): Likewise.
7091 (vectorizable_condition, vectorizable_comparison): Likewise.
7092 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7093 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7094 and move it to the end. Cope with null def_stmt_outs.
7096 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7098 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7100 2018-06-29 Jeff Law <law@redhat.com>
7102 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7103 displacements for TARGET_V850E2V3 and newer.
7104 (TARGET_LRA_P): Remove. Defaults to LRA now.
7105 * config/v850/v850.md (sign23byte_load): Remove.
7106 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7107 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7109 2018-06-29 Martin Liska <mliska@suse.cz>
7112 * coverage.c (coverage_init): Mangle full path name.
7113 * doc/invoke.texi: Document the change.
7114 * gcov-io.c (mangle_path): New.
7115 * gcov-io.h (mangle_path): Likewise.
7116 * gcov.c (mangle_name): Use mangle_path for path mangling.
7118 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7120 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7121 if starting source register is not even.
7123 2018-06-29 Martin Liska <mliska@suse.cz>
7125 PR tree-optimization/86263
7126 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7127 Make edge redirection.
7129 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7131 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7132 (dump_scope_depth): New variable.
7133 (get_dump_scope_depth): New function.
7134 (dump_begin_scope): New function.
7135 (dump_end_scope): New function.
7136 * dumpfile.h (get_dump_scope_depth): New declaration.
7137 (dump_begin_scope): New declaration.
7138 (dump_end_scope): New declaration.
7139 (class auto_dump_scope): New class.
7140 (AUTO_DUMP_SCOPE): New macro.
7141 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7144 2018-06-29 Richard Biener <rguenther@suse.de>
7146 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7147 compute_all_dependences succeeds.
7148 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7149 exceed --param loop-max-datarefs-for-datadeps.
7151 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7153 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7155 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7158 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7159 alternative 0 in preferred_for_speed attribute.
7161 2018-06-28 Paul Koning <ni1d@arrl.net>
7163 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7164 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7165 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7166 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7167 for shift insn patterns.
7169 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7171 * cgraph.c (cgraph_node::get_body): Replace assignments to
7172 "dump_file" with calls to set_dump_file.
7173 * dumpfile.c (alt_dump_file): Make static, and group with...
7174 (alt_flags): ...this definition.
7175 (dumps_are_enabled): New variable.
7176 (refresh_dumps_are_enabled): New function.
7177 (set_dump_file): New function.
7178 (set_alt_dump_file): New function.
7179 (gcc::dump_manager::dump_start): Replace assignments to
7180 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7182 (gcc::dump_manager::dump_finish): Likewise.
7183 * dumpfile.h (alt_dump_file): Delete decl.
7184 (dumps_are_enabled): New variable decl.
7185 (set_dump_file): New function decl.
7186 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7188 * tree-nested.c (lower_nested_functions): Replace assignments to
7189 "dump_file" with calls to set_dump_file.
7191 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7193 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7194 goto_locus of each outgoing edge of each basic block.
7196 2018-06-28 Richard Biener <rguenther@suse.de>
7198 * dwarf2out.c (decl_scope_table): Remove.
7199 (push_decl_scope): Likewise.
7200 (pop_decl_scope): Likewise.
7201 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7202 (gen_struct_or_union_type_die): Likewise.
7203 (gen_tagged_type_die): Likewise.
7204 (dwarf2out_init): Do not initialize decl_scope_table.
7205 (dwarf2out_c_finalize): Do not free it.
7207 2018-06-28 Richard Biener <rguenther@suse.de>
7209 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7210 deciding whether to not re-use a DIE.
7212 2018-06-28 Richard Biener <rguenther@suse.de>
7214 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7215 DW_AT_abstract_origin attribute.
7217 2018-06-28 Martin Liska <mliska@suse.cz>
7219 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7220 Use newly introduced constants.
7221 * tree-switch-conversion.h (struct jump_table_cluster):
7222 Define max_ratio_for_size and max_ratio_for_speed.
7224 2018-06-28 Martin Liska <mliska@suse.cz>
7226 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7227 Add new checking assert to catch invalid state.
7228 (jump_table_cluster::can_be_handled): Handle single case
7230 (jump_table_cluster::is_beneficial): Bail out for such case.
7231 (bit_test_cluster::find_bit_tests):
7232 Add new checking assert to catch invalid state.
7233 (bit_test_cluster::can_be_handled): Handle single case
7235 (bit_test_cluster::is_beneficial): Bail out for such case.
7236 (switch_decision_tree::analyze_switch_statement):
7239 2018-06-28 Martin Liska <mliska@suse.cz>
7241 * common.opt: Introduce -completion option.
7242 * gcc.c (driver_handle_option): Handle it.
7243 (driver::main): Print completions if completion
7245 * opt-suggestions.c (option_proposer::get_completions):
7247 (option_proposer::suggest_completion): Likewise.
7248 (option_proposer::find_param_completions): Likewise.
7249 (verify_autocompletions): Likewise.
7250 (test_completion_valid_options): Likewise.
7251 (test_completion_valid_params): Likewise.
7252 (in_completion_p): Likewise.
7253 (empty_completion_p): Likewise.
7254 (test_completion_partial_match): Likewise.
7255 (test_completion_garbage): Likewise.
7256 (opt_proposer_c_tests): Likewise.
7257 * opt-suggestions.h: Declare new functions.
7258 * opts.c (common_handle_option): Handle OPT__completion_.
7259 * selftest-run-tests.c (selftest::run_tests): Add
7260 opt_proposer_c_tests.
7261 * selftest.c (assert_str_startswith): New.
7262 * selftest.h (assert_str_startswith): Likewise.
7263 (opt_proposer_c_tests): New.
7264 (ASSERT_STR_STARTSWITH): Likewise.
7266 2018-06-28 Martin Liska <mliska@suse.cz>
7268 * Makefile.in: Add opt-suggestions.o.
7269 * gcc-main.c: Include opt-suggestions.h.
7270 * gcc.c (driver::driver): Likewise.
7271 (driver::~driver): Remove m_option_suggestions.
7272 (driver::build_option_suggestions): Moved to option_proposer.
7273 (driver::suggest_option): Likewise.
7274 (driver::handle_unrecognized_options): Use option_proposer.
7275 * gcc.h (class driver): Add new memver m_option_proposer.
7276 * opt-suggestions.c: New file.
7277 * opt-suggestions.h: New file.
7279 2018-06-28 Martin Liska <mliska@suse.cz>
7281 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7282 (auto_string_vec::~auto_string_vec): Likewise.
7284 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7286 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7287 prevent_decl_creation_for_types fields up and add reset_location field.
7288 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7289 statement if id->reset_location is true.
7290 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7291 id->reset_location is true.
7292 (copy_phis_for_bb): Force input_location on the arguments if
7293 id->reset_location is true.
7294 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7295 is set on the function to be inlined.
7297 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7299 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7301 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7303 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7304 registers for Pmode.
7305 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7306 hard registers for the clobbered pseudo.
7308 2018-06-27 Paul Koning <ni1d@arrl.net>
7310 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7311 mutually exclusive options.
7312 * config/pdp11/constraints.md (h): New constraint.
7313 (O): Update definition to match shift code generation.
7314 (D): New constraint.
7315 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7317 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7319 (output_jump): Change arguments.
7320 (pdp11_fixed_cc_regs): New function.
7321 (pdp11_cc_mode): Ditto.
7322 (pdp11_expand_shift): Ditto.
7323 (pdp11_assemble_shift): Ditto.
7324 (pdp11_small_shift): Ditto.
7325 (pdp11_branch_cost): Remove.
7326 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7328 (pdp11_register_move_cost): Update for CC registers.
7329 (pdp11_rtx_costs): Add case for LSHIFTRT.
7330 (pdp11_output_jump): Add CCNZ mode conditional branches.
7331 (notice_update_cc_on_set): Remove.
7332 (pdp11_cc_mode): New function.
7333 (simple_memory_operand): Correct pre/post decrement case.
7334 (no_side_effect_operand): New function.
7335 (pdp11_regno_reg_class): Add CC_REGS class.
7336 (pdp11_fixed_cc_regs): New function.
7337 (pdp11_small_shift): New function.
7338 (pdp11_expand_shift): New function to expand shift insns.
7339 (pdp11_assemble_shift): New function to output shifts.
7340 (pdp11_branch_cost): Remove.
7341 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7342 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7343 (WCHAR_TYPE): Ditto.
7344 (PTRDIFF_TYPE): Ditto.
7345 (ADJUST_INSN_LENGTH): New macro.
7346 (FIXED_REGISTERS): Add CC registers.
7347 (CALL_USED_REGISTERS): Ditto.
7349 (REG_CLASS_NAMES): Ditto.
7350 (REG_CLASS_CONTENTS): Ditto.
7351 (SELECT_CC_MODE): Use new function.
7352 (TARGET_FLAGS_REGNUM): New macro.
7353 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7354 (cc0_reg_rtx): Remove.
7355 (CC_STATUS_MDEP): Remove.
7356 (CC_STATUS_MDEFP_INIT): Remove.
7357 (CC_IN_FPU): Remove.
7358 (NOTICE_UPDATE_CC): Remove.
7359 (REGISTER_NAMES): Add CC registers.
7360 (BRANCH_COST): Change to constant 1.
7361 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7363 * config/pdp11/pdp11.opt (mbcopy): Remove.
7364 (mbcopy-builtin): Remove.
7365 (mbranch-cheap): Remove.
7366 (mbranch-expensive): Remove.
7367 * config/pdp11/predicates.md (expand_shift_operand): Update to
7368 match shift code generation.
7369 (ccnz_operator): New predicate.
7370 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7371 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7372 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7374 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7375 description of O constraint.
7377 2018-06-27 Jeff Law <law@redhat.com>
7378 Austin Law <austinklaw@gmail.com>
7380 * config/v850/v850.md (addsi3_set_flags): New pattern.
7381 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7382 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7383 (zero_extendhisi2_v850_set_flags): Likewise.
7384 (zero_extendqisi2_v850_set_flags): Likewise.
7385 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7386 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7387 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7389 * config/v850/v850-protos.h (notice_update_cc): Remove.
7390 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7391 (v850_print_operand): Handle 'D' and "d".
7392 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7393 Add handling of arithmetic/logical operations compared against zero.
7394 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7395 Do not look at v850_compare_op, instead get mode from last argument.
7396 (v850_gen_compare): Remove
7397 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7398 after reload for prologue insns.
7399 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7401 (construct_save_jarl): Likewise.
7402 (TARGET_FLAGS_REGNUM): Define.
7403 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7404 (NOTICE_UPDATE_CC): Remove.
7405 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7406 than cc0. Conditionalize on reload_completed.
7407 (cmpsi_insn, setfcc_insn): Likewise.
7408 (tst1 splitter): Turn into define_and_split which sets the flags
7410 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7411 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7412 (cstoresf4, cstoredf4): Clobber the flags.
7413 (cmpsi, cmpsf, cmpdf): Remove expanders.
7414 (setf_insn): Remove pattern.
7415 (addsi3): Turn into define_and_split which clobbers the flags after
7416 reload and a suitable pattern (addsi3_clobber_flags) for use after
7418 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7419 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7420 (ashrsi3, ashrsi3_v850e2): Likewise.
7421 (bins): Clobber the flags.
7422 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7423 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7424 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7425 (call_value_internal_short, call_value_internal_long): Likewise.
7426 (callt_save_interrupt, callt_return_interrupt): Likewise.
7427 (save_interrupt, return_interrupt): Likewise.
7428 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7429 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7430 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7431 (All FP comparisons): Only allow after reload has completed.
7433 (divh, divhu): Tweak output template.
7434 (branch_z_normal, branch_z_invert): Remove
7435 (branch_nz_normal, branch_nz_invert): Likewise.
7436 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7438 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7439 * config/v850/v850.c (notice_update_cc): Remove.
7440 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7441 (CC_NO_CARRY): Likewise.
7442 (NOTICE_UPDATE_CC): Define to nothing.
7443 * config/v850/v850.md: Remove block comment on cc0 handling
7444 Remove "cc" attribute from all patterns. Remove cc_status handling
7445 from all patterns. Minor formatting fixes.
7447 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7449 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7450 (cortex-a76.cortex-a55): Likewise.
7451 * config/aarch64/aarch64-tune.md: Regenerate.
7452 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7453 cortex-a76.cortex-a55.
7455 2018-06-27 Jeff Law <law@redhat.com>
7457 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7458 (MULTILIB_DIRNAMES): Similarly.
7460 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7462 * gimple.h (gimple_return_retbnd): Delete.
7463 (gimple_return_set_retbnd): Likewise.
7464 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7465 gimple_return_set_retbnd.
7466 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7467 gimple_return_retbnd and adjust.
7468 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7469 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7470 Explicitly return NULL in a couple more cases. Move assertion
7471 on debug statements and remove unreachable code.
7472 (reset_debug_binding): Do not test id->retbnd.
7473 (expand_call_inline): Do not set it.
7475 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7477 * configure.ac: Add --disable-gcov option.
7478 * configure: Regenerate.
7479 * Makefile.in: Honour @enable_gcov@.
7480 * doc/install.texi: Document --disable-gcov.
7482 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7484 * config/arm/arm-cpus.in (cortex-a76): New entry.
7485 (cortex-a76.cortex-a55): Likewise.
7486 * config/arm/arm-tables.opt: Regenerate.
7487 * config/arm/arm-tune.md: Likewise.
7488 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7489 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7490 cortex-a76.cortex-a55.
7492 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7495 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7497 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7499 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7501 (EPILOGUE_USES): Likewise.
7503 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7505 * tree-inline.c (remap_location): New function extracted from...
7506 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7507 (copy_phis_for_bb): ...here. Call remap_location.
7508 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7510 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7512 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7513 unaligned vsx for 16B memset.
7515 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7518 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7519 ieee128_float_type_node to long_double_type_node unless
7520 TARGET_LONG_DOUBLE_128 is set.
7522 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7524 * cfgloop.c (get_loop_location): Convert return type from
7525 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7526 by implicit construction from rtx_insn *, and using
7527 dump_user_location_t::from_function_decl for the fallback case.
7528 * cfgloop.h (get_loop_location): Convert return type from
7529 location_t to dump_user_location_t.
7530 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7531 dump_printf_loc to pass in a dump_location_t rather than a
7532 location_t, via the gimple stmt.
7533 * coverage.c (get_coverage_counts): Update calls to
7534 dump_printf_loc to pass in dump_location_t rather than a
7536 * doc/optinfo.texi (Dump types): Convert example of
7537 dump_printf_loc from taking "locus" to taking "insn". Update
7538 description of the "_loc" calls to cover dump_location_t.
7539 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7541 (dump_user_location_t::dump_user_location_t): New constructors,
7542 from gimple *stmt and rtx_insn *.
7543 (dump_user_location_t::from_function_decl): New function.
7544 (dump_loc): Make static.
7545 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7546 const dump_location_t &.
7547 (dump_generic_expr_loc): Delete.
7548 (dump_printf_loc): Convert param "loc" from location_t to
7549 const dump_location_t &.
7550 (selftest::test_impl_location): New function.
7551 (selftest::dumpfile_c_tests): New function.
7552 * dumpfile.h: Include "profile-count.h".
7553 (class dump_user_location_t): New class.
7554 (struct dump_impl_location_t): New struct.
7555 (class dump_location_t): New class.
7556 (dump_printf_loc): Convert 2nd param from source_location to
7557 const dump_location_t &.
7558 (dump_generic_expr_loc): Delete.
7559 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7560 const dump_location_t &.
7561 * gimple-fold.c (fold_gimple_assign): Update call to
7562 dump_printf_loc to pass in a dump_location_t rather than a
7563 location_t, via the gimple stmt.
7564 (gimple_fold_call): Likewise.
7565 * gimple-loop-interchange.cc
7566 (loop_cand::analyze_iloop_reduction_var): Update for change to
7567 check_reduction_path.
7568 (tree_loop_interchange::interchange): Update for change to
7570 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7571 change in return-type of find_loop_location.
7572 (graphite_regenerate_ast_isl): Likewise.
7573 * graphite-optimize-isl.c (optimize_isl): Likewise.
7574 * graphite.c (graphite_transform_loops): Likewise.
7575 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7576 pass in a dump_location_t rather than a location_t, via the
7578 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7579 * ipa.c (walk_polymorphic_call_targets): Likewise.
7580 * loop-unroll.c (report_unroll): Convert "locus" param from
7581 location_t to dump_location_t.
7582 (decide_unrolling): Update for change to get_loop_location's
7584 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7585 location_t to dump_user_location_t.
7586 (grid_find_single_omp_among_assignments_1): Updates calls to
7587 dump_printf_loc to pass in a dump_location_t rather than a
7588 location_t, via the gimple stmt.
7589 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7590 location_t to dump_location_t. Updates calls to dump_printf_loc
7591 to pass in a dump_location_t rather than a location_t, via the
7593 (grid_inner_loop_gridifiable_p): Likewise.
7594 (grid_dist_follows_simple_pattern): Likewise.
7595 (grid_gfor_follows_tiling_pattern): Likewise.
7596 (grid_target_follows_gridifiable_pattern): Likewise.
7597 (grid_attempt_target_gridification): Convert initialization
7598 of local "grid" from memset to zero-initialization; FIXME: does
7599 this require C++11? Update call to dump_printf_loc to pass in a
7600 optinfo_location rather than a location_t, via the gimple stmt.
7601 * profile.c (read_profile_edge_counts): Updates call to
7602 dump_printf_loc to pass in a dump_location_t rather than a
7604 (compute_branch_probabilities): Likewise.
7605 * selftest-run-tests.c (selftest::run_tests): Call
7607 * selftest.h (dumpfile_c_tests): New decl.
7608 * tree-loop-distribution.c (pass_loop_distribution::execute):
7609 Update for change in return type of find_loop_location.
7610 * tree-parloops.c (parallelize_loops): Likewise.
7611 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7612 "locus" from location_t to dump_user_location_t.
7613 (canonicalize_loop_induction_variables): Likewise.
7614 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7615 for change in return type of find_loop_location.
7616 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7617 to dump_printf_loc to pass in a dump_location_t rather than a
7618 location_t, via the stmt.
7619 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7621 * tree-vect-loop-manip.c (find_loop_location): Convert return
7622 type from source_location to dump_user_location_t.
7623 (vect_do_peeling): Update for above change.
7624 (vect_loop_versioning): Update for change in type of
7626 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7627 from location_t to dump_user_location_t.
7628 (vect_estimate_min_profitable_iters): Update for change in type
7630 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7631 location_t to dump_location_t.
7632 (vect_slp_bb): Update for change in type of vect_location.
7633 * tree-vectorizer.c (vect_location): Convert from source_location
7634 to dump_user_location_t.
7635 (try_vectorize_loop_1): Update for change in vect_location's type.
7636 (vectorize_loops): Likewise.
7637 (increase_alignment): Likewise.
7638 * tree-vectorizer.h (vect_location): Convert from source_location
7639 to dump_user_location_t.
7640 (find_loop_location): Convert return type from source_location to
7641 dump_user_location_t.
7642 (check_reduction_path): Convert 1st param from location_t to
7643 dump_user_location_t.
7644 * value-prof.c (check_counter): Update call to dump_printf_loc to
7645 pass in a dump_user_location_t rather than a location_t; update
7646 call to error_at for change in type of "locus".
7647 (check_ic_target): Update call to dump_printf_loc to
7648 pass in a dump_user_location_t rather than a location_t, via the
7651 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7653 * config/s390/s390.h (enum processor_flags): Do not use
7654 default tune parameter when -march was specified.
7656 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7659 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7660 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7663 2018-06-26 Richard Biener <rguenther@suse.de>
7665 PR tree-optimization/86287
7667 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7668 (vect_analyze_loop): Initialize n_stmts.
7670 2018-06-26 Richard Biener <rguenther@suse.de>
7673 * fold-const.c (fold_convertible_p): Pointer extension
7676 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7679 * dwarf2out.c (loc_list_has_views): Adjust comments.
7680 (dw_loc_list): Split single cross-partition range with
7683 2018-06-25 Jeff Law <law@redhat.com>
7685 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7686 on -mbig-switch by default.
7688 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7690 (const_float_0_operand): Remove unused predicate.
7691 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7692 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7693 (recipsf2): New expander. Original pattern now called
7695 (recipdf2, recipdf2_insn): Similarly.
7696 (rsqrtsf2, rsqrtsf2_insn): Similarly
7697 (rsqrtdf2, rsqrtdf2_insn): Similarly
7699 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7701 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7702 Simplify logic for FreeBSD (twice).
7704 2018-06-25 Martin Sebor <msebor@redhat.com>
7706 PR tree-optimization/86204
7707 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7708 a strnlen result if it's less than the length of the string.
7710 2018-06-25 Martin Sebor <msebor@redhat.com>
7712 PR tree-optimization/85700
7713 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7714 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7715 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7717 2018-06-25 Martin Sebor <msebor@redhat.com>
7719 * doc/extend.texi (Zero-length arrays): Update and clarify.
7721 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7723 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7724 added IEEE/IBM long double multilib support on PowerPC little
7725 endian Linux systems.
7726 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7727 (MULTILIB_DEFAULTS): Likewise.
7728 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7730 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7731 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7732 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7734 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7737 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7738 (REORDER_45): Likewise.
7740 2018-06-25 Jeff Law <law@redhat.com>
7742 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7743 dividend to 32 bits. Adjust length.
7744 (udivmodhi4): Cleanup output template. Fix length.
7746 2018-06-25 Carl Love <cel@us.ibm.com>
7748 * config/rs6000/vsx.md: Change word selector to prefered location.
7750 2018-06-25 Richard Biener <rguenther@suse.de>
7752 PR tree-optimization/86304
7753 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7754 epilogue-if-converted loops as well.
7756 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7758 * lto-section-out.c (lto_begin_section): Do not print section
7759 name for noaddr and unnumbered dumps.
7761 2018-06-25 Richard Biener <rguenther@suse.de>
7763 * tree-vectorizer.h (struct vec_info_shared): New structure
7764 with parts split out from struct vec_info and loop_nest from
7765 struct _loop_vec_info.
7766 (struct vec_info): Adjust accordingly.
7767 (struct _loop_vec_info): Likewise.
7768 (LOOP_VINFO_LOOP_NEST): Adjust.
7769 (LOOP_VINFO_DATAREFS): Likewise.
7770 (LOOP_VINFO_DDRS): Likewise.
7771 (struct _bb_vec_info): Likewise.
7772 (BB_VINFO_DATAREFS): Likewise.
7773 (BB_VINFO_DDRS): Likewise.
7774 (struct _stmt_vec_info): Add dr_aux member.
7775 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7776 (DR_MISALIGNMENT_UNINITIALIZED): New.
7777 (set_dr_misalignment): Adjust.
7778 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7779 (vect_analyze_loop): Adjust prototype.
7780 (vect_analyze_loop_form): Likewise.
7781 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7782 Compute dependences lazily.
7783 (vect_record_base_alignments): Use shared datarefs/ddrs.
7784 (vect_verify_datarefs_alignment): Likewise.
7785 (vect_analyze_data_refs_alignment): Likewise.
7786 (vect_analyze_data_ref_accesses): Likewise.
7787 (vect_analyze_data_refs): Likewise.
7788 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7789 constructor parameter for shared part.
7790 (vect_analyze_loop_form): Pass in shared part and adjust.
7791 (vect_analyze_loop_2): Pass in storage for the number of
7792 stmts. Move loop nest finding to the caller. Compute
7794 (vect_analyze_loop): Pass in shared part.
7795 (vect_transform_loop): Verify shared datarefs are unchanged.
7796 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7797 constructor parameter for shared part.
7798 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7799 (vect_slp_bb): Verify shared datarefs are unchanged before
7801 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7803 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7804 DR_MISALIGNMENT_UNINITIALIZED.
7805 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7806 parameter for shared part.
7807 (vec_info::~vec_info): Adjust.
7808 (vec_info_shared::vec_info_shared): New.
7809 (vec_info_shared::~vec_info_shared): Likewise.
7810 (vec_info_shared::save_datarefs): Likewise.
7811 (vec_info_shared::check_datarefs): Likewise.
7812 (try_vectorize_loop_1): Construct shared part live for analyses
7813 of a single loop for multiple vector sizes.
7814 * tree-parloops.c (gather_scalar_reductions): Adjust.
7816 2018-06-25 Richard Biener <rguenther@suse.de>
7818 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7819 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7820 (vect_analyze_data_refs): Remove similar code from here and
7821 simplify accordingly.
7823 2018-06-25 Richard Biener <rguenther@suse.de>
7825 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7826 for reverse storage order accesses rather than asserting
7827 they cannot happen here.
7829 2018-06-25 Tom de Vries <tdevries@suse.de>
7832 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7833 Use data16 instead of .byte for insn prefix.
7835 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7838 * parser.c (make_char_string_pack): Pass this literal chars
7839 through cpp_interpret_string.
7840 (cp_parser_userdef_numeric_literal): Check the result of
7841 make_char_string_pack.
7843 2018-06-24 Maya Rashish <coypu@sdf.org>
7845 * ginclude/stddef.h: Simplify conditions around avoiding
7846 re-definition of __size_t.
7848 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7850 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7851 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7853 2018-06-22 Maya Rashish <coypu@sdf.org>
7855 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7856 made to OpenBSD and NetBSD through the years.
7858 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7860 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7861 behavior of vec_pack (vector double, vector double) to match
7862 behavior of vec_float2 (vector double, vector double).
7864 2018-06-22 Olivier Hainque <hainque@adacore.com>
7866 * gimplify.c (gimplify_function_tree): Prevent creation
7867 of a trampoline for the address of the current function
7868 passed to entry/exit instrumentation hooks.
7870 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7873 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7876 2018-06-22 Martin Liska <mliska@suse.cz>
7878 PR tree-optimization/86263
7879 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7880 Bail out if is_enabled is false.
7881 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7883 (jump_table_cluster::is_enabled): New function.
7885 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7887 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7888 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7889 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7890 (lto_input_ts_binfo_tree_pointers): Likewise.
7891 * tree-streamer-out.c (streamer_write_tree_bitfields,
7892 write_ts_binfo_tree_pointers): Likewise.
7893 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7895 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7897 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7899 2018-06-22 Martin Liska <mliska@suse.cz>
7901 * symbol-summary.h (get): Make it pure and inline move
7902 functionality from ::get function.
7903 (get): Remove and inline into ::get and ::get_create.
7904 (get_create): Move code from ::get function.
7906 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7909 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7910 -x assembler-with-cpp.
7912 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7914 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7915 _FILE_OFFSET_BITS=64 for C++.
7917 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7919 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7920 conversion insn that shows up when pr85657-3.c is compiled using
7921 IEEE 128-bit long double.
7922 (neg<mode>2_internal): Use the correct mode to check whether the
7923 mode is IBM extended.
7924 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7925 multiply and divide external functions from being created more
7928 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7930 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7932 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7933 the edge can be forwarded.
7934 (cfg_layout_merge_blocks): Likewise.
7936 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7938 * except.c (finish_eh_generation): Commit edge insertions only after
7939 the EH edges have been redirected from post-landing to landing pads.
7941 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7943 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7944 create_tmp_var_for to create the FRAME decl.
7945 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7947 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7949 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7950 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7951 debug statement when resetting its value.
7952 (expand_call_inline): Copy the locus of the call onto the assignment
7953 of the return value, if any. Use local variable in more cases.
7955 2018-06-21 Martin Liska <mliska@suse.cz>
7957 * ipa-pure-const.c (propagate_nothrow): Use
7958 funct_state_summaries->get.
7959 (dump_malloc_lattice): Likewise.
7960 (propagate_malloc): Likewise.
7962 2018-06-21 Richard Biener <rguenther@suse.de>
7964 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7965 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7966 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7968 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7969 BLOCK_ABSTRACT_ORIGIN unconditionally.
7971 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7973 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7975 * ipa-reference.c (ipa_reference_c_finalize): Delete
7976 ipa_ref_opt_sum_summaries and set it to NULL.
7978 2018-06-21 Tom de Vries <tdevries@suse.de>
7980 PR tree-optimization/85859
7981 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7982 test with comment from bb_no_side_effects_p.
7984 2018-06-21 Richard Biener <rguenther@suse.de>
7986 PR tree-optimization/86232
7987 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7988 max for constant niter.
7990 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7992 * config/aarch64/aarch64-simd.md
7993 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7995 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7997 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7998 Make opernads of the unspec commutative.
8000 2018-06-21 Richard Biener <rguenther@suse.de>
8002 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8003 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8004 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8005 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8007 (vect_record_base_alignments): Do not record base alignment
8008 for gathers or scatters.
8009 (vect_compute_data_ref_alignment): Drop return value that is always
8010 true. Bail out early for gathers or scatters.
8011 (vect_enhance_data_refs_alignment): Bail out early for gathers
8013 (vect_find_same_alignment_drs): Likewise.
8014 (vect_analyze_data_refs_alignment): Remove dead code.
8015 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8016 (vect_analyze_data_refs): For possible gathers or scatters do
8017 not create an alternate DR, just check their possible validity
8018 and mark them. Adjust DECL_NONALIASED handling to not rely
8020 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8021 update inits of gathers or scatters.
8022 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8023 Also copy gather/scatter flag to pattern vinfo.
8025 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8027 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8028 behavior of vec_packsu (vector unsigned long long, vector unsigned
8029 long long) to match behavior of vec_packs with same signature.
8031 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8032 Thomas Schwinge <thomas@codesourcery.com>
8033 Cesar Philippidis <cesar@codesourcery.com>
8035 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8036 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8037 (gimplify_adjust_omp_clauses): Likewise.
8038 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8039 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8040 (gimplify_omp_target_update): Update handling of acc update and
8042 * omp-low.c (install_var_field): Remove unused parameter
8043 base_pointers_restrict.
8044 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8045 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8047 (omp_target_base_pointers_restrict_p): Delete.
8048 (scan_omp_target): Update call to scan_sharing_clauses.
8049 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8051 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8052 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8053 (convert_local_omp_clauses): Likewise.
8054 * tree-pretty-print.c (dump_omp_clause): Likewise.
8055 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8057 (omp_clause_code_name): Likewise.
8059 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8062 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8065 PR tree-optimization/86231
8066 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8067 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8069 2018-06-20 Tom de Vries <tdevries@suse.de>
8071 PR tree-optimization/86097
8072 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8073 iv type if signedness of iv type is not the same as that of *nit.
8075 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8077 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8078 EDGE_EH edges, verify they are all EDGE_EH.
8080 2018-06-20 Maya Rashish <coypu@sdf.org>
8082 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8084 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8086 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8087 * config/aarch64/aarch64.c (xgene1_tunings): Add
8088 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8089 (aarch64_mode_valid_for_sched_fusion_p):
8090 Allow 16-byte modes.
8091 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8092 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8094 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8096 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8097 * config/aarch64/iterators.md (VQ2): New mode iterator.
8099 2018-06-20 Martin Liska <mliska@suse.cz>
8101 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8102 Change default ratio from 10 to 8.
8104 2018-06-20 Martin Liska <mliska@suse.cz>
8106 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8108 (bit_test_cluster::find_bit_tests): Likewise.
8109 (switch_decision_tree::analyze_switch_statement): Find clusters.
8110 * tree-switch-conversion.h (struct jump_table_cluster): Document
8113 2018-06-20 Martin Liska <mliska@suse.cz>
8115 * tree-switch-conversion.c (switch_conversion::collect):
8116 Record m_uniq property.
8117 (switch_conversion::expand): Bail out for special conditions.
8118 (group_cluster::~group_cluster): New.
8119 (group_cluster::group_cluster): Likewise.
8120 (group_cluster::dump): Likewise.
8121 (jump_table_cluster::emit): New.
8122 (switch_decision_tree::fix_phi_operands_for_edges): New.
8123 (struct case_node): Remove struct.
8124 (jump_table_cluster::can_be_handled): New.
8125 (case_values_threshold): Moved to header.
8126 (reset_out_edges_aux): Likewise.
8127 (jump_table_cluster::is_beneficial): New.
8128 (bit_test_cluster::can_be_handled): Likewise.
8129 (add_case_node): Remove.
8130 (bit_test_cluster::is_beneficial): New.
8131 (case_bit_test::cmp): New.
8132 (bit_test_cluster::emit): New.
8133 (expand_switch_as_decision_tree_p): Remove.
8134 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8135 (fix_phi_operands_for_edge): Likewise.
8136 (switch_decision_tree::analyze_switch_statement): New.
8137 (compute_cases_per_edge): Move ...
8138 (switch_decision_tree::compute_cases_per_edge): ... here.
8139 (try_switch_expansion): Likewise.
8140 (switch_decision_tree::try_switch_expansion): Likewise.
8141 (record_phi_operand_mapping): Likewise.
8142 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8143 (emit_case_decision_tree): Likewise.
8144 (switch_decision_tree::emit): Likewise.
8145 (balance_case_nodes): Likewise.
8146 (switch_decision_tree::balance_case_nodes): Likewise.
8147 (dump_case_nodes): Likewise.
8148 (switch_decision_tree::dump_case_nodes): Likewise.
8149 (emit_jump): Likewise.
8150 (switch_decision_tree::emit_jump): Likewise.
8151 (emit_cmp_and_jump_insns): Likewise.
8152 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8153 (emit_case_nodes): Likewise.
8154 (switch_decision_tree::emit_case_nodes): Likewise.
8155 (conditional_probability): Remove.
8156 * tree-switch-conversion.h (enum cluster_type): New.
8158 (struct cluster): Likewise.
8159 (cluster::cluster): Likewise.
8160 (struct simple_cluster): Likewise.
8161 (simple_cluster::simple_cluster): Likewise.
8162 (struct group_cluster): Likewise.
8163 (struct jump_table_cluster): Likewise.
8164 (struct bit_test_cluster): Likewise.
8165 (struct min_cluster_item): Likewise.
8166 (struct case_tree_node): Likewise.
8167 (case_tree_node::case_tree_node): Likewise.
8168 (jump_table_cluster::case_values_threshold): Likewise.
8169 (struct case_bit_test): Likewise.
8170 (struct switch_decision_tree): Likewise.
8171 (struct switch_conversion): Likewise.
8172 (switch_decision_tree::reset_out_edges_aux): Likewise.
8174 2018-06-20 Martin Liska <mliska@suse.cz>
8176 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8177 (hoist_edge_and_branch_if_true): Likewise.
8178 (expand_switch_using_bit_tests_p): Likewise.
8179 (struct case_bit_test): Likewise.
8180 (case_bit_test_cmp): Likewise.
8181 (emit_case_bit_tests): Likewise.
8182 (switch_conversion::switch_conversion): New class.
8183 (struct switch_conv_info): Remove old struct.
8184 (collect_switch_conv_info): More to ...
8185 (switch_conversion::collect): ... this.
8186 (check_range): Likewise.
8187 (switch_conversion::check_range): Likewise.
8188 (check_all_empty_except_final): Likewise.
8189 (switch_conversion::check_all_empty_except_final): Likewise.
8190 (check_final_bb): Likewise.
8191 (switch_conversion::check_final_bb): Likewise.
8192 (create_temp_arrays): Likewise.
8193 (switch_conversion::create_temp_arrays): Likewise.
8194 (free_temp_arrays): Likewise.
8195 (gather_default_values): Likewise.
8196 (switch_conversion::gather_default_values): Likewise.
8197 (build_constructors): Likewise.
8198 (switch_conversion::build_constructors): Likewise.
8199 (constructor_contains_same_values_p): Likewise.
8200 (switch_conversion::contains_same_values_p): Likewise.
8201 (array_value_type): Likewise.
8202 (switch_conversion::array_value_type): Likewise.
8203 (build_one_array): Likewise.
8204 (switch_conversion::build_one_array): Likewise.
8205 (build_arrays): Likewise.
8206 (switch_conversion::build_arrays): Likewise.
8207 (gen_def_assigns): Likewise.
8208 (switch_conversion::gen_def_assigns): Likewise.
8209 (prune_bbs): Likewise.
8210 (switch_conversion::prune_bbs): Likewise.
8211 (fix_phi_nodes): Likewise.
8212 (switch_conversion::fix_phi_nodes): Likewise.
8213 (gen_inbound_check): Likewise.
8214 (switch_conversion::gen_inbound_check): Likewise.
8215 (process_switch): Use the newly created class.
8216 (switch_conversion::expand): New.
8217 (switch_conversion::~switch_conversion): New.
8218 * tree-switch-conversion.h: New file.
8220 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8222 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8223 tree-vect-patterns.c.
8224 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8225 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8226 (vect_recog_sad_pattern): Likewise.
8227 (vect_recog_widen_sum_pattern): Likewise.
8228 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8229 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8230 (vect_recog_rotate_pattern): Likewise.
8231 (vect_recog_mult_pattern): Likewise.
8232 (vect_recog_vector_vector_shift_pattern): Likewise.
8233 (vect_recog_divmod_pattern): Likewise.
8234 (vect_recog_mixed_size_cond_pattern): Likewise.
8235 (vect_recog_bool_pattern): Likewise.
8236 (vect_recog_mask_conversion_pattern): Likewise.
8237 (vect_try_gather_scatter_pattern): Likewise.
8238 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8239 (vect_recog_over_widening_pattern): Likewise.
8240 (vect_recog_gather_scatter_pattern): Likewise.
8241 (vect_recog_func_ptr): Move from tree-vectorizer.h
8242 (vect_vect_recog_func_ptrs): Move further down the file.
8243 (vect_recog_func): Likewise. Remove the third argument.
8244 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8245 (vect_pattern_recog_1): Expect the pattern function to do any
8246 necessary target tests. Also expect it to provide a vector type.
8247 Remove the type_in handling.
8249 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8251 * tree-vect-patterns.c (vect_pattern_detected): New function.
8252 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8253 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8254 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8255 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8256 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8257 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8258 (vect_recog_mask_conversion_pattern)
8259 (vect_try_gather_scatter_pattern): Likewise.
8261 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8263 * tree-vect-patterns.c (vect_get_internal_def): New function.
8264 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8265 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8266 (search_type_for_mask_1): Use it.
8268 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8270 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8271 redundant WIDEN_SUM_EXPR handling.
8272 (vect_recog_sad_pattern): Likewise.
8274 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8276 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8277 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8278 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8279 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8280 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8282 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8284 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8285 use the stmt_vec_info of the original bb statement for the
8286 new zero assignment, even if the call is part of a pattern.
8288 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8290 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8291 that the sequence is attached to the original statement rather
8292 than the pattern statement.
8293 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8294 PATTERN_DEF_SEQ from the original statement rather than
8295 the main pattern statement.
8296 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8297 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8298 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8300 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8302 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8303 definition statements before the early exit for statements that aren't
8305 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8307 (vect_transform_loop): ...here. Process pattern definition
8308 statements without first checking whether the main pattern
8309 statement is live or relevant.
8311 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8313 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8314 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8316 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8318 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8319 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8320 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8321 (expand_block_compare): Change select_block_compare_mode call.
8322 (expand_strncmp_align_check): Use new functions, fix comment.
8323 (emit_final_str_compare_gpr): New function.
8324 (expand_strn_compare): Refactor and clean up code.
8325 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8327 2018-06-19 Tony Reix <tony.reix@atos.com>
8328 Damien Bergamini <damien.bergamini@atos.com>
8329 David Edelsohn <dje.gcc@gmail.com>
8331 * collect2.c (static_obj): New variable.
8332 (static_libs): New variable.
8333 (is_in_list): Uncomment declaration.
8334 (main): Track AIX libraries linked statically.
8335 (is_in_list): Uncomment definition.
8336 (scan_prog_file): Don't add AIX shared libraries initializer
8337 to constructor list if linking statically.
8339 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8341 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8343 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8345 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8347 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8350 2018-06-19 Martin Liska <mliska@suse.cz>
8352 * config/i386/i386.c (ix86_can_inline_p): Do not use
8353 ipa_fn_summaries::get_create.
8354 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8356 (devirtualization_time_bonus): Likewise.
8357 (ipcp_propagate_stage): Likewise.
8358 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8359 (edge_set_predicate): Likewise.
8360 (evaluate_conditions_for_known_args): Likewise.
8361 (evaluate_properties_for_edge): Likewise.
8362 (ipa_call_summary::reset): Tranform to ...
8363 (ipa_call_summary::~ipa_call_summary): ... this.
8364 (ipa_fn_summary::reset): Transform to ...
8365 (ipa_fn_summary::~ipa_fn_summary): ... this.
8366 (ipa_fn_summary_t::remove): Rename to ...
8367 (ipa_fn_summary_t::remove_callees): ... this.
8368 (ipa_fn_summary_t::duplicate): Use placement new
8369 instead of memory copy.
8370 (ipa_call_summary_t::duplicate): Likewise.
8371 (ipa_call_summary_t::remove): Remove.
8372 (dump_ipa_call_summary): Change get_create to get.
8373 (ipa_dump_fn_summary): Dump only when summary exists.
8374 (analyze_function_body): Use symbol_summary::get instead
8376 (compute_fn_summary): Likewise.
8377 (estimate_edge_devirt_benefit): Likewise.
8378 (estimate_edge_size_and_time): Likewise.
8379 (inline_update_callee_summaries): Likewise.
8380 (remap_edge_change_prob): Likewise.
8381 (remap_edge_summaries): Likewise.
8382 (ipa_merge_fn_summary_after_inlining): Likewise.
8383 (write_ipa_call_summary): Likewise.
8384 (ipa_fn_summary_write): Likewise.
8385 (ipa_free_fn_summary): Likewise.
8386 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8387 (struct ipa_call_summary): Likewise.
8388 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8390 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8391 (estimate_size_after_inlining): Likewise.
8392 (estimate_growth): Likewise.
8393 (growth_likely_positive): Likewise.
8394 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8395 (inline_call): Likewise.
8396 * ipa-inline.c (caller_growth_limits): Likewise.
8397 (can_inline_edge_p): Likewise.
8398 (can_inline_edge_by_limits_p): Likewise.
8399 (compute_uninlined_call_time): Likewise.
8400 (compute_inlined_call_time): Likewise.
8401 (want_inline_small_function_p): Likewise.
8402 (edge_badness): Likewise.
8403 (update_caller_keys): Likewise.
8404 (update_callee_keys): Likewise.
8405 (inline_small_functions): Likewise.
8406 (inline_to_all_callers_1): Likewise.
8407 (dump_overall_stats): Likewise.
8408 (early_inline_small_functions): Likewise.
8409 (early_inliner): Likewise.
8410 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8411 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8412 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8413 * ipa-split.c (execute_split_functions): Likewise.
8414 * symbol-summary.h: Likewise.
8415 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8417 2018-06-19 Richard Biener <rguenther@suse.de>
8419 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8420 (vectorize_loops): ... here. Fix dbgcnt handling.
8421 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8423 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8426 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8427 ieee128 argument takes up only one (vector) register, not two (floating
8430 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8432 * gimplify.c (gimplify_init_constructor): Really never clear for an
8433 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8435 2018-06-19 Richard Biener <rguenther@suse.de>
8437 PR tree-optimization/86179
8438 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8439 after failed recognition.
8441 2018-06-18 Martin Sebor <msebor@redhat.com>
8444 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8445 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8446 Handle integer subtraction.
8447 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8448 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8450 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8452 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8453 param from rtx to rtx_insn *.
8454 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8456 (frv_ifcvt_modify_insn): Likwise.
8457 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8458 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8459 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8460 as_a <rtx_insn *> cast to local "unprotected_region" once
8461 it's been established that it's not NULL or pc_rtx.
8462 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8463 param "sethi" from rtx to rtx_insn *.
8464 (nds32_group_float_insns): Likewise for param "insn".
8465 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8467 (vax_output_int_subtract): Likewise.
8468 * config/vax/vax.c (vax_output_int_add): Likewise for param
8470 (vax_output_int_subtract): Likewise.
8471 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8472 (emit_pattern_after): Likewise for param "after".
8473 (emit_insn_after): Likewise.
8474 (emit_jump_insn_after): Likewise.
8475 (emit_call_insn_after): Likewise.
8476 (emit_debug_insn_after): Likewise.
8477 (emit_pattern_before): Likewise for param "before".
8478 (emit_insn_before): Likewise.
8479 (emit_jump_insn_before): Likewise.
8480 * final.c (get_insn_template): Likewise for param "insn", removing
8482 * output.h (get_insn_template): Likewise for 2nd param.
8483 * rtl.h (emit_insn_before): Likewise.
8484 (emit_jump_insn_before): Likewise.
8485 (emit_debug_insn_before_noloc): Likewise.
8486 (emit_insn_after): Likewise.
8487 (emit_jump_insn_after): Likewise.
8488 (emit_call_insn_after): Likewise.
8489 (emit_debug_insn_after): Likewise.
8490 (set_insn_deleted): Likewise for param.
8492 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8495 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8496 floating point modes, so that IFmode is numerically greater than
8497 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8498 to declare the ordering. This prevents IFmode from being
8499 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8500 machine. Include rs6000-modes.h to share the fractional values
8501 between genmodes* and the rest of the compiler.
8505 * config/rs6000/rs6000-modes.h: New file.
8506 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8507 meaning of rs6000_long_double_size so that 126..128 selects an
8508 appropriate 128-bit floating point type.
8509 (rs6000_option_override_internal): Likewise.
8510 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8511 (TARGET_LONG_DOUBLE_128): Change the meaning of
8512 rs6000_long_double_size so that 126..128 selects an appropriate
8513 128-bit floating point type.
8514 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8515 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8516 source and destination to match the standard usage.
8517 (truncifkf2): Likewise.
8518 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8519 ISA 2.07 to use an explicit clobber, instead of passing in a
8521 (copysign<mode>3_soft): Likewise.
8523 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8525 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8526 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8527 (vect_slp_analyze_instance_dependence): Likewise.
8528 (vect_enhance_data_refs_alignment): Likewise.
8529 (vect_analyze_data_refs_alignment): Likewise.
8530 (vect_slp_analyze_and_verify_instance_alignment
8531 (vect_analyze_data_ref_accesses): Likewise.
8532 (vect_prune_runtime_alias_test_list): Likewise.
8533 (vect_analyze_data_refs): Likewise.
8534 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8535 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8536 (vect_analyze_scalar_cycles_1): Likewise.
8537 (vect_get_loop_niters): Likewise.
8538 (vect_analyze_loop_form_1): Likewise.
8539 (vect_update_vf_for_slp): Likewise.
8540 (vect_analyze_loop_operations): Likewise.
8541 (vect_analyze_loop): Likewise.
8542 (vectorizable_induction): Likewise.
8543 (vect_transform_loop): Likewise.
8544 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8545 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8546 (vect_make_slp_decision): Likewise.
8547 (vect_detect_hybrid_slp): Likewise.
8548 (vect_slp_analyze_operations): Likewise.
8549 (vect_slp_bb): Likewise.
8550 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8551 (vectorizable_bswap): Likewise.
8552 (vectorizable_call): Likewise.
8553 (vectorizable_simd_clone_call): Likewise.
8554 (vectorizable_conversion): Likewise.
8555 (vectorizable_assignment): Likewise.
8556 (vectorizable_shift): Likewise.
8557 (vectorizable_operation): Likewise.
8558 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8560 2018-06-18 Martin Sebor <msebor@redhat.com>
8562 PR tree-optimization/81384
8563 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8564 * builtins.c (expand_builtin_strnlen): New function.
8565 (expand_builtin): Call it.
8566 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8567 * builtins.def (BUILT_IN_STRNLEN): New.
8568 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8569 Warn for bounds in excess of maximum object size.
8570 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8571 single-value ranges. Handle strnlen.
8572 (handle_builtin_strlen): Handle strnlen.
8573 (strlen_check_and_optimize_stmt): Same.
8574 * doc/extend.texi (Other Builtins): Document strnlen.
8576 2018-06-18 Maya Rashish <coypu@sdf.org>
8578 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8579 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8580 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8582 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8584 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8586 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8588 * tree.c (escaped_string::escape): Replace cast to char * by
8589 const_cast<char *> (unescaped).
8591 2018-06-18 Nick Clifton <nickc@redhat.com>
8594 * tree.c (escaped_string): New class. Converts an unescaped
8595 string into its escaped equivalent.
8596 (warn_deprecated_use): Use the new class to convert the
8597 deprecation message, if present.
8598 (test_escaped_strings): New self test.
8599 (test_c_tests): Add test_escaped_strings.
8600 * doc/extend.texi (deprecated): Add a note that the
8601 deprecation message is affected by the -fmessage-length
8602 option, and that control characters will be escaped.
8603 (#pragma GCC error): Document this pragma.
8604 (#pragma GCC warning): Likewise.
8605 * doc/invoke.texi (-fmessage-length): Document this option's
8606 effect on the #warning and #error preprocessor directives and
8607 the deprecated attribute.
8609 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8611 * tree.c (decl_value_expr_lookup): Revert latest change.
8612 (decl_value_expr_insert): Likewise.
8614 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8616 * gimplify.c (nonlocal_vlas): Delete.
8617 (nonlocal_vla_vars): Likewise.
8618 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8620 (gimplify_body): Do not create and destroy nonlocal_vlas.
8621 * tree-nested.c: Include diagnostic.h.
8622 (use_pointer_in_frame): Tweak.
8623 (lookup_field_for_decl): Add assertion and declare the transformation.
8624 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8625 internal error when the reference is in a wrong context. Do not
8626 create a debug decl by default.
8627 (note_nonlocal_block_vlas): Delete.
8628 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8629 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8630 create a debug decl by default.
8631 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8632 call is in a wrong context.
8633 (fixup_vla_decls): New function.
8634 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8635 debug variables were created.
8636 * tree.c (decl_value_expr_lookup): Add checking assertion.
8637 (decl_value_expr_insert): Likewise.
8639 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8642 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8643 * tree-scalar-evolution.c (interpret_expr): Likewise.
8644 (expression_expensive_p): Likewise.
8645 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8646 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8647 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8648 (ssa_defined_by_minus_one_stmt_p): New.
8650 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8653 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8654 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8655 * dojump.c (do_jump): Likewise.
8656 * expr.c (expand_expr_real_2): Check operand type's sign.
8657 * fold-const.c (const_unop): Handle ABSU_EXPR.
8658 (fold_abs_const): Likewise.
8659 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8660 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8661 (strip_sign_op_1): Likesise.
8662 * match.pd: Add new pattern to generate ABSU_EXPR.
8663 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8664 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8665 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8666 * tree-inline.c (estimate_operator_cost): Likewise.
8667 * tree-pretty-print.c (dump_generic_node): Likewise.
8668 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8669 * tree.def (ABSU_EXPR): New.
8671 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8674 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8675 documented as preserved for backward compatibility only.
8676 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8678 PR rtl-optimization/86108
8679 * bb-reorder.c (create_forwarder_block): Renamed to ...
8680 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8681 jump from new landing pad to the second part.
8682 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8685 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8688 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8689 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8690 Only call store_expr for halves if the mode is the same.
8693 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8694 Fix up comment formatting.
8696 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8698 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8699 (typed_splay_tree::closure,
8700 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8701 (typed_splay_tree::typed_splay_tree,
8702 typed_splay_tree::operator =): Declared private.
8703 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8704 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8705 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8706 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8707 typed_splay_tree::splay_tree_splay,
8708 typed_splay_tree::splay_tree_foreach_helper,
8709 typed_splay_tree::splay_tree_insert,
8710 typed_splay_tree::splay_tree_remove,
8711 typed_splay_tree::splay_tree_lookup,
8712 typed_splay_tree::splay_tree_predecessor,
8713 typed_splay_tree::splay_tree_successor,
8714 typed_splay_tree::splay_tree_min,
8715 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8716 (typed_splay_tree::root, typed_splay_tree::comp,
8717 typed_splay_tree::delete_key,
8718 typed_splay_tree::delete_value): New data members.
8719 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8720 typed_splay_tree::remove.
8722 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8724 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8725 -mginv and -mno-ginv to the assembler.
8726 * config/mips/mips.opt (-mcrc): New option.
8728 * doc/invoke.text (-mcrc): Document.
8731 2018-06-15 Nick Clifton <nickc@redhat.com>
8734 * tree.c (escaped_string): New class. Converts an unescaped
8735 string into its escaped equivalent.
8736 (warn_deprecated_use): Use the new class to convert the
8737 deprecation message, if present.
8738 (test_escaped_strings): New self test.
8739 (test_c_tests): Add test_escaped_strings.
8740 * doc/extend.texi (deprecated): Add a note that the
8741 deprecation message is affected by the -fmessage-length
8742 option, and that control characters will be escaped.
8743 (#pragma GCC error): Document this pragma.
8744 (#pragma GCC warning): Likewise.
8745 * doc/invoke.texi (-fmessage-length): Document this option's
8746 effect on the #warning and #error preprocessor directives and
8747 the deprecated attribute.
8749 2018-06-15 Richard Biener <rguenther@suse.de>
8751 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8752 here, also noting vector size used.
8753 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8754 size used in MSG_OPTIMIZED_LOCATIONS dump.
8755 (pass_slp_vectorize::execute): Adjust.
8757 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8760 * config/arc/arc.c (arc_return_address_register): Fix
8763 2018-06-15 Richard Biener <rguenther@suse.de>
8766 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8767 leave useless conversion stripping to force_gimple_operand_gsi.
8768 (gimplify_build2): Likewise.
8769 (gimplify_build1): Likewise.
8771 2018-06-15 Richard Biener <rguenther@suse.de>
8774 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8775 before adjusting their block.
8777 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8779 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8780 multilibs for *-*-rtems*.
8781 * config/riscv/t-rtems: New file.
8783 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8786 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8787 unsigned_type_for returns NULL.
8790 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8791 subregs of multi-word pseudos unless the float mode has word size.
8793 2018-06-14 Richard Biener <rguenther@suse.de>
8796 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8797 duplicate and harmful type_hash_canon.
8798 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8800 2018-06-14 Richard Biener <rguenther@suse.de>
8803 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8806 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8808 * config/rtems.h (STDINT_LONG32): Define.
8810 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8811 Prachi Godbole <prachi.godbole@imgtec.com>
8813 * config/mips/mips-cpus.def: Define P6600.
8814 * config/mips/mips-tables.opt: Regenerate.
8815 * config/mips/mips.c (mips_ucbranch_type): New enum.
8816 (mips_rtx_cost_data): Add support for P6600.
8817 (mips_issue_rate): Likewise.
8818 (mips_multipass_dfa_lookahead): Likewise.
8819 (mips_avoid_hazard): Likewise.
8820 (mips_reorg_process_insns): Likewise.
8821 (mips_classify_branch_p6600): New function.
8822 * config/mips/mips.h (TUNE_P6600): New define.
8823 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8824 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8825 * config/mips/mips.md: Include p6600.md.
8826 (processor): Add p6600.
8827 * config/mips/p6600.md: New file.
8828 * doc/invoke.texi: Add p6600 to supported architectures.
8830 2018-06-13 Martin Sebor <msebor@redhat.com>
8832 PR tree-optimization/86114
8833 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8835 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8837 2018-06-13 Richard Biener <rguenther@suse.de>
8839 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8840 Properly set vector type of the intermediate stmt.
8841 * tree-vect-stmts.c (vectorizable_operation): The destination
8842 var always has vectype_out type.
8844 2018-06-13 Jeff Law <law@redhat.com>
8846 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8847 integer 0 for argument to print_rtl_with_bb.
8848 (rl78_reorg): Likewise.
8850 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8852 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8853 from rtx to rtx_insn *.
8854 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8856 (add_sched_insns_for_speculation): Likewise for local "target",
8857 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8858 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8859 from rtx_insn ** to rtx_code_label **.
8860 (reorg_emit_nops): Likewise.
8861 (c6x_reorg): Likewise for local "call_labels".
8862 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8864 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8865 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8866 the loops over LABEL_REFS.
8867 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8869 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8870 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8871 (split_branches): Strengthen local "olabel" from rtx to
8872 rtx_insn *, adding a safe_as_a cast.
8873 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8875 (add_insn_after): Likewise for first two params.
8876 (add_insn_before): Likewise.
8877 (remove_insn): Likewise for param.
8878 (emit_pattern_before_noloc): Likewise for second and third params.
8879 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8880 (emit_call_insn_before_noloc): Likewise.
8881 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8883 (emit_barrier_before): Likewise.
8884 (emit_label_before): Strengthen "label" param from "rtx" to
8885 "rtx_code_label *". Strengthen "before" param from "rtx" to
8887 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8889 (emit_pattern_after_noloc): Likewise.
8890 (emit_insn_after_noloc): Likewise.
8891 (emit_jump_insn_after_noloc): Likewise.
8892 (emit_call_insn_after_noloc): Likewise.
8893 (emit_debug_insn_after_noloc): Likewise.
8894 (emit_barrier_after): Likewise.
8895 (emit_label_after): Likewise for both params.
8896 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8897 "loc" param from "int" to "location_t".
8898 (emit_insn_after_setloc): Likewise.
8899 (emit_jump_insn_after_setloc): Likewise.
8900 (emit_call_insn_after_setloc): Likewise.
8901 (emit_debug_insn_after_setloc): Likewise.
8902 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8903 "loc" param from "int" to "location_t".
8904 (emit_pattern_before): Convert NULL_RTX to NULL.
8905 (emit_insn_before_setloc): Convert "loc" param from "int" to
8907 (emit_jump_insn_before_setloc): Likewise.
8908 (emit_call_insn_before_setloc): Likewise.
8909 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8910 rtx_insn *. Convert "loc" param from "int" to "location_t".
8911 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8912 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8913 Convert 3rd param from "int" to "location_t".
8914 (emit_barrier_before, emit_barrier_after, next_real_insn):
8915 Strengthen param from rtx to rtx_insn *.
8916 (emit_label_before): Strengthen 1st param from "rtx" to
8917 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8919 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8920 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8921 Strengthen 2nd param from "rtx" to "rtx_insn *".
8922 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8923 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8924 Likewise. Convert 3rd param from "int" to "location_t".
8925 (emit_label_after): Strengthen 1st param from "rtx" to
8927 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8929 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8930 from "rtx" to "rtx_insn *".
8932 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8934 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8935 bodies streamed in with -Q.
8936 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8937 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8938 * gimple-streamer-out.c: Include gimple-pretty-print.h
8939 (output_bb): Dump stmts streamed.
8940 * lto-section-out.c: Include print-tree.h
8941 (lto_begin_section): Dump sections created.
8942 (lto_output_decl_index): Dump decl encoded.
8943 * lto-streamer-out.c: Include print-tree.h
8944 (create_output_block): Dump output block created.
8945 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8946 (output_function): Dump function output.
8947 (output_constructor): Dump constructor streamed.
8948 (write_global_stream): Output indexes encoded.
8949 (produce_asm_for_decls): Dump streams encoded.
8950 * lto-streamer.c (streamer_dump_file): New global var.
8951 * lto-streamer.h (streamer_dump_file): Declare.
8952 * passes.c (ipa_write_summaries): Initialize streamer dump.
8953 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8956 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8959 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8960 offsets for register save directives. Emit a second batch of save
8961 directives, if need be, when the function accesses prior frames.
8963 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8965 * config/arc/fpu.md (fmasf4): Force operand to register.
8966 (fnmasf4): Likewise.
8968 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8970 * config/arc/arc-protos.h (arc_pad_return): Remove.
8971 * config/arc/arc.c (machine_function): Remove force_short_suffix
8973 (arc_print_operand): Adjust printing of '&'.
8974 (arc_verify_short): Remove conditional printing of short suffix.
8975 (arc_final_prescan_insn): Remove reference to size_reason.
8976 (pad_return): New function.
8977 (arc_reorg): Call pad_return.
8978 (arc_pad_return): Remove.
8979 (arc_init_machine_status): Remove reference to force_short_suffix.
8980 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8981 (attr length): When attribute iscompact is true force to 2
8982 regardless; in the case of maybe check if we want to force the
8983 instruction to have 4 bytes length.
8984 (nopv): Change it to generate 4 byte long nop as well.
8985 (blockage): New pattern.
8986 (simple_return): Remove call to arc_pad_return.
8987 (p_return_i): Likewise.
8989 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8991 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8993 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8995 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8998 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9000 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9001 for ARC700 and ARCv2.
9003 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9006 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9007 operands[2] instead of operands[1].
9010 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9012 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9013 case, check whether the outer register overlaps an unallocatable
9014 register, not just whether it fits the required class.
9016 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9018 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9020 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9021 (memrefs_conflict_p): Likewise.
9022 (init_alias_analysis): Likewise.
9023 * cfgexpand.c (expand_debug_expr): Likewise.
9024 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9025 * cse.c (fold_rtx): Likewise.
9026 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9027 * expr.c (emit_block_move_hints): Likewise.
9028 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9029 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9030 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9031 (emit_group_store): Likewise.
9032 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9033 to read the PRE/POST_MODIFY increment.
9034 * calls.c (store_one_arg): Use strip_offset.
9035 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9037 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9039 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9040 (simplify_binary_operation_1): Extend CONST_INT handling to
9042 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9043 than a HOST_WIDE_INT.
9044 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9046 (adjust_mems, add_stores): Update accodingly.
9047 (vt_canonicalize_addr): Track polynomial offsets.
9048 (emit_note_insn_var_location): Likewise.
9049 (vt_add_function_parameter): Likewise.
9050 (vt_initialize): Likewise.
9052 2018-06-12 Jeff Law <law@redhat.com>
9054 * config.gcc (alpha*-*-freebsd*): Remove.
9055 * config/alpha/freebsd.h: Remove.
9057 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9060 * spellcheck-tree.c (levenshtein_distance): Rename to...
9061 (get_edit_distance): ...this, and update for underlying renaming.
9062 * spellcheck-tree.h (levenshtein_distance): Rename to...
9063 (get_edit_distance): ...this.
9064 * spellcheck.c (levenshtein_distance): Rename to...
9065 (get_edit_distance): ...this. Convert from Levenshtein distance
9066 to Damerau-Levenshtein distance by supporting transpositions of
9067 adjacent characters. Rename "v1" to "v_next" and "v0" to
9069 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9070 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9071 update for underlying renaming.
9072 (selftest::levenshtein_distance_unit_test): Rename to...
9073 (selftest::test_get_edit_distance_unit): ...this, and update for
9074 underlying renaming.
9075 (selftest::test_find_closest_string): Add example from PR 69968
9076 where transposition helps
9077 (selftest::test_metric_conditions): Update for renaming.
9078 (selftest::test_metric_conditions): Likewise.
9079 (selftest::spellcheck_c_tests): Likewise.
9080 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9081 (get_edit_distance): ...this.
9082 (best_match::consider): Update for renaming.
9084 2018-06-12 Martin Sebor <msebor@redhat.com>
9086 PR tree-optimization/85259
9087 * builtins.c (compute_objsize): Handle constant offsets.
9088 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9089 true iff a warning has been issued.
9090 * gimple.h (gimple_nonartificial_location): New function.
9091 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9092 gimple_nonartificial_location and handle -Wno-system-headers.
9093 (handle_builtin_stxncpy): Same.
9095 2018-06-12 Martin Sebor <msebor@redhat.com>
9098 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9100 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9102 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9103 BUILTIN_VEC_XST entries for pointer to double and long long.
9105 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9108 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9110 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9113 2018-06-12 Martin Liska <mliska@suse.cz>
9115 * doc/options.texi: Document IntegerRange.
9117 2018-06-12 Martin Liska <mliska@suse.cz>
9119 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9120 * opt-functions.awk: Handle Deprecated flag.
9121 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9123 (read_cmdline_option): Report warning for a deprecated option.
9124 * opts.h (struct cl_option): Add new field cl_deprecated.
9125 (CL_ERR_DEPRECATED): New.
9127 2018-06-12 Martin Liska <mliska@suse.cz>
9129 * doc/options.texi: Document Deprecated option flag.
9131 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9133 * config/arc/arc-arch.h (arc_extras): New enum.
9134 (arc_cpu_t):Add field extra.
9135 (arc_cpu_types): Consider the extras.
9136 * config/arc/arc-cpus.def: Add extras info.
9137 * config/arc/arc-opts.h (processor_type): Consider extra field.
9138 * config/arc/arc.c (arc_override_options): Handle extra field.
9140 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9142 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9143 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9145 * config/arc/arc.c (arc_init): Update pic warning.
9146 (irq_range): Update irq range parsing warnings.
9147 (arc_override_options): Update various warning messages.
9148 (arc_handle_aux_attribute): Likewise.
9150 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9152 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9154 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9156 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9157 compiler messages directives.
9159 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9161 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9162 * config/mips/mips-tables.opt: Regenerate.
9163 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9165 * doc/invoke.texi: Document -march=i6500.
9167 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9169 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9170 (i6400_gpmul): Add cpu_unit.
9171 (i6400_gpdiv): Likewise.
9172 (i6400_msa_add_d): Update reservations.
9173 (i6400_msa_int_add) Likewise.
9174 (i6400_msa_short_logic3) Likewise.
9175 (i6400_msa_short_logic2) Likewise.
9176 (i6400_msa_short_logic) Likewise.
9177 (i6400_msa_move) Likewise.
9178 (i6400_msa_cmp) Likewise.
9179 (i6400_msa_short_float2) Likewise.
9180 (i6400_msa_div_d) Likewise.
9181 (i6400_msa_long_logic1) Likewise.
9182 (i6400_msa_long_logic2) Likewise.
9183 (i6400_msa_mult) Likewise.
9184 (i6400_msa_long_float2) Likewise.
9185 (i6400_msa_long_float4) Likewise.
9186 (i6400_msa_long_float5) Likewise.
9187 (i6400_msa_long_float8) Likewise.
9188 (i6400_fpu_fadd): Include frint type.
9189 (i6400_fpu_store): New define_insn_reservation.
9190 (i6400_fpu_load): Likewise.
9191 (i6400_fpu_move): Likewise.
9192 (i6400_fpu_fcmp): Likewise.
9193 (i6400_fpu_fmadd): Likewise.
9194 (i6400_int_mult): Include imul3nc type and update reservation.
9195 (i6400_int_div): Include idiv3 type and update reservation.
9196 (i6400_int_load): Update to check type not move_type.
9197 (i6400_int_store): Likewise.
9198 (i6400_int_prefetch): Set zero latency.
9200 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9202 * gcc.c: Document new %@{...} sequence.
9203 (LINK_COMMAND_SPEC): Use it for the -L switches.
9204 (cpp_unique_options): Use it for the -I switches.
9205 (at_file_argbuf): New global variable.
9206 (in_at_file): Likewise.
9207 (alloc_args): Create at_file_argbuf.
9208 (clear_args): Truncate at_file_argbuf.
9209 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9210 (open_at_file): New function.
9211 (close_at_file): Likewise.
9212 (create_at_file): Delete.
9213 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9216 (validate_switches_from_spec): Deal with %@{...} sequence.
9217 (validate_switches): Likewise.
9218 (driver::finalize): Call clear_args.
9220 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9222 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9224 2018-06-11 Martin Sebor <msebor@redhat.com>
9226 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9227 (Wno-class-memaccess): Add @opindex.
9228 (Wno-templates, Wno-multiple-inheritance): Same.
9229 (Wno-virtual-inheritance, Wno-namespaces): Same.
9230 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9231 (Wno-format-overflow, Wno-format-truncation): Same.
9232 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9233 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9234 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9235 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9236 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9237 (Wno-misspelled-isr): Same.
9239 2018-06-11 Martin Sebor <msebor@redhat.com>
9241 * PR tree-optimization/86083
9242 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9244 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9246 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9248 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9251 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9252 on the correct operand.
9253 (*movdi_internal64): Ditto.
9255 2018-06-11 Martin Liska <mliska@suse.cz>
9257 PR tree-optimization/86089
9258 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9260 2018-06-11 Julia Koval <julia.koval@intel.com>
9262 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9263 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9264 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9266 2018-06-11 Olivier Hainque <hainque@adacore.com>
9268 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9269 for Ada with strict dwarf2.
9271 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9274 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9277 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9279 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9281 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9283 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9286 2018-06-08 Martin Liska <mliska@suse.cz>
9288 * tree-cfg.h (debug_function): Fix argument type to match
9291 2018-06-08 Martin Liska <mliska@suse.cz>
9293 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9294 Remove usage of MPX-related (and removed) fields.
9295 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9297 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9299 * cfg.c (debug): Use TDF_NONE rather than 0.
9300 * cfghooks.c (debug): Likewise.
9301 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9302 (struct dump_option_value_info): Convert to...
9303 (struct kv_pair): ...this template type.
9304 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9306 (optinfo_verbosity_options): Likewise.
9307 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9309 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9310 than int for "optgroup_flags" param.
9311 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9313 (dump_dec): Likewise.
9314 (dump_finish): Use TDF_NONE rather than 0.
9315 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9316 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9317 than 0. Update for change to option_ptr.
9318 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9319 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9320 0. Update for changes to optinfo_verbosity_options and
9322 (opt_info_switch_p): Convert optgroup_flags from int to
9324 (dump_basic_block): Use dump_flags_t rather than int
9325 for "dump_kind" param.
9326 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9327 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9328 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9329 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9330 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9331 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9332 TDF_NONE): Convert from macros to...
9333 (enum dump_flag): ...this new enum.
9334 (dump_flags_t): Update to use enum.
9335 (operator|, operator&, operator~, operator|=, operator&=):
9336 Implement for dump_flags_t.
9337 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9338 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9339 Convert from macros to...
9340 (enum optgroup_flag): ...this new enum.
9341 (optgroup_flags_t): New typedef.
9342 (operator|, operator|=): Implement for optgroup_flags_t.
9343 (struct dump_file_info): Convert field "alt_flags" to
9344 dump_flags_t. Convert field "optgroup_flags" to
9346 (dump_basic_block): Use dump_flags_t rather than int for param.
9347 (dump_generic_expr_loc): Likewise.
9348 (dump_dec): Likewise.
9349 (dump_register): Convert param "optgroup_flags" to
9351 (opt_info_enable_passes): Likewise.
9352 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9354 * gimple-pretty-print.c (debug): Likewise.
9355 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9356 (merged_store_group::apply_stores): Likewise.
9357 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9358 * gimple.c (verify_gimple_pp): Likewise.
9359 * graphite-poly.c (print_pbb_body): Likewise.
9360 * passes.c (pass_manager::register_one_dump_file): Convert
9361 local "optgroup_flags" to optgroup_flags_t.
9362 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9364 (debug_body): Likewise.
9365 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9366 to optgroup_flags_t.
9367 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9369 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9370 (convert_mult_to_fma): Likewise.
9371 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9372 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9373 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9374 "dump_kind" to dump_flags_t.
9376 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9378 * config/rs6000/rs6000.c (min, max): Delete.
9380 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9382 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9383 -mabi=spe and -mabi=no-spe.
9385 2018-06-08 Martin Liska <mliska@suse.cz>
9387 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9388 where we expect an existing summary.
9390 2018-06-08 Martin Liska <mliska@suse.cz>
9392 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9393 * ipa-inline.h (estimate_edge_growth): Likewise.
9395 2018-06-08 Martin Liska <mliska@suse.cz>
9397 * cgraph.c (function_version_hasher::hash): Use
9398 cgraph_node::get_uid ().
9399 (function_version_hasher::equal):
9400 * cgraph.h (cgraph_node::get_uid): New method.
9401 * ipa-inline.c (update_caller_keys): Use
9402 cgraph_node::get_uid ().
9403 (update_callee_keys): Likewise.
9404 * ipa-utils.c (searchc): Likewise.
9405 (ipa_reduced_postorder): Likewise.
9406 * lto-cgraph.c (input_node): Likewise.
9407 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9408 * symbol-summary.h (symtab_insertion): Likewise.
9409 (symtab_removal): Likewise.
9410 (symtab_duplication): Likewise.
9411 * tree-pretty-print.c (dump_function_header): Likewise.
9412 * tree-sra.c (convert_callers_for_node): Likewise.
9414 2018-06-08 Martin Liska <mliska@suse.cz>
9416 * cgraph.c (symbol_table::create_edge): Always assign a new
9418 (symbol_table::free_edge): Do not recycle numbers.
9419 * cgraph.h (cgraph_edge::get): New method.
9420 * symbol-summary.h (symtab_removal): Use it.
9421 (symtab_duplication): Likewise.
9422 (call_summary::hashable_uid): Remove.
9424 2018-06-08 Martin Liska <mliska@suse.cz>
9426 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9427 (initialize_growth_caches): Remove.
9428 (free_growth_caches): Likewise.
9429 (do_estimate_edge_time): Use edge_growth_cache.
9430 (do_estimate_edge_size): Likewise.
9431 (do_estimate_edge_hints): Likewise.
9432 * ipa-inline.c (reset_edge_caches): Likewise.
9433 (recursive_inlining): Likewise.
9434 (inline_small_functions): Likewise.
9435 * ipa-inline.h (initialize_growth_caches): Remove.
9436 (estimate_edge_size): Likewise.
9437 (estimate_edge_time): Likewise.
9438 (estimate_edge_hints): Likewise.
9439 (reset_edge_growth_cache): Likewise.
9440 * symbol-summary.h (call_summary::remove): New method.
9442 2018-06-08 Martin Liska <mliska@suse.cz>
9444 * ipa-cp.c (class edge_clone_summary): New summary.
9445 (grow_edge_clone_vectors): Remove.
9446 (ipcp_edge_duplication_hook): Remove.
9447 (class edge_clone_summary_t): New call_summary class.
9448 (ipcp_edge_removal_hook): Remove.
9449 (edge_clone_summary_t::duplicate): New function.
9450 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9451 (create_specialized_node): Likewise.
9452 (ipcp_driver): Initialize edge_clone_summaries and do not
9455 2018-06-08 Martin Liska <mliska@suse.cz>
9457 * symbol-summary.h (get): New function.
9458 (call_summary::m_initialize_when_cloning): New class member.
9460 2018-06-08 Martin Liska <mliska@suse.cz>
9462 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9463 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9464 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9465 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9466 (remove_cgraph_node_from_order): Use the removed_nodes set.
9467 (do_per_function_toporder): Likwise.
9468 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9469 instead of summary_uid.
9470 (symtab_removal): Likewise.
9471 (symtab_duplication): Likewise.
9473 2018-06-08 Martin Liska <mliska@suse.cz>
9475 * ipa-cp.c (ipcp_store_bits_results): Use
9476 ipcp_transformation_sum.
9477 (ipcp_store_vr_results): Likewise.
9478 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9480 (ipcp_transformation_initialize): ... this.
9481 (ipa_set_node_agg_value_chain):
9482 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9483 (write_ipcp_transformation_info): Likewise.
9484 (read_ipcp_transformation_info): Likewise.
9485 (ipcp_update_bits): Likewise.
9486 (ipcp_update_vr): Likewise.
9487 (ipcp_transform_function): Likewise.
9488 * ipa-prop.h: Rename ipcp_transformation_summary to
9489 ipcp_transformation.
9490 (class ipcp_transformation_t): New function summary.
9491 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9492 (ipa_get_agg_replacements_for_node): Likewise.
9494 2018-06-08 Martin Liska <mliska@suse.cz>
9496 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9498 (class funct_state_summary_t): New function_summary class.
9499 (has_function_state): Remove.
9500 (get_function_state): Likewise.
9501 (set_function_state): Likewise.
9502 (add_new_function): Likewise.
9503 (funct_state_summary_t::insert): New function.
9504 (duplicate_node_data): Remove.
9505 (remove_node_data): Remove.
9506 (funct_state_summary_t::duplicate): New function.
9507 (register_hooks): Create new funct_state_summaries.
9508 (pure_const_generate_summary): Use it.
9509 (pure_const_write_summary): Likewise.
9510 (pure_const_read_summary): Likewise.
9511 (propagate_pure_const): Likewise.
9512 (propagate_nothrow): Likewise.
9513 (dump_malloc_lattice): Likewise.
9514 (propagate_malloc): Likewise.
9515 (execute): Do not register hooks, just remove summary
9517 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9520 2018-06-08 Martin Liska <mliska@suse.cz>
9522 * ipa-reference.c (remove_node_data): Remove.
9523 (duplicate_node_data): Likewise.
9524 (class ipa_ref_var_info_summary_t): New class.
9525 (class ipa_ref_opt_summary_t): Likewise.
9526 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9527 (get_reference_optimization_summary): Use
9528 ipa_ref_opt_sum_summaries.
9529 (set_reference_vars_info): Remove.
9530 (set_reference_optimization_summary): Likewise.
9531 (ipa_init): Create summaries.
9532 (init_function_info): Use function summary.
9533 (ipa_ref_opt_summary_t::duplicate): New function.
9534 (ipa_ref_opt_summary_t::remove): New function.
9535 (get_read_write_all_from_node): Fix GNU coding style.
9536 (propagate): Use function summary.
9537 (write_node_summary_p): Fix GNU coding style.
9538 (stream_out_bitmap): Likewise.
9539 (ipa_reference_read_optimization_summary): Use function summary.
9540 (ipa_reference_c_finalize): Do not release hooks.
9542 2018-06-08 Martin Liska <mliska@suse.cz>
9544 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9545 (analyze_function_body): Extract multiple calls of get_create.
9546 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9547 * ipa-inline.c (recursive_inlining): Use ::get method.
9548 * ipa-inline.h (estimate_edge_growth): Likewise.
9550 2018-06-08 Martin Liska <mliska@suse.cz>
9552 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9554 (hsa_function_summary::hsa_function_summary): Use the new enum
9556 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9557 * hsa-gen.c (hsa_get_host_function): Likewise.
9558 (get_brig_function_name): Likewise.
9559 * ipa-hsa.c (process_hsa_functions): Likewise.
9560 (ipa_hsa_write_summary): Likewise.
9561 * symbol-summary.h (symtab_duplication): Use ::get function/
9562 (get): New function.
9564 2018-06-08 Martin Liska <mliska@suse.cz>
9566 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9568 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9569 (hsa_register_kernel): Likewise.
9570 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9571 * hsa-gen.c (hsa_get_host_function): Likewise.
9572 (get_brig_function_name): Likewise.
9573 (generate_hsa): Likewise.
9574 (pass_gen_hsail::execute): Likewise.
9575 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9576 (devirtualization_time_bonus): Likewise.
9577 (ipcp_propagate_stage): Likewise.
9578 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9579 (edge_set_predicate): Likewise.
9580 (evaluate_conditions_for_known_args): Likewise.
9581 (evaluate_properties_for_edge): Likewise.
9582 (ipa_fn_summary::reset): Likewise.
9583 (ipa_fn_summary_t::duplicate): Likewise.
9584 (dump_ipa_call_summary): Likewise.
9585 (ipa_dump_fn_summary): Likewise.
9586 (analyze_function_body): Likewise.
9587 (compute_fn_summary): Likewise.
9588 (estimate_edge_devirt_benefit): Likewise.
9589 (estimate_edge_size_and_time): Likewise.
9590 (estimate_calls_size_and_time): Likewise.
9591 (estimate_node_size_and_time): Likewise.
9592 (inline_update_callee_summaries): Likewise.
9593 (remap_edge_change_prob): Likewise.
9594 (remap_edge_summaries): Likewise.
9595 (ipa_merge_fn_summary_after_inlining): Likewise.
9596 (ipa_update_overall_fn_summary): Likewise.
9597 (read_ipa_call_summary): Likewise.
9598 (inline_read_section): Likewise.
9599 (write_ipa_call_summary): Likewise.
9600 (ipa_fn_summary_write): Likewise.
9601 (ipa_free_fn_summary): Likewise.
9602 * ipa-hsa.c (process_hsa_functions): Likewise.
9603 (ipa_hsa_write_summary): Likewise.
9604 (ipa_hsa_read_section): Likewise.
9605 * ipa-icf.c (sem_function::merge): Likewise.
9606 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9607 (do_estimate_edge_time): Likewise.
9608 (estimate_size_after_inlining): Likewise.
9609 (estimate_growth): Likewise.
9610 (growth_likely_positive): Likewise.
9611 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9612 (inline_call): Likewise.
9613 * ipa-inline.c (caller_growth_limits): Likewise.
9614 (can_inline_edge_p): Likewise.
9615 (can_inline_edge_by_limits_p): Likewise.
9616 (compute_uninlined_call_time): Likewise.
9617 (compute_inlined_call_time): Likewise.
9618 (want_inline_small_function_p): Likewise.
9619 (edge_badness): Likewise.
9620 (update_caller_keys): Likewise.
9621 (update_callee_keys): Likewise.
9622 (recursive_inlining): Likewise.
9623 (inline_small_functions): Likewise.
9624 (inline_to_all_callers_1): Likewise.
9625 (dump_overall_stats): Likewise.
9626 (early_inline_small_functions): Likewise.
9627 (early_inliner): Likewise.
9628 * ipa-inline.h (estimate_edge_growth): Likewise.
9629 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9630 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9631 * ipa-prop.h (IPA_NODE_REF): Likewise.
9632 (IPA_EDGE_REF): Likewise.
9633 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9634 (propagate_malloc): Likewise.
9635 * ipa-split.c (execute_split_functions): Likewise.
9636 * symbol-summary.h: Rename get to get_create.
9638 (get_create): Likewise.
9639 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9641 2018-06-08 Martin Liska <mliska@suse.cz>
9643 * symbol-summary.h (release): Move definition out of class
9645 (symtab_removal): Likewise.
9646 (symtab_duplication): Likewise.
9648 2018-06-08 Martin Liska <mliska@suse.cz>
9650 * symbol-summary.h (function_summary): Move constructor
9651 implementation out of class declaration.
9652 (release): Likewise.
9653 (symtab_insertion): Likewise.
9654 (symtab_removal): Likewise.
9655 (symtab_duplication): Likewise.
9658 2018-06-08 Martin Liska <mliska@suse.cz>
9660 * Makefile.in: Remove support for MPX (macros, related functions,
9661 fields in cgraph_node, ...).
9662 * builtin-types.def (BT_BND): Likewise.
9663 (BT_FN_BND_CONST_PTR): Likewise.
9664 (BT_FN_CONST_PTR_BND): Likewise.
9665 (BT_FN_VOID_PTR_BND): Likewise.
9666 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9667 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9668 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9669 (expand_builtin_mempcpy_with_bounds): Likewise.
9670 (expand_builtin_memset_with_bounds): Likewise.
9671 (expand_builtin_memset_args): Likewise.
9672 (std_expand_builtin_va_start): Likewise.
9673 (expand_builtin): Likewise.
9674 (expand_builtin_with_bounds): Likewise.
9675 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9676 (DEF_LIB_BUILTIN_CHKP): Likewise.
9677 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9678 (DEF_CHKP_BUILTIN): Likewise.
9679 (BUILT_IN_MEMCPY): Likewise.
9680 (BUILT_IN_MEMMOVE): Likewise.
9681 (BUILT_IN_MEMPCPY): Likewise.
9682 (BUILT_IN_MEMSET): Likewise.
9683 (BUILT_IN_STPCPY): Likewise.
9684 (BUILT_IN_STRCAT): Likewise.
9685 (BUILT_IN_STRCHR): Likewise.
9686 (BUILT_IN_STRCPY): Likewise.
9687 (BUILT_IN_STRLEN): Likewise.
9688 (BUILT_IN_MEMCPY_CHK): Likewise.
9689 (BUILT_IN_MEMMOVE_CHK): Likewise.
9690 (BUILT_IN_MEMPCPY_CHK): Likewise.
9691 (BUILT_IN_MEMSET_CHK): Likewise.
9692 (BUILT_IN_STPCPY_CHK): Likewise.
9693 (BUILT_IN_STRCAT_CHK): Likewise.
9694 (BUILT_IN_STRCPY_CHK): Likewise.
9695 * calls.c (store_bounds): Likewise.
9696 (emit_call_1): Likewise.
9697 (special_function_p): Likewise.
9698 (maybe_warn_nonstring_arg): Likewise.
9699 (initialize_argument_information): Likewise.
9700 (finalize_must_preallocate): Likewise.
9701 (compute_argument_addresses): Likewise.
9702 (expand_call): Likewise.
9703 * cfgexpand.c (expand_call_stmt): Likewise.
9704 (expand_return): Likewise.
9705 (expand_gimple_stmt_1): Likewise.
9706 (pass_expand::execute): Likewise.
9707 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9708 (cgraph_node::remove): Likewise.
9709 (cgraph_node::dump): Likewise.
9710 (cgraph_node::verify_node): Likewise.
9711 * cgraph.h (chkp_function_instrumented_p): Likewise.
9712 (symtab_node::get_alias_target): Likewise.
9713 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9714 (cgraph_local_p): Likewise.
9715 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9716 (cgraph_edge::rebuild_references): Likewise.
9717 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9718 (walk_polymorphic_call_targets): Likewise.
9719 (cgraph_node::expand_thunk): Likewise.
9720 (symbol_table::output_weakrefs): Likewise.
9721 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9722 (ix86_handle_option): Likewise.
9723 * config/i386/constraints.md: Likewise.
9724 * config/i386/i386-builtin-types.def (BND): Likewise.
9728 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9729 (BDESC_FIRST): Likewise.
9731 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9732 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9733 * config/i386/i386.c (enum reg_class): Likewise.
9734 (ix86_target_string): Likewise.
9735 (ix86_option_override_internal): Likewise.
9736 (ix86_conditional_register_usage): Likewise.
9737 (ix86_valid_target_attribute_inner_p): Likewise.
9738 (ix86_set_indirect_branch_type): Likewise.
9739 (ix86_set_current_function): Likewise.
9740 (ix86_function_arg_regno_p): Likewise.
9741 (init_cumulative_args): Likewise.
9742 (ix86_function_arg_advance): Likewise.
9743 (ix86_function_arg): Likewise.
9744 (ix86_pass_by_reference): Likewise.
9745 (ix86_function_value_regno_p): Likewise.
9746 (ix86_function_value_1): Likewise.
9747 (ix86_function_value_bounds): Likewise.
9748 (ix86_return_in_memory): Likewise.
9749 (ix86_setup_incoming_vararg_bounds): Likewise.
9750 (ix86_va_start): Likewise.
9751 (indirect_thunk_need_prefix): Likewise.
9752 (print_reg): Likewise.
9753 (ix86_print_operand): Likewise.
9754 (ix86_expand_call): Likewise.
9755 (ix86_output_function_return): Likewise.
9756 (reg_encoded_number): Likewise.
9757 (BDESC_VERIFYS): Likewise.
9758 (ix86_init_mpx_builtins): Likewise.
9759 (ix86_init_builtins): Likewise.
9760 (ix86_emit_cmove): Likewise.
9761 (ix86_emit_move_max): Likewise.
9762 (ix86_expand_builtin): Likewise.
9763 (ix86_builtin_mpx_function): Likewise.
9764 (ix86_get_arg_address_for_bt): Likewise.
9765 (ix86_load_bounds): Likewise.
9766 (ix86_store_bounds): Likewise.
9767 (ix86_load_returned_bounds): Likewise.
9768 (ix86_store_returned_bounds): Likewise.
9769 (ix86_class_likely_spilled_p): Likewise.
9770 (ix86_hard_regno_mode_ok): Likewise.
9771 (x86_order_regs_for_local_alloc): Likewise.
9772 (ix86_mitigate_rop): Likewise.
9773 (ix86_bnd_prefixed_insn_p): Likewise.
9774 (ix86_mpx_bound_mode): Likewise.
9775 (ix86_make_bounds_constant): Likewise.
9776 (ix86_initialize_bounds): Likewise.
9777 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9778 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9779 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9780 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9781 (TARGET_CHKP_BOUND_MODE): Likewise.
9782 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9783 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9784 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9785 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9786 * config/i386/i386.h (TARGET_MPX): Likewise.
9787 (TARGET_MPX_P): Likewise.
9788 (VALID_BND_REG_MODE): Likewise.
9789 (FIRST_BND_REG): Likewise.
9790 (LAST_BND_REG): Likewise.
9791 (enum reg_class): Likewise.
9792 (BND_REG_P): Likewise.
9793 (BND_REGNO_P): Likewise.
9794 (BNDmode): Likewise.
9795 (ADJUST_INSN_LENGTH): Likewise.
9796 * config/i386/i386.md: Likewise.
9797 * config/i386/i386.opt: Likewise.
9798 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9799 (defined): Likewise.
9800 (LINK_MPX): Likewise.
9801 (MPX_SPEC): Likewise.
9802 (LIBMPX_SPEC): Likewise.
9803 (LIBMPXWRAPPERS_SPEC): Likewise.
9804 (CHKP_SPEC): Likewise.
9805 * config/i386/predicates.md: Likewise.
9806 * dbxout.c (dbxout_type): Likewise.
9807 * doc/extend.texi: Likewise.
9808 * doc/invoke.texi: Likewise.
9809 * doc/md.texi: Likewise.
9810 * doc/tm.texi: Likewise.
9811 * doc/tm.texi.in: Likewise.
9812 * dwarf2out.c (is_base_type): Likewise.
9813 (gen_formal_types_die): Likewise.
9814 (gen_subprogram_die): Likewise.
9815 (gen_type_die_with_usage): Likewise.
9816 (gen_decl_die): Likewise.
9817 (dwarf2out_late_global_decl): Likewise.
9818 * expr.c (expand_assignment): Likewise.
9819 (emit_storent_insn): Likewise.
9820 (store_expr_with_bounds): Likewise.
9821 (store_expr): Likewise.
9822 (expand_expr_real_1): Likewise.
9823 * expr.h (store_expr_with_bounds): Likewise.
9824 * function.c (use_register_for_decl): Likewise.
9825 (struct bounds_parm_data): Likewise.
9826 (assign_parms_augmented_arg_list): Likewise.
9827 (assign_parm_find_entry_rtl): Likewise.
9828 (assign_parm_is_stack_parm): Likewise.
9829 (assign_parm_load_bounds): Likewise.
9830 (assign_bounds): Likewise.
9831 (assign_parms): Likewise.
9832 (expand_function_start): Likewise.
9833 * gcc.c (CHKP_SPEC): Likewise.
9834 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9835 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9836 (wrestrict_dom_walker::check_call): Likewise.
9837 * gimple.c (gimple_build_call_from_tree): Likewise.
9838 * gimple.h (enum gf_mask): Likewise.
9839 (gimple_call_with_bounds_p): Likewise.
9840 (gimple_call_set_with_bounds): Likewise.
9841 * gimplify.c (gimplify_init_constructor): Likewise.
9842 * ipa-cp.c (initialize_node_lattices): Likewise.
9843 (propagate_constants_across_call): Likewise.
9844 (find_more_scalar_values_for_callers_subset): Likewise.
9845 * ipa-hsa.c (process_hsa_functions): Likewise.
9846 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9847 * ipa-icf.c (sem_function::merge): Likewise.
9848 * ipa-inline.c (early_inliner): Likewise.
9849 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9850 (warn_function_cold): Likewise.
9851 (propagate_pure_const): Likewise.
9852 * ipa-ref.h (enum GTY): Likewise.
9853 * ipa-split.c (find_retbnd): Likewise.
9854 (consider_split): Likewise.
9855 (split_function): Likewise.
9856 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9857 * ipa.c (walk_polymorphic_call_targets): Likewise.
9858 (symbol_table::remove_unreachable_nodes): Likewise.
9859 (process_references): Likewise.
9860 (cgraph_build_static_cdtor_1): Likewise.
9861 * lto-cgraph.c (lto_output_node): Likewise.
9862 (output_refs): Likewise.
9863 (compute_ltrans_boundary): Likewise.
9864 (input_overwrite_node): Likewise.
9865 (input_node): Likewise.
9866 (input_cgraph_1): Likewise.
9867 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9868 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9869 (class pass_chkp_instrumentation_passes): Likewise.
9870 (make_pass_chkp_instrumentation_passes): Likewise.
9871 * passes.def: Likewise.
9872 * rtl.h (struct GTY): Likewise.
9873 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9874 * stor-layout.c (layout_type): Likewise.
9875 * symtab.c: Likewise.
9876 * target.def: Likewise.
9877 * targhooks.c (default_chkp_bound_type): Likewise.
9878 (default_chkp_bound_mode): Likewise.
9879 (default_builtin_chkp_function): Likewise.
9880 (default_chkp_function_value_bounds): Likewise.
9881 (default_chkp_make_bounds_constant): Likewise.
9882 (default_chkp_initialize_bounds): Likewise.
9883 * targhooks.h (default_chkp_bound_type): Likewise.
9884 (default_chkp_bound_mode): Likewise.
9885 (default_builtin_chkp_function): Likewise.
9886 (default_chkp_function_value_bounds): Likewise.
9887 (default_chkp_make_bounds_constant): Likewise.
9888 (default_chkp_initialize_bounds): Likewise.
9889 * toplev.c (compile_file): Likewise.
9890 (process_options): Likewise.
9891 * tree-core.h (DEF_BUILTIN): Likewise.
9892 (DEF_BUILTIN_CHKP): Likewise.
9893 * tree-inline.c (declare_return_variable): Likewise.
9894 (remap_gimple_stmt): Likewise.
9895 (copy_bb): Likewise.
9896 (initialize_inlined_parameters): Likewise.
9897 (expand_call_inline): Likewise.
9898 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9899 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9900 (make_pass_ipa_chkp_produce_thunks): Likewise.
9901 (make_pass_chkp): Likewise.
9902 (make_pass_chkp_opt): Likewise.
9903 (make_pass_chkp_instrumentation_passes): Likewise.
9904 * tree-pretty-print.c (dump_generic_node): Likewise.
9905 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9906 * tree-ssa-dce.c (propagate_necessity): Likewise.
9907 (eliminate_unnecessary_stmts): Likewise.
9908 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9909 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9910 * tree-ssa-sccvn.h: Likewise.
9911 * tree-ssa-strlen.c (get_string_length): Likewise.
9912 (valid_builtin_call): Likewise.
9913 (adjust_last_stmt): Likewise.
9914 (handle_builtin_strchr): Likewise.
9915 (handle_builtin_strcpy): Likewise.
9916 (handle_builtin_stxncpy): Likewise.
9917 (handle_builtin_memcpy): Likewise.
9918 (handle_builtin_strcat): Likewise.
9919 (strlen_check_and_optimize_stmt): Likewise.
9920 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9921 * tree-streamer-in.c: Likewise.
9922 * tree-streamer.c (record_common_node): Likewise.
9923 * tree.c (tree_code_size): Likewise.
9924 (wide_int_to_tree_1): Likewise.
9925 (type_contains_placeholder_1): Likewise.
9926 (build_common_tree_nodes): Likewise.
9927 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9928 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9929 (POINTER_BOUNDS_P): Likewise.
9930 (BOUNDED_TYPE_P): Likewise.
9931 (BOUNDED_P): Likewise.
9932 (CALL_WITH_BOUNDS_P): Likewise.
9933 (pointer_bounds_type_node): Likewise.
9934 * value-prof.c (gimple_ic): Likewise.
9935 * var-tracking.c (vt_add_function_parameters): Likewise.
9936 * varasm.c (make_decl_rtl): Likewise.
9937 (assemble_start_function): Likewise.
9938 (output_constant): Likewise.
9939 (maybe_assemble_visibility): Likewise.
9940 * varpool.c (ctor_for_folding): Likewise.
9941 * chkp-builtins.def: Remove.
9942 * ipa-chkp.c: Remove.
9943 * ipa-chkp.h: Remove.
9944 * rtl-chkp.c: Remove.
9945 * rtl-chkp.h: Remove.
9946 * tree-chkp-opt.c: Remove.
9947 * tree-chkp.c: Remove.
9948 * tree-chkp.h: Remove.
9950 2018-06-07 Carl Love <cel@us.ibm.com>
9952 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9953 vextract_fp_from_shortl): Add BE support.
9955 2018-06-07 Paul Koning <ni1d@arrl.net>
9957 * compare-elim.c (try_merge_compare): Don't merge compare if
9958 address contains a side effect.
9959 (try_eliminate_compare): Likewise.
9961 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9963 * config.gcc: Support "tremont".
9964 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9965 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9967 * config/i386/i386.c (m_TREMONT): Define.
9968 (processor_target_table): Add "tremont".
9969 (PTA_TREMONT): Define.
9970 (ix86_lea_outperforms): Add TARGET_TREMONT.
9971 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9972 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9973 and M_INTEL_GOLDMONT_PLUS.
9974 (fold_builtin_cpu): Add "tremont".
9975 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9976 (ix86_option_override_internal): Add "tremont".
9977 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9978 (processor_type): Add PROCESSOR_TREMONT.
9979 * config/i386/x86-tune.def: Add m_TREMONT.
9980 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9982 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9984 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9985 symbol defined for msp430i* devices to be lower case.
9987 2018-06-07 Richard Biener <rguenther@suse.de>
9989 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9990 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9991 Properly wrap signed arithmetic if overflow wraps.
9993 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9995 PR tree-optimization/69615
9996 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9997 of a cast from a same precision integral SSA_NAME in a bb dominated
9998 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9999 cast to utype if rhs2 has already a compatible type.
10001 2018-06-07 Richard Biener <rguenther@suse.de>
10003 PR tree-optimization/85935
10004 * graphite-scop-detection.c (find_params_in_bb): Analyze
10005 condition operands with respect to the correct loop. Assert
10006 the analysis doesn't fail.
10008 2018-06-04 Carl Love <cel@us.ibm.com>
10010 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10011 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10012 as it is slightly cheaper.
10013 (first_match_or_eos_index_<mode>):
10014 Calculate index using natural element order.
10015 (first_match_index_<mode>):
10016 Calculate index using natural element order.
10017 (first_match_or_eos_index_<mode>):
10018 Calculate index using natural order.
10019 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10020 for BE and LE modes.
10021 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10022 P9V_BUILTIN_VCLZLSBB_V16QI.
10023 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10026 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10028 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10029 indentation and line wrap for many prototypes. Add missing
10030 @smallexample directives around block of prototypes for vec_xl and
10033 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10035 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10036 track if we pass or return IEEE 128-bit floating point.
10037 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10038 C++ mangling that is compatible with GCC 8.1.
10039 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10040 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10041 floating point types.
10042 (rs6000_function_arg_advance_1): Likewise.
10043 (rs6000_mangle_type): Optionally generate mangled names that match
10044 what GCC 8.1 generated for IEEE 128-bit floating point types.
10045 (rs6000_globalize_decl_name): If we have an external function that
10046 passes or returns IEEE 128-bit types, generate a weak reference
10047 from the mangled name used in GCC 8.1 to the current mangled
10049 (rs6000_init_builtins): Make __ibm128 use the long double type if
10050 long double is IBM extended double. Make __float128 use the long
10051 double type if long double is IEEE 128-bit.
10054 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10055 macro for __ibm128 built-in functions.
10056 (PACK_IF): Add __ibm128 pack/unpack functions.
10057 (UNPACK_IF): Likewise.
10058 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10059 enable long double built-in functions if long double is IEEE
10060 128-bit floating point.
10061 (rs6000_invalid_builtin): Update long double built-in function
10063 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10064 functions, adjust the built-in function to use the long double
10065 built-in function if __ibm128 and long double are the same type.
10066 * doc/extend.texi (PowerPC builtins): Update documention for
10067 __builtin_{,un}pack_longdouble. Add documentation for
10068 __builtin_{,un}pack_ibm128.
10070 2018-06-06 Jim Wilson <jimw@sifive.com>
10072 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10073 (struct machine_function): New field interrupt_mode.
10074 (riscv_handle_type_attribute): New function. Add forward declaration.
10075 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10076 (riscv_expand_epilogue): Check interrupt_mode field.
10077 (riscv_set_current_function): Check interrupt attribute args and
10078 set interrupt_mode field.
10079 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10080 (riscv_sret, riscv_uret): New.
10081 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10082 new arguments to interrupt attribute.
10084 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10087 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10088 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10090 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10092 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10093 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10094 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10095 several redundant entries.
10097 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10099 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10100 type from "rtx" to "rtx_insn *".
10101 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10102 for local "call_insn", removing cast.
10103 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10105 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10107 PR tree-optimization/86066
10108 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10109 for BIT_INSERT_EXPR stores.
10111 2018-06-06 Richard Biener <rguenther@suse.de>
10113 PR tree-optimization/86062
10114 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10115 component refs ontop
10116 of to be offsetted base.
10118 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10120 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10121 to be static and remove check on interrupt attribute name.
10123 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10125 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10126 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10128 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10131 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10133 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10134 Remove second argument, change how error is called.
10135 (aarch64_layout_arg): Remove second argument from
10136 aarch64_err_no_fpadvsimd call.
10137 (aarch64_init_cumulative_args): Ditto.
10138 (aarch64_gimplify_va_arg_expr): Ditto.
10139 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10141 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10143 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10144 (*simple_return_indirect_internal<mode>): Rename from
10145 simple_return_indirect_internal. Use W mode iterator.
10146 (rstorssp): New expander.
10147 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10148 (clrssbsy): New expander.
10149 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10151 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10153 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10155 (cmse_check_pointed_object): Likewise.
10157 2018-06-05 Martin Liska <mliska@suse.cz>
10159 PR gcov-profile/47618
10160 * doc/invoke.texi: Document how -fprofile-dir format
10163 2018-06-05 Richard Biener <rguenther@suse.de>
10165 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10166 removal pretend DOM info isn't available so we do not update
10167 it and only remove edges, not dominated blocks. Actually free
10168 DOM info in case we removed something. Remove unreachable blocks.
10169 (mfb_keep_latches): Work with either DOM info or marked backedges.
10170 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10171 first. Mark backedges if DOM info isn't available.
10172 (Re-)compute DOM info after cleanup_control_flow_pre.
10174 2018-06-05 Richard Biener <rguenther@suse.de>
10176 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10177 (locus_discrim_hasher::hash): Adjust.
10178 (locus_discrim_hasher::equal): Likewise.
10179 (next_discriminator_for_locus): Work on line directly.
10180 (same_line_p): Pass in expanded locus1 as well.
10181 (assign_discriminators): Avoid redundant location expansions.
10183 2018-06-05 Richard Biener <rguenther@suse.de>
10185 PR tree-optimization/86046
10186 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10187 if required after clearing TREE_ADDRESSABLE.
10189 2018-06-05 Richard Biener <rguenther@suse.de>
10191 PR tree-optimization/86047
10192 * tree-ssa-loop.c (for_each_index): Glob handling of all
10193 decls and constants and really handle all of them.
10195 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10198 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10199 qualifier_void_pointer and qualifier_const_void_pointer.
10200 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10201 (arm_init_builtins): Handle the above.
10202 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10203 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10204 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10207 2018-06-05 Martin Liska <mliska@suse.cz>
10209 * auto-profile.c (read_autofdo_file): Do not use
10210 gcov_ctr_summary struct.
10211 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10212 * coverage.c (struct counts_entry): Likewise.
10213 (read_counts_file): Read just single summary entry.
10214 (get_coverage_counts): Use gcov_summary struct.
10215 * coverage.h (get_coverage_counts): Likewise.
10216 * gcov-dump.c (dump_working_sets): Likewise.
10217 (tag_summary): Dump just single summary.
10218 * gcov-io.c (gcov_write_summary): Write just histogram
10220 (gcov_read_summary): Read just single summary.
10221 (compute_working_sets): Use gcov_summary struct.
10222 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10223 of GCOV_COUNTERS_SUMMABLE.
10224 (GCOV_COUNTERS_SUMMABLE): Remove.
10225 (GCOV_FIRST_VALUE_COUNTER): Replace with
10226 GCOV_COUNTER_V_INTERVAL.
10227 (struct gcov_ctr_summary): Remove.
10228 (struct gcov_summary): Directly use fields of former
10230 (compute_working_sets): Use gcov_summary struct.
10231 * gcov.c (read_count_file): Do not use ctrs fields.
10232 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10234 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10236 * profile.c: Likewise.
10237 * profile.h: Likewise.
10239 2018-06-05 Martin Liska <mliska@suse.cz>
10241 PR gcov-profile/84846
10242 * gcov.c (output_lines): Print working directory only
10243 in intermediate format.
10245 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10247 * config/s390/s390-builtin-types.def: Add void function type.
10248 * config/s390/s390-builtins.def: Use the function type for the
10251 2018-06-04 Jim Wilson <jimw@sifive.com>
10253 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10255 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10256 and maybe_eh_return. Change regno to unsigned int. Use new args to
10257 handle EH_RETURN_DATA_REGNO registers properly.
10258 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10259 (riscv_expand_epilogue): Update comment. Change argument name and
10260 type. Update code to use new name and type. Pass new args to
10261 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10263 * config/riscv/riscv.md (NORMAL_RETURN): New.
10264 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10265 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10266 (eh_return): Call gen_eh_return_internal and emit barrier.
10267 (eh_return_internal): Call riscv_expand_epilogue.
10269 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10271 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10272 bit_insertion field and declare can_be_merged_into method.
10273 (merged_store_group::can_be_merged_into): New method.
10274 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10275 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10276 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10278 2018-06-04 Richard Biener <rguenther@suse.de>
10280 PR tree-optimization/85955
10281 * builtins.c (fold_builtin_sincos): Convert pointers to
10282 destination to appropriate type before dereferencing.
10284 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10286 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10288 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10290 * expr.c (expand_expr_real_1): Force the operand into memory if
10291 its TYPE_MODE is BLKmode and if there is no integer mode for
10292 the number of bits being extracted.
10294 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10298 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10299 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10301 2018-06-04 Richard Biener <rguenther@suse.de>
10303 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10304 (cleanup_tree_cfg_noloop): ... single caller. Do
10305 start_recording_case_labels later.
10307 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10309 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10310 to _IMMINTRIN_H_INCLUDED.
10311 * config/i386/pconfigintrin.h: Ditto.
10312 * config/i386/waitpkgintrin.h: Ditto.
10313 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10314 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10315 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10316 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10317 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10318 waitpkgintrin.h and cldemoteintrin.h.
10320 2018-06-04 Richard Biener <rguenther@suse.de>
10322 PR tree-optimization/86038
10323 * tracer.c (find_best_successor): Check probability for
10324 being initialized, bail out if not.
10326 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10329 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10330 of bits to ignore when comparing architectures.
10332 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10334 PR tree-optimization/69615
10335 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10336 maximum or minimum of the type, try to merge it also as if
10337 range1 is + [-, x - 1] or + [x + 1, -].
10340 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10342 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10344 PR tree-optimization/86034
10345 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10346 the unsigned bitfield type in a bit insertion sequence if it does not
10347 have a larger precision than the bitfield size.
10348 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10350 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10352 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10354 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10356 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10357 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10358 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10359 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10361 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10363 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10364 Disable -fdelete-null-pointer-checks for ELF toolchain.
10366 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10367 Kito Cheng <kito.cheng@gmail.com>
10369 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10370 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10371 (nds32*-*-*): Add glibc and uclibc conditions.
10372 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10373 (TARGET_EXCEPT_UNWIND_INFO): Define.
10374 * config/nds32/elf.h: New file.
10375 * config/nds32/linux.h: New file.
10376 * config/nds32/nds32-elf.opt: New file.
10377 * config/nds32/nds32-linux.opt: New file.
10378 * config/nds32/nds32-fp-as-gp.c
10379 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10380 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10382 (nds32_asm_file_end): Ditto.
10383 (nds32_print_operand): Ditto.
10384 (nds32_insert_attributes): Ditto.
10385 (nds32_init_libfuncs): New function.
10386 (TARGET_HAVE_TLS): Define.
10387 (TARGET_INIT_LIBFUNCS): Define.
10388 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10390 (TARGET_ELF): Apply different mcmodel setting.
10391 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10392 been migrated into elf.h and linux.h files.
10393 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10394 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10395 (mcmodel): The content has been migrated into nds32-elf.opt and
10396 nds32-linux.opt files.
10397 * config/nds32/t-elf: New file.
10398 * config/nds32/t-linux: New file.
10400 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10401 Shiva Chen <shiva0217@gmail.com>
10403 * config/nds32/constants.md (unspec_volatile_element): Add
10404 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10405 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10407 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10408 (make_pass_nds32_fp_as_gp): Declare.
10409 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10411 (nds32_asm_function_end_prologue): Remove unused asm output.
10412 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10413 (nds32_asm_file_start): Output necessary fp_as_gp information.
10414 (nds32_option_override): Adjust register usage.
10415 (nds32_expand_prologue): Consider fp_as_gp situation.
10416 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10417 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10420 (simple_return): Ditto.
10421 (omit_fp_begin): Output special directive for fp_as_gp.
10422 (omit_fp_end): Output special directive for fp_as_gp.
10423 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10424 mforbid-fp-as-gp): New options.
10426 2018-06-01 Mark Wielaard <mark@klomp.org>
10428 * dwarf2out.c (dwarf2out_finish): Remove generation of
10429 DW_AT_loclists_base.
10431 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10433 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10434 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10435 (struct merged_store_group): Add bit_insertion field.
10436 (dump_char_array): Use standard hexadecimal format.
10437 (merged_store_group::merged_store_group): Set bit_insertion to false.
10438 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10439 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10440 also print the mask in the dump file.
10441 (pass_store_merging::gate): Minor tweak.
10442 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10443 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10444 stores with INTEGER_CST stores.
10445 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10446 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10447 and use it throughout. Generate bit insertion sequences if need be.
10448 (pass_store_merging::process_store): Remove redundant condition.
10449 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10451 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10453 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10454 the 128-bit floating point types. Fix function comment.
10456 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10458 * config/aarch64/aarch64-simd.md
10459 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10461 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10464 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10466 PR tree-optimization/85989
10467 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10469 (backprop::intersect_uses): Check it when deciding whether this
10470 is a backedge reference.
10471 (backprop::process_block): Add each phi to m_visited_phis
10472 after visiting it, then clear it at the end.
10474 2018-06-01 Richard Biener <rguenther@suse.de>
10476 * tree-vectorizer.h (vect_dr_stmt): New function.
10477 (vect_get_load_cost): Adjust.
10478 (vect_get_store_cost): Likewise.
10479 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10480 Use vect_dr_stmt instead of DR_SMTT.
10481 (vect_record_base_alignments): Likewise.
10482 (vect_calculate_target_alignment): Likewise.
10483 (vect_compute_data_ref_alignment): Likewise and make static.
10484 (vect_update_misalignment_for_peel): Likewise.
10485 (vect_verify_datarefs_alignment): Likewise.
10486 (vector_alignment_reachable_p): Likewise.
10487 (vect_get_data_access_cost): Likewise. Pass down
10488 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10489 (vect_get_peeling_costs_all_drs): Likewise.
10490 (vect_peeling_hash_get_lowest_cost): Likewise.
10491 (vect_enhance_data_refs_alignment): Likewise.
10492 (vect_find_same_alignment_drs): Likewise.
10493 (vect_analyze_data_refs_alignment): Likewise.
10494 (vect_analyze_group_access_1): Likewise.
10495 (vect_analyze_group_access): Likewise.
10496 (vect_analyze_data_ref_access): Likewise.
10497 (vect_analyze_data_ref_accesses): Likewise.
10498 (vect_vfa_segment_size): Likewise.
10499 (vect_small_gap_p): Likewise.
10500 (vectorizable_with_step_bound_p): Likewise.
10501 (vect_prune_runtime_alias_test_list): Likewise.
10502 (vect_analyze_data_refs): Likewise.
10503 (vect_supportable_dr_alignment): Likewise.
10504 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10505 (vect_gen_prolog_loop_niters): Likewise.
10506 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10507 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10509 (vect_recog_mask_conversion_pattern): Likewise.
10510 (vect_try_gather_scatter_pattern): Likewise.
10511 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10512 to vect_get_store_cost.
10513 (vect_get_store_cost): Get stmt_info instead of DR.
10514 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10515 (vect_get_load_cost): Get stmt_info instead of DR.
10517 2018-06-01 Richard Biener <rguenther@suse.de>
10519 PR middle-end/86017
10520 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10521 vars wrapped in MEM_REFs.
10523 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10525 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10526 Fix subreg tests so that we only return a choice between
10527 GENERAL_REGS and FP_REGS if the original classes included both.
10529 2018-06-01 Richard Biener <rguenther@suse.de>
10532 * tree-ssa-structalias.c (get_function_part_constraint):
10533 Handle NULL fi->decl.
10534 (find_func_aliases_for_call): Properly handle indirect
10535 fi from direct call.
10536 (find_func_clobbers): Likewise.
10537 (ipa_pta_execute): Likewise.
10538 (create_variable_info_for): For functions that are ifunc_resolver
10539 resolve to a varinfo that contains the result of the resolver call.
10540 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10543 2018-05-31 Michael Collison <michael.collison@arm.com>
10545 * config/aarch64/aarch64.md:
10546 (*fix_to_zero_extenddfdi2): New pattern.
10547 * gcc.target/aarch64/fix_extend1.c: New testcase.
10549 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10551 PR middle-end/78809
10552 PR middle-end/83026
10553 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10554 and BUILT_IN_STRNCMP_EQ.
10555 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10556 BUILT_IN_STRNCMP_EQ.
10557 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10558 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10559 (gimple_fold_builtin): Likewise.
10560 * tree-ssa-strlen.c (compute_string_length): New function.
10561 (determine_min_obsize): New function.
10562 (handle_builtin_string_cmp): New function to handle calls to
10563 string compare functions.
10564 (strlen_optimize_stmt): Add handling to builtin string compare
10566 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10567 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10568 * tree.c (build_common_builtin_nodes): Add new defines of
10569 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10571 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10574 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10575 functions with naked attribute.
10577 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10579 * config/i386/sse.md (avx_vec_concat<mode>):
10580 Substitute concat_tg_mode mode attribute with xtg_mode.
10581 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10582 (concat_tg_mode): Remove mode attribute.
10584 2018-05-31 Martin Sebor <msebor@redhat.com>
10587 * calls.c (alloc_max_size): Correct a logic error/typo.
10588 Treat excessive arguments as infinite. Warn for invalid arguments.
10589 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10591 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10594 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10595 and movx for Haswell.
10597 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10598 Cesar Philippidis <cesar@codesourcery.com>
10600 PR middle-end/85879
10601 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10602 when emitting error on private/firstprivate reductions.
10603 * omp-low.c (lower_omp_target): Avoid reference-type processing
10604 on pointers for firstprivate clause.
10606 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10608 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10611 * config/aarch64/aarch64-simd.md
10612 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10613 (aarch64_ld1_x3_<mode>): Likewise
10614 (aarch64_st1x2<VALLDIF:mode>): Likewise
10615 (aarch64_st1_x2_<mode>): Likewise
10616 (aarch64_st1x3<VALLDIF:mode>): Likewise
10617 (aarch64_st1_x3_<mode>): Likewise
10618 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10619 (vld1_s8_x3): Likewise.
10620 (vld1_u16_x3): Likewise.
10621 (vld1_s16_x3): Likewise.
10622 (vld1_u32_x3): Likewise.
10623 (vld1_s32_x3): Likewise.
10624 (vld1_u64_x3): Likewise.
10625 (vld1_s64_x3): Likewise.
10626 (vld1_f16_x3): Likewise.
10627 (vld1_f32_x3): Likewise.
10628 (vld1_f64_x3): Likewise.
10629 (vld1_p8_x3): Likewise.
10630 (vld1_p16_x3): Likewise.
10631 (vld1_p64_x3): Likewise.
10632 (vld1q_u8_x3): Likewise.
10633 (vld1q_s8_x3): Likewise.
10634 (vld1q_u16_x3): Likewise.
10635 (vld1q_s16_x3): Likewise.
10636 (vld1q_u32_x3): Likewise.
10637 (vld1q_s32_x3): Likewise.
10638 (vld1q_u64_x3): Likewise.
10639 (vld1q_s64_x3): Likewise.
10640 (vld1q_f16_x3): Likewise.
10641 (vld1q_f32_x3): Likewise.
10642 (vld1q_f64_x3): Likewise.
10643 (vld1q_p8_x3): Likewise.
10644 (vld1q_p16_x3): Likewise.
10645 (vld1q_p64_x3): Likewise.
10646 (vst1_s64_x2): Likewise.
10647 (vst1_u64_x2): Likewise.
10648 (vst1_f64_x2): Likewise.
10649 (vst1_s8_x2): Likewise.
10650 (vst1_p8_x2): Likewise.
10651 (vst1_s16_x2): Likewise.
10652 (vst1_p16_x2): Likewise.
10653 (vst1_s32_x2): Likewise.
10654 (vst1_u8_x2): Likewise.
10655 (vst1_u16_x2): Likewise.
10656 (vst1_u32_x2): Likewise.
10657 (vst1_f16_x2): Likewise.
10658 (vst1_f32_x2): Likewise.
10659 (vst1_p64_x2): Likewise.
10660 (vst1q_s8_x2): Likewise.
10661 (vst1q_p8_x2): Likewise.
10662 (vst1q_s16_x2): Likewise.
10663 (vst1q_p16_x2): Likewise.
10664 (vst1q_s32_x2): Likewise.
10665 (vst1q_s64_x2): Likewise.
10666 (vst1q_u8_x2): Likewise.
10667 (vst1q_u16_x2): Likewise.
10668 (vst1q_u32_x2): Likewise.
10669 (vst1q_u64_x2): Likewise.
10670 (vst1q_f16_x2): Likewise.
10671 (vst1q_f32_x2): Likewise.
10672 (vst1q_f64_x2): Likewise.
10673 (vst1q_p64_x2): Likewise.
10674 (vst1_s64_x3): Likewise.
10675 (vst1_u64_x3): Likewise.
10676 (vst1_f64_x3): Likewise.
10677 (vst1_s8_x3): Likewise.
10678 (vst1_p8_x3): Likewise.
10679 (vst1_s16_x3): Likewise.
10680 (vst1_p16_x3): Likewise.
10681 (vst1_s32_x3): Likewise.
10682 (vst1_u8_x3): Likewise.
10683 (vst1_u16_x3): Likewise.
10684 (vst1_u32_x3): Likewise.
10685 (vst1_f16_x3): Likewise.
10686 (vst1_f32_x3): Likewise.
10687 (vst1_p64_x3): Likewise.
10688 (vst1q_s8_x3): Likewise.
10689 (vst1q_p8_x3): Likewise.
10690 (vst1q_s16_x3): Likewise.
10691 (vst1q_p16_x3): Likewise.
10692 (vst1q_s32_x3): Likewise.
10693 (vst1q_s64_x3): Likewise.
10694 (vst1q_u8_x3): Likewise.
10695 (vst1q_u16_x3): Likewise.
10696 (vst1q_u32_x3): Likewise.
10697 (vst1q_u64_x3): Likewise.
10698 (vst1q_f16_x3): Likewise.
10699 (vst1q_f32_x3): Likewise.
10700 (vst1q_f64_x3): Likewise.
10701 (vst1q_p64_x3): Likewise.
10703 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10705 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10706 user_label_prefix to name.
10708 * tree-core.h: Update comment about the format of NAME string
10709 passed to handler in attribute_spec.
10711 * config/msp430/msp430.md: Remove erroneous subreg expression from
10712 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10713 zero_extend{q,h}isi2.
10715 2018-05-30 Borislav Petkov <bp@suse.de>
10717 * doc/extend.texi: Document some architecture specific
10718 constraints and sort entries.
10720 2018-05-30 Martin Sebor <msebor@redhat.com>
10722 PR middle-end/85369
10723 * builtins.c (expand_builtin_stpcpy_1): New function.
10724 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10725 only if the former succeeds.
10727 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10729 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10732 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10734 * doc/invoke.texi (-flinker-output): Document
10736 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10738 * passes.c (ipa_write_summaries): Only modify statements if body
10740 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10741 incrementally linking.
10742 (ipa_passes): Likewise.
10743 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10744 pass down resolution info.
10745 * common.opt (flag_incremental_link): Update info.
10746 * gcc.c (plugin specs): Turn flinker-output=* to
10747 -plugin-opt=-linker-output-known
10748 * toplev.c (compile_file): Also cut compilation when doing incremental
10750 * flag-types. (enum lto_partition_model): Add
10751 LTO_LINKER_OUTPUT_NOLTOREL.
10752 (invoke.texi): Add -flinker-output docs.
10753 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10754 link same way as WPA; do not stream in dead initializers.
10756 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10757 darf2out_register_external_decl): Support incremental link.
10759 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10761 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10763 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10765 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10766 it down to simple_object_copy_lto_debug_sections.
10767 (run_gcc): Determine incremental LTO link time and configure
10768 lto1 into non-wpa mode, disable renaming of debug sections.
10770 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10772 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10773 descriptions of various incorrectly documented functions.
10775 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10778 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10779 address check not strict.
10781 2018-05-30 Richard Biener <rguenther@suse.de>
10783 PR tree-optimization/85964
10784 * tracer.c (better_p): Drop initialized count check, we only
10785 call the function with initialized counts now.
10786 (find_best_successor): Do find a best edge if one
10787 has uninitialized count.
10788 (find_best_predecessor): Likewise. Do BB frequency check only
10789 if count is initialized.
10791 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10793 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10794 (aarch64_ldrstr_offset_compare): New.
10795 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10796 load/store orderings.
10797 (aarch64_gen_adjusted_ldpstp): Likewise.
10799 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10801 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10802 Check for subset of GENERAL_REGS and FP_REGS.
10803 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10806 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10808 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10809 and wi::to_poly_offset. Add the current offset and then check
10810 whether the sum fits, rather than using an unchecked addition of
10811 a checked term. Check for a shwi rather than a uhwi.
10812 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10813 (store_constructor): Use poly_int_tree_p.
10814 (expand_expr_real_1): Likewise.
10815 * function.c (assign_temp): Likewise.
10816 * fold-const.c (const_binop): Use poly_int_tree_p and
10817 wi::to_poly_offset.
10818 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10820 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10821 to_poly_offset for MEM offsets.
10822 * ipa-icf.c (sem_variable::equals): Likewise.
10823 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10824 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10825 wi::to_poly_offset for BIT_FIELD_REF offsets.
10826 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10827 wi::to_poly_offset.
10828 * var-tracking.c (emit_note_insn_var_location): Use
10829 tree_to_poly_uint64.
10831 2018-05-29 Jim Wilson <jimw@sifive.com>
10833 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10835 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10838 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10839 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10841 (sse4_1_round<mode>2): Use nonimmediate_operand
10842 for operand 1 predicate.
10844 2018-05-29 Martin Sebor <msebor@redhat.com>
10845 Richard Biener <rguenther@suse.de>
10848 * calls.c (get_size_range): Call determine_value_range instead
10849 of get_value_range..
10850 * tree-vrp.h (determine_value_range): Declared new function.
10851 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10853 2018-05-29 Richard Biener <rguenther@suse.de>
10855 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10856 sure to use non-pattern stmts for get_earlier_stmt arguments.
10857 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10858 called on pattern stmts.
10859 (get_later_stmt): Likewise.
10861 2018-05-29 Martin Liska <mliska@suse.cz>
10863 PR gcov-profile/85759
10864 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10867 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10869 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10871 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10875 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10876 VEC_PACK_FLOAT_EXPR): New tree codes.
10877 * tree-pretty-print.c (op_code_prio): Handle
10878 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10879 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10880 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10881 * tree-inline.c (estimate_operator_cost): Likewise.
10882 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10883 * fold-const.c (const_binop): Likewise.
10884 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10885 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10886 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10887 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10888 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10889 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10890 * expr.c (expand_expr_real_2): Likewise.
10891 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10892 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10893 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10895 * optabs.c (expand_widen_pattern_expr): For
10896 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10897 sign from result type rather than operand's type.
10898 (expand_binop_directly): For vec_packu_float_optab and
10899 vec_packs_float_optab allow result type to be different from operand's
10901 * optabs-tree.c (optab_for_tree_code): Handle
10902 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10903 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10904 * tree-vect-generic.c (expand_vector_operations_1): Handle
10905 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10906 VEC_PACK_FLOAT_EXPR.
10907 * tree-vect-stmts.c (supportable_widening_operation): Handle
10909 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10910 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10911 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10912 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10913 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10915 (vec_pack<floatprefix>_float_<mode>): New expander.
10916 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10918 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10919 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10920 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10921 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10922 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10924 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10925 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10926 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10927 VEC_PACK_FLOAT_EXPR): Document.
10929 2018-05-29 Richard Biener <rguenther@suse.de>
10931 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10933 (stmt_vec_info_vec): Make pointer.
10934 (init_stmt_vec_info_vec): Remove.
10935 (free_stmt_vec_info_vec): Likewise.
10936 (set_stmt_vec_info_vec): New function.
10937 (free_stmt_vec_infos): Likewise.
10938 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10939 (set_vinfo_for_stmt): Likewise.
10940 (get_earlier_stmt): Likewise.
10941 (get_later_stmt): Likewise.
10942 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10943 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10944 (vec_info::~vec_info): Free stmt_vec_infos.
10945 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10946 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10947 (pass_slp_vectorize::execute): Likewise.
10948 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10949 (free_stmt_vec_info_vec): Likewise.
10950 (set_stmt_vec_info_vec): New function.
10951 (free_stmt_vec_infos): Likewise.
10952 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10953 the global stmt_vec_info_vec.
10954 * tree-parloops.c (gather_scalar_reductions): Use
10955 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10958 2018-05-29 Richard Biener <rguenther@suse.de>
10960 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10962 2018-05-29 Martin Liska <mliska@suse.cz>
10963 David Malcolm <dmalcolm@redhat.com>
10965 * vec.c (test_reverse): New.
10966 (vec_c_tests): Add new test.
10967 * vec.h (vl_ptr>::reverse): New function.
10969 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10971 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10973 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10976 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10978 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10980 2018-05-28 Richard Biener <rguenther@suse.de>
10982 PR tree-optimization/85933
10983 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10984 look at stmts marked as vectorizable.
10986 2018-05-28 Richard Biener <rguenther@suse.de>
10988 PR tree-optimization/85934
10989 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10990 vector boolean check before scalar optimization.
10992 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10994 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10997 2018-05-28 Mark Wielaard <mark@klomp.org>
10999 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11000 if it is an expression containing a minus sign.
11002 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11004 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11006 2018-05-27 Paul Koning <ni1d@arrl.net>
11008 * config/pdp11/pdp11.md (truncsihi2): Remove.
11010 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11011 Chung-Ju Wu <jasonwucj@gmail.com>
11013 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11015 (unaligned_store_dw): Ditto.
11016 * config/nds32/nds32-memory-manipulation.c
11017 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11018 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11019 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11020 (emit_setmem_word_loop): Rename to ...
11021 (emit_setmem_doubleword_loop): ... this.
11022 (nds32_gen_dup_4_byte_to_word_value): New function.
11023 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11024 (nds32_expand_setmem_loop): Refine implementation.
11025 (nds32_expand_setmem_loop_v3m): Ditto.
11026 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11029 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11031 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11033 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11035 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11036 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11037 machine->attr_no_prologue_p.
11038 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11039 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11040 (nds32_expand_epilogue): Consider attr_naked_p.
11041 (nds32_expand_epilogue_v3pop): Likewise.
11042 (nds32_can_use_return_insn): Likewise.
11043 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11044 attr_no_prologue_p fields.
11045 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11047 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11050 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11052 * config/i386/sse.md
11053 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11055 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11057 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11059 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11061 (*<floatsuffix>floatv2div2sf2): Rename to ...
11062 (*float<floatunssuffix>v2div2sf2): ... this.
11063 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11064 (float<floatunssuffix>v2div2sf2_mask): ... this.
11065 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11066 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11067 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11069 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11071 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11073 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11075 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11077 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11079 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11080 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11081 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11082 gen_ufix_truncv8dfv8si2.
11083 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11084 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11085 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11086 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11087 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11088 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11089 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11090 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11092 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11096 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11098 2018-05-25 Jim Wilson <jimw@sifive.com>
11100 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11101 * config/riscv/riscv.c (struct machine_function): Add
11102 interrupt_handler_p and attribute_checked_p fields.
11103 (riscv_attribute_table): Add interrupt.
11104 (riscv_interrupt_type_p): New.
11105 (riscv_save_reg_p): Save extra regs for interrupt handler.
11106 (riscv_use_save_libcall): Return false for interrupt handler.
11107 (riscv_first_stack_step): Add forward declaration.
11108 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11109 for interrupt handler with large frame. Use it for saved reg list.
11110 (riscv_expand_prologue): Move flag_stack_usage_info support to
11111 eliminate duplication.
11112 (riscv_expand_epilogue): Generate mret for interrupt handler.
11113 (riscv_epilogue_uses): New.
11114 (riscv_can_use_return_insn): Return false for interrupt handler.
11115 (riscv_function_ok_for_sibcall): Likewise.
11116 (riscv_set_current_function): Add interrupt handler support.
11117 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11118 * config/riscv/riscv.md (UNSPECV_MRET): New.
11120 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11122 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11124 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11126 PR tree-optimization/85712
11127 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11128 this candidate has already been replaced in-situ by a copy.
11130 2018-05-25 Jason Merrill <jason@redhat.com>
11132 PR c++/80485 - inline function non-zero address.
11133 * symtab.c (nonzero_address): Check DECL_COMDAT.
11135 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11138 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11139 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11140 extension of SImode operation. Use const123_operand predicate.
11141 (*saddsi_1): Remove.
11142 (*saddl_se_1): Ditto.
11143 (*ssubsi_1): Ditto.
11144 (*ssubl_se_1): Ditto.
11145 * config/alpha/predicates.md (const123_operand): New predicate.
11146 * config/alpha/constraints.md (P): Use IN_RANGE.
11148 2018-05-25 Richard Biener <rguenther@suse.de>
11150 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11152 (ref_maybe_used_by_stmt_p): Likewise.
11153 (stmt_may_clobber_ref_p): Likewise.
11154 (stmt_may_clobber_ref_p_1): Likewise.
11155 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11157 (ref_maybe_used_by_stmt_p): Likewise.
11158 (stmt_may_clobber_ref_p): Likewise.
11159 (stmt_may_clobber_ref_p_1): Likewise.
11160 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11161 the alias oracle to disambiguate DRs with stmts DR analysis
11163 (vect_analyze_data_refs): Do not give up on not analyzable
11164 DRs for BB vectorization. Remove code truncating the dataref
11167 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11170 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11171 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11172 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11174 2018-05-25 Richard Biener <rguenther@suse.de>
11176 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11177 function, combining stmt data ref gathering and fatal analysis
11179 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11180 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11181 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11182 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11183 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11185 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11187 PR tree-optimization/85720
11188 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11189 SCC if all partitions are builtins.
11190 (version_loop_by_alias_check): New parameter. Generate cancelable
11191 runtime alias check if all partitions are builtins.
11192 (distribute_loop): Update call to above function.
11194 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11196 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11197 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11198 (parm_default_def_partition_arg): Ditto.
11199 (set_parm_default_def_partition): Ditto.
11200 (get_parm_default_def_partitions): Ditto and make it static.
11201 (get_undefined_value_partitions): Ditto and make it static.
11202 (remove_ssa_form): Refactor call to init_var_map here.
11203 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11204 computation for loop region.
11205 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11206 (register_default_def): Delete.
11207 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11208 (parm_default_def_partition_arg): Ditto.
11209 (set_parm_default_def_partition): Ditto.
11210 (get_parm_default_def_partitions): Ditto and make it static.
11211 (get_undefined_value_partitions): Ditto and make it static.
11212 (coalesce_with_default, coalesce_with_default): Update comment.
11213 (create_coalesce_list_for_region): New func factored out from
11214 create_outofssa_var_map.
11215 (populate_coalesce_list_for_outofssa): New func factored out from
11216 create_outofssa_var_map and coalesce_ssa_name.
11217 (create_outofssa_var_map): Delete.
11218 (coalesce_ssa_name): Refactor to support live range computation.
11219 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11220 (get_parm_default_def_partitions): Delete.
11221 (get_undefined_value_partitions): Ditto.
11222 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11223 computation for loop region.
11224 (new_tree_live_info, loe_visit_block): Ditto.
11225 (live_worklist, set_var_live_on_entry): Ditto.
11226 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11227 * tree-ssa-live.h (struct _var_map): New fields.
11228 (init_var_map): Change decl.
11229 (region_contains_p): New.
11231 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11233 * tree-ssa-live.h (live_merge_and_clear): Delete.
11235 2018-05-25 Richard Biener <rguenther@suse.de>
11238 * tree-dump.c (dequeue_and_dump): Remove access to removed
11239 operand 2 of a SWITCH_EXPR.
11241 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11243 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11244 multiplication and division.
11245 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11246 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11247 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11248 (cond_udiv_optab, cond_umod_optab): New optabs.
11249 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11250 (IFN_COND_RDIV): New internal functions.
11251 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11252 TRUNC_MOD_EXPR and RDIV_EXPR.
11253 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11254 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11256 (SVE_INT_BINARY): Include mult.
11257 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11258 (optab, sve_int_op): Handle mult.
11259 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11261 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11262 for SVE_INT_BINARY_SD.
11264 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11266 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11267 (optab, sve_int_op): Handle div and udiv.
11268 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11269 for SVE_INT_BINARY_SD.
11270 (*<optab><mode>3): New insn for the same.
11272 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11274 * tree-vect-patterns.c: Include predict.h.
11275 (vect_recog_divmod_pattern): Restrict check for division support
11276 to when optimizing for size.
11278 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11280 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11281 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11282 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11283 (gimple_match_op::set_op): Likewise.
11284 (gimple_resimplify4): Declare.
11285 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11286 (expr::gen_transform): Likewise.
11287 (decision_tree::gen): Generate a simplification routine for 4 operands.
11288 * gimple-match-head.c (gimple_simplify): Add an overload for
11289 4 operands. In the top-level function, handle up to 4 call
11290 arguments and call gimple_resimplify4.
11291 (gimple_resimplify4): New function.
11292 (build_call_internal): Pass a fourth operand.
11293 (maybe_push_to_seq): Likewise.
11294 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11295 Fold VEC_COND_EXPRs of an operation and a default value into
11296 an IFN_COND_* function if possible.
11297 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11299 (SVE_COND_FP_BINARY): Include them.
11300 (optab, sve_fp_op): Handle them.
11301 (SVE_INT_BINARY_REV): New code iterator.
11302 (SVE_COND_FP_BINARY_REV): New int iterator.
11303 (commutative): New int attribute.
11304 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11306 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11308 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11309 (*cond_<optab><mode>): New patterns for reversed operands.
11311 2018-05-25 Richard Biener <rguenther@suse.de>
11313 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11314 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11315 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11316 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11317 * tree-vect-data-refs.c (everywhere): Adjust users.
11318 * tree-vect-loop.c (everywhere): Likewise.
11319 * tree-vect-slp.c (everywhere): Likewise.
11320 * tree-vect-stmts.c (everywhere): Likewise.
11321 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11323 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11325 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11327 (gcc_cv_as_section_exclude): ... this.
11328 Try Solaris as #exclude syntax.
11329 * configure: Regenerate.
11330 * config.in: Regenerate.
11331 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11333 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11334 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11336 * varasm.c (default_elf_asm_named_section): Don't check if
11337 HAVE_GAS_SECTION_EXCLUDE is defined.
11339 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11341 * doc/md.texi: Update the documentation of the cond_* optabs
11342 to mention the new final operand. Fix GET_MODE_NUNITS call.
11343 Describe the scalar case too.
11344 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11345 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11347 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11348 (get_conditional_internal_fn): Update comment.
11349 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11350 accumulator value as a final argument to conditional functions.
11351 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11352 a define_expand and add an "else" operand. Assert for now that
11353 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11354 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11355 (*cond_<optab><mode>): New patterns.
11356 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11357 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11358 (UNSPEC_COND_EOR): Delete.
11359 (optab): Remove associated mappings.
11360 (SVE_INT_BINARY): New code iterator.
11361 (sve_int_op): Remove int attribute and add "minus" to the code
11363 (SVE_COND_INT_OP): Delete.
11364 (SVE_COND_FP_OP): Rename to...
11365 (SVE_COND_FP_BINARY): ...this.
11367 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11369 * optabs.c (can_reuse_operands_p): New function.
11370 (maybe_legitimize_operands): Try to reuse the results for
11373 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11375 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11376 Add {q} suffix to insn mnemonic.
11378 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11380 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11381 (msp430_warn_func_return): New.
11383 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11385 * fold-const.c (tree_nonzero_bits): New function.
11386 * fold-const.h (tree_nonzero_bits): Likewise.
11387 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11388 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11390 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11394 * varasm.c (assemble_alias): Check ifunc_resolver only on
11397 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11400 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11401 when memory input operand is handled.
11403 2018-05-24 Luis Machado <luis.machado@linaro.org>
11405 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11407 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11409 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11411 * match.pd: Delay FMA folds until after vectorization.
11413 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11416 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11417 address check not strict.
11419 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11421 * gimple-match.h (gimple_match_op): New class.
11422 (mprts_hook): Replace parameters with a gimple_match_op *.
11423 (maybe_build_generic_op): Likewise.
11424 (gimple_simplified_result_is_gimple_val): Replace parameters with
11425 a const gimple_match_op *.
11426 (gimple_simplify): Replace code_helper * and tree * parameters with
11427 a gimple_match_op * parameter.
11428 (gimple_resimplify1): Replace code_helper *, tree and tree *
11429 parameters with a gimple_match_op * parameter.
11430 (gimple_resimplify2): Likewise.
11431 (gimple_resimplify3): Likewise.
11432 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11433 parameters with a gimple_match_op * parameter.
11434 * gimple-match-head.c (gimple_simplify): Change prototypes of
11435 auto-generated functions to take a gimple_match_op * instead of
11436 separate code_helper * and tree * parameters. Make the same
11437 change in the top-level overload and update calls to the
11438 gimple_resimplify routines. Update calls to the auto-generated
11439 functions and to maybe_push_res_to_seq in the publicly-facing
11440 operation-specific gimple_simplify overloads.
11441 (gimple_match_op::MAX_NUM_OPS): Define.
11442 (gimple_resimplify1): Replace rcode and ops with a single res_op
11443 parameter. Update call to gimple_simplify.
11444 (gimple_resimplify2): Likewise.
11445 (gimple_resimplify3): Likewise.
11446 (mprts_hook): Replace parameters with a gimple_match_op *.
11447 (maybe_build_generic_op): Likewise.
11448 (build_call_internal): Replace type, nargs and ops with
11449 a gimple_match_op *.
11450 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11451 with a single gimple_match_op *. Update calls to mprts_hook,
11452 build_call_internal and gimple_simplified_result_is_gimple_val.
11453 Factor out code that is common to the tree_code and combined_fn cases.
11454 * genmatch.c (expr::gen_transform): Replace tem_code and
11455 tem_ops with a gimple_match_op called tem_op. Update calls
11456 to the gimple_resimplify functions and maybe_push_res_to_seq.
11457 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11458 res_ops. Update call to the gimple_resimplify functions.
11459 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11460 (decision_tree::gen): Make the functions take a gimple_match_op *
11461 called res_op instead of separate res_code and res_ops parameters.
11462 Update call accordingly.
11463 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11464 and ops with a single res_op parameter. Update calls to
11465 maybe_build_generic_op and maybe_push_res_to_seq.
11466 (fold_stmt_1): Update calls to gimple_simplify and
11467 replace_stmt_with_simplification.
11468 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11469 and gimple_simplified_result_is_gimple_val.
11470 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11472 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11473 with a gimple_match_op *.
11474 (vn_nary_build_or_lookup): Likewise. Update call to
11475 vn_nary_build_or_lookup_1.
11476 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11477 gimple_match_op *. Update calls to the gimple_resimplify routines
11478 and to gimple_simplified_result_is_gimple_val.
11479 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11480 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11481 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11482 (visit_nary_op): Likewise.
11483 (visit_reference_op_load): Likewise.
11485 2018-05-23 Luis Machado <luis.machado@linaro.org>
11487 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11488 modifier for printing the step amount.
11490 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11493 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11496 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11498 * doc/sourcebuild.texi (Endianness): New subsubsection.
11500 2018-05-23 Luis Machado <luis.machado@linaro.org>
11502 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11503 <prefetch_dynamic_strides>: New const bool field.
11504 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11505 prefetch_dynamic_strides.
11506 (exynosm1_prefetch_tune): Likewise.
11507 (thunderxt88_prefetch_tune): Likewise.
11508 (thunderx_prefetch_tune): Likewise.
11509 (thunderx2t99_prefetch_tune): Likewise.
11510 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11512 (aarch64_override_options_internal): Update to set
11513 PARAM_PREFETCH_DYNAMIC_STRIDES.
11514 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11515 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11516 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11517 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11518 prefetch-dynamic-strides setting.
11520 2018-05-23 Luis Machado <luis.machado@linaro.org>
11522 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11523 <minimum_stride>: New const int field.
11524 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11525 minimum_stride field defaulting to -1.
11526 (exynosm1_prefetch_tune): Likewise.
11527 (thunderxt88_prefetch_tune): Likewise.
11528 (thunderx_prefetch_tune): Likewise.
11529 (thunderx2t99_prefetch_tune): Likewise.
11530 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11531 <default_opt_level>: Set to 3.
11532 (aarch64_override_options_internal): Update to set
11533 PARAM_PREFETCH_MINIMUM_STRIDE.
11534 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11535 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11536 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11537 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11538 stride is constant and is below the minimum stride threshold.
11540 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11542 * config/arm/arm-cpus.in (mode26): Delete.
11543 (armv4): Delete mode26 reference.
11544 * config/arm/arm.c (arm_configure_build_target): Delete use of
11547 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11549 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11551 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11552 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11554 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11555 (floatunsdidf2): Ditto.
11557 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11559 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11560 (fixuns_trunc<mode>si2_avx512f): Ditto.
11561 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11562 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11563 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11565 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11567 PR rtl-optimization/79985
11568 * df-scan.c (df_insn_refs_collect): Remove special case for
11569 global registers and asm statements.
11571 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11573 * extend.texi (Global Register Variables): Rewrite the bullet list.
11574 Note that the register is available for allocation. Note that access
11575 via inline asm must use constraints. Add note about async-signal
11576 handlers. Remove paragraph about automagic register selection.
11578 2018-05-23 Richard Biener <rguenther@suse.de>
11580 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11581 of fixed offset from memset VN.
11583 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11585 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11586 first_interp field.
11587 (alloc_cand_and_find_basis): Initialize first_interp field.
11588 (slsr_process_mul): Modify first_interp field.
11589 (slsr_process_add): Likewise.
11590 (slsr_process_cast): Modify first_interp field for each new
11592 (slsr_process_copy): Likewise.
11593 (dump_candidate): Dump first_interp field.
11594 (replace_mult_candidate): Process all interpretations, not just
11596 (replace_rhs_if_not_dup): Likewise.
11597 (replace_one_candidate): Likewise.
11599 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11601 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11603 (aarch64_needs_frame_chain): New function.
11604 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11606 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11609 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11610 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11611 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11612 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11613 as true for strict-align.
11614 (aarch64_can_inline_p): Perform checks even when callee has no
11615 attributes to check for strict alignment.
11616 * doc/extend.texi (AArch64 Function Attributes): Document
11618 * doc/invoke.texi: (AArch64 Options): Likewise.
11620 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11622 PR tree-optimization/85853
11623 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11624 the handling of the root of the node to...
11625 (vect_slp_analyze_node_operations_1): ...this new function,
11626 and run the whole thing with the child nodes' def types
11627 set according to their SLP node's def type.
11629 2018-05-23 Richard Biener <rguenther@suse.de>
11631 PR middle-end/85874
11632 * tree-data-ref.c (create_runtime_alias_checks): Defer
11633 and ignore overflow warnings.
11635 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11637 PR tree-optimization/85822
11638 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11641 2018-05-23 Richard Biener <rguenther@suse.de>
11643 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11644 memset constants via native_interpret_expr.
11646 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11649 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11651 (cgraph_node::create_alias): Likewise.
11652 (cgraph_node::get_availability): Check ifunc_resolver instead
11653 of looking up ifunc attribute.
11654 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11655 * varasm.c (do_assemble_alias): Likewise.
11656 (assemble_alias): Likewise.
11657 (default_binds_local_p_3): Likewise.
11658 * cgraph.h (cgraph_node): Add ifunc_resolver.
11659 (cgraph_node::only_called_directly_or_aliased_p): Return false
11660 for IFUNC resolver.
11661 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11663 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11664 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11665 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11666 instead of looking up ifunc attribute.
11668 2018-05-22 Luis Machado <luis.machado@linaro.org>
11670 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11672 2018-05-22 Martin Sebor <msebor@redhat.com>
11674 PR middle-end/85359
11675 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11676 only when expasion succeeds.
11677 (expand_builtin_strcmp): Same.
11678 (expand_builtin_strncmp): Same.
11680 2018-05-22 Martin Sebor <msebor@redhat.com>
11682 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11684 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11685 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11687 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11688 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11690 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11691 Add check for legitimate_address.
11692 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11693 (aarch64_swap_ldrstr_operands): New.
11694 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11697 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11698 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11700 * config/aarch64/aarch64.md: New patterns to generate stp
11702 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11703 single words and double words.
11704 (load_pair_sw, load_pair_dw): Likewise.
11705 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11707 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11709 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11710 for different mode ldpstp and add peephole for merged zero stores.
11711 Likewise for loads.
11712 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11714 (aarch64_gen_store_pair): Rename calls to match new patterns.
11715 (aarch64_gen_load_pair): Rename calls to match new patterns.
11716 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11717 (load_pair<DREG:mode><DREG2:mode>): ... This.
11718 (store_pair<mode>): Rename to...
11719 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11720 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11721 New mode iterators.
11722 (V_INT_EQUIV): Handle SImode.
11723 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11726 2018-05-22 Martin Sebor <msebor@redhat.com>
11729 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11730 or ajust the presumed bound on an operation to avoid unnecessary
11733 2018-05-22 Martin Sebor <msebor@redhat.com>
11735 PR tree-optimization/85826
11736 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11737 assuming that a DECL necesarily has a constant size.
11739 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11741 PR middle-end/85862
11742 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11744 2018-05-22 Richard Biener <rguenther@suse.de>
11746 PR tree-optimization/85834
11747 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11748 non-constant and non-zero memset arguments.
11750 2018-05-22 Martin Liska <mliska@suse.cz>
11753 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11755 2018-05-22 Richard Biener <rguenther@suse.de>
11757 PR tree-optimization/85863
11758 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11759 comparisons when vectype is specified.
11760 (vectorizable_condition): Do not specify vectype for
11761 vect_is_simple_cond when SLP vectorizing.
11763 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11766 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11767 define __ibm128 as long double.
11768 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11769 as a distinct type when IEEE 128-bit support is enabled.
11770 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11771 128-bit types to use the correct functions.
11772 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11773 convert between 128-bit floating point types that have different
11774 modes but the same representation, instead of using gen_lowpart to
11776 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11778 (IFKF_reg): New attributes to give the register constraints for
11780 (extend<mode>tf2_internal): New insns to mark an explicit
11781 conversion between 128-bit floating point types that have a
11782 different mode but share the same representation.
11784 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11786 PR tree-optimization/85814
11787 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11788 a null return from get_strinfo when unsharing the next
11789 strinfo in the chain.
11791 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11794 * varasm.c (weak_finish): Clean up weak_decls.
11796 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11798 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11799 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11800 UNSPEC_UADALP values.
11801 * config/aarch64/iterators.md (ABAL): New int iterator.
11804 (sur): Add mappings for the above.
11805 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11807 (aarch64_<sur>abal<mode>_4): Likewise.
11808 (aarch64_<sur>adalp<mode>_3): Likewise.
11809 (<sur>sadv16qi): New define_expand.
11811 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11813 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11814 (*movdf_internal): Ditto.
11815 (*rcpsf2_sse): Ditto.
11816 (*rsqrtsf2_sse): Ditto.
11817 (*sqrt<mode>2_sse): Ditto.
11819 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11821 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11823 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11824 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11825 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11826 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11828 * config/aarch64/arm_neon.h: Likewise.
11829 * config/aarch64/iterators.md (VQ_I): New.
11831 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11833 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11835 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11838 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11840 * config/nds32/constraints.md (S): New constraint.
11841 * config/nds32/nds32.md (call_internal): Use constraint S.
11842 (call_value_internal): Likewise.
11843 (sibcall_internal): Likewise.
11844 (sibcall_value_internal): Likewise.
11846 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11847 Chung-Ju Wu <jasonwucj@gmail.com>
11849 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11850 into consideration.
11852 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11853 Chung-Ju Wu <jasonwucj@gmail.com>
11855 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11856 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11857 (nds32_rtx_costs_impl): Simplify.
11858 (nds32_address_cost_impl): Simplify.
11859 (nds32_init_rtx_costs): New function.
11860 (nds32_rtx_costs_speed_prefer): Likewise.
11861 (nds32_rtx_costs_size_prefer): Likewise.
11862 (nds32_address_cost_speed_prefer): Likewise.
11863 (nds32_address_cost_speed_fwprop): Likewise.
11864 (nds32_address_cost_size_prefer): Likewise.
11865 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11866 * config/nds32/nds32.c (nds32_option_override): Use
11867 nds32_init_rtx_costs function.
11869 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11871 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11872 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11873 (TARGET_PIPELINE_N8): Likewise.
11874 (TARGET_PIPELINE_N10): Likewise.
11875 (TARGET_PIPELINE_N13): Likewise.
11876 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11878 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11880 * config/nds32/nds32-fpu.md: Update copyright year.
11882 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11884 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11886 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11888 * config/nds32/nds32.c
11889 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11890 * config/nds32/nds32.opt (minline-asm-r15): New option.
11892 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11894 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11896 * config/nds32/nds32.md (abssi2): New pattern.
11898 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11900 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11901 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11902 Merge insn pattern from sse_cvtsi2ss<round_name> and
11903 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11904 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11905 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11906 using SWI48 mode iterator.
11907 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11908 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11909 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11910 pattern from sse_cvttss2si<round_saeonly_name>
11911 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11912 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11913 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11914 using SWI48 mode iterator.
11915 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11916 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11917 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11918 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11919 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11920 using SWI48 mode iterator.
11921 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11922 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11923 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11924 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11925 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11926 SWI48 mode iterator.
11927 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11928 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11929 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11930 pattern from sse_cvttsd2si<round_saeonly_name>
11931 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11933 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11935 * config/nds32/nds32-md-auxiliary.c
11936 (nds32_valid_smw_lwm_base_p): Refine.
11937 (nds32_output_smw_single_word): Refine.
11938 (nds32_output_smw_double_word): New.
11939 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11941 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11943 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11944 (nds32_output_stack_pop): Refine.
11945 (nds32_expand_unaligned_load): Refine.
11946 (nds32_expand_unaligned_store): Refine.
11948 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11949 Chung-Ju Wu <jasonwucj@gmail.com>
11951 * config/nds32/constants.md: Add TP_REGNUM constant.
11952 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11953 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11955 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11956 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11957 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11958 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11959 and PIC code generation.
11960 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11962 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11964 * config/nds32/nds32.md: Support TLS and PIC.
11965 * config/nds32/nds32.c: Support TLS and PIC.
11966 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11967 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11970 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11972 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11973 mode with E_ prefix.
11975 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11976 Chung-Ju Wu <jasonwucj@gmail.com>
11978 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11979 * config/nds32/nds32-md-auxiliary.c
11980 (symbolic_reference_mentioned_p): New.
11981 (nds32_legitimize_ict_address): New.
11982 (nds32_expand_ict_move): New.
11983 (nds32_indirect_call_referenced_p): New.
11984 (nds32_symbol_binds_local_p): Delete.
11985 (nds32_long_call_p): Modify.
11986 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11987 * config/nds32/nds32-protos.h
11988 (symbolic_reference_mentioned_p): Declare.
11989 (nds32_legitimize_ict_address): Declare.
11990 (nds32_expand_ict_move): Declare.
11991 (nds32_indirect_call_referenced_p): Declare.
11992 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11993 (nds32_relax_group): Use nds32_ict_const_p as condition.
11994 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11995 (nds32_asm_file_start): Output ict_model directive in asm code.
11996 (nds32_legitimate_address_p): Consider indirect call.
11997 (nds32_print_operand): Consider indirect call.
11998 (nds32_print_operand_address): Consider indirect call.
11999 (nds32_insert_attributes): Handle "indirect_call" attribute.
12000 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12001 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12002 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12003 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12004 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12005 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12006 (TARGET_ICT_MODEL_SMALL): Define.
12007 (TARGET_ICT_MODEL_LARGE): Define.
12008 * config/nds32/nds32.md (movsi): Consider ict model.
12009 (call, call_value): Consider ict model.
12010 (sibcall, sibcall_value): Consider ict model.
12011 * config/nds32/nds32.opt (mict-model): New option.
12012 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12015 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12016 Monk Chiang <sh.chiang04@gmail.com>
12017 Jim Wilson <jimw@sifive.com>
12019 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12020 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12021 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12022 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12023 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12024 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12025 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12026 compute save_libcall_adjustment properly.
12027 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12028 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12029 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12030 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12031 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12032 (ABI_SPEC): Handle mabi=ilp32e.
12033 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12034 (RVE): Add RVE mask.
12035 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12036 <-march>: Add rv32e as an example.
12038 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12041 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12042 (intra_create_variable_infos): Handle C++ constructors.
12044 2018-05-18 Martin Liska <mliska@suse.cz>
12046 * passes.def: Remove a redundant pass.
12048 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12051 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12053 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12055 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12057 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12059 (armv2, armv2a, armv3, armv3m): Delete architectures.
12060 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12061 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12062 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12064 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12065 (*mulsidi3adddi): Likewise.
12066 (mulsidi3): Likewise.
12067 (*mulsidi3_nov6): Likewise.
12068 (umulsidi3): Likewise.
12069 (umulsidi3_nov6): Likewise.
12070 (umaddsidi4): Likewise.
12071 (*umulsidi3adddi): Likewise.
12072 (smulsi3_highpart): Likewise.
12073 (*smulsi3_highpart_nov6): Likewise.
12074 (umulsi3_highpart): Likewise.
12075 (*umulsi3_highpart_nov6): Likewise.
12076 * config/arm/arm.h (arm_arch3m): Delete.
12077 * config/arm/arm.c (arm_arch3m): Delete.
12078 (arm_option_override_internal): Update armv3-related comment.
12079 (arm_configure_build_target): Delete use of isa_bit_mode32.
12080 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12081 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12082 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12083 (mulsa3): Likewise.
12084 (mulusa3): Likewise.
12085 * config/arm/arm-protos.h (arm_arch3m): Delete.
12086 * config/arm/arm-tables.opt: Regenerate.
12087 * config/arm/arm-tune.md: Likewise.
12088 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12089 deleted architectures.
12091 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12093 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12094 (armv5t, armv5te): New features.
12095 (ARMv5, ARMv5e): Delete fgroups.
12096 (ARMv5t, ARMv5te): Adjust for above changes.
12097 (ARMv6m): Likewise.
12098 (armv5, armv5e): Delete arches.
12099 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12101 (*call_reg_arm): Likewise.
12102 (*call_value_reg_armv5): Likewise.
12103 (*call_value_reg_arm): Likewise.
12104 (*call_symbol): Likewise.
12105 (*call_value_symbol): Likewise.
12106 (*sibcall_insn): Likewise.
12107 (*sibcall_value_insn): Likewise.
12108 (clzsi2): Likewise.
12109 (prefetch): Likewise.
12110 (define_split and define_peephole2 dependent on arm_arch5):
12112 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12114 (TARGET_ARM_QBIT): Likewise.
12115 (TARGET_DSP_MULTIPLY): Likewise.
12116 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12117 (arm_arch5, arm_arch5e): Delete.
12118 (arm_arch5t, arm_arch5te): Declare.
12119 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12120 (arm_arch5t): Declare.
12121 (arm_option_reconfigure_globals): Update for the above.
12122 (arm_options_perform_arch_sanity_checks): Update comment, replace
12123 use of arm_arch5 with arm_arch5t.
12124 (use_return_insn): Likewise.
12125 (arm_emit_call_insn): Likewise.
12126 (output_return_instruction): Likewise.
12127 (arm_final_prescan_insn): Likewise.
12128 (arm_coproc_builtin_available): Likewise.
12129 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12130 arm_arch5e with arm_arch5t and arm_arch5te.
12131 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12132 (arm_arch5t, arm_arch5te): Declare.
12133 * config/arm/arm-tables.opt: Regenerate.
12134 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12135 * config/arm/t-multilib: Likewise.
12136 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12137 instead of arm_arch5.
12138 (*call_reg_thumb1): Likewise.
12139 (*call_value_reg_thumb1_v5): Likewise.
12140 (*call_value_reg_thumb1): Likewise.
12141 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12143 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12145 2018-05-18 Martin Liska <mliska@suse.cz>
12147 PR gcov-profile/84846
12148 * doc/gcov.texi: Document -t option of gcov tool.
12150 2018-05-18 Martin Liska <mliska@suse.cz>
12152 PR gcov-profile/84846
12153 * gcov.c (print_usage): Add new -t option.
12154 (process_args): Handle the option.
12155 (generate_results): Use stdout as output when requested by
12158 2018-05-18 Martin Liska <mliska@suse.cz>
12160 PR gcov-profile/84846
12161 * coverage.c (coverage_init): Write PWD to .gcno file.
12162 * doc/gcov.texi: Document how working directory is printed.
12163 * gcov-dump.c (dump_gcov_file): Print PWD.
12164 * gcov.c (output_intermediate_file): Likewise.
12165 (read_graph_file): Read PWD string.
12166 (output_lines): Print PWD.
12168 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12170 PR middle-end/85817
12171 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12172 for retval and return false if all args to phi are zero.
12174 2018-05-18 Richard Biener <rguenther@suse.de>
12176 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12178 (evrp_dom_walker::before_dom_children): Call it.
12180 2018-05-18 Richard Biener <rguenther@suse.de>
12182 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12183 results when processing array refs with variable index.
12185 2018-05-18 Toon Moene <toon@moene.org>
12187 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12188 directly after that of -floop-interchange. Indicate that both
12189 options are enabled by default when specifying -O3.
12191 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12193 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12194 iterator. Delete separate integer-mode vec_set<mode> expander.
12195 (aarch64_simd_vec_setv2di): Delete.
12196 (vec_setv2di): Delete.
12197 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12198 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12199 the "w, r" alternative.
12201 2018-05-18 Martin Liska <mliska@suse.cz>
12203 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12204 * tree-pass.h (make_pass_lower_switch_O0): New function.
12205 * tree-switch-conversion.c (node_has_low_bound): Remove.
12206 (node_has_high_bound): Likewise.
12207 (node_is_bounded): Likewise.
12208 (class pass_lower_switch): Make it a template type and create
12210 (pass_lower_switch::execute): Add template argument.
12211 (make_pass_lower_switch): New function.
12212 (make_pass_lower_switch_O0): New function.
12213 (do_jump_if_equal): Remove.
12214 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12215 all the hard work to tree optimization passes.
12217 2018-05-18 Martin Liska <mliska@suse.cz>
12219 * dbgcnt.c (limit_low): Renamed from limit.
12220 (limit_high): New variable.
12221 (dbg_cnt_is_enabled): Check for upper limit.
12222 (dbg_cnt): Adjust dumping.
12223 (dbg_cnt_set_limit_by_index): Add new argument for high
12225 (dbg_cnt_set_limit_by_name): Likewise.
12226 (dbg_cnt_process_single_pair): Parse new format.
12227 (dbg_cnt_process_opt): Use strtok.
12228 (dbg_cnt_list_all_counters): Remove 'value' and add
12230 * doc/invoke.texi: Document changes.
12232 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12234 * doc/sourcebuild.texi (scalar_all_fma): Document.
12235 * tree.def (FMA_EXPR): Delete.
12236 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12237 * internal-fn.c (ternary_direct): New macro.
12238 (expand_ternary_optab_fn): Likewise.
12239 (direct_ternary_optab_supported_p): Likewise.
12240 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12241 * builtins.c (fold_builtin_fma): Delete.
12242 (fold_builtin_3): Don't call it.
12243 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12244 * expr.c (expand_expr_real_2): Likewise.
12245 * fold-const.c (operand_equal_p): Likewise.
12246 (fold_ternary_loc): Likewise.
12247 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12248 * gimple.c (DEFTREECODE): Likewise.
12249 * gimplify.c (gimplify_expr): Likewise.
12250 * optabs-tree.c (optab_for_tree_code): Likewise.
12251 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12252 * tree-eh.c (operation_could_trap_p): Likewise.
12253 (stmt_could_throw_1_p): Likewise.
12254 * tree-inline.c (estimate_operator_cost): Likewise.
12255 * tree-pretty-print.c (dump_generic_node): Likewise.
12256 (op_code_prio): Likewise.
12257 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12258 * tree-ssa-operands.c (get_expr_operands): Likewise.
12259 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12260 * fold-const-call.h (fold_fma): Delete.
12261 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12262 CFN_FNMA and CFN_FNMS.
12263 (fold_fma): Delete.
12264 * genmatch.c (combined_fn): New enum.
12265 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12266 (commutative_op): New function.
12267 (commutate): Use it. Handle more than 2 operands.
12268 (dt_operand::gen_gimple_expr): Use commutative_op.
12269 (parser::parse_expr): Allow :c to be used with non-binary
12270 operators if the commutative operand is known.
12271 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12272 CFN_FMS, CFN_FNMA and CFN_FNMS.
12273 (backprop::process_assign_use): Remove FMA_EXPR handling.
12274 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12275 (gen_hsa_fma): New function.
12276 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12277 IFN_FNMA and IFN_FNMS.
12278 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12279 * gimple-fold.h (follow_all_ssa_edges): Declare.
12280 * gimple-fold.c (follow_all_ssa_edges): New function.
12281 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12282 gimple_build interface and use follow_all_ssa_edges to fold the result.
12283 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12284 instead of checking for optabs directly.
12285 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12286 rather than FMA_EXPRs.
12287 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12288 call to IFN_FMA instead of an FMA_EXPR.
12290 2018-05-17 Jim Wilson <jimw@sifive.com>
12292 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12293 sign extended promoted subreg, and the range does not have the sign bit
12294 set, then do a sign extend.
12296 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12297 test, check for sign extended subreg and/or constant operands, and
12298 do a sign extend in that case.
12300 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12302 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12303 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12305 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12306 Change logics_shift_reg to logics_shift_imm.
12307 (thunderx2t99_fp_loadpair_basic): Delete.
12308 (thunderx2t99_fp_storepair_basic): Delete.
12309 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12310 (thunderx2t99_asimd_polynomial): Delete.
12311 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12312 and neon_fp_mul_d_scalar_q.
12313 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12314 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12315 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12316 (thunderx2t99_asimd_lut): Add missing tbl types.
12317 (thunderx2t99_asimd_ext): Delete.
12318 (thunderx2t99_asimd_load1_1_mult): Delete.
12319 (thunderx2t99_asimd_load1_2_mult): Delete.
12320 (thunderx2t99_asimd_load1_ldp): New.
12321 (thunderx2t99_asimd_load1): New.
12322 (thunderx2t99_asimd_load2): Add missing *load2* types.
12323 (thunderx2t99_asimd_load3): New.
12324 (thunderx2t99_asimd_load4): New.
12325 (thunderx2t99_asimd_store1_1_mult): Delete.
12326 (thunderx2t99_asimd_store1_2_mult): Delete.
12327 (thunderx2t99_asimd_store2_mult): Delete.
12328 (thunderx2t99_asimd_store2_onelane): Delete.
12329 (thunderx2t99_asimd_store_stp): New.
12330 (thunderx2t99_asimd_store1): New.
12331 (thunderx2t99_asimd_store2): New.
12332 (thunderx2t99_asimd_store3): New.
12333 (thunderx2t99_asimd_store4): New.
12335 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12337 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12338 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12340 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12341 Segher Boessenkool <segher@kernel.crashing.org>
12344 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12347 2018-05-17 Richard Biener <rguenther@suse.de>
12349 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12350 for pruning loop and prune defs feeding only already visited PHIs.
12352 2018-05-17 Richard Biener <rguenther@suse.de>
12354 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12356 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12357 Richard Biener <rguenther@suse.de>
12359 PR tree-optimization/85793
12360 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12361 for VMAT_ELEMENTWISE.
12363 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12365 * internal-fn.h (lookup_internal_fn): Declare
12366 * internal-fn.c (lookup_internal_fn): New function.
12367 * gimple.c (gimple_build_call_from_tree): Handle calls to
12368 internal functions.
12369 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12370 internal function names.
12371 * tree-pretty-print.c (dump_generic_node): Likewise.
12372 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12374 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12376 * gimple-fold.h (gimple_build): Make the function forms take
12377 combined_fn rather than built_in_function.
12378 (gimple_simplify): Likewise.
12379 * gimple-match-head.c (gimple_simplify): Likewise.
12380 * gimple-fold.c (gimple_build): Likewise.
12381 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12382 rather than gimple_build_call_internal.
12383 (get_initial_defs_for_reduction): Likewise.
12384 (vect_create_epilog_for_reduction): Likewise.
12385 (vectorizable_live_operation): Likewise.
12387 2018-05-17 Martin Liska <mliska@suse.cz>
12389 * gimple-ssa-sprintf.c (format_directive): Do not use
12390 space in between 'G_' and '('.
12392 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12395 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12396 even if the mask is not all ones.
12399 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12401 (ix86_gimple_fold_builtin): Likewise.
12404 * config/i386/i386.c: Include tree-vector-builder.h.
12405 (ix86_vector_shift_count): New function.
12406 (ix86_fold_builtin): Fold shift builtins by scalar count.
12407 (ix86_gimple_fold_builtin): Likewise.
12409 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12410 _mm512_setzero): New intrinsics.
12412 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12413 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12415 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12416 code generation for cases where splatting a value is not useful.
12417 * simplify-rtx.c (simplify_ternary_operation): Simplify
12418 vec_merge across a vec_duplicate and a paradoxical subreg forming
12419 a vector mode to a vec_concat.
12421 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12423 * config.gcc: Support "goldmont-plus".
12424 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12426 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12427 PROCESSOR_GOLDMONT_PLUS.
12428 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12429 (processor_target_table): Add "goldmont-plus".
12430 (PTA_GOLDMONT_PLUS): Define.
12431 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12432 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12433 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12434 (fold_builtin_cpu): Add "goldmont-plus".
12435 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12436 (ix86_option_override_internal): Add "goldmont-plus".
12437 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12438 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12439 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12440 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12442 2018-05-17 Richard Biener <rguenther@suse.de>
12444 PR tree-optimization/85757
12445 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12446 remove defs that only feed that PHI from further processing.
12448 2018-05-16 Jim Wilson <jimw@sifive.com>
12450 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12452 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12454 2018-05-16 Mark Wielaard <mark@klomp.org>
12456 * dwarf2out.c (count_index_strings): New function.
12457 (output_indirect_strings): Call count_index_strings and generate
12458 header for dwarf_version >= 5.
12460 2018-05-16 Mark Wielaard <mark@klomp.org>
12462 * dwarf2out.c (dwarf_FORM): New function.
12463 (set_indirect_string): Use dwarf_FORM.
12464 (reset_indirect_string): Likewise.
12465 (size_of_die): Likewise.
12466 (value_format): Likewise.
12467 (output_die): Likewise.
12468 (add_skeleton_AT_string): Likewise.
12469 (output_macinfo_op): Likewise.
12470 (index_string): Likewise.
12471 (output_index_string_offset): Likewise.
12472 (output_index_string): Likewise.
12473 (count_index_strings): Likewise.
12475 2018-05-16 Carl Love <cel@us.ibm.com>
12477 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12478 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12480 2018-05-16 Martin Jambor <mjambor@suse.cz>
12482 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12483 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12485 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12487 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12488 (fnma<mode>4): Likewise.
12489 (fms<mode>4): Likewise.
12490 (fnms<mode>4): Likewise.
12491 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12492 (aarch64_fnma<mode>4): Likewise.
12493 (aarch64_fms<mode>4): Likewise.
12494 (aarch64_fnms<mode>4): Likewise.
12495 (aarch64_fnmadd<mode>4): Likewise.
12497 2018-05-16 Jason Merrill <jason@redhat.com>
12499 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12501 2018-05-16 Richard Biener <rguenther@suse.de>
12503 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12504 (dump_stmt_cost): Declare.
12505 (add_stmt_cost): Dump cost we add.
12506 (add_stmt_costs): New function.
12507 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12508 No longer exported.
12509 (vect_analyze_stmt): Adjust prototype.
12510 (vectorizable_condition): Likewise.
12511 (vectorizable_live_operation): Likewise.
12512 (vectorizable_reduction): Likewise.
12513 (vectorizable_induction): Likewise.
12514 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12515 cost vector to pass to vectorizable_ and record afterwards.
12516 (vect_model_reduction_cost): Take cost vector argument and adjust.
12517 (vect_model_induction_cost): Likewise.
12518 (vectorizable_reduction): Likewise.
12519 (vectorizable_induction): Likewise.
12520 (vectorizable_live_operation): Likewise.
12521 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12522 SLP_TREE_NUMBER_OF_VEC_STMTS.
12523 (vect_analyze_slp_cost_1): Remove.
12524 (vect_analyze_slp_cost): Likewise.
12525 (vect_slp_analyze_node_operations): Take visited args and
12526 a target cost vector. Avoid processing already visited stmt sets.
12527 (vect_slp_analyze_operations): Use a local cost vector to gather
12528 costs and register those of non-discarded instances.
12529 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12530 (vect_schedule_slp_instance): Remove copying of
12531 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12533 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12534 adding cost. Record cost entry location.
12535 (vect_prologue_cost_for_slp_op): Function to compute cost of
12536 a constant or invariant generated for SLP vect in the prologue,
12537 split out from vect_analyze_slp_cost_1.
12538 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12539 (vect_model_promotion_demotion_cost): Likewise.
12540 (vect_model_store_cost): Likewise, make static.
12541 (vect_model_load_cost): Likewise.
12542 (vectorizable_bswap): Add cost vector arg and adjust.
12543 (vectorizable_call): Likewise.
12544 (vectorizable_simd_clone_call): Likewise.
12545 (vectorizable_conversion): Likewise.
12546 (vectorizable_assignment): Likewise.
12547 (vectorizable_shift): Likewise.
12548 (vectorizable_operation): Likewise.
12549 (vectorizable_store): Likewise.
12550 (vectorizable_load): Likewise.
12551 (vectorizable_condition): Likewise.
12552 (vectorizable_comparison): Likewise.
12553 (can_vectorize_live_stmts): Likewise.
12554 (vect_analyze_stmt): Likewise.
12555 (vect_transform_stmt): Adjust calls to vectorizable_*.
12556 * tree-vectorizer.c: Include gimple-pretty-print.h.
12557 (dump_stmt_cost): New function.
12559 2018-05-16 Richard Biener <rguenther@suse.de>
12561 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12562 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12563 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12564 (check_name): New callback.
12565 (dse_classify_store): Track cycles via a visited bitmap of PHI
12566 defs and simplify handling of in-loop and across loop dead stores
12567 and properly fail for loop-variant refs. Handle byte-tracking with
12568 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12571 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12573 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12574 (vect_get_mask_type_for_stmt): Likewise.
12575 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12577 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12578 to determine the statement's vector type and the vector type that
12579 should be used for calculating nunits. Deal with cases in which
12580 the type has to be deferred.
12581 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12582 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12583 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12584 (vect_determine_vf_for_stmt): New functions, split out from...
12585 (vect_determine_vectorization_factor): ...here.
12586 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12587 (vect_get_mask_type_for_stmt): New functions, split out from
12588 vect_determine_vectorization_factor.
12590 2018-05-16 Richard Biener <rguenther@suse.de>
12592 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12593 verify the [VEC_]COND_EXPR embedded comparison.
12595 2018-05-15 Martin Sebor <msebor@redhat.com>
12597 PR tree-optimization/85753
12598 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12599 RECORD_TYPE in addition to ARRAY_TYPE.
12601 2018-05-15 Martin Sebor <msebor@redhat.com>
12603 PR middle-end/85643
12604 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12606 2018-05-15 Richard Biener <rguenther@suse.de>
12608 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12609 add by_clobber_p one. Change algorithm to collect all defs
12610 representing uses we need to walk and try reducing them to
12611 a single one before failing.
12612 (dse_dom_walker::dse_optimize_stmt): Adjust.
12614 2018-05-13 Mark Wielaard <mark@klomp.org>
12616 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12617 (size_of_loc_descr): Likewise.
12618 (output_loc_operands): Likewise.
12619 (output_loc_operands_raw): Likewise.
12620 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12621 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12622 (hash_loc_operands): Likewise.
12623 (compare_loc_operands): Likewise.
12625 2018-05-14 Mark Wielaard <mark@klomp.org>
12627 * dwarf2out.c (count_index_addrs): New function.
12628 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12630 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12632 PR tree-optimization/83648
12633 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12634 return value as malloc candidate.
12636 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12639 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12640 param as true in call to suggest_attribute.
12642 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12644 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12645 -mreadonly-in-sdata.
12647 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12649 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12651 (aarch64_crypto_aesd_fused): Likewise.
12653 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12655 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12656 (movsi_aarch64): Likewise.
12657 (load_pairsi): Likewise.
12658 (load_pairdi): Likewise.
12659 (store_pairsi): Likewise.
12660 (store_pairdi): Likewise.
12661 (load_pairsf): Likewise.
12662 (load_pairdf): Likewise.
12663 (store_pairsf): Likewise.
12664 (store_pairdf): Likewise.
12665 (zero_extend): Likewise.
12666 (trunc): Swap alternatives.
12667 (fcvt_target): Add '?' to prefer w over r.
12669 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12672 * config/i386/i386.md: Disallow non-commutative arithmetics in
12673 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12674 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12675 in the peephole2 before it.
12677 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12679 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12680 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12681 (ix86_handle_option): Handle -mcldemote.
12682 * config.gcc: New header.
12683 * config/i386/cldemoteintrin.h: New file.
12684 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12685 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12687 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12688 OPTION_MASK_ISA_CLDEMOTE.
12689 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12690 (ix86_valid_target_attribute_inner_p): Ditto.
12691 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12692 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12693 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12694 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12695 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12697 * config/i386/i386.opt: Add -mcldemote.
12698 * config/i386/x86intrin.h: New header.
12699 * doc/invoke.texi: Add -mcldemote.
12701 2018-05-14 Richard Biener <rguenther@suse.de>
12703 * doc/match-and-simplify.texi: Adjust :s documentation.
12705 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12707 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12708 intended memcpy size.
12709 (REORDER_45): Likewise.
12711 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12713 * sort.cc: New file.
12714 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12715 * vec.c (qsort_chk): Use gcc_qsort.
12716 * Makefile.in (OBJS-libcommon): Add sort.o.
12717 (build/sort.o): New target. Use it...
12718 (BUILD_RTL): ... here, and...
12719 (build/gencfn-macros): ... here, and...
12720 (build/genmatch): ... here.
12722 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12723 Chung-Ju Wu <jasonwucj@gmail.com>
12725 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12726 * config/nds32/nds32-graywolf.md: New file.
12727 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12728 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12730 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12731 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12732 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12733 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12734 * config/nds32/pipelines.md: Include n15 settings.
12736 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12737 Chung-Ju Wu <jasonwucj@gmail.com>
12739 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12740 * config/nds32/nds32-n13.md: New file.
12741 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12742 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12744 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12745 * config/nds32/nds32.md (pipeline_model): Add n13.
12746 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12747 * config/nds32/pipelines.md: Include n13 settings.
12749 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12750 Chung-Ju Wu <jasonwucj@gmail.com>
12752 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12753 * config/nds32/nds32-n10.md: New file.
12754 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12755 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12757 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12758 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12759 * config/nds32/nds32.md (pipeline_model): Add n10.
12760 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12761 * config/nds32/pipelines.md: Include n10 settings.
12763 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12764 Kito Cheng <kito.cheng@gmail.com>
12765 Chung-Ju Wu <jasonwucj@gmail.com>
12767 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12768 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12769 Add enum values for DSP extension instructions.
12770 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12772 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12773 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12774 New code iterators.
12775 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12776 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12777 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12778 * config/nds32/nds32-intrinsic.md: Likewise.
12779 * config/nds32/nds32_intrinsic.h: Likewise.
12780 * config/nds32/nds32-md-auxiliary.c: Likewise.
12781 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12782 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12783 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12784 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12785 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12786 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12787 TYPE_DMAC in switch statement.
12788 * config/nds32/nds32.c: New checking and implementation for DSP
12789 extension instructions.
12790 * config/nds32/nds32.h: Likewise.
12791 * config/nds32/nds32.md: Likewise.
12792 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12793 * config/nds32/predicates.md: Implement new predicates for DSP
12796 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12798 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12799 Reformat alternatives and attributes so it is easier to identify
12800 which constraints/attributes go with which instruction.
12801 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12802 (mov<mode>_softfloat32, FMOVE64): Likewise.
12803 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12804 (mov<mode>_softfloat64, FMOVE64): Likewise.
12806 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12808 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12810 (Basic PowerPC Built-in Functions): The new name of the
12811 subsection previously known as "PowerPC Built-in Functions".
12812 (Basic PowerPC Built-in Functions Available on all Configurations):
12814 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12815 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12816 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12817 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12819 2018-05-11 Martin Jambor <mjambor@suse.cz>
12822 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12825 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12828 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12830 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12832 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12833 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12834 (ix86_handle_option): Handle -mwaitpkg.
12835 * config.gcc: New header.
12836 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12837 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12838 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12840 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12841 OPTION_MASK_ISA_WAITPKG.
12842 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12843 (ix86_option_override_internal): Add PTA_WAITPKG.
12844 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12845 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12846 IX86_BUILTIN_TPAUSE.
12847 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12848 __builtin_ia32_umwait and __builtin_ia32_tpause.
12849 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12850 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12851 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12852 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12853 UNSPECV_TPAUSE): New.
12854 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12855 * config/i386/i386.opt: Add -mwaitpkg.
12856 * config/i386/waitpkgintrin.h: New file.
12857 * config/i386/x86intrin.h: New header.
12858 * doc/invoke.texi: Add -mwaitpkg.
12860 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12863 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12865 (cortex-m0): Use armv6s-m isa.
12866 (cortex-m0plus): Likewise.
12867 (cortex-m1): Likewise.
12868 (cortex-m0.small-multiply): Likewise.
12869 (cortex-m0plus.small-multiply): Likewise.
12870 (cortex-m1.small-multiply): Likewise.
12872 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12873 Jakub Jelinek <jakub@redhat.com>
12875 PR tree-optimization/85692
12876 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12877 source permute as well.
12879 2018-05-11 Martin Liska <mliska@suse.cz>
12882 * doc/extend.texi: Document LLVM style format for no_sanitize
12885 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12887 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12888 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12889 (mode_supports_vsx_dform_quad): Likewise.
12890 (mode_supports_vmx_dform): Move these functions to be next to the
12891 other mode_supports functions.
12892 (mode_supports_dq_form): Likewise.
12893 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12894 mode_supports_dq_form.
12895 (reg_offset_addressing_ok_p): Likewise.
12896 (offsettable_ok_by_alignment): Likewise.
12897 (rs6000_legitimate_offset_address_p): Likewise.
12898 (legitimate_lo_sum_address_p): Likewise.
12899 (rs6000_legitimize_address): Likewise.
12900 (rs6000_legitimize_reload_address): Likewise.
12901 (rs6000_secondary_reload_inner): Likewise.
12902 (rs6000_preferred_reload_class): Likewise.
12903 (rs6000_output_move_128bit): Likewise.
12905 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12907 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12908 Generate SImode target register for null target.
12909 <case IX86_BUILTIN_XGETBV>: Ditto.
12910 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12911 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12913 2018-05-10 Carl Love <cel@us.ibm.com>
12915 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12916 dcbtt and dcbtstt if operands[2] is 0.
12918 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12921 * config/i386/sse.md (usadv64qi): New expander.
12923 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12925 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12926 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12927 -maltivec=be support.
12928 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12929 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12930 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12931 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12932 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12933 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12934 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12935 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12936 altivec_vsumsws): Adjust.
12937 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12938 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12939 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12941 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12942 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12943 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12944 (altivec_lve<VI_char>x): Delete expand.
12945 (*altivec_lve<VI_char>x_internal): Rename to...
12946 (altivec_lve<VI_char>x): ... this.
12947 (altivec_lvxl_<mode>): Delete expand.
12948 (*altivec_lvxl_<mode>_internal): Rename to ...
12949 (altivec_lvxl_<mode>): ... this.
12950 (altivec_stvxl_<mode>): Delete expand.
12951 (*altivec_stvxl_<mode>_internal): Rename to ...
12952 (altivec_stvxl_<mode>): ... this.
12953 (altivec_stve<VI_char>x): Delete expand.
12954 (*altivec_stve<VI_char>x_internal): Rename to ...
12955 (altivec_stve<VI_char>x): ... this.
12956 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12957 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12958 reduc_plus_scal_<mode>): Adjust.
12959 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12961 (rs6000_cpu_cpp_builtins): Adjust.
12962 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12963 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12964 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12965 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12966 -maltivec=be support.
12967 (rs6000_split_vec_extract_var): Adjust.
12968 (rs6000_split_v4si_init): Adjust.
12969 (swap_selector_for_mode): Delete.
12970 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12971 altivec_expand_stvex_be): Delete.
12972 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12973 -maltivec=be support.
12974 (rs6000_gimple_fold_builtin): Ditto.
12975 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12977 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12978 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12979 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12980 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12981 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12982 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12983 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12984 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12985 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12986 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12987 anonymous split): Adjust.
12988 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12989 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12991 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12993 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12994 when --with-gxx-include-dir is also specified.
12995 * configure: Regenerate.
12997 2018-05-09 Jim Wilson <jimw@sifive.com>
13000 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13001 * config/riscv/t-withmultilib: New.
13002 * config/riscv/withmultilib.h: New.
13003 * doc/install.texi: Document RISC-V --with-multilib-list support.
13005 2018-05-09 Richard Biener <rguenther@suse.de>
13007 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13009 (vect_bb_vectorization_profitable_p): Adjust. Compute
13010 actual scalar cost using the cost vector and the add_stmt_cost
13013 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13015 PR rtl-optimization/85645
13016 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13017 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13019 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13021 PR rtl-optimization/85645
13022 * shrink-wrap.c (spread_components): Return a boolean saying if
13023 anything was changed.
13024 (try_shrink_wrapping_separate): Iterate spread_components until
13025 nothing changes anymore.
13027 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13029 PR rtl-optimization/85645
13030 * regrename.c (build_def_use): Also kill the chains that include the
13031 destination of a REG_CFA_REGISTER note.
13033 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13035 PR rtl-optimization/85645
13036 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13037 insn that has a REG_CFA_REGISTER note.
13039 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13041 * cfgexpand.c (expand_clobber): New function.
13042 (expand_gimple_stmt_1): Use it.
13043 * tree-vect-stmts.c (vect_clobber_variable): New function,
13045 (vectorizable_simd_clone_call): ...here.
13046 (vectorizable_store): Emit a clobber either side of an
13047 IFN_STORE_LANES sequence.
13048 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13050 2018-05-09 Tom de Vries <tom@codesourcery.com>
13053 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13054 (define_insn "trap_if_false"): Add exit after trap.
13056 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13058 PR rtl-optimization/85638
13059 * bb-reorder.c: Include common/common-target.h.
13060 (create_forwarder_block): New function extracted from...
13061 (fix_up_crossing_landing_pad): ...here. Rename into...
13062 (dw2_fix_up_crossing_landing_pad): ...this.
13063 (sjlj_fix_up_crossing_landing_pad): New function.
13064 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13065 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13066 from both partitions and exit the loop after one iteration.
13068 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13071 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13073 (Basic PowerPC Built-in Functions): The new name of the
13074 subsection previously known as "PowerPC Built-in Functions".
13075 (Basic PowerPC Built-in Functions Available on all Configurations):
13077 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13079 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13081 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13083 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13086 2018-05-08 Jim Wilson <jimw@sifive.com>
13088 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13089 (LD_EMUL_SUFFIX): New.
13090 (LINK_SPEC): Use it.
13092 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13094 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13096 (Basic PowerPC Built-in Functions): The new name of the
13097 subsection previously known as "PowerPC Built-in Functions".
13098 (Basic PowerPC Built-in Functions Available on all Configurations):
13100 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13102 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13104 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13106 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13109 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13112 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13113 after cmpelim optimization.
13115 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13117 * config.gcc: Support "goldmont".
13118 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13119 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13120 PROCESSOR_GOLDMONT.
13121 * config/i386/i386.c (m_GOLDMONT): Define.
13122 (processor_target_table): Add "goldmont".
13123 (PTA_GOLDMONT): Define.
13124 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13125 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13126 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13127 (fold_builtin_cpu): Add "goldmont".
13128 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13129 (ix86_option_override_internal): Add "goldmont".
13130 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13131 (processor_type): Add PROCESSOR_GOLDMONT.
13132 * config/i386/i386.md: Add CPU "glm".
13133 * config/i386/glm.md: New file.
13134 * config/i386/x86-tune.def: Add m_GOLDMONT.
13135 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13137 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13140 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13142 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13143 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13144 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13147 * config/i386/i386.c (ix86_fold_builtin): Handle
13148 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13151 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13152 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13154 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13157 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13158 (check_arch): Likewise.
13159 (check_fpu): Return the result rather than printing it.
13160 (end arch): Fix operator precedence.
13161 (end cpu): Likewise.
13162 (END): Print the result from check_fpu.
13164 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13165 Alan Hayward <alan.hayward@arm.com>
13166 David Sherwood <david.sherwood@arm.com>
13168 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13169 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13170 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13171 (*fcmuo<mode>_and): New patterns.
13173 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13175 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13176 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13177 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13178 (cmp_op, sve_imm_con): New code attributes.
13179 (SVE_COND_INT_CMP, imm_con): Delete.
13180 (cmp_op): Remove above unspecs from int attribute.
13181 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13183 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13184 comparison-specific unspecs.
13185 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13186 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13187 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13188 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13189 (*vec_fcm<cmp_op><mode>): Rename to...
13190 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13191 (*vec_fcmuo<mode>): Rename to...
13192 (*fcmuo<mode>): ...this and adjust likewise.
13193 (*pred_fcm<cmp_op><mode>): New pattern.
13194 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13195 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13197 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13199 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13200 (aarch64_emit_sve_predicated_cond): New function.
13201 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13202 (aarch64_emit_unspec_cond_or): Replace with...
13203 (aarch64_emit_sve_or_conds): ...this new function. Use
13204 aarch64_emit_sve_ptrue_op for the individual comparisons and
13205 aarch64_emit_binop to OR them together.
13206 (aarch64_emit_inverted_unspec_cond): Replace with...
13207 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13208 aarch64_emit_sve_ptrue_op for the comparison and
13209 aarch64_emit_unop to invert the result.
13210 (aarch64_expand_sve_vec_cmp_float): Update after the above
13211 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13213 2018-05-07 Nathan Sidwell <nathan@acm.org>
13215 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13216 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13217 (Backwards Compatibility): Likewise.
13219 2018-05-07 Luis Machado <luis.machado@linaro.org>
13223 2018-05-07 Luis Machado <luis.machado@linaro.org>
13225 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13226 <prefetch_dynamic_strides>: New const bool field.
13227 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13228 prefetch_dynamic_strides.
13229 (exynosm1_prefetch_tune): Likewise.
13230 (thunderxt88_prefetch_tune): Likewise.
13231 (thunderx_prefetch_tune): Likewise.
13232 (thunderx2t99_prefetch_tune): Likewise.
13233 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13235 (aarch64_override_options_internal): Update to set
13236 PARAM_PREFETCH_DYNAMIC_STRIDES.
13237 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13238 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13239 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13240 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13241 prefetch-dynamic-strides setting.
13243 2018-05-07 Luis Machado <luis.machado@linaro.org>
13245 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13246 <minimum_stride>: New const int field.
13247 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13248 minimum_stride field.
13249 (exynosm1_prefetch_tune): Likewise.
13250 (thunderxt88_prefetch_tune): Likewise.
13251 (thunderx_prefetch_tune): Likewise.
13252 (thunderx2t99_prefetch_tune): Likewise.
13253 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13254 (aarch64_override_options_internal): Update to set
13255 PARAM_PREFETCH_MINIMUM_STRIDE.
13256 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13257 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13258 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13259 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13260 stride is constant and is below the minimum stride threshold.
13262 2018-05-07 Luis Machado <luis.machado@linaro.org>
13264 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13267 2018-05-07 Luis Machado <luis.machado@linaro.org>
13269 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13270 <prefetch_dynamic_strides>: New const bool field.
13271 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13272 prefetch_dynamic_strides.
13273 (exynosm1_prefetch_tune): Likewise.
13274 (thunderxt88_prefetch_tune): Likewise.
13275 (thunderx_prefetch_tune): Likewise.
13276 (thunderx2t99_prefetch_tune): Likewise.
13277 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13279 (aarch64_override_options_internal): Update to set
13280 PARAM_PREFETCH_DYNAMIC_STRIDES.
13281 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13282 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13283 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13284 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13285 prefetch-dynamic-strides setting.
13287 2018-05-07 Luis Machado <luis.machado@linaro.org>
13289 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13290 <minimum_stride>: New const int field.
13291 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13292 minimum_stride field.
13293 (exynosm1_prefetch_tune): Likewise.
13294 (thunderxt88_prefetch_tune): Likewise.
13295 (thunderx_prefetch_tune): Likewise.
13296 (thunderx2t99_prefetch_tune): Likewise.
13297 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13298 (aarch64_override_options_internal): Update to set
13299 PARAM_PREFETCH_MINIMUM_STRIDE.
13300 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13301 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13302 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13303 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13304 stride is constant and is below the minimum stride threshold.
13306 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13309 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13310 the type is addressable. Don't force op into register if it has
13313 2018-05-05 Roland McGrath <mcgrathr@google.com>
13316 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13317 any section for which we don't know a specific type it should have,
13318 regardless of name. Previously this was done only for the exact
13319 names ".init_array", ".fini_array", and ".preinit_array".
13320 (default_elf_asm_named_section): Add comment about
13321 relationship with default_section_type_flags and SECTION_NOTYPE.
13322 (get_section): Don't consider it a type conflict if one side has
13323 SECTION_NOTYPE and the other doesn't, as long as neither has the
13324 SECTION_BSS et al used in the default_section_type_flags logic.
13326 2018-05-05 Tom de Vries <tom@codesourcery.com>
13329 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13330 (workaround_barsyncs): New function.
13331 (nvptx_reorg): Use workaround_barsyncs.
13332 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13333 (define_expand "nvptx_membar_cta"): New define_expand.
13334 (define_insn "*nvptx_membar_cta"): New insn.
13336 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13338 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13339 To improve optimization opportunities.
13340 * builtin-types.def: The new needed builtin types for the above.
13342 2018-05-04 Richard Biener <rguenther@suse.de>
13344 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13345 * gimple-ssa-store-merging.c
13346 (imm_store_chain_info::output_merged_store): Remove redundant create,
13347 release split_store vector contents on failure.
13348 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13349 scalar stmt vector on cache hit.
13351 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13353 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13355 * config.gcc (powerpc-xilinx-eabi*): Remove.
13356 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13358 (fusion_addis_mem_combo_load): Ditto.
13359 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13361 (rs6000_cpu_cpp_builtins): Ditto.
13362 * config/rs6000/rs6000-linux.c
13363 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13364 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13365 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13367 (rs6000_setup_reg_addr_masks): Ditto.
13368 (rs6000_init_hard_regno_mode_ok): Ditto.
13369 (rs6000_option_override_internal): Ditto.
13370 (legitimate_lo_sum_address_p): Ditto.
13371 (rs6000_legitimize_address): Ditto.
13372 (rs6000_legitimize_reload_address): Ditto.
13373 (rs6000_legitimate_address_p): Ditto.
13374 (abi_v4_pass_in_fpr): Ditto.
13375 (setup_incoming_varargs): Ditto.
13376 (rs6000_gimplify_va_arg): Ditto.
13377 (rs6000_split_multireg_move): Ditto.
13378 (rs6000_savres_strategy): Ditto.
13379 (rs6000_emit_prologue_components): Ditto.
13380 (rs6000_emit_epilogue_components): Ditto.
13381 (rs6000_emit_prologue): Ditto.
13382 (rs6000_emit_epilogue): Ditto.
13383 (rs6000_elf_file_end): Ditto.
13384 (rs6000_function_value): Ditto.
13385 (rs6000_libcall_value): Ditto.
13386 * config/rs6000/rs6000.h: Ditto.
13387 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13388 (TARGET_MINMAX): ... this. New.
13389 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13390 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13391 (*movsi_internal1_single): Delete.
13392 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13393 mfpu=, mxilinx-fpu): Delete.
13394 * config/rs6000/singlefp.h: Delete.
13395 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13396 * config/rs6000/t-rs6000: Ditto.
13397 * config/rs6000/t-xilinx: Delete.
13398 * config/rs6000/titan.md: Adjust for fp_type removal.
13399 * config/rs6000/vsx.md: Remove Xilinx FP support.
13400 (VStype_simple): Delete.
13401 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13402 * config/rs6000/xfpu.h: Delete.
13403 * config/rs6000/xfpu.md: Delete.
13404 * config/rs6000/xilinx.h: Delete.
13405 * config/rs6000/xilinx.opt: Delete.
13406 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13407 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13409 2018-05-04 Tom de Vries <tom@codesourcery.com>
13412 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13415 2018-05-04 Richard Biener <rguenther@suse.de>
13417 PR middle-end/85627
13418 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13419 (expand_complex_div_wide): Likewise.
13420 (expand_complex_operations_1): Likewise.
13421 (expand_complex_libcall): Preserve EH info of the original stmt.
13422 (tree_lower_complex): Handle removed blocks.
13423 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13424 on complex multiplication and division libcall builtins.
13426 2018-05-04 Richard Biener <rguenther@suse.de>
13428 PR middle-end/85574
13429 * fold-const.c (negate_expr_p): Restrict negation of operand
13430 zero of a division to when we know that can happen without
13432 (fold_negate_expr_1): Likewise.
13434 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13437 * real.h (real_nextafter): Declare.
13438 * real.c (real_nextafter): New function.
13439 * fold-const-call.c (fold_const_nextafter): New function.
13440 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13441 CASE_CFN_NEXTTOWARD.
13442 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13443 even when arg1_mode is different from arg0_mode.
13445 2018-05-03 Nathan Sidwell <nathan@acm.org>
13447 * doc/extend.texi (Deprecated Features): Remove
13448 -ffriend-injection.
13449 (Backwards Compatibility): Likewise.
13450 * doc/invoke.texi (C++ Language Options): Likewise.
13451 (C++ Dialect Options): Likewise.
13453 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13456 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13457 _mm512_mask_mullox_epi64): New intrinsics.
13459 2018-05-03 Tom de Vries <tom@codesourcery.com>
13462 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13463 dump files): Add offload-tree.
13465 2018-05-03 Richard Biener <rguenther@suse.de>
13467 PR tree-optimization/85615
13468 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13469 to loops not nested in BBs loop father to avoid creating multi-entry
13472 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13474 PR tree-optimization/70291
13475 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13476 arguments. Change return type to tree. Emit libcall as a new
13477 statement rather than replacing existing one when inplace_p is true.
13478 (expand_complex_multiplication_components): New function.
13479 (expand_complex_multiplication): Expand floating-point complex
13480 multiplication using the above.
13481 (expand_complex_division): Rename inner_type parameter to type.
13482 Update expand_complex_libcall call-site.
13483 (expand_complex_operations_1): Update expand_complex_multiplication
13484 and expand_complex_division call-sites.
13486 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13489 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13490 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13491 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13492 the highest significant bit of the shift count mask is clear. In
13493 check whether and[sq]i3 is needed verify that all significant bits
13494 of the shift count other than the highest are set.
13496 2018-05-02 Tom de Vries <tom@codesourcery.com>
13499 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13500 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13501 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13502 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13503 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13504 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13505 __builtin_goacc_parlevel_size.
13507 2018-05-02 Richard Biener <rguenther@suse.de>
13509 PR tree-optimization/85597
13510 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13511 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13514 2018-05-02 Tom de Vries <tom@codesourcery.com>
13517 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13518 dump files): Add ltrans-tree.
13520 2018-05-02 Tom de Vries <tom@codesourcery.com>
13523 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13524 dump files): Add wpa-ipa.
13526 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13528 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13529 powerpc*-*-linux*paired* target.
13530 * config/rs6000/750cl.h: Delete.
13531 * config/rs6000/paired.h: Delete.
13532 * config/rs6000/paired.md: Delete.
13533 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13535 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13536 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13537 comment. Remove paired float support.
13538 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13539 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13541 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13542 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13544 * config/rs6000/rs6000.c: Remove paired float support.
13545 (paired_expand_vector_init, paired_expand_vector_move,
13546 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13547 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13548 paired_expand_builtin, paired_expand_predicate_builtin,
13549 paired_init_builtins): Delete.
13550 * config/rs6000/rs6000.h: Remove paired float support.
13551 * config/rs6000/rs6000.md: Remove paired float support.
13552 (move_from_CR_ov_bit): Delete.
13553 * config/rs6000/rs6000.opt (mpaired): Delete.
13554 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13555 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13557 2018-05-02 Richard Biener <rguenther@suse.de>
13559 PR middle-end/85567
13560 * gimplify.c (gimplify_save_expr): When in SSA form allow
13561 SAVE_EXPRs to compute to SSA vars.
13563 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13566 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13567 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13568 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13569 clobber operands[2], instead use a new pseudo. Formatting fixes.
13571 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13573 PR tree-optimization/85586
13574 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13575 exit early for statements in the same group if the accesses are
13578 2018-05-02 Tom de Vries <tom@codesourcery.com>
13581 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13584 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13586 PR tree-optimization/85143
13587 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13589 2018-05-01 Tom de Vries <tom@codesourcery.com>
13592 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13593 not found" error message.
13595 2018-05-01 Tom de Vries <tom@codesourcery.com>
13598 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13599 * vec.c (test_ordered_remove_if): New function.
13600 (vec_c_tests): Call test_ordered_remove_if.
13601 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13602 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13603 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13604 VEC_ORDERED_REMOVE_IF.
13606 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13608 PR tree-optimization/82665
13609 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13610 pointer subtraction where arguments come from a memchr call.
13612 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13614 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13615 --push-state --as-needed and --pop-state instead of --as-needed and
13616 --no-as-needed if ld supports it.
13617 * configure: Regenerated.
13620 * doc/install.texi2html: Replace _002d with - and _002a with * in
13621 generated html files using sed.
13623 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13626 * gcc-rich-location.c (blank_line_before_p): New function.
13627 (use_new_line): New function.
13628 (gcc_rich_location::add_fixit_insert_formatted): New function.
13629 * gcc-rich-location.h
13630 (gcc_rich_location::add_fixit_insert_formatted): New function.
13632 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13634 * selftest.c (assert_streq): Rename "expected" and "actual" to
13635 "val1" and "val2". Extend NULL-handling to cover both inputs
13636 symmetrically, while still requiring both to be non-NULL for a pass.
13637 * selftest.h (assert_streq): Rename "expected" and "actual" to
13639 (ASSERT_EQ): Likewise.
13640 (ASSERT_EQ_AT): Likewise.
13641 (ASSERT_KNOWN_EQ): Likewise.
13642 (ASSERT_KNOWN_EQ_AT): Likewise.
13643 (ASSERT_NE): Likewise.
13644 (ASSERT_MAYBE_NE): Likewise.
13645 (ASSERT_MAYBE_NE_AT): Likewise.
13646 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13647 the assertion to pass.
13648 (ASSERT_STREQ_AT): Likewise.
13650 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13652 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13653 interaction with -pie.
13655 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13657 * selftest.h: Fix alphabetization of per-source-file selftest
13660 2018-04-30 Jason Merrill <jason@redhat.com>
13662 PR c++/61982 - dead stores to destroyed objects.
13663 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13666 2018-04-30 Jason Merrill <jason@redhat.com>
13668 * tree.c (build_clobber): New.
13669 * tree.h: Declare it.
13670 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13672 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13674 * diagnostic-show-locus.c (layout::layout): Update for
13675 location_get_source_line returning a char_span.
13676 (struct char_span): Move to input.h.
13677 (struct correction): Update for fields in char_span becoming
13679 (struct source_line): Update for location_get_source_line
13680 returning a char_span.
13681 (layout::print_line): Likewise.
13682 * edit-context.c (edited_file::print_content): Likewise.
13683 (edited_file::print_diff_hunk): Likewise.
13684 (edited_file::print_run_of_changed_lines): Likewise.
13685 (edited_file::get_num_lines): Likewise.
13686 (edited_line::edited_line): Likewise.
13687 * final.c (asm_show_source): Likewise.
13688 * input.c (location_get_source_line): Convert return type
13689 from const char * to char_span, losing the final "line_len"
13691 (dump_location_info): Update for the above.
13692 (get_substring_ranges_for_loc): Likewise. Use a char_span
13693 when handling the literal within the line.
13694 (test_reading_source_line): Update for location_get_source_line
13695 returning a char_span.
13696 * input.h (class char_span): Move here from
13697 diagnostic-show-locus.c, converting from a struct to a class.
13698 Make data members private.
13699 (char_span::operator bool): New.
13700 (char_span::length): New.
13701 (char_span::get_buffer): New.
13702 (char_span::operator[]): New.
13703 (char_span::subspan): Make const.
13704 (char_span::xstrdup): New.
13705 (location_get_source_line): Convert return type from const char *
13706 to char_span, losing the final "line_size" param.
13708 2018-04-30 Jan Hubicka <jh@suse.cz>
13710 * lto-wrapper.c (ltrans_priorities): New static var.
13711 (cmp_priority): New.
13712 (run_gcc): Read priorities and if doing parallel build order
13713 the Makefile by them.
13715 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13717 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13719 2018-04-30 Richard Biener <rguenther@suse.de>
13721 * tree-cfg.c (verify_address): Remove base argument, add
13722 flag whether to check TREE_ADDRESSABLE and do that.
13723 (verify_expr): Remove.
13724 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13725 (verify_gimple_assign_single): Likewise.
13726 (verify_gimple_switch): Likewise.
13727 (verify_expr_location_1): Dereference tp once. Add (disabled)
13728 piece from verify_expr.
13729 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13731 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13733 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13735 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13737 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13738 (small_data_pattern): Likewise.
13739 (arc_rewrite_small_data): Likewise.
13740 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13741 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13742 (get_symbol_alignment): New function.
13743 (legitimate_small_data_address_p): Likewise.
13744 (legitimate_scaled_address): Update, call
13745 legitimate_small_data_address_p.
13746 (output_sdata): New static variable.
13747 (arc_print_operand): Update how we handle small data operands.
13748 (arc_print_operand_address): Likewise.
13749 (arc_legitimate_address_p): Update, use
13750 legitimate_small_data_address_p.
13751 (arc_rewrite_small_data_p): Remove.
13752 (arc_rewrite_small_data_1): Likewise.
13753 (arc_rewrite_small_data): Likewise.
13754 (small_data_pattern): Likewise.
13755 (compact_sda_memory_operand): Update to use
13756 legitimate_small_data_address_p and get_symbol_alignment.
13757 (prepare_move_operands): Don't rewite sdata pattern.
13758 (prepare_extend_operands): Remove.
13759 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13761 (zero_extendqisi2): Likewise.
13762 (zero_extendhisi2): Likewise.
13763 (extendqihi2): Likewise.
13764 (extendqisi2): Likewise.
13765 (extendhisi2): Likewise.
13766 (addsi3): Likewise.
13767 (subsi3): Likewise.
13768 (andsi3): Likewise.
13769 * config/arc/constraints.md (Usd): Change it to memory constraint.
13771 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13773 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13774 as source of std instructions.
13775 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13776 allow 6-bit constants as source for store instructions.
13777 (movdi_insn): Update instruction pattern to allow 6-bit constants
13778 as source for store instructions.
13780 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13782 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13784 2018-04-30 Nathan Sidwell <nathan@acm.org>
13785 Sandra Loosemore <sandra@codesourcery.com>
13787 * dumpfile.c (dump_open): Allow '-' for stdout.
13788 * doc/invoke.texi (Developer Options): Document dump filename
13789 determination early. Document stdin/stdout selection.
13791 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13793 Microblaze Target: PIC data text relative
13795 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13796 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13798 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13799 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13800 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13801 New addressing mode for data-text relative position indepenedent code.
13802 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13803 'ADDRESS_SYMBOLIC_TXT_REL'.
13804 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13805 (microblaze_legitimate_pic_operand): Exclude function calls from
13806 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13807 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13809 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13810 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13811 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13812 for 'address + offset'.
13813 (microblaze_expand_prologue): Add new function prologue call for
13815 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13816 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13817 table in case of TARGET_PIC_DATA_TEXT_REL.
13818 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13819 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13820 Add new macros 'UNSPEC_TEXT',
13821 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13822 + exclude function calls from 'UNSPEC_PLT' in case of data text
13824 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13825 new target hook for generating address diff vector tables in case of
13827 * doc/tm.texi : Regenerate.
13828 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13829 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13830 of addr diff vector generation.
13831 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13832 target hook definition.
13833 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13834 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13835 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13836 option for data text relative.
13838 2018-04-30 Richard Biener <rguenther@suse.de>
13840 * tree-chrec.h (evolution_function_is_constant_p): Remove
13842 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13844 2018-04-30 Richard Biener <rguenther@suse.de>
13847 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13849 2018-04-30 Richard Biener <rguenther@suse.de>
13851 PR tree-optimization/28364
13852 PR tree-optimization/85275
13853 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13854 copying first exit test.
13856 2018-04-28 Mark Wielaard <mark@klomp.org>
13858 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13859 dwarf_version >= 5.
13860 (dwarf_AT): Handle DW_AT_addr_base.
13861 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13863 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13866 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13867 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13868 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13869 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13871 2018-04-28 Richard Biener <rguenther@suse.de>
13873 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13874 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13875 to reflect use. Only add interesting stmts.
13877 2018-04-27 Martin Jambor <mjambor@suse.cz>
13880 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13881 the jump function allows for passing through aggregate values.
13883 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13885 * input.h (in_system_header_at): Convert from macro to inline
13887 (from_macro_expansion_at): Likewise.
13888 (from_macro_definition_at): Likewise.
13890 2018-04-27 Jeff Law <law@redhat.com>
13892 * config.gcc: Mark tile* targets as deprecated/obsolete.
13894 2018-04-27 Richard Biener <rguenther@suse.de>
13896 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13899 2018-04-27 Richard Biener <rguenther@suse.de>
13901 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13903 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13905 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13906 with Yd constraint. Set "preferred_for_speed" attribute from
13907 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13908 with Yd constraint.
13909 (*movdi_internal): Ditto.
13910 (movti_interunit splitters): Remove
13911 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13912 (movdi_interunit splitters): Ditto.
13913 * config/i386/constraints.md (Ye): Remove.
13914 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13916 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13919 * config/aarch64/constraints.md (Usg): Limit to 31.
13920 (Usj): Limit to 63.
13922 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13924 PR tree-optimization/85529
13925 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13926 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13927 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13928 zero extension or masking of the MSB bit.
13929 (optimize_range_tests): Add FIRST_BB argument, pass it through
13930 to optimize_range_tests_var_bound.
13931 (maybe_optimize_range_tests, reassociate_bb): Adjust
13932 optimize_range_tests callers.
13934 2018-04-26 Richard Biener <rguenther@suse.de>
13935 Jakub Jelinek <jakub@redhat.com>
13937 * cgraph.h (symbol_table): Just declare debug method here.
13938 * symtab.c (symbol_table::debug): Define.
13940 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13942 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13944 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13946 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13947 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13948 (*movdi_internal): Substitute Yi and Yj constraint with x
13949 and Ym and Yn constraint with y constraint. Update "isa"
13950 attribute and set "preferred_for_speed" attribute from
13951 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13952 (*movsi_internal): Ditto.
13953 (*movdf_internal): Ditto.
13954 (*movsf_internal): Ditto.
13955 (*zero_extendsidi2): Ditto.
13956 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13957 (sse2_loadld): Ditto.
13958 (*vec_extract<ssevecmodelower>_0): Ditto.
13959 (*vec_extractv4si_0_zext_sse4): Ditto.
13960 (vec_concatv2di): Ditto.
13961 (*vec_dup<mode>): Ditto.
13962 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13963 * config/i386/constraints.md (Yi): Remove.
13968 2018-04-26 Nathan Sidwell <nathan@acm.org>
13970 * dumpfile.c (dump_open): New.
13971 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13972 (dump_finish): Detect stdio/stderr by value not name.
13974 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13976 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13978 2018-04-26 Tom de Vries <tom@codesourcery.com>
13981 * config/nvptx/nvptx.c (verify_neutering_jumps)
13982 (verify_neutering_labels): New function
13983 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13985 2018-04-26 Tom de Vries <tom@codesourcery.com>
13988 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13989 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13992 2018-04-26 Richard Biener <rguenther@suse.de>
13993 Tom de Vries <tom@codesourcery.com>
13996 * lto-streamer-out.c (output_function): Fixup loops if required to match
13997 discovery done in the reader.
13999 2018-04-26 Richard Biener <rguenther@suse.de>
14001 PR tree-optimization/85116
14002 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14003 have a loop exit from the single latch predecessor. Remove
14004 case of header with just condition.
14005 (ch_base::copy_headers): Exclude infinite loops from any
14007 (pass_ch::execute): Record exits.
14009 2018-04-26 Richard Biener <rguenther@suse.de>
14011 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14012 prologue cost vector and pass it to vect_get_load_cost.
14013 (vect_get_peeling_costs_all_drs): Likewise.
14014 (vect_peeling_hash_get_lowest_cost): Likewise.
14015 (vect_enhance_data_refs_alignment): Likewise.
14017 2018-04-26 Richard Biener <rguenther@suse.de>
14019 PR middle-end/85450
14020 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14021 checking of integer<->pointer conversions.
14022 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14023 sign-/zero-extending pointer types.
14024 (expand_omp_for_static_chunk): Likewise.
14026 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14027 Jean Lee <xiaoyur347@gmail.com>
14029 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14030 (TARGET_ASAN_SHADOW_OFFSET): Define.
14031 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14032 true for -fsanitize=address.
14034 2018-04-25 Mark Wielaard <mark@klomp.org>
14036 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14039 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14041 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14042 than "alu", remove explicit "memory" and "imm_disp" attributes.
14043 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14045 PR middle-end/85414
14046 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14047 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14048 gen_lowpart_no_emit.
14050 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14053 * config/i386/i386.c (ix86_expand_builtin): Change memory
14054 operand to XI, extend p0 to Pmode.
14055 * config/i386/i386.md: Change unspec volatile and operand
14056 1 mode to XI, change operand 0 mode to P.
14058 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14060 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14061 GET_MODE_MASK before any checking.
14062 (nds32_can_use_bset_p): Likewise.
14063 (nds32_can_use_btgl_p): Likewise.
14065 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14067 * config/nds32/nds32-doubleword.md: New define_split pattern for
14068 illegal register number.
14070 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14072 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14074 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14076 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14078 2018-04-25 Richard Biener <rguenther@suse.de>
14080 * lto-streamer.h (LTO_major_version): Bump to 8.
14082 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14084 * BASE-VER: Set to 9.0.0.
14086 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14088 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14089 in __abskf2 and __powikf2.
14091 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14094 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14095 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14096 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14097 Use the above on operand 2. Reindent.
14098 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14100 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14103 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14105 * config/i386/i386.opt (mcet): Removed.
14106 * doc/install.texi: Remove -mcet documentation.
14107 * doc/invoke.texi: Likewise.
14109 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14112 * doc/install.texi: Remove -mcet from bootstrap-cet.
14114 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14117 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14118 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14122 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14123 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14124 containing a CONST_VECTOR.
14126 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14128 * doc/install.texi: Update newlib dependency for nvptx.
14130 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14133 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14134 instead of INTVAL when shifting x left.
14136 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14138 PR tree-optimization/85478
14139 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14140 vect_grouped_store_supported for single element vectors.
14142 2018-04-24 Richard Biener <rguenther@suse.de>
14145 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14146 load cost increase to the case of non-constant step.
14148 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14151 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14152 destination if any_malformed_asm.
14154 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14156 PR middle-end/85496
14157 * expr.c (store_field): In the bitfield case, if the value comes from
14158 a function call and is returned in registers by means of a PARALLEL,
14159 do not change the mode of the temporary unless BLKmode and VOIDmode.
14161 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14163 PR rtl-optimization/85423
14164 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14165 dependencies to debug insns when the previous insn is non-debug.
14167 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14169 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14170 enums into a single definition.
14171 (fls): Fix predicates and printing.
14174 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14176 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14177 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14178 and short u6 immediate.
14179 (check_if_valid_sleep_operand): Remove.
14180 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14182 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14184 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14185 flag_always_save_lp condition.
14186 * config/nds32/nds32.opt (malways-save-lp): New option.
14188 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14190 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14191 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14192 * config/nds32/nds32.h
14193 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14194 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14196 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14198 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14199 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14201 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14202 Chung-Ju Wu <jasonwucj@gmail.com>
14204 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14206 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14207 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14209 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14211 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14213 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14215 * config/nds32/nds32-protos.h (nds32_data_alignment,
14216 nds32_local_alignment): Declare.
14217 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14218 nds32_local_alignment): New functions.
14219 (TARGET_CONSTANT_ALIGNMENT): Define.
14220 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14222 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14224 * config/nds32/nds32.c
14225 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14226 (TARGET_MODES_TIEABLE_P): Likewise.
14228 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14230 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14231 level Ofast and Og.
14233 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14234 Chung-Ju Wu <jasonwucj@gmail.com>
14236 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14237 for unaligned access.
14238 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14240 * config/nds32/nds32-intrinsic.md: Likewise.
14241 * config/nds32/nds32_intrinsic.h: Likewise.
14242 * config/nds32/nds32.h (nds32_builtins): Likewise.
14243 * config/nds32/nds32.opt (munaligned-access): New option.
14244 * config/nds32/nds32.c (nds32_asm_file_start): Display
14245 flag_unaligned_access status.
14247 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14249 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14250 -mno-relax is present.
14251 * config/riscv/linux.h (LINK_SPEC): Ditto.
14253 2018-04-20 Martin Sebor <msebor@redhat.com>
14256 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14258 (gimple_fold_builtin_stxcpy_chk): Same.
14259 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14261 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14264 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14265 __powikf2 when long double is IEEE 128-bit.
14267 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14269 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14270 step to make sure stack always aligned.
14272 2018-04-20 Carl Love <cel@us.ibm.com>
14275 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14276 size check for arg0.
14278 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14279 Tom de Vries <tom@codesourcery.com>
14282 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14283 Emit insns for calls too.
14284 (nvptx_find_par): Always look for worker-level predecessor insn.
14285 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14287 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14288 (nvptx_process_pars): Propagate frames for calls.
14290 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14293 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14295 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14296 (ix86_handle_option): Don't handle OPT_mibt.
14297 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14299 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14301 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14302 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14303 (ix86_target_macros): Define __CET__ with flag_cf_protection
14304 for -fcf-protection.
14305 * config/i386/i386.c (isa2_opts): Remove -mibt.
14306 * config/i386/i386.h (TARGET_IBT): Removed.
14307 (TARGET_IBT_P): Likewise.
14308 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14309 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14310 * config/i386/i386.opt (mcet): Update help message.
14311 (mshstk): Likewise.
14313 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14314 -mcet as an alias for -mshstk.
14316 2018-04-20 Richard Biener <rguenther@suse.de>
14318 PR middle-end/85475
14319 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14320 complexity by forcing a single use of the multiply operand.
14322 2018-04-20 Martin Jambor <mjambor@suse.cz>
14325 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14326 recursion dependency to only apply to non-clones.
14328 2018-04-20 Martin Jambor <mjambor@suse.cz>
14331 * ipa-cp.c (create_specialized_node): Check that clones of
14332 self-recursive edges exist during IPA-CP.
14334 2018-04-19 Toon Moene <toon@moene.org>
14336 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14339 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14341 PR tree-optimization/85467
14342 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14343 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14344 VECTOR_CST element to type.
14346 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14349 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14350 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14351 (builtin_longjmp): Likewise.
14352 (save_stack_nonlocal): New pattern.
14353 (restore_stack_nonlocal): Likewise.
14355 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14358 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14359 Replace ASM_OUTPUT_LABEL with fprintf.
14361 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14364 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14365 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14366 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14367 define __IBT__ and __SHSTK__ for -fcf-protection.
14368 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14370 (ix86_trampoline_init): Likewise.
14371 (x86_output_mi_thunk): Likewise.
14372 (ix86_notrack_prefixed_insn_p): Likewise.
14373 (ix86_option_override_internal): Don't disallow -fcf-protection.
14374 * config/i386/i386.md (rdssp<mode>): Also enable for
14376 (incssp<mode>): Likewise.
14377 (nop_endbr): Likewise.
14378 * config/i386/i386.opt (mcet): Change help message to built-in
14381 (mshstk): Likewise.
14382 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14383 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14384 enable CET built-in functions.
14386 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14388 * common/config/i386/i386-common.c
14389 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14390 OPTION_MASK_ISA_MOVDIRI_UNSET,
14391 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14392 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14393 * config.gcc (movdirintrin.h): New header.
14394 * config/i386/cpuid.h (bit_MOVDIRI,
14395 bit_MOVDIR64B): New bits.
14396 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14398 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14399 (VOID, PVOID, PCVOID)): New function types.
14400 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14401 __builtin_ia32_directstoreu_u64,
14402 __builtin_ia32_movdir64b): New builtins.
14403 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14404 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14406 (ix86_valid_target_attribute_inner_p): Ditto.
14407 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14408 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14409 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14410 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14411 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14412 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14413 (movdiri<mode>, movdir64b_<mode>): New.
14414 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14415 * config/i386/immintrin.h: Include movdirintrin.h.
14416 * config/i386/movdirintrin.h: New file.
14417 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14419 2018-04-19 Richard Biener <rguenther@suse.de>
14421 PR middle-end/85455
14422 * cfg.c (clear_bb_flags): When loop state says we have
14423 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14425 2018-04-19 Richard Biener <rguenther@suse.de>
14427 PR tree-optimization/84737
14428 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14429 copying restrict info.
14430 (vect_setup_realignment): Use it.
14431 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14432 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14433 the first DR to all generated stores.
14434 (vectorizable_load): Likewise for loads.
14436 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14438 PR tree-optimization/85446
14439 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14440 the integral and pointer types to have the same precision.
14442 * doc/install.texi: Document --disable-cet being the default and
14445 2018-04-18 Martin Liska <mliska@suse.cz>
14447 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14450 2018-04-18 Martin Liska <mliska@suse.cz>
14453 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14456 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14457 arguments if they are comparable.
14459 2018-04-18 Martin Liska <mliska@suse.cz>
14462 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14465 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14468 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14471 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14472 ENDBR after calling __morestack.
14474 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14477 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14478 by using gcc_base_ver to generate a gcc_driver_version, and use
14479 it when generating GCC_DRIVER_NAME.
14480 * configure: Regenerate.
14482 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14485 * config.gcc: Obsolete powerpc*-*-*spe*.
14487 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14490 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14491 (stabstr_D): Change type of unum from unsigned int to
14492 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14495 2018-04-17 Jim Wilson <jimw@sifive.com>
14498 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14499 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14500 Set arg_pointer_offset after using pretend_args_size.
14502 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14504 PR rtl-optimization/85431
14505 * dse.c (record_store): Ignore zero width stores.
14508 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14509 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14510 __builtin_stack_restore rather than after it.
14511 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14512 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14513 argument instead of virtual_dynamic_stack_rtx.
14515 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14517 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14519 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14520 Add note to error message to explain internal mapping of overloaded
14521 built-in function name to non-overloaded built-in function name.
14522 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14525 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14528 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14529 where the inputs overlap with the output.
14531 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14533 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14534 (=v, v) alternative and explicit "memory" attribute.
14535 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14536 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14538 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14539 "sselog1" type instead of "sselog".
14540 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14541 "sselog". Remove explicit "memory" attribute.
14542 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14543 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14545 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14546 "sselog1" type instead of "sselog". Remove explicit "memory"
14548 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14549 use "sselog1" type instead of "sselog". Remove explicit "memory"
14551 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14552 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14554 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14555 "sselog1" type instead of "sselog". Remove explicit "memory"
14557 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14558 use "sselog1" type instead of "sselog". Remove explicit "memory"
14562 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14564 PR middle-end/85414
14565 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14568 2018-04-17 Martin Jambor <mjambor@suse.cz>
14571 * ipa-cp.c (create_specialized_node): Call
14572 expand_all_artificial_thunks if necessary.
14574 2018-04-17 Martin Liska <mliska@suse.cz>
14577 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14578 in message, remote space in between '_G' and '('.
14580 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14583 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14584 avx512f_vmcmp<mode>3<round_saeonly_name>,
14585 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14586 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14587 avx512f_rndscale<mode><round_saeonly_name>,
14588 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14589 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14590 Use %<iptr>2 instead of %2 for -masm=intel.
14591 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14592 avx512f_vcvttss2usi<round_saeonly_name>,
14593 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14595 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14596 avx512f_vcvttsd2usi<round_saeonly_name>,
14597 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14598 Use %q1 instead of %1 for -masm=intel.
14599 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14600 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14601 of %3 for -masm=intel.
14602 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14604 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14606 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14608 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14609 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14611 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14613 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14614 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14615 %g1 and one with %0 and %1.
14616 (avx512er_vmrcp28<mode><round_saeonly_name>,
14617 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14618 %1 for -masm=intel.
14619 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14620 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14621 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14622 of %0 and %{%4%} for -masm=intel.
14623 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14624 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14625 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14626 order of %0 and %{%5%}%{z%} for -masm=intel.
14628 2018-04-17 Jan Hubicka <jh@suse.cz>
14631 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14633 2018-04-17 Martin Liska <mliska@suse.cz>
14636 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14637 for target_clone error message. Make default implementation
14638 clone to be a local declaration.
14639 (separate_attrs): Add new argument and check for an empty
14641 (expand_target_clones): Handle it.
14642 (ipa_target_clone): Make redirection just for target_clones
14645 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14646 Tom de Vries <tom@codesourcery.com>
14648 PR middle-end/84955
14649 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14650 tiled basic blocks without omp continue statements.
14652 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14655 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14656 vec_extract expression as having side effects to make sure it gets
14659 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14662 * config/i386/i386.c (get_builtin_code_for_version): Check
14665 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14668 * config.gcc: Support "skylake".
14669 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14671 * config/i386/i386.c (m_SKYLAKE): Define.
14672 (processor_target_table): Add "skylake".
14673 (ix86_option_override_internal): Add "skylake".
14674 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14675 PROCESSOR_CANNONLAKE.
14676 (get_builtin_code_for_version): Fix priority for
14677 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14678 PROCESSOR_SKYLAKE-AVX512.
14679 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14680 (processor_type): Add PROCESSOR_SKYLAKE.
14682 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14683 Jason Merrill <jason@redhat.com>
14686 * convert.c (convert_to_integer_1): Use direct recursion for
14687 enumeral types and types with a precision less than the number
14688 of bits in their mode.
14690 2018-04-16 Julia Koval <julia.koval@intel.com>
14693 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14694 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14696 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14699 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14700 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14701 and -mno-direct-move.
14703 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14706 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14707 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14708 Ensure negative shifts result in {0}.
14710 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14712 PR rtl-optimization/79916
14713 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14714 regs (if any) to define how to gnerate SD moves when LRA is in
14717 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14719 PR rtl-optimization/85393
14720 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14721 * except.c (expand_dw2_landing_pad_for_region): Make static.
14722 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14723 a label and unconditional jump to old_bb, rather than
14724 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14727 PR rtl-optimization/85376
14728 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14729 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14730 instead of a specific value.
14732 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14733 Bin Cheng <bin.cheng@arm.com>
14735 PR tree-optimization/82965
14736 PR tree-optimization/83991
14737 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14738 by_profile_only parameter.
14739 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14740 information if the loop was predicted to iterate too many times.
14741 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14743 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14746 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14749 2018-04-13 Martin Liska <mliska@suse.cz>
14750 Jakub Jelinek <jakub@redhat.com>
14752 PR middle-end/81657
14753 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14754 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14755 * builtins.c (expand_builtin_memory_copy_args): Use
14756 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14757 handle dest_addr == pc_rtx.
14759 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14762 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14763 asked to not generate direct moves.
14764 (fix_trunc<mode>si2_stfiwx): Similar.
14765 (fix_trunc<mode>si2_internal): Similar.
14767 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14770 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14771 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14772 lookup if dest in some wider mode is known to be const0_rtx and
14773 if so, record permanent equivalence for it to be ZERO_EXTEND of
14774 the narrower mode destination.
14776 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14778 * lto-streamer-out.c (output_function): Revert 259346.
14779 * omp-expand.c (expand_oacc_for): Likewise.
14781 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14783 PR rtl-optimization/85354
14784 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14785 * sel-sched.c (sel_global_init): ... here.
14787 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14790 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14791 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14792 mode for PE-COFF targets.
14793 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14794 (i386_pe_asm_lto_end): Likewise.
14795 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14796 (TARGET_ASM_LTO_END): Likewise.
14797 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14798 (i386_pe_asm_lto_start): New function.
14799 (i386_pe_asm_lto_end): Likewise.
14801 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14802 Richard Biener <rguenther@suse.de>
14804 PR middle-end/84955
14805 * lto-streamer-out.c (output_function): Fix CFG loop state before
14807 * omp-expand.c (expand_oacc_for): Handle calls to internal
14808 functions like regular functions.
14810 2018-04-12 Richard Biener <rguenther@suse.de>
14813 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14814 for the early LTO debug to properly generate references to it
14815 during DIE emission. Do not re-use that for the skeleton for
14817 (dwarf2out_early_finish): Likewise.
14819 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14822 * config/i386/sse.md
14823 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14824 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14825 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14826 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14827 and output is a reg, avoid creating invalid lowpart subreg, but
14828 instead split into a 512-bit move. Don't split if not AVX512VL,
14829 input is xmm16+ reg and output is a mem.
14830 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14831 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14832 xmm16+ reg and output is a mem.
14834 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14836 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14837 also for flag_dwarf2_cfi_asm.
14839 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14841 PR rtl-optimization/85342
14842 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14843 a bool scalar var inside of the loop instead. Don't try to update
14844 recog_data.operand after failed apply_change_group.
14846 2018-04-12 Tom de Vries <tom@codesourcery.com>
14849 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14850 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14851 array with flexible array member as array without given dimension.
14852 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14853 argument for undefined param to true.
14855 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14858 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14859 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14860 from PowerPC section.
14861 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14862 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14863 help text that is too long.
14864 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14865 help text that is too long.
14866 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14867 help text that is too long.
14869 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14871 * config/alpha/alpha.md (stack_probe_internal): Rename
14872 from "probe_stack". Update all callers.
14874 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14876 PR rtl-optimization/84566
14877 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14878 sched_macro_fuse_insns.
14880 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14883 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14884 (compute_block_dependences): ... from here.
14886 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14888 PR tree-optimization/85331
14889 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14890 from int to HOST_WIDE_INT.
14892 2018-04-11 Martin Jambor <mjambor@suse.cz>
14895 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14896 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14897 not the same as the source val.
14898 (cgraph_edge_brings_value_p): New parameter.
14899 (gather_edges_for_value): Pass destination value to
14900 cgraph_edge_brings_value_p.
14901 (perhaps_add_new_callers): Likewise.
14902 (get_info_about_necessary_edges): Likewise and exclude values brought
14903 only by self-recursive edges.
14904 (create_specialized_node): Redirect only clones of self-calling edges.
14905 (+self_recursive_pass_through_p): New function.
14906 (find_more_scalar_values_for_callers_subset): Use it.
14907 (find_aggregate_values_for_callers_subset): Likewise.
14908 (known_aggs_to_agg_replacement_list): Removed.
14909 (decide_whether_version_node): Re-calculate known constants for all
14910 remaining context clones.
14912 2018-04-11 Richard Biener <rguenther@suse.de>
14915 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14916 from early DWARF output.
14917 (dwarf2out_early_finish): Output line info unconditionally into
14918 early DWARF and add reference to it.
14920 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14923 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14924 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14925 other than V2DFmode using iptr mode attribute.
14926 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14928 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14930 PR rtl-optimization/84659
14931 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14933 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14936 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14938 (output_loc_list): Pass address of a dummy size variable even in the
14939 locview handling loop.
14940 (index_location_lists): Add comment on why skip_loc_list_entry can't
14943 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14946 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14949 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14952 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14953 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14954 and -mstring-compare-inline-limit.
14956 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14959 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14960 for stack clash protection in a register whenever we need it to be in
14963 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14965 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14966 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14968 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14971 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14973 (mlong-double-): Ditto.
14974 * config/rs6000/sysv4.opt (msdata=): Ditto.
14975 (mtls-size=): Ditto.
14977 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14979 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14980 erroneous entries for
14981 "vector int vec_ldl (int, long int *)", and
14982 "vector unsigned int vec_ldl (int, unsigned long int *)".
14983 Add comments and entries for
14984 "vector bool char vec_ldl (int, bool char *)",
14985 "vector bool short vec_ldl (int, bool short *)",
14986 "vector bool int vec_ldl (int, bool int *)",
14987 "vector bool long long vec_ldl (int, bool long long *)",
14988 "vector pixel vec_ldl (int, pixel *)",
14989 "vector long long vec_ldl (int, long long *)",
14990 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14991 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14992 type tree bool_long_long_type_node and correct definition of
14993 bool_V2DI_type_node to make reference to this new type tree.
14994 (rs6000_mangle_type): Replace erroneous reference to
14995 bool_long_type_node with bool_long_long_type_node.
14996 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14997 comments to emphasize sign distinctions for char and int types and
14998 replace RS6000_BTI_bool_long constant with
14999 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15000 use of RS6000_BTI_pixel.
15001 (bool_long_type_node): Remove this macro definition.
15002 (bool_long_long_type_node): New macro definition
15004 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15006 PR rtl-optimization/85300
15007 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15008 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15009 simplify_unary_operation fails.
15011 2018-04-10 Martin Liska <mliska@suse.cz>
15013 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15014 cgraph_edge and ipa_ref.
15016 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15020 * config/i386/sse.md
15021 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15022 computation of the VEC_MERGE selector from mask.
15023 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15024 Fix decoding of the VEC_MERGE selector into mask.
15026 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15028 PR tree-optimization/85286
15029 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15031 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15033 * final.c (final_1): Set insn_last_address as well as
15034 insn_current_address.
15036 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15039 * explow.c (emit_stack_probe): Call validize_mem on memory location
15040 before passing it to gen_probe_stack. Create address operand and
15041 legitimize it for the probe_stack_address case.
15043 2018-04-09 Jan Hubicka <jh@suse.cz>
15046 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15047 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15048 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15050 (free_lang_data): Rebuild type inheritance graph.
15052 2018-04-09 Martin Sebor <msebor@redhat.com>
15054 * invoke.texi (-finline-small-functions): Mention other optimization
15056 (-findirect-inlining, -fpartial-inlining): Same.
15057 (-finline-functions-called-once): Same.
15058 (-freorder-blocks-and-partition): Same.
15060 2018-04-09 Jan Hubicka <jh@suse.cz>
15063 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15064 jumps; choose last target that matches the criteria (i.e.
15065 no partition changes for non-crossing jumps).
15066 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15067 support for redirecting crossing jumps to non-crossing.
15069 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15071 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15072 also for naked functions.
15074 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15076 * config/arc/arc.md (add_shift): New pattern.
15077 (add_shift2): Likewise.
15078 (sub_shift): Likewise.
15079 (sub_shift_cmp0_noout): Likewise.
15080 (compare_si_ashiftsi): Likewise.
15081 (xbfu_cmp0_noout): New combine pattern.
15082 (xbfu_cmp0"): Likewise.
15083 (movsi_set_cc_insn): Place the predicable variant first.
15084 (commutative_binary_cmp0_noout): Remove clobber.
15085 (commutative_binary_cmp0): New pattern.
15086 (noncommutative_binary_cmp0): Likewise.
15087 (noncommutative_binary_cmp0_noout): Likewise.
15088 (noncommutative_binary_comparison_result_used): Removed.
15089 (rsub_cmp0): New pattern.
15090 (rsub_cmp0_noout): Likewise.
15091 (extzvsi): Changed, keep only meaningful variants.
15092 (SQH, SEZ): New iterators.
15093 (SQH_postfix): New mode attribute.
15094 (SEZ_prefix): New code attribute.
15095 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15096 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15097 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15098 of numerical value.
15099 (noncommutative_operator): Check the availability of barrel
15102 2018-04-09 Richard Biener <rguenther@suse.de>
15104 PR tree-optimization/85284
15105 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15106 Only use the niter constraining form of simple_iv when the exit
15107 is always executed.
15109 2018-04-09 Tom de Vries <tom@codesourcery.com>
15112 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15113 (define_expand "*memory_barrier"): New define_expand.
15114 (define_insn "memory_barrier"): New insn.
15116 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15118 PR rtl-optimization/80463
15119 PR rtl-optimization/83972
15120 PR rtl-optimization/83480
15122 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15123 correct producer for the insn.
15124 (tidy_control_flow): Fixup seqnos in case of debug insns.
15126 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15128 PR rtl-optimization/83913
15130 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15131 different sched-times when merging exprs.
15133 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15135 PR rtl-optimization/83962
15137 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15138 tidy_fallthru_edge and tidy_control_flow.
15140 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15142 PR rtl-optimization/83530
15144 * sel-sched.c (force_next_insn): New global variable.
15145 (remove_insn_for_debug): When force_next_insn is true, also leave only
15146 next insn in the ready list.
15147 (sel_sched_region): When the region wasn't scheduled, make another pass
15148 over it with force_next_insn set to 1.
15150 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15152 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15154 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15155 for interrupt control.
15156 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15157 functions for interrupt control.
15158 * config/nds32/nds32-intrinsic.md: Likewise.
15159 * config/nds32/nds32_intrinsic.h: Likewise.
15160 * config/nds32/nds32.h (nds32_builtins): Likewise.
15162 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15164 * config/nds32/nds32.c (nds32_init_machine_status,
15165 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15166 strict_aligned_p field.
15167 (nds32_expand_to_rtl_hook): New function.
15168 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15169 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15171 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15172 Chung-Ju Wu <jasonwucj@gmail.com>
15174 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15175 * config/nds32/nds32-n7.md: New file.
15176 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15177 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15179 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15180 * config/nds32/nds32.md (pipeline_model): Add n7.
15181 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15182 * config/nds32/pipelines.md: Include n7 settings.
15184 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15185 Chung-Ju Wu <jasonwucj@gmail.com>
15187 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15188 * config/nds32/nds32-e8.md: New file.
15189 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15190 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15192 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15193 * config/nds32/nds32.md (pipeline_model): Add e8.
15194 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15195 * config/nds32/pipelines.md: Include e8 settings.
15197 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15198 Chung-Ju Wu <jasonwucj@gmail.com>
15200 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15201 * config/nds32/nds32-n8.md: New file.
15202 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15203 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15205 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15206 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15207 * config/nds32/nds32.md (pipeline_model): Add n8.
15208 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15209 * config/nds32/pipelines.md: Include n8 settings.
15211 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15212 Chung-Ju Wu <jasonwucj@gmail.com>
15214 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15215 * config/nds32/nds32-n9-2r1w.md: New file.
15216 * config/nds32/nds32-n9-3r2w.md: New file.
15217 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15218 nds32_register_ports): New or modify for cpu n9.
15219 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15221 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15222 * config/nds32/nds32-utils.c: New file.
15223 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15224 TARGET_MUL_SLOW): Define.
15225 * config/nds32/nds32.md (pipeline_model): New attribute.
15226 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15227 New options that support cpu n9.
15228 * config/nds32/pipelines.md: Include n9 settings.
15229 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15231 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15233 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15234 information if necessary.
15235 (output_cond_branch_compare_zero): Likewise.
15236 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15237 (nds32_target_alignment): Refine for alignment.
15238 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15239 (FUNCTION_BOUNDARY): Modify.
15240 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15242 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15244 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15246 * config/nds32/constants.md (unspec_volatile_element): Add values for
15247 TLB operation and data prefetch.
15248 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15249 functions for TLB operation and data prefetch.
15250 * config/nds32/nds32-intrinsic.md: Likewise.
15251 * config/nds32/nds32_intrinsic.h: Likewise.
15252 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15253 (nds32_print_operand): Likewise.
15254 * config/nds32/nds32.h (nds32_builtins): Likewise.
15256 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15257 Andrew Pinski <pinsika@gcc.gnu.org>
15259 PR middle-end/82976
15260 * match.pd: Use constant_boolean_node of correct type instead of
15261 boolean_true_node or boolean_false_node for simplifying
15262 pointer comparisons to zero.
15264 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15266 PR tree-optimization/80021
15267 * tree.c (verify_type_variant): Make error call in verify_variant_match
15268 translatable and remove final full stop.
15270 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15272 * config/nds32/constants.md (unspec_volatile_element): Add
15273 UNSPEC_VOLATILE_EH_RETURN.
15274 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15275 nds32_output_stack_pop): Support dwarf exception handling process.
15276 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15277 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15278 exception handling process.
15279 (nds32_compute_stack_frame): Likewise.
15280 (nds32_return_addr_rtx): Likewise.
15281 (nds32_initial_elimination_offset): Likewise.
15282 (nds32_expand_prologue): Likewise.
15283 (nds32_expand_epilogue): Likewise.
15284 (nds32_dynamic_chain_address): New function.
15285 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15286 exception handling.
15287 (DYNAMIC_CHAIN_ADDRESS): Define.
15288 (EH_RETURN_DATA_REGNO): Define.
15289 (EH_RETURN_STACKADJ_RTX): Define.
15290 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15291 patterns for dwarf exception handling.
15293 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15295 * config/nds32/nds32.h: Clean up obsolete macros.
15297 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15299 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15300 Add enum values for particular instructions.
15301 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15302 particular intrinsic functions.
15303 * config/nds32/nds32-intrinsic.md: Likewise.
15304 * config/nds32/nds32_intrinsic.h: Likewise.
15305 * config/nds32/nds32.h (nds32_builtins): Likewise.
15306 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15307 (btst, ave): New patterns for particular instructions.
15309 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15311 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15312 Add enum values for atomic load/store and memory sync.
15313 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15315 * config/nds32/nds32-intrinsic.md: Likewise.
15316 * config/nds32/nds32_intrinsic.h: Likewise.
15317 * config/nds32/nds32.h (nds32_builtins): Likewise.
15319 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15321 PR tree-optimization/85257
15322 * fold-const.c (native_encode_vector): If not all elts could fit
15323 and off is -1, return 0 rather than offset.
15324 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15325 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15326 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15327 adjust buffer in native_interpret_expr call.
15329 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15331 * config/nds32/constants.md (unspec_volatile_element): Add cache
15332 control enum values.
15333 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15334 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15335 * config/nds32/nds32.c (nds32_cctl_names): New.
15336 (nds32_print_operand): Handle cache control register names.
15337 * config/nds32/nds32.h (nds32_builtins): New enum values.
15338 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15340 * config/nds32/nds32.md (type): Add mmu.
15341 * config/nds32/pipelines.md (simple_insn): Add mmu.
15343 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15345 * config/nds32/nds32.md (type): Remove call.
15346 * config/nds32/pipelines.md (simple_insn): Likewise.
15348 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15350 * config/nds32/constants.md (unspec_volatile_element): Add
15351 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15352 UNSPEC_VOLATILE_FMFCFG.
15353 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15354 description for fmfcfg and fmfcsr.
15355 (bdesc_1arg): Add fmtcsr.
15356 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15357 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15358 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15359 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15360 unspec_fmfcfg): New patterns.
15361 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15362 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15363 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15364 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15365 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15366 __nds32__fmfcfg): Define.
15368 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15370 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15371 intrinsic register names.
15372 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15373 intrinsic register enum values and macros.
15375 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15377 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15378 for load/store addressing form.
15379 (nds32_print_operand_address): Likewise.
15381 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15384 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15385 based on LABEL_REF. Remove useless assertion.
15386 (pic_address_needs_scratch): Fix formatting.
15387 (sparc_legitimize_pic_address): Minor tweaks.
15388 (sparc_delegitimize_address): Adjust assertion accordingly.
15389 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15390 into symbolic_operand.
15391 (movsi_high_pic_label_ref): Likewise.
15392 (movsi_lo_sum_pic_label_ref): Likewise.
15393 (movdi_pic_label_ref): Likewise.
15394 (movdi_high_pic_label_ref): Likewise.
15395 (movdi_lo_sum_pic_label_ref): Likewise.
15397 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15399 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15400 custom LIB_SPEC setup.
15402 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15403 Kito Cheng <kito.cheng@gmail.com>
15405 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15406 * config/riscv/freebsd.h: New.
15408 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15410 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15411 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15414 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15415 Kito Cheng <kito.cheng@gmail.com>
15417 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15418 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15419 * config/nds32/nds32-protos.h (nds32_output_call,
15420 nds32_output_return): Declare.
15421 * config/nds32/nds32.md: Refine all the call and return patterns.
15423 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15426 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15427 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15429 PR rtl-optimization/84872
15430 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15431 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15432 EDGE_CROSSING edge.
15434 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15436 * expr.c (copy_blkmode_to_reg): Revert 254862.
15437 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15439 2018-04-06 Richard Biener <rguenther@suse.de>
15441 PR middle-end/85244
15442 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15443 after seeing a component reference with an adjacent field. Treat
15444 refs to arrays at struct end of external decls similar to
15445 refs to unconstrained commons.
15447 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15450 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15451 look through SAVE_EXPRs with non-side-effects argument. Adjust
15453 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15456 2018-04-06 Richard Biener <rguenther@suse.de>
15458 PR middle-end/85180
15459 * alias.c (find_base_term): New wrapper around find_base_term
15460 unwinding CSELIB_VAL_PTR changes.
15461 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15464 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15466 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15468 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15469 constant definitions.
15470 ("nop"): lr 0,0 -> nopr r0
15471 ("nop_lr0", "nop_lr1"): New insn definitions.
15473 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15475 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15476 NDS32_V3PUSH_AVAILABLE_P macro.
15478 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15479 Chung-Ju Wu <jasonwucj@gmail.com>
15481 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15482 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15483 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15484 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15485 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15486 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15487 * config/nds32/constraints.md: New constraints and checking for hard
15488 float configuration.
15489 * config/nds32/iterators.md: New mode iterator and attribute for hard
15490 float configuration.
15491 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15493 * config/nds32/nds32-fpu.md: New file.
15494 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15495 deal with hard float code generation.
15496 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15498 (abi_type, float_reg_number): New enum type.
15499 * config/nds32/nds32-predicates.c: New predicates for hard float.
15500 * config/nds32/nds32-protos.h: Declare functions for hard float.
15501 * config/nds32/nds32.c: Implementation for hard float configuration.
15502 * config/nds32/nds32.h: Definitions for hard float configuration.
15503 * config/nds32/nds32.md: Include hard float machine description and
15504 modify patterns for hard float configuration.
15505 * config/nds32/nds32.opt: New options for hard float configuration.
15506 * config/nds32/predicates.md: New predicates for hard float
15509 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15511 * common/config/nds32/nds32-common.c
15512 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15514 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15516 PR middle-end/85195
15517 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15518 CONSTRUCTOR_ELT (ctor, ...)->value.
15520 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15523 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15525 2018-04-05 Tom de Vries <tom@codesourcery.com>
15528 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15531 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15532 Kito Cheng <kito.cheng@gmail.com>
15534 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15535 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15536 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15537 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15539 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15540 Kito Cheng <kito.cheng@gmail.com>
15542 * config/nds32/constraints.md (Ufe): New memory constraint.
15543 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15544 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15545 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15547 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15548 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15550 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15552 * config/nds32/nds32.md: Use optimize_size in the condition for
15553 alu-shift instructions.
15555 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15557 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15559 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15561 * config/nds32/nds32.md (negsi2): Refine pattern.
15563 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15564 Chung-Ju Wu <jasonwucj@gmail.com>
15566 * config/nds32/iterators.md (shift_rotate): New code iterator.
15567 (shift): New code attribute.
15568 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15569 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15570 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15571 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15572 bit-wise operations.
15573 (andsi3, *andsi3): Ditto.
15574 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15575 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15576 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15577 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15578 nds32_ior_operand, nds32_xor_operand): New predicates.
15580 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15582 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15583 (addsi3, subsi3): ... this.
15585 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15587 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15589 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15591 * config/nds32/nds32.md: Adjust indention.
15593 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15595 * config/nds32/nds32.md (feature): New attribute.
15597 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15599 * config/nds32/nds32.md (subtype): New attribute.
15601 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15604 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15605 expansion to perform a bitwise AND of the argument followed by a
15606 boolean negation of the result.
15608 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15610 PR rtl-optimization/84878
15611 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15612 the basic block. Assert the use reference is not artificial and that
15613 it has an associated insn.
15615 2018-04-04 Michael Matz <matz@suse.de>
15617 * builtins.c (compute_objsize): Pass correct operand
15618 to array_at_struct_end_p.
15620 2018-04-04 Richard Biener <rguenther@suse.de>
15623 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15624 from contexts for DINFO_LEVEL_TERSE and below.
15626 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15628 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15629 resiter_operand condition.
15630 * config/nds32/nds32.md (*move<mode>): Ditto.
15632 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15633 Monk Chiang <sh.chiang04@gmail.com>
15635 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15637 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15639 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15641 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15642 Kito Cheng <kito.cheng@gmail.com>
15644 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15645 nds32_cond_code_str, output_cond_branch,
15646 output_cond_branch_compare_zero, nds32_expand_cbranch,
15647 nds32_expand_cstore, nds32_expand_movcc,
15648 nds32_output_cbranchsi4_equality_zero,
15649 nds32_output_cbranchsi4_equality_reg,
15650 nds32_output_cbranchsi4_equality_reg_or_const_int,
15651 nds32_output_cbranchsi4_greater_less_zero: New functions.
15652 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15653 nds32_expand_cstore, nds32_expand_movcc,
15654 nds32_output_cbranchsi4_equality_zero,
15655 nds32_output_cbranchsi4_equality_reg,
15656 nds32_output_cbranchsi4_equality_reg_or_const_int,
15657 nds32_output_cbranchsi4_greater_less_zero): Declare.
15658 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15659 nds32_rimm11s_operand): New predicates.
15660 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15661 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15664 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15666 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15667 * config/nds32/nds32.md: Ditto.
15668 * config/nds32/pipelines.md: Ditto.
15670 2018-04-04 Richard Biener <rguenther@suse.de>
15672 PR tree-optimization/85168
15673 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15674 propagating abnormals.
15676 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15678 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15680 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15681 Kito Cheng <kito.cheng@gmail.com>
15683 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15684 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15685 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15686 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15687 * config/nds32/nds32.md (sibcall_internal): New.
15688 (sibcall_register): Remove.
15689 (sibcall_immediate): Remove.
15690 (sibcall_value_internal): New.
15691 (sibcall_value_register): Remove.
15692 (sibcall_value_immediate): Remove.
15693 * config/nds32/predicates.md (nds32_general_register_operand): New.
15694 (nds32_call_address_operand): New.
15696 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15698 PR rtl-optimization/85167
15699 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15700 bb_defs if *split_p, instead preinitialize it to NULL.
15702 PR tree-optimization/85156
15703 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15704 evaluating the argument multiple times.
15706 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15708 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15710 (_mm_cvtpd_ps): Likewise.
15711 (_mm_cvttpd_epi32): Likewise.
15712 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15713 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15714 vector, pixel, and bool following altivec.h include.
15716 2018-04-03 Martin Sebor <msebor@redhat.com>
15718 * doc/extend.texi (Common Function Attributes): Clarify.
15719 (const attribute): Likewise.
15720 (pure attribute): Likewise.
15722 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15725 * config/i386/i386.c (ix86_expand_vector_set): Use
15726 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15728 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15730 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15731 instructions when changing rounding bits to preserve precision bits
15732 in the x87 control word.
15734 2018-04-03 Martin Liska <mliska@suse.cz>
15736 PR tree-optimization/82491
15737 * rtl.h (strip_offset_and_add): Replace += suboffset with
15738 poly_uint64 () + suboffset.
15740 2018-03-29 Martin Liska <mliska@suse.cz>
15741 Martin Jambor <mjambor@suse.cz>
15744 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15745 param_type is not an integral or pointer type.
15747 2018-04-03 Richard Biener <rguenther@suse.de>
15749 * sese.h (recompute_all_dominators): Remove.
15751 2018-04-02 Martin Sebor <msebor@redhat.com>
15753 * doc/invoke.texi (-Wrestrict): Fix typos.
15755 2018-04-02 Jim Wilson <jimw@sifive.com>
15757 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15758 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15759 (<optab>di3, <optab>si3_extend): Likewise.
15760 (<optab>si3_mask, <optab>si3_mask_1): New.
15761 (<optab>di3_mask, <optab>di3_mask_1): New.
15762 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15763 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15764 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15766 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15768 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15771 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15773 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15774 (nds32_canonicalize_comparison): New function.
15776 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15777 Kito Cheng <kito.cheng@gmail.com>
15778 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15780 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15781 * config/nds32/constants.md (unspec_volatile_element): Add
15782 UNSPEC_VOLATILE_RELAX_GROUP.
15783 * config/nds32/nds32-relax-opt.c: New file.
15784 * config/nds32/nds32-predicates.c
15785 (nds32_symbol_load_store_p): New function.
15786 * config/nds32/nds32-protos.h
15787 (nds32_symbol_load_store_p): Declare function.
15788 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15789 * config/nds32/nds32.c
15790 (nds32_register_pass): New function to register pass.
15791 (nds32_register_passes): New function to register passes.
15792 * config/nds32/nds32.md (relax_group): New pattern.
15793 * config/nds32/nds32.opt (mrelax-hint): New option.
15794 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15796 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15798 * config/nds32/t-nds32: Modify files dependency.
15800 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15802 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15803 (PROFILE_HOOK): Define its implementation.
15805 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15807 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15808 type and 32-bit size.
15810 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15812 PR middle-end/85090
15813 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15814 (V_128_256): New mode iterator.
15815 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15816 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15817 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15819 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15820 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15822 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15825 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15826 NaN inputs correctly.
15828 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15831 * config/rs6000/vsx.md (??r): New mode attribute.
15832 (*vsx_mov<mode>_64bit): Use it.
15833 (*vsx_mov<mode>_32bit): Likewise.
15835 2018-03-30 Martin Sebor <msebor@redhat.com>
15837 PR tree-optimization/84818
15838 * builtins.c (check_access): Use warning_n.
15840 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15843 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15845 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15848 2018-03-30 Julia Koval <julia.koval@intel.com>
15851 * x86-tune.def (movx, partial_reg_dependency): Enable for
15854 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15856 PR inline-asm/84985
15857 * lra-constraints.c (process_alt_operands): Move setting
15858 this_alternative_matches below.
15860 2018-03-29 Martin Liska <mliska@suse.cz>
15863 * doc/invoke.texi: Document how LTO works with debug info.
15864 Describe auto-load support of binutils. Mention 'x86-64'
15865 as valid option value of -march option.
15867 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15869 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15872 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15873 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15874 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15877 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15880 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15881 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15882 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15883 for RS6000_BTM_POWERPC64.
15884 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15885 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15886 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15889 (DIVDEU): Likewise.
15891 2018-03-28 Carl Love <cel@us.ibm.com>
15894 2017-09-27 Carl Love <cel@us.ibm.com>
15896 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15897 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15898 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15901 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15903 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15904 instead of __vector bool.
15905 (_mm_max_pu8): Likewise.
15906 (_mm_min_pi16): Likewise.
15908 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15911 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15912 (DIVWEUO): Likewise.
15913 (DIVDEO): Likewise.
15914 (DIVDEUO): Likewise.
15915 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15916 DIVWEUO and DIVDEUO.
15917 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15918 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15919 (div_extend): Likewise.
15920 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15922 (__builtin_divweuo): Likewise.
15923 (__builtin_divdeo): Likewise.
15924 (__builtin_divdeuo): Likewise.
15926 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15929 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15930 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15932 PR tree-optimization/82004
15933 * gimple-match-head.c (optimize_pow_to_exp): New function.
15934 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15935 Don't fold to exp if optimize_pow_to_exp is false.
15937 2018-03-28 Martin Liska <mliska@suse.cz>
15940 * calls.c (initialize_argument_information): Fix trailing space.
15941 * common.opt: Fix typo and provide better explanation for
15942 -fsanitize-coverage option.
15943 * config/i386/i386.opt: Fix typo.
15945 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15946 Martin Liska <mliska@suse.cz>
15949 * gimplify.c (asan_poison_variable): Don't do the check for
15950 gimplify_omp_ctxp here.
15951 (gimplify_decl_expr): Do it here.
15952 (gimplify_target_expr): Likewise.
15954 2018-03-28 Martin Liska <mliska@suse.cz>
15957 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15958 chkp_type_bounds_count if MPX is not enabled.
15960 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15962 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15964 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15967 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15968 function to create the function decl for complex long double
15969 multiply and divide for -mabi=ieeelongdouble.
15970 (init_float128_ieee): Call it.
15972 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15975 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15976 -fcf-protection=branch -mibt.
15977 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15979 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15982 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15983 arm_word_relocations.
15985 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15988 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15989 extern array declarations.
15991 2018-03-27 Richard Biener <rguenther@suse.de>
15993 PR middle-end/84067
15994 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15995 explicit single_use checks.
15997 2018-03-27 Richard Biener <rguenther@suse.de>
15999 PR tree-optimization/85082
16000 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16003 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16005 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16006 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16007 Turn on fasynchronous-unwind-tables and funwind-tables.
16009 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16012 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16013 (*bmi_blsr_<mode>_ccz): Ditto.
16015 2018-03-26 Tom de Vries <tom@codesourcery.com>
16017 PR tree-optimization/85063
16018 * omp-general.c (offloading_function_p): New function. Factor out
16020 * omp-offload.c (pass_omp_target_link::gate): ... here.
16021 * omp-general.h (offloading_function_p): Declare.
16022 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16023 with attribute omp declare target for offloading functions.
16025 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16027 PR tree-optimization/84005
16028 * tree-data-ref.h (get_base_for_alignment): Declare.
16029 * tree-data-ref.c (get_base_for_alignment_1): New function.
16030 (get_base_for_alignment): Likewise.
16031 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16032 get_base_for_alignment to find a suitable base object, instead
16033 of always using drb->base_address.
16035 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16037 PR inline-asm/85022
16038 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16039 known size by default.
16041 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16043 PR inline-asm/85030
16044 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16045 and non BLKmode operands.
16047 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16050 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16051 Clean up attributes.
16053 2018-03-23 Richard Biener <rguenther@suse.de>
16056 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16057 we are going to emit early debug for LTO.
16059 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16061 PR inline-asm/85034
16062 * function.c (match_asm_constraints_1): Don't optimize if input
16063 doesn't satisfy general_operand predicate for output's mode.
16065 PR inline-asm/85022
16066 * alias.c (write_dependence_p): Don't require for x_canonicalized
16067 non-VOIDmode if x has VOIDmode.
16070 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16071 just don't try to optimize it rather than assert it never happens.
16073 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16075 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16076 macro expansions for definition of ST_INTERNAL_<mode> and
16077 LD_INTERNAL_<mode> builtins.
16078 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16080 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16082 (altivec_expand_st_builtin): Likewise.
16083 (altivec_expand_builtin): Remove calls to deleted functions.
16084 (rs6000_address_for_altivec): Delete this function.
16085 * config/rs6000/vector.md: Remove expands for
16086 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16088 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16091 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16092 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16093 re-computing once computed.
16094 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16095 (arm_init_machine_status): Initialize
16096 machine->static_chain_stack_bytes.
16098 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16101 * doc/extend.texi: Add four new prototypes for vec_ld.
16102 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16103 definitions for more logical presentation.
16104 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16105 entries for V1TI variants of __builtin_altivec_ld builtin.
16106 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16107 handling of V1TI variant of LVX icode pattern.
16108 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16109 (rs6000_gimple_fold_builtin): Likewise.
16110 (altivec_init_builtins): Add code to define
16111 __builtin_altivec_lvx_v1ti function.
16113 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16115 PR inline-asm/84941
16116 * function.c (match_asm_constraints_1): Don't do the optimization
16117 if input isn't a REG, SUBREG, MEM or constant.
16119 2018-03-22 Tom de Vries <tom@codesourcery.com>
16121 PR tree-optimization/84956
16122 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16123 bb_has_abnormal_pred.
16125 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16128 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16129 DECL_INITIAL (decl) to decl at the end.
16130 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16131 adjust the comment.
16133 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16135 * doc/extend.texi (__builtin_tgmath): Document when complex
16136 integer types are treated as _Complex _Float64.
16138 2018-03-21 Tom de Vries <tom@codesourcery.com>
16140 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16142 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16144 PR tree-optimization/84960
16145 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16146 if it is ENTRY block, move them into single succ of ENTRY in that case.
16148 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16150 PR tree-optimization/84811
16151 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16152 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16153 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16154 (known_subrange_p): Update accordingly. Cast each value involved
16155 in the size comparison, rather than casting the result of the
16158 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16160 PR tree-optimization/84982
16161 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16162 by flipping the least significant bit rather than all bits from
16163 bitpos to bitpos + bitsize - 1.
16165 2018-03-21 Nathan Sidwell <nathan@acm.org>
16167 * doc/extend.texi (Deprecated Features): Remove mention of
16168 long-deleted deprecations.
16170 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16173 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16174 * configure: Regenerate.
16176 2018-03-21 Tom de Vries <tom@codesourcery.com>
16178 PR tree-optimization/83126
16179 * tree-parloops.c (num_phis): New function.
16180 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16182 2018-03-21 Nathan Sidwell <nathan@acm.org>
16184 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16185 mention anon-struct/union members and trailing attributes.
16187 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16189 PR tree-optimization/84969
16190 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16191 builtin memset partitions if they set different rhs values.
16193 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16195 PR rtl-optimization/84989
16196 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16197 VEC_DUPLICATE with scalar result mode.
16199 2018-03-21 Martin Liska <mliska@suse.cz>
16202 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16203 not intended return statement.
16205 2018-03-21 Martin Liska <mliska@suse.cz>
16208 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16209 (chkp_find_bound_slots_1): Limit number of iterations.
16211 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16214 * Minor grammar fixes for x86 options.
16216 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16219 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16220 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16222 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16225 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16226 (altivec_lvx_<mode>_1op): Likewise.
16227 (altivec_stvx_<mode>_2op): Likewise.
16228 (altivec_stvx_<mode>_1op): Likewise.
16229 (altivec_lvx_<VM2:mode>): New define_expand.
16230 (altivec_stvx_<VM2:mode>): Likewise.
16231 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16232 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16233 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16234 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16235 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16236 (rs6000_gen_lvx): Likewise.
16237 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16238 (altivec_expand_stv_builtin): Likewise.
16239 (altivec_expand_builtin): Likewise.
16240 * config/rs6000/vector.md: Likewise.
16242 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16245 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16248 2018-03-20 Richard Biener <rguenther@suse.de>
16251 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16252 sign-conversions as zero, fall back to standard scalar_stmt
16255 2018-03-20 Martin Liska <mliska@suse.cz>
16258 * predict.c (rebuild_frequencies): Handle case when we have
16259 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16261 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16264 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16265 flag_section_anchors.
16266 * varasm.c (use_blocks_for_decl_p): Remove hack for
16267 dw2_force_const_mem.
16270 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16272 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16273 be created, use lowpart_subreg of operands[0] rather than operands[0]
16275 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16276 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16277 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16278 and n constraint instead of aarch64_shift_imm_di and Usd.
16279 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16280 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16282 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16285 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16286 to favor GPR over NEON registers.
16287 (<shift>di3_neon): Likewise.
16289 2018-03-20 Tom de Vries <tom@codesourcery.com>
16292 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16293 (nvptx_process_pars): Emit bar.sync asap and alap.
16295 2018-03-20 Tom de Vries <tom@codesourcery.com>
16298 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16299 seen_label if seen_label is already set.
16301 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16304 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16305 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16306 Use 1U instead of 1. Formatting fixes.
16309 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16310 instead of TREE_TYPE (s1) for the return value.
16312 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16314 PR tree-optimization/84946
16315 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16316 bitsize + bitsize in poly_uint64 rather than poly_int64.
16319 * dwarf2asm.c: Include fold-const.c.
16320 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16321 of decl rather than decl itself.
16323 PR rtl-optimization/84643
16324 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16326 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16329 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16330 calling assemble_variable.
16332 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16335 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16336 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16338 2018-03-19 Jim Wilson <jimw@sifive.com>
16341 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16342 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16343 (riscv_first_stack_step): Likewise.
16344 (riscv_option_override): Use STACK_BOUNDARY instead of
16345 MIN_STACK_BOUNDARY.
16346 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16347 MIN_STACK_BOUNDARY.
16348 (BIGGEST_ALIGNMENT): Set to 128.
16349 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16350 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16353 2018-03-19 Richard Biener <rguenther@suse.de>
16355 PR tree-optimization/84933
16356 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16357 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16359 2018-03-19 Richard Biener <rguenther@suse.de>
16361 PR tree-optimization/84859
16362 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16363 (cond_if_else_store_replacement): Perform sinking operation on
16364 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16365 Generalize what a BB with a single eligible store is.
16367 2018-03-19 Richard Biener <rguenther@suse.de>
16369 PR tree-optimization/84929
16370 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16371 chrec_is_positive against non-chrec arg.
16373 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16376 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16378 2018-03-18 Martin Liska <mliska@suse.cz>
16380 PR rtl-optimization/84635
16381 * regrename.c (build_def_use): Use matches_mode only when
16384 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16386 PR tree-optimization/84913
16387 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16388 vectorize chains of COND_EXPRs.
16390 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16392 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16394 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16396 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16398 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16400 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16402 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16403 Kito Cheng <kito.cheng@gmail.com>
16405 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16406 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16407 (nds32_adjust_reg_alloc_order): New function.
16408 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16410 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16412 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16413 nds32_print_operand, nds32_print_operand_address): Use
16414 HOST_WIDE_INT_PRINT_DEC instead.
16416 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16418 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16420 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16423 * config/i386/i386.c (initial_ix86_tune_features,
16424 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16425 unsigned long long.
16426 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16427 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16428 rather than 1u << ix86_tune. Formatting fix.
16429 (ix86_option_override_internal): Change ix86_arch_mask from
16430 unsigned int to unsigned HOST_WIDE_INT, initialize to
16431 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16432 (ix86_function_specific_restore): Likewise.
16434 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16437 * postreload.c (reload_combine_recognize_pattern): Perform
16438 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16439 truncate_int_for_mode the result for the destination's mode.
16442 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16443 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16445 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16448 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16451 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16452 regno_allocno_class_array and sorted_pseudos.
16453 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16454 insns where regno is used.
16456 2018-03-16 Martin Liska <mliska@suse.cz>
16459 * multiple_target.c (create_dispatcher_calls): Redirect
16460 reference in the symbol table.
16462 2018-03-16 Martin Liska <mliska@suse.cz>
16465 * multiple_target.c (create_dispatcher_calls): Redirect also
16468 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16472 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16473 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16474 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16476 2018-03-16 Julia Koval <julia.koval@intel.com>
16478 * doc/invoke.texi (Skylake Server): Add CLWB.
16479 Cannonlake): Remove CLWB.
16481 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16483 PR tree-optimization/84841
16484 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16486 (FLOAT_ONE_CONST_TYPE): Define.
16487 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16488 (sort_by_operand_rank): Put entries with higher constant_type last
16489 rather than first to match comments.
16491 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16493 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16496 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16499 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16500 check and use address of target always.
16502 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16505 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16506 (indirect_thunk_bnd_needed): Likewise.
16507 (indirect_thunks_used): Likewise.
16508 (indirect_thunks_bnd_used): Likewise.
16509 (indirect_return_needed): New.
16510 (indirect_return_bnd_needed): Likewise.
16511 (output_indirect_thunk_function): Add a bool argument for
16513 (output_indirect_thunk_function): Don't generate alias for
16514 function return thunk.
16515 (ix86_code_end): Call output_indirect_thunk_function to generate
16516 function return thunks.
16517 (ix86_output_function_return): Set indirect_return_bnd_needed
16518 and indirect_return_needed instead of indirect_thunk_bnd_needed
16519 and indirect_thunk_needed.
16521 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16523 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16524 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16525 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16527 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16528 Paul Hua <paul.hua.gm@gmail.com>
16531 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16533 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16535 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16536 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16537 resp. SFmode cases.
16539 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16542 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16543 instead of GET_MODE_SIZE when comparing Units.
16545 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16548 * varasm.c (hash_section): Return an unchangeble hash value
16549 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16550 Return !aarch64_can_use_per_function_literal_pools_p ().
16552 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16555 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16556 rather than address of cmode as last argument to prepare_cmp_insn.
16558 2018-03-15 Julia Koval <julia.koval@intel.com>
16560 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16561 F_AVX512VNNI, F_AVX512BITALG): New.
16563 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16566 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16567 insn for floating-point loads and stores.
16569 2018-03-14 Carl Love <cel@us.ibm.com>
16571 * config/rs6000/rs6000-c.c: Add macro definitions for
16572 ALTIVEC_BUILTIN_VEC_PERMXOR.
16573 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16574 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16575 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16576 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16578 * config/doc/extend.texi: Add prototypes for vec_permxor.
16580 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16583 * diagnostic-show-locus.c (class layout_point): Convert m_line
16584 from int to linenum_type.
16585 (line_span::comparator): Use linenum "compare" function when
16586 comparing line numbers.
16587 (test_line_span): New function.
16588 (layout_range::contains_point): Convert param "row" from int to
16590 (layout_range::intersects_line_p): Likewise.
16591 (layout::will_show_line_p): Likewise.
16592 (layout::print_source_line): Likewise.
16593 (layout::should_print_annotation_line_p): Likewise.
16594 (layout::print_annotation_line): Likewise.
16595 (layout::print_leading_fixits): Likewise.
16596 (layout::annotation_line_showed_range_p): Likewise.
16597 (struct line_corrections): Likewise for field m_row.
16598 (line_corrections::line_corrections): Likewise for param "row".
16599 (layout::print_trailing_fixits): Likewise.
16600 (layout::get_state_at_point): Likewise.
16601 (layout::get_x_bound_for_row): Likewise.
16602 (layout::print_line): Likewise.
16603 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16604 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16605 * input.c (selftest::test_linenum_comparisons): New function.
16606 (selftest::input_c_tests): Call it.
16607 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16608 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16609 * selftest.h (ASSERT_GT): New macro.
16610 (ASSERT_GT_AT): New macro.
16611 (ASSERT_LT): New macro.
16612 (ASSERT_LT_AT): New macro.
16614 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16616 PR rtl-optimization/84780
16617 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16619 2018-03-14 Martin Liska <mliska@suse.cz>
16621 * tree.c (record_node_allocation_statistics): Use
16622 get_stats_node_kind.
16623 (get_stats_node_kind): New function extracted from
16624 record_node_allocation_statistics.
16625 (free_node): Use get_stats_node_kind.
16627 2018-03-14 Richard Biener <rguenther@suse.de>
16629 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16630 that the value-set of ANTIC_IN doesn't grow.
16633 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16635 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16636 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16638 2018-03-14 Julia Koval <julia.koval@intel.com>
16640 * config.gcc (icelake-client, icelake-server): New.
16642 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16643 (initial_ix86_arch_features): Ditto.
16644 (PTA_SKYLAKE): Add SGX.
16645 (PTA_ICELAKE): Remove.
16646 (PTA_ICELAKE_CLIENT): New.
16647 (PTA_ICELAKE_SERVER): New.
16648 (ix86_option_override_internal): Split up icelake on icelake client and
16650 (get_builtin_code_for_version): Ditto.
16651 (fold_builtin_cpu): Ditto.
16652 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16653 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16654 * config/i386/i386.h (processor_type): Ditto.
16655 * doc/invoke.texi: Ditto.
16657 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16660 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16661 INTEGER_CST offset, add it together with bitpos / 8 and
16662 sign extend based on POINTER_SIZE.
16666 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16669 * config/i386/constraints.md (Yc): New register constraint.
16670 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16671 Use Yc constraint for alternative 2 of operand 0. Remove
16672 preferred_for_speed attribute.
16674 2018-03-14 Richard Biener <rguenther@suse.de>
16676 PR tree-optimization/84830
16677 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16678 with the old one to avoid oscillations.
16680 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16683 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16685 (assign_by_spills): Return a flag of reload assignment failure.
16686 Do not process the reload assignment failures. Do not spill other
16687 reload pseudos if they has the same reg class. Update n if
16689 (lra_assign): Add a return arg. Set up from the result of
16690 assign_by_spills call.
16691 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16692 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16693 usage_insns if it is not NULL.
16694 (spill_hard_reg_in_range): New function.
16695 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16696 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16697 function prototypes.
16698 (lra_assign): Change prototype.
16699 * lra.c (lra): Add code to deal with fails by splitting hard reg
16702 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16704 * config/riscv/riscv.opt (mrelax): New option.
16705 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16706 "norelax" when riscv_mrelax is disabled.
16707 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16709 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16712 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16713 reassociation for int modes.
16715 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16717 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16718 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16720 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16721 * config/aarch64/aarch64-sve.md
16722 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16723 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16724 (*extend<mode><Vwide>2): Rename to...
16725 (aarch64_sve_extend<mode><Vwide>2): ...this.
16726 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16727 renaming the old pattern to...
16728 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16730 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16731 define_expand, renaming the old pattern to...
16732 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16733 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16734 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16735 account when deciding which SVE instruction the optab should use.
16736 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16738 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16740 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16741 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16742 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16743 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16744 (tlsdesc_small_<mode>): Turn a define_expand and use
16745 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16746 (tlsdesc_small_advsimd_<mode>): ...this.
16747 (tlsdesc_small_sve_<mode>): New pattern.
16749 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16751 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16752 (UNSPEC_UMUL_HIGHPART): New constants.
16753 (MUL_HIGHPART): New int iteraor.
16754 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16755 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16757 (*<su>mul<mode>3_highpart): New define_insn.
16759 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16762 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16765 2018-03-13 Martin Liska <mliska@suse.cz>
16768 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16770 (sem_item_optimizer::~sem_item_optimizer): Release it.
16771 (sem_item_optimizer::merge_classes): Register variable aliases.
16772 (sem_item_optimizer::fixup_pt_set): New function.
16773 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16774 * ipa-icf.h: Declare new variables and functions.
16776 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16778 PR middle-end/84834
16779 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16780 integer_pow2p@2 and test integer_pow2p in condition.
16781 (A < 0 ? C : 0): Similarly for @1.
16783 PR middle-end/84831
16784 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16785 characters starting at p contain '\0' character, don't look beyond
16789 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16790 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16793 * reg-stack.c (change_stack): Change update_end var from int to
16794 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16795 also call set_block_for_insn on the newly added insns and rescan.
16798 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16799 on the last operand.
16802 * tree.c (stabilize_reference_1): Return save_expr (e) for
16803 STATEMENT_LIST even if it doesn't have side-effects.
16805 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16807 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16809 2018-03-12 Renlin Li <renlin.li@arm.com>
16811 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16812 aarch64_output_scalar_simd_mov_immediate.
16814 2018-03-12 Martin Sebor <msebor@redhat.com>
16816 PR tree-optimization/83456
16817 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16818 for perfectly overlapping calls to memcpy.
16819 (gimple_fold_builtin_memory_chk): Same.
16820 (gimple_fold_builtin_strcpy): Handle no-warning.
16821 (gimple_fold_builtin_stxcpy_chk): Same.
16822 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16824 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16826 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16827 parameter. Use it for SFmode.
16828 (rs6000_function_arg_advance_1): Adjust.
16829 (rs6000_function_arg): Adjust.
16830 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16832 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16834 PR rtl-optimization/84169
16835 PR rtl-optimization/84780
16836 * combine.c (can_combine_p): Check for a 2-insn combination whether
16837 the destination register is used between the two insns, too.
16839 2018-03-12 Richard Biener <rguenther@suse.de>
16841 PR tree-optimization/84803
16842 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16843 for refs DR analysis didn't process.
16845 2018-03-12 Richard Biener <rguenther@suse.de>
16847 PR tree-optimization/84777
16848 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16849 force-vectorize loops ignore whether we are optimizing for size.
16851 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16853 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16854 (TARGET_MD_ASM_ADJUST): Define.
16856 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16857 Kito Cheng <kito.cheng@gmail.com>
16858 Chung-Ju Wu <jasonwucj@gmail.com>
16860 * config/nds32/nds32.c (nds32_compute_stack_frame,
16861 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16862 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16863 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16864 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16865 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16866 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16867 * config/nds32/nds32.md (prologue, epilogue): Use macro
16868 NDS32_V3PUSH_AVAILABLE_P to do checking.
16870 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16873 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16874 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16875 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16876 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16877 addition of most attributes on !orig_type_die or the attribute not
16878 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16880 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16881 Chung-Ju Wu <jasonwucj@gmail.com>
16883 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16884 __NDS32_VH__ macro.
16885 * config/nds32/nds32.opt (mvh): New option.
16887 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16888 Chung-Ju Wu <jasonwucj@gmail.com>
16890 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16892 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16893 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16896 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16897 Chung-Ju Wu <jasonwucj@gmail.com>
16899 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16901 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16902 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16904 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16905 Kito Cheng <kito.cheng@gmail.com>
16906 Chung-Ju Wu <jasonwucj@gmail.com>
16908 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16909 UNSPEC_FFMISM and UNSPEC_FLMISM.
16910 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16911 for ffb, ffmism and flmism.
16912 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16913 (unspec_ffmism): Ditto.
16914 (unspec_flmism): Ditto.
16915 (nds32_expand_builtin_impl): Check if string extension is available.
16916 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16917 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16919 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16922 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16925 * lra-assigns.c (assign_by_spills): Return a flag of reload
16926 assignment failure. Do not process the reload assignment
16927 failures. Do not spill other reload pseudos if they has the same
16929 (lra_assign): Add a return arg. Set up from the result of
16930 assign_by_spills call.
16931 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16932 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16933 usage_insns if it is not NULL.
16934 (spill_hard_reg_in_range): New function.
16935 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16936 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16937 function prototypes.
16938 (lra_assign): Change prototype.
16939 * lra.c (lra): Add code to deal with fails by splitting hard reg
16942 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16945 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16947 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16950 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16951 (dw_val_node): Add val_symbolic_view.
16952 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16953 (symview_upper_bound): New.
16954 (new_line_info_table): Initialize symviews_since_reset.
16955 (dwarf2out_source_line): Count symviews_since_reset and set
16956 symview_upper_bound.
16957 (dw_val_equal_p): Handle symview.
16958 (add_AT_symview): New.
16959 (print_dw_val): Handle symview.
16960 (attr_checksum, attr_checksum_ordered): Likewise.
16961 (same_dw_val_p, size_of_die): Likewise.
16962 (value_format, output_die): Likewise.
16963 (add_high_low_attributes): Use add_AT_symview for entry_view.
16964 (dwarf2out_finish): Reset symview_upper_bound, clear
16967 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16970 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16971 Add strict argument and use it.
16972 (rs6000_split_multireg_move): Update for new strict argument.
16973 (mem_operand_gpr): Disallow all non-offsettable addresses.
16974 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16976 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16979 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16980 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16981 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16984 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16985 decl, use remap_type if we want to use the type.
16987 2018-03-09 Martin Sebor <msebor@redhat.com>
16989 PR tree-optimization/84526
16990 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16992 (builtin_access::generic_overlap): Be prepared to handle non-array
16995 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16997 PR rtl-optimization/84682
16998 * lra-constraints.c (process_address_1): Check is_address flag
16999 for address constraints.
17000 (process_alt_operands): Likewise.
17001 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17002 preprocess_constraints.
17003 * recog.h (preprocess_constraints): Add oploc parameter.
17005 * recog.c (preprocess_constraints): Test address_operand for
17006 CT_ADDRESS constraints.
17008 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17011 * lra-assigns.c (assign_by_spills): Return a flag of reload
17012 assignment failure. Do not process the reload assignment
17013 failures. Do not spill other reload pseudos if they has the same
17015 (lra_assign): Add a return arg. Set up from the result of
17016 assign_by_spills call.
17017 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17018 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17019 usage_insns if it is not NULL.
17020 (spill_hard_reg_in_range): New function.
17021 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17022 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17023 function prototypes.
17024 (lra_assign): Change prototype.
17025 * lra.c (lra): Add code to deal with fails by splitting hard reg
17028 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17031 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17032 Accept complain bool parameter. Only emit errors if it is true.
17033 (arm_parse_cpu_option_name): Likewise.
17034 (arm_target_thumb_only): Adjust callers of the above.
17035 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17036 prototype to take a default true bool parameter.
17037 (arm_parse_arch_option_name): Likewise.
17039 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17040 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17044 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17045 * configure: Regenerate.
17046 * configure.ac ("linker --version-script option"): New.
17047 ("linker soname option"): New.
17049 2018-03-09 Richard Biener <rguenther@suse.de>
17051 PR tree-optimization/84775
17052 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17053 immediate uses of predicate stmts and mark them modified.
17056 PR tree-optimization/84178
17057 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17059 (version_loop_for_if_conversion): Delay update_ssa call.
17060 (tree_if_conversion): Delay update_ssa until after predicate
17063 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17066 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17067 when the function accesses prior frames.
17069 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17072 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17073 gen_llsym, otherwise call maybe_gen_llsym.
17075 PR inline-asm/84742
17076 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17077 has ',' character inside of it.
17079 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17082 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17083 as clobbering CC_REGNUM.
17085 2018-03-08 Richard Biener <rguenther@suse.de>
17087 PR middle-end/84552
17088 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17089 (follow_copies_to_constant): Do not follow SSA names registered
17092 2018-03-08 Richard Biener <rguenther@suse.de>
17094 PR tree-optimization/84178
17095 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17097 (version_loop_for_if_conversion): Delay update_ssa call.
17098 (tree_if_conversion): Delay update_ssa until after predicate
17101 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17103 PR tree-optimization/84178
17104 * tree-if-conv.c (release_bb_predicate): Remove the
17105 the assertion that the stmts have NULL use_ops.
17106 Discard the statements, asserting that they haven't
17107 yet been added to a BB.
17109 2018-03-08 Richard Biener <rguenther@suse.de>
17111 PR tree-optimization/84746
17112 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17113 (phi_translate): Pass in destination ANTIC_OUT set.
17114 (phi_translate_1): Likewise. For a simplified result lookup
17115 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17116 (phi_translate_set): Adjust.
17117 (do_pre_regular_insertion): Likewise.
17118 (do_pre_partial_partial_insertion): Likewise.
17120 2018-03-08 Martin Liska <mliska@suse.cz>
17122 PR gcov-profile/84735
17123 * doc/gcov.texi: Document usage of profile files.
17124 * gcov-io.h: Document changes in the format.
17126 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17130 * dwarf2out.c (struct dw_line_info_table): Update comments for
17132 (FORCE_RESET_NEXT_VIEW): New.
17133 (FORCE_RESETTING_VIEW_P): New.
17134 (RESETTING_VIEW_P): Check for -1 too.
17135 (ZERO_VIEW_P): Likewise.
17136 (new_line_info_table): Force-reset next view.
17137 (dwarf2out_begin_function): Likewise.
17138 (dwarf2out_source_line): Simplify zero_view_p initialization.
17139 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17140 view directly. Omit view when omitting .loc at line 0.
17142 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17144 PR tree-optimization/84740
17145 * tree-switch-conversion.c (process_switch): Call build_constructors
17146 only if info.phi_count is non-zero.
17148 PR tree-optimization/84739
17149 * tree-tailcall.c (find_tail_calls): Check call arguments against
17150 DECL_ARGUMENTS (current_function_decl) rather than
17151 DECL_ARGUMENTS (func) when checking for tail recursion.
17153 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17155 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17156 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17157 Volker Reichelt's entry and add entries for people that perform
17158 GCC fuzzy testing and report numerous bugs.
17160 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17163 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17164 readonly data in sdata, if that is disabled.
17165 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17166 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17167 -mreadonly-in-sdata option.
17169 2018-03-07 Martin Sebor <msebor@redhat.com>
17171 PR tree-optimization/84468
17172 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17173 basic block when looking for nul assignment.
17175 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17178 * except.h (output_function_exception_table): Adjust prototype.
17179 * except.c (output_function_exception_table): Remove FNNAME parameter
17180 and add SECTION parameter. Ouput one part of the table at a time.
17181 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17182 the first part of the exception table and emit unwind directives.
17183 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17184 (i386_pe_seh_cold_init): Likewise.
17185 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17186 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17187 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17188 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17189 * config/i386/winnt.c: Include except.h.
17190 (struct seh_frame_state): Add reg_offset, after_prologue and
17191 in_cold_section fields.
17192 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17193 (i386_pe_seh_cold_init): New function.
17194 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17195 to seh->in_cold_section.
17196 (seh_emit_push): Record the offset of the push.
17197 (seh_emit_save): Record the offet of the save.
17198 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17199 Test seh->after_prologue to disregard the epilogue.
17200 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17201 (i386_pe_end_cold_function): New function.
17203 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17206 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17207 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17210 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17212 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17213 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17215 PR middle-end/84723
17216 * multiple_target.c: Include tree-inline.h and intl.h.
17217 (expand_target_clones): Diagnose and fail if node->definition and
17218 !tree_versionable_function_p (node->decl).
17220 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17222 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17224 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17225 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17226 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17228 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17231 * combine.c (try_combine): Use reg_or_subregno instead of handling
17232 just paradoxical SUBREGs and REGs.
17234 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17236 * config/arc/arc.c (arc_finalize_pic): Remove function.
17237 (arc_must_save_register): We use single base PIC register, remove
17238 checks to save/restore the PIC register.
17239 (arc_expand_prologue): Likewise.
17240 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17242 (arc_verify_short): Likewise.
17243 (arc_attr_type): Likewise.
17244 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17245 (walk_stores): Likewise.
17246 (arc_address_cost): Make it static.
17247 (arc_verify_short): Likewise.
17248 (branch_dest): Likewise.
17249 (arc_attr_type): Likewise.
17250 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17251 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17252 (arc_final_prescan_insn): Remove inserting the nops due to
17253 hardware hazards. It is done in reorg step.
17254 (insn_length_variant_t): Remove.
17255 (insn_length_parameters_t): Likewise.
17256 (arc_insn_length_parameters): Likewise.
17257 (arc_get_insn_variants): Likewise.
17258 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17260 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17262 PR inline-asm/84683
17263 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17266 PR tree-optimization/84687
17267 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17269 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17271 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17273 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17274 Rename to ppc_speculation_barrier.
17275 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17276 __builtin_ppc_speculation_barrier.
17278 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17281 * combine.c (combine_simplify_rtx): Don't try to simplify if
17282 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17285 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17287 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17288 to 32 bytes when compiling for POWER9.
17290 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17293 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17294 regparm >= 3 with no arg reg available also for calls with
17295 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17298 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17300 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17302 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17305 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17307 2018-03-05 Richard Biener <rguenther@suse.de>
17309 PR tree-optimization/84486
17310 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17311 When inserting a __builtin_assume_aligned call set the LHS
17312 SSA name alignment info accordingly.
17314 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17316 PR tree-optimization/84114
17317 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17318 Avoid reassociation of FLOAT_MODE addition.
17320 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17322 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17323 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17324 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17325 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17326 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17327 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17328 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17330 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17331 __builtin_ia32_wbinvd): New builtins.
17332 (SPECIAL_ARGS2): New.
17333 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17334 (SPECIAL_ARGS2): New.
17335 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17336 (ix86_valid_target_attribute_inner_p): Ditto.
17337 (ix86_init_mmx_sse_builtins): Add special_args2.
17338 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17339 TARGET_WBNOINVD_P): New.
17340 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17341 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17342 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17343 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17344 * config/i386/pconfigintrin.h: New file.
17345 * config/i386/wbnoinvdintrin.h: Ditto.
17346 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17348 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17350 2018-03-05 Richard Biener <rguenther@suse.de>
17352 PR tree-optimization/84670
17353 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17355 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17356 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17357 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17358 doesn't grow if all successors (recursively) were visited at least
17361 2018-03-05 Richard Biener <rguenther@suse.de>
17363 PR tree-optimization/84650
17364 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17365 if executed in the loop pipeline.
17367 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17369 * doc/configfiles.texi (Configuration Files): Move info about
17370 conditionalizing $target-protos.h to...
17371 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17372 differs from $target-protos.h.
17374 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17375 Chung-Ju Wu <jasonwucj@gmail.com>
17377 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17378 * config/nds32/nds32-multiple.md (setmemsi): Define.
17379 * config/nds32/nds32-memory-manipulation.c
17380 (nds32_gen_dup_4_byte_to_word_value): New.
17381 (emit_setmem_word_loop): New.
17382 (emit_setmem_byte_loop): New.
17383 (nds32_expand_setmem_loop): New.
17384 (nds32_expand_setmem_loop_v3m): New.
17385 (nds32_expand_setmem_unroll): New.
17386 (nds32_expand_setmem): New.
17388 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17389 Chung-Ju Wu <jasonwucj@gmail.com>
17391 * config/nds32/nds32-memory-manipulation.c
17392 (nds32_emit_load_store): New.
17393 (nds32_emit_post_inc_load_store): New.
17394 (nds32_emit_mem_move): New.
17395 (nds32_emit_mem_move_block): New.
17396 (nds32_expand_movmemsi_loop_unknown_size): New.
17397 (nds32_expand_movmemsi_loop_known_size): New.
17398 (nds32_expand_movmemsi_loop): New.
17399 (nds32_expand_movmemsi_unroll): New.
17400 (nds32_expand_movmemqi): Rename ...
17401 (nds32_expand_movmemsi): ... to this.
17402 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17403 (movmemsi): ... to this.
17404 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17405 (nds32_expand_movmemsi): ... to this.
17407 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17408 Monk Chiang <sh.chiang04@gmail.com>
17409 Chung-Ju Wu <jasonwucj@gmail.com>
17411 * config/nds32/nds32-protos.h
17412 (nds32_expand_load_multiple): New arguments.
17413 (nds32_expand_store_multiple): Ditto.
17414 (nds32_valid_multiple_load_store): Rename ...
17415 (nds32_valid_multiple_load_store_p): ... to this.
17416 * config/nds32/nds32-memory-manipulation.c
17417 (nds32_expand_load_multiple): Refine implementation.
17418 (nds32_expand_store_multiple): Ditto.
17419 * config/nds32/nds32-multiple.md
17420 (load_multiple): Update nds32_expand_load_multiple interface.
17421 (store_multiple): Update nds32_expand_store_multiple interface.
17422 * config/nds32/nds32-predicates.c
17423 (nds32_valid_multiple_load_store): Rename ...
17424 (nds32_valid_multiple_load_store_p): ... to this and refine
17426 * config/nds32/predicates.md
17427 (nds32_load_multiple_and_update_address_operation): New predicate.
17428 (nds32_store_multiple_and_update_address_operation): New predicate.
17430 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17431 Chung-Ju Wu <jasonwucj@gmail.com>
17433 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17434 (combo): New attribute.
17435 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17437 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17439 * config/nds32/nds32.opt: Change -mcmodel= default value.
17441 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17442 Monk Chiang <sh.chiang04@gmail.com>
17443 Chung-Ju Wu <jasonwucj@gmail.com>
17445 * config/nds32/constants.md (unspec_element): New enum.
17446 * config/nds32/constraints.md (Umw): New constraint.
17447 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17448 * config/nds32/nds32-intrinsic.md: Likewise.
17449 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17450 (nds32_valid_smw_lwm_base_p): New.
17451 (nds32_output_smw_single_word): New.
17452 (nds32_output_lmw_single_word): New.
17453 (nds32_expand_unaligned_load): New.
17454 (nds32_expand_unaligned_store): New.
17455 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17456 (nds32_output_smw_single_word): Declare.
17457 (nds32_output_lmw_single_word): Declare.
17458 (nds32_expand_unaligned_load): Declare.
17459 (nds32_expand_unaligned_store): Declare.
17460 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17461 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17462 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17463 NDS32_BUILTIN_UASTORE_DW.
17464 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17467 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17468 Kito Cheng <kito.cheng@gmail.com>
17469 Chung-Ju Wu <jasonwucj@gmail.com>
17471 * config/nds32/nds32-intrinsic.c
17472 (nds32_expand_builtin_null_ftype_reg): Delete.
17473 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17474 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17475 (nds32_read_argument): New.
17476 (nds32_legitimize_target): Ditto.
17477 (nds32_legitimize_argument): Ditto.
17478 (nds32_check_constant_argument): Ditto.
17479 (nds32_expand_unop_builtin): Ditto.
17480 (nds32_expand_unopimm_builtin): Ditto.
17481 (nds32_expand_binop_builtin): Ditto.
17482 (nds32_builtin_decl_impl): Ditto.
17483 (builtin_description): Ditto.
17484 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17485 (nds32_init_builtins_impl): Ditto.
17486 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17487 (nds32_builtin_decl): New.
17488 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17489 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17491 2018-03-02 Jeff Law <law@redhat.com>
17493 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17494 (redundant_insn, fill_simple_delay_slots): Likewise.
17495 (fill_slots_from_thread): Likewise.
17496 * resource.c (mark_referenced_resources): Likewise.
17497 (mark_set_resources, find_dead_or_set_registers): Likewise.
17499 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17501 * substring-locations.h (format_warning_va): Formatting fix for
17502 ATTRIBUTE_GCC_DIAG.
17503 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17505 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17506 * substring-locations.c: Include intl.h.
17507 (format_warning_va): Turned into small wrapper around
17508 format_warning_n_va, renamed to ...
17509 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17510 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17512 (format_warning_at_substring_n): New function.
17513 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17514 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17515 format_warning_at_substring with just a shorter name instead of
17516 const function pointer.
17517 (fmtwarn_n): New function.
17518 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17519 appropriate, get rid of all the fmtstr temporaries, move conditionals
17520 with G_() wrapped string literals directly into fmtwarn arguments,
17521 cast dir.len to (int), formatting fixes.
17523 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17525 * doc/invoke.texi: Remove "Cilk Plus" references.
17527 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17528 Richard Biener <rguenther@suse.de>
17531 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17532 for error or warning attributes if CALL_FROM_THUNK_P is set.
17535 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17538 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17539 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17542 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17543 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17545 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17546 instead of -1U in last predictors element's probability member.
17548 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17551 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17552 arguments if they are comparable.
17554 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17556 PR tree-optimization/84634
17557 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17558 masks and masked_loop_p with a single loop_masks, making sure it's
17559 null for bb vectorization.
17561 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17563 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17564 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17565 loop->force_vectorize to check whether there is no alias.
17567 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17570 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17572 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17574 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17575 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17576 instead of a loop around prev_real_insn.
17577 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17580 PR inline-asm/84625
17581 * config/i386/i386.c (ix86_print_operand): Use conditional
17582 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17585 2018-03-02 Richard Biener <rguenther@suse.de>
17587 PR tree-optimization/84427
17588 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17589 (bitmap_set_subtract_values): Rewrite to handle multiple
17592 (prune_clobbered_mems): Likewise.
17593 (phi_translate): Take edge instead of pred/phiblock.
17594 (phi_translate_1): Likewise.
17595 (phi_translate_set): Likewise. Insert all translated
17596 exprs for a value into the set, keeping possibly multiple
17597 expressions per value.
17598 (compute_antic_aux): Adjust for phi_translate changes.
17599 When intersecting union the expressions and prune those
17600 not in the final value set, keeping possibly multiple
17601 expressions per value. Do not use value-insertion
17602 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17603 all expressions. Add verification that the value-sets
17604 only shrink during iteration.
17605 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17606 (do_pre_regular_insertion): Likewise.
17607 (do_pre_partial_partial_insertion): Likewise.
17609 2018-03-02 Richard Biener <rguenther@suse.de>
17612 * config/darwin.c (saved_debug_info_level): New static global.
17613 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17614 (darwin_asm_lto_end): Restore debug info generation settings.
17616 2018-03-01 Martin Liska <mliska@suse.cz>
17619 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17620 volatile arguments.
17622 2018-03-01 Richard Biener <rguenther@suse.de>
17625 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17626 type annotation with LTO when debug was disabled at compile-time.
17628 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17630 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17632 (mips_final_postscan_insn): Likewise.
17634 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17636 PR rtl-optimization/84528
17637 * alias.c (init_alias_target): Add commentary.
17638 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17639 a unique base value if the frame pointer is not eliminated
17640 to the stack pointer.
17642 2018-03-01 Tom de Vries <tom@codesourcery.com>
17644 PR rtl-optimization/83327
17645 * lra-int.h (hard_regs_spilled_into): Declare.
17646 * lra.c (hard_regs_spilled_into): Define.
17647 (init_reg_info): Init hard_regs_spilled_into.
17648 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17649 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17650 (process_bb_lives): Handle hard_regs_spilled_into.
17651 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17652 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17654 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17656 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17657 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17658 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17659 * config/rs6000/aix72.h: New file.
17661 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17663 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17664 instead of warning_at with conditional singular and plural messages
17668 * stor-layout.c (update_alignment_for_field): For
17669 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17670 && !DECL_PACKED (field), do the alignment update, just use
17671 only desired_align instead of MAX (type_align, desired_align)
17673 (place_field): Don't do known_align < desired_align handling
17674 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17675 is non-NULL, instead do it after rli->prev_field handling and
17676 only if not within a bitfield word. For DECL_PACKED (field)
17677 use type_align of BITS_PER_UNIT.
17679 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17681 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17682 superfluous parentheses and trailing spaces.
17684 2018-02-28 Richard Biener <rguenther@suse.de>
17686 PR tree-optimization/84584
17687 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17688 SCoPs with fake exit edge.
17690 2018-02-28 Martin Liska <mliska@suse.cz>
17693 * timevar.c (timer::print): Fix format to properly print 100%
17696 2018-02-28 Richard Biener <rguenther@suse.de>
17698 PR middle-end/84607
17699 * genmatch.c (capture_info::walk_match): Do not mark
17700 captured expressions without operands as expr_p given
17701 they act more like predicates and should be subject to
17702 "lost tail" side-effect preserving.
17704 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17706 PR rtl-optimization/81611
17707 * auto-inc-dec.c (attempt_change): Move dead note from
17708 mem_insn if it's the next use of regno
17709 (find_address): Take address use of reg holding
17710 non-incremented value. Add parm to limit search to the named
17712 (merge_in_block): Attempt to use a mem insn that is the next
17713 use of the original regno.
17715 2018-02-27 Martin Sebor <msebor@redhat.com>
17718 * doc/invoke.texi (-Wmissing-attributes): New option.
17719 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17721 2018-02-27 Martin Sebor <msebor@redhat.com>
17723 PR translation/84207
17724 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17725 n argument to unsigned HOST_WIDE_INT.
17726 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17727 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17728 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17729 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17731 2018-02-27 Richard Biener <rguenther@suse.de>
17733 PR tree-optimization/84512
17734 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17735 Do not use the estimate returned from record_stmt_cost for
17736 the scalar iteration cost but sum properly using add_stmt_cost.
17738 2018-02-27 Richard Biener <rguenther@suse.de>
17740 PR tree-optimization/84466
17741 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17742 Adjust last change to less strictly validate use operands.
17744 2018-02-27 Martin Liska <mliska@suse.cz>
17746 PR gcov-profile/84548
17747 * gcov.c (process_file): Allow partial overlap and consider it
17748 also as group functions.
17749 (output_lines): Properly calculate range of lines for a group.
17751 2018-02-27 Martin Liska <mliska@suse.cz>
17753 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17754 'ggc' suffixes. Change first column width.
17755 (timer::print): Fix formatting of the column.
17757 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17759 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17760 preserve inline entry blocks for the sake of debug inline
17761 entry point markers alone.
17762 (remove_unused_locals): Suggest in comments a better place to
17763 force the preservation of inline entry blocks that are
17764 otherwise unused, but do not preserve them.
17766 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17768 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17770 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17773 * config/i386/constraints.md (Bs): Replace
17774 ix86_indirect_branch_register with
17775 TARGET_INDIRECT_BRANCH_REGISTER.
17777 * config/i386/i386.md (indirect_jump): Likewise.
17778 (tablejump): Likewise.
17779 (*sibcall_memory): Likewise.
17780 (*sibcall_value_memory): Likewise.
17781 Peepholes of indirect call and jump via memory: Likewise.
17782 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17783 (*sibcall_value_GOT_32): Likewise.
17784 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17785 (GOT_memory_operand): Likewise.
17786 (call_insn_operand): Likewise.
17787 (sibcall_insn_operand): Likewise.
17788 (GOT32_symbol_operand): Likewise.
17789 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17791 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17793 PR rtl-optimization/83496
17794 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17795 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17796 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17797 redundant insn, if any.
17798 (relax_delay_slots): Likewise.
17799 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17801 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17803 PR tree-optimization/83965
17804 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17805 that grouped statements are part of a reduction chain. Return
17806 true if the statement is not marked as a reduction itself but
17807 is part of a group.
17808 (vect_recog_dot_prod_pattern): Don't check whether the statement
17809 is part of a group here.
17810 (vect_recog_sad_pattern): Likewise.
17811 (vect_recog_widen_sum_pattern): Likewise.
17813 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17816 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17818 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17821 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17823 (ix86_output_indirect_function_return): New prototype.
17824 (ix86_split_simple_return_pop_internal): Likewise.
17825 * config/i386/i386.c (indirect_return_via_cx): New.
17826 (indirect_return_via_cx_bnd): Likewise.
17827 (indirect_thunk_name): Handle return va CX_REG.
17828 (output_indirect_thunk_function): Create alias for
17829 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17830 (ix86_output_indirect_jmp): Remove the bool argument.
17831 (ix86_output_indirect_function_return): New function.
17832 (ix86_split_simple_return_pop_internal): Likewise.
17833 * config/i386/i386.md (*indirect_jump): Don't pass false
17834 to ix86_output_indirect_jmp.
17835 (*tablejump_1): Likewise.
17836 (simple_return_pop_internal): Change it to define_insn_and_split.
17837 Call ix86_split_simple_return_pop_internal to split it for
17838 -mfunction-return=.
17839 (simple_return_indirect_internal): Call
17840 ix86_output_indirect_function_return instead of
17841 ix86_output_indirect_jmp.
17843 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17846 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17847 memset and value initialization afterwards.
17849 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17851 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17853 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17856 * common/config/aarch64/aarch64-common.c
17857 (aarch_option_optimization_table[]): Switch
17858 off fomit-frame-pointer
17860 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17861 Chung-Ju Wu <jasonwucj@gmail.com>
17863 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17865 (store_multiple): Ditto.
17867 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17869 * config.gcc: Add --with-cpu support for nds32 target.
17870 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17871 * config/nds32/nds32.opt: Add -mcpu= option.
17873 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17875 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17876 isel=yes): Warn for these deprecated options.
17878 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17880 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17881 ISA_2_5_MASKS_EMBEDDED.
17883 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17885 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17886 p->max as pointers rather than using iterative_hash_expr.
17888 2018-02-23 Carl Love <cel@us.ibm.com>
17890 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17891 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17893 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17894 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17895 P8V_BUILTIN_VEC_VUNSIGNED2.
17897 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17900 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17901 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17903 * lra-constraints.c (curr_insn_transform): Set up
17904 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17906 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17907 * lra-eliminations.c (spill_pseudos): Ditto.
17908 (process_insn_for_elimination): Ditto.
17909 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17910 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17911 LRA_NON_CLOBBERED_ALT.
17913 2018-02-22 Martin Sebor <msebor@redhat.com>
17915 PR tree-optimization/84480
17916 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17917 to maybe_diag_stxncpy_trunc. Call it.
17918 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17919 from gimple_fold_builtin_strcpy. Print inlining stack.
17920 (handle_builtin_stxncpy): Print inlining stack.
17921 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17923 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17926 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17927 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17928 and -fcheck-pointer-bounds are used together.
17929 (indirect_thunk_prefix): New enum.
17930 (indirect_thunk_need_prefix): New function.
17931 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17932 "_nt" instead of "_bnd" for NOTRACK prefix.
17933 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17934 (output_indirect_thunk_function): Likewise.
17936 (ix86_code_end): Update output_indirect_thunk_function calls.
17937 (ix86_output_indirect_branch_via_reg): Replace
17938 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17939 (ix86_output_indirect_branch_via_push): Likewise.
17940 (ix86_output_function_return): Likewise.
17941 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17942 incompatible with -fcf-protection=branch and
17943 -fcheck-pointer-bounds.
17945 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17948 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17949 Change gcc_assert call to output_operand_lossage.
17951 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17953 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17955 2018-02-22 DJ Delorie <dj@redhat.com>
17956 Sebastian Perta <sebastian.perta@renesas.com>
17957 Oleg Endo <olegendo@gcc.gnu.org>
17959 * config/rx/rx.c (rx_rtx_costs): New function.
17960 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17962 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17964 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17966 2018-02-22 Martin Liska <mliska@suse.cz>
17969 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17970 Add "native" as a possible value.
17972 2018-02-22 Martin Liska <mliska@suse.cz>
17975 * config/i386/i386.c (ix86_option_override_internal):
17976 Add "native" as a possible value for -march and -mtune.
17978 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17981 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17982 to all type variants.
17984 PR tree-optimization/84503
17985 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17986 width as info->bitpos + info->bitsize - start.
17987 (merged_store_group::merge_overlapping): Simplify width computation.
17988 (check_no_overlap): New function.
17989 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17990 start + width and last_order of the group, fail if check_no_overlap
17992 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17993 to group if check_no_overlap fails.
17995 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17997 * config/rs6000/altivec.md: Delete contraint arguments to
17998 define_expand, define_split, and define_peephole2, and in
17999 define_insn_and_split if always unused.
18000 * config/rs6000/darwin.md: Ditto.
18001 * config/rs6000/dfp.md: Ditto.
18002 * config/rs6000/rs6000.md: Ditto.
18003 * config/rs6000/sync.md: Ditto.
18004 * config/rs6000/vector.md: Ditto.
18005 * config/rs6000/vsx.md: Ditto.
18007 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18009 * config/rs6000/altivec.md: Write output control strings as braced
18010 blocks instead of double-quoted strings.
18011 * config/rs6000/darwin.md: Ditto.
18012 * config/rs6000/rs6000.md: Ditto.
18013 * config/rs6000/vector.md: Ditto.
18014 * config/rs6000/vsx.md: Ditto.
18016 2018-02-21 Jason Merrill <jason@redhat.com>
18018 PR c++/84314 - ICE with templates and fastcall attribute.
18019 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18021 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18023 * ipa-cp.c (determine_versionability): Fix comment typos.
18025 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18028 * ipa-cp.c (determine_versionability): Do not version functions caling
18031 2018-02-21 Martin Liska <mliska@suse.cz>
18034 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18035 Add "native" as a possible value.
18036 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18037 the macro when native cpu detection is available.
18039 2018-02-21 Martin Liska <mliska@suse.cz>
18042 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18043 Add "native" as a possible value.
18044 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18045 when native cpu detection is available.
18047 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18048 Martin Sebor <msebor@redhat.com>
18050 PR tree-optimization/84478
18051 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18053 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18054 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18055 support which is conservatively correct, for 2 only stay conservative
18056 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18057 argument to the 2 argument get_range_strlen, adjust 6 arg
18058 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18060 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18061 (gimple_fold_builtin_strlen): Pass true as last argument to
18064 2018-02-20 Martin Sebor <msebor@redhat.com>
18066 PR middle-end/84095
18067 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18068 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18069 (builtin_memref::builtin_memref): Factor out parts into
18070 set_base_and_offset and call it.
18072 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18074 PR middle-end/84406
18075 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18076 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18077 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18078 search at the associated MODE_INT.
18080 2018-02-20 Jeff Law <law@redhat.com>
18082 PR middle-end/82123
18083 PR tree-optimization/81592
18084 PR middle-end/79257
18085 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18086 for range data rather than using global data.
18087 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18088 range data rather than using global data.
18089 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18090 pass it to children as needed.
18091 (struct directive::fmtresult): Similarly.
18092 (struct directive::set_width): Similarly.
18093 (struct directive::set_precision): Similarly.
18094 (format_integer, format_directive, parse_directive): Similarly.
18095 (format_none): Accept unnamed vr_values parameter.
18096 (format_percent, format_floating, format_character): Similarly.
18097 (format_string, format_plain): Similarly.
18098 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18099 the EVRP range analyzer for range data rather than using global data.
18100 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18101 gimple-ssa-evrp-analyze.h
18102 (class sprintf_dom_walker): Add after_dom_children member function.
18103 Add evrp_range_analyzer member.
18104 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18105 range analyzer as needed.
18106 (sprintf_dom_walker::after_dom_children): New member function.
18107 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18109 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18110 (evrp_range_analyzer::pop_to_marker): Likewise.
18112 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18114 PR tree-optimization/84419
18115 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18116 with the required type if its current type is compatible but
18119 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18121 PR middle-end/82004
18122 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18123 after vectorization.
18125 2018-02-20 Martin Liska <mliska@suse.cz>
18128 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18129 possible values if we don't have a hint.
18131 2018-02-20 Martin Liska <mliska@suse.cz>
18135 * final.c (shorten_branches): Build align_tab array with one
18137 * opts.c (finish_options): Add alignment option limit check.
18138 (MAX_CODE_ALIGN): Likewise.
18139 (MAX_CODE_ALIGN_VALUE): Likewise.
18140 * doc/invoke.texi: Document maximum allowed option value for
18141 all -falign-* options.
18143 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18146 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18147 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18148 * var-tracking.c (emit_note_insn_var_location): Remove all references
18149 to NOTE_INSN_CALL_ARG_LOCATION.
18150 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18151 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18152 Use copy_rtx_if_shared.
18153 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18154 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18155 (dwarf2out_var_location): Remove handling of
18156 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18158 * final.c (final_scan_insn): Remove all references to
18159 NOTE_INSN_CALL_ARG_LOCATION.
18160 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18161 before dumping final insns.
18162 * except.c (emit_note_eh_region_end): Remove all references to
18163 NOTE_INSN_CALL_ARG_LOCATION.
18164 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18165 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18166 * config/arc/arc.c (hwloop_optimize): Likewise.
18167 * config/arm/arm.c (create_fix_barrier): Likewise.
18168 * config/s390/s390.c (s390_chunkify_start): Likewise.
18169 * config/sh/sh.c (find_barrier): Likewise.
18170 * config/i386/i386.c (rest_of_insert_endbranch,
18171 ix86_seh_fixup_eh_fallthru): Likewise.
18172 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18173 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18174 * config/frv/frv.c (frv_function_prologue): Likewise.
18175 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18177 (note_outside_basic_block_p): Remove all references to
18178 NOTE_INSN_CALL_ARG_LOCATION.
18179 * gengtype.c (adjust_field_rtx_def): Likewise.
18180 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18182 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18183 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18186 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18189 PR tree-optimization/84452
18190 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18191 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18194 2018-02-19 Martin Liska <mliska@suse.cz>
18197 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18199 2018-02-19 Martin Liska <mliska@suse.cz>
18200 Richard Sandiford <richard.sandiford@linaro.org>
18202 PR tree-optimization/82491
18203 * gimple-fold.c (get_base_constructor): Make earlier bail out
18206 2018-02-19 Carl Love <cel@us.ibm.com>
18208 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18209 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18211 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18212 P8V_BUILTIN_VEC_NEG.
18214 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18216 * config/rl78/rl78.md (movdf): New define expand.
18218 2018-02-19 Martin Liska <mliska@suse.cz>
18221 * doc/invoke.texi: Fix typo.
18222 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18224 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18226 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18227 handle rs6000_single_float and rs6000_double_float specially for
18230 2018-02-16 Jeff Law <law@redhat.com>
18232 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18233 (pop_regs): Use it.
18235 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18238 * ipa-inline.c (inline_small_functions): Fix a typo.
18240 2018-02-16 Nathan Sidwell <nathan@acm.org>
18242 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18244 2018-02-16 Carl Love <cel@us.ibm.com>
18246 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18247 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18248 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18249 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18250 expansion to P8V_BUILTIN_VEC_FLOAT2.
18252 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18254 PR rtl-optimization/70023
18255 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18256 src_regno into account.
18258 2018-02-16 Carl Love <cel@us.ibm.com>
18260 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18261 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18262 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18263 * config/rs6000/rs6000.c: Remove case statements for
18264 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18265 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18266 and P9V_BUILTIN_VEC_VINSERT4B.
18267 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18268 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18269 * config/rs6000/vsx.md:
18270 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18273 2018-02-16 Carl Love <cel@us.ibm.com>
18275 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18277 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18279 * config/rs6000/rs6000-c.c: Add the definitions for
18280 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18281 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18282 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18283 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18284 definition for insert4b and define insn *insert3b_internal.
18285 * doc/extend.texi: Add documentation for vec_extract4b.
18287 2018-02-16 Nathan Sidwell <nathan@acm.org>
18289 * doc/extend.texi (Backwards Compatibility): Mention friend
18290 injection. Note for-scope is deprecated.
18291 * doc/invoke.texi (-ffriend-injection): Deprecate.
18293 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18295 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18296 that moved to I2, also allow destinations that are a paradoxical
18297 subreg (instead of a normal reg).
18299 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18302 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18305 2018-02-16 Richard Biener <rguenther@suse.de>
18307 PR tree-optimization/84037
18308 PR tree-optimization/84016
18310 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18311 Adjust vec_construct for the fact we need additional higher latency
18312 128bit inserts for AVX256 and AVX512 vector builds.
18313 (ix86_add_stmt_cost): Scale vector construction cost for
18316 2018-02-16 Richard Biener <rguenther@suse.de>
18318 PR tree-optimization/84417
18319 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18320 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18321 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18323 2018-02-16 Martin Liska <mliska@suse.cz>
18326 * internal-fn.def (ASAN_CHECK): Set proper flags.
18327 (ASAN_MARK): Likewise.
18329 2018-02-16 Julia Koval <julia.koval@intel.com>
18331 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18332 from PTA_CANNONLAKE.
18334 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18337 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18338 Use ++iter rather than iter++ for std::list iterators.
18339 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18340 defer deleting them until all nodes in the forest are processed. Do
18341 free even leaf nodes. Change to_process into auto_vec.
18344 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18345 * vec.h (vec_default_construct): Use memset instead of placement new
18346 if BROKEN_VALUE_INITIALIZATION is defined.
18347 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18348 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18351 PR rtl-optimization/83723
18352 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18353 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18354 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18356 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18358 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18360 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18362 PR rtl-optimization/81443
18363 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18364 from inner REGs to paradoxical SUBREGs.
18366 2018-02-16 Richard Biener <rguenther@suse.de>
18368 PR tree-optimization/84399
18369 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18370 For operands we can analyze at their definition make sure we can
18371 analyze them at each use as well.
18373 2018-02-16 Richard Biener <rguenther@suse.de>
18375 PR tree-optimization/84190
18376 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18377 volatile accesses if the decl isn't volatile.
18379 2018-02-15 Jason Merrill <jason@redhat.com>
18381 PR c++/84314 - ICE with templates and fastcall attribute.
18382 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18383 TYPE_CANONICAL on an existing type.
18385 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18387 PR tree-optimization/84383
18388 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18389 dstoff nor call operand_equal_p if dstbase is NULL.
18391 PR tree-optimization/84334
18392 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18393 also a CONSTANT_CLASS_P, punt.
18395 2018-02-14 Jim Wilson <jimw@sifive.com>
18397 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18398 first SMALL_OPERAND check. New local min_second_step. Move assert
18399 to where locals are set. Add TARGET_RVC support.
18400 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18402 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18404 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18406 2018-02-14 Martin Sebor <msebor@redhat.com>
18408 PR tree-optimization/83698
18409 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18410 arrays constrain the offset range to their bounds.
18411 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18412 (builtin_access::overlap): Avoid setting the size of overlap if it's
18414 (maybe_diag_overlap): Also consider arrays when deciding what values
18415 of offsets to include in diagnostics.
18417 2018-02-14 Martin Sebor <msebor@redhat.com>
18420 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18421 that correspond to the kind of a declaration.
18423 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18426 * config/pa/pa.md: Load address of PIC label using the linkage table
18427 if the label is nonlocal.
18429 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18431 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18432 warning message if user requests -maltivec=be.
18433 * doc/invoke.texi: Document deprecation of -maltivec=be.
18435 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18438 * config/rs6000/rs6000-c.c: Update definitions for
18439 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18440 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18442 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18445 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18446 add _get_ssp intrinsics. Remove argument from
18447 __builtin_ia32_rdssp[d|q].
18448 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18449 * config/i386/i386-builtin.def: Remove argument from
18450 __builtin_ia32_rdssp[d|q].
18451 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18452 ix86_expand_special_args_builtin for _rdssp[d|q].
18453 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18454 Clear register before usage.
18455 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18456 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18458 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18460 PR tree-optimization/84357
18461 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18462 operand 1 of an ARRAY_REF too.
18464 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18467 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18468 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18470 (set_of_reg): New struct.
18471 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18472 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18473 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18475 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18476 Split into bitclr, bitset, bitinvert patterns if appropriate.
18477 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18478 use rx_fuse_in_memory_bitop.
18479 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18480 to named insn, correct maximum insn length.
18482 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18485 * machmode.def: Define a complex mode for PARTIAL_INT.
18486 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18488 * doc/rtl.texi: Document CSPImode.
18489 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18491 (msp430_hard_regno_nregs_with_padding): Likewise.
18493 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18496 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18498 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18500 PR rtl-optimization/84169
18501 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18502 we generated a parallel as new i3 and we split that to new i2 and i3
18503 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18504 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18505 those to i2, not i1. Partially rewrite this scan code.
18507 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18510 * stor-layout.c (place_field): For variable length fields, adjust
18511 offset_align afterwards not just based on the field's alignment,
18512 but also on the size.
18514 PR middle-end/84309
18515 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18516 of exps and logs in the use_exp2 case.
18518 2018-02-13 Jeff Law <law@redhat.com>
18520 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18521 entry for "vector".
18523 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18526 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18530 * common.opt (gas-loc-support, gas-locview-support): New.
18531 (ginline-points, ginternal-reset-location-views): New.
18532 * doc/invoke.texi: Document them. Use @itemx where intended.
18533 (gvariable-location-views): Adjust.
18534 * target.def (reset_location_view): New.
18535 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18536 (TARGET_RESET_LOCATION_VIEW): New.
18537 * doc/tm.texi: Rebuilt.
18538 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18539 (dwarf2out_default_as_locview_support): New.
18540 (output_asm_line_debug_info): Use option variables.
18541 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18542 (output_loc_list): Likewise.
18543 (add_high_low_attributes): Check option variables.
18544 Don't output entry view attribute in strict mode.
18545 (gen_inlined_subroutine_die): Check option variables.
18546 (dwarf2out_inline_entry): Likewise.
18547 (init_sections_and_labels): Likewise.
18548 (dwarf2out_early_finish): Likewise.
18549 (maybe_reset_location_view): New, from...
18550 (dwarf2out_var_location): ... here. Call it.
18551 * debug.h (dwarf2out_default_as_loc_support): Declare.
18552 (dwarf2out_default_as_locview_support): Declare.
18553 * hooks.c (hook_int_rtx_insn_0): New.
18554 * hooks.h (hook_int_rtx_insn_0): Declare.
18555 * toplev.c (process_options): Take -gas-loc-support and
18556 -gas-locview-support from dwarf2out. Enable
18557 -gvariable-location-views by default only with locview
18558 assembler support. Enable -ginternal-reset-location-views by
18559 default only if the target defines the corresponding hook.
18560 Enable -ginline-points by default if location views are
18561 enabled; force it disabled if statement frontiers are
18563 * tree-inline.c (expand_call_inline): Check option variables.
18564 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18566 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18568 PR tree-optimization/84321
18569 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18570 handling. Also check whether the anti-range contains any values
18571 that satisfy the mask; switch to a VR_RANGE if not.
18573 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18576 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18578 2018-02-13 Martin Jambor <mjambor@suse.cz>
18581 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18582 of call statements, also set location of a load to a temporary.
18584 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18586 * config/rl78/rl78.c (add_vector_labels): New function.
18587 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18588 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18589 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18590 which checks that no arguments are passed.
18591 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18592 * doc/extend.texi: Documentation for the new attribute.
18594 2018-02-13 Andreas Schwab <schwab@suse.de>
18596 * config/riscv/linux.h (CPP_SPEC): Define.
18598 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18601 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18602 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18603 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18604 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18605 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18606 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18607 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18608 temporarily for AES and PCLMUL builtins.
18610 PR tree-optimization/84339
18611 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18612 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18615 PR middle-end/84309
18616 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18617 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18618 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18620 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18622 * omp-simd-clone.h: New file.
18623 * omp-simd-clone.c: Include omp-simd-clone.h.
18624 (expand_simd_clones): No longer static.
18625 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18626 cgraph.h and omp-simd-clone.h.
18627 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18628 (vect_recog_widen_shift_pattern): Formatting fix.
18629 (vect_pattern_recog_1): Don't check optab for calls.
18632 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18633 operands[2] into a REG before using gen_lowpart on it.
18635 2018-02-12 Jeff Law <law@redhat.com>
18638 * config/sh/sh.c (find_barrier): Consider a sibling call
18641 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18642 successfully back substituting a reg.
18644 2018-02-12 Richard Biener <rguenther@suse.de>
18646 PR tree-optimization/84037
18647 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18648 parameter, move visited init to caller.
18649 (vect_slp_analyze_operations): Separate cost from validity
18650 check, initialize visited once for all instances.
18651 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18653 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18655 (vect_model_promotion_demotion_cost): Likewise.
18656 (vectorizable_bswap): Guard cost modeling with !slp_node
18657 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18659 (vectorizable_call): Likewise.
18660 (vectorizable_conversion): Likewise.
18661 (vectorizable_assignment): Likewise.
18662 (vectorizable_shift): Likewise.
18663 (vectorizable_operation): Likewise.
18664 (vectorizable_store): Likewise.
18665 (vectorizable_load): Likewise.
18666 (vectorizable_condition): Likewise.
18667 (vectorizable_comparison): Likewise.
18669 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18672 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18673 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18674 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18676 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18678 PR middle-end/83665
18679 * params.def (inline-min-speedup): Increase from 8 to 15.
18680 (max-inline-insns-auto): Decrease from 40 to 30.
18681 * ipa-split.c (consider_split): Add some buffer for function to
18682 be considered inlining candidate.
18683 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18686 2018-02-12 Richard Biener <rguenther@suse.de>
18688 PR tree-optimization/84037
18689 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18690 matched stmts if we cannot swap the non-matched ones.
18692 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18694 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18695 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18696 _mm_maskz_scalef_round_ss): New intrinsics.
18697 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18698 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18699 __builtin_ia32_scalefss_round): Remove.
18700 (__builtin_ia32_scalefsd_mask_round,
18701 __builtin_ia32_scalefss_mask_round): New intrinsics.
18702 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18703 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18704 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18705 "<round_constraint>")): Changed to ...
18706 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18707 "<round_scalar_constraint>")): ... this.
18708 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18709 %0, %1, %2<round_op3>}"): Changed to ...
18710 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18711 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18712 %2<round_scalar_mask_op3>}"): ... this.
18713 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18715 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18717 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18718 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18719 (_mm_maskz_sqrt_round_ss): New intrinsics.
18720 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18721 (__builtin_ia32_sqrtsd_mask_round)
18722 (__builtin_ia32_sqrtss_mask_round): New builtins.
18723 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18724 (__builtin_ia32_sqrtss_round): Remove.
18725 (__builtin_ia32_sqrtsd_mask_round)
18726 (__builtin_ia32_sqrtss_mask_round): New builtins.
18727 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18728 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18729 ((match_operand:VF_128 1 "vector_operand"
18730 "xBm,<round_constraint>")): Changed to ...
18731 ((match_operand:VF_128 1 "vector_operand"
18732 "xBm,<round_scalar_constraint>")): ... this.
18733 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18734 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18735 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18736 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18737 %<iptr>1<round_scalar_mask_op3>}): ... this.
18738 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18739 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18741 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18744 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18745 Cast vec_cmpeq result to correct type.
18746 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18747 Cast vec_cmpgt result to correct type.
18749 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18751 * final.c (final_scan_insn_1): Renamed from...
18752 (final_scan_insn): ... this. New wrapper, to recover
18753 seen from the outermost call in recursive ones.
18754 * config/sparc/sparc.c (output_return): Drop seen from call.
18755 (output_sibcall): Likewise.
18756 * config/visium/visium.c (output_branch): Likewise.
18758 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18760 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18763 2018-02-10 Alan Modra <amodra@gmail.com>
18766 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18767 Specify LR as an input.
18769 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18772 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18773 remove_member_access_dummy_vars): New functions.
18774 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18775 lower_omp_1, execute_lower_omp): Use them.
18777 PR rtl-optimization/84308
18778 * shrink-wrap.c (spread_components): Release todo vector.
18780 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18782 PR rtl-optimization/57193
18783 * ira-color.c (struct allocno_color_data): Add member
18784 conflict_allocno_hard_prefs.
18785 (update_conflict_allocno_hard_prefs): New.
18786 (bucket_allocno_compare_func): Add a preference based on
18787 conflict_allocno_hard_prefs.
18788 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18789 (color_allocnos): Remove a dead code. Initiate
18790 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18792 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18795 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18796 constraint from =wa to wa. Avoid a subreg on the output operand,
18797 instead use a pseudo and subreg it in a move.
18798 (p9_xxbrd_<mode>): Changed to ...
18799 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18800 (p9_xxbrd_v2df): New expander.
18801 (p9_xxbrw_<mode>): Changed to ...
18802 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18803 (p9_xxbrw_v4sf): New expander.
18805 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18807 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18809 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18812 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18813 multiply in 32-bit mode.
18814 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18815 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18818 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18820 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18821 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18822 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18823 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18825 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18828 * dwarf2out.c (is_trivial_indirect_ref): New function.
18829 (dwarf2out_late_global_decl): Do not generate a location
18830 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18831 and that are not defined in the current unit.
18833 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18835 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18836 instead of a libcall for UNORDERED.
18838 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18841 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18842 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18844 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18847 * config/s390/s390.c (s390_set_current_function): Invoke
18848 s390_indirect_branch_settings also if fndecl didn't change.
18850 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18852 * config/rs6000/rs6000.md (blockage): Set length to zero.
18854 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18856 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18858 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18861 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18862 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18866 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18867 PARALLEL incoming that failed vt_get_decl_and_offset check.
18869 PR middle-end/84237
18870 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18871 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18873 (get_variable_section): For decls in named .bss* sections pass true as
18874 second argument to bss_initializer_p.
18876 2018-02-09 Marek Polacek <polacek@redhat.com>
18877 Jakub Jelinek <jakub@redhat.com>
18880 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18881 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18882 Sync some changes from cxx_fold_indirect_ref.
18884 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18886 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18888 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18889 (BLOCK_INLINE_ENTRY_LABEL): New.
18890 (dwarf2out_var_location): Disregard inline entry markers.
18891 (inline_entry_data): New struct.
18892 (inline_entry_data_hasher): New hashtable type.
18893 (inline_entry_data_hasher::hash): New.
18894 (inline_entry_data_hasher::equal): New.
18895 (inline_entry_data_table): New variable.
18896 (add_high_low_attributes): Add DW_AT_entry_pc and
18897 DW_AT_GNU_entry_view attributes if a pending entry is found
18898 in inline_entry_data_table. Add old entry_pc attribute only
18899 if debug nonbinding markers are disabled.
18900 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18901 markers are enabled.
18902 (block_within_block_p, dwarf2out_inline_entry): New.
18903 (dwarf2out_finish): Check that no entries remained in
18904 inline_entry_data_table.
18905 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18906 (final_scan_insn, notice_source_line): Likewise.
18907 (rest_of_clean_state): Skip inline entry markers.
18908 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18910 * gimple.c (gimple_build_debug_inline_entry): New.
18911 * gimple.h (enum gimple_debug_subcode): Add
18912 GIMPLE_DEBUG_INLINE_ENTRY.
18913 (gimple_build_debug_inline_entry): Declare.
18914 (gimple_debug_inline_entry_p): New.
18915 (gimple_debug_nonbind_marker_p): Adjust.
18916 * insn-notes.def (INLINE_ENTRY): New.
18917 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18918 inline entry marker notes.
18919 (print_insn): Likewise.
18920 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18921 (INSN_DEBUG_MARKER_KIND): Likewise.
18922 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18923 * tree-inline.c (expand_call_inline): Build and insert
18924 debug_inline_entry stmt.
18925 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18926 inline entry blocks early, if nonbind markers are enabled.
18927 (dump_scope_block): Dump fragment info.
18928 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18929 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18930 (gimple_build_debug_inline_entry): New.
18931 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18932 Enable/disable inline entry points too.
18933 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18934 (DEBUG_INSN): Describe inline entry markers.
18936 * common.opt (gvariable-location-views): New.
18937 (gvariable-location-views=incompat5): New.
18938 * config.in: Rebuilt.
18939 * configure: Rebuilt.
18940 * configure.ac: Test assembler for view support.
18941 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18942 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18943 * dwarf2out.c (var_loc_view): New typedef.
18944 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18945 (dwarf2out_locviews_in_attribute): New.
18946 (dwarf2out_locviews_in_loclist): New.
18947 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18948 (enum dw_line_info_opcode): Add LI_adv_address.
18949 (struct dw_line_info_table): Add view.
18950 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18951 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18952 (zero_view_p): New variable.
18953 (ZERO_VIEW_P): New macro.
18954 (output_asm_line_debug_info): New.
18955 (struct var_loc_node): Add view.
18956 (add_AT_view_list, AT_loc_list): New.
18957 (add_var_loc_to_decl): Add view param. Test it against last.
18958 (new_loc_list): Add view params. Record them.
18959 (AT_loc_list_ptr): Handle loc and view lists.
18960 (view_list_to_loc_list_val_node): New.
18961 (print_dw_val): Handle dw_val_class_view_list.
18962 (size_of_die): Likewise.
18963 (value_format): Likewise.
18964 (loc_list_has_views): New.
18965 (gen_llsym): Set vl_symbol too.
18966 (maybe_gen_llsym, skip_loc_list_entry): New.
18967 (dwarf2out_maybe_output_loclist_view_pair): New.
18968 (output_loc_list): Output view list or entries too.
18969 (output_view_list_offset): New.
18970 (output_die): Handle dw_val_class_view_list.
18971 (output_dwarf_version): New.
18972 (output_compilation_unit_header): Use it.
18973 (output_skeleton_debug_sections): Likewise.
18974 (output_rnglists, output_line_info): Likewise.
18975 (output_pubnames, output_aranges): Update version comments.
18976 (output_one_line_info_table): Output view numbers in asm comments.
18977 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18978 Call maybe_gen_llsym.
18979 (loc_list_from_tree_1): Adjust.
18980 (add_AT_location_description): Create view list attribute if
18981 needed, check it's absent otherwise.
18982 (convert_cfa_to_fb_loc_list): Adjust.
18983 (maybe_emit_file): Call output_asm_line_debug_info for test.
18984 (dwarf2out_var_location): Reset views as needed. Precompute
18985 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18986 attribute. Set view.
18987 (new_line_info_table): Reset next view.
18988 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18989 (dwarf2out_source_line): Likewise. Output view resets and labels to
18990 the assembler, or select appropriate line info opcodes.
18991 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18992 (optimize_string_length): Catch it. Adjust.
18993 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18994 dw_val_class_view_list, and remove it if no longer needed.
18995 (hash_loc_list): Hash view numbers.
18996 (loc_list_hasher::equal): Compare them.
18997 (optimize_location_lists): Check whether a view list symbol is
18998 needed, and whether the locview attribute is present, and
18999 whether they match. Remove the locview attribute if no longer
19001 (index_location_lists): Call skip_loc_list_entry for test.
19002 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19003 Use output_dwarf_version.
19004 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19005 (struct dw_val_node): Add val_view_list.
19006 * final.c (SEEN_NEXT_VIEW): New.
19007 (set_next_view_needed): New.
19008 (clear_next_view_needed): New.
19009 (maybe_output_next_view): New.
19010 (final_start_function): Rename to...
19011 (final_start_function_1): ... this. Take pointer to FIRST,
19012 add SEEN parameter. Emit param bindings in the initial view.
19013 (final_start_function): Reintroduce SEEN-less interface.
19014 (final): Rename to...
19015 (final_1): ... this. Take SEEN parameter. Output final pending
19016 next view at the end.
19017 (final): Reintroduce seen-less interface.
19018 (final_scan_insn): Output pending next view before switching
19019 sections or ending a block. Mark the next view as needed when
19020 outputting variable locations. Notify debug backend of section
19021 changes, and of location view changes.
19022 (rest_of_handle_final): Adjust.
19023 * toplev.c (process_options): Autodetect value for debug variable
19024 location views option. Warn on incompat5 without -gdwarf-5.
19025 * doc/invoke.texi (gvariable-location-views): New.
19026 (gvariable-location-views=incompat5): New.
19027 (gno-variable-location-views): New.
19029 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19031 PR tree-optimization/84136
19032 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19033 that the result of find_edge is non-NULL.
19035 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19038 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19039 storing integer register in SImode. Fix cost of 256 and 512
19040 byte aligned SSE register store.
19042 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19044 * config/i386/i386.c (ix86_multiplication_cost): Fix
19045 multiplication cost for TARGET_AVX512DQ.
19047 2018-02-08 Marek Polacek <polacek@redhat.com>
19049 PR tree-optimization/84238
19050 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19053 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19055 PR tree-optimization/84265
19056 * tree-vect-stmts.c (vectorizable_store): Don't treat
19057 VMAT_CONTIGUOUS accesses as grouped.
19058 (vectorizable_load): Likewise.
19060 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19062 PR tree-optimization/81635
19063 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19064 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19065 (test_round_for_mask): New functions.
19066 (wide_int_cc_tests): Call test_round_for_mask.
19067 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19068 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19069 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19070 range returned by get_range_info.
19072 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19075 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19076 * symtab.c: Include builtins.h
19077 (symtab_node::output_to_lto_symbol_table_p): Move here
19078 from lto-streamer-out.c:output_symbol_p.
19079 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19080 (output_symbol_p): Move all logic to symtab.c
19081 (produce_symtab): Update.
19083 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19085 * config/s390/s390-opts.h (enum indirect_branch): Define.
19086 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19087 (s390_indirect_branch_via_thunk)
19088 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19089 (enum s390_indirect_branch_type): Define.
19090 * config/s390/s390.c (struct s390_frame_layout, struct
19091 machine_function): Remove.
19092 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19093 (indirect_branch_table_label_no, indirect_branch_table_name):
19095 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19096 (enum s390_indirect_branch_option): Define.
19097 (s390_return_addr_from_memory): New function.
19098 (s390_handle_string_attribute): New function.
19099 (s390_attribute_table): Add new attribute handler.
19100 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19101 (s390_indirect_branch_via_thunk): New function.
19102 (s390_indirect_branch_via_inline_thunk): New function.
19103 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19104 sibling call optimization for non z10 compiles.
19105 (s390_emit_call): Force indirect branch target to be a single
19106 register. Add r1 clobber for non-z10 compiles.
19107 (s390_emit_epilogue): Emit return jump via return_use expander.
19108 (s390_reorg): Handle JUMP_INSNs as execute targets.
19109 (s390_option_override_internal): Perform validity checks for the
19110 new command line options.
19111 (s390_indirect_branch_attrvalue): New function.
19112 (s390_indirect_branch_settings): New function.
19113 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19114 (s390_output_indirect_thunk_function): New function.
19115 (s390_code_end): Implement target hook.
19116 (s390_case_values_threshold): Implement target hook.
19117 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19119 * config/s390/s390.h (struct s390_frame_layout)
19120 (struct machine_function): Move here from s390.c.
19121 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19122 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19123 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19124 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19125 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19126 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19127 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19128 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19129 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19130 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19131 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19132 (mnemonic attribute): Add values which aren't recognized
19134 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19135 pattern for branch conversion. Fix mnemonic attribute.
19136 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19137 indirect branch via thunk if requested.
19138 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19139 ("*indirect_jump"): Disable for branch conversion using out of
19141 ("indirect_jump_via_thunk<mode>_z10")
19142 ("indirect_jump_via_thunk<mode>")
19143 ("indirect_jump_via_inlinethunk<mode>_z10")
19144 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19145 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19146 ("casesi_jump_via_inlinethunk<mode>_z10")
19147 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19148 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19149 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19150 ("*indirect2_jump"): Disable for branch conversion.
19151 ("casesi_jump"): Turn into expander and expand patterns for branch
19153 ("return_use"): New expander.
19154 ("*return"): Emit return via thunk and rename it to ...
19155 ("*return<mode>"): ... this one.
19156 * config/s390/s390.opt: Add new options and and enum for the
19159 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19161 * lra-constraints.c (match_reload): Unconditionally use
19162 gen_lowpart_SUBREG, rather than selecting between that
19163 and equivalent gen_rtx_SUBREG code.
19165 2018-02-08 Richard Biener <rguenther@suse.de>
19167 PR tree-optimization/84233
19168 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19169 changed flag instead of boguously re-using phi_inserted.
19171 2018-02-08 Martin Jambor <mjambor@suse.cz>
19173 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19174 static local variables.
19176 2018-02-08 Richard Biener <rguenther@suse.de>
19178 PR tree-optimization/84278
19179 * tree-vect-stmts.c (vectorizable_store): When looking for
19180 smaller vector types to perform grouped strided loads/stores
19181 make sure the mode is supported by the target.
19182 (vectorizable_load): Likewise.
19184 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19186 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19187 Increase LDP/STP opportunities by adding adjacent callee-saves.
19189 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19191 PR rtl-optimization/84068
19192 PR rtl-optimization/83459
19193 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19195 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19197 PR tree-optimization/84224
19198 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19199 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19200 non-zero arguments.
19202 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19205 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19206 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19207 count, remove one USE.
19209 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19211 * doc/install.texi (Configuration): Document the
19212 --with-long-double-format={ibm,ieee} PowerPC configuration
19216 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19217 Convert from define_expand to be define_insn_and_split. Rework
19218 float/double/_Float128 conversions to QI/HI/SImode to work with
19219 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19220 conversions to QI/HImode types did a store and then a load to
19221 truncate the value. For conversions to VSX registers, don't split
19222 the insn, instead emit the code directly. Use the code iterator
19223 any_fix to combine signed and unsigned conversions.
19224 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19225 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19226 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19227 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19228 (fix_<mode>di2_hw): Likewise.
19229 (fixuns_<mode>di2_hw): Likewise.
19230 (fix_<mode>si2_hw): Likewise.
19231 (fixuns_<mode>si2_hw): Likewise.
19232 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19233 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19234 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19235 fix<uns>_trunc<SFDF:mode>si2_p8.
19236 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19237 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19238 (fix<uns>_<mode>_mem): Likewise.
19239 (fctiw<u>z_<mode>_mem): Likewise.
19240 (fix<uns>_<mode>_mem): Likewise.
19241 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19242 the register allocator from doing a direct move to the GPRs to do
19243 a store, and instead use the ISA 3.0 store byte/half-word from
19244 vector register instruction. For IEEE 128-bit floating point,
19245 also optimize stores of 32-bit ints.
19246 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19248 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19250 * genextract.c (push_pathstr_operand): New function to support
19252 (walk_rtx): Call push_pathstr_operand.
19253 (print_path): Support [a-zA-Z].
19255 2018-02-07 Richard Biener <rguenther@suse.de>
19257 PR tree-optimization/84037
19258 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19259 (cse_and_gimplify_to_preheader): Declare.
19260 (vect_get_place_in_interleaving_chain): Likewise.
19261 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19263 (_loop_vec_info::~_loop_vec_info): Delete it.
19264 (cse_and_gimplify_to_preheader): New function.
19265 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19266 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19267 (vectorizable_load): Likewise. For grouped stores always base
19268 the IV on the first element.
19269 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19270 condition before gimplifying.
19272 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19274 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19275 *DIV_EXPR and *MOD_EXPR.
19277 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19280 * config/i386/i386.c (ix86_option_override_internal): Mask out
19281 the CF_SET bit when checking -fcf-protection.
19283 2018-02-07 Tom de Vries <tom@codesourcery.com>
19286 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19289 2018-02-07 Richard Biener <rguenther@suse.de>
19291 PR tree-optimization/84204
19292 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19295 PR tree-optimization/84205
19296 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19297 special-case isl_ast_op_zdiv_r.
19299 PR tree-optimization/84223
19300 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19301 Only add conditions from within the region.
19302 (gather_bbs::after_dom_children): Adjust.
19304 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19307 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19308 * config/avr/avr.md: Only post-reload split REG-REG moves if
19309 either register is GENERAL_REG_P.
19311 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19313 PR tree-optimization/84235
19314 * tree-ssa-scopedtables.c
19315 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19316 if the subtraction is performed in floating point type where NaNs are
19317 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19318 build 1. Formatting fix.
19320 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19323 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19324 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19325 and skip it regardless of bb boundaries. Use CALL_P macro,
19326 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19327 unnecessarily, formatting fix.
19329 2018-02-06 Michael Collison <michael.collison@arm.com>
19331 * config/arm/thumb2.md:
19332 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19333 (*thumb_mov_notscc): Ditto.
19335 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19338 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19339 unsigned_fix, not "s".
19341 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19343 * configure.ac (gcc_fn_eh_frame_ro): New function.
19344 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19345 correct .eh_frame permissions.
19346 * configure: Regenerate.
19348 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19350 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19351 irrelevant options.
19353 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19355 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19356 Display warning message for -mno-speculate-indirect-jumps.
19358 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19360 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19362 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19364 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19366 PR tree-optimization/84225
19367 * tree-eh.c (find_trapping_overflow): Only call
19368 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19370 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19373 * config/i386/i386.c: Reimplement the check of possible options
19374 -mibt/-mshstk conbination. Change error messages.
19375 * doc/invoke.texi: Fix a typo: remove extra '='.
19377 2018-02-06 Marek Polacek <polacek@redhat.com>
19379 PR tree-optimization/84228
19380 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19382 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19385 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19386 emitted arch directives.
19387 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19388 __ARM_FEATURE_COPROC before changing architectures.
19390 2018-02-06 Richard Biener <rguenther@suse.de>
19392 * config/i386/i386.c (print_reg): Fix typo.
19393 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19395 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19397 * configure: Regenerate.
19399 2018-02-05 Martin Sebor <msebor@redhat.com>
19401 PR tree-optimization/83369
19402 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19405 2018-02-05 Martin Liska <mliska@suse.cz>
19407 * doc/invoke.texi: Cherry-pick upstream r323995.
19409 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19411 * ira.c (ira_init_register_move_cost): Adjust comment.
19413 2018-02-05 Martin Liska <mliska@suse.cz>
19415 PR gcov-profile/84137
19416 * doc/gcov.texi: Fix typo in documentation.
19418 2018-02-05 Martin Liska <mliska@suse.cz>
19420 PR gcov-profile/83879
19421 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19422 using dlopen functionality.
19424 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19426 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19427 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19428 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19429 _mm_maskz_range_round_ss): New intrinsics.
19430 (__builtin_ia32_rangesd128_round)
19431 (__builtin_ia32_rangess128_round): Remove.
19432 (__builtin_ia32_rangesd128_mask_round,
19433 __builtin_ia32_rangess128_mask_round): New builtins.
19434 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19435 __builtin_ia32_rangess128_round): Remove.
19436 (__builtin_ia32_rangesd128_mask_round,
19437 __builtin_ia32_rangess128_mask_round): New builtins.
19438 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19439 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19440 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19441 "<round_saeonly_constraint>")): Changed to ...
19442 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19443 "<round_saeonly_scalar_constraint>")): ... this.
19444 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19445 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19446 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19447 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19448 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19450 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19452 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19454 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19455 Remove all values except native, 8540 and 8548.
19457 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19459 * config/i386/i386.c (ix86_output_function_return): Pass
19460 INVALID_REGNUM, instead of -1, as invalid register number to
19461 indirect_thunk_name and output_indirect_thunk.
19463 2018-02-02 Julia Koval <julia.koval@intel.com>
19465 * config.gcc: Add -march=icelake.
19466 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19467 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19468 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19469 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19470 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19471 (processor_target_table): Add icelake.
19472 (ix86_option_override_internal): Handle new PTAs.
19473 (get_builtin_code_for_version): Handle icelake.
19474 (M_INTEL_COREI7_ICELAKE): New.
19475 (fold_builtin_cpu): Handle icelake.
19476 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19477 * doc/invoke.texi: Add -march=icelake.
19479 2018-02-02 Julia Koval <julia.koval@intel.com>
19481 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19482 to wide_int_bitmask.
19483 * wide-int-bitmask.h: New.
19485 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19488 * config/i386/i386.md: Replace Pmode with word_mode in
19489 builtin_setjmp_setup and builtin_longjmp to support x32.
19491 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19495 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19497 (rs6000_supported_cpu_names): New static variable.
19498 (linux_cpu_translation_table): Likewise.
19499 (elf_platform) <cpu>: Define new static variable and use it.
19500 Translate kernel AT_PLATFORM name to canonical name if needed.
19501 Error if platform name is unknown.
19503 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19506 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19508 2018-02-01 Jeff Law <law@redhat.com>
19511 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19512 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19513 the scratch if RELEASE_VIA_POP is false.
19514 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19515 If we have to save a temporary register, decrement SIZE appropriately.
19516 Pass new arguments to release_scratch_register_on_entry.
19517 (ix86_adjust_stack_and_probe): Likewise.
19518 (ix86_emit_probe_stack_range): Pass new arguments to
19519 release_scratch_register_on_entry.
19521 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19523 PR rtl-optimization/84157
19524 * combine.c (change_zero_ext): Use REG_P predicate in
19525 front of HARD_REGISTER_P predicate.
19527 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19529 * config/avr/avr.c (avr_option_override): Move disabling of
19530 -fdelete-null-pointer-checks to...
19531 * common/config/avr/avr-common.c (avr_option_optimization_table):
19534 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19536 PR tree-optimization/81635
19537 * tree-data-ref.c (split_constant_offset_1): For types that
19538 wrap on overflow, try to use range info to prove that wrapping
19541 2018-02-01 Renlin Li <renlin.li@arm.com>
19544 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19545 TAILCALL_ADDR_REGS.
19546 (aarch64_register_move_cost): Likewise.
19547 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19548 TAILCALL_ADDR_REGS.
19549 (REG_CLASS_NAMES): Likewise.
19550 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19551 TAILCALL_ADDR_REGS. Remove IP registers.
19552 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19554 2018-02-01 Richard Biener <rguenther@suse.de>
19556 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19557 for specifying RPO order and allow NULL for that.
19558 * domwalk.c (dom_walker::dom_walker): Likewise.
19559 (dom_walker::walk): Handle NULL RPO order.
19560 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19562 (rewrite_update_dom_walker): Likewise.
19563 (mark_def_dom_walker): Likewise.
19565 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19567 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19568 (aarch64_maybe_expand_sve_subreg_move): Declare.
19569 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19570 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19572 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19573 that are semantically a reverse operation.
19574 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19575 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19576 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19578 (aarch64_can_change_mode_class): For big-endian, forbid changes
19579 between two SVE modes if they have different element sizes.
19581 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19583 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19584 the TImode handling for big-endian targets.
19586 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19588 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19589 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19591 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19592 Remove BSWAP handing for big-endian targets and use the form of
19593 LD1RQ appropariate for the mode.
19595 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19597 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19598 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19599 duplicated element.
19601 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19604 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19605 check for operands that need to go through aarch64_sve_reload_be.
19607 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19609 PR tree-optimization/81661
19610 PR tree-optimization/84117
19611 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19612 * tree-eh.c: Include gimplify.h.
19613 (find_trapping_overflow, replace_trapping_overflow,
19614 rewrite_to_non_trapping_overflow): New functions.
19615 * tree-vect-loop.c: Include tree-eh.h.
19616 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19617 * tree-data-ref.c: Include tree-eh.h.
19618 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19620 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19622 PR rtl-optimization/84123
19623 * combine.c (change_zero_ext): Check if hard register satisfies
19624 can_change_dest_mode before calling gen_lowpart_SUBREG.
19626 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19629 * ira.c (ira_init_register_move_cost): Remove assert.
19631 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19633 PR rtl-optimization/84071
19634 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19635 * doc/tm.texi: Regenerate.
19637 2018-01-31 Richard Biener <rguenther@suse.de>
19639 PR tree-optimization/84132
19640 * tree-data-ref.c (analyze_miv_subscript): Properly
19641 check whether evolution_function_is_affine_multivariate_p
19642 before calling gcd_of_steps_may_divide_p.
19644 2018-01-31 Julia Koval <julia.koval@intel.com>
19647 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19648 * config/i386/i386.md (rdpid_rex64) New.
19649 (rdpid): Make 32bit only.
19651 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19654 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19655 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19657 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19660 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19662 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19664 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19666 PR rtl-optimization/84071
19667 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19668 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19670 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19672 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19673 (arc_attribute_table): Add 'aux' attribute.
19674 (arc_in_small_data_p): Consider aux like variables.
19675 (arc_is_aux_reg_p): New function.
19676 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19677 (arc_get_aux_arg): New function.
19678 (prepare_move_operands): Handle aux-register access.
19679 (arc_handle_aux_attribute): New function.
19680 * doc/extend.texi (ARC Variable attributes): Add subsection.
19682 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19684 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19685 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19686 (arc_attribute_table): Add 'uncached' attribute.
19687 (arc_print_operand): Print '.di' flag for uncached memory
19689 (arc_in_small_data_p): Do not consider for small data the uncached
19691 (arc_is_uncached_mem_p): New function.
19692 * config/arc/predicates.md (compact_store_memory_operand): Check
19693 for uncached memory accesses.
19694 (nonvol_nonimm_operand): Likewise.
19695 * doc/extend.texi (ARC Type Attribute): New subsection.
19697 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19700 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19701 falign-loops=): Add Optimization flag.
19703 2018-01-30 Jeff Law <law@redhat.com>
19706 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19707 INT_REGISTERS_SAVED. Check it prior to calling
19708 get_scratch_register_on_entry.
19709 (ix86_adjust_stack_and_probe): Similarly.
19710 (ix86_emit_probe_stack_range): Similarly.
19711 (ix86_expand_prologue): Corresponding changes.
19713 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19716 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19717 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19719 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19722 * lra-constraints.c (curr_insn_transform): Process AND in the
19725 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19727 PR rtl-optimization/83986
19728 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19729 dependence against last_pending_memory_flush in addition to
19730 pending_jump_insns.
19732 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19734 PR tree-optimization/81611
19735 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19738 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19741 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19744 2018-01-30 Richard Biener <rguenther@suse.de>
19745 Jakub Jelinek <jakub@redhat.com>
19747 PR tree-optimization/84111
19748 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19749 inner loops added during recursion, as they don't have up-to-date
19752 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19755 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19756 (can_inline_edge_by_limits_p): ... here.
19757 (can_early_inline_edge_p, check_callers,
19758 update_caller_keys, update_callee_keys, recursive_inlining,
19759 add_new_edges_to_heap, speculation_useful_p,
19760 inline_small_functions,
19761 inline_small_functions, flatten_function,
19762 inline_to_all_callers_1): Update.
19764 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19766 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19769 2018-01-30 Richard Biener <rguenther@suse.de>
19771 PR tree-optimization/83008
19772 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19773 invariant and constant vector uses in stmts when they need
19774 more than one stmt.
19776 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19779 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19780 * configure: Regenerate.
19782 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19784 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19786 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19787 Use gen_rtx_REG rather than gen_lowpart.
19789 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19791 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19792 rather than 0 when creating partial subregs.
19794 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19796 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19799 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19802 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19803 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19804 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19805 flags. This restores the settings used before the 2017-07-24.
19806 Turning off pre increment/decrement/modify allows IVOPTS to
19807 optimize DF/SF loops where the index is an int.
19809 2018-01-29 Richard Biener <rguenther@suse.de>
19810 Kelvin Nilsen <kelvin@gcc.gnu.org>
19813 * tree-vect-stmts.c (vectorizable_call): Don't call
19814 targetm.vectorize_builtin_md_vectorized_function if callee is
19817 2018-01-22 Carl Love <cel@us.ibm.com>
19819 * doc/extend.tex: Fix typo in second arg in
19820 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19822 2018-01-29 Richard Biener <rguenther@suse.de>
19824 PR tree-optimization/84086
19825 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19826 (flush_ssaname_freelist): When SSA names were released reset
19827 the SCEV hash table.
19829 2018-01-29 Richard Biener <rguenther@suse.de>
19831 PR tree-optimization/84057
19832 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19833 removed paths when removing edges.
19835 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19837 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19838 -mfunction-return=@var{choice}.
19840 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19842 PR diagnostic/84034
19843 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19844 Handle CR like TAB.
19845 (layout::print_source_line): Likewise.
19846 (test_get_line_width_without_trailing_whitespace): Add test cases.
19848 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19850 PR middle-end/84040
19851 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19854 2018-01-26 Jim Wilson <jimw@sifive.com>
19856 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19858 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19861 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19863 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19864 and CMP + SUB-immediate -> SUBS.
19866 2018-01-26 Martin Sebor <msebor@redhat.com>
19868 PR tree-optimization/83896
19869 * tree-ssa-strlen.c (get_string_len): Rename...
19870 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19871 Avoid assuming length is constant.
19872 (handle_char_store): Use HOST_WIDE_INT for string length.
19874 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19877 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19878 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19880 2018-01-26 Richard Biener <rguenther@suse.de>
19882 PR rtl-optimization/84003
19883 * dse.c (record_store): Only record redundant stores when
19884 the earlier store aliases at least all accesses the later one does.
19886 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19888 PR rtl-optimization/83985
19889 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19890 REG_CFA_RESTORE insns.
19891 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19892 REG_CFA_RESTORE insns here.
19895 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19896 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19898 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19900 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19901 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19902 (arc_init): Likewise.
19903 (arc_override_options): Likewise.
19904 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19906 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19908 * config/arc/arc.h (TARGET_DBNZ): Define.
19909 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19910 properly set the tune attribute.
19911 (dbnz): Use TARGET_DBNZ guard.
19912 * config/arc/arc.opt (mtune): Add core3 option.
19914 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19916 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19917 recognize new pic like addresses.
19918 (arc_delegitimize_address): Clean up.
19920 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19922 * config/arc/arc-arches.def: Option mrf16 valid for all
19924 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19925 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19926 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19927 * config/arc/arc-tables.opt: Regenerate.
19928 * config/arc/arc.c (arc_conditional_register_usage): Handle
19929 reduced register file case.
19930 (arc_file_start): Set must have build attributes.
19931 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19932 mrf16 option value.
19933 * config/arc/arc.opt (mrf16): Add new option.
19934 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19935 * config/arc/genmultilib.awk: Handle new mrf16 option.
19936 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19937 * config/arc/t-multilib: Regenerate.
19938 * doc/invoke.texi (ARC Options): Document mrf16 option.
19940 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19942 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19943 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19944 (arc_attribute_table): Add 'secure_call' attribute.
19945 (arc_print_operand): Print secure call operand.
19946 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19948 (arc_is_secure_call_p): New function. * config/arc/arc.md
19949 (call_i): Add support for sjli instruction.
19950 (call_value_i): Likewise.
19951 * config/arc/constraints.md (Csc): New constraint.
19953 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19954 John Eric Martin <John.Martin@emmicro-us.com>
19956 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19957 * config/arc/arc.c (_arc_jli_section): New struct.
19958 (arc_jli_section): New type.
19959 (rc_jli_sections): New static variable.
19960 (arc_handle_jli_attribute): New function.
19961 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19962 (arc_file_end): New function.
19963 (TARGET_ASM_FILE_END): Define.
19964 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19965 (arc_add_jli_section): New function.
19966 (jli_call_scan): Likewise.
19967 (arc_reorg): Call jli_call_scan.
19968 (arc_output_addsi): Remove 'S' from printing asm operand.
19969 (arc_is_jli_call_p): New function.
19970 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19972 (movhi_insn): Likewise.
19973 (movsi_insn): Likewise.
19974 (movsi_set_cc_insn): Likewise.
19975 (loadqi_update): Likewise.
19976 (load_zeroextendqisi_update): Likewise.
19977 (load_signextendqisi_update): Likewise.
19978 (loadhi_update): Likewise.
19979 (load_zeroextendhisi_update): Likewise.
19980 (load_signextendhisi_update): Likewise.
19981 (loadsi_update): Likewise.
19982 (loadsf_update): Likewise.
19983 (movsicc_insn): Likewise.
19984 (bset_insn): Likewise.
19985 (bxor_insn): Likewise.
19986 (bclr_insn): Likewise.
19987 (bmsk_insn): Likewise.
19988 (bicsi3_insn): Likewise.
19989 (cmpsi_cc_c_insn): Likewise.
19990 (movsi_ne): Likewise.
19991 (movsi_cond_exec): Likewise.
19992 (clrsbsi2): Likewise.
19993 (norm_f): Likewise.
20003 (call_i): Remove 'S' asm letter, add jli instruction.
20004 (call_value_i): Likewise.
20005 * config/arc/arc.op (mjli-always): New option.
20006 * config/arc/constraints.md (Cji): New constraint.
20007 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20009 (subsf3_fpx): Likewise.
20010 (mulsf3_fpx): Likewise.
20011 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20013 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20014 function attrbutes.
20015 * doc/invoke.texi (ARC): Document mjli-always option.
20017 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20019 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20020 avoid addition with 0 and use incw and decw where possible.
20022 2018-01-26 Richard Biener <rguenther@suse.de>
20024 PR tree-optimization/81082
20025 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20026 association if it requires casting to unsigned.
20027 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20028 from fold_plusminus_mult_expr to catch important cases late when
20029 range info is available.
20031 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20033 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20034 * configure.ac (hidden_linkonce): New test.
20035 * configure: Regenerate.
20036 * config.in: Regenerate.
20038 2018-01-26 Julia Koval <julia.koval@intel.com>
20040 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20041 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20042 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20043 _mm_mask_bitshuffle_epi64_mask): Fix type.
20044 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20045 USI_FTYPE_V4DI_V4DI_USI): Remove.
20046 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20047 __builtin_ia32_vpshufbitqmb256_mask,
20048 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20049 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20050 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20052 2018-01-26 Alan Modra <amodra@gmail.com>
20055 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20056 UNSPEC_VBPERMQ. Sort other unspecs.
20058 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20060 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20062 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20064 PR middle-end/83055
20065 * predict.c (drop_profile): Do not push/pop cfun; update also
20067 (handle_missing_profiles): Fix logic looking for zero profiles.
20069 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20071 PR middle-end/83977
20072 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20073 on functions with #pragma omp declare simd or functions with simd
20075 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20076 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20077 Remove trailing \n from warning_at calls.
20079 2018-01-25 Tom de Vries <tom@codesourcery.com>
20082 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20083 for neutered workers.
20085 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20088 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20089 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20091 2018-01-24 Jeff Law <law@redhat.com>
20094 * i386.c (get_probe_interval): Move to earlier point.
20095 (ix86_compute_frame_layout): If -fstack-clash-protection and
20096 the frame is larger than the probe interval, then use pushes
20097 to save registers rather than reg->mem moves.
20098 (ix86_expand_prologue): Remove conditional for int_registers_saved
20101 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20104 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20105 min/max for never referenced object.
20107 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20109 PR middle-end/83977
20110 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20112 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20113 attributes from DECL_ATTRIBUTES (decl) without affecting
20114 DECL_ATTRIBUTES (current_function_decl).
20115 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20116 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20118 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20120 PR tree-optimization/83979
20121 * fold-const.c (fold_comparison): Use constant_boolean_node
20122 instead of boolean_{true,false}_node.
20124 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20126 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20129 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20131 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20132 Simplify the clause that sets the length attribute.
20133 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20134 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20135 clause that sets the length attribute.
20136 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20138 2018-01-24 Tom de Vries <tom@codesourcery.com>
20141 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20142 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20143 Add strict parameter.
20144 (prevent_branch_around_nothing): Insert dummy insn between branch to
20145 label and label with no ptx insn inbetween.
20146 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20148 2018-01-24 Tom de Vries <tom@codesourcery.com>
20151 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20152 for neutered threads in warp.
20153 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20155 2018-01-24 Richard Biener <rguenther@suse.de>
20157 PR tree-optimization/83176
20158 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20161 2018-01-24 Richard Biener <rguenther@suse.de>
20163 PR tree-optimization/82819
20164 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20165 code generating pluses that are no-ops in the target precision.
20167 2018-01-24 Richard Biener <rguenther@suse.de>
20169 PR middle-end/84000
20170 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20172 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20174 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20175 to merge probabilities.
20176 * predict.c (probably_never_executed): Also mark as cold functions
20177 with global 0 profile and guessed local profile.
20178 * profile-count.c (profile_probability::combine_with_count): New
20180 * profile-count.h (profile_probability::operator*,
20181 profile_probability::operator*=, profile_probability::operator/,
20182 profile_probability::operator/=): Reduce precision to adjusted
20183 and set value to guessed on contradictory divisions.
20184 (profile_probability::combine_with_freq): Remove.
20185 (profile_probability::combine_wiht_count): Declare.
20186 (profile_count::force_nonzero):: Set to adjusted.
20187 (profile_count::probability_in):: Set quality to adjusted.
20188 * tree-ssa-tail-merge.c (replace_block_by): Use
20189 combine_with_count.
20191 2018-01-23 Andrew Waterman <andrew@sifive.com>
20192 Jim Wilson <jimw@sifive.com>
20194 * config/riscv/riscv.c (riscv_stack_boundary): New.
20195 (riscv_option_override): Set riscv_stack_boundary. Handle
20196 riscv_preferred_stack_boundary_arg.
20197 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20198 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20199 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20200 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20201 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20202 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20204 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20207 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20208 of struct ix86_frame.
20209 (ix86_expand_epilogue): Likewise. Add a local variable for
20210 the reg_save_offset field in struct ix86_frame.
20212 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20214 PR tree-optimization/82604
20215 * tree-loop-distribution.c (enum partition_kind): New enum item
20216 PKIND_PARTIAL_MEMSET.
20217 (partition_builtin_p): Support above new enum item.
20218 (generate_code_for_partition): Ditto.
20219 (compute_access_range): Differentiate cases that equality can be
20220 proven at all loops, the innermost loops or no loops.
20221 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20222 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20223 (finalize_partitions, distribute_loop): Don't fuse partition of
20224 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20225 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20226 parloop is enabled.
20228 2018-01-23 Martin Liska <mliska@suse.cz>
20230 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20231 order to ignore the predictor.
20232 (PRED_POLYMORPHIC_CALL): Likewise.
20233 (PRED_RECURSIVE_CALL): Likewise.
20235 2018-01-23 Martin Liska <mliska@suse.cz>
20237 * tree-profile.c (tree_profiling): Print function header to
20238 aware reader which function we are working on.
20239 * value-prof.c (gimple_find_values_to_profile): Do not print
20240 not interesting value histograms.
20242 2018-01-23 Martin Liska <mliska@suse.cz>
20244 * profile-count.h (enum profile_quality): Add
20245 profile_uninitialized as the first value. Do not number values
20246 as they are zero based.
20247 (profile_count::verify): Update sanity check.
20248 (profile_probability::verify): Likewise.
20250 2018-01-23 Nathan Sidwell <nathan@acm.org>
20252 * doc/invoke.texi (ffor-scope): Deprecate.
20254 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20256 PR tree-optimization/83510
20257 * domwalk.c (set_all_edges_as_executable): New function.
20258 (dom_walker::dom_walker): Convert bool param
20259 "skip_unreachable_blocks" to enum reachability. Move setup of
20260 edge flags to set_all_edges_as_executable and only do it when
20261 reachability is REACHABLE_BLOCKS.
20262 * domwalk.h (enum dom_walker::reachability): New enum.
20263 (dom_walker::dom_walker): Convert bool param
20264 "skip_unreachable_blocks" to enum reachability.
20265 (set_all_edges_as_executable): New decl.
20266 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20267 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20269 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20270 but converting true to REACHABLE_BLOCKS.
20271 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20273 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20274 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20275 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20277 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20278 if check_all_array_refs will be called.
20280 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20282 * tree.c (selftest::test_location_wrappers): Add more test
20285 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20287 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20288 (selftest::test_bit_in_range): Likewise.
20290 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20293 * doc/sourcebuild.texi (vect_float): Say that the selector
20294 only describes the situation when -funsafe-math-optimizations is on.
20295 (vect_float_strict): Document.
20297 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20299 PR tree-optimization/83965
20300 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20301 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20302 instead of checking only for a reduction.
20303 (vect_recog_widen_sum_pattern): Likewise.
20305 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20307 * predict.c (probably_never_executed): Only use precise profile info.
20308 (compute_function_frequency): Skip after inlining hack since we now
20309 have quality checking.
20311 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20313 * profile-count.h (profile_probability::very_unlikely,
20314 profile_probability::unlikely, profile_probability::even): Set
20315 precision to guessed.
20317 2018-01-23 Richard Biener <rguenther@suse.de>
20319 PR tree-optimization/83963
20320 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20321 Properly terminate dominator walk when crossing the exit edge not
20322 when visiting its source block.
20324 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20327 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20328 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20330 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20332 PR tree-optimization/83957
20333 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20334 semicolon after for body surrounded by braces.
20336 PR tree-optimization/83081
20337 * profile-count.h (profile_probability::split): New method.
20338 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20339 Use profile_probability::split.
20340 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20341 when splitting a single conditional jump into 2.
20343 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20345 PR tree-optimization/69452
20346 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20349 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20351 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20352 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20353 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20355 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20357 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20359 * config/rl78/rl78.md (movdi): New define_expand.
20360 * config/rl78/rl78.c (rl78_split_movdi): New function.
20362 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20365 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20367 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20368 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20369 128-bit to produce an UNSPEC move to get the double word with the
20370 signbit and then a shift directly to do signbit.
20371 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20372 implementation with a new version that just does either a direct
20373 move or a regular move. Move memory interface to separate insns.
20374 Move insns so they are next to the expander.
20375 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20376 with signbit move. Split big and little endian case.
20377 (signbit<mode>2_dm_mem_le): Likewise.
20378 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20379 (signbit<mode>2_dm2): Likewise.
20381 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20383 * config/rl78/rl78.md (anddi3): New define_expand.
20385 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20387 * config/rl78/rl78.md (umindi3): New define_expand.
20389 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20391 * config/rl78/rl78.md (smindi3): New define_expand.
20393 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20395 * config/rl78/rl78.md (smaxdi3): New define_expand.
20397 2018-01-22 Carl Love <cel@us.ibm.com>
20399 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20400 LVX_V1TI): Add macro expansion.
20401 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20402 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20403 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20404 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20405 Change check to determine if the instruction is a byte reversing
20406 entry. Fix typo in comment.
20407 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20408 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20409 Add def_builtin calls for new builtins.
20410 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20411 Add define_insn expansion.
20413 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20415 * config/rl78/rl78.md (umaxdi3): New define_expand.
20417 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20419 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20420 for non-QImode registers.
20422 2018-01-22 Richard Biener <rguenther@suse.de>
20424 PR tree-optimization/83963
20425 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20426 including the loop exit block.
20427 (scop_detection::merge_sese): Likewise.
20428 (scop_detection::add_scop): Do it here instead.
20430 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20432 * doc/sourcebuild.texi (arm_softfloat): Document.
20434 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20437 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20438 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20439 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20441 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20442 David Edelsohn <dje.gcc@gmail.com>
20445 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20446 Change "crset eq" to "crset 2".
20447 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20448 (*call_indirect_aix<mode>_nospec): Likewise.
20449 (*call_value_indirect_aix<mode>_nospec): Likewise.
20450 (*call_indirect_elfv2<mode>_nospec): Likewise.
20451 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20452 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20453 change assembly output from . to $.
20454 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20455 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20456 (*tablejump<mode>_internal1_nospec): Likewise.
20458 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20461 * config/sh/sh_optimize_sett_clrt.cc:
20462 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20464 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20466 PR tree-optimization/83940
20467 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20468 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20469 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20470 use it to pass back the definition type.
20471 (vect_check_store_rhs): Likewise rhs_dt_out.
20472 (vect_build_gather_load_calls): Add a mask_dt argument and use
20473 it instead of a call to vect_is_simple_use.
20474 (vectorizable_store): Update calls to vect_check_load_store_mask
20475 and vect_check_store_rhs. Use the dt returned by the latter instead
20476 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20477 instead of calls to vect_is_simple_use. Pass the scalar rather
20478 than the vector operand to vect_is_simple_use when handling
20479 second and subsequent copies of an rhs value.
20480 (vectorizable_load): Update calls to vect_check_load_store_mask
20481 and vect_build_gather_load_calls. Use the cached mask_dt and
20482 gs_info.offset_dt instead of calls to vect_is_simple_use.
20484 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20486 PR middle-end/83945
20487 * tree-emutls.c: Include gimplify.h.
20488 (lower_emutls_2): New function.
20489 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20490 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20491 it before further processing.
20494 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20495 UINTVAL (trueop1) instead of INTVAL (op1).
20497 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20501 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20502 INCOMING_FRAME_SP_OFFSET if not defined.
20503 (scan_trace): Add ENTRY argument. If true and
20504 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20505 emit a note to adjust the CFA offset.
20506 (create_cfi_notes): Adjust scan_trace callers.
20507 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20508 INCOMING_FRAME_SP_OFFSET in the CIE.
20509 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20510 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20512 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20513 * doc/tm.texi: Regenerated.
20515 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20517 PR rtl-optimization/83147
20518 * lra-constraints.c (remove_inheritance_pseudos): Use
20519 lra_substitute_pseudo_within_insn.
20521 2018-01-19 Tom de Vries <tom@codesourcery.com>
20522 Cesar Philippidis <cesar@codesourcery.com>
20525 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20527 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20530 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20531 spaces for function labels.
20533 2018-01-19 Martin Liska <mliska@suse.cz>
20535 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20536 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20537 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20538 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20539 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20540 (PRED_CONST_RETURN): Change from 69 to 65.
20541 (PRED_NULL_RETURN): Change from 91 to 71.
20542 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20543 (PRED_LOOP_GUARD): Change from 66 to 73.
20545 2018-01-19 Martin Liska <mliska@suse.cz>
20547 * predict.c (predict_insn_def): Add new assert.
20548 (struct branch_predictor): Change type to signed integer.
20549 (test_prediction_value_range): Amend test to cover
20550 PROB_UNINITIALIZED.
20551 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20552 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20553 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20554 (PRED_LOOP_IV_COMPARE): Likewise.
20555 * predict.h (PROB_UNINITIALIZED): Define new constant.
20557 2018-01-19 Martin Liska <mliska@suse.cz>
20559 * predict.c (dump_prediction): Add new format for
20560 analyze_brprob.py script which is enabled with -details
20562 * profile-count.h (precise_p): New function.
20564 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20566 PR tree-optimization/83922
20567 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20568 there are no statements that need masking.
20569 (vect_active_double_reduction_p): New function.
20570 (vect_analyze_loop_operations): Use it when handling phis that
20571 are not in the loop header.
20573 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20575 PR tree-optimization/83914
20576 * tree-vect-loop.c (vectorizable_induction): Don't convert
20577 init_expr or apply the peeling adjustment for inductions
20578 that are nested within the vectorized loop.
20580 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20582 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20585 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20589 * function.h (gimplify_parameters): Add gimple_seq * argument.
20590 * function.c: Include gimple.h and options.h.
20591 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20592 for the added local temporaries if needed.
20593 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20594 if there are any parameter cleanups, wrap whole body into a
20595 try/finally with the cleanups.
20597 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20600 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20601 Use GET_MODE_CLASS for scalar floating point.
20603 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20607 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20608 Fix call of call_cgraph_insertion_hooks.
20610 2018-01-18 Martin Sebor <msebor@redhat.com>
20612 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20614 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20617 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20620 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20623 * common.opt: (-ffile-prefix-map): New option.
20624 * opts.c (common_handle_option): Defer it.
20625 * opts-global.c (handle_common_deferred_options): Handle it.
20626 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20627 * file-prefix-map.h: New file.
20628 (remap_debug_filename, add_debug_prefix_map): ...here.
20629 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20630 * final.c (debug_prefix_map, add_debug_prefix_map
20631 remap_debug_filename): Move to...
20632 * file-prefix-map.c: New file.
20633 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20634 generalize, get rid of alloca(), use strrchr() instead of strchr().
20635 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20636 Implement in terms of add_prefix_map().
20637 (remap_macro_filename, remap_debug_filename): Implement in term of
20639 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20640 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20641 * dbxout.c: Include file-prefix-map.h.
20642 * varasm.c: Likewise.
20643 * vmsdbgout.c: Likewise.
20644 * xcoffout.c: Likewise.
20645 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20646 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20647 * doc/invoke.texi (-ffile-prefix-map): Document.
20648 (-fdebug-prefix-map): Update description.
20650 2018-01-18 Martin Liska <mliska@suse.cz>
20652 * config/i386/i386.c (indirect_thunk_name): Document that also
20654 (output_indirect_thunk): Document why both instructions
20655 (pause and lfence) are generated.
20657 2018-01-18 Richard Biener <rguenther@suse.de>
20659 PR tree-optimization/83887
20660 * graphite-scop-detection.c
20661 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20662 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20663 (scop_detection::merge_sese): Re-implement with a flood-fill
20664 algorithm that properly finds a SESE region if it exists.
20666 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20669 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20670 pointer_diff optimizations use view_convert instead of convert.
20672 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20674 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20675 Generate different code for -mno-speculate-indirect-jumps.
20676 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20677 (*call_indirect_aix<mode>): Disable for
20678 -mno-speculate-indirect-jumps.
20679 (*call_indirect_aix<mode>_nospec): New define_insn.
20680 (*call_value_indirect_aix<mode>): Disable for
20681 -mno-speculate-indirect-jumps.
20682 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20683 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20684 -mno-speculate-indirect-jumps.
20685 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20687 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20689 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20690 long double type, set the flags for noting the default long double
20691 type, even if we don't pass or return a long double type.
20693 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20696 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20699 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20701 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20702 support for merge[hl].
20703 (fold_mergehl_helper): New helper function.
20704 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20705 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20706 (altivec_vmrglw_direct): Add xxmrglw insn.
20708 2018-01-17 Andrew Waterman <andrew@sifive.com>
20710 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20711 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20713 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20716 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20717 call the lto_location_cache before reading the
20718 DECL_SOURCE_LOCATION of the types.
20720 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20721 Richard Sandiford <richard.sandiford@linaro.org>
20723 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20724 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20725 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20726 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20727 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20729 * config/aarch64/constraints.md (aarch64_movti_operand):
20731 * config/aarch64/predicates.md (Uti): Add new constraint.
20733 2018-01-17 Carl Love <cel@us.ibm.com>
20735 * config/rs6000/vsx.md (define_expand xl_len_r,
20736 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20737 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20739 (define_expand, define_insn): Move the shift left from the
20740 define_insn to the define_expand for lxvl and stxvl instructions.
20741 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20742 and XL_LEN_R definitions to PURE.
20744 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20746 * config/i386/i386.c (indirect_thunk_name): Declare regno
20747 as unsigned int. Compare regno with INVALID_REGNUM.
20748 (output_indirect_thunk): Ditto.
20749 (output_indirect_thunk_function): Ditto.
20750 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20751 in the call to output_indirect_thunk_function.
20753 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20755 PR middle-end/83884
20756 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20757 rather than the size of inner_type to determine the stack slot size
20758 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20760 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20763 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20766 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20768 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20769 endian Linux systems to optionally enable multilibs for selecting
20770 the long double type if the user configured an explicit type.
20771 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20772 have no long double multilibs if not defined.
20773 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20774 warn if the user used -mabi={ieee,ibm}longdouble and we built
20775 multilibs for long double.
20776 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20777 appropriate multilib option.
20778 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20780 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20781 for building long double multilibs.
20782 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20784 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20786 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20789 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20791 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20794 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20797 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20800 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20802 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20803 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20805 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20807 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20808 different rtl trees depending on TARGET_64BIT.
20809 (rs6000_gen_lvx): Likewise.
20811 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20813 * config/visium/visium.md (nop): Tweak comment.
20814 (hazard_nop): Likewise.
20816 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20818 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20819 -mspeculate-indirect-jumps.
20820 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20821 for -mno-speculate-indirect-jumps.
20822 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20823 (*call_value_indirect_elfv2<mode>): Disable for
20824 -mno-speculate-indirect-jumps.
20825 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20826 (indirect_jump): Emit different RTL for
20827 -mno-speculate-indirect-jumps.
20828 (*indirect_jump<mode>): Disable for
20829 -mno-speculate-indirect-jumps.
20830 (*indirect_jump<mode>_nospec): New define_insn.
20831 (tablejump): Emit different RTL for
20832 -mno-speculate-indirect-jumps.
20833 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20834 (tablejumpsi_nospec): New define_expand.
20835 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20836 (tablejumpdi_nospec): New define_expand.
20837 (*tablejump<mode>_internal1): Disable for
20838 -mno-speculate-indirect-jumps.
20839 (*tablejump<mode>_internal1_nospec): New define_insn.
20840 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20843 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20845 * caller-save.c (insert_save): Drop unnecessary parameter. All
20848 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20849 Richard Biener <rguenth@suse.de>
20852 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20853 return early, inline manually is_gimple_sizepos. Make sure if we
20854 call gimplify_expr we don't end up with a gimple constant.
20855 * tree.c (variably_modified_type_p): Don't return true for
20856 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20857 * gimplify.h (is_gimple_sizepos): Remove.
20859 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20861 PR tree-optimization/83857
20862 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20863 vectorizable_live_operation for pure SLP statements.
20864 (vectorizable_live_operation): Handle PHIs.
20866 2018-01-16 Richard Biener <rguenther@suse.de>
20868 PR tree-optimization/83867
20869 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20870 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20872 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20875 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20876 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20877 If off is not INTEGER_CST, issue a may not be aligned warning
20878 rather than isn't aligned. Use isn%'t rather than isn't.
20879 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20881 <case MULT_EXPR>: Improve the case when bottom and one of the
20882 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20883 operand, in that case check if the other operand is multiple of
20884 bottom divided by the INTEGER_CST operand.
20886 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20889 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20890 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20891 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20892 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20893 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20894 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20895 (pa_function_arg_size): New function.
20897 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20899 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20900 in a separate statement.
20902 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20904 PR tree-optimization/83847
20905 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20906 group gathers and scatters.
20908 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20910 PR rtl-optimization/86620
20911 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20913 PR rtl-optimization/83213
20914 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20915 to last if both are JUMP_INSNs.
20917 PR tree-optimization/83843
20918 * gimple-ssa-store-merging.c
20919 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20920 store_immediate_info for bswap/nop orig_stores.
20922 2018-01-15 Andrew Waterman <andrew@sifive.com>
20924 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20926 <UDIV>: Increase cost if !TARGET_DIV.
20928 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20930 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20931 (define_attr "cr_logical_3op"): New.
20932 (cceq_ior_compare): Adjust.
20933 (cceq_ior_compare_complement): Adjust.
20934 (*cceq_rev_compare): Adjust.
20935 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20936 (is_cracked_insn): Adjust.
20937 (insn_must_be_first_in_group): Adjust.
20938 * config/rs6000/40x.md: Adjust.
20939 * config/rs6000/440.md: Adjust.
20940 * config/rs6000/476.md: Adjust.
20941 * config/rs6000/601.md: Adjust.
20942 * config/rs6000/603.md: Adjust.
20943 * config/rs6000/6xx.md: Adjust.
20944 * config/rs6000/7450.md: Adjust.
20945 * config/rs6000/7xx.md: Adjust.
20946 * config/rs6000/8540.md: Adjust.
20947 * config/rs6000/cell.md: Adjust.
20948 * config/rs6000/e300c2c3.md: Adjust.
20949 * config/rs6000/e500mc.md: Adjust.
20950 * config/rs6000/e500mc64.md: Adjust.
20951 * config/rs6000/e5500.md: Adjust.
20952 * config/rs6000/e6500.md: Adjust.
20953 * config/rs6000/mpc.md: Adjust.
20954 * config/rs6000/power4.md: Adjust.
20955 * config/rs6000/power5.md: Adjust.
20956 * config/rs6000/power6.md: Adjust.
20957 * config/rs6000/power7.md: Adjust.
20958 * config/rs6000/power8.md: Adjust.
20959 * config/rs6000/power9.md: Adjust.
20960 * config/rs6000/rs64.md: Adjust.
20961 * config/rs6000/titan.md: Adjust.
20963 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20965 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20966 ix86_indirect_branch_register logic.
20968 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20970 * config/i386/constraints.md (Bs): Update
20971 ix86_indirect_branch_register check. Don't check
20972 ix86_indirect_branch_register with GOT_memory_operand.
20974 * config/i386/predicates.md (GOT_memory_operand): Don't check
20975 ix86_indirect_branch_register here.
20976 (GOT32_symbol_operand): Likewise.
20978 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20980 * config/i386/predicates.md (constant_call_address_operand):
20981 Rewrite ix86_indirect_branch_register logic.
20982 (sibcall_insn_operand): Likewise.
20984 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20986 * config/i386/constraints.md (Bs): Replace
20987 ix86_indirect_branch_thunk_register with
20988 ix86_indirect_branch_register.
20990 * config/i386/i386.md (indirect_jump): Likewise.
20991 (tablejump): Likewise.
20992 (*sibcall_memory): Likewise.
20993 (*sibcall_value_memory): Likewise.
20994 Peepholes of indirect call and jump via memory: Likewise.
20995 * config/i386/i386.opt: Likewise.
20996 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20997 (GOT_memory_operand): Likewise.
20998 (call_insn_operand): Likewise.
20999 (sibcall_insn_operand): Likewise.
21000 (GOT32_symbol_operand): Likewise.
21002 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21004 PR middle-end/83837
21005 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21006 type rather than type addr's type points to.
21007 (expand_omp_atomic_mutex): Likewise.
21008 (expand_omp_atomic): Likewise.
21010 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21013 * config/i386/i386.c (output_indirect_thunk_function): Use
21014 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21015 for __x86_return_thunk.
21017 2018-01-15 Richard Biener <rguenther@suse.de>
21019 PR middle-end/83850
21020 * expmed.c (extract_bit_field_1): Fix typo.
21022 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21025 * config/arm/iterators.md (VF): New mode iterator.
21026 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21027 Remove integer-related logic from pattern.
21028 (neon_vabd<mode>_3): Likewise.
21030 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21032 PR middle-end/82694
21033 * common.opt (fstrict-overflow): No longer an alias.
21034 (fwrapv-pointer): New option.
21035 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21036 also for pointer types based on flag_wrapv_pointer.
21037 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21038 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21039 opts->x_flag_wrapv got set.
21040 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21041 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21042 POINTER_TYPE_OVERFLOW_UNDEFINED.
21043 * match.pd: Likewise in address comparison pattern.
21044 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21046 2018-01-15 Richard Biener <rguenther@suse.de>
21049 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21050 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21051 Reset type names to their identifier if their TYPE_DECL doesn't
21052 have linkage (and thus is used for ODR and devirt).
21053 (save_debug_info_for_decl): Remove.
21054 (save_debug_info_for_type): Likewise.
21055 (add_tree_to_fld_list): Adjust.
21056 * tree-pretty-print.c (dump_generic_node): Make dumping of
21057 type names more robust.
21059 2018-01-15 Richard Biener <rguenther@suse.de>
21061 * BASE-VER: Bump to 8.0.1.
21063 2018-01-14 Martin Sebor <msebor@redhat.com>
21066 * builtins.c (check_access): Avoid warning when the no-warning bit
21069 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21071 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21072 * ira-color (allocno_hard_regs_compare): Likewise.
21074 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21077 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21078 Use .pushsection/.popsection.
21080 2018-01-14 Martin Sebor <msebor@redhat.com>
21083 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21085 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21087 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21088 entry from extra_headers.
21089 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21090 extra_headers, make the list bitwise identical to the i?86-*-* one.
21092 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21094 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21095 -mcmodel=large with -mindirect-branch=thunk,
21096 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21097 -mfunction-return=thunk-extern.
21098 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21099 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21100 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21102 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21104 * config/i386/i386.c (print_reg): Print the name of the full
21105 integer register without '%'.
21106 (ix86_print_operand): Handle 'V'.
21107 * doc/extend.texi: Document 'V' modifier.
21109 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21111 * config/i386/constraints.md (Bs): Disallow memory operand for
21112 -mindirect-branch-register.
21114 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21115 (GOT_memory_operand): Likewise.
21116 (call_insn_operand): Likewise.
21117 (sibcall_insn_operand): Likewise.
21118 (GOT32_symbol_operand): Likewise.
21119 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21120 for -mindirect-branch-register.
21121 (tablejump): Likewise.
21122 (*sibcall_memory): Likewise.
21123 (*sibcall_value_memory): Likewise.
21124 Disallow peepholes of indirect call and jump via memory for
21125 -mindirect-branch-register.
21126 (*call_pop): Replace m with Bw.
21127 (*call_value_pop): Likewise.
21128 (*sibcall_pop_memory): Replace m with Bs.
21129 * config/i386/i386.opt (mindirect-branch-register): New option.
21130 * doc/invoke.texi: Document -mindirect-branch-register option.
21132 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21134 * config/i386/i386-protos.h (ix86_output_function_return): New.
21135 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21136 set function_return_type.
21137 (indirect_thunk_name): Add ret_p to indicate thunk for function
21139 (output_indirect_thunk_function): Pass false to
21140 indirect_thunk_name.
21141 (ix86_output_indirect_branch_via_reg): Likewise.
21142 (ix86_output_indirect_branch_via_push): Likewise.
21143 (output_indirect_thunk_function): Create alias for function
21144 return thunk if regno < 0.
21145 (ix86_output_function_return): New function.
21146 (ix86_handle_fndecl_attribute): Handle function_return.
21147 (ix86_attribute_table): Add function_return.
21148 * config/i386/i386.h (machine_function): Add
21149 function_return_type.
21150 * config/i386/i386.md (simple_return_internal): Use
21151 ix86_output_function_return.
21152 (simple_return_internal_long): Likewise.
21153 * config/i386/i386.opt (mfunction-return=): New option.
21154 (indirect_branch): Mention -mfunction-return=.
21155 * doc/extend.texi: Document function_return function attribute.
21156 * doc/invoke.texi: Document -mfunction-return= option.
21158 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21160 * config/i386/i386-opts.h (indirect_branch): New.
21161 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21162 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21163 with local indirect jump when converting indirect call and jump.
21164 (ix86_set_indirect_branch_type): New.
21165 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21166 (indirectlabelno): New.
21167 (indirect_thunk_needed): Likewise.
21168 (indirect_thunk_bnd_needed): Likewise.
21169 (indirect_thunks_used): Likewise.
21170 (indirect_thunks_bnd_used): Likewise.
21171 (INDIRECT_LABEL): Likewise.
21172 (indirect_thunk_name): Likewise.
21173 (output_indirect_thunk): Likewise.
21174 (output_indirect_thunk_function): Likewise.
21175 (ix86_output_indirect_branch_via_reg): Likewise.
21176 (ix86_output_indirect_branch_via_push): Likewise.
21177 (ix86_output_indirect_branch): Likewise.
21178 (ix86_output_indirect_jmp): Likewise.
21179 (ix86_code_end): Call output_indirect_thunk_function if needed.
21180 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21182 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21183 (ix86_attribute_table): Add indirect_branch.
21184 * config/i386/i386.h (machine_function): Add indirect_branch_type
21185 and has_local_indirect_jump.
21186 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21188 (tablejump): Likewise.
21189 (*indirect_jump): Use ix86_output_indirect_jmp.
21190 (*tablejump_1): Likewise.
21191 (simple_return_indirect_internal): Likewise.
21192 * config/i386/i386.opt (mindirect-branch=): New option.
21193 (indirect_branch): New.
21196 (thunk-inline): Likewise.
21197 (thunk-extern): Likewise.
21198 * doc/extend.texi: Document indirect_branch function attribute.
21199 * doc/invoke.texi: Document -mindirect-branch= option.
21201 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21204 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21206 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21208 * ipa-inline.c (want_inline_small_function_p): Return false if
21209 inlining has already failed with CIF_FINAL_ERROR.
21210 (update_caller_keys): Call want_inline_small_function_p before
21212 (update_callee_keys): Likewise.
21214 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21216 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21218 (rs6000_quadword_masked_address_p): Likewise.
21219 (quad_aligned_load_p): Likewise.
21220 (quad_aligned_store_p): Likewise.
21221 (const_load_sequence_p): Add comment to describe the outer-most loop.
21222 (mimic_memory_attributes_and_flags): New function.
21223 (rs6000_gen_stvx): Likewise.
21224 (replace_swapped_aligned_store): Likewise.
21225 (rs6000_gen_lvx): Likewise.
21226 (replace_swapped_aligned_load): Likewise.
21227 (replace_swapped_load_constant): Capitalize argument name in
21228 comment describing this function.
21229 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21230 and stores that access quad-word aligned addresses and replace
21231 with stvx or lvx instructions when appropriate.
21232 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21233 New function prototype.
21234 (rs6000_quadword_masked_address_p): Likewise.
21235 (rs6000_gen_lvx): Likewise.
21236 (rs6000_gen_stvx): Likewise.
21237 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21238 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21239 when memory address is aligned.
21240 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21241 this split to select lvx instruction when memory address is aligned.
21242 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21243 instruction when memory address is aligned.
21244 (*vsx_le_perm_load_v16qi): Likewise.
21245 (four unnamed splitters): Modify to select the stvx instruction
21246 when memory is aligned.
21248 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21250 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21251 which appears in the queue multiple times.
21253 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21254 Alan Hayward <alan.hayward@arm.com>
21255 David Sherwood <david.sherwood@arm.com>
21257 * tree-vectorizer.h (vec_lower_bound): New structure.
21258 (_loop_vec_info): Add check_nonzero and lower_bounds.
21259 (LOOP_VINFO_CHECK_NONZERO): New macro.
21260 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21261 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21262 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21263 fields. Make seg_len the distance travelled, not including the
21265 (dr_direction_indicator): Declare.
21266 (dr_zero_step_indicator): Likewise.
21267 (dr_known_forward_stride_p): Likewise.
21268 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21270 (runtime_alias_check_p): Allow runtime alias checks with
21272 (operator ==): Compare access_size and align.
21273 (prune_runtime_alias_test_list): Rework for new distinction between
21274 the access_size and seg_len.
21275 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21277 (get_segment_min_max): New function.
21278 (create_intersect_range_checks): Use it.
21279 (dr_step_indicator): New function.
21280 (dr_direction_indicator): Likewise.
21281 (dr_zero_step_indicator): Likewise.
21282 (dr_known_forward_stride_p): Likewise.
21283 * tree-loop-distribution.c (data_ref_segment_size): Return
21284 DR_STEP * (niters - 1).
21285 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21287 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21288 (vect_preserves_scalar_order_p): New function, split out from...
21289 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21290 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21291 (vect_vfa_access_size): New function.
21292 (vect_vfa_align): Likewise.
21293 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21294 (dump_lower_bound): New function.
21295 (vect_check_lower_bound): Likewise.
21296 (vect_small_gap_p): Likewise.
21297 (vectorizable_with_step_bound_p): Likewise.
21298 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21299 depencies if the vectorization factor is 1. Convert the checks
21300 for nonzero steps into checks on the bounds of DR_STEP. Try using
21301 a bunds check for variable steps if the minimum required step is
21302 relatively small. Update calls to the dr_with_seg_len
21303 constructor and to vect_compile_time_alias.
21304 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21306 (vect_loop_versioning): Call it.
21307 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21309 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21311 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21312 Alan Hayward <alan.hayward@arm.com>
21313 David Sherwood <david.sherwood@arm.com>
21315 * doc/sourcebuild.texi (vect_scatter_store): Document.
21316 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21318 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21320 * genopinit.c (main): Add supports_vec_scatter_store and
21321 supports_vec_scatter_store_cached to target_optabs.
21322 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21323 IFN_MASK_SCATTER_STORE.
21324 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21326 * internal-fn.h (internal_store_fn_p): Declare.
21327 (internal_fn_stored_value_index): Likewise.
21328 * internal-fn.c (scatter_store_direct): New macro.
21329 (expand_scatter_store_optab_fn): New function.
21330 (direct_scatter_store_optab_supported_p): New macro.
21331 (internal_store_fn_p): New function.
21332 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21333 IFN_MASK_SCATTER_STORE.
21334 (internal_fn_mask_index): Likewise.
21335 (internal_fn_stored_value_index): New function.
21336 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21337 for scatter stores.
21338 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21339 * optabs-query.c (supports_vec_scatter_store_p): New function.
21340 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21341 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21342 true for scatter stores.
21343 (vect_gather_scatter_fn_p): Handle scatter stores too.
21344 (vect_check_gather_scatter): Consider using scatter stores if
21345 supports_vec_scatter_store_p.
21346 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21347 scatter stores too.
21348 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21349 internal_fn_stored_value_index.
21350 (check_load_store_masking): Handle scatter stores too.
21351 (vect_get_store_rhs): Make public.
21352 (vectorizable_call): Use internal_store_fn_p.
21353 (vectorizable_store): Handle scatter store internal functions.
21354 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21355 when deciding whether the end of the group has been reached.
21356 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21357 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21358 (mask_scatter_store<mode>): New insns.
21360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21361 Alan Hayward <alan.hayward@arm.com>
21362 David Sherwood <david.sherwood@arm.com>
21364 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21365 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21366 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21368 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21369 Use vect_truncate_gather_scatter_offset if we can't treat the
21370 operation as a normal gather load or scatter store.
21371 (get_group_load_store_type): Take the gather_scatter_info
21372 as argument. Try using a gather load or scatter store for
21373 single-element groups.
21374 (get_load_store_type): Update calls to get_group_load_store_type
21375 and vect_use_strided_gather_scatters_p.
21377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21378 Alan Hayward <alan.hayward@arm.com>
21379 David Sherwood <david.sherwood@arm.com>
21381 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21382 optional tree argument.
21383 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21385 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21386 but continue to use the current value as a fallback.
21387 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21388 to compare the updates.
21389 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21390 (get_load_store_type): Use it when handling a strided access.
21391 (vect_get_strided_load_store_ops): New function.
21392 (vect_get_data_ptr_increment): Likewise.
21393 (vectorizable_load): Handle strided gather loads. Always pass
21394 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21397 Alan Hayward <alan.hayward@arm.com>
21398 David Sherwood <david.sherwood@arm.com>
21400 * doc/md.texi (gather_load@var{m}): Document.
21401 (mask_gather_load@var{m}): Likewise.
21402 * genopinit.c (main): Add supports_vec_gather_load and
21403 supports_vec_gather_load_cached to target_optabs.
21404 * optabs-tree.c (init_tree_optimization_optabs): Use
21405 ggc_cleared_alloc to allocate target_optabs.
21406 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21407 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21409 * internal-fn.h (internal_load_fn_p): Declare.
21410 (internal_gather_scatter_fn_p): Likewise.
21411 (internal_fn_mask_index): Likewise.
21412 (internal_gather_scatter_fn_supported_p): Likewise.
21413 * internal-fn.c (gather_load_direct): New macro.
21414 (expand_gather_load_optab_fn): New function.
21415 (direct_gather_load_optab_supported_p): New macro.
21416 (direct_internal_fn_optab): New function.
21417 (internal_load_fn_p): Likewise.
21418 (internal_gather_scatter_fn_p): Likewise.
21419 (internal_fn_mask_index): Likewise.
21420 (internal_gather_scatter_fn_supported_p): Likewise.
21421 * optabs-query.c (supports_at_least_one_mode_p): New function.
21422 (supports_vec_gather_load_p): Likewise.
21423 * optabs-query.h (supports_vec_gather_load_p): Declare.
21424 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21425 and memory_type field.
21426 (NUM_PATTERNS): Bump to 15.
21427 * tree-vect-data-refs.c: Include internal-fn.h.
21428 (vect_gather_scatter_fn_p): New function.
21429 (vect_describe_gather_scatter_call): Likewise.
21430 (vect_check_gather_scatter): Try using internal functions for
21431 gather loads. Recognize existing calls to a gather load function.
21432 (vect_analyze_data_refs): Consider using gather loads if
21433 supports_vec_gather_load_p.
21434 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21435 (vect_get_gather_scatter_offset_type): Likewise.
21436 (vect_convert_mask_for_vectype): Likewise.
21437 (vect_add_conversion_to_patterm): Likewise.
21438 (vect_try_gather_scatter_pattern): Likewise.
21439 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21440 (vect_vect_recog_func_ptrs): Add it.
21441 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21442 internal_fn_mask_index and internal_gather_scatter_fn_p.
21443 (check_load_store_masking): Take the gather_scatter_info as an
21444 argument and handle gather loads.
21445 (vect_get_gather_scatter_ops): New function.
21446 (vectorizable_call): Check internal_load_fn_p.
21447 (vectorizable_load): Likewise. Handle gather load internal
21449 (vectorizable_store): Update call to check_load_store_masking.
21450 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21451 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21452 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21453 (aarch64_gather_scale_operand_d): New predicates.
21454 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21455 (mask_gather_load<mode>): New insns.
21457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21458 Alan Hayward <alan.hayward@arm.com>
21459 David Sherwood <david.sherwood@arm.com>
21461 * optabs.def (fold_left_plus_optab): New optab.
21462 * doc/md.texi (fold_left_plus_@var{m}): Document.
21463 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21464 * internal-fn.c (fold_left_direct): Define.
21465 (expand_fold_left_optab_fn): Likewise.
21466 (direct_fold_left_optab_supported_p): Likewise.
21467 * fold-const-call.c (fold_const_fold_left): New function.
21468 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21469 * tree-parloops.c (valid_reduction_p): New function.
21470 (gather_scalar_reductions): Use it.
21471 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21472 (vect_finish_replace_stmt): Declare.
21473 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21474 (needs_fold_left_reduction_p): New function, split out from...
21475 (vect_is_simple_reduction): ...here. Accept reductions that
21476 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21477 (vect_force_simple_reduction): Also store the reduction type in
21478 the assignment's STMT_VINFO_REDUC_TYPE.
21479 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21480 (merge_with_identity): New function.
21481 (vect_expand_fold_left): Likewise.
21482 (vectorize_fold_left_reduction): Likewise.
21483 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21484 scalar phi in place for it. Check for target support and reject
21485 cases that would reassociate the operation. Defer the transform
21486 phase to vectorize_fold_left_reduction.
21487 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21488 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21489 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21491 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21493 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21494 call to ifc_temp_var.
21496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21497 Alan Hayward <alan.hayward@arm.com>
21498 David Sherwood <david.sherwood@arm.com>
21500 * target.def (legitimize_address_displacement): Take the original
21501 offset as a poly_int.
21502 * targhooks.h (default_legitimize_address_displacement): Update
21504 * targhooks.c (default_legitimize_address_displacement): Likewise.
21505 * doc/tm.texi: Regenerate.
21506 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21507 as an argument, moving assert of ad->disp == ad->disp_term to...
21508 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21509 Try calling targetm.legitimize_address_displacement before expanding
21510 the address rather than afterwards, and adjust for the new interface.
21511 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21512 Match the new hook interface. Handle SVE addresses.
21513 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21514 new hook interface.
21516 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21518 * Makefile.in (OBJS): Add early-remat.o.
21519 * target.def (select_early_remat_modes): New hook.
21520 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21521 * doc/tm.texi: Regenerate.
21522 * targhooks.h (default_select_early_remat_modes): Declare.
21523 * targhooks.c (default_select_early_remat_modes): New function.
21524 * timevar.def (TV_EARLY_REMAT): New timevar.
21525 * passes.def (pass_early_remat): New pass.
21526 * tree-pass.h (make_pass_early_remat): Declare.
21527 * early-remat.c: New file.
21528 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21530 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21533 Alan Hayward <alan.hayward@arm.com>
21534 David Sherwood <david.sherwood@arm.com>
21536 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21537 vfm1 with a bound_epilog parameter.
21538 (vect_do_peeling): Update calls accordingly, and move the prologue
21539 call earlier in the function. Treat the base bound_epilog as 0 for
21540 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21541 this base when peeling for gaps.
21542 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21543 with fully-masked loops.
21544 (vect_estimate_min_profitable_iters): Handle the single peeled
21545 iteration in that case.
21547 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21548 Alan Hayward <alan.hayward@arm.com>
21549 David Sherwood <david.sherwood@arm.com>
21551 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21552 single-element interleaving even if the size is not a power of 2.
21553 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21554 accesses for single-element interleaving if the group size is
21557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21558 Alan Hayward <alan.hayward@arm.com>
21559 David Sherwood <david.sherwood@arm.com>
21561 * doc/md.texi (fold_extract_last_@var{m}): Document.
21562 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21563 * optabs.def (fold_extract_last_optab): New optab.
21564 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21565 * internal-fn.c (fold_extract_direct): New macro.
21566 (expand_fold_extract_optab_fn): Likewise.
21567 (direct_fold_extract_optab_supported_p): Likewise.
21568 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21569 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21570 EXTRACT_LAST_REDUCTION.
21571 (get_initial_def_for_reduction): Do not create an initial vector
21572 for EXTRACT_LAST_REDUCTION reductions.
21573 (vectorizable_reduction): Leave the scalar phi in place for
21574 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21575 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21576 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21577 transform phase to vectorizable_condition.
21578 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21580 (vect_finish_stmt_generation): ...here.
21581 (vect_finish_replace_stmt): New function.
21582 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21583 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21585 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21587 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21588 Alan Hayward <alan.hayward@arm.com>
21589 David Sherwood <david.sherwood@arm.com>
21591 * doc/md.texi (extract_last_@var{m}): Document.
21592 * optabs.def (extract_last_optab): New optab.
21593 * internal-fn.def (EXTRACT_LAST): New internal function.
21594 * internal-fn.c (cond_unary_direct): New macro.
21595 (expand_cond_unary_optab_fn): Likewise.
21596 (direct_cond_unary_optab_supported_p): Likewise.
21597 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21598 loops using EXTRACT_LAST.
21599 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21600 (extract_last_<mode>): ...this optab.
21601 (vec_extract<mode><Vel>): Update accordingly.
21603 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21604 Alan Hayward <alan.hayward@arm.com>
21605 David Sherwood <david.sherwood@arm.com>
21607 * target.def (empty_mask_is_expensive): New hook.
21608 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21609 * doc/tm.texi: Regenerate.
21610 * targhooks.h (default_empty_mask_is_expensive): Declare.
21611 * targhooks.c (default_empty_mask_is_expensive): New function.
21612 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21613 if the target says that empty masks are expensive.
21614 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21616 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21619 Alan Hayward <alan.hayward@arm.com>
21620 David Sherwood <david.sherwood@arm.com>
21622 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21623 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21624 (vect_use_loop_mask_for_alignment_p): New function.
21625 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21626 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21627 niters_skip argument. Make sure that the first niters_skip elements
21628 of the first iteration are inactive.
21629 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21630 Update call to vect_set_loop_masks_directly.
21631 (get_misalign_in_elems): New function, split out from...
21632 (vect_gen_prolog_loop_niters): ...here.
21633 (vect_update_init_of_dr): Take a code argument that specifies whether
21634 the adjustment should be added or subtracted.
21635 (vect_update_init_of_drs): Likewise.
21636 (vect_prepare_for_masked_peels): New function.
21637 (vect_do_peeling): Skip prologue peeling if we're using a mask
21638 instead. Update call to vect_update_inits_of_drs.
21639 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21641 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21642 alignment. Do not include the number of peeled iterations in
21643 the minimum threshold in that case.
21644 (vectorizable_induction): Adjust the start value down by
21645 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21646 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21647 Take the number of skipped iterations into account when calculating
21649 * tree-vect-stmts.c (vect_gen_while_not): New function.
21651 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21652 Alan Hayward <alan.hayward@arm.com>
21653 David Sherwood <david.sherwood@arm.com>
21655 * doc/sourcebuild.texi (vect_fully_masked): Document.
21656 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21657 default value to 0.
21658 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21660 (vect_analyze_loop_2): ...here. Don't check the vectorization
21661 factor against the number of loop iterations if the loop is
21664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21665 Alan Hayward <alan.hayward@arm.com>
21666 David Sherwood <david.sherwood@arm.com>
21668 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21669 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21670 (dump_groups): Update accordingly.
21671 (iv_use::mem_type): New member variable.
21672 (address_p): New function.
21673 (record_use): Add a mem_type argument and initialize the new
21675 (record_group_use): Add a mem_type argument. Use address_p.
21676 Remove obsolete null checks of base_object. Update call to record_use.
21677 (find_interesting_uses_op): Update call to record_group_use.
21678 (find_interesting_uses_cond): Likewise.
21679 (find_interesting_uses_address): Likewise.
21680 (get_mem_type_for_internal_fn): New function.
21681 (find_address_like_use): Likewise.
21682 (find_interesting_uses_stmt): Try find_address_like_use before
21683 calling find_interesting_uses_op.
21684 (addr_offset_valid_p): Use the iv mem_type field as the type
21685 of the addressed memory.
21686 (add_autoinc_candidates): Likewise.
21687 (get_address_cost): Likewise.
21688 (split_small_address_groups_p): Use address_p.
21689 (split_address_groups): Likewise.
21690 (add_iv_candidate_for_use): Likewise.
21691 (autoinc_possible_for_pair): Likewise.
21692 (rewrite_groups): Likewise.
21693 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21694 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21695 (get_alias_ptr_type_for_ptr_address): New function.
21696 (rewrite_use_address): Rewrite address uses in calls that were
21697 identified by find_address_like_use.
21699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21700 Alan Hayward <alan.hayward@arm.com>
21701 David Sherwood <david.sherwood@arm.com>
21703 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21705 * gimple-expr.h (is_gimple_addressable: Likewise.
21706 * gimple-expr.c (is_gimple_address): Likewise.
21707 * internal-fn.c (expand_call_mem_ref): New function.
21708 (expand_mask_load_optab_fn): Use it.
21709 (expand_mask_store_optab_fn): Likewise.
21711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21712 Alan Hayward <alan.hayward@arm.com>
21713 David Sherwood <david.sherwood@arm.com>
21715 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21716 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21717 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21718 (cond_umax@var{mode}): Document.
21719 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21720 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21721 (cond_umin_optab, cond_umax_optab): New optabs.
21722 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21723 (COND_IOR, COND_XOR): New internal functions.
21724 * internal-fn.h (get_conditional_internal_fn): Declare.
21725 * internal-fn.c (cond_binary_direct): New macro.
21726 (expand_cond_binary_optab_fn): Likewise.
21727 (direct_cond_binary_optab_supported_p): Likewise.
21728 (get_conditional_internal_fn): New function.
21729 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21730 Cope with reduction statements that are vectorized as calls rather
21732 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21733 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21734 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21735 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21736 (UNSPEC_COND_EOR): New unspecs.
21737 (optab): Add mappings for them.
21738 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21739 (sve_int_op, sve_fp_op): New int attributes.
21741 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21742 Alan Hayward <alan.hayward@arm.com>
21743 David Sherwood <david.sherwood@arm.com>
21745 * optabs.def (while_ult_optab): New optab.
21746 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21747 * internal-fn.def (WHILE_ULT): New internal function.
21748 * internal-fn.h (direct_internal_fn_supported_p): New override
21749 that takes two types as argument.
21750 * internal-fn.c (while_direct): New macro.
21751 (expand_while_optab_fn): New function.
21752 (convert_optab_supported_p): Likewise.
21753 (direct_while_optab_supported_p): New macro.
21754 * wide-int.h (wi::udiv_ceil): New function.
21755 * tree-vectorizer.h (rgroup_masks): New structure.
21756 (vec_loop_masks): New typedef.
21757 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21758 and fully_masked_p.
21759 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21760 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21761 (vect_max_vf): New function.
21762 (slpeel_make_loop_iterate_ntimes): Delete.
21763 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21764 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21765 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21766 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21767 internal-fn.h, stor-layout.h and optabs-query.h.
21768 (vect_set_loop_mask): New function.
21769 (add_preheader_seq): Likewise.
21770 (add_header_seq): Likewise.
21771 (interleave_supported_p): Likewise.
21772 (vect_maybe_permute_loop_masks): Likewise.
21773 (vect_set_loop_masks_directly): Likewise.
21774 (vect_set_loop_condition_masked): Likewise.
21775 (vect_set_loop_condition_unmasked): New function, split out from
21776 slpeel_make_loop_iterate_ntimes.
21777 (slpeel_make_loop_iterate_ntimes): Rename to..
21778 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21779 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21780 (vect_do_peeling): Update call accordingly.
21781 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21783 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21784 mask_compare_type, can_fully_mask_p and fully_masked_p.
21785 (release_vec_loop_masks): New function.
21786 (_loop_vec_info): Use it to free the loop masks.
21787 (can_produce_all_loop_masks_p): New function.
21788 (vect_get_max_nscalars_per_iter): Likewise.
21789 (vect_verify_full_masking): Likewise.
21790 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21791 retries, and free the mask rgroups before retrying. Check loop-wide
21792 reasons for disallowing fully-masked loops. Make the final decision
21793 about whether use a fully-masked loop or not.
21794 (vect_estimate_min_profitable_iters): Do not assume that peeling
21795 for the number of iterations will be needed for fully-masked loops.
21796 (vectorizable_reduction): Disable fully-masked loops.
21797 (vectorizable_live_operation): Likewise.
21798 (vect_halve_mask_nunits): New function.
21799 (vect_double_mask_nunits): Likewise.
21800 (vect_record_loop_mask): Likewise.
21801 (vect_get_loop_mask): Likewise.
21802 (vect_transform_loop): Handle the case in which the final loop
21803 iteration might handle a partial vector. Call vect_set_loop_condition
21804 instead of slpeel_make_loop_iterate_ntimes.
21805 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21806 (check_load_store_masking): New function.
21807 (prepare_load_store_mask): Likewise.
21808 (vectorizable_store): Handle fully-masked loops.
21809 (vectorizable_load): Likewise.
21810 (supportable_widening_operation): Use vect_halve_mask_nunits for
21812 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21813 (vect_gen_while): New function.
21814 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21815 (aarch64_uqdec<mode>): New insn.
21817 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21818 Alan Hayward <alan.hayward@arm.com>
21819 David Sherwood <david.sherwood@arm.com>
21821 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21822 (reduc_xor_scal_optab): New optabs.
21823 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21824 (reduc_xor_scal_@var{m}): Document.
21825 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21826 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21827 internal functions.
21828 * fold-const-call.c (fold_const_call): Handle them.
21829 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21830 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21831 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21832 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21833 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21834 (UNSPEC_XORV): New unspecs.
21835 (optab): Add entries for them.
21836 (BITWISEV): New int iterator.
21837 (bit_reduc_op): New int attributes.
21839 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21840 Alan Hayward <alan.hayward@arm.com>
21841 David Sherwood <david.sherwood@arm.com>
21843 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21844 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21845 * optabs.def (vec_shl_insert_optab): New optab.
21846 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21847 (duplicate_and_interleave): Likewise.
21848 * tree-vect-loop.c: Include internal-fn.h.
21849 (neutral_op_for_slp_reduction): New function, split out from
21850 get_initial_defs_for_reduction.
21851 (get_initial_def_for_reduction): Handle option 2 for variable-length
21852 vectors by loading the neutral value into a vector and then shifting
21853 the initial value into element 0.
21854 (get_initial_defs_for_reduction): Replace the code argument with
21855 the neutral value calculated by neutral_op_for_slp_reduction.
21856 Use gimple_build_vector for constant-length vectors.
21857 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21858 but the first group_size elements have a neutral value.
21859 Use duplicate_and_interleave otherwise.
21860 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21861 Update call to get_initial_defs_for_reduction. Handle SLP
21862 reductions for variable-length vectors by creating one vector
21863 result for each scalar result, with the elements associated
21864 with other scalar results stubbed out with the neutral value.
21865 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21866 Require IFN_VEC_SHL_INSERT for double reductions on
21867 variable-length vectors, or SLP reductions that have
21868 a neutral value. Require can_duplicate_and_interleave_p
21869 support for variable-length unchained SLP reductions if there
21870 is no neutral value, such as for MIN/MAX reductions. Also require
21871 the number of vector elements to be a multiple of the number of
21872 SLP statements when doing variable-length unchained SLP reductions.
21873 Update call to vect_create_epilog_for_reduction.
21874 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21875 and remove initial values.
21876 (duplicate_and_interleave): Make public.
21877 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21878 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21880 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21881 Alan Hayward <alan.hayward@arm.com>
21882 David Sherwood <david.sherwood@arm.com>
21884 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21885 (can_duplicate_and_interleave_p): New function.
21886 (vect_get_and_check_slp_defs): Take the vector of statements
21887 rather than just the current one. Remove excess parentheses.
21888 Restriction rejectinon of vect_constant_def and vect_external_def
21889 for variable-length vectors to boolean types, or types for which
21890 can_duplicate_and_interleave_p is false.
21891 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21892 (duplicate_and_interleave): New function.
21893 (vect_get_constant_vectors): Use gimple_build_vector for
21894 constant-length vectors and suitable variable-length constant
21895 vectors. Use duplicate_and_interleave for other variable-length
21896 vectors. Don't defer the update when inserting new statements.
21898 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21899 Alan Hayward <alan.hayward@arm.com>
21900 David Sherwood <david.sherwood@arm.com>
21902 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21903 min_profitable_iters doesn't go negative.
21905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21906 Alan Hayward <alan.hayward@arm.com>
21907 David Sherwood <david.sherwood@arm.com>
21909 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21910 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21911 * optabs.def (vec_mask_load_lanes_optab): New optab.
21912 (vec_mask_store_lanes_optab): Likewise.
21913 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21914 (MASK_STORE_LANES): Likewise.
21915 * internal-fn.c (mask_load_lanes_direct): New macro.
21916 (mask_store_lanes_direct): Likewise.
21917 (expand_mask_load_optab_fn): Handle masked operations.
21918 (expand_mask_load_lanes_optab_fn): New macro.
21919 (expand_mask_store_optab_fn): Handle masked operations.
21920 (expand_mask_store_lanes_optab_fn): New macro.
21921 (direct_mask_load_lanes_optab_supported_p): Likewise.
21922 (direct_mask_store_lanes_optab_supported_p): Likewise.
21923 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21925 (vect_load_lanes_supported): Likewise.
21926 * tree-vect-data-refs.c (strip_conversion): New function.
21927 (can_group_stmts_p): Likewise.
21928 (vect_analyze_data_ref_accesses): Use it instead of checking
21929 for a pair of assignments.
21930 (vect_store_lanes_supported): Take a masked_p parameter.
21931 (vect_load_lanes_supported): Likewise.
21932 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21933 vect_store_lanes_supported and vect_load_lanes_supported.
21934 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21935 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21936 parameter. Don't allow gaps for masked accesses.
21937 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21938 and vect_load_lanes_supported.
21939 (get_load_store_type): Take a masked_p parameter and update
21940 call to get_group_load_store_type.
21941 (vectorizable_store): Update call to get_load_store_type.
21942 Handle IFN_MASK_STORE_LANES.
21943 (vectorizable_load): Update call to get_load_store_type.
21944 Handle IFN_MASK_LOAD_LANES.
21946 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21947 Alan Hayward <alan.hayward@arm.com>
21948 David Sherwood <david.sherwood@arm.com>
21950 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21952 * config/aarch64/aarch64-protos.h
21953 (aarch64_sve_struct_memory_operand_p): Declare.
21954 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21955 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21956 (VPRED, vpred): Handle SVE structure modes.
21957 * config/aarch64/constraints.md (Utx): New constraint.
21958 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21959 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21960 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21961 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21962 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21963 structure modes. Split into pieces after RA.
21964 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21965 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21967 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21968 SVE structure modes.
21969 (aarch64_classify_address): Likewise.
21970 (sizetochar): Move earlier in file.
21971 (aarch64_print_operand): Handle SVE register lists.
21972 (aarch64_array_mode): New function.
21973 (aarch64_sve_struct_memory_operand_p): Likewise.
21974 (TARGET_ARRAY_MODE): Redefine.
21976 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21977 Alan Hayward <alan.hayward@arm.com>
21978 David Sherwood <david.sherwood@arm.com>
21980 * target.def (array_mode): New target hook.
21981 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21982 * doc/tm.texi: Regenerate.
21983 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21984 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21985 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21986 targetm.array_mode.
21987 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21991 Alan Hayward <alan.hayward@arm.com>
21992 David Sherwood <david.sherwood@arm.com>
21994 * fold-const.c (fold_binary_loc): Check the argument types
21995 rather than the result type when testing for a vector operation.
21997 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21999 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22000 * doc/tm.texi: Regenerate.
22002 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22003 Alan Hayward <alan.hayward@arm.com>
22004 David Sherwood <david.sherwood@arm.com>
22006 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22007 (sve): Document new AArch64 extension.
22008 * doc/md.texi (w): Extend the description of the AArch64
22009 constraint to include SVE vectors.
22010 (Upl, Upa): Document new AArch64 predicate constraints.
22011 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22013 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22014 (msve-vector-bits=): New option.
22015 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22016 SVE when these are disabled.
22017 (sve): New extension.
22018 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22019 modes. Adjust their number of units based on aarch64_sve_vg.
22020 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22021 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22022 aarch64_addr_query_type.
22023 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22024 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22025 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22026 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22027 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22028 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22029 (aarch64_simd_imm_zero_p): Delete.
22030 (aarch64_check_zero_based_sve_index_immediate): Declare.
22031 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22032 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22033 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22034 (aarch64_sve_float_mul_immediate_p): Likewise.
22035 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22036 rather than an rtx.
22037 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22038 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22039 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22040 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22041 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22042 (aarch64_regmode_natural_size): Likewise.
22043 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22044 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22046 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22047 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22048 for VG and the SVE predicate registers.
22049 (V_ALIASES): Add a "z"-prefixed alias.
22050 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22051 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22052 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22053 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22054 (REG_CLASS_NAMES): Add entries for them.
22055 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22056 and the predicate registers.
22057 (aarch64_sve_vg): Declare.
22058 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22059 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22060 (REGMODE_NATURAL_SIZE): Define.
22061 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22063 * config/aarch64/aarch64.c: Include cfgrtl.h.
22064 (simd_immediate_info): Add a constructor for series vectors,
22065 and an associated step field.
22066 (aarch64_sve_vg): New variable.
22067 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22068 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22069 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22070 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22071 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22072 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22073 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22074 (aarch64_get_mask_mode): New functions.
22075 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22076 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22077 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22078 predicate modes and predicate registers. Explicitly restrict
22079 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22080 to store a vector mode if it is recognized by
22081 aarch64_classify_vector_mode.
22082 (aarch64_regmode_natural_size): New function.
22083 (aarch64_hard_regno_caller_save_mode): Return the original mode
22085 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22086 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22087 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22088 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22090 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22091 does not overlap dest if the function is frame-related. Handle
22093 (aarch64_split_add_offset): New function.
22094 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22095 them aarch64_add_offset.
22096 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22097 and update call to aarch64_sub_sp.
22098 (aarch64_add_cfa_expression): New function.
22099 (aarch64_expand_prologue): Pass extra temporary registers to the
22100 functions above. Handle the case in which we need to emit new
22101 DW_CFA_expressions for registers that were originally saved
22102 relative to the stack pointer, but now have to be expressed
22103 relative to the frame pointer.
22104 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22106 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22107 IP0 and IP1 values for SVE frames.
22108 (aarch64_expand_vec_series): New function.
22109 (aarch64_expand_sve_widened_duplicate): Likewise.
22110 (aarch64_expand_sve_const_vector): Likewise.
22111 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22112 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22113 into the register, rather than emitting a SET directly.
22114 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22115 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22116 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22117 (offset_9bit_signed_scaled_p): New functions.
22118 (aarch64_replicate_bitmask_imm): New function.
22119 (aarch64_bitmask_imm): Use it.
22120 (aarch64_cannot_force_const_mem): Reject expressions involving
22121 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22122 (aarch64_classify_index): Handle SVE indices, by requiring
22123 a plain register index with a scale that matches the element size.
22124 (aarch64_classify_address): Handle SVE addresses. Assert that
22125 the mode of the address is VOIDmode or an integer mode.
22126 Update call to aarch64_classify_symbol.
22127 (aarch64_classify_symbolic_expression): Update call to
22128 aarch64_classify_symbol.
22129 (aarch64_const_vec_all_in_range_p): New function.
22130 (aarch64_print_vector_float_operand): Likewise.
22131 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22132 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22133 and the FP immediates 1.0 and 0.5.
22134 (aarch64_print_address_internal): Handle SVE addresses.
22135 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22136 (aarch64_regno_regclass): Handle predicate registers.
22137 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22139 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22140 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22141 (aarch64_convert_sve_vector_bits): New function.
22142 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22143 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22144 rather than an rtx.
22145 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22146 Handle SVE vector and predicate modes. Accept VL-based constants
22147 that need only one temporary register, and VL offsets that require
22148 no temporary registers.
22149 (aarch64_conditional_register_usage): Mark the predicate registers
22150 as fixed if SVE isn't available.
22151 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22152 Return true for SVE vector and predicate modes.
22153 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22154 rather than an unsigned int. Handle SVE modes.
22155 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22157 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22159 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22160 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22161 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22162 (aarch64_sve_float_mul_immediate_p): New functions.
22163 (aarch64_sve_valid_immediate): New function.
22164 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22165 Explicitly reject structure modes. Check for INDEX constants.
22166 Handle PTRUE and PFALSE constants.
22167 (aarch64_check_zero_based_sve_index_immediate): New function.
22168 (aarch64_simd_imm_zero_p): Delete.
22169 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22170 vector modes. Accept constants in the range of CNT[BHWD].
22171 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22172 ask for an Advanced SIMD mode.
22173 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22174 (aarch64_simd_vector_alignment): Handle SVE predicates.
22175 (aarch64_vectorize_preferred_vector_alignment): New function.
22176 (aarch64_simd_vector_alignment_reachable): Use it instead of
22178 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22179 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22181 (MAX_VECT_LEN): Delete.
22182 (expand_vec_perm_d): Add a vec_flags field.
22183 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22184 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22185 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22187 (aarch64_evpc_rev): Rename to...
22188 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22189 (aarch64_evpc_rev_global): New function.
22190 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22191 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22193 (aarch64_evpc_sve_tbl): New function.
22194 (aarch64_expand_vec_perm_const_1): Update after rename of
22195 aarch64_evpc_rev. Handle SVE permutes too, trying
22196 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22197 than aarch64_evpc_tbl.
22198 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22199 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22200 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22201 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22202 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22203 (aarch64_expand_sve_vcond): New functions.
22204 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22205 of aarch64_vector_mode_p.
22206 (aarch64_dwarf_poly_indeterminate_value): New function.
22207 (aarch64_compute_pressure_classes): Likewise.
22208 (aarch64_can_change_mode_class): Likewise.
22209 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22210 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22211 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22212 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22213 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22214 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22215 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22216 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22218 (Dn, Dl, Dr): Accept const as well as const_vector.
22219 (Dz): Likewise. Compare against CONST0_RTX.
22220 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22221 of "vector" where appropriate.
22222 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22223 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22224 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22225 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22226 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22227 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22228 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22229 (v_int_equiv): Extend to SVE modes.
22230 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22232 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22233 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22234 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22235 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22236 (SVE_COND_FP_CMP): New int iterators.
22237 (perm_hilo): Handle the new unpack unspecs.
22238 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22240 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22241 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22242 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22243 (aarch64_equality_operator, aarch64_constant_vector_operand)
22244 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22245 (aarch64_sve_nonimmediate_operand): Likewise.
22246 (aarch64_sve_general_operand): Likewise.
22247 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22248 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22249 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22250 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22251 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22252 (aarch64_sve_float_arith_immediate): Likewise.
22253 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22254 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22255 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22256 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22257 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22258 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22259 (aarch64_sve_float_arith_operand): Likewise.
22260 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22261 (aarch64_sve_float_mul_operand): Likewise.
22262 (aarch64_sve_vec_perm_operand): Likewise.
22263 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22264 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22265 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22266 as well as const_vector.
22267 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22268 in file. Use CONST0_RTX and CONSTM1_RTX.
22269 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22270 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22271 Use aarch64_simd_imm_zero.
22272 * config/aarch64/aarch64-sve.md: New file.
22273 * config/aarch64/aarch64.md: Include it.
22274 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22275 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22276 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22277 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22278 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22279 (sve): New attribute.
22280 (enabled): Disable instructions with the sve attribute unless
22282 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22283 aarch64_expand_mov_immediate.
22284 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22285 CNT[BHSD] immediates.
22286 (movti): Split CONST_POLY_INT moves into two halves.
22287 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22288 Split additions that need a temporary here if the destination
22289 is the stack pointer.
22290 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22291 (*add<mode>3_poly_1): New instruction.
22292 (set_clobber_cc): New expander.
22294 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22296 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22297 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22298 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22299 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22300 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22301 Change innermode from fixed_mode_size to machine_mode.
22302 (simplify_subreg): Update call accordingly. Handle a constant-sized
22303 subreg of a variable-length CONST_VECTOR.
22305 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22306 Alan Hayward <alan.hayward@arm.com>
22307 David Sherwood <david.sherwood@arm.com>
22309 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22310 (add_offset_to_base): New function, split out from...
22311 (create_mem_ref): ...here. When handling a scale other than 1,
22312 check first whether the address is valid without the offset.
22313 Add it into the base if so, leaving the index and scale as-is.
22315 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22318 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22319 fold_for_warn before checking if arg2 is INTEGER_CST.
22321 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22323 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22324 (store_multiple_operation): Delete.
22325 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22326 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22327 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22328 guarded by TARGET_STRING.
22329 (rs6000_output_load_multiple): Delete.
22330 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22331 OPTION_MASK_STRING / TARGET_STRING handling.
22332 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22333 (const rs6000_opt_masks) <"string">: Change mask to 0.
22334 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22335 (MASK_STRING): Delete.
22336 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22338 (load_multiple): Delete.
22345 (store_multiple): Delete.
22352 (movmemsi_8reg): Delete.
22353 (corresponding unnamed define_insn): Delete.
22354 (movmemsi_6reg): Delete.
22355 (corresponding unnamed define_insn): Delete.
22356 (movmemsi_4reg): Delete.
22357 (corresponding unnamed define_insn): Delete.
22358 (movmemsi_2reg): Delete.
22359 (corresponding unnamed define_insn): Delete.
22360 (movmemsi_1reg): Delete.
22361 (corresponding unnamed define_insn): Delete.
22362 * config/rs6000/rs6000.opt (mno-string): New.
22363 (mstring): Replace by deprecation warning stub.
22364 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22366 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22368 * regrename.c (regrename_do_replace): If replacing the same
22369 reg multiple times, try to reuse last created gen_raw_REG.
22372 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22373 main to workaround a bug in GDB.
22375 2018-01-12 Tom de Vries <tom@codesourcery.com>
22378 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22380 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22382 PR rtl-optimization/80481
22383 * ira-color.c (get_cap_member): New function.
22384 (allocnos_conflict_by_live_ranges_p): Use it.
22385 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22386 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22388 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22391 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22392 (*saddl_se_1): Ditto.
22393 (*ssubsi_1): Ditto.
22394 (*ssubl_se_1): Ditto.
22396 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22398 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22399 rather than wi::to_widest for DR_INITs.
22400 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22401 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22402 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22404 (vect_analyze_group_access_1): Note that here.
22406 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22408 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22409 polynomial type sizes.
22411 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22413 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22414 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22415 (gimple_add_tmp_var): Likewise.
22417 2018-01-12 Martin Liska <mliska@suse.cz>
22419 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22420 (gimple_alloc_sizes): Likewise.
22421 (dump_gimple_statistics): Use PRIu64 in printf format.
22422 * gimple.h: Change uint64_t to int.
22424 2018-01-12 Martin Liska <mliska@suse.cz>
22426 * tree-core.h: Use uint64_t instead of int.
22427 * tree.c (tree_node_counts): Likewise.
22428 (tree_node_sizes): Likewise.
22429 (dump_tree_statistics): Use PRIu64 in printf format.
22431 2018-01-12 Martin Liska <mliska@suse.cz>
22433 * Makefile.in: As qsort_chk is implemented in vec.c, add
22434 vec.o to linkage of gencfn-macros.
22435 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22436 passing the info to record_node_allocation_statistics.
22437 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22439 * ggc-common.c (struct ggc_usage): Add operator== and use
22440 it in operator< and compare function.
22441 * mem-stats.h (struct mem_usage): Likewise.
22442 * vec.c (struct vec_usage): Remove operator< and compare
22443 function. Can be simply inherited.
22445 2018-01-12 Martin Jambor <mjambor@suse.cz>
22448 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22449 * tree-ssa-math-opts.c: Include domwalk.h.
22450 (convert_mult_to_fma_1): New function.
22451 (fma_transformation_info): New type.
22452 (fma_deferring_state): Likewise.
22453 (cancel_fma_deferring): New function.
22454 (result_of_phi): Likewise.
22455 (last_fma_candidate_feeds_initial_phi): Likewise.
22456 (convert_mult_to_fma): Added deferring logic, split actual
22457 transformation to convert_mult_to_fma_1.
22458 (math_opts_dom_walker): New type.
22459 (math_opts_dom_walker::after_dom_children): New method, body moved
22460 here from pass_optimize_widening_mul::execute, added deferring logic
22462 (pass_optimize_widening_mul::execute): Moved most of code to
22463 math_opts_dom_walker::after_dom_children.
22464 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22465 * config/i386/i386.c (ix86_option_override_internal): Added
22466 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22468 2018-01-12 Richard Biener <rguenther@suse.de>
22471 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22472 inline instance vars.
22474 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22477 * config/rx/rx.c (rx_is_restricted_memory_address):
22478 Handle SUBREG case.
22480 2018-01-12 Richard Biener <rguenther@suse.de>
22482 PR tree-optimization/80846
22483 * target.def (split_reduction): New target hook.
22484 * targhooks.c (default_split_reduction): New function.
22485 * targhooks.h (default_split_reduction): Declare.
22486 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22487 target requests first reduce vectors by combining low and high
22489 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22490 (get_vectype_for_scalar_type_and_size): Export.
22491 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22492 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22493 * doc/tm.texi: Regenerate.
22494 * config/i386/i386.c (ix86_split_reduction): Implement
22495 TARGET_VECTORIZE_SPLIT_REDUCTION.
22497 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22500 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22501 in PIC mode except for TARGET_VXWORKS_RTP.
22502 * config/sparc/sparc.c: Include cfgrtl.h.
22503 (TARGET_INIT_PIC_REG): Define.
22504 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22505 (sparc_pic_register_p): New predicate.
22506 (sparc_legitimate_address_p): Use it.
22507 (sparc_legitimize_pic_address): Likewise.
22508 (sparc_delegitimize_address): Likewise.
22509 (sparc_mode_dependent_address_p): Likewise.
22510 (gen_load_pcrel_sym): Remove 4th parameter.
22511 (load_got_register): Adjust call to above. Remove obsolete stuff.
22512 (sparc_expand_prologue): Do not call load_got_register here.
22513 (sparc_flat_expand_prologue): Likewise.
22514 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22515 (sparc_use_pseudo_pic_reg): New function.
22516 (sparc_init_pic_reg): Likewise.
22517 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22518 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22520 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22522 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22523 Add item for branch_cost.
22525 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22527 PR rtl-optimization/83565
22528 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22529 not extend the result to a larger mode for rotate operations.
22530 (num_sign_bit_copies1): Likewise.
22532 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22535 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22537 Use values-Xc.o for -pedantic.
22538 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22540 2018-01-12 Martin Liska <mliska@suse.cz>
22543 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22545 (possible_polymorphic_call_targets): Use it.
22546 (ipa_devirt): Likewise.
22548 2018-01-12 Martin Liska <mliska@suse.cz>
22550 * profile-count.h (enum profile_quality): Use 0 as invalid
22551 enum value of profile_quality.
22553 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22555 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22556 -mext-string options.
22558 2018-01-12 Richard Biener <rguenther@suse.de>
22560 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22561 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22562 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22564 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22566 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22568 * configure.ac (--with-long-double-format): Add support for the
22569 configuration option to change the default long double format on
22571 * config.gcc (powerpc*-linux*-*): Likewise.
22572 * configure: Regenerate.
22573 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22574 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22575 used without modification.
22577 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22579 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22580 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22581 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22582 MISC_BUILTIN_SPEC_BARRIER.
22583 (rs6000_init_builtins): Likewise.
22584 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22586 (speculation_barrier): New define_insn.
22587 * doc/extend.texi: Document __builtin_speculation_barrier.
22589 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22592 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22593 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22594 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22596 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22597 integral modes instead of "ss" and "sd".
22598 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22599 vectors with 32-bit and 64-bit elements.
22600 (vecdupssescalarmodesuffix): New mode attribute.
22601 (vec_dup<mode>): Use it.
22603 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22606 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22607 frame if argument is passed on stack.
22609 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22612 * ree.c (combine_reaching_defs): Optimize also
22613 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22614 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22616 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22618 PR middle-end/83189
22619 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22621 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22623 PR middle-end/83718
22624 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22625 after they are computed.
22627 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22629 PR tree-optimization/83695
22630 * gimple-loop-linterchange.cc
22631 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22632 reset cached scev information after interchange.
22633 (pass_linterchange::execute): Remove call to scev_reset_htab.
22635 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22637 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22638 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22639 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22640 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22641 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22642 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22643 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22644 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22645 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22646 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22647 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22648 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22649 (V_lane_reg): Likewise.
22650 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22652 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22653 (vfmal_lane_low<mode>_intrinsic,
22654 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22655 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22656 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22657 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22658 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22659 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22661 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22663 * config/arm/arm-cpus.in (fp16fml): New feature.
22664 (ALL_SIMD): Add fp16fml.
22665 (armv8.2-a): Add fp16fml as an option.
22666 (armv8.3-a): Likewise.
22667 (armv8.4-a): Add fp16fml as part of fp16.
22668 * config/arm/arm.h (TARGET_FP16FML): Define.
22669 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22671 * config/arm/arm-modes.def (V2HF): Define.
22672 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22673 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22674 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22675 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22676 vfmsl_low, vfmsl_high): New set of builtins.
22677 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22678 (vfml_op): New code attribute.
22679 (VFMLHALVES): New int iterator.
22680 (VFML, VFMLSEL): New mode attributes.
22681 (V_reg): Define mapping for V2HF.
22682 (V_hi, V_lo): New mode attributes.
22683 (VF_constraint): Likewise.
22684 (vfml_half, vfml_half_selector): New int attributes.
22685 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22687 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22688 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22690 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22691 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22692 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22693 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22695 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22696 Document new effective target and option set.
22698 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22700 * config/arm/arm-cpus.in (armv8_4): New feature.
22701 (ARMv8_4a): New fgroup.
22702 (armv8.4-a): New arch.
22703 * config/arm/arm-tables.opt: Regenerate.
22704 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22705 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22706 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22707 Add matching rules for -march=armv8.4-a and extensions.
22708 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22710 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22713 * config/rx/rx.md (BW): New mode attribute.
22714 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22716 2018-01-11 Richard Biener <rguenther@suse.de>
22718 PR tree-optimization/83435
22719 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22720 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22721 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22723 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22724 Alan Hayward <alan.hayward@arm.com>
22725 David Sherwood <david.sherwood@arm.com>
22727 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22729 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22730 (aarch64_print_address_internal): Use it to check for a zero offset.
22732 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22733 Alan Hayward <alan.hayward@arm.com>
22734 David Sherwood <david.sherwood@arm.com>
22736 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22737 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22738 Return a poly_int64 rather than a HOST_WIDE_INT.
22739 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22740 rather than a HOST_WIDE_INT.
22741 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22742 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22743 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22744 final_offset from HOST_WIDE_INT to poly_int64.
22745 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22746 to_constant when getting the number of units in an Advanced SIMD
22748 (aarch64_builtin_vectorized_function): Check for a constant number
22750 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22752 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22753 attribute instead of GET_MODE_NUNITS.
22754 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22755 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22756 GET_MODE_SIZE for fixed-size registers.
22757 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22758 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22759 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22760 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22761 (aarch64_print_operand, aarch64_print_address_internal)
22762 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22763 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22764 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22765 Handle polynomial GET_MODE_SIZE.
22766 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22767 wider than SImode without modification.
22768 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22769 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22770 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22771 passing and returning SVE modes.
22772 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22773 rather than GEN_INT.
22774 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22775 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22776 (aarch64_allocate_and_probe_stack_space): Likewise.
22777 (aarch64_layout_frame): Cope with polynomial offsets.
22778 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22779 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22780 polynomial offsets.
22781 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22782 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22783 poly_int64 rather than a HOST_WIDE_INT.
22784 (aarch64_get_separate_components, aarch64_process_components)
22785 (aarch64_expand_prologue, aarch64_expand_epilogue)
22786 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22787 (aarch64_anchor_offset): New function, split out from...
22788 (aarch64_legitimize_address): ...here.
22789 (aarch64_builtin_vectorization_cost): Handle polynomial
22790 TYPE_VECTOR_SUBPARTS.
22791 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22793 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22794 number of elements from the PARALLEL rather than the mode.
22795 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22796 rather than GET_MODE_BITSIZE.
22797 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22798 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22799 (aarch64_expand_vec_perm_const_1): Handle polynomial
22800 d->perm.length () and d->perm elements.
22801 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22802 Apply to_constant to d->perm elements.
22803 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22804 polynomial CONST_VECTOR_NUNITS.
22805 (aarch64_move_pointer): Take amount as a poly_int64 rather
22807 (aarch64_progress_pointer): Avoid temporary variable.
22808 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22809 the mode attribute instead of GET_MODE.
22811 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22812 Alan Hayward <alan.hayward@arm.com>
22813 David Sherwood <david.sherwood@arm.com>
22815 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22816 x exists before using it.
22817 (aarch64_add_constant_internal): Rename to...
22818 (aarch64_add_offset_1): ...this. Replace regnum with separate
22819 src and dest rtxes. Handle the case in which they're different,
22820 including when the offset is zero. Replace scratchreg with an rtx.
22821 Use 2 additions if there is no spare register into which we can
22822 move a 16-bit constant.
22823 (aarch64_add_constant): Delete.
22824 (aarch64_add_offset): Replace reg with separate src and dest
22825 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22826 Use aarch64_add_offset_1.
22827 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22828 an rtx rather than an int. Take the delta as a poly_int64
22829 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22830 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22831 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22832 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22833 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22834 and aarch64_add_sp.
22835 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22836 aarch64_add_constant.
22838 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22840 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22841 Use scalar_float_mode.
22843 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22845 * config/aarch64/aarch64-simd.md
22846 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22847 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22848 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22849 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22850 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22851 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22852 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22853 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22854 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22855 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22857 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22860 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22861 targ_options->x_arm_arch_string is non NULL.
22863 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22865 * config/aarch64/aarch64.h
22866 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22868 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22871 * expmed.c (emit_store_flag_force): Swap if const op0
22872 and change VOIDmode to mode of op0.
22874 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22876 PR rtl-optimization/83761
22877 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22878 than bytes to mode_for_size.
22880 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22882 PR middle-end/83189
22883 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22884 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22887 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22889 PR middle-end/83575
22890 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22891 when in layout mode.
22892 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22893 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22896 2018-01-10 Michael Collison <michael.collison@arm.com>
22898 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22899 * config/aarch64/aarch64-option-extension.def: Add
22900 AARCH64_OPT_EXTENSION of 'fp16fml'.
22901 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22902 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22903 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22904 * config/aarch64/constraints.md (Ui7): New constraint.
22905 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22906 (VFMLA_SEL_W): Ditto.
22909 (VFMLA16_LOW): New int iterator.
22910 (VFMLA16_HIGH): Ditto.
22911 (UNSPEC_FMLAL): New unspec.
22912 (UNSPEC_FMLSL): Ditto.
22913 (UNSPEC_FMLAL2): Ditto.
22914 (UNSPEC_FMLSL2): Ditto.
22915 (f16mac): New code attribute.
22916 * config/aarch64/aarch64-simd-builtins.def
22917 (aarch64_fmlal_lowv2sf): Ditto.
22918 (aarch64_fmlsl_lowv2sf): Ditto.
22919 (aarch64_fmlalq_lowv4sf): Ditto.
22920 (aarch64_fmlslq_lowv4sf): Ditto.
22921 (aarch64_fmlal_highv2sf): Ditto.
22922 (aarch64_fmlsl_highv2sf): Ditto.
22923 (aarch64_fmlalq_highv4sf): Ditto.
22924 (aarch64_fmlslq_highv4sf): Ditto.
22925 (aarch64_fmlal_lane_lowv2sf): Ditto.
22926 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22927 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22928 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22929 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22930 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22931 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22932 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22933 (aarch64_fmlal_lane_highv2sf): Ditto.
22934 (aarch64_fmlsl_lane_highv2sf): Ditto.
22935 (aarch64_fmlal_laneq_highv2sf): Ditto.
22936 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22937 (aarch64_fmlalq_lane_highv4sf): Ditto.
22938 (aarch64_fmlsl_lane_highv4sf): Ditto.
22939 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22940 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22941 * config/aarch64/aarch64-simd.md:
22942 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22943 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22944 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22945 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22946 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22947 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22948 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22949 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22950 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22951 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22952 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22953 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22954 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22955 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22956 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22957 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22958 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22959 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22960 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22961 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22962 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22963 (vfmlsl_low_u32): Ditto.
22964 (vfmlalq_low_u32): Ditto.
22965 (vfmlslq_low_u32): Ditto.
22966 (vfmlal_high_u32): Ditto.
22967 (vfmlsl_high_u32): Ditto.
22968 (vfmlalq_high_u32): Ditto.
22969 (vfmlslq_high_u32): Ditto.
22970 (vfmlal_lane_low_u32): Ditto.
22971 (vfmlsl_lane_low_u32): Ditto.
22972 (vfmlal_laneq_low_u32): Ditto.
22973 (vfmlsl_laneq_low_u32): Ditto.
22974 (vfmlalq_lane_low_u32): Ditto.
22975 (vfmlslq_lane_low_u32): Ditto.
22976 (vfmlalq_laneq_low_u32): Ditto.
22977 (vfmlslq_laneq_low_u32): Ditto.
22978 (vfmlal_lane_high_u32): Ditto.
22979 (vfmlsl_lane_high_u32): Ditto.
22980 (vfmlal_laneq_high_u32): Ditto.
22981 (vfmlsl_laneq_high_u32): Ditto.
22982 (vfmlalq_lane_high_u32): Ditto.
22983 (vfmlslq_lane_high_u32): Ditto.
22984 (vfmlalq_laneq_high_u32): Ditto.
22985 (vfmlslq_laneq_high_u32): Ditto.
22986 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22987 (AARCH64_FL_FOR_ARCH8_4): New.
22988 (AARCH64_ISA_F16FML): New ISA flag.
22989 (TARGET_F16FML): New feature flag for fp16fml.
22990 (doc/invoke.texi): Document new fp16fml option.
22992 2018-01-10 Michael Collison <michael.collison@arm.com>
22994 * config/aarch64/aarch64-builtins.c:
22995 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22996 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22997 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22998 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22999 (AARCH64_ISA_SHA3): New ISA flag.
23000 (TARGET_SHA3): New feature flag for sha3.
23001 * config/aarch64/iterators.md (sha512_op): New int attribute.
23002 (CRYPTO_SHA512): New int iterator.
23003 (UNSPEC_SHA512H): New unspec.
23004 (UNSPEC_SHA512H2): Ditto.
23005 (UNSPEC_SHA512SU0): Ditto.
23006 (UNSPEC_SHA512SU1): Ditto.
23007 * config/aarch64/aarch64-simd-builtins.def
23008 (aarch64_crypto_sha512hqv2di): New builtin.
23009 (aarch64_crypto_sha512h2qv2di): Ditto.
23010 (aarch64_crypto_sha512su0qv2di): Ditto.
23011 (aarch64_crypto_sha512su1qv2di): Ditto.
23012 (aarch64_eor3qv8hi): Ditto.
23013 (aarch64_rax1qv2di): Ditto.
23014 (aarch64_xarqv2di): Ditto.
23015 (aarch64_bcaxqv8hi): Ditto.
23016 * config/aarch64/aarch64-simd.md:
23017 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23018 (aarch64_crypto_sha512su0qv2di): Ditto.
23019 (aarch64_crypto_sha512su1qv2di): Ditto.
23020 (aarch64_eor3qv8hi): Ditto.
23021 (aarch64_rax1qv2di): Ditto.
23022 (aarch64_xarqv2di): Ditto.
23023 (aarch64_bcaxqv8hi): Ditto.
23024 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23025 (vsha512h2q_u64): Ditto.
23026 (vsha512su0q_u64): Ditto.
23027 (vsha512su1q_u64): Ditto.
23028 (veor3q_u16): Ditto.
23029 (vrax1q_u64): Ditto.
23030 (vxarq_u64): Ditto.
23031 (vbcaxq_u16): Ditto.
23032 * config/arm/types.md (crypto_sha512): New type attribute.
23033 (crypto_sha3): Ditto.
23034 (doc/invoke.texi): Document new sha3 option.
23036 2018-01-10 Michael Collison <michael.collison@arm.com>
23038 * config/aarch64/aarch64-builtins.c:
23039 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23040 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23041 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23042 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23043 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23044 (AARCH64_ISA_SM4): New ISA flag.
23045 (TARGET_SM4): New feature flag for sm4.
23046 * config/aarch64/aarch64-simd-builtins.def
23047 (aarch64_sm3ss1qv4si): Ditto.
23048 (aarch64_sm3tt1aq4si): Ditto.
23049 (aarch64_sm3tt1bq4si): Ditto.
23050 (aarch64_sm3tt2aq4si): Ditto.
23051 (aarch64_sm3tt2bq4si): Ditto.
23052 (aarch64_sm3partw1qv4si): Ditto.
23053 (aarch64_sm3partw2qv4si): Ditto.
23054 (aarch64_sm4eqv4si): Ditto.
23055 (aarch64_sm4ekeyqv4si): Ditto.
23056 * config/aarch64/aarch64-simd.md:
23057 (aarch64_sm3ss1qv4si): Ditto.
23058 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23059 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23060 (aarch64_sm4eqv4si): Ditto.
23061 (aarch64_sm4ekeyqv4si): Ditto.
23062 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23063 (sm3part_op): Ditto.
23064 (CRYPTO_SM3TT): Ditto.
23065 (CRYPTO_SM3PART): Ditto.
23066 (UNSPEC_SM3SS1): New unspec.
23067 (UNSPEC_SM3TT1A): Ditto.
23068 (UNSPEC_SM3TT1B): Ditto.
23069 (UNSPEC_SM3TT2A): Ditto.
23070 (UNSPEC_SM3TT2B): Ditto.
23071 (UNSPEC_SM3PARTW1): Ditto.
23072 (UNSPEC_SM3PARTW2): Ditto.
23073 (UNSPEC_SM4E): Ditto.
23074 (UNSPEC_SM4EKEY): Ditto.
23075 * config/aarch64/constraints.md (Ui2): New constraint.
23076 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23077 * config/arm/types.md (crypto_sm3): New type attribute.
23078 (crypto_sm4): Ditto.
23079 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23080 (vsm3tt1aq_u32): Ditto.
23081 (vsm3tt1bq_u32): Ditto.
23082 (vsm3tt2aq_u32): Ditto.
23083 (vsm3tt2bq_u32): Ditto.
23084 (vsm3partw1q_u32): Ditto.
23085 (vsm3partw2q_u32): Ditto.
23086 (vsm4eq_u32): Ditto.
23087 (vsm4ekeyq_u32): Ditto.
23088 (doc/invoke.texi): Document new sm4 option.
23090 2018-01-10 Michael Collison <michael.collison@arm.com>
23092 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23093 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23094 (AARCH64_FL_FOR_ARCH8_4): New.
23095 (AARCH64_FL_V8_4): New flag.
23096 (doc/invoke.texi): Document new armv8.4-a option.
23098 2018-01-10 Michael Collison <michael.collison@arm.com>
23100 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23101 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23102 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23103 * config/aarch64/aarch64-option-extension.def: Add
23104 AARCH64_OPT_EXTENSION of 'sha2'.
23105 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23106 (crypto): Disable sha2 and aes if crypto disabled.
23107 (crypto): Enable aes and sha2 if enabled.
23108 (simd): Disable sha2 and aes if simd disabled.
23109 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23111 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23112 (TARGET_SHA2): New feature flag for sha2.
23113 (TARGET_AES): New feature flag for aes.
23114 * config/aarch64/aarch64-simd.md:
23115 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23116 conditional on TARGET_AES.
23117 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23118 (aarch64_crypto_sha1hsi): Make pattern conditional
23120 (aarch64_crypto_sha1hv4si): Ditto.
23121 (aarch64_be_crypto_sha1hv4si): Ditto.
23122 (aarch64_crypto_sha1su1v4si): Ditto.
23123 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23124 (aarch64_crypto_sha1su0v4si): Ditto.
23125 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23126 (aarch64_crypto_sha256su0v4si): Ditto.
23127 (aarch64_crypto_sha256su1v4si): Ditto.
23128 (doc/invoke.texi): Document new aes and sha2 options.
23130 2018-01-10 Martin Sebor <msebor@redhat.com>
23132 PR tree-optimization/83781
23133 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23136 2018-01-11 Martin Sebor <msebor@gmail.com>
23137 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23139 PR tree-optimization/83501
23140 PR tree-optimization/81703
23142 * tree-ssa-strlen.c (get_string_cst): Rename...
23143 (get_string_len): ...to this. Handle global constants.
23144 (handle_char_store): Adjust.
23146 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23147 Jim Wilson <jimw@sifive.com>
23149 * config/riscv/riscv-protos.h (riscv_output_return): New.
23150 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23151 (riscv_attribute_table, riscv_output_return),
23152 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23153 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23154 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23156 (riscv_expand_prologue): Add early return for naked function.
23157 (riscv_expand_epilogue): Likewise.
23158 (riscv_function_ok_for_sibcall): Return false for naked function.
23159 (riscv_set_current_function): New.
23160 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23161 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23162 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23163 * doc/extend.texi (RISC-V Function Attributes): New.
23165 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23167 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23168 check for 128-bit long double before checking TCmode.
23169 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23170 128-bit long doubles before checking TFmode or TCmode.
23171 (FLOAT128_IBM_P): Likewise.
23173 2018-01-10 Martin Sebor <msebor@redhat.com>
23175 PR tree-optimization/83671
23176 * builtins.c (c_strlen): Unconditionally return zero for the empty
23178 Use -Warray-bounds for warnings.
23179 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23180 for non-constant array indices with COMPONENT_REF, arrays of
23181 arrays, and pointers to arrays.
23182 (gimple_fold_builtin_strlen): Determine and set length range for
23183 non-constant character arrays.
23185 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23187 PR middle-end/81897
23188 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23191 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23193 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23195 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23198 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23199 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23200 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23201 indexed_or_indirect_operand predicate.
23202 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23203 (*vsx_le_perm_load_v8hi): Likewise.
23204 (*vsx_le_perm_load_v16qi): Likewise.
23205 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23206 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23207 (*vsx_le_perm_store_v8hi): Likewise.
23208 (*vsx_le_perm_store_v16qi): Likewise.
23209 (eight unnamed splitters): Likewise.
23211 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23213 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23214 * config/rs6000/emmintrin.h: Likewise.
23215 * config/rs6000/mmintrin.h: Likewise.
23216 * config/rs6000/xmmintrin.h: Likewise.
23218 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23221 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23223 * tree.c (tree_nop_conversion): Return true for location wrapper
23225 (maybe_wrap_with_location): New function.
23226 (selftest::check_strip_nops): New function.
23227 (selftest::test_location_wrappers): New function.
23228 (selftest::tree_c_tests): Call it.
23229 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23230 (maybe_wrap_with_location): New decl.
23231 (EXPR_LOCATION_WRAPPER_P): New macro.
23232 (location_wrapper_p): New inline function.
23233 (tree_strip_any_location_wrapper): New inline function.
23235 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23238 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23239 stack_realign_offset for the largest alignment of stack slot
23241 (ix86_find_max_used_stack_alignment): New function.
23242 (ix86_finalize_stack_frame_flags): Use it. Set
23243 max_used_stack_alignment if we don't realign stack.
23244 * config/i386/i386.h (machine_function): Add
23245 max_used_stack_alignment.
23247 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23249 * config/arm/arm.opt (-mbranch-cost): New option.
23250 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23253 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23256 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23257 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23259 2018-01-10 Richard Biener <rguenther@suse.de>
23262 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23263 early out so it also covers the case where we have a non-NULL
23266 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23268 PR tree-optimization/83753
23269 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23270 for non-strided grouped accesses if the number of elements is 1.
23272 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23275 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23276 * i386.h (TARGET_USE_GATHER): Define.
23277 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23279 2018-01-10 Martin Liska <mliska@suse.cz>
23282 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23283 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23285 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23286 CLEANUP_NO_PARTITIONING is not set.
23288 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23290 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23291 for vectors, as a partial revert of r254296.
23292 * rtl.h (const_vec_p): Delete.
23293 (const_vec_duplicate_p): Don't test for vector CONSTs.
23294 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23295 * expmed.c (make_tree): Likewise.
23298 * common.md (E, F): Use CONSTANT_P instead of checking for
23300 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23301 checking for CONST_VECTOR.
23303 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23305 PR middle-end/83575
23306 * predict.c (force_edge_cold): Handle in more sane way edges
23307 with no prediction.
23309 2018-01-09 Carl Love <cel@us.ibm.com>
23311 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23313 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23314 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23315 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23316 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23317 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23318 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23319 * config/rs6000/rs6000-protos.h: Add extern defition for
23320 rs6000_generate_float2_double_code.
23321 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23323 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23324 (float2_v2df): Add define_expand.
23326 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23329 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23330 op_mode in the force_to_mode call.
23332 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23334 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23335 instead of checking each element individually.
23336 (aarch64_evpc_uzp): Likewise.
23337 (aarch64_evpc_zip): Likewise.
23338 (aarch64_evpc_ext): Likewise.
23339 (aarch64_evpc_rev): Likewise.
23340 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23341 instead of checking each element individually. Return true without
23343 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23344 whether all selected elements come from the same input, instead of
23345 checking each element individually. Remove calls to gen_rtx_REG,
23346 start_sequence and end_sequence and instead assert that no rtl is
23349 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23351 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23352 order of HIGH and CONST checks.
23354 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23356 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23357 if the destination isn't an SSA_NAME.
23359 2018-01-09 Richard Biener <rguenther@suse.de>
23361 PR tree-optimization/83668
23362 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23364 (canonicalize_loop_form): ... here, renamed from ...
23365 (canonicalize_loop_closed_ssa_form): ... this and amended to
23366 swap successor edges for loop exit blocks to make us use
23367 the RPO order we need for initial schedule generation.
23369 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23371 PR tree-optimization/64811
23372 * match.pd: When optimizing comparisons with Inf, avoid
23373 introducing or losing exceptions from comparisons with NaN.
23375 2018-01-09 Martin Liska <mliska@suse.cz>
23378 * asan.c (shadow_mem_size): Add gcc_assert.
23380 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23382 Don't save registers in main().
23385 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23386 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23387 * config/avr/avr.c (avr_set_current_function): Don't error if
23388 naked, OS_task or OS_main are specified at the same time.
23389 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23391 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23393 * common/config/avr/avr-common.c (avr_option_optimization_table):
23394 Switch on -mmain-is-OS_task for optimizing compilations.
23396 2018-01-09 Richard Biener <rguenther@suse.de>
23398 PR tree-optimization/83572
23399 * graphite.c: Include cfganal.h.
23400 (graphite_transform_loops): Connect infinite loops to exit
23401 and remove fake edges at the end.
23403 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23405 * ipa-inline.c (edge_badness): Revert accidental checkin.
23407 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23410 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23411 symbols; not inline clones.
23413 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23416 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23417 hard registers. Formatting fixes.
23419 PR preprocessor/83722
23420 * gcc.c (try_generate_repro): Pass
23421 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23422 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23425 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23426 Kito Cheng <kito.cheng@gmail.com>
23428 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23429 (riscv_leaf_function_p): Delete.
23430 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23432 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23434 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23436 (do_ifelse): New function.
23437 (do_isel): New function.
23438 (do_sub3): New function.
23439 (do_add3): New function.
23440 (do_load_mask_compare): New function.
23441 (do_overlap_load_compare): New function.
23442 (expand_compare_loop): New function.
23443 (expand_block_compare): Call expand_compare_loop() when appropriate.
23444 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23445 option description.
23446 (-mblock-compare-inline-loop-limit): New option.
23448 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23451 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23452 Reverse order of second and third operands in first alternative.
23453 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23454 of first and second elements in UNSPEC_VPERMR vector.
23455 (altivec_expand_vec_perm_le): Likewise.
23457 2018-01-08 Jeff Law <law@redhat.com>
23459 PR rtl-optimizatin/81308
23460 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23461 (process_switch): If group_case_labels makes a change, then set
23463 (pass_convert_switch::execute): If a switch is converted, then
23464 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23466 PR rtl-optimization/81308
23467 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23470 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23472 PR target/83663 - Revert r255946
23473 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23474 generation for cases where splatting a value is not useful.
23475 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23476 across a vec_duplicate and a paradoxical subreg forming a vector
23477 mode to a vec_concat.
23479 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23481 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23482 -march=armv8.3-a variants.
23483 * config/arm/t-multilib: Likewise.
23484 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23486 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23488 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23490 (cceq_ior_compare_complement): Give it a name so I can use it, and
23491 change boolean_or_operator predicate to boolean_operator so it can
23492 be used to generate a crand.
23493 (eqne): New code iterator.
23494 (bd/bd_neg): New code_attrs.
23495 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23496 a single define_insn.
23497 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23498 decrement (bdnzt/bdnzf/bdzt/bdzf).
23499 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23500 with the new names of the branch decrement patterns, and added the
23501 names of the branch decrement conditional patterns.
23503 2018-01-08 Richard Biener <rguenther@suse.de>
23505 PR tree-optimization/83563
23506 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23509 2018-01-08 Richard Biener <rguenther@suse.de>
23511 PR middle-end/83713
23512 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23514 2018-01-08 Richard Biener <rguenther@suse.de>
23516 PR tree-optimization/83685
23517 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23518 references to abnormals.
23520 2018-01-08 Richard Biener <rguenther@suse.de>
23523 * dwarf2out.c (output_indirect_strings): Handle empty
23524 skeleton_debug_str_hash.
23525 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23527 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23529 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23530 (emit_store_direct): Likewise.
23531 (arc_trampoline_adjust_address): Likewise.
23532 (arc_asm_trampoline_template): New function.
23533 (arc_initialize_trampoline): Use asm_trampoline_template.
23534 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23535 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23536 * config/arc/arc.md (flush_icache): Delete pattern.
23538 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23540 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23541 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23544 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23547 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23548 by not USED_FOR_TARGET.
23549 (make_pass_resolve_sw_modes): Likewise.
23551 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23553 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23556 2018-01-08 Richard Biener <rguenther@suse.de>
23558 PR middle-end/83580
23559 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23561 2018-01-08 Richard Biener <rguenther@suse.de>
23563 PR middle-end/83517
23564 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23566 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23568 PR middle-end/81897
23569 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23570 basic blocks with a small number of successors.
23571 (convert_control_dep_chain_into_preds): Improve handling of
23573 (dump_predicates): Split apart into...
23574 (dump_pred_chain): ...here...
23575 (dump_pred_info): ...and here.
23576 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23577 (can_chain_union_be_invalidated_p): Improve check for invalidation
23579 (uninit_uses_cannot_happen): Avoid unnecessary if
23580 convert_control_dep_chain_into_preds yielded nothing.
23582 2018-01-06 Martin Sebor <msebor@redhat.com>
23584 PR tree-optimization/83640
23585 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23586 subtracting negative offset from size.
23587 (builtin_access::overlap): Adjust offset bounds of the access to fall
23588 within the size of the object if possible.
23590 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23592 PR rtl-optimization/83699
23593 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23594 extract_bit_field_as_subreg to cases in which the extracted
23595 value is also a vector.
23597 * lra-constraints.c (process_alt_operands): Test for the equivalence
23598 substitutions when detecting a possible reload cycle.
23600 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23603 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23604 by default if flag_selective_schedling{,2}. Formatting fixes.
23606 PR rtl-optimization/83682
23607 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23608 if it has non-VECTOR_MODE element mode.
23609 (vec_duplicate_p): Likewise.
23611 PR middle-end/83694
23612 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23613 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23615 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23618 * config/i386/i386-builtin.def
23619 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23620 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23621 Require also OPTION_MASK_ISA_AVX512F in addition to
23622 OPTION_MASK_ISA_GFNI.
23623 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23624 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23625 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23626 to OPTION_MASK_ISA_GFNI.
23627 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23628 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23629 OPTION_MASK_ISA_AVX512BW.
23630 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23631 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23632 addition to OPTION_MASK_ISA_GFNI.
23633 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23634 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23635 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23636 to OPTION_MASK_ISA_GFNI.
23637 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23638 a requirement for all ISAs rather than any of them with a few
23640 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23642 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23643 bitmasks to be enabled with 3 exceptions, instead of requiring any
23644 enabled ISA with lots of exceptions.
23645 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23646 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23647 Change avx512bw in isa attribute to avx512f.
23648 * config/i386/sgxintrin.h: Add license boilerplate.
23649 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23650 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23651 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23652 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23654 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23655 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23656 temporarily sse2 rather than sse if not enabled already.
23659 * config/i386/sse.md (VI248_VLBW): Rename to ...
23660 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23661 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23662 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23663 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23664 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23665 mode iterator instead of VI248_VLBW.
23667 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23669 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23670 (record_modified): Skip clobbers; add debug output.
23671 (param_change_prob): Use sreal frequencies.
23673 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23675 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23676 punt for user-aligned variables.
23678 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23680 * tree-chrec.c (chrec_contains_symbols): Return true for
23683 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23686 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23687 of (x|y) == x for BICS pattern.
23689 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23691 PR tree-optimization/83605
23692 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23693 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23696 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23698 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23699 * config/epiphany/rtems.h: New file.
23701 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23702 Uros Bizjak <ubizjak@gmail.com>
23705 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23706 QIreg_operand instead of register_operand predicate.
23707 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23708 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23709 comments instead of -fmitigate[-_]rop.
23711 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23714 * cgraphunit.c (symbol_table::compile): Switch to text_section
23715 before calling assembly_start debug hook.
23716 * run-rtl-passes.c (run_rtl_passes): Likewise.
23719 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23721 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23722 range_int_cst_p rather than !symbolic_range_p before calling
23723 extract_range_from_multiplicative_op_1.
23725 2018-01-04 Jeff Law <law@redhat.com>
23727 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23728 redundant test in assertion.
23730 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23732 * doc/rtl.texi: Document machine_mode wrapper classes.
23734 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23736 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23737 using tree_to_uhwi.
23739 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23741 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23742 the VEC_PERM_EXPR fold to fail.
23744 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23747 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23748 to switched_sections.
23750 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23753 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23754 test for d.testing.
23756 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23759 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23760 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23762 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23765 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23766 is BLKmode and bitpos not zero or mode change is needed.
23768 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23771 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23774 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23777 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23778 instead of MULT rtx. Update all corresponding splitters.
23779 (*saddl_se): Ditto.
23780 (*ssub<modesuffix>): Ditto.
23781 (*ssubl_se): Ditto.
23782 (*cmp_sadd_di): Update split patterns.
23783 (*cmp_sadd_si): Ditto.
23784 (*cmp_sadd_sidi): Ditto.
23785 (*cmp_ssub_di): Ditto.
23786 (*cmp_ssub_si): Ditto.
23787 (*cmp_ssub_sidi): Ditto.
23788 * config/alpha/predicates.md (const23_operand): New predicate.
23789 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23790 Look for ASHIFT, not MULT inner operand.
23791 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23793 2018-01-04 Martin Liska <mliska@suse.cz>
23795 PR gcov-profile/83669
23796 * gcov.c (output_intermediate_file): Add version to intermediate
23798 * doc/gcov.texi: Document new field 'version' in intermediate
23799 file format. Fix location of '-k' option of gcov command.
23801 2018-01-04 Martin Liska <mliska@suse.cz>
23804 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23806 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23808 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23810 2018-01-03 Martin Sebor <msebor@redhat.com>
23812 PR tree-optimization/83655
23813 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23814 checking calls with invalid arguments.
23816 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23818 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23819 (vectorizable_mask_load_store): Delete.
23820 (vectorizable_call): Return false for masked loads and stores.
23821 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23822 instead of gimple_assign_rhs1.
23823 (vectorizable_load): Handle IFN_MASK_LOAD.
23824 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23828 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23830 (vectorizable_mask_load_store): ...here.
23831 (vectorizable_load): ...and here.
23833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23835 * tree-vect-stmts.c (vect_build_all_ones_mask)
23836 (vect_build_zero_merge_argument): New functions, split out from...
23837 (vectorizable_load): ...here.
23839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23841 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23843 (vectorizable_mask_load_store): ...here.
23844 (vectorizable_store): ...and here.
23846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23848 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23850 (vectorizable_mask_load_store): ...here.
23852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23854 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23855 (vect_model_store_cost): Take a vec_load_store_type instead of a
23857 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23858 (vect_model_store_cost): Take a vec_load_store_type instead of a
23860 (vectorizable_mask_load_store): Update accordingly.
23861 (vectorizable_store): Likewise.
23862 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23866 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23867 IFN_MASK_LOAD calls here rather than...
23868 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23871 Alan Hayward <alan.hayward@arm.com>
23872 David Sherwood <david.sherwood@arm.com>
23874 * expmed.c (extract_bit_field_1): For vector extracts,
23875 fall back to extract_bit_field_as_subreg if vec_extract
23878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23879 Alan Hayward <alan.hayward@arm.com>
23880 David Sherwood <david.sherwood@arm.com>
23882 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23883 they are variable or constant sized.
23884 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23885 slots for constant-sized data.
23887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23888 Alan Hayward <alan.hayward@arm.com>
23889 David Sherwood <david.sherwood@arm.com>
23891 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23892 handling COND_EXPRs with boolean comparisons, try to find a better
23893 basis for the mask type than the boolean itself.
23895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23897 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23898 is calculated and how it can be overridden.
23899 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23900 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23902 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23906 Alan Hayward <alan.hayward@arm.com>
23907 David Sherwood <david.sherwood@arm.com>
23909 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23910 Remove the mode argument.
23911 (aarch64_simd_valid_immediate): Remove the mode and inverse
23913 * config/aarch64/iterators.md (bitsize): New iterator.
23914 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23915 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23916 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23917 aarch64_simd_valid_immediate.
23918 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23919 (aarch64_reg_or_bic_imm): Likewise.
23920 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23921 with an insn_type enum and msl with a modifier_type enum.
23922 Replace element_width with a scalar_mode. Change the shift
23923 to unsigned int. Add constructors for scalar_float_mode and
23924 scalar_int_mode elements.
23925 (aarch64_vect_float_const_representable_p): Delete.
23926 (aarch64_can_const_movi_rtx_p)
23927 (aarch64_simd_scalar_immediate_valid_for_move)
23928 (aarch64_simd_make_constant): Update call to
23929 aarch64_simd_valid_immediate.
23930 (aarch64_advsimd_valid_immediate_hs): New function.
23931 (aarch64_advsimd_valid_immediate): Likewise.
23932 (aarch64_simd_valid_immediate): Remove mode and inverse
23933 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23934 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23935 and aarch64_float_const_representable_p on the result.
23936 (aarch64_output_simd_mov_immediate): Remove mode argument.
23937 Update call to aarch64_simd_valid_immediate and use of
23938 simd_immediate_info.
23939 (aarch64_output_scalar_simd_mov_immediate): Update call
23942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23943 Alan Hayward <alan.hayward@arm.com>
23944 David Sherwood <david.sherwood@arm.com>
23946 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23947 (mode_nunits): Likewise CONST_MODE_NUNITS.
23948 * machmode.def (ADJUST_NUNITS): Document.
23949 * genmodes.c (mode_data::need_nunits_adj): New field.
23950 (blank_mode): Update accordingly.
23951 (adj_nunits): New variable.
23952 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23954 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23955 listed in adj_nunits.
23956 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23957 listed in adj_nunits. Don't emit case statements for such modes.
23958 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23959 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23960 nothing if adj_nunits is nonnull.
23961 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23962 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23963 (emit_mode_fbit): Update use of print_maybe_const_decl.
23964 (emit_move_size): Likewise. Treat the array as non-const
23966 (emit_mode_adjustments): Handle adj_nunits.
23968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23970 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23971 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23972 (VECTOR_MODES): Use it.
23973 (make_vector_modes): Take the prefix as an argument.
23975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23976 Alan Hayward <alan.hayward@arm.com>
23977 David Sherwood <david.sherwood@arm.com>
23979 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23980 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23981 for MODE_VECTOR_BOOL.
23982 * machmode.def (VECTOR_BOOL_MODE): Document.
23983 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23984 (make_vector_bool_mode): New function.
23985 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23987 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23988 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23990 * stor-layout.c (int_mode_for_mode): Likewise.
23991 * tree.c (build_vector_type_for_mode): Likewise.
23992 * varasm.c (output_constant_pool_2): Likewise.
23993 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23994 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23995 for MODE_VECTOR_BOOL.
23996 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23997 of mode class checks.
23998 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23999 instead of a list of mode class checks.
24000 (expand_vector_scalar_condition): Likewise.
24001 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24004 Alan Hayward <alan.hayward@arm.com>
24005 David Sherwood <david.sherwood@arm.com>
24007 * machmode.h (mode_size): Change from unsigned short to
24009 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24010 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24011 or if measurement_type is not polynomial.
24012 (fixed_size_mode::includes_p): Check for constant-sized modes.
24013 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24014 return a poly_uint16 rather than an unsigned short.
24015 (emit_mode_size): Change the type of mode_size from unsigned short
24016 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24017 (emit_mode_adjustments): Cope with polynomial vector sizes.
24018 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24020 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24022 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24023 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24024 * caller-save.c (setup_save_areas): Likewise.
24025 (replace_reg_with_saved_mem): Likewise.
24026 * calls.c (emit_library_call_value_1): Likewise.
24027 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24028 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24029 (gen_lowpart_for_combine): Likewise.
24030 * convert.c (convert_to_integer_1): Likewise.
24031 * cse.c (equiv_constant, cse_insn): Likewise.
24032 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24033 (cselib_subst_to_values): Likewise.
24034 * dce.c (word_dce_process_block): Likewise.
24035 * df-problems.c (df_word_lr_mark_ref): Likewise.
24036 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24037 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24038 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24039 (rtl_for_decl_location): Likewise.
24040 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24041 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24042 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24043 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24044 (expand_expr_real_1): Likewise.
24045 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24046 (pad_below): Likewise.
24047 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24048 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24049 * ira.c (get_subreg_tracking_sizes): Likewise.
24050 * ira-build.c (ira_create_allocno_objects): Likewise.
24051 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24052 (ira_sort_regnos_for_alter_reg): Likewise.
24053 * ira-costs.c (record_operand_costs): Likewise.
24054 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24055 (resolve_simple_move): Likewise.
24056 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24057 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24058 (lra_constraints): Likewise.
24059 (CONST_POOL_OK_P): Reject variable-sized modes.
24060 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24061 (add_pseudo_to_slot, lra_spill): Likewise.
24062 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24063 * optabs-query.c (get_best_extraction_insn): Likewise.
24064 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24065 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24066 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24067 * recog.c (offsettable_address_addr_space_p): Likewise.
24068 * regcprop.c (maybe_mode_change): Likewise.
24069 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24070 * regrename.c (build_def_use): Likewise.
24071 * regstat.c (dump_reg_info): Likewise.
24072 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24073 (find_reloads, find_reloads_subreg_address): Likewise.
24074 * reload1.c (eliminate_regs_1): Likewise.
24075 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24076 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24077 (simplify_binary_operation_1, simplify_subreg): Likewise.
24078 * targhooks.c (default_function_arg_padding): Likewise.
24079 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24080 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24081 (verify_gimple_assign_ternary): Likewise.
24082 * tree-inline.c (estimate_move_cost): Likewise.
24083 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24084 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24085 (get_address_cost_ainc): Likewise.
24086 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24087 (vect_supportable_dr_alignment): Likewise.
24088 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24089 (vectorizable_reduction): Likewise.
24090 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24091 (vectorizable_operation, vectorizable_load): Likewise.
24092 * tree.c (build_same_sized_truth_vector_type): Likewise.
24093 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24094 * var-tracking.c (emit_note_insn_var_location): Likewise.
24095 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24096 (ADDR_VEC_ALIGN): Likewise.
24098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24099 Alan Hayward <alan.hayward@arm.com>
24100 David Sherwood <david.sherwood@arm.com>
24102 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24104 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24105 or if measurement_type is polynomial.
24106 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24107 * combine.c (make_extraction): Likewise.
24108 * dse.c (find_shift_sequence): Likewise.
24109 * dwarf2out.c (mem_loc_descriptor): Likewise.
24110 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24111 (extract_bit_field, extract_low_bits): Likewise.
24112 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24113 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24114 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24115 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24116 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24117 * reload.c (find_reloads): Likewise.
24118 * reload1.c (alter_reg): Likewise.
24119 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24120 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24121 * tree-if-conv.c (predicate_mem_writes): Likewise.
24122 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24123 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24124 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24125 * valtrack.c (dead_debug_insert_temp): Likewise.
24126 * varasm.c (mergeable_constant_section): Likewise.
24127 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24129 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24130 Alan Hayward <alan.hayward@arm.com>
24131 David Sherwood <david.sherwood@arm.com>
24133 * expr.c (expand_assignment): Cope with polynomial mode sizes
24134 when assigning to a CONCAT.
24136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24137 Alan Hayward <alan.hayward@arm.com>
24138 David Sherwood <david.sherwood@arm.com>
24140 * machmode.h (mode_precision): Change from unsigned short to
24142 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24144 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24145 or if measurement_type is not polynomial.
24146 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24147 in which the mode is already known to be a scalar_int_mode.
24148 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24149 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24151 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24152 for GET_MODE_PRECISION.
24153 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24154 for GET_MODE_PRECISION.
24155 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24157 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24158 (expand_field_assignment, make_extraction): Likewise.
24159 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24160 (get_last_value): Likewise.
24161 * convert.c (convert_to_integer_1): Likewise.
24162 * cse.c (cse_insn): Likewise.
24163 * expr.c (expand_expr_real_1): Likewise.
24164 * lra-constraints.c (simplify_operand_subreg): Likewise.
24165 * optabs-query.c (can_atomic_load_p): Likewise.
24166 * optabs.c (expand_atomic_load): Likewise.
24167 (expand_atomic_store): Likewise.
24168 * ree.c (combine_reaching_defs): Likewise.
24169 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24170 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24171 * tree.h (type_has_mode_precision_p): Likewise.
24172 * ubsan.c (instrument_si_overflow): Likewise.
24174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24175 Alan Hayward <alan.hayward@arm.com>
24176 David Sherwood <david.sherwood@arm.com>
24178 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24179 polynomial numbers of units.
24180 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24181 (valid_vector_subparts_p): New function.
24182 (build_vector_type): Remove temporary shim and take the number
24183 of units as a poly_uint64 rather than an int.
24184 (build_opaque_vector_type): Take the number of units as a
24185 poly_uint64 rather than an int.
24186 * tree.c (build_vector_from_ctor): Handle polynomial
24187 TYPE_VECTOR_SUBPARTS.
24188 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24189 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24190 (build_vector_from_val): If the number of units is variable,
24191 use build_vec_duplicate_cst for constant operands and
24192 VEC_DUPLICATE_EXPR otherwise.
24193 (make_vector_type): Remove temporary is_constant ().
24194 (build_vector_type, build_opaque_vector_type): Take the number of
24195 units as a poly_uint64 rather than an int.
24196 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24198 * cfgexpand.c (expand_debug_expr): Likewise.
24199 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24200 (store_constructor, expand_expr_real_1): Likewise.
24201 (const_scalar_mask_from_tree): Likewise.
24202 * fold-const-call.c (fold_const_reduction): Likewise.
24203 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24204 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24205 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24206 (fold_relational_const): Likewise.
24207 (native_interpret_vector): Likewise. Change the size from an
24208 int to an unsigned int.
24209 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24210 TYPE_VECTOR_SUBPARTS.
24211 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24212 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24213 duplicating a non-constant operand into a variable-length vector.
24214 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24215 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24216 * ipa-icf.c (sem_variable::equals): Likewise.
24217 * match.pd: Likewise.
24218 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24219 * print-tree.c (print_node): Likewise.
24220 * stor-layout.c (layout_type): Likewise.
24221 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24222 * tree-cfg.c (verify_gimple_comparison): Likewise.
24223 (verify_gimple_assign_binary): Likewise.
24224 (verify_gimple_assign_ternary): Likewise.
24225 (verify_gimple_assign_single): Likewise.
24226 * tree-pretty-print.c (dump_generic_node): Likewise.
24227 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24228 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24229 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24230 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24231 (vect_shift_permute_load_chain): Likewise.
24232 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24233 (expand_vector_condition, optimize_vector_constructor): Likewise.
24234 (lower_vec_perm, get_compute_type): Likewise.
24235 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24236 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24237 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24238 (vect_recog_mask_conversion_pattern): Likewise.
24239 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24240 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24241 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24242 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24243 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24244 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24245 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24246 (supportable_widening_operation): Likewise.
24247 (supportable_narrowing_operation): Likewise.
24248 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24250 * varasm.c (output_constant): Likewise.
24252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24253 Alan Hayward <alan.hayward@arm.com>
24254 David Sherwood <david.sherwood@arm.com>
24256 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24257 so that both the length == 3 and length != 3 cases set up their
24258 own permute vectors. Add comments explaining why we know the
24259 number of elements is constant.
24260 (vect_permute_load_chain): Likewise.
24262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24263 Alan Hayward <alan.hayward@arm.com>
24264 David Sherwood <david.sherwood@arm.com>
24266 * machmode.h (mode_nunits): Change from unsigned char to
24268 (ONLY_FIXED_SIZE_MODES): New macro.
24269 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24270 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24271 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24273 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24274 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24275 or if measurement_type is not polynomial.
24276 * genmodes.c (ZERO_COEFFS): New macro.
24277 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24279 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24280 Use ZERO_COEFFS when emitting initializers.
24281 * data-streamer.h (bp_pack_poly_value): New function.
24282 (bp_unpack_poly_value): Likewise.
24283 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24284 for GET_MODE_NUNITS.
24285 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24286 for GET_MODE_NUNITS.
24287 * tree.c (make_vector_type): Remove temporary shim and make
24288 the real function take the number of units as a poly_uint64
24289 rather than an int.
24290 (build_vector_type_for_mode): Handle polynomial nunits.
24291 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24292 * emit-rtl.c (const_vec_series_p_1): Likewise.
24293 (gen_rtx_CONST_VECTOR): Likewise.
24294 * fold-const.c (test_vec_duplicate_folding): Likewise.
24295 * genrecog.c (validate_pattern): Likewise.
24296 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24297 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24298 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24299 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24300 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24301 * rtlanal.c (subreg_get_info): Likewise.
24302 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24303 (vect_grouped_load_supported): Likewise.
24304 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24305 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24306 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24307 (simplify_const_unary_operation, simplify_binary_operation_1)
24308 (simplify_const_binary_operation, simplify_ternary_operation)
24309 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24310 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24311 instead of CONST_VECTOR_NUNITS.
24312 * varasm.c (output_constant_pool_2): Likewise.
24313 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24314 explicit-encoded elements in the XVEC for variable-length vectors.
24316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24318 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24321 Alan Hayward <alan.hayward@arm.com>
24322 David Sherwood <david.sherwood@arm.com>
24324 * coretypes.h (fixed_size_mode): Declare.
24325 (fixed_size_mode_pod): New typedef.
24326 * builtins.h (target_builtins::x_apply_args_mode)
24327 (target_builtins::x_apply_result_mode): Change type to
24328 fixed_size_mode_pod.
24329 * builtins.c (apply_args_size, apply_result_size, result_vector)
24330 (expand_builtin_apply_args_1, expand_builtin_apply)
24331 (expand_builtin_return): Update accordingly.
24333 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24335 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24336 * cselib.c (cselib_hash_rtx): Likewise.
24337 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24338 CONST_VECTOR encoding.
24340 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24341 Jeff Law <law@redhat.com>
24344 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24345 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24346 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24347 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24350 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24351 explicitly probe *sp in a noreturn function if there were any callee
24352 register saves or frame pointer is needed.
24354 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24357 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24358 BLKmode for ternary, binary or unary expressions.
24361 * var-tracking.c (delete_vta_debug_insn): New inline function.
24362 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24363 insns from get_insns () to NULL instead of each bb separately.
24364 Use delete_vta_debug_insn. No longer static.
24365 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24366 delete_vta_debug_insns callers.
24367 * rtl.h (delete_vta_debug_insns): Declare.
24368 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24369 instead of variable_tracking_main.
24371 2018-01-03 Martin Sebor <msebor@redhat.com>
24373 PR tree-optimization/83603
24374 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24375 arguments past the endof the argument list in functions declared
24376 without a prototype.
24377 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24378 Avoid checking when arguments are null.
24380 2018-01-03 Martin Sebor <msebor@redhat.com>
24383 * doc/extend.texi (attribute const): Fix a typo.
24384 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24385 issuing -Wsuggest-attribute for void functions.
24387 2018-01-03 Martin Sebor <msebor@redhat.com>
24389 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24390 offset_int::from instead of wide_int::to_shwi.
24391 (maybe_diag_overlap): Remove assertion.
24392 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24393 * gimple-ssa-sprintf.c (format_directive): Same.
24394 (parse_directive): Same.
24395 (sprintf_dom_walker::compute_format_length): Same.
24396 (try_substitute_return_value): Same.
24398 2018-01-03 Jeff Law <law@redhat.com>
24400 PR middle-end/83654
24401 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24402 non-constant residual for zero at runtime and avoid probing in
24403 that case. Reorganize code for trailing problem to mirror handling
24406 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24408 PR tree-optimization/83501
24409 * tree-ssa-strlen.c (get_string_cst): New.
24410 (handle_char_store): Call get_string_cst.
24412 2018-01-03 Martin Liska <mliska@suse.cz>
24414 PR tree-optimization/83593
24415 * tree-ssa-strlen.c: Include tree-cfg.h.
24416 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24417 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24418 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24420 (strlen_dom_walker::before_dom_children): Call
24421 gimple_purge_dead_eh_edges. Dump tranformation with details
24423 (strlen_dom_walker::before_dom_children): Update call by adding
24424 new argument cleanup_eh.
24425 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24427 2018-01-03 Martin Liska <mliska@suse.cz>
24430 * cif-code.def (VARIADIC_THUNK): New enum value.
24431 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24434 2018-01-03 Jan Beulich <jbeulich@suse.com>
24436 * sse.md (mov<mode>_internal): Tighten condition for when to use
24437 vmovdqu<ssescalarsize> for TI and OI modes.
24439 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24441 Update copyright years.
24443 2018-01-03 Martin Liska <mliska@suse.cz>
24446 * ipa-visibility.c (function_and_variable_visibility): Skip
24447 functions with noipa attribure.
24449 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24451 * gcc.c (process_command): Update copyright notice dates.
24452 * gcov-dump.c (print_version): Ditto.
24453 * gcov.c (print_version): Ditto.
24454 * gcov-tool.c (print_version): Ditto.
24455 * gengtype.c (create_file): Ditto.
24456 * doc/cpp.texi: Bump @copying's copyright year.
24457 * doc/cppinternals.texi: Ditto.
24458 * doc/gcc.texi: Ditto.
24459 * doc/gccint.texi: Ditto.
24460 * doc/gcov.texi: Ditto.
24461 * doc/install.texi: Ditto.
24462 * doc/invoke.texi: Ditto.
24464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24466 * vector-builder.h (vector_builder::m_full_nelts): Change from
24467 unsigned int to poly_uint64.
24468 (vector_builder::full_nelts): Update prototype accordingly.
24469 (vector_builder::new_vector): Likewise.
24470 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24471 (vector_builder::operator ==): Likewise.
24472 (vector_builder::finalize): Likewise.
24473 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24474 Take the number of elements as a poly_uint64 rather than an
24476 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24477 from unsigned int to poly_uint64.
24478 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24479 (vec_perm_indices::new_vector): Likewise.
24480 (vec_perm_indices::length): Likewise.
24481 (vec_perm_indices::nelts_per_input): Likewise.
24482 (vec_perm_indices::input_nelts): Likewise.
24483 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24484 number of elements per input as a poly_uint64 rather than an
24485 unsigned int. Use the original encoding for variable-length
24486 vectors, rather than clamping each individual element.
24487 For the second and subsequent elements in each pattern,
24488 clamp the step and base before clamping their sum.
24489 (vec_perm_indices::series_p): Handle polynomial element counts.
24490 (vec_perm_indices::all_in_range_p): Likewise.
24491 (vec_perm_indices_to_tree): Likewise.
24492 (vec_perm_indices_to_rtx): Likewise.
24493 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24494 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24495 (tree_vector_builder::new_binary_operation): Handle polynomial
24496 element counts. Return false if we need to know the number
24497 of elements at compile time.
24498 * fold-const.c (fold_vec_perm): Punt if the number of elements
24499 isn't known at compile time.
24501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24503 * vec-perm-indices.h (vec_perm_builder): Change element type
24504 from HOST_WIDE_INT to poly_int64.
24505 (vec_perm_indices::element_type): Update accordingly.
24506 (vec_perm_indices::clamp): Handle polynomial element_types.
24507 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24508 (vec_perm_indices::all_in_range_p): Likewise.
24509 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24511 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24512 polynomial vec_perm_indices element types.
24513 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24514 * fold-const.c (fold_vec_perm): Likewise.
24515 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24516 * tree-vect-generic.c (lower_vec_perm): Likewise.
24517 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24518 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24519 element type to HOST_WIDE_INT.
24521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24522 Alan Hayward <alan.hayward@arm.com>
24523 David Sherwood <david.sherwood@arm.com>
24525 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24526 rather than an int. Use plus_constant.
24527 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24528 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24531 Alan Hayward <alan.hayward@arm.com>
24532 David Sherwood <david.sherwood@arm.com>
24534 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24535 a HOST_WIDE_INT to a poly_int64.
24537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24538 Alan Hayward <alan.hayward@arm.com>
24539 David Sherwood <david.sherwood@arm.com>
24541 * calls.c (load_register_parameters): Cope with polynomial
24542 mode sizes. Require a constant size for BLKmode parameters
24543 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24544 forces a parameter to be padded at the lsb end in order to
24545 fill a complete number of words, require the parameter size
24546 to be ordered wrt UNITS_PER_WORD.
24548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24549 Alan Hayward <alan.hayward@arm.com>
24550 David Sherwood <david.sherwood@arm.com>
24552 * reload1.c (spill_stack_slot_width): Change element type
24553 from unsigned int to poly_uint64_pod.
24554 (alter_reg): Treat mode sizes as polynomial.
24556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24557 Alan Hayward <alan.hayward@arm.com>
24558 David Sherwood <david.sherwood@arm.com>
24560 * reload.c (complex_word_subreg_p): New function.
24561 (reload_inner_reg_of_subreg, push_reload): Use it.
24563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24564 Alan Hayward <alan.hayward@arm.com>
24565 David Sherwood <david.sherwood@arm.com>
24567 * lra-constraints.c (process_alt_operands): Reject matched
24568 operands whose sizes aren't ordered.
24569 (match_reload): Refer to this check here.
24571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24572 Alan Hayward <alan.hayward@arm.com>
24573 David Sherwood <david.sherwood@arm.com>
24575 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24576 that the mode size is in the set {1, 2, 4, 8, 16}.
24578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24579 Alan Hayward <alan.hayward@arm.com>
24580 David Sherwood <david.sherwood@arm.com>
24582 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24583 Use plus_constant instead of gen_rtx_PLUS.
24585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24586 Alan Hayward <alan.hayward@arm.com>
24587 David Sherwood <david.sherwood@arm.com>
24589 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24590 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24591 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24592 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24593 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24594 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24595 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24596 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24597 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24598 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24600 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24601 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24602 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24603 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24604 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24605 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24606 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24607 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24608 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24609 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24611 * expr.c (emit_move_resolve_push): Treat the input and result
24612 of PUSH_ROUNDING as a poly_int64.
24613 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24614 (emit_push_insn): Likewise.
24615 * lra-eliminations.c (mark_not_eliminable): Likewise.
24616 * recog.c (push_operand): Likewise.
24617 * reload1.c (elimination_effects): Likewise.
24618 * rtlanal.c (nonzero_bits1): Likewise.
24619 * calls.c (store_one_arg): Likewise. Require the padding to be
24620 known at compile time.
24622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24623 Alan Hayward <alan.hayward@arm.com>
24624 David Sherwood <david.sherwood@arm.com>
24626 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24627 Use plus_constant instead of gen_rtx_PLUS.
24629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24630 Alan Hayward <alan.hayward@arm.com>
24631 David Sherwood <david.sherwood@arm.com>
24633 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24634 rather than an int.
24636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24637 Alan Hayward <alan.hayward@arm.com>
24638 David Sherwood <david.sherwood@arm.com>
24640 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24641 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24642 via stack temporaries. Treat the mode size as polynomial too.
24644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24645 Alan Hayward <alan.hayward@arm.com>
24646 David Sherwood <david.sherwood@arm.com>
24648 * expr.c (expand_expr_real_2): When handling conversions involving
24649 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24650 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24651 as a poly_uint64 too.
24653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24654 Alan Hayward <alan.hayward@arm.com>
24655 David Sherwood <david.sherwood@arm.com>
24657 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24660 Alan Hayward <alan.hayward@arm.com>
24661 David Sherwood <david.sherwood@arm.com>
24663 * combine.c (can_change_dest_mode): Handle polynomial
24664 REGMODE_NATURAL_SIZE.
24665 * expmed.c (store_bit_field_1): Likewise.
24666 * expr.c (store_constructor): Likewise.
24667 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24668 and polynomial REGMODE_NATURAL_SIZE.
24669 (gen_lowpart_common): Likewise.
24670 * reginfo.c (record_subregs_of_mode): Likewise.
24671 * rtlanal.c (read_modify_subreg_p): Likewise.
24673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24674 Alan Hayward <alan.hayward@arm.com>
24675 David Sherwood <david.sherwood@arm.com>
24677 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24678 numbers of elements.
24680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24681 Alan Hayward <alan.hayward@arm.com>
24682 David Sherwood <david.sherwood@arm.com>
24684 * match.pd: Cope with polynomial numbers of vector elements.
24686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24687 Alan Hayward <alan.hayward@arm.com>
24688 David Sherwood <david.sherwood@arm.com>
24690 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24691 in a POINTER_PLUS_EXPR.
24693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24694 Alan Hayward <alan.hayward@arm.com>
24695 David Sherwood <david.sherwood@arm.com>
24697 * omp-simd-clone.c (simd_clone_subparts): New function.
24698 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24699 (ipa_simd_modify_function_body): Likewise.
24701 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24702 Alan Hayward <alan.hayward@arm.com>
24703 David Sherwood <david.sherwood@arm.com>
24705 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24706 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24707 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24708 (expand_vector_condition, vector_element): Likewise.
24709 (subparts_gt): New function.
24710 (get_compute_type): Use subparts_gt.
24711 (count_type_subparts): Delete.
24712 (expand_vector_operations_1): Use subparts_gt instead of
24713 count_type_subparts.
24715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24716 Alan Hayward <alan.hayward@arm.com>
24717 David Sherwood <david.sherwood@arm.com>
24719 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24720 (vect_compile_time_alias): ...this new function. Do the calculation
24721 on poly_ints rather than trees.
24722 (vect_prune_runtime_alias_test_list): Update call accordingly.
24724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24725 Alan Hayward <alan.hayward@arm.com>
24726 David Sherwood <david.sherwood@arm.com>
24728 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24730 (vect_schedule_slp_instance): Likewise.
24732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24733 Alan Hayward <alan.hayward@arm.com>
24734 David Sherwood <david.sherwood@arm.com>
24736 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24737 constant and extern definitions for variable-length vectors.
24738 (vect_get_constant_vectors): Note that the number of units
24739 is known to be constant.
24741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24742 Alan Hayward <alan.hayward@arm.com>
24743 David Sherwood <david.sherwood@arm.com>
24745 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24746 of units as polynomial. Choose between WIDE and NARROW based
24749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24750 Alan Hayward <alan.hayward@arm.com>
24751 David Sherwood <david.sherwood@arm.com>
24753 * tree-vect-stmts.c (simd_clone_subparts): New function.
24754 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24757 Alan Hayward <alan.hayward@arm.com>
24758 David Sherwood <david.sherwood@arm.com>
24760 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24761 vectors as polynomial. Use build_index_vector for
24762 IFN_GOMP_SIMD_LANE.
24764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24765 Alan Hayward <alan.hayward@arm.com>
24766 David Sherwood <david.sherwood@arm.com>
24768 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24769 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24770 for variable-length vectors.
24771 (vectorizable_mask_load_store): Treat the number of units as
24772 polynomial, asserting that it is constant if the condition has
24773 already been enforced.
24774 (vectorizable_store, vectorizable_load): Likewise.
24776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24777 Alan Hayward <alan.hayward@arm.com>
24778 David Sherwood <david.sherwood@arm.com>
24780 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24781 of units as polynomial. Punt if we can't tell at compile time
24782 which vector contains the final result.
24784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24785 Alan Hayward <alan.hayward@arm.com>
24786 David Sherwood <david.sherwood@arm.com>
24788 * tree-vect-loop.c (vectorizable_induction): Treat the number
24789 of units as polynomial. Punt on SLP inductions. Use an integer
24790 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24791 cast of such a series for variable-length floating-point
24794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24795 Alan Hayward <alan.hayward@arm.com>
24796 David Sherwood <david.sherwood@arm.com>
24798 * tree.h (build_index_vector): Declare.
24799 * tree.c (build_index_vector): New function.
24800 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24801 of units as polynomial, forcibly converting it to a constant if
24802 vectorizable_reduction has already enforced the condition.
24803 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24804 to create a {1,2,3,...} vector.
24805 (vectorizable_reduction): Treat the number of units as polynomial.
24806 Choose vectype_in based on the largest scalar element size rather
24807 than the smallest number of units. Enforce the restrictions
24810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24811 Alan Hayward <alan.hayward@arm.com>
24812 David Sherwood <david.sherwood@arm.com>
24814 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24815 number of units as polynomial.
24817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24818 Alan Hayward <alan.hayward@arm.com>
24819 David Sherwood <david.sherwood@arm.com>
24821 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24822 * target.def (autovectorize_vector_sizes): Return the vector sizes
24823 by pointer, using vector_sizes rather than a bitmask.
24824 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24825 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24826 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24828 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24829 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24830 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24831 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24832 * omp-general.c (omp_max_vf): Likewise.
24833 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24834 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24835 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24836 * tree-vect-slp.c (vect_slp_bb): Likewise.
24837 * doc/tm.texi: Regenerate.
24838 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24840 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24841 the vector size as a poly_uint64 rather than an unsigned int.
24842 (current_vector_size): Change from an unsigned int to a poly_uint64.
24843 (get_vectype_for_scalar_type): Update accordingly.
24844 * tree.h (build_truth_vector_type): Take the size and number of
24845 units as a poly_uint64 rather than an unsigned int.
24846 (build_vector_type): Add a temporary overload that takes
24847 the number of units as a poly_uint64 rather than an unsigned int.
24848 * tree.c (make_vector_type): Likewise.
24849 (build_truth_vector_type): Take the number of units as a poly_uint64
24850 rather than an unsigned int.
24852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24853 Alan Hayward <alan.hayward@arm.com>
24854 David Sherwood <david.sherwood@arm.com>
24856 * target.def (get_mask_mode): Take the number of units and length
24857 as poly_uint64s rather than unsigned ints.
24858 * targhooks.h (default_get_mask_mode): Update accordingly.
24859 * targhooks.c (default_get_mask_mode): Likewise.
24860 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24861 * doc/tm.texi: Regenerate.
24863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24864 Alan Hayward <alan.hayward@arm.com>
24865 David Sherwood <david.sherwood@arm.com>
24867 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24868 * omp-general.c (omp_max_vf): Likewise.
24869 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24870 (expand_omp_simd): Handle polynomial safelen.
24871 * omp-low.c (omplow_simd_context): Add a default constructor.
24872 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24873 (lower_rec_simd_input_clauses): Update accordingly.
24874 (lower_rec_input_clauses): Likewise.
24876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24877 Alan Hayward <alan.hayward@arm.com>
24878 David Sherwood <david.sherwood@arm.com>
24880 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24881 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24882 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24883 (vect_analyze_slp_cost): Likewise.
24884 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24885 (vect_model_load_cost): Likewise.
24887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24888 Alan Hayward <alan.hayward@arm.com>
24889 David Sherwood <david.sherwood@arm.com>
24891 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24892 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24893 from an unsigned int * to a poly_uint64_pod *.
24894 (calculate_unrolling_factor): New function.
24895 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24898 Alan Hayward <alan.hayward@arm.com>
24899 David Sherwood <david.sherwood@arm.com>
24901 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24902 from an unsigned int to a poly_uint64.
24903 (_loop_vec_info::slp_unrolling_factor): Likewise.
24904 (_loop_vec_info::vectorization_factor): Change from an int
24906 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24907 (vect_get_num_vectors): New function.
24908 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24909 (vect_get_num_copies): Use vect_get_num_vectors.
24910 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24911 to an unsigned int *.
24912 (vect_analyze_data_refs): Change min_vf from an int * to a
24914 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24915 than an unsigned HOST_WIDE_INT.
24916 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24917 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24918 to an unsigned int *.
24919 (vect_analyze_data_ref_dependences): Likewise.
24920 (vect_compute_data_ref_alignment): Handle polynomial vf.
24921 (vect_enhance_data_refs_alignment): Likewise.
24922 (vect_prune_runtime_alias_test_list): Likewise.
24923 (vect_shift_permute_load_chain): Likewise.
24924 (vect_supportable_dr_alignment): Likewise.
24925 (dependence_distance_ge_vf): Take the vectorization factor as a
24926 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24927 (vect_analyze_data_refs): Change min_vf from an int * to a
24929 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24930 vfm1 as a poly_uint64 rather than an int. Make the same change
24931 for the returned bound_scalar.
24932 (vect_gen_vector_loop_niters): Handle polynomial vf.
24933 (vect_do_peeling): Likewise. Update call to
24934 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24935 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24937 * tree-vect-loop.c (vect_determine_vectorization_factor)
24938 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24939 (vect_get_known_peeling_cost): Likewise.
24940 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24941 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24942 (vect_transform_loop): Likewise. Use the lowest possible VF when
24943 updating the upper bounds of the loop.
24944 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24945 rather than an int.
24946 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24947 polynomial unroll factors.
24948 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24949 (vect_make_slp_decision): Likewise.
24950 (vect_supported_load_permutation_p): Likewise, and polynomial
24952 (vect_analyze_slp_cost): Handle polynomial vf.
24953 (vect_slp_analyze_node_operations): Likewise.
24954 (vect_slp_analyze_bb_1): Likewise.
24955 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24956 than an unsigned HOST_WIDE_INT.
24957 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24958 (vectorizable_load): Handle polynomial vf.
24959 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24961 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24964 Alan Hayward <alan.hayward@arm.com>
24965 David Sherwood <david.sherwood@arm.com>
24967 * match.pd: Handle bit operations involving three constants
24968 and try to fold one pair.
24970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24972 * tree-vect-loop-manip.c: Include gimple-fold.h.
24973 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24974 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24975 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24976 Add a path that uses a step of VF instead of 1, but disable it
24978 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24979 and niters_no_overflow parameters. Update calls to
24980 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24981 Create a new SSA name if the latter choses to use a ste other
24982 than zero, and return it via niters_vector_mult_vf_var.
24983 * tree-vect-loop.c (vect_transform_loop): Update calls to
24984 vect_do_peeling, vect_gen_vector_loop_niters and
24985 slpeel_make_loop_iterate_ntimes.
24986 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24987 (vect_gen_vector_loop_niters): Update declarations after above changes.
24989 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24991 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24992 128-bit round to integer instructions.
24993 (ceil<mode>2): Likewise.
24994 (btrunc<mode>2): Likewise.
24995 (round<mode>2): Likewise.
24997 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24999 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25000 unaligned VSX load/store on P8/P9.
25001 (expand_block_clear): Allow the use of unaligned VSX
25002 load/store on P8/P9.
25004 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25006 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25008 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25009 swap associated with both a load and a store.
25011 2018-01-02 Andrew Waterman <andrew@sifive.com>
25013 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25014 * config/riscv/riscv.md (clear_cache): Use it.
25016 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25018 * web.c: Remove out-of-date comment.
25020 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25022 * expr.c (fixup_args_size_notes): Check that any existing
25023 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25024 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25025 (emit_single_push_insn): ...here.
25027 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25029 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25030 (const_vector_encoded_nelts): New function.
25031 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25032 (const_vector_int_elt, const_vector_elt): Declare.
25033 * emit-rtl.c (const_vector_int_elt_1): New function.
25034 (const_vector_elt): Likewise.
25035 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25036 of CONST_VECTOR_ELT.
25038 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25040 * expr.c: Include rtx-vector-builder.h.
25041 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25042 directly on the tree encoding.
25043 (const_vector_from_tree): Likewise.
25044 * optabs.c: Include rtx-vector-builder.h.
25045 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25046 sequence of "u" values.
25047 * vec-perm-indices.c: Include rtx-vector-builder.h.
25048 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25049 directly on the vec_perm_indices encoding.
25051 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25053 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25054 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25055 * rtx-vector-builder.h: New file.
25056 * rtx-vector-builder.c: Likewise.
25057 * rtl.h (rtx_def::u2): Add a const_vector field.
25058 (CONST_VECTOR_NPATTERNS): New macro.
25059 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25060 (CONST_VECTOR_DUPLICATE_P): Likewise.
25061 (CONST_VECTOR_STEPPED_P): Likewise.
25062 (CONST_VECTOR_ENCODED_ELT): Likewise.
25063 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25064 (unwrap_const_vec_duplicate): Likewise.
25065 (const_vec_series_p): Check for a non-duplicated vector encoding.
25066 Say that the function only returns true for integer vectors.
25067 * emit-rtl.c: Include rtx-vector-builder.h.
25068 (gen_const_vec_duplicate_1): Delete.
25069 (gen_const_vector): Call gen_const_vec_duplicate instead of
25070 gen_const_vec_duplicate_1.
25071 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25072 (gen_const_vec_duplicate): Use rtx_vector_builder.
25073 (gen_const_vec_series): Likewise.
25074 (gen_rtx_CONST_VECTOR): Likewise.
25075 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25076 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25077 Build a new vector rather than modifying a CONST_VECTOR in-place.
25078 (handle_special_swappables): Update call accordingly.
25079 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25080 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25081 Build a new vector rather than modifying a CONST_VECTOR in-place.
25082 (handle_special_swappables): Update call accordingly.
25084 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25086 * simplify-rtx.c (simplify_const_binary_operation): Use
25087 CONST_VECTOR_ELT instead of XVECEXP.
25089 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25091 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25092 the selector elements to be different from the data elements
25093 if the selector is a VECTOR_CST.
25094 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25095 ssizetype for the selector.
25097 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25099 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25100 before testing each element individually.
25101 * tree-vect-generic.c (lower_vec_perm): Likewise.
25103 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25105 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25106 * selftest-run-tests.c (selftest::run_tests): Call it.
25107 * vector-builder.h (vector_builder::operator ==): New function.
25108 (vector_builder::operator !=): Likewise.
25109 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25110 (vec_perm_indices::all_from_input_p): New function.
25111 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25112 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25113 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25114 instead of reading the VECTOR_CST directly. Detect whether both
25115 vector inputs are the same before constructing the vec_perm_indices,
25116 and update the number of inputs argument accordingly. Use the
25117 utility functions added above. Only construct sel2 if we need to.
25119 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25121 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25122 the broadcast of the low byte.
25123 (expand_mult_highpart): Use an explicit encoding for the permutes.
25124 * optabs-query.c (can_mult_highpart_p): Likewise.
25125 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25126 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25127 (vectorizable_bswap): Likewise.
25128 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25129 explicit encoding for the power-of-2 permutes.
25130 (vect_permute_store_chain): Likewise.
25131 (vect_grouped_load_supported): Likewise.
25132 (vect_permute_load_chain): Likewise.
25134 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25136 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25137 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25138 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25139 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25140 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25141 (vect_gen_perm_mask_any): Likewise.
25143 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25145 * int-vector-builder.h: New file.
25146 * vec-perm-indices.h: Include int-vector-builder.h.
25147 (vec_perm_indices): Redefine as an int_vector_builder.
25148 (auto_vec_perm_indices): Delete.
25149 (vec_perm_builder): Redefine as a stand-alone class.
25150 (vec_perm_indices::vec_perm_indices): New function.
25151 (vec_perm_indices::clamp): Likewise.
25152 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25153 (vec_perm_indices::new_vector): New function.
25154 (vec_perm_indices::new_expanded_vector): Update for new
25155 vec_perm_indices class.
25156 (vec_perm_indices::rotate_inputs): New function.
25157 (vec_perm_indices::all_in_range_p): Operate directly on the
25158 encoded form, without computing elided elements.
25159 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25160 encoding. Update for new vec_perm_indices class.
25161 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25162 the given vec_perm_builder.
25163 (expand_vec_perm_var): Update vec_perm_builder constructor.
25164 (expand_mult_highpart): Use vec_perm_builder instead of
25165 auto_vec_perm_indices.
25166 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25167 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25168 or double series encoding as appropriate.
25169 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25170 vec_perm_indices instead of auto_vec_perm_indices.
25171 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25172 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25173 (vect_permute_store_chain): Likewise.
25174 (vect_grouped_load_supported): Likewise.
25175 (vect_permute_load_chain): Likewise.
25176 (vect_shift_permute_load_chain): Likewise.
25177 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25178 (vect_transform_slp_perm_load): Likewise.
25179 (vect_schedule_slp_instance): Likewise.
25180 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25181 (vectorizable_mask_load_store): Likewise.
25182 (vectorizable_bswap): Likewise.
25183 (vectorizable_store): Likewise.
25184 (vectorizable_load): Likewise.
25185 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25186 vec_perm_indices instead of auto_vec_perm_indices. Use
25187 tree_to_vec_perm_builder to read the vector from a tree.
25188 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25189 vec_perm_builder instead of a vec_perm_indices.
25190 (have_whole_vector_shift): Use vec_perm_builder and
25191 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25192 truncation to calc_vec_perm_mask_for_shift.
25193 (vect_create_epilog_for_reduction): Likewise.
25194 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25195 from auto_vec_perm_indices to vec_perm_indices.
25196 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25197 instead of changing individual elements.
25198 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25199 the vector in d.perm.
25200 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25201 from auto_vec_perm_indices to vec_perm_indices.
25202 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25203 instead of changing individual elements.
25204 (arm_vectorize_vec_perm_const): Use new_vector to install
25205 the vector in d.perm.
25206 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25207 Update vec_perm_builder constructor.
25208 (rs6000_expand_interleave): Likewise.
25209 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25210 (rs6000_expand_interleave): Likewise.
25212 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25214 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25215 to qimode could truncate the indices.
25216 * optabs.c (expand_vec_perm_var): Likewise.
25218 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25220 * Makefile.in (OBJS): Add vec-perm-indices.o.
25221 * vec-perm-indices.h: New file.
25222 * vec-perm-indices.c: Likewise.
25223 * target.h (vec_perm_indices): Replace with a forward class
25225 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25226 * optabs.h: Include vec-perm-indices.h.
25227 (expand_vec_perm): Delete.
25228 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25229 (expand_vec_perm_const): Declare.
25230 * target.def (vec_perm_const_ok): Replace with...
25231 (vec_perm_const): ...this new hook.
25232 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25233 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25234 * doc/tm.texi: Regenerate.
25235 * optabs.def (vec_perm_const): Delete.
25236 * doc/md.texi (vec_perm_const): Likewise.
25237 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25238 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25239 expand_vec_perm for constant permutation vectors. Assert that
25240 the mode of variable permutation vectors is the integer equivalent
25241 of the mode that is being permuted.
25242 * optabs-query.h (selector_fits_mode_p): Declare.
25243 * optabs-query.c: Include vec-perm-indices.h.
25244 (selector_fits_mode_p): New function.
25245 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25246 is defined, instead of checking whether the vec_perm_const_optab
25247 exists. Use targetm.vectorize.vec_perm_const instead of
25248 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25249 fit in the vector mode before using a variable permute.
25250 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25251 vec_perm_indices instead of an rtx.
25252 (expand_vec_perm): Replace with...
25253 (expand_vec_perm_const): ...this new function. Take the selector
25254 as a vec_perm_indices rather than an rtx. Also take the mode of
25255 the selector. Update call to shift_amt_for_vec_perm_mask.
25256 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25257 Use vec_perm_indices::new_expanded_vector to expand the original
25258 selector into bytes. Check whether the indices fit in the vector
25259 mode before using a variable permute.
25260 (expand_vec_perm_var): Make global.
25261 (expand_mult_highpart): Use expand_vec_perm_const.
25262 * fold-const.c: Includes vec-perm-indices.h.
25263 * tree-ssa-forwprop.c: Likewise.
25264 * tree-vect-data-refs.c: Likewise.
25265 * tree-vect-generic.c: Likewise.
25266 * tree-vect-loop.c: Likewise.
25267 * tree-vect-slp.c: Likewise.
25268 * tree-vect-stmts.c: Likewise.
25269 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25271 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25272 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25273 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25274 (aarch64_vectorize_vec_perm_const): ...this new function.
25275 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25276 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25277 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25278 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25279 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25280 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25281 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25283 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25284 check for NEON modes.
25285 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25286 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25287 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25288 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25290 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25291 the old VEC_PERM_CONST conditions.
25292 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25293 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25294 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25295 (ia64_vectorize_vec_perm_const_ok): Merge into...
25296 (ia64_vectorize_vec_perm_const): ...this new function.
25297 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25298 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25299 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25300 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25301 * config/mips/mips.c (mips_expand_vec_perm_const)
25302 (mips_vectorize_vec_perm_const_ok): Merge into...
25303 (mips_vectorize_vec_perm_const): ...this new function.
25304 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25305 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25306 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25307 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25308 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25309 (rs6000_expand_vec_perm_const): Delete.
25310 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25312 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25313 (altivec_expand_vec_perm_const_le): Take each operand individually.
25314 Operate on constant selectors rather than rtxes.
25315 (altivec_expand_vec_perm_const): Likewise. Update call to
25316 altivec_expand_vec_perm_const_le.
25317 (rs6000_expand_vec_perm_const): Delete.
25318 (rs6000_vectorize_vec_perm_const_ok): Delete.
25319 (rs6000_vectorize_vec_perm_const): New function.
25320 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25321 an element count and rtx array.
25322 (rs6000_expand_extract_even): Update call accordingly.
25323 (rs6000_expand_interleave): Likewise.
25324 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25325 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25326 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25327 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25328 (rs6000_expand_vec_perm_const): Delete.
25329 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25330 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25331 (altivec_expand_vec_perm_const_le): Take each operand individually.
25332 Operate on constant selectors rather than rtxes.
25333 (altivec_expand_vec_perm_const): Likewise. Update call to
25334 altivec_expand_vec_perm_const_le.
25335 (rs6000_expand_vec_perm_const): Delete.
25336 (rs6000_vectorize_vec_perm_const_ok): Delete.
25337 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25338 reference to the SPE evmerge intructions.
25339 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25340 an element count and rtx array.
25341 (rs6000_expand_extract_even): Update call accordingly.
25342 (rs6000_expand_interleave): Likewise.
25343 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25344 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25346 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25348 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25350 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25351 vector mode and that that mode matches the mode of the data
25353 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25354 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25355 directly using expand_vec_perm_1 when forcing selectors into
25357 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25359 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25361 * optabs-query.h (can_vec_perm_p): Delete.
25362 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25363 * optabs-query.c (can_vec_perm_p): Split into...
25364 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25365 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25366 particular selector is valid.
25367 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25368 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25369 (vect_grouped_load_supported): Likewise.
25370 (vect_shift_permute_load_chain): Likewise.
25371 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25372 (vect_transform_slp_perm_load): Likewise.
25373 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25374 (vectorizable_bswap): Likewise.
25375 (vect_gen_perm_mask_checked): Likewise.
25376 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25377 implementations of variable permutation vectors into account
25378 when deciding which selector to use.
25379 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25380 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25381 with a false third argument.
25382 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25383 to test whether the constant selector is valid and can_vec_perm_var_p
25384 to test whether a variable selector is valid.
25386 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25388 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25389 * optabs-query.c (can_vec_perm_p): Likewise.
25390 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25391 instead of vec_perm_indices.
25392 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25393 (vect_gen_perm_mask_checked): Likewise,
25394 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25395 (vect_gen_perm_mask_checked): Likewise,
25397 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25399 * optabs-query.h (qimode_for_vec_perm): Declare.
25400 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25401 (qimode_for_vec_perm): ...this new function.
25402 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25404 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25406 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25407 does not have a conditional at the top.
25409 2018-01-02 Richard Biener <rguenther@suse.de>
25411 * ipa-inline.c (big_speedup_p): Fix expression.
25413 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25416 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25419 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25423 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25424 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25425 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25426 cond_taken_branch_cost 3->4.
25428 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25430 PR tree-optimization/83581
25431 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25432 TODO_cleanup_cfg if any changes have been made.
25434 PR middle-end/83608
25435 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25436 convert_modes if target mode has the right side, but different mode
25439 PR middle-end/83609
25440 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25441 last argument when extracting from CONCAT. If either from_real or
25442 from_imag is NULL, use expansion through memory. If result is not
25443 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25444 the parts directly to inner mode, if even that fails, use expansion
25447 PR middle-end/83623
25448 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25449 check for bswap in mode rather than HImode and use that in expand_unop
25452 Copyright (C) 2018 Free Software Foundation, Inc.
25454 Copying and distribution of this file, with or without modification,
25455 are permitted in any medium without royalty provided the copyright
25456 notice and this notice are preserved.