1 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10 PR tree-optimization/87287
11 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
12 X % C == 0 to X % (unsigned) C == 0 optimization to ...
13 * match.pd (X % C == 0): ... here. New optimization.
15 2018-09-12 Jakub Jelinek <jakub@redhat.com>
18 * expr.h (maybe_optimize_mod_cmp): Declare.
19 * expr.c (mod_inv): New function.
20 (maybe_optimize_mod_cmp): New function.
21 (do_store_flag): Use it.
22 * cfgexpand.c (expand_gimple_cond): Likewise.
24 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
25 Julian Brown <julian@codesourcery.com>
28 * gimplify.c (gimplify_scan_omp_clauses): Set
29 target_firstprivatize_array_bases in OpenACC parallel and kernels
30 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
33 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
35 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
36 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
38 2018-09-12 Richard Biener <rguenther@suse.de>
40 PR tree-optimization/87280
41 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
42 edge but unreachable target.
43 (do_rpo_vn): For conservatively handling a PHI only mark
44 the backedge executable but not the block reachable.
46 2018-09-12 Richard Biener <rguenther@suse.de>
48 PR tree-optimization/87266
49 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
52 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
54 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
56 ("trunc<BFP:mode><DFP_ALL:mode>2")
57 ("trunc<DFP_ALL:mode><BFP:mode>2")
58 ("extend<BFP:mode><DFP_ALL:mode>2")
59 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
60 according to the target operand type.
62 2018-09-12 Jakub Jelinek <jakub@redhat.com>
63 Andreas Krebbel <krebbel@linux.ibm.com>
65 PR tree-optimization/86844
66 * gimple-ssa-store-merging.c
67 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
68 there are any overlapping stores in between them, make sure they are
69 also coalesced or we give up completely.
71 2018-09-12 Jakub Jelinek <jakub@redhat.com>
74 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
75 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
77 2018-09-12 Tom de Vries <tdevries@suse.de>
79 * common.opt (gdescribe-dies): Add option.
80 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
81 attribute for artifical and nameless decls.
82 (dwarf2out_register_external_die): Add description attribute to
83 external reference die.
84 (add_desc_attribute): New functions.
85 (gen_subprogram_die): Add description attribute to
86 DW_TAG_call_site_parameter.
87 * tree-pretty-print.c (print_generic_expr_to_str): New function.
88 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
89 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
91 (@item -gdescribe-dies): Add.
93 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
95 * tree-vrp.c (vrp_shift_undefined_p): Remove.
96 (extract_range_from_binary_expr_1: Call
97 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
98 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
101 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
103 * gimple-ssa-warn-alloca.c
104 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
105 field for ALLOCA_BOUND_*_LARGE.
107 2018-09-11 Nathan Sidwell <nathan@acm.org>
109 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
111 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
113 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
114 for clobbers. Remove obsolete comment.
116 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
118 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
119 mpxchk, mpxld and mpxst types.
120 (define_attr length_immediate): Remove all processing of mpx types.
121 (define_attr prefix_0f): Ditto.
122 (define_attr memory): Ditto.
124 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
126 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
127 (log<mode>2): Change operand 1 predicate to general_operand.
128 Extend operand 1 to XFmode and generate logxf3 insn.
129 (log10<mode>2): Change operand 1 predicate to general_operand.
130 Extend operand 1 to XFmode and generate log10xf3 insn.
131 (log2<mode>2): Change operand 1 predicate to general_operand.
132 Extend operand 1 to XFmode and generate log2xf3 insn.
133 (fyl2xp1_extend<mode>xf3_i387): Remove.
134 (log1p<mode>2): Change operand 1 predicate to general_operand.
135 Extend operand 1 to XFmode and generate log1pxf3 insn.
136 (fxtract_extend<mode>xf3_i387): Remove.
137 (logb<mode>2): Change operand 1 predicate to general_operand.
138 Extend operand 1 to XFmode and generate logbxf3 insn.
139 (ilogb<mode>2): Change operand 1 predicate to general_operand.
140 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
141 (significand<mode>2): Change operand 1 predicate to general_operand.
142 Extend operand 1 to XFmode and generate significandxf3 insn.
144 2018-09-11 Nathan Sidwell <nathan@acm.org>
146 * gcc.c (perror_with_name, pfatal_with_name): Delete.
147 (load_specs): Use fatal_error.
148 (DELETE_IF_ORDINARY, process_command): Use error.
149 (execute, run_attempt): Use fatal_error.
151 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
153 * diagnostic-core.h (sorry_at): New prototype.
154 * diagnostic.c (sorry_at): New function.
156 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
158 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
159 by zero as VR_UNDEFINED.
161 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
163 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
164 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
165 (<sincos>mode2): New expander.
166 (sincos_extend<mode>xf3_i387): Remove insn pattern.
167 (sincos -> sin, cos splitters): Remove splitter patterns.
168 (sincos<mode>3): Change operand 2 predicate to general_operand.
169 Extend operand 2 to XFmode and generate sincosxf3 insn.
170 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
171 Change operand 3 predicate to const1_operand.
172 (fptan_extend<mode>xf4_i387): Remove insn pattern.
173 (tanxf2): Update operands in the call to fptanxf4_i387.
174 (tan<mode>2): Change operand 1 predicate to general_operand.
175 Extend operand 1 to XFmode and generate tanxf3 insn.
176 (atan2xf3): Rename from *fpatanxf3_i387.
177 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
178 (atan2xf3): Remove expander.
179 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
180 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
181 (atan<mode>2): Change operand 1 predicate to general_operand.
182 Extend operand 1 to XFmode and generate atanxf3 insn.
184 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
186 * config/i386/i386.md (x87/SSE constant load splitter): Use
187 memory_operand instead of nonimmediate_operand for input operand
190 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
192 * config/i386/i386.md (float partial SSE register stall splitter): Move
193 splitter near its instruction pattern.
194 (float_extend partial SSE register stall splitter): Ditto.
195 (float_truncate partial SSE register stall splitter): Ditto.
197 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
200 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
201 to speculation_safe_value_not_needed.
204 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
205 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
206 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
207 leaf_function_p, instead use has_hard_reg_initial_val.
209 2018-09-09 Nathan Sidwell <nathan@acm.org>
211 * gcc.h (pfatal_with_name): Don't declare here.
212 * gcc.c (pfatal_with_name): Make static.
214 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
216 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
219 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
221 PR rtl-optimization/85458
222 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
223 priority hook to reduce the priority of EXPR.
225 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
227 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
228 DImode for x87 on 32bit targets. Conditionally disable x87 modes
229 with X87_ENABLE_FLOAT. Remove preparation code.
230 (*float<SWI48:mode><MODEF:mode>2): Rename from
231 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
232 math using "enabled" attribute.
233 (*floatdi<MODEF:mode>2_i387): Rename from
234 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
235 enable for 32bit targets only.
236 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
238 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
239 as operand 1 predicate. Rewrite as define_insn_and_split.
240 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
242 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
244 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
245 to fallthru to FLOAT case.
247 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
250 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
251 around folding of vec_sl to handle out of range shift values.
253 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
255 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
256 Update callers to gen_fix_trunc<mode>_i387_fisttp
257 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
258 nonimmediate_operand.
259 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
260 and corresponding splitters.
261 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
262 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
263 (fix_truncdi_i387_with_temp): Remove insn pattern
264 and corresponding splitters.
265 (fix_trunc<mode>_i387): Change operand 0 predicate to
266 nonimmediate_operand.
267 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
268 and corresponding splitters.
269 (*fistdi2_1): Remove.
271 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
272 (lrintxfdi2): Remove expander. Reimplement as define_insn.
273 (*fist<mode>2_1): Remove.
274 (fist<mode>2): Ditto.
275 (fist<mode>2_with_temp): Remove insn pattern and corresponding
277 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
278 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
279 (fistdi2_<rounding>): Change operand 0 predicate to
280 nonimmediate_operand.
281 (fistdi2_<rounding>_with_temp): Remove insn pattern
282 and corresponding splitters.
283 (fist<mode>2_<rounding>): Change operand 0 predicate to
284 nonimmediate_operand.
285 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
286 and corresponding splitters.
288 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
290 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
292 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
295 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
297 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
298 early gimple folding of vec_splat().
299 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
300 * gimple-fold.h: Add an extern define for tree_vec_extract().
302 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
304 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
305 wrappers around TREE_TYPE comparisons.
307 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
310 * config/s390/predicates.md: Add nonsym_memory_operand.
311 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
312 contains a SYMBOL_REF, load it into an intermediate pseudo.
313 (s390_emit_compare_and_swap): Legitimize operand.
314 * config/s390/s390.md: Use the new nonsym_memory_operand
315 with UNSPECV_CAS patterns.
317 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
320 * config/s390/s390-passes.def: New file.
321 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
323 (make_pass_s390_early_mach): Add declaration.
324 * config/s390/s390.c (make_pass_s390_early_mach):
325 (s390_option_override): Remove dynamic registration.
326 * config/s390/t-s390: Add s390-passes.def.
328 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
330 * config/s390/s390.c (s390_decompose_constant_pool_ref):
331 Remove UNSPEC_LTREL_BASE check.
332 (annotate_constant_pool_refs): Likewise.
333 (find_constant_pool_ref): Likewise.
334 (find_ltrel_base): Removed.
335 (replace_ltrel_base): Removed.
336 (s390_mainpool_finish): Remove replace_ltrel_base call.
337 (s390_chunkify_start): Remove pending LTREL_BASE logic.
338 (s390_chunkify_finish): Remove replace_ltrel_base call.
339 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
341 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
344 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
345 to speculation_safe_value_not_needed.
347 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
348 Bernd Schmidt <bernds_cb1@t-online.de>
350 * config/nvptx/nvptx-opts.h: New file.
351 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
352 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
354 (TARGET_SM35): New macro.
355 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
357 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
360 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
362 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
364 * config/i386/i386.md (truncdfsf2): Remove expander.
365 (truncdfsf2_with_temp): Ditto.
366 (truncxf<mode>2): Ditto.
367 (*truncdfsf_fast_mixed): Remove insn pattern.
368 (*truncdfsf_fast_i387): Ditto.
369 (*truncdfsf_mixed): Ditto.
370 (*truncdfsf_i387): Ditto.
371 (*truncdfsf2_i387_1): Ditto.
372 (*truncxfsf2_mixed): Ditto.
373 (*truncxfdf2_mixed): Ditto.
374 (*truncxf<mode>2_i387_noop): Ditto. Update callers
375 to call gen_truncxf<mode>2 instead.
376 (*truncxf<mode>2_i387): Remove.
377 (reg->reg splitters): Remove splitter pattern.
378 (reg->mem splitters): Ditto.
380 (truncdfsf2): New insn pattern.
381 (truncxf<mode>2): Ditto.
383 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
385 * tree-ssa-math-opts.c (is_mult_by): New function.
386 (is_square_of): Use the above.
387 (optimize_recip_sqrt): New function.
388 (pass_cse_reciprocals::execute): Use the above.
390 2018-09-05 Richard Biener <rguenther@suse.de>
393 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
394 to zero-init the emplaced vec.
396 2018-09-05 Martin Liska <mliska@suse.cz>
398 PR tree-optimization/87205
399 * tree-switch-conversion.c (pass_lower_switch::execute):
400 Group cases for switch statements.
402 2018-09-05 Richard Biener <rguenther@suse.de>
404 PR tree-optimization/87217
405 * tree-ssa-sccvn.c (vuse_valueize): New.
406 (vn_reference_lookup_pieces): Use it.
407 (vn_reference_lookup): Likewise.
409 2018-09-05 Nathan Sidwell <nathan@acm.org>
412 * stor-layout.c (place_field): Scan forwards to check last
413 bitfield when ms_bitfield_placement is in effect.
415 2018-09-05 Richard Biener <rguenther@suse.de>
418 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
421 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
422 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
424 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
425 * config.gcc (extra_objs): Build it.
426 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
428 * config/aarch64/aarch64-passes.def
429 (pass_tag_collision_avoidance): New pass.
430 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
431 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
432 (aarch64_classify_address): Remove static qualifier.
433 (aarch64_address_info, aarch64_address_type): Move to...
434 * config/aarch64/aarch64-protos.h: ... here.
435 (make_pass_tag_collision_avoidance): New function.
436 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
439 2018-09-05 Martin Liska <mliska@suse.cz>
441 * doc/gcov.texi: Update documentation of humar
443 * gcov.c (format_count): Print one decimal place, it provides
444 more fine number of situations like '1G' vs. '1.4G'.
446 2018-09-05 Martin Liska <mliska@suse.cz>
449 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
450 * optc-gen.awk: Allow 'Var' for Deprecated options in order
451 to generate a MASK value.
453 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
456 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
457 if frame pointer isn't used.
458 (compute_frame_pointer_to_fb_displacement): Likewise.
460 2018-09-04 Jakub Jelinek <jakub@redhat.com>
463 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
464 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
465 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
466 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
467 and OPTION_MASK_ISA_XSAVEC_UNSET.
469 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
471 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
472 XOR operations in NAND case.
474 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
476 * wide-int-range.cc (wide_int_range_convert): New.
477 * wide-int-range.h (wide_int_range_convert): New.
478 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
479 code into wide_int_range_convert.
480 (extract_range_into_wide_ints): Do not munge anti range constants
481 into the entire domain. Just return the range back.
483 2018-09-04 Martin Liska <mliska@suse.cz>
485 * genmatch.c (output_line_directive): Add new argument
487 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
489 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
491 * doc/invoke.texi (Option Summary): Add whitespace.
493 * doc/invoke.texi (Option Summary): Add -Waligned-new.
495 2018-09-04 Richard Biener <rguenther@suse.de>
497 PR tree-optimization/87211
498 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
499 backedge value we're supposed to treat as VARYING also number
500 the PHI to VARYING in case it got a different value-number already.
502 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
504 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
505 (extract_range_from_binary_expr_1): Do not call
506 vrp_can_optimize_bit_op.
507 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
509 (wide_int_range_get_mask_and_bounds): New.
510 (wide_int_range_optimize_bit_op): New.
511 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
512 (wide_int_range_bit_and): Same.
513 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
514 (wide_int_range_optimize_bit_op): New.
515 (wide_int_range_get_mask_and_bounds): New.
517 2018-09-04 Richard Biener <rguenther@suse.de>
519 PR tree-optimization/87176
520 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
521 variable. When value-numbering a virtual PHI node make sure
522 to not value-number to the backedge value.
524 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
526 * doc/extend.texi (Long Long, Hex Floats): Document support for
527 long long and hex floats in more recent versions of ISO C++.
529 2018-09-03 Richard Biener <rguenther@suse.de>
531 PR tree-optimization/87177
532 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
535 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
537 * bb-reorder.c (edge_order): Convert to C-qsort-style
538 tri-state comparator.
539 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
541 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
543 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
544 tri-state comparator.
545 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
547 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
549 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
550 (mergesort): ... here as maximum count for using netsort.
551 (gcc_qsort): Set nlim to 3 if stable sort is requested.
552 (gcc_stablesort): New.
553 * system.h (gcc_stablesort): Declare.
555 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
557 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
558 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
559 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
561 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
563 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
564 lxsdx and stxsdx alternatives.
565 (*mov<mode>_hardfloat64): Ditto.
566 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
568 2018-09-03 Richard Biener <rguenther@suse.de>
570 PR tree-optimization/87200
571 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
574 2018-09-03 Martin Liska <mliska@suse.cz>
576 PR tree-optimization/87201
577 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
578 Fix parenthesis in an expression.
580 2018-09-03 Richard Biener <rguenther@suse.de>
582 PR tree-optimization/87197
583 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
584 visited. CSE the VN_INFO hashtable lookup.
586 PR tree-optimization/87169
587 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
588 iterating make sure there's no extra backedges from irreducible
589 regions feeding the header. Mark the destination block
592 2018-09-03 Martin Liska <mliska@suse.cz>
595 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
596 * common/common-targhooks.c (default_get_valid_option_values):
598 * common/common-targhooks.h (default_get_valid_option_values):
600 * common/config/i386/i386-common.c: Move processor_target_table
602 (ix86_get_valid_option_values): New function.
603 (TARGET_GET_VALID_OPTION_VALUES): New macro.
604 * config/i386/i386.c (struct ptt): Move to i386-common.c.
605 (PTA_*): Move all defined masks into i386-common.c.
606 (ix86_function_specific_restore): Use new processor_cost_table.
607 * config/i386/i386.h (struct ptt): Moved from i386.c.
608 (struct pta): Likewise.
609 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
610 * doc/tm.texi.in: Likewise.
611 * opt-suggestions.c (option_proposer::suggest_option):
612 Pass prefix to build_option_suggestions.
613 (option_proposer::get_completions): Likewise.
614 (option_proposer::build_option_suggestions): Use the new target
616 * opts.c (struct option_help_tuple): New struct.
617 (print_filtered_help): Use the new target hook.
619 2018-09-03 Martin Liska <mliska@suse.cz>
622 * predict.c (set_even_probabilities): Add likely_edges
623 argument and handle cases where we have precisely one
625 (combine_predictions_for_bb): Catch also likely_edges.
626 (tree_predict_by_opcode): Handle gswitch statements.
627 * tree-cfg.h (find_case_label_for_value): New declaration.
628 (find_taken_edge_switch_expr): Likewise.
629 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
630 Find pivot in decision tree based on probabily, not by number of
633 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
635 * doc/standards.texi (Standards): Update Objective-C reference.
637 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
639 * doc/install.texi (Prerequisites): Update link for MPC.
641 2018-09-01 Michael Matz <matz@suse.de>
643 PR tree-optimization/87074
644 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
645 PHIs for outer-loop uses.
647 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
649 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
650 * doc/invoke.texi (C Dialect Options): Ditto.
652 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
654 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
656 2018-08-31 Richard Biener <rguenther@suse.de>
658 PR tree-optimization/87168
659 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
660 (rpo_elim::eliminate_avail): When OP was not visited it must
663 2018-08-31 David Malcolm <dmalcolm@redhat.com>
665 * tree-vrp.c (copy_value_range): Convert param "from" from
666 "value_range *" to "const value_range *".
667 (range_is_null): Likewise for param "vr".
668 (range_int_cst_p): Likewise.
669 (range_int_cst_singleton_p): Likewise.
670 (symbolic_range_p): Likewise.
671 (value_ranges_intersect_p): Likewise for both params.
672 (value_range_nonnegative_p): Likewise for param "vr".
673 (value_range_constant_singleton): Likewise.
674 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
675 (extract_range_into_wide_ints): Likewise for param "vr".
676 (extract_range_from_multiplicative_op): Likewise for params "vr0"
678 (vrp_can_optimize_bit_op): Likewise.
679 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
681 (extract_range_from_unary_expr): Likewise.
682 (debug_value_range): Likewise for param "vr".
683 (value_range::dump): Add "const" qualifier.
684 (vrp_prop::check_array_ref): Convert local "vr" from
685 "value_range *" to "const value_range *".
686 (vrp_prop::check_mem_ref): Likewise.
687 (vrp_prop::visit_stmt): Likewise for local "old_vr".
688 (vrp_intersect_ranges_1): Likewise for param "vr_1".
689 (vrp_intersect_ranges): Likewise.
690 (simplify_stmt_for_jump_threading): Likewise for local "vr".
691 (vrp_prop::vrp_finalize): Likewise.
692 * tree-vrp.h (value_range::dump): Add "const" qualifier.
693 (vrp_intersect_ranges): Add "const" qualifier to params as above.
694 (extract_range_from_unary_expr): Likewise.
695 (value_range_constant_singleton): Likewise.
696 (symbolic_range_p): Likewise.
697 (copy_value_range): Likewise.
698 (extract_range_from_binary_expr_1): Likewise.
699 (range_int_cst_p): Likewise.
700 (vrp_set_zero_nonzero_bits): Likewise.
701 (range_int_cst_singleton_p): Likewise.
703 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
705 * config/aarch64/arm_neon.h (vabsd_s64): New.
706 (vnegd_s64): Likewise.
708 2018-08-31 Martin Jambor <mjambor@suse.cz>
710 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
712 2018-08-31 Martin Liska <mliska@suse.cz>
714 * ipa-icf.c (sem_item::add_type): Use
715 sem_item::m_type_hash_cache.
716 * ipa-icf.h: Move the cache from sem_item_optimizer
719 2018-08-31 Nathan Sidwell <nathan@acm.org>
721 * doc/extend.texi (Backwards Compatibility): Remove implicit
722 extern C leeway of () being (...).
724 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
726 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
728 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
732 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
734 2018-08-31 Jakub Jelinek <jakub@redhat.com>
737 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
738 gen_int_mode. Formatting fixes.
740 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
742 * target.def (custom_function_descriptors): Improve documentation.
743 * doc/tm.texi.in (Trampolines): Expand discussion of function
744 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
745 beginning of the section.
746 * doc/tm.texi: Regenerated.
748 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
750 * cfg.h (class auto_edge_flag): Spell out the template-id of the
751 base class in the initializer list. This is a workaround for
752 building with older GCC.
753 (class auto_bb_flag): Likewise.
755 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
757 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
758 (altivec_vcmpequ<VI_char>_p): Remove star.
759 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
761 (expand_strncmp_vec_sequence): New function.
762 (emit_final_str_compare_vec): New function.
763 (expand_strn_compare): Add support for vector strncmp.
764 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
765 length specification to bytes.
766 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
767 (vcmpnezb_p): New pattern.
768 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
769 for option -mstring-compare-inline-limit.
771 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
773 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
774 (PTA_SKYLAKE): Add PTA_AES.
775 (PTA_GOLDMONT): Likewise.
777 2018-08-29 Jan Hubicka <jh@suse.cz>
780 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
781 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
783 2018-08-29 Jan Hubicka <jh@suse.cz>
785 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
787 (hash_tree): Do not visit TYPE_STUB_DECL.
788 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
789 stream TYPE_STUB_DECL.
790 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
791 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
792 after free_lang_data.
793 (type_in_anonymous_namespace_p): Likewise.
795 2018-08-29 Jan Hubicka <jh@suse.cz>
797 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
798 comment that it has to be even number.
799 (class sreal): Change m_sig type to int32_t.
800 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
801 int64_t for temporary calculations.
802 (sreal_verify_basics): Drop one bit from minimum and maximum.
804 2018-08-30 Richard Biener <rguenther@suse.de>
806 PR tree-optimization/87147
807 * tree-ssa-sccvn.c (SSA_VISITED): New function.
808 (visit_phi): When the degenerate result is from the backedge and
809 we didn't visit its definition yet drop to VARYING.
810 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
812 2018-08-29 Jan Hubicka <jh@suse.cz>
814 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
816 (hash_tree): Likewise.
818 2018-08-29 Jan Hubicka <jh@suse.cz>
820 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
821 and TYPE_NEXT_REF_TO.
823 2018-08-29 Jan Hubicka <jh@suse.cz>
825 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
826 comment that it has to be even number.
827 (class sreal): Change m_sig type to int32_t.
828 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
829 int64_t for temporary calculations.
830 (sreal_verify_basics): Drop one bit from minimum and maximum.
832 2018-08-30 Tamar Christina <tamar.christina@arm.com>
834 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
836 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
839 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
840 if to_add is negative.
842 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
845 * builtins.c (c_strlen): Improve range checks.
847 2018-08-29 Martin Sebor <msebor@redhat.com>
848 Jeff Law <law@redhat.com>
850 PR tree-optimization/86714
851 PR tree-optimization/86711
852 * builtins.c (c_strlen): Add arguments to call to string_constant.
853 * expr.c (string_constant): Add argument. Detect missing nul
854 terminator and outermost declaration it's missing in.
855 * expr.h (string_constant): Add argument.
856 * fold-const.c (read_from_constant_string): Add arguments to call to
858 (c_getstr): Likewise.
859 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
861 * tree-ssa-strlen.c (get_stridx): Likewise.
863 2018-08-29 Jan Hubicka <jh@suse.cz>
865 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
866 Do not stream DECL_VINDEX.
867 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
868 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
869 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
871 2018-08-29 Richard Biener <rguenther@suse.de>
873 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
874 virtual operands that are not default defs to honor region
876 (rpo_vn_valueize): Remove ineffective code here.
878 2018-08-29 Richard Biener <rguenther@suse.de>
880 PR tree-optimization/87132
881 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
882 when skipping defs reachable over backedges.
884 2018-08-29 Richard Biener <rguenther@suse.de>
886 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
887 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
888 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
889 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
890 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
891 (vn_reference_lookup_3): Remove use of const_parms.
892 (free_rpo_vn): Do not free const_parms.
893 (do_rpo_vn): Do not call init_const_parms.
894 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
895 SSA_NAME_POINTS_TO_READONLY_MEMORY.
896 (call_may_clobber_ref_p_1): Likewise.
898 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
901 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
903 (-ftree-scev-cprop): Document.
905 2018-08-29 Jan Hubicka <jh@suse.cz>
907 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
909 (sreal constructor): Update.
910 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
911 sreal:operator/): Update.
913 2018-08-29 Martin Liska <mliska@suse.cz>
915 * tree-switch-conversion.c (switch_conversion::expand):
916 Strenghten assumption about gswitch statements.
918 2018-08-29 Richard Biener <rguenther@suse.de>
920 PR tree-optimization/87117
921 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
922 re-value-number released SSA VDEFs.
924 2018-08-29 Richard Biener <rguenther@suse.de>
926 PR tree-optimization/87126
927 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
929 2018-08-28 Jim Wilson <jimw@sifive.com>
931 * config/riscv/pic.md: Rewrite.
932 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
934 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
935 (SOFTF, default_load, softload, softstore): New.
937 2018-08-28 Jeff Law <law@redhat.com>
939 * fold-const.c (fold_binary_loc): Remove recently added assert.
941 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
943 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
944 to OP parmeter of generated function.
946 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
948 PR tree-optimization/87009
949 * match.pd: Add boolean optimizations.
951 2018-08-28 Martin Sebor <msebor@redhat.com>
954 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
955 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
956 (pass_walloca::gate): Use it.
957 (alloca_call_type): Same.
958 (pass_walloca::execute): Same.
959 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
961 2018-08-28 David Malcolm <dmalcolm@redhat.com>
963 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
964 GCC_VERSION for usage of "__gcc_dump_printf__" format from
967 2018-08-28 Richard Biener <rguenther@suse.de>
969 PR tree-optimization/87124
970 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
971 constants before looking up avail.
973 2018-08-28 Jakub Jelinek <jakub@redhat.com>
976 * calls.c (maybe_warn_nonstring_arg): Punt early if
977 warn_stringop_overflow is zero. Don't call get_range_strlen
978 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
979 Swap comparison operands to have constants on rhs. Only use
980 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
983 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
985 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
986 use of tree_to_shwi. Remove duplicated test for the size being
987 a whole number of bytes.
989 2018-08-28 Richard Biener <rguenther@suse.de>
991 PR tree-optimization/87117
992 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
993 Handle removed stmt without LHS (GIMPLE_NOP).
995 2018-08-28 Richard Biener <rguenther@suse.de>
997 PR tree-optimization/87117
998 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
999 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1001 2018-08-28 Richard Biener <rguenther@suse.de>
1003 PR tree-optimization/87117
1004 * tree-ssa-pre.c (compute_avail): Do not make expressions
1005 with predicated values available.
1006 (get_expr_value_id): Assert we do not run into predicated value
1009 2018-08-28 Richard Biener <rguenther@suse.de>
1011 PR tree-optimization/87117
1012 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1013 get virtual operands.
1014 (get_expr_operands): Handle STRING_CST like other decls.
1016 2018-08-28 Martin Liska <mliska@suse.cz>
1018 * tree.h: Update documentation of fndecl_built_in_p
1022 2018-08-27 Jeff Law <law@redhat.com>
1023 PR tree-optimization/87110
1024 * tree-ssa-dse.c (compute_trims): Handle non-constant
1027 2018-08-27 Martin Sebor <msebor@redhat.com>
1029 PR tree-optimization/86914
1030 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1032 2018-08-27 Martin Sebor <msebor@redhat.com>
1034 PR tree-optimization/87112
1035 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1036 the type of the bound argument.
1038 2018-08-27 Jeff Law <law@redhat.com>
1040 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1041 type does not have a TYPE_SIZE_UNIT.
1043 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1045 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1046 with include of backend.h.
1048 2018-08-27 Richard Biener <rguenther@suse.de>
1050 PR tree-optimization/86927
1051 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1052 use const cond reduction code.
1054 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1056 PR tree-optimization/85758
1057 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1059 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1062 * diagnostic-show-locus.c (class layout_range): Update for
1063 conversion of show_caret_p to a tri-state.
1064 (layout_range::layout_range): Likewise.
1065 (make_range): Likewise.
1066 (layout::maybe_add_location_range): Likewise.
1067 (layout::should_print_annotation_line_p): Don't show annotation
1068 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1069 (layout::get_state_at_point): Update for conversion of
1070 show_caret_p to a tri-state. Bail out early for
1071 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1072 underlining or source colorization.
1073 (gcc_rich_location::add_location_if_nearby): Update for conversion
1074 of show_caret_p to a tri-state.
1075 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1076 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1078 (selftest::test_one_liner_labels): Likewise.
1079 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1080 conversion of show_caret_p to a tri-state.
1081 * pretty-print.c (text_info::set_location): Likewise.
1082 * pretty-print.h (text_info::set_location): Likewise.
1083 * substring-locations.c (format_warning_n_va): Likewise.
1084 * tree-diagnostic.c (default_tree_printer): Likewise.
1085 * tree-pretty-print.c (newline_and_indent): Likewise.
1087 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1090 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1091 line above for line-insertion fix-it hints.
1092 (selftest::test_fixit_insert_containing_newline): Update the
1093 expected results, and add a test with line-numbering enabled.
1095 2018-08-27 Martin Liska <mliska@suse.cz>
1098 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1099 params with DECL_HAS_VALUE_EXPR_P.
1101 2018-08-27 Martin Liska <mliska@suse.cz>
1103 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1104 selected expansion strategy.
1106 2018-08-27 Martin Liska <mliska@suse.cz>
1108 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1109 * builtins.c (is_builtin_fn): Likewise.
1110 * attribs.c (diag_attr_exclusions): Use new function
1111 fndecl_built_in_p and remove check for FUNCTION_DECL if
1113 (builtin_mathfn_code): Likewise.
1114 (fold_builtin_expect): Likewise.
1115 (fold_call_expr): Likewise.
1116 (fold_builtin_call_array): Likewise.
1117 (fold_call_stmt): Likewise.
1118 (set_builtin_user_assembler_name): Likewise.
1119 (is_simple_builtin): Likewise.
1120 * calls.c (gimple_alloca_call_p): Likewise.
1121 (maybe_warn_nonstring_arg): Likewise.
1122 * cfgexpand.c (expand_call_stmt): Likewise.
1123 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1124 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1125 (cgraph_node::verify_node): Likewise.
1126 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1127 (cgraph_node::create_clone): Likewise.
1128 * config/arm/arm.c (arm_insert_attributes): Likewise.
1129 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1130 * dse.c (scan_insn): Likewise.
1131 * expr.c (expand_expr_real_1): Likewise.
1132 * fold-const.c (operand_equal_p): Likewise.
1133 (fold_binary_loc): Likewise.
1134 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1135 * gimple-low.c (lower_stmt): Likewise.
1136 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1137 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1138 * gimple.c (gimple_build_call_from_tree): Likewise.
1139 (gimple_call_builtin_p): Likewise.
1140 (gimple_call_combined_fn): Likewise.
1141 * gimplify.c (gimplify_call_expr): Likewise.
1142 (gimple_boolify): Likewise.
1143 (gimplify_modify_expr): Likewise.
1144 (gimplify_addr_expr): Likewise.
1145 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1146 * ipa-cp.c (determine_versionability): Likewise.
1147 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1148 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1149 * ipa-split.c (visit_bb): Likewise.
1150 (split_function): Likewise.
1151 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1152 * lto-cgraph.c (input_node): Likewise.
1153 * lto-streamer-out.c (write_symbol): Likewise.
1154 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1155 (lower_omp_1): Likewise.
1156 * predict.c (strip_predict_hints): Likewise.
1157 * print-tree.c (print_node): Likewise.
1158 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1159 * trans-mem.c (is_tm_irrevocable): Likewise.
1160 (is_tm_load): Likewise.
1161 (is_tm_simple_load): Likewise.
1162 (is_tm_store): Likewise.
1163 (is_tm_simple_store): Likewise.
1164 (is_tm_abort): Likewise.
1165 (tm_region_init_1): Likewise.
1166 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1167 * tree-cfg.c (verify_gimple_call): Likewise.
1168 (move_stmt_r): Likewise.
1169 (stmt_can_terminate_bb_p): Likewise.
1170 * tree-eh.c (lower_eh_constructs_2): Likewise.
1171 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1172 * tree-inline.c (remap_gimple_stmt): Likewise.
1173 (copy_bb): Likewise.
1174 (estimate_num_insns): Likewise.
1175 (fold_marked_statements): Likewise.
1176 * tree-sra.c (scan_function): Likewise.
1177 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1178 (optimize_stack_restore): Likewise.
1179 (pass_fold_builtins::execute): Likewise.
1180 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1181 (mark_all_reaching_defs_necessary_1): Likewise.
1182 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1183 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1184 (pass_forwprop::execute): Likewise.
1185 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1186 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1187 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1188 * tree-ssa-strlen.c (get_string_length): Likewise.
1189 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1190 (find_func_aliases_for_call): Likewise.
1191 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1192 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1193 * tree-tailcall.c (find_tail_calls): Likewise.
1194 * tree.c (need_assembler_name_p): Likewise.
1195 (free_lang_data_in_decl): Likewise.
1196 (get_call_combined_fn): Likewise.
1197 * ubsan.c (is_ubsan_builtin_p): Likewise.
1198 * varasm.c (incorporeal_function_p): Likewise.
1199 * tree.h (DECL_BUILT_IN): Remove and replace with
1201 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1202 (fndecl_built_in_p): New.
1204 2018-08-27 Martin Liska <mliska@suse.cz>
1206 PR tree-optimization/86847
1207 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1208 Dump also subtree probability.
1209 (switch_decision_tree::do_jump_if_equal): New function.
1210 (switch_decision_tree::emit_case_nodes): Handle special
1211 situations in balanced tree that can be emitted much simpler.
1212 Fix calculation of probabilities that happen in tree expansion.
1213 * tree-switch-conversion.h (struct cluster): Add
1215 (struct simple_cluster): Likewise.
1216 (struct case_tree_node): Add new function has_child.
1217 (do_jump_if_equal): New.
1219 2018-08-27 Martin Liska <mliska@suse.cz>
1221 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1222 Add new argument to bit_test_cluster constructor.
1223 (bit_test_cluster::emit): Set bits really number of values
1225 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1226 probability argument.
1227 * tree-switch-conversion.h (struct bit_test_cluster):
1228 Add m_handles_entire_switch.
1230 2018-08-27 Martin Liska <mliska@suse.cz>
1232 PR tree-optimization/86702
1233 * tree-switch-conversion.c (jump_table_cluster::emit):
1234 Make probabilities even for values in jump table
1235 according to number of cases handled.
1236 (switch_decision_tree::compute_cases_per_edge): Pass
1237 argument to reset_out_edges_aux function.
1238 (switch_decision_tree::analyze_switch_statement): Likewise.
1239 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1242 2018-08-27 Martin Liska <mliska@suse.cz>
1244 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1245 cfun argument explicitly.
1246 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1247 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1248 function gimple_switch_default_bb.
1249 (convert_switch_statements):
1251 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1252 * stmt.c (label_to_block_fn): Use label_to_block and pass
1253 cfun argument explicitly and use gimple_switch_label_bb.
1254 (expand_case): Likewise.
1255 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1256 cfun argument explicitly. Likewise.
1257 (make_edges_bb): Likewise.
1258 (make_cond_expr_edges): Likewise.
1259 (get_cases_for_edge): Likewise.
1260 (make_gimple_switch_edges): Likewise.
1261 (label_to_block_fn): Likewise.
1262 (label_to_block): Likewise.
1263 (make_goto_expr_edges): Likewise.
1264 (make_gimple_asm_edges): Likewise.
1265 (main_block_label): Likewise.
1266 (group_case_labels_stmt): Likewise.
1267 (find_taken_edge_computed_goto): Likewise.
1268 (find_taken_edge_switch_expr): Likewise.
1269 (gimple_verify_flow_info): Likewise.
1270 (gimple_redirect_edge_and_branch): Likewise.
1271 (gimple_switch_label_bb): New function.
1272 (gimple_switch_default_bb): Likewise.
1273 (gimple_switch_edge): Likewise.
1274 (gimple_switch_default_edge): Likewise.
1275 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1276 (label_to_block): ... with this.
1277 (gimple_switch_label_bb): New.
1278 (gimple_switch_default_bb): Likewise.
1279 (gimple_switch_edge): Likewise.
1280 (gimple_switch_default_edge): Likewise.
1281 * tree-cfgcleanup.c (convert_single_case_switch): Use
1282 new gimple functions and pass new argument to label_to_block.
1283 (cleanup_control_flow_bb):
1284 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1285 cfun argument explicitly.
1286 (make_eh_edges): Likewise.
1287 (redirect_eh_dispatch_edge): Likewise.
1288 (lower_resx): Likewise.
1289 (lower_eh_dispatch): Likewise.
1290 (maybe_remove_unreachable_handlers): Likewise.
1291 (unsplit_eh): Likewise.
1292 (cleanup_empty_eh): Likewise.
1293 (verify_eh_edges): Likewise.
1294 (verify_eh_dispatch_edge): Likewise.
1295 * tree-ssa-dom.c (record_edge_info): Likewise.
1296 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1297 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1298 (thread_through_normal_block): Likewise.
1299 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1300 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1301 * tree-switch-conversion.c (switch_conversion::collect): Use new
1303 (switch_conversion::check_final_bb): Likewise.
1304 (switch_conversion::gather_default_values): Pass new argument
1306 (switch_conversion::build_constructors): Likewise.
1307 (switch_decision_tree::compute_cases_per_edge): Use new
1308 gimple_switch_edge function.
1309 (switch_decision_tree::analyze_switch_statement): Pass new argument
1311 (switch_decision_tree::try_switch_expansion): Use
1312 gimple_switch_default_edge.
1313 * tree-vrp.c (find_switch_asserts): Pass new argument
1315 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1316 (vr_values::simplify_switch_using_ranges): Likewise.
1318 2018-08-27 Richard Biener <rguenther@suse.de>
1320 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1321 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1323 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1324 (struct vn_nary_op_s): Add unwind_to member. Add
1325 predicated_values flag and put result into a union together
1326 with a linked list of vn_pval.
1327 (struct vn_ssa_aux): Add name member to make maintaining
1328 a map of SSA name to vn_ssa_aux possible. Remove no longer
1329 needed info, dfsnum, low, visited, on_sccstack, use_processed
1330 and range_info_anti_range_p members.
1331 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1332 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1334 (vn_valueize): New global.
1335 (vn_context_bb): Likewise.
1336 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1337 VN_INFO_PTR_INFO): Remove.
1338 * tree-ssa-sccvn.c: ... (rewrite)
1339 (pass_fre::execute): For -O2+ initialize loops and run
1340 RPO VN in optimistic mode (iterating). For -O1 and -Og
1341 run RPO VN in non-optimistic mode.
1342 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1343 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1344 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1345 (rpo-vn-max-loop-depth): Document.
1346 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1347 when valuezing the VUSE signals we walked out of the region.
1348 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1349 (phi_translate): Set VN context block to use for availability
1351 (compute_avail): Likewise.
1352 (pre_valueize): New function.
1353 (pass_pre::execute): Adjust to the RPO VN API.
1355 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1356 (propagate_constants_for_unrolling): Remove.
1357 (tree_unroll_loops_completely): Perform value-numbering
1358 on the unrolled bodies loop parent.
1360 2018-08-27 Richard Biener <rguenther@suse.de>
1362 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1363 for partial antic compute.
1365 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1367 PR rtl-optimization/87065
1368 * combine.c (simplify_if_then_else): Formatting fix.
1369 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1371 (known_cond): Don't return const_true_rtx for vector modes. Use
1372 CONST0_RTX instead of const0_rtx. Formatting fixes.
1374 2018-08-27 Martin Liska <mliska@suse.cz>
1376 PR gcov-profile/87069
1377 * gcov.c (process_file): Record files already processed
1378 and warn about a file being processed multiple times.
1380 2018-08-27 Martin Liska <mliska@suse.cz>
1383 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1384 Set default values for x_aarch64_*_string strings.
1385 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1386 prefix. For -mabi do not print '=ABI' in help and use
1387 <option_value> format for -msve-vector-bits and -moverride
1390 2018-08-26 Jeff Law <law@redhat.com>
1392 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1395 2018-08-26 Marek Polacek <polacek@redhat.com>
1397 PR c++/87029, Implement -Wredundant-move.
1398 * doc/invoke.texi: Document -Wredundant-move.
1400 2018-08-25 Martin Sebor <msebor@redhat.com>
1402 PR tree-optimization/87059
1403 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1404 to the same type as the other.
1405 * fold-const.c (fold_binary_loc): Assert expectation.
1407 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1409 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1410 extraneous parentheses, dead code section and formatting.
1412 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1415 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1416 wide enough for jumps in the line-numbering to be visible.
1417 (layout::print_gap_in_line_numbering): New member function.
1418 (layout::calculate_line_spans): When using line numbering, merge
1419 line spans that are only 1 line apart.
1420 (diagnostic_show_locus): When printing line numbers, show gaps in
1421 line numbering directly, rather than printing headers.
1422 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1423 line-numbering with multiple line spans.
1424 (selftest::test_fixit_insert_containing_newline_2): Add test of
1425 line-numbering, in which the spans are close enough to be merged.
1427 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1429 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1430 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1431 * tree-vrp.c (range_is_nonnull): Remove.
1432 (range_includes_zero_p): Accept value_range instead of min/max.
1433 (extract_range_from_binary_expr_1): Do not early bail on
1435 Use range_includes_zero_p instead of range_is_nonnull.
1436 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1437 of range_is_nonnull.
1438 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1439 special case VR_ANTI_RANGE.
1440 (vrp_finalize): Same.
1441 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1443 (range_is_nonnull): Remove.
1444 * vr-values.c (vrp_stmt_computes_nonzero): Use
1445 range_includes_zero_p instead of range_is_nonnull.
1446 (extract_range_basic): Pass value_range to range_includes_zero_p
1447 instead of range_is_nonnull.
1449 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1451 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1452 * emit-rtl.h (rtl_data): Remove return_bnd.
1453 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1454 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1455 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1456 (POINTER_BOUNDS_MODE): Remove definition.
1457 (make_pointer_bounds_mode): Remove.
1458 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1459 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1460 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1461 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1462 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1463 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1464 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1466 * config/i386/i386-modes.def (BND32, BND64): Remove.
1467 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1468 (dbx64_register_map): Ditto.
1469 (svr4_dbx_register_map): Ditto.
1470 (indirect_thunk_bnd_needed): Remove.
1471 (indirect_thunks_bnd_used): Ditto.
1472 (indirect_return_bnd_needed): Ditto.
1473 (indirect_return_via_cx_bnd): Ditto.
1474 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1475 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1476 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1477 (output_indirect_thunk_function): Remove handling of
1478 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1479 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1480 (ix86_save_reg): Remove handling of crtl->return_bnd.
1481 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1482 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1483 and UNSPEC_BNDLX_ADDR.
1484 (ix86_output_indirect_branch_via_reg): Remove handling of
1485 indirect_thunk_prefix_bnd.
1486 (ix86_output_indirect_branch_via_push): Ditto.
1487 (ix86_output_function_return): Ditto.
1488 (ix86_output_indirect_function_return): Ditto.
1489 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1490 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1491 (CALL_USED_REGISTERS): Ditto.
1492 (REG_ALLOC_ORDER): Update for removal of bound registers.
1493 (HI_REGISTER_NAMES): Ditto.
1494 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1495 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1496 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1497 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1498 (FIRST_PSEUDO_REG): Update.
1499 (BND): Remove mode iterator.
1500 * config/i386/predicates.md (bnd_mem_operator): Remove.
1502 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1504 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1507 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1509 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1510 the case in which the permute needs only a single element and
1511 repeats for every vector of the result. Extend that case to
1512 handle variable-length vectors.
1513 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1515 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1518 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1519 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1521 2018-08-24 Richard Biener <rguenther@suse.de>
1523 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1524 bb_flags_allocated members.
1525 (auto_flag): New RAII class for allocating flags.
1526 (auto_edge_flag): New RAII class for allocating edge flags.
1527 (auto_bb_flag): New RAII class for allocating bb flags.
1528 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1530 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1531 in favor of temporarily allocated BB flag.
1532 * hsa-brig.c: Re-order includes.
1533 * hsa-dump.c: Likewise.
1534 * hsa-regalloc.c: Likewise.
1535 * print-rtl.c: Likewise.
1536 * profile-count.c: Likewise.
1538 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1541 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1544 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1547 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1548 from wide_int_range_multiplicative_op.
1550 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1552 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1555 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1557 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1560 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1562 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1563 full GENERIC expression used for replacement.
1565 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1567 * tree-vrp.c (abs_extent_range): Remove.
1568 (extract_range_into_wide_ints): Pass wide ints by reference.
1569 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1570 Pass wide ints by reference in all calls to
1571 extract_range_into_wide_ints.
1572 * wide-int-range.cc (wide_int_range_div): New.
1573 * wide-int-range.h (wide_int_range_div): New.
1574 (wide_int_range_includes_zero_p): New.
1575 (wide_int_range_zero_p): New.
1577 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1579 * config/aarch64/aarch64.md (arches): New enum.
1580 (arch): New enum attr.
1581 (arch_enabled): New attr.
1582 (enabled): Now uses arch_enabled only.
1583 (simd, sve, fp16): Removed attribute.
1584 (fp): Attr now defined in terms of 'arch'.
1585 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1586 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1587 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1588 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1589 attributes into 'arch'.
1590 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1591 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1592 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1593 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1594 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1595 'simd' attribute into 'arch'.
1596 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1597 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1598 Convert use of 'fp' attribute to 'arch'.
1599 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1600 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1602 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1603 (different modes) Merge 'fp' and 'simd' into 'arch'.
1604 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1607 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1609 PR rtl-optimization/87026
1610 * expmed.c (canonicalize_comparison): If we can no longer create
1611 pseudoregisters, don't.
1613 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1616 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1618 * config/arm/arm.c (speculation_barrier_libfunc): New static
1620 (arm_init_libfuncs): Initialize it.
1621 (arm_emit_speculation_barrier): New function.
1622 * config/arm/arm.md (speculation_barrier): Call
1623 arm_emit_speculation_barrier for architectures that do not have
1625 (speculation_barrier_insn): Only match on Armv7 or later.
1627 2018-08-23 Richard Biener <rguenther@suse.de>
1630 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1633 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1635 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1636 of single-vector TBLs.
1637 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1640 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1643 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1644 aarch64_evpc_tbl guard.
1646 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1648 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1651 2018-08-22 Martin Sebor <msebor@redhat.com>
1654 * tree-pretty-print.c (pretty_print_string): Add argument.
1655 (dump_generic_node): Call to pretty_print_string with string size.
1657 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1659 PR rtl-optimization/86771
1660 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1661 of two SETs into those two SETs, one to be placed at i2, if that SETs
1662 destination is modified between i2 and i3.
1664 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1666 PR tree-optimization/86725
1667 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1669 (vect_analyze_scalar_cycles_1): Check it.
1671 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1673 PR tree-optimization/86725
1674 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1675 an outer loop phi as a double reduction, make sure that the
1676 single user of the phi result is an inner loop phi.
1678 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1680 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1681 grouped stores with gaps to a strided group.
1683 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1685 * tree-vect-stmts.c (get_group_load_store_type)
1686 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1687 first statement in a group.
1689 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1691 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1692 the sequence used in gcc/gcc.c.
1694 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1697 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1700 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1702 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1703 Darwin10-specific unwinder-shim.
1704 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1705 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1706 New to cater for Darwin10 Rosetta.
1708 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1710 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1711 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1713 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1718 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1719 (dwarf2out_switch_text_section): Generate a local label for the
1720 second function sub-section and apply it as the second FDE start
1722 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1723 second sub-section start.
1725 2018-08-22 Richard Biener <rguenther@suse.de>
1727 PR tree-optimization/86988
1728 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1730 2018-08-22 Richard Biener <rguenther@suse.de>
1732 PR tree-optimization/86945
1733 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1735 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1737 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1738 a comment about how uses of r2 for .sdata2 come about.
1740 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1742 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1744 2018-08-21 Marek Polacek <polacek@redhat.com>
1746 PR c++/86981, Implement -Wpessimizing-move.
1747 * doc/invoke.texi: Document -Wpessimizing-move.
1749 2018-08-21 Jan Hubicka <jh@suse.cz>
1751 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1752 * tree.h (is_redundant_typedef): Remove.
1753 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1755 2018-08-21 Jan Hubicka <jh@suse.cz>
1757 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1760 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1762 * expmed.c (extract_low_bits): Reject invalid subregs early.
1764 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1767 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1770 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1772 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1773 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1774 * config/vxworks.c: Likewise.
1776 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1778 * config/vxworks.c: Set targetm.have_ctors_dtors
1779 if HAVE_INITFINI_ARRAY_SUPPORT.
1780 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1781 if HAVE_INITFINI_ARRAY_SUPPORT.
1783 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1785 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1786 default search path for VxWorks < 7.
1788 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1790 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1791 (get_format_string): Refer to c_getstr.
1793 2018-08-21 Tom de Vries <tdevries@suse.de>
1795 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1796 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1797 (debuginfo_early_stop): Declare.
1798 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1799 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1800 (debuginfo_early_stop): New function.
1801 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1802 and debuginfo_early_stop.
1803 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1804 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1805 (general_init): Call debuginfo_early_init.
1806 (finalize): Call debuginfo_fini.
1807 (do_compile): Call debuginfo_init.
1808 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1810 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1812 2018-08-21 Tom de Vries <tdevries@suse.de>
1814 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1815 flag_dump_noaddr and flag_dump_unnumbered.
1817 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1819 * wide-int-range.cc (wide_int_range_abs): New.
1820 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1821 * wide-int-range.h (wide_int_range_abs): New.
1822 (wide_int_range_min_max): New.
1823 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1824 case to call wide_int_range_abs.
1825 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1826 (extract_range_from_abs_expr): Delete.
1828 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1831 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1832 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1835 2018-08-20 Nathan Sidwell <nathan@acm.org>
1836 Jeff Law <law@redhat.com>
1838 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1839 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1841 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1844 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1845 (decl_attributes): Likewise.
1846 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1848 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1849 * diagnostic-core.h (class auto_diagnostic_group): New class.
1850 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1851 (diagnostic_report_diagnostic): Handle the first diagnostics within
1853 (emit_diagnostic): Add auto_diagnostic_group instance.
1855 (inform_n): Likewise.
1856 (warning): Likewise.
1857 (warning_at): Likewise.
1858 (warning_n): Likewise.
1859 (pedwarn): Likewise.
1860 (permerror): Likewise.
1862 (error_n): Likewise.
1863 (error_at): Likewise.
1865 (fatal_error): Likewise.
1866 (internal_error): Likewise.
1867 (internal_error_no_backtrace): Likewise.
1868 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1869 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1870 * diagnostic.h (struct diagnostic_context): Add fields
1871 "diagnostic_group_nesting_depth",
1872 "diagnostic_group_emission_count", "begin_group_cb",
1874 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1875 Add auto_diagnostic_group instance(s).
1876 (find_explicit_erroneous_behavior): Likewise.
1877 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1878 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1879 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1880 (gimplify_va_arg_expr): Likewise.
1881 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1882 (HSA_SORRY_AT): Likewise.
1883 * ipa-devirt.c (compare_virtual_tables): Likewise.
1884 (warn_odr): Likewise.
1885 * multiple_target.c (expand_target_clones): Likewise.
1886 * opts-common.c (cmdline_handle_error): Likewise.
1887 * reginfo.c (globalize_reg): Likewise.
1888 * substring-locations.c (format_warning_n_va): Likewise.
1889 * tree-inline.c (expand_call_inline): Likewise.
1890 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1891 * tree-ssa-loop-niter.c
1892 (do_warn_aggressive_loop_optimizations): Likewise.
1893 * tree-ssa-uninit.c (warn_uninit): Likewise.
1894 * tree.c (warn_deprecated_use): Likewise.
1896 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1899 * config/i386/i386.md (eh_return): Always update EH return
1900 address in word_mode.
1902 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1904 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1905 TARGET_SPLIT_COMPLEX_ARG is defined.
1907 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1909 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1911 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1914 * expr.c (expand_assignment): Assert that bitpos is positive.
1915 (store_field): Likewise
1916 (expand_expr_real_1): Make sure that bitpos is positive.
1917 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1920 2018-08-20 Nathan Sidwell <nathan@acm.org>
1922 * Makefile.in (CPP_ID_DATA_H): Delete.
1923 (CPP_INTERNAL_H): Don't add it.
1924 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1925 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1927 2018-08-20 Richard Biener <rguenther@suse.de>
1929 PR tree-optimization/78655
1930 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1931 pointer + offset nonnull if either operand is nonnull work.
1933 2018-08-20 Tom de Vries <tdevries@suse.de>
1935 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1936 unless the referenced die describes the added property using
1937 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1938 Otherwise, add a DW_AT_location to the referenced die.
1940 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1943 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1944 register_operand when calling ix86_set_reg_reg_cost.
1945 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1946 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1947 predicate and to 1 otherwise.
1949 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1951 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1952 emit a diagnostic that it is not supported and reset the option.
1953 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1954 supported and consume the option. (ASM_FINAL_SPEC): New.
1956 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1958 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1961 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1963 C-SKY port: Documentation
1965 * doc/extend.texi (C-SKY Function Attributes): New section.
1966 * doc/invoke.texi (Option Summary): Add C-SKY options.
1967 (C-SKY Options): New section.
1968 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1970 2018-08-17 Jojo <jijie_rong@c-sky.com>
1971 Huibin Wang <huibin_wang@c-sky.com>
1972 Sandra Loosemore <sandra@codesourcery.com>
1973 Chung-Lin Tang <cltang@codesourcery.com>
1975 C-SKY port: Backend implementation
1977 * config/csky/*: New.
1978 * common/config/csky/*: New.
1980 2018-08-17 Jojo <jijie_rong@c-sky.com>
1981 Huibin Wang <huibin_wang@c-sky.com>
1982 Sandra Loosemore <sandra@codesourcery.com>
1983 Chung-Lin Tang <cltang@codesourcery.com>
1984 Andrew Jenner <andrew@codesourcery.com>
1986 C-SKY port: Configury
1988 * config.gcc (csky-*-*): New.
1989 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1990 * configure: Regenerated.
1992 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1994 * dump-context.h: Include "dumpfile.h".
1995 (dump_context::dump_printf_va): Convert final param from va_list
1996 to va_list *. Convert from ATTRIBUTE_PRINTF to
1997 ATTRIBUTE_GCC_DUMP_PRINTF.
1998 (dump_context::dump_printf_loc_va): Likewise.
1999 * dumpfile.c: Include "stringpool.h".
2000 (make_item_for_dump_printf_va): Delete.
2001 (make_item_for_dump_printf): Delete.
2002 (class dump_pretty_printer): New class.
2003 (dump_pretty_printer::dump_pretty_printer): New ctor.
2004 (dump_pretty_printer::emit_items): New member function.
2005 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2007 (dump_pretty_printer::emit_item): New member function.
2008 (dump_pretty_printer::stash_item): New member function.
2009 (dump_pretty_printer::format_decoder_cb): New member function.
2010 (dump_pretty_printer::decode_format): New member function.
2011 (dump_context::dump_printf_va): Reimplement in terms of
2012 dump_pretty_printer.
2013 (dump_context::dump_printf_loc_va): Convert final param from va_list
2015 (dump_context::begin_scope): Reimplement call to
2016 make_item_for_dump_printf.
2017 (dump_printf): Update for change to dump_printf_va.
2018 (dump_printf_loc): Likewise.
2019 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2020 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2021 with %T, %E, and %G.
2022 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2023 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2024 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2025 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2026 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2027 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2028 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2029 within a dump_printf_loc call to "%wu".
2030 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2031 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2032 missing space after "=".
2033 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2034 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2035 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2036 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2037 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2038 duplicate "vectorized" from message.
2040 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2042 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2043 polyNxK_t element's TYPE_STRING_FLAG.
2045 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2047 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2048 (they were unnamed before). Fix comments.
2050 2018-08-17 Nathan Sidwell <nathan@acm.org>
2052 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2054 2018-08-17 Richard Biener <rguenther@suse.de>
2056 PR tree-optimization/86841
2057 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2059 2018-08-17 Martin Liska <mliska@suse.cz>
2061 * common.opt: Remove Warn, Init and Report for options with
2062 Ignore/Deprecated flag. Warning is done automatically for
2064 * config/i386/i386.opt: Likewise.
2065 * config/ia64/ia64.opt: Likewise.
2066 * config/rs6000/rs6000.opt: Likewise.
2067 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2068 Remove usage of flag_check_pointer_bounds.
2069 * lto-wrapper.c (merge_and_complain): Do not handle
2070 OPT_fcheck_pointer_bounds.
2071 (append_compiler_options): Likewise.
2072 * opt-functions.awk: Do not handle Deprecated.
2073 * optc-gen.awk: Check that Var, Report and Init are not
2074 used for an option with Ignore/Deprecated flag.
2075 * opts-common.c (decode_cmdline_option): Do not report
2077 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2079 * opts.h (struct cl_option): Remove cl_deprecated flag.
2080 (CL_ERR_DEPRECATED): Remove error enum value.
2082 2018-08-17 Richard Biener <rguenther@suse.de>
2085 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2086 across a va-arg-pack using call adjust its return value accordingly.
2088 2018-08-16 Martin Sebor <msebor@redhat.com>
2090 PR tree-optimization/86853
2091 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2092 (struct fmtresult): Add member and initialize it in ctors.
2093 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2094 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2095 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2096 (parse_directive): Handle %C same as %c.
2097 (sprintf_dom_walker::compute_format_length): Adjust.
2098 (is_call_safe): Adjust.
2100 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2102 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2103 for determining how to count the elements.
2104 * builtins.h (c_strlen): Adjust prototype.
2105 * expr.c (string_constant): Add new parameter mem_size.
2106 Set *mem_size appropriately.
2107 * expr.h (string_constant): Adjust protoype.
2108 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2109 * gimple-fold.h (get_range_strlen): Adjust prototype.
2110 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2111 (format_string): Call get_string_length with eltsize.
2113 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2115 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2116 to emit the span, rather than setting it as the prefix.
2118 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2120 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2121 "margin_char" parameter, defaulting to space. Use it in place
2122 of pp_space for the initial part of the margin.
2123 (layout::print_leading_fixits): Use '+' when filling the margin
2124 of line-insertion fix-it hints.
2126 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2128 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2131 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2133 * config/rs6000/altivec.md: Don't set length attribute to the default
2135 * config/rs6000/darwin.md: Ditto.
2136 * config/rs6000/dfp.md: Ditto.
2137 * config/rs6000/htm.md: Ditto.
2138 * config/rs6000/rs6000.md: Ditto.
2139 * config/rs6000/sync.md: Ditto.
2140 * config/rs6000/vsx.md: Ditto.
2142 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2144 * config/rs6000/altivec.md: Don't set length attribute to the default
2145 value, for branch instructions.
2146 * config/rs6000/darwin.md: Ditto.
2147 * config/rs6000/rs6000.md: Ditto.
2149 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2151 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2152 (unnamed conditional branch define_insn): Set length to 4 or 8
2153 depending on offset.
2154 (<bd>_<mode>): Similar, for alternative 0.
2155 (<bd>tf_<mode>): Ditto.
2157 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2159 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2161 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2163 * doc/rtl.texi: Replace old RTX class names with new names.
2166 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2168 * expmed.h (canonicalize_comparison): New declaration.
2169 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2170 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2171 * optabs.c (prepare_cmp_insn): Likewise.
2172 * rtl.h (unsigned_condition_p): New function which checks if a
2173 comparison operator is unsigned.
2175 2018-08-16 Nathan Sidwell <nathan@acm.org>
2177 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2178 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2180 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2183 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2184 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2185 (mov<mov>): ..this and enable unconditionally.
2187 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2189 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2191 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2193 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2194 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2195 "Common" with "Target".
2197 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2199 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2200 * doc/invoke.texi (mmitigate-rop): Remove.
2201 * config/i386/i386.c: Do not include "regrename.h".
2202 (ix86_rop_should_change_byte_p, reg_encoded_number)
2203 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2205 (ix86_reorg): Remove call to ix86_mitigate_rop.
2206 * config/i386/i386.md (attr "modrm_class"): Remove.
2207 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2208 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2209 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2211 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2213 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2214 allow folding of mergeh() and mergel() for the float and double types.
2215 (fold_mergehl_helper): Rework to handle building a permute tree
2218 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2220 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2223 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2225 * common.opt (fdiagnostics-show-labels): New option.
2226 * diagnostic-show-locus.c (class layout_range): Add field
2228 (class layout): Add field "m_show_labels_p".
2229 (layout_range::layout_range): Add param "label" and use it to
2231 (make_range): Pass in NULL for new "label" param of layout_range's
2233 (layout::layout): Initialize m_show_labels_p.
2234 (layout::maybe_add_location_range): Pass in loc_range->m_label
2235 when constructing layout_range instances.
2236 (struct line_label): New struct.
2237 (layout::print_any_labels): New member function.
2238 (layout::print_line): Call it if label-printing is enabled.
2239 (selftest::test_one_liner_labels): New test.
2240 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2241 * diagnostic.c (diagnostic_initialize): Initialize
2242 context->show_labels_p.
2243 * diagnostic.h (struct diagnostic_context): Add field
2245 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2246 -fno-diagnostics-show-labels.
2247 * dwarf2out.c (gen_producer_string): Add
2248 OPT_fdiagnostics_show_labels to the ignored options.
2249 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2251 (gcc_rich_location::maybe_add_expr): Likewise.
2252 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2253 label" param, defaulting to NULL.
2254 (gcc_rich_location::add_expr): Add "label" param.
2255 (gcc_rich_location::maybe_add_expr): Likewise.
2256 (class text_range_label): New class.
2257 (class range_label_for_type_mismatch): New class.
2258 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2259 of format_warning_va.
2260 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2261 * lto-wrapper.c (merge_and_complain): Add
2262 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2263 (append_compiler_options): Likewise to the dropped options.
2264 (append_diag_options): Likewise to the passed-on options.
2265 * opts.c (common_handle_option): Handle the new option.
2266 * selftest-diagnostic.c
2267 (test_diagnostic_context::test_diagnostic_context): Enable
2269 * substring-locations.c: Include "gcc-rich-location.h".
2270 (format_warning_n_va): Add "fmt_label" and "param_label" params
2271 and use them as appropriate.
2272 (format_warning_va): Add "fmt_label" and "param_label" params,
2273 passing them on to format_warning_n_va.
2274 (format_warning_at_substring): Likewise.
2275 (format_warning_at_substring_n): Likewise.
2276 * substring-locations.h (format_warning_va): Add "fmt_label" and
2277 "param_label" params.
2278 (format_warning_n_va): Likewise.
2279 (format_warning_at_substring): Likewise.
2280 (format_warning_at_substring_n): Likewise.
2281 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2283 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2286 * builtins.c (expand_builtin_memcmp): Do not expand the call
2287 when overflow is detected.
2289 2018-08-15 Martin Sebor <msebor@redhat.com>
2291 PR tree-optimization/71625
2292 * config/aarch64/aarch64-builtins.c
2293 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2295 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2297 * config/s390/s390.c (s390_reorg): Remove loop.
2299 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2302 (darwin_function_switched_text_sections): Delete.
2303 * gcc/config/darwin.h
2304 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2306 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2309 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2310 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2311 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2313 2018-08-15 Martin Liska <mliska@suse.cz>
2315 PR tree-optimization/86925
2316 * predict.c (expr_expected_value_1): When taking
2317 later predictor, assign also probability.
2318 Use fold_build2_initializer_loc in order to fold
2319 the expression in -frounding-math.
2321 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2323 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2325 (expand_vec_perm_1): Try the new method.
2327 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2330 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2331 Check whether lra_live_max_point is 0 before dividing.
2333 2018-08-14 Martin Sebor <msebor@redhat.com>
2335 PR tree-optimization/86650
2336 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2337 (vrp_prop::check_mem_ref): Same.
2339 2018-08-13 Liu Hao <lh_mouse@126.com>
2341 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2342 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2343 and clear it thereafter, as it only works for DBCS.
2345 2018-08-13 Liu Hao <lh_mouse@126.com>
2347 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2348 handle returned by _get_osf_handle().
2350 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2352 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2353 for folding vec_perm.
2355 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2357 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2358 Add support for gimple-folding of vec_pack() and vec_unpack()
2361 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2363 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2364 vec_xst variants to the list.
2365 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2366 vector loads and stores.
2368 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2370 * config.gcc (rs6000-ibm-aix4.x): Delete.
2371 (rs6000-ibm-aix5.1): Delete.
2372 (rs6000-ibm-aix5.2): Delete.
2373 (rs6000-ibm-aix5.3): Delete.
2374 * config/rs6000/aix43.h: Delete.
2375 * config/rs6000/aix51.h: Delete.
2376 * config/rs6000/aix52.h: Delete.
2377 * config/rs6000/t-aix43: Delete.
2379 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2381 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2383 (s390_decompose_address): Factor out constant pool ref
2386 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2388 * config/nds32/nds32-predicates.c
2389 (nds32_can_use_bclr_p): Change return type as bool.
2390 (nds32_can_use_bset_p): Ditto.
2391 (nds32_can_use_btgl_p): Ditto.
2392 (nds32_can_use_bitci_p): Ditto.
2393 * config/nds32/nds32-protos.h
2394 (nds32_can_use_bclr_p): Change declaration.
2395 (nds32_can_use_bset_p): Ditto.
2396 (nds32_can_use_btgl_p): Ditto.
2397 (nds32_can_use_bitci_p): Ditto.
2399 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2401 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2402 Support -msched-prolog-epilog option.
2403 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2405 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2407 * common/config/nds32/nds32-common.c
2408 (nds32_option_optimization_table): Enalbe -malways-align.
2410 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2412 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2414 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2415 OPT_misr_secure_ case.
2416 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2417 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2418 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2420 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2421 (nds32_isr_info): New field security_level.
2422 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2423 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2424 * config/nds32/nds32.opt (misr-secure): New option.
2425 * config/nds32/nds32_init.inc: New file.
2426 * config/nds32/nds32_isr.h: New file.
2428 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2430 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2431 Update comment for atomic instructions.
2432 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2433 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2435 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2436 load for __ATOMIC_SEQ_CST model.
2437 (atomic_loaddi_1): Remove float register target.
2438 (atomic_storedi): Handle CONST_INT values.
2439 (atomic_storedi_1): Remove float register source. Add special case
2441 (memory_barrier): New expander and insn.
2443 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2445 PR tree-optimization/86835
2446 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2447 new_stmt after def_gsi, make sure to insert new_square_stmt after
2448 that stmt, not 2 stmts before it.
2450 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2453 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2456 2018-08-10 Martin Liska <mliska@suse.cz>
2459 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2461 * builtins.c (expand_builtin_expect_with_probability):
2463 (expand_builtin_expect_with_probability): New function.
2464 (build_builtin_expect_predicate): Add new argumnet probability
2465 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2466 (fold_builtin_expect):
2469 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2470 * builtins.h (fold_builtin_expect): Set new argument.
2471 * doc/extend.texi: Document __builtin_expect_with_probability.
2472 * doc/invoke.texi: Likewise.
2473 * gimple-fold.c (gimple_fold_call): Pass new argument.
2474 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2475 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2476 * predict.c (get_predictor_value): New function.
2477 (expr_expected_value): Add new argument probability. Assume
2478 that predictor and probability are always non-null.
2479 (expr_expected_value_1): Likewise. For __builtin_expect and
2480 __builtin_expect_with_probability set probability. Handle
2481 combination in binary expressions.
2482 (tree_predict_by_opcode): Simplify code by simply calling
2483 get_predictor_value.
2484 (pass_strip_predict_hints::execute): Add handling of
2485 BUILT_IN_EXPECT_WITH_PROBABILITY.
2486 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2488 * tree.h (DECL_BUILT_IN_P): New function.
2490 2018-08-10 Martin Liska <mliska@suse.cz>
2492 PR tree-optimization/85799
2493 * passes.def: Add argument for pass_strip_predict_hints.
2494 * predict.c (class pass_strip_predict_hints): Add new argument
2496 (strip_predictor_early): New function.
2497 (pass_strip_predict_hints::execute): Call the function to
2499 (strip_predict_hints): New function.
2500 * predict.def: Fix comment.
2502 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2504 * Makefile.in: Clarify which tm.texi to copy over to assert the
2505 right to grant a GFDL license for all.
2507 2018-08-09 Jeff Law <law@redhat.com>
2509 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2512 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2514 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2517 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2519 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2520 reductions for variable-length vectors.
2522 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2525 * common.opt (fdiagnostics-show-line-numbers): New option.
2526 * diagnostic-show-locus.c (class layout): Add fields
2527 "m_show_line_numbers_p" and "m_linenum_width";
2528 (num_digits): New function.
2529 (test_num_digits): New function.
2530 (layout::layout): Initialize new fields. Update m_x_offset
2531 logic to handle any left margin.
2532 (layout::print_source_line): Print line number when requested.
2533 (layout::start_annotation_line): New member function.
2534 (layout::print_annotation_line): Call it.
2535 (layout::print_leading_fixits): Likewise.
2536 (layout::print_trailing_fixits): Likewise. Update calls to
2537 move_to_column for new parameter.
2538 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2539 it to potentially call start_annotation_line.
2540 (layout::show_ruler): Call start_annotation_line.
2541 (selftest::test_line_numbers_multiline_range): New selftest.
2542 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2543 and selftest::test_line_numbers_multiline_range.
2544 * diagnostic.c (diagnostic_initialize): Initialize
2545 show_line_numbers_p.
2546 * diagnostic.h (struct diagnostic_context): Add field
2547 "show_line_numbers_p".
2548 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2549 -fno-diagnostics-show-line-numbers.
2550 * dwarf2out.c (gen_producer_string): Add
2551 OPT_fdiagnostics_show_line_numbers to the ignored options.
2552 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2553 one setting" options.
2554 (append_compiler_options): Likewise to the dropped options.
2555 (append_diag_options): Likewise to the passed-on options.
2556 * opts.c (common_handle_option): Handle the new option.
2557 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2559 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2561 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2562 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2563 third argument of type "const signed char" to descriptions of
2564 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2565 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2566 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2567 __builtin_bcdsub_ov functions.
2569 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2571 PR tree-optimization/86858
2572 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2573 flow_bb_inside_loop_p calls.
2575 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2577 PR tree-optimization/86871
2578 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2579 instead of gimple_assign_lhs.
2581 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2584 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2585 register constraint to operand 0.
2586 (add<mode>3_carryinC): Likewise.
2587 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2589 2018-08-09 Martin Liska <mliska@suse.cz>
2592 * common.opt: Remove extra line.
2594 2018-08-09 Martin Liska <mliska@suse.cz>
2596 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2597 at the end of a line, make first letter capital and end up
2598 a sentence with a dot.
2599 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2600 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2601 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2602 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2603 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2604 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2605 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2606 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2607 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2608 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2609 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2610 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2611 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2612 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2613 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2614 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2615 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2616 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2618 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2621 * config/s390/s390.c (s390_option_override_internal): Reduce the
2622 stack-clash-protection-probe-interval param if it would be too big
2625 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2628 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2629 * config/m68k/m68k.c (handle_move_double): Don't call
2630 m68k_final_prescan_insn.
2631 (m68k_adjust_decorated_operand): Renamed from
2632 m68k_final_prescan_insn, remove first and third operand and
2634 (print_operand): Call it.
2635 (print_operand_address): Call it.
2637 2018-08-08 Nathan Sidwell <nathan@acm.org>
2639 * diagnostic.c (diagnostic_report_current_module): Use
2640 linemap_included_from & linemap_included_from_linemap.
2642 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2644 * config/aarch64/aarch64-cores.def: Add phecda core.
2645 * config/aarch64/aarch64-tune.md: Regenerate.
2646 * doc/invoke.texi: Add phecda core.
2648 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2651 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2653 * config/s390/s390.md ("movti"): Add more alternatives for
2654 constant to GPR copies.
2656 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2658 * config/s390/s390.c: Fix whitespace damage throughout the file.
2659 * config/s390/s390.h: Likewise.
2660 * config/s390/tpf.h: Likewise.
2662 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2664 * config/s390/s390.c (s390_loadrelative_operand_p):
2665 Remove TARGET_CPU_ZARCH usages.
2666 (s390_rtx_costs): Likewise.
2667 (s390_legitimate_constant_p): Likewise.
2668 (s390_cannot_force_const_mem): Likewise.
2669 (legitimate_reload_constant_p): Likewise.
2670 (s390_preferred_reload_class): Likewise.
2671 (legitimize_pic_address): Likewise.
2672 (legitimize_tls_address): Likewise.
2673 (s390_split_branches): Removed.
2674 (s390_add_execute): Removed.
2675 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2676 (s390_mainpool_start): Likewise.
2677 (s390_mainpool_finish): Likewise.
2678 (s390_mainpool_cancel): Removed.
2679 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2680 (s390_chunkify_cancel): Likewise.
2681 (s390_return_addr_rtx): Likewise.
2682 (s390_register_info): Remove split_branches_pending_p uages.
2683 (s390_optimize_register_info): Likewise.
2684 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2685 split_branches_pending_p usages.
2686 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2687 (s390_load_got): Likewise.
2688 (s390_expand_split_stack_prologue): Likewise.
2689 (output_asm_nops): Likewise.
2690 (s390_function_profiler): Likewise.
2691 (s390_emit_call): Likewise.
2692 (s390_conditional_register_usage): Likewise.
2693 (s390_optimize_prologue): Likewise.
2694 (s390_reorg): Remove TARGET_CPU_ZARCH and
2695 split_branches_pending_p usages.
2696 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2698 (s390_output_indirect_thunk_function): Likewise.
2699 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2700 (TARGET_CPU_ZARCH_P): Removed.
2701 (struct machine_function): Remove split_branches_pending_p.
2702 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2704 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2706 * common/config/s390/s390-common.c (processor_flags_table):
2708 * config.gcc: Remove with_arch/with_tune support.
2709 * config/s390/2064.md: Remove cpu attribute comparisons.
2710 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2712 * config/s390/linux.h (ASM_SPEC):
2713 Remove -march support.
2714 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2715 Use a table to get an arch level.
2716 * config/s390/s390-opts.h (enum processor_type):
2718 * config/s390/s390.c
2719 (processor_table): Remove entries, add arch_level values.
2720 (s390_issue_rate): Remove cases.
2721 (s390_option_override): Adjust
2722 s390_option_override_internal() call.
2723 (s390_option_override_internal): Remove deprecation warning.
2724 (s390_valid_target_attribute_tree): Adjust
2725 s390_option_override_internal() call.
2726 * config/s390/s390.h (struct s390_processor):
2727 Share with s390-c.c, add arch_level field.
2728 * config/s390/s390.md:
2729 Remove occurrences in cpu attribute.
2730 * config/s390/s390.opt: Remove -march/-mtune support.
2731 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2732 * doc/invoke.texi: Remove deprecation warning.
2734 2018-08-08 Luis Machado <luis.machado@linaro.org>
2736 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2738 (qdf24xx_tunings): Set vector cost structure to
2739 qdf24xx_vector_cost.
2741 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2742 <register_sextend>: Set to 3.
2744 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2747 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2748 * config/aarch64/aarch64-simd.md
2749 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2750 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2751 (aarch64_frecpx<mode>): ...this new pattern.
2752 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2753 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2755 2018-08-07 Martin Liska <mliska@suse.cz>
2758 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2759 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2760 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2761 * doc/extend.texi: Document that malloc attribute adds
2764 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2767 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2768 Define to speculation_safe_value_not_needed.
2770 2018-08-06 Jeff Law <law@redhat.com>
2772 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2773 the vr_values instance to cprop_into_stmt.
2774 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2775 (cprop_operand): Also query EVRP to determine if OP is a constant.
2777 2018-08-06 Nathan Sidwell <nathan@acm.org>
2779 * diagnostic.c (diagnostic_report_current_module): Reroll
2780 included-at loop. Translate text.
2782 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2784 * function-tests.c (selftest::test_expansion_to_rtl): Call
2785 free_after_compilation.
2787 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2789 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2791 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2793 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2794 loops with memory block operations from getting unrolled.
2796 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2799 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2800 Define to speculation_safe_value_not_needed.
2802 2018-08-06 Jeff Law <law@redhat.com>
2804 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2807 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2810 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2811 with all enabled __intN types.
2813 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2815 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2817 * alias.c (record_set): Check for clobber high.
2818 * cfgexpand.c (expand_gimple_stmt): Likewise.
2819 * combine-stack-adj.c (single_set_for_csa): Likewise.
2820 * combine.c (find_single_use_1): Likewise.
2821 (set_nonzero_bits_and_sign_copies): Likewise.
2822 (get_combine_src_dest): Likewise.
2823 (is_parallel_of_n_reg_sets): Likewise.
2824 (try_combine): Likewise.
2825 (record_dead_and_set_regs_1): Likewise.
2826 (reg_dead_at_p_1): Likewise.
2827 (reg_dead_at_p): Likewise.
2828 * dce.c (deletable_insn_p): Likewise.
2829 (mark_nonreg_stores_1): Likewise.
2830 (mark_nonreg_stores_2): Likewise.
2831 * df-scan.c (df_find_hard_reg_defs): Likewise.
2832 (df_uses_record): Likewise.
2833 (df_get_call_refs): Likewise.
2834 * dwarf2out.c (mem_loc_descriptor): Likewise.
2835 * haifa-sched.c (haifa_classify_rtx): Likewise.
2836 * ira-build.c (create_insn_allocnos): Likewise.
2837 * ira-costs.c (scan_one_insn): Likewise.
2838 * ira.c (equiv_init_movable_p): Likewise.
2839 (rtx_moveable_p): Likewise.
2840 (interesting_dest_for_shprep): Likewise.
2841 * jump.c (mark_jump_label_1): Likewise.
2842 * postreload-gcse.c (record_opr_changes): Likewise.
2843 * postreload.c (reload_cse_simplify): Likewise.
2844 (struct reg_use): Add source expr.
2845 (reload_combine): Check for clobber high.
2846 (reload_combine_note_use): Likewise.
2847 (reload_cse_move2add): Likewise.
2848 (move2add_note_store): Likewise.
2849 * print-rtl.c (print_pattern): Likewise.
2850 * recog.c (decode_asm_operands): Likewise.
2851 (store_data_bypass_p): Likewise.
2852 (if_test_bypass_p): Likewise.
2853 * regcprop.c (kill_clobbered_value): Likewise.
2854 (kill_set_value): Likewise.
2855 * reginfo.c (reg_scan_mark_refs): Likewise.
2856 * reload1.c (maybe_fix_stack_asms): Likewise.
2857 (eliminate_regs_1): Likewise.
2858 (elimination_effects): Likewise.
2859 (mark_not_eliminable): Likewise.
2860 (scan_paradoxical_subregs): Likewise.
2861 (forget_old_reloads_1): Likewise.
2862 * reorg.c (find_end_label): Likewise.
2863 (try_merge_delay_insns): Likewise.
2864 (redundant_insn): Likewise.
2865 (own_thread_p): Likewise.
2866 (fill_simple_delay_slots): Likewise.
2867 (fill_slots_from_thread): Likewise.
2868 (dbr_schedule): Likewise.
2869 * resource.c (update_live_status): Likewise.
2870 (mark_referenced_resources): Likewise.
2871 (mark_set_resources): Likewise.
2872 * rtl.c (copy_rtx): Likewise.
2873 * rtlanal.c (reg_referenced_p): Likewise.
2874 (single_set_2): Likewise.
2875 (noop_move_p): Likewise.
2876 (note_stores): Likewise.
2877 * sched-deps.c (sched_analyze_reg): Likewise.
2878 (sched_analyze_insn): Likewise.
2880 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2882 * cse.c (invalidate_reg): New function extracted from...
2883 (invalidate): ...here.
2884 (canonicalize_insn): Check for clobber high.
2885 (invalidate_from_clobbers): invalidate clobber highs.
2886 (invalidate_from_sets_and_clobbers): Likewise.
2887 (count_reg_usage): Check for clobber high.
2888 (insn_live_p): Likewise.
2889 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2890 (cselib_invalidate_regno): Check for clobber in setter.
2891 (cselib_invalidate_rtx): Pass through setter.
2892 (cselib_invalidate_rtx_note_stores):
2893 (cselib_process_insn): Check for clobber high.
2894 * cselib.h (cselib_invalidate_rtx): Add operand.
2896 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2898 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2899 (mark_not_eliminable): Likewise.
2900 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2901 * lra-lives.c (process_bb_lives): Check for clobber high.
2902 * lra.c (new_insn_reg): Remember clobber highs.
2903 (collect_non_operand_hard_regs): Check for clobber high.
2904 (lra_set_insn_recog_data): Likewise.
2905 (add_regs_to_insn_regno_info): Likewise.
2906 (lra_update_insn_regno_info): Likewise.
2908 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2910 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2911 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2913 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2915 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2916 (copy_insn_1): Likewise.
2917 (gen_hard_reg_clobber_high): New gen function.
2918 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2919 * genemit.c (gen_exp): Likewise.
2920 (gen_emit_seq): Pass through info.
2921 (gen_insn): Check for CLOBBER_HIGH.
2922 (gen_expand): Pass through info.
2923 (gen_split): Likewise.
2924 (output_add_clobbers): Likewise.
2925 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2926 (remove_clobbers): Likewise.
2927 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2929 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2931 * doc/rtl.texi (clobber_high): Add.
2932 (parallel): Add in clobber high
2933 * rtl.c (rtl_check_failed_code3): Add function.
2934 * rtl.def (CLOBBER_HIGH): Add expression.
2935 * rtl.h (RTL_CHECKC3): Add macro.
2936 (rtl_check_failed_code3): Add declaration.
2937 (XC3EXP): Add macro.
2939 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2942 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2943 cfun->machine->max_used_stack_alignment if needed.
2945 2018-08-04 Martin Sebor <msebor@redhat.com>
2947 PR tree-optimization/86571
2948 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2951 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2954 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2957 2018-08-03 Jeff Law <law@redhat.com>
2960 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2961 Define to speculation_safe_value_not_needed.
2963 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2965 * doc/gcov.texi (-x): Remove duplicate "to".
2966 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2967 (-Wif-not-aligned): Remove duplicate "is".
2968 (-flto): Remove duplicate "the".
2969 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2970 duplicate "v5.00.b".
2971 (MSP430 Options): Remove duplicate "and" from the description
2972 of "-mgprel-sec=regexp".
2973 (x86 Options): Remove duplicate copies of "vmldLog102" and
2974 vmlsLog104 from description of "-mveclibabi=type".
2976 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2978 * internal-fn.h (first_commutative_argument): Declare.
2979 * internal-fn.c (first_commutative_argument): New function.
2980 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2981 restrictions for pattern statements. Use first_commutative_argument
2982 to look for commutative operands in calls to internal functions.
2984 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2986 * Makefile.in (wide-int-range.o): New.
2987 * tree-vrp.c: Move all the wide_int_* functions to...
2988 * wide-int-range.cc: ...here.
2989 * tree-vrp.h: Move all the wide_int_* prototypes to...
2990 * wide-int-range.h: ...here.
2992 2018-08-03 Tom de Vries <tdevries@suse.de>
2994 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2996 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2997 * except.c (output_function_exception_table): Do early exit if
2998 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3000 2018-08-03 Martin Liska <mliska@suse.cz>
3002 * predict.c (dump_prediction): Change to 2 digits
3005 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3007 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3009 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3011 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3013 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3014 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3015 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3016 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3017 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3019 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3021 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3022 pp_take_prefix when saving the existing prefix.
3023 * diagnostic.c (diagnostic_append_note): Likewise.
3024 * langhooks.c (lhd_print_error_function): Likewise.
3025 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3026 param's type. Free the existing prefix.
3027 (pp_take_prefix): New function.
3028 (pretty_printer::pretty_printer): Drop the prefix parameter.
3029 Rename the length parameter to match the comment.
3030 (pretty_printer::~pretty_printer): Free the prefix.
3031 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3033 (struct pretty_printer): Drop the "const" from "prefix" field's
3034 type and clarify memory management.
3035 (pp_set_prefix): Drop the "const" from the 2nd param.
3036 (pp_take_prefix): New decl.
3038 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3040 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3041 for word_mode_ok here instead of passing as argument.
3042 (expand_block_compare): Change select_block_compare_mode() call.
3043 (expand_strncmp_gpr_sequence): New function.
3044 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3046 2018-08-02 Jeff Law <law@redhat.com>
3049 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3050 Define to speculation_safe_value_not_needed.
3053 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3054 Define to speculation_safe_value_not_needed.
3056 2018-08-02 Tom de Vries <tdevries@suse.de>
3059 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3060 function. Return UI_TARGET unconditionally.
3061 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3062 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3064 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3066 * genemit.c (print_overload_test): Fix typo.
3068 2018-08-02 Richard Biener <rguenther@suse.de>
3070 PR tree-optimization/86816
3071 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3072 which checks for value availability before querying it.
3073 (gvn_uses_equal): Use it.
3074 (same_succ_hash): Likewise.
3075 (gimple_equal_p): Likewise.
3077 2018-08-02 Nick Clifton <nickc@redhat.com>
3080 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3081 Define to speculation_safe_value_not_needed.
3084 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3085 Define to speculation_safe_value_not_needed.
3088 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3089 Define to speculation_safe_value_not_needed.
3092 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3093 Define to speculation_safe_value_not_needed.
3096 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3097 Define to speculation_safe_value_not_needed.
3100 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3101 Define to speculation_safe_value_not_needed.
3104 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3105 Define to speculation_safe_value_not_needed.
3108 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3109 Define to speculation_safe_value_not_needed.
3112 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3113 speculation_safe_value_not_needed.
3116 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3117 to speculation_safe_value_not_needed.
3119 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3121 * doc/md.texi: Expand the documentation of instruction names
3122 to mention port-local uses. Document '@' in pattern names.
3123 * read-md.h (overloaded_instance, overloaded_name): New structs.
3125 (md_reader::handle_overloaded_name): New member function.
3126 (md_reader::get_overloads): Likewise.
3127 (md_reader::m_first_overload): New member variable.
3128 (md_reader::m_next_overload_ptr): Likewise.
3129 (md_reader::m_overloads_htab): Likewise.
3130 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3131 m_next_overload_ptr and m_overloads_htab.
3132 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3133 (get_mode_token, get_code_token, get_int_token): New functions.
3134 (map_attr_string): Add an optional argument that passes back
3135 the associated iterator.
3136 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3137 (md_reader::handle_overloaded_name, add_overload_instance): New
3139 (apply_iterators): Handle '@' names. Report an error if '@'
3140 is used without iterators.
3141 (initialize_iterators): Initialize the new iterator_group fields.
3142 * genopinit.c (handle_overloaded_code_for)
3143 (handle_overloaded_gen): New functions.
3144 (main): Use them to print declarations of maybe_code_for_* and
3145 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3146 * genemit.c (print_overload_arguments, print_overload_test)
3147 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3148 (main): Use it to print definitions of maybe_code_for_* and
3149 maybe_gen_* functions.
3150 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3151 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3152 instead of explicit mode checks.
3153 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3154 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3155 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3156 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3157 (aarch64_expand_compare_and_swap): Likewise
3158 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3159 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3160 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3161 (aarch64_constant_pool_reload_icode): Delete.
3162 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3163 instead of aarch64_constant_pool_reload_icode. Use
3164 code_for_aarch64_reload_mov instead of explicit mode checks.
3165 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3166 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3167 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3168 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3169 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3170 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3171 (aarch64_atomic_load_op_code): Delete.
3172 (aarch64_emit_atomic_load_op): Likewise.
3173 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3174 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3175 instead of aarch64_emit_atomic_load_op.
3176 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3177 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3178 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3179 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3180 character before the pattern name.
3181 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3182 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3183 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3184 (aarch64_frecps<mode>): Likewise.
3185 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3186 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3187 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3188 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3189 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3191 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3193 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3194 Allow HFmode constants if TARGET_FP_F16INST.
3196 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3199 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3200 No longer check last store for clobber of address register.
3202 2018-08-02 Martin Liska <mliska@suse.cz>
3204 PR gcov-profile/86817
3205 * gcov.c (process_all_functions): New function.
3207 (process_file): Move functions processing to
3208 process_all_functions.
3210 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3212 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3213 "const" to the "gimple *" and "rtx_insn *" parameters.
3214 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3216 (dump_location_t::dump_location_t): Likewise.
3218 2018-08-01 Martin Sebor <msebor@redhat.com>
3220 PR tree-optimization/86650
3221 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3222 rather than a "gcall *". Directly pass the data of interest
3223 to percent_K_format, rather than building a temporary CALL_EXPR
3225 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3226 (gimple_fold_builtin_strncat): Adjust.
3227 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3228 gcall* argument with gimple*.
3229 * gimple-ssa-warn-restrict.c (check_call): Same.
3230 (wrestrict_dom_walker::before_dom_children): Same.
3231 (builtin_access::builtin_access): Same.
3232 (check_bounds_or_overlap): Same
3233 (maybe_diag_overlap): Same.
3234 (maybe_diag_offset_bounds): Same.
3235 * tree-diagnostic.c (default_tree_printer): Move usage of
3236 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3238 * tree-pretty-print.c (percent_K_format): Add argument.
3239 * tree-pretty-print.h: Add argument.
3240 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3241 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3242 (maybe_diag_stxncpy_trunc): Same.
3243 (handle_builtin_stxncpy): Same.
3244 (handle_builtin_strcat): Same.
3246 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3248 * match.pd: Optimise pointer range checks.
3250 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3252 PR tree-optimization/86758
3253 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3254 to remove pattern statements.
3256 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3258 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3259 result of dfs_enumerate_from when constructing stmt_vec_infos,
3260 instead of additionally calling get_loop_body.
3262 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3264 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3266 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3267 When creating an iv, assert that the step is not known to be zero.
3268 (vect_setup_realignment): Update call accordingly.
3269 * tree-vect-stmts.c (vectorizable_store): Likewise.
3270 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3272 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3274 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3275 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3276 (vectorizable_reduction): Likewise.
3277 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3278 (vect_detect_hybrid_slp_stmts): Likewise.
3279 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3281 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3283 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3284 (wide_int_set_zero_nonzero_bits): ...this.
3285 (zero_nonzero_bits_from_vr): Rename to...
3286 (vrp_set_zero_nonzero_bits): ...this.
3287 (extract_range_from_multiplicative_op_1): Abstract wide int
3289 (wide_int_range_multiplicative_op): ...here.
3290 (extract_range_from_binary_expr_1): Extract wide int binary
3291 operations into their own functions.
3292 (wide_int_range_lshift): New.
3293 (wide_int_range_can_optimize_bit_op): New.
3294 (wide_int_range_shift_undefined_p): New.
3295 (wide_int_range_bit_xor): New.
3296 (wide_int_range_bit_ior): New.
3297 (wide_int_range_bit_and): New.
3298 (wide_int_range_trunc_mod): New.
3299 (extract_range_into_wide_ints): New.
3300 (vrp_shift_undefined_p): New.
3301 (extract_range_from_multiplicative_op): New.
3302 (vrp_can_optimize_bit_op): New.
3303 * tree-vrp.h (value_range::dump): New.
3304 (wide_int_range_multiplicative_op): New.
3305 (wide_int_range_lshift):New.
3306 (wide_int_range_shift_undefined_p): New.
3307 (wide_int_range_bit_xor): New.
3308 (wide_int_range_bit_ior): New.
3309 (wide_int_range_bit_and): New.
3310 (wide_int_range_trunc_mod): New.
3311 (zero_nonzero_bits_from_bounds): Rename to...
3312 (wide_int_set_zero_nonzero_bits): ...this.
3313 (zero_nonzero_bits_from_vr): Rename to...
3314 (vrp_set_zero_nonzero_bits): ...this.
3315 (range_easy_mask_min_max): Rename to...
3316 (wide_int_range_can_optimize_bit_op): this.
3317 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3318 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3320 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3322 * tree-vectorizer.h (vect_orig_stmt): New function.
3323 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3324 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3325 (vect_create_epilog_for_reduction): Likewise.
3326 (vectorizable_live_operation): Likewise.
3327 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3328 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3329 * tree-vect-stmts.c (vectorizable_call): Likewise.
3330 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3332 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3334 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3336 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3337 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3338 (vect_transform_loop): Likewise.
3339 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3341 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3343 * tree-vectorizer.h (vect_schedule_slp): Return void.
3344 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3345 (vect_schedule_slp): Likewise.
3347 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3349 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3351 (vect_transform_loop): Update calls accordingly. Schedule SLP
3352 instances before the main loop, if any exist.
3354 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3356 PR tree-optimization/86749
3357 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3358 If the lhs is used in a COND_EXPR, check that it is being used
3359 as the "then" or "else" value.
3361 2018-08-01 Tom de Vries <tdevries@suse.de>
3364 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3365 speculation_safe_value_not_needed.
3367 2018-08-01 Richard Biener <rguenther@suse.de>
3369 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3372 2018-08-01 Martin Liska <mliska@suse.cz>
3374 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3375 format how successful transformation is dumped.
3376 (gimple_mod_pow2_value_transform): Likewise.
3377 (gimple_mod_subtract_transform): Likewise.
3378 (gimple_stringops_transform): Likewise.
3380 2018-08-01 Martin Liska <mliska@suse.cz>
3383 * value-prof.c (interesting_stringop_to_profile_p):
3384 Simplify the code and add BUILT_IN_MEMMOVE.
3385 (gimple_stringops_transform): Likewise.
3387 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3389 * config/aarch64/aarch64-simd.md
3390 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3391 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3392 use GPI iterator instead of SI mode.
3394 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3396 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3397 rs6000_speculation_barrier.
3398 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3399 new barrier pattern name.
3401 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3403 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3404 (speculation_barrier): New insn.
3406 2018-08-01 Richard Biener <rguenther@suse.de>
3409 * graphite.h: Include isl/id.h and isl/space.h to allow build
3412 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3415 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3416 mode for COFF targets.
3417 * defaults.h (TARGET_COFF): Define.
3418 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3419 TARGET_COFF): Define.
3420 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3421 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3422 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3424 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3426 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3427 * gimple-streamer-out.c (output_bb): Save it.
3428 * lto-streamer-in.c (input_struct_function_base): Restore
3429 instance discriminator if available. Create map on demand.
3430 * lto-streamer-out.c (output_struct_function_base): Save it if
3432 * final.c (decl_to_instance_map): Document LTO strategy.
3434 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3435 Olivier Hainque <hainque@adacore.com>
3437 * debug.h (decl_to_instance_map_t): New type.
3438 (decl_to_instance_map): Declare.
3439 (maybe_create_decl_to_instance_map): New inline function.
3440 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3441 to track basic block discriminators.
3442 (final_start_function_1): Initialize them.
3443 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3445 (decl_to_instance_map): New variable.
3446 (map_decl_to_instance, maybe_set_discriminator): New functions.
3447 (notice_source_line): Set discriminator.
3449 2018-07-31 Ian Lance Taylor <iant@golang.org>
3451 * targhooks.c (default_have_speculation_safe_value): Add
3454 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3456 * dump-context.h: Include "pretty-print.h".
3457 (dump_context::refresh_dumps_are_enabled): New decl.
3458 (dump_context::emit_item): New decl.
3459 (class dump_context): Add fields "m_test_pp" and
3461 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3462 (temp_dump_context::get_dumped_text): New decl.
3463 (class temp_dump_context): Add field "m_pp".
3464 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3465 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3467 (set_dump_file): Update for above change.
3468 (set_alt_dump_file): Likewise.
3469 (dump_loc): New overload, taking a pretty_printer *.
3470 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3471 to any test pretty-printer.
3472 (make_item_for_dump_gimple_stmt): New function, adapted from
3473 optinfo::add_gimple_stmt.
3474 (dump_context::dump_gimple_stmt): Call it, and use the result,
3475 eliminating the direct usage of dump_file and alt_dump_file in
3476 favor of indirectly using them via emit_item.
3477 (make_item_for_dump_gimple_expr): New function, adapted from
3478 optinfo::add_gimple_expr.
3479 (dump_context::dump_gimple_expr): Call it, and use the result,
3480 eliminating the direct usage of dump_file and alt_dump_file in
3481 favor of indirectly using them via emit_item.
3482 (make_item_for_dump_generic_expr): New function, adapted from
3484 (dump_context::dump_generic_expr): Call it, and use the result,
3485 eliminating the direct usage of dump_file and alt_dump_file in
3486 favor of indirectly using them via emit_item.
3487 (make_item_for_dump_printf_va): New function, adapted from
3488 optinfo::add_printf_va.
3489 (make_item_for_dump_printf): New function.
3490 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3491 and use the result, eliminating the direct usage of dump_file and
3492 alt_dump_file in favor of indirectly using them via emit_item.
3493 (make_item_for_dump_dec): New function.
3494 (dump_context::dump_dec): Call it, and use the result,
3495 eliminating the direct usage of dump_file and alt_dump_file in
3496 favor of indirectly using them via emit_item.
3497 (make_item_for_dump_symtab_node): New function, adapted from
3498 optinfo::add_symtab_node.
3499 (dump_context::dump_symtab_node): Call it, and use the result,
3500 eliminating the direct usage of dump_file and alt_dump_file in
3501 favor of indirectly using them via emit_item.
3502 (dump_context::begin_scope): Reimplement, avoiding direct usage
3503 of dump_file and alt_dump_file in favor of indirectly using them
3505 (dump_context::emit_item): New member function.
3506 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3507 Set up test pretty-printer on the underlying context. Call
3508 refresh_dumps_are_enabled.
3509 (temp_dump_context::~temp_dump_context): Call
3510 refresh_dumps_are_enabled.
3511 (temp_dump_context::get_dumped_text): New member function.
3512 (selftest::verify_dumped_text): New function.
3513 (ASSERT_DUMPED_TEXT_EQ): New macro.
3514 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3515 and then without optinfo enabled. Add uses of
3516 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3517 * dumpfile.h: Update comment for the dump_* API.
3518 * optinfo-emit-json.cc
3519 (selftest::test_building_json_from_dump_calls): Update for new
3520 param for temp_dump_context ctor.
3521 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3522 and "m_owned" field.
3523 (optinfo_item::~optinfo_item): Likewise.
3524 (optinfo::add_item): New member function.
3525 (optinfo::emit): Update comment.
3526 (optinfo::add_string): Delete.
3527 (optinfo::add_printf): Delete.
3528 (optinfo::add_printf_va): Delete.
3529 (optinfo::add_gimple_stmt): Delete.
3530 (optinfo::add_gimple_expr): Delete.
3531 (optinfo::add_tree): Delete.
3532 (optinfo::add_symtab_node): Delete.
3533 (optinfo::add_dec): Delete.
3534 * optinfo.h (class dump_context): New forward decl.
3535 (optinfo::add_item): New decl.
3536 (optinfo::add_string): Delete.
3537 (optinfo::add_printf): Delete.
3538 (optinfo::add_printf_va): Delete.
3539 (optinfo::add_gimple_stmt): Delete.
3540 (optinfo::add_gimple_expr): Delete.
3541 (optinfo::add_tree): Delete.
3542 (optinfo::add_symtab_node): Delete.
3543 (optinfo::add_dec): Delete.
3544 (optinfo::add_poly_int): Delete.
3545 (optinfo_item::optinfo_item): Remove "owned" param.
3546 (class optinfo_item): Remove field "m_owned".
3548 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3551 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3552 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3553 requested variable alignment.
3554 (expand_one_ssa_partition): Likewise.
3555 (expand_one_var): Likewise.
3557 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3559 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3560 to speculation_safe_value_not_needed.
3562 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3564 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3565 * targhooks.c (speculation_safe_value_not_needed): New function.
3566 * target.def (have_speculation_safe_value): Update documentation.
3567 * doc/tm.texi: Regenerated.
3569 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3571 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3572 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3574 (despeculate_copy<ALLI:mode>_insn): New insn.
3575 (despeculate_copyti_insn): New insn.
3576 (despeculate_simple<ALLI:mode>): New insn
3577 (despeculate_simpleti): New insn.
3578 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3580 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3581 aarch64_speculation_safe_value.
3582 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3584 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3586 * config/aarch64/aarch64-speculation.cc: New file.
3587 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3588 before pass_reorder_blocks.
3589 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3591 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3592 X14 and X15 when tracking speculation.
3593 * config/aarch64/aarch64.md (register name constants): Add
3594 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3595 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3596 (speculation_barrier): New insn attribute.
3597 (cmp<mode>): Allow SP in comparisons.
3598 (speculation_tracker): New insn.
3599 (speculation_barrier): Add speculation_barrier attribute.
3600 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3601 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3602 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3604 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3606 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3607 aarch64_track_speculation is true.
3608 (tb<optab><mode>1): Likewise.
3609 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3610 generate CB[N]Z when tracking speculation.
3611 (aarch64_split_compare_and_swap): Likewise.
3612 (aarch64_split_atomic_op): Likewise.
3614 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3616 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3618 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3620 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3621 (speculation_barrier): New insn.
3623 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3625 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3626 * config/arm/arm.md (speculation_barrier): New expand.
3627 (speculation_barrier_insn): New pattern.
3629 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3631 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3632 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3633 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3634 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3636 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3637 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3638 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3639 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3640 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3641 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3642 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3643 * builtins.c (expand_speculation_safe_value): New function.
3644 (expand_builtin): Call it.
3645 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3646 * doc/extend.texi: Document __builtin_speculation_safe_value.
3647 * doc/md.texi: Document "speculation_barrier" pattern.
3648 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3649 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3650 * doc/tm.texi: Regenerated.
3651 * target.def (have_speculation_safe_value, speculation_safe_value): New
3653 * targhooks.c (default_have_speculation_safe_value): New function.
3654 (default_speculation_safe_value): New function.
3655 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3656 (default_speculation_safe_value): Add prototype.
3658 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3660 * dump-context.h (dump_context::dump_loc): New decl.
3661 * dumpfile.c (dump_context::dump_loc): New member function.
3662 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3663 and dump_gimple_stmt.
3664 (dump_context::dump_gimple_expr_loc): Likewise, using
3666 (dump_context::dump_generic_expr_loc): Likewise, using
3668 (dump_context::dump_printf_loc_va): Likewise, using
3670 (dump_context::begin_scope): Explicitly using the global function
3671 "dump_loc", rather than the member function.
3673 2018-07-31 Martin Sebor <msebor@redhat.com>
3675 PR tree-optimization/86741
3676 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3678 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3680 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3681 depend on whether prefetch instructions will be emitted or not.
3682 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3683 will be emitted or not.
3684 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3685 (TARGET_SETMEM_PFD): New macros.
3687 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3689 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3690 (NULL_STMT_VEC_INFO): Delete.
3691 (stmt_vec_info::operator*): Likewise.
3692 (stmt_vec_info::operator gimple *): Likewise.
3693 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3694 of NULL_STMT_VEC_INFO.
3695 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3696 (vect_reassociating_reduction_p): Likewise.
3697 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3698 (vectorizable_store): Likewise.
3699 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3700 (vec_info::free_stmt_vec_infos): Likewise.
3702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3704 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3705 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3709 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3710 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3711 (vec_info::free_stmt_vec_info): New private member functions.
3712 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3713 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3714 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3715 set_stmt_vec_info_vec and free_stmt_vec_infos.
3716 * tree-vect-loop.c (_loop_vec_info): Remove call to
3717 set_stmt_vec_info_vec.
3718 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3719 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3720 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3721 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3722 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3723 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3724 with the clearing in the xcalloc.
3725 (stmt_vec_info_vec): Delete.
3726 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3727 (vectorize_loops): Likewise.
3728 (vec_info::~vec_info): Remove argument from call to
3729 free_stmt_vec_infos.
3730 (vec_info::add_stmt): Remove vinfo argument from call to
3733 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3735 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3736 rather than a gimple stmt.
3737 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3738 information for pattern statements when passed the original
3739 statement; instead wait to be passed the pattern statement itself.
3740 Don't call set_vinfo_for_stmt here.
3741 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3742 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3743 stmt_vec_infos here.
3744 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3745 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3746 stmt_vec_infos entry.
3748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3750 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3751 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3752 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3753 * tree-vect-stmts.c (vectorizable_call): Likewise.
3754 (vectorizable_simd_clone_call): Likewise.
3756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3758 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3759 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3760 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3761 * tree-vect-loop.c (vect_transform_loop): Likewise.
3762 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3763 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3765 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3767 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3768 (vect_dr_stmt): Delete.
3769 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3770 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3772 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3773 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3774 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3775 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3776 (vect_analyze_data_refs): Likewise.
3777 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3779 (vect_find_same_alignment_drs): Likewise.
3780 (vect_slp_analyze_node_dependences): Update calls accordingly.
3781 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3782 instead of DR_VECT_AUX.
3783 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3784 of a vector data references. Use vec_info::lookup_dr instead of
3786 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3787 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3788 instead of DR_VECT_AUX.
3790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3792 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3794 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3796 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3797 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3798 (vect_gen_prolog_loop_niters): Likewise.
3800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3802 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3803 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3804 (vect_known_alignment_in_bytes, vect_dr_behavior)
3805 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3806 instead of data_references. Update calls to other routines for
3807 which the same change has been made.
3808 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3809 dr_vec_infos instead of stmt_vec_infos.
3810 (vect_analyze_data_ref_dependence): Update call accordingly.
3811 (vect_slp_analyze_data_ref_dependence)
3812 (vect_record_base_alignments): Use DR_VECT_AUX.
3813 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3814 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3815 (vector_alignment_reachable_p, vect_get_data_access_cost)
3816 (vect_peeling_supportable, vect_analyze_group_access_1)
3817 (vect_analyze_group_access, vect_analyze_data_ref_access)
3818 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3819 (vect_compile_time_alias, vect_small_gap_p)
3820 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3821 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3822 instead of data_references. Update calls to other routines for
3823 which the same change has been made.
3824 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3825 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3826 (vect_slp_analyze_and_verify_node_alignment)
3827 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3828 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3829 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3831 (_vect_peel_info::dr): Replace with...
3832 (_vect_peel_info::dr_info): ...this new field.
3833 (vect_peeling_hash_get_most_frequent)
3834 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3835 (vect_peeling_hash_get_lowest_cost):
3836 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3837 routines for which the same change has been made.
3838 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3840 * tree-vect-loop-manip.c (get_misalign_in_elems)
3841 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3843 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3844 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3845 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3846 (get_group_load_store_type, get_negative_load_store_type)
3847 (vect_get_data_ptr_increment, vectorizable_store)
3848 (vectorizable_load): Likewise.
3849 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3850 Update calls to other routines for which the same change has been made.
3852 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3854 * tree-vectorizer.h (vec_info::move_dr): New member function.
3855 (dataref_aux): Rename to...
3856 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3857 (_stmt_vec_info::dr_aux): Update accordingly.
3858 (_stmt_vec_info::data_ref_info): Delete.
3859 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3860 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3861 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3862 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3864 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3865 (STMT_VINFO_DR_INFO): New macro.
3866 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3867 (set_dr_misalignment): Update after rename of dataref_aux.
3868 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3869 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3870 initialization of STMT_VINFO_DATA_REF.
3871 * tree-vectorizer.c (vec_info::move_dr): New function.
3872 * tree-vect-patterns.c (vect_recog_bool_pattern)
3873 (vect_recog_mask_conversion_pattern)
3874 (vect_recog_gather_scatter_pattern): Use it.
3875 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3876 the "dr" and "stmt" fields of dr_vec_info instead of
3877 STMT_VINFO_DATA_REF.
3879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3881 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3882 (is_pattern_stmt_p): Use it.
3883 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3884 on pattern statements.
3886 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3888 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3889 original stmt as a stmt_vec_info rather than a gimple stmt.
3890 (vect_pattern_recog_1): Take the statement directly as a
3891 stmt_vec_info, rather than via a gimple_stmt_iterator.
3892 Update call to vect_mark_pattern_stmts.
3893 (vect_pattern_recog): Update calls accordingly.
3895 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3897 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3898 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3899 a vect_def_type for the first argument.
3900 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3901 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3902 operand if it isn't defined by a vectorized statement.
3903 (vect_build_gather_load_calls): Remove the mask_dt argument and
3904 update calls to vect_get_vec_def_for_stmt_copy.
3905 (vectorizable_bswap): Likewise the dt argument.
3906 (vectorizable_call): Update calls to vectorizable_bswap and
3907 vect_get_vec_def_for_stmt_copy.
3908 (vectorizable_simd_clone_call, vectorizable_assignment)
3909 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3910 (vectorizable_comparison): Update calls to
3911 vect_get_vec_def_for_stmt_copy.
3912 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3914 (vect_get_loop_based_defs): Remove dt argument and update call
3915 to vect_get_vec_def_for_stmt_copy.
3916 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3917 and vect_get_vec_def_for_stmt_copy.
3918 (vectorizable_load): Update calls to vect_build_gather_load_calls
3919 and vect_get_vec_def_for_stmt_copy.
3920 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3921 (vectorizable_reduction, vectorizable_live_operation): Update calls
3922 to vect_get_vec_def_for_stmt_copy.
3924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3926 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3927 and gimple stmt arguments with a stmt_vec_info.
3928 (vect_record_base_alignments): Update calls accordingly.
3929 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3930 and gimple stmt arguments with a stmt_vec_info.
3931 (vect_build_slp_tree_1): Remove vinfo argument and update call
3932 to vect_record_max_nunits.
3933 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3934 and vect_record_max_nunits.
3936 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3938 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3939 file and take a stmt_vec_info instead of a gimple stmt.
3940 (supportable_widening_operation, vect_finish_replace_stmt)
3941 (vect_finish_stmt_generation, vect_get_store_rhs)
3942 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3943 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3944 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3945 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3946 (vect_create_data_ref_ptr, bump_vector_ptr)
3947 (vect_permute_store_chain, vect_setup_realignment)
3948 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3949 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3950 (vectorizable_reduction, vectorizable_induction)
3951 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3952 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3953 than gimple stmts as arguments.
3954 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3955 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3956 (can_group_stmts_p, vect_check_gather_scatter)
3957 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3958 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3959 (vect_permute_load_chain, vect_shift_permute_load_chain)
3960 (vect_transform_grouped_load)
3961 (vect_record_grouped_load_vectors): Likewise.
3962 * tree-vect-loop.c (vect_fixup_reduc_chain)
3963 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3964 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3965 (vectorizable_reduction, vectorizable_induction)
3966 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3967 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3968 (vect_get_load_store_mask): Likewise.
3969 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3970 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3971 * tree-vect-stmts.c (vect_mark_relevant)
3972 (is_simple_and_all_uses_invariant)
3973 (exist_non_indexing_operands_for_use_p, process_use)
3974 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3975 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3976 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3977 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3978 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3979 (get_negative_load_store_type, get_load_store_type)
3980 (vect_check_load_store_mask, vect_check_store_rhs)
3981 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3982 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3983 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3984 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3985 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3986 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3987 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3988 (supportable_widening_operation): Likewise.
3990 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3992 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3993 a stmt_vec_info instead of a gcall.
3994 (vect_check_gather_scatter): Update call accordingly.
3995 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3997 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3998 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3999 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4000 instead of a gimple stmt.
4001 (vect_transform_loop): Update calls accordingly.
4002 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4003 stmt_vec_infos instead of gimple stmts.
4004 (vect_analyze_slp_instance): Update use accordingly.
4005 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4006 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4007 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4008 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4009 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4010 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4011 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4012 down to subroutines.
4014 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4016 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4017 of the worklist from a vector of gimple stmts to a vector of
4019 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4020 (vect_mark_stmts_to_be_vectorized): Likewise
4022 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4024 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4025 statement before passing it to vect_analyze_stmt.
4026 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4027 the chain of phi vector definitions. Track the exit phi via its
4029 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4030 STMT_VINFO_REDUC_DEF.
4031 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4032 stmt_vec_infos to handle the statement chains.
4033 (vect_get_slp_defs): Record the first statement in the node
4034 using a stmt_vec_info.
4035 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4036 statements here and pass their stmt_vec_info down to subroutines.
4037 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4038 down to vect_finish_stmt_generation.
4039 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4040 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4041 stmt_vec_infos to subroutines.
4042 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4047 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4048 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4049 (vect_permute_store_chain, vect_setup_realignment)
4050 (vect_permute_load_chain, vect_shift_permute_load_chain)
4051 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4052 stmts internally, and when passing values to other vectorizer routines.
4053 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4054 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4055 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4056 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4057 (vectorizable_reduction, vectorizable_induction)
4058 (vectorizable_live_operation, vect_transform_loop_stmt)
4059 (vect_transform_loop): Likewise.
4060 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4061 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4062 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4063 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4064 (vect_slp_analyze_node_operations_1): Likewise.
4065 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4066 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4067 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4068 (vect_finish_stmt_generation_1, get_group_load_store_type)
4069 (get_load_store_type, vect_build_gather_load_calls)
4070 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4071 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4072 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4073 (vectorizable_store, vectorizable_load, vectorizable_condition)
4074 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4075 (supportable_widening_operation): Likewise.
4076 (vect_get_vector_types_for_stmt): Likewise.
4077 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4079 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4081 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4082 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4083 (vect_permute_store_chain, vect_permute_load_chain)
4084 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4085 repeated stmt_vec_info lookups.
4086 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4087 (vect_update_ivs_after_vectorizer): Likewise.
4088 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4089 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4090 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4091 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4092 (vect_bb_slp_scalar_cost): Likewise.
4093 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4097 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4098 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4099 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4100 to get gassigns and gcalls, rather than operating on generc gimple
4102 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4103 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4104 (vectorizable_load, vect_analyze_stmt): Likewise.
4105 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4107 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4109 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4110 return stmt_vec_infos rather than gimple stmts. Do not accept
4112 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4114 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4115 Update use of get_later_stmt.
4116 (vect_get_constant_vectors): Update call accordingly.
4117 (vect_schedule_slp_instance): Likewise
4118 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4119 (vect_slp_analyze_instance_dependence): Likewise.
4120 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4124 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4125 (stmt_info_for_cost::stmt_info): ...this new field.
4126 (add_stmt_costs): Update accordingly.
4127 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4128 (vect_get_known_peeling_cost): Likewise.
4129 (vect_estimate_min_profitable_iters): Likewise.
4130 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4134 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4135 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4136 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4138 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4140 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4142 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4143 a gimple stmt to a stmt_vec_info.
4144 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4148 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4149 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4150 (_loop_vec_info::reduction_chains): Likewise.
4151 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4153 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4155 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4157 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4158 a gimple stmt to a stmt_vec_info.
4159 (_stmt_vec_info::next_element): Likewise.
4160 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4161 (vect_slp_analyze_and_verify_node_alignment)
4162 (vect_analyze_group_access_1, vect_analyze_group_access)
4163 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4164 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4165 (vect_supportable_dr_alignment): Update accordingly.
4166 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4167 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4168 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4169 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4170 * tree-vect-slp.c (vect_build_slp_tree_1)
4171 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4172 (vect_split_slp_store_group, vect_analyze_slp_instance)
4173 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4174 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4175 (get_group_load_store_type, get_load_store_type)
4176 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4177 (vect_transform_stmt, vect_remove_stores): Likewise.
4179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4181 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4183 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4184 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4185 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4186 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4187 (vector_alignment_reachable_p, vect_get_data_access_cost)
4188 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4189 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4190 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4191 (vect_analyze_group_access_1, vect_analyze_group_access)
4192 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4193 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4194 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4195 result of vect_dr_stmt and use the stmt_vec_info instead of
4196 the associated gimple stmt.
4197 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4198 (vect_gen_prolog_loop_niters): Likewise.
4199 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4203 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4204 to a vec<stmt_vec_info>.
4205 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4206 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4208 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4209 to a vec<stmt_vec_info>.
4210 (bst_traits::value_type, bst_traits::value_type): Likewise.
4211 (bst_traits::hash): Update accordingly.
4212 (vect_get_and_check_slp_defs): Change the stmts parameter from
4213 a vec<gimple *> to a vec<stmt_vec_info>.
4214 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4215 (vect_build_slp_tree): Likewise.
4216 (vect_build_slp_tree_2): Likewise. Update uses of
4217 SLP_TREE_SCALAR_STMTS.
4218 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4219 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4220 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4221 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4222 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4223 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4224 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4225 (vect_get_constant_vectors, vect_get_slp_defs)
4226 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4227 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4228 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4229 instead of gimple stmts.
4230 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4231 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4232 (vect_slp_analyze_instance_dependence): Update uses of
4233 SLP_TREE_SCALAR_STMTS.
4234 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4235 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4236 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4237 (get_initial_defs_for_reduction): Likewise.
4238 (vect_create_epilog_for_reduction): Likewise.
4239 (vectorize_fold_left_reduction): Likewise.
4240 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4241 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4242 (can_vectorize_live_stmts): Likewise.
4244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4246 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4247 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4248 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4250 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4252 (gather_scalar_reductions): Update after above interface changes.
4253 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4254 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4256 (vect_force_simple_reduction): Likewise.
4257 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4258 LOOP_VINFO_REDUCTIONS.
4259 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4263 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4264 a gimple stmt to a stmt_vec_info.
4265 * tree-vect-loop.c (vect_active_double_reduction_p)
4266 (vect_force_simple_reduction, vectorizable_reduction): Update
4269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4271 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4272 vec<gimple *> to a vec<stmt_vec_info>.
4273 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4274 the reduction_phis argument from a vec<gimple *> to a
4276 (vectorizable_reduction): Likewise the phis local variable that
4277 is passed to vect_create_epilog_for_reduction. Update for new type
4278 of SLP_TREE_VEC_STMTS.
4279 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4280 (vectorizable_live_operation): Likewise.
4281 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4282 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4286 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4287 a gimple stmt to a stmt_vec_info.
4288 (vectorizable_condition, vectorizable_live_operation)
4289 (vectorizable_reduction, vectorizable_induction): Pass back the
4290 vectorized statement as a stmt_vec_info.
4291 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4292 use of STMT_VINFO_VEC_STMT.
4293 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4294 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4295 as stmt_vec_infos rather than gimple stmts.
4296 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4298 (vectorizable_live_operation): Likewise.
4299 (vectorizable_reduction, vectorizable_induction): Likewise,
4300 updating use of STMT_VINFO_VEC_STMT.
4301 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4302 of STMT_VINFO_VEC_STMT.
4303 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4304 (vectorizable_simd_clone_call, vectorizable_conversion)
4305 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4306 (vectorizable_store, vectorizable_load, vectorizable_condition)
4307 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4308 from a gimple stmt to a stmt_vec_info.
4309 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4310 pointer to a stmt_vec_info to the vectorizable_* routines.
4312 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4314 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4315 a gimple stmt to a stmt_vec_info.
4316 (is_pattern_stmt_p): Update accordingly.
4317 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4318 (vect_record_grouped_load_vectors): Likewise.
4319 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4320 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4321 (vect_model_reduction_cost): Likewise.
4322 (vect_create_epilog_for_reduction): Likewise.
4323 (vectorizable_reduction, vectorizable_induction): Likewise.
4324 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4325 Return the stmt_vec_info for the pattern statement.
4326 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4327 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4328 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4329 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4330 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4331 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4332 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4333 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4335 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4337 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4338 (vect_finish_stmt_generation): Likewise.
4339 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4340 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4341 (vect_build_gather_load_calls): Use the return value of the above
4342 functions instead of a separate call to vinfo_for_stmt. Use narrow
4343 scopes for the input gimple stmt and wider scopes for the associated
4344 stmt_vec_info. Use vec_info::lookup_def when setting these
4345 stmt_vec_infos from an SSA_NAME definition.
4346 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4347 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4348 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4349 (vectorizable_store, vectorizable_load, vectorizable_condition)
4350 (vectorizable_comparison): Likewise.
4351 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4352 (vectorizable_reduction): Likewise.
4354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4356 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4357 stmt_vec_info * parameter before the optional gimple **.
4358 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4359 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4360 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4361 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4362 (vectorizable_live_operation): Likewise.
4363 * tree-vect-patterns.c (type_conversion_p): Likewise.
4364 (vect_look_through_possible_promotion): Likewise.
4365 (vect_recog_rotate_pattern): Likewise.
4366 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4368 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4370 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4371 a typedef to a wrapper class.
4372 (NULL_STMT_VEC_INFO): New macro.
4373 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4374 (stmt_vec_info::operator*): New function.
4375 (stmt_vec_info::operator gimple *): Likewise.
4376 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4377 (add_stmt_costs): Likewise.
4378 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4379 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4380 (vect_get_known_peeling_cost): Likewise.
4381 (vect_estimate_min_profitable_iters): Likewise.
4382 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4383 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4384 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4385 (vectorizable_store, free_stmt_vec_infos): Likewise.
4386 (new_stmt_vec_info): Change return type of xcalloc to
4389 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4391 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4392 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4393 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4394 a single_imm_use-based sequence.
4395 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4397 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4399 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4400 * tree-vectorizer.c (vec_info::lookup_def): New function.
4401 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4402 (vect_widened_op_tree): Likewise.
4403 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4404 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4405 (vectorizable_reduction): Likewise.
4406 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4408 (vect_is_slp_reduction): Update calls accordingly. Use
4409 vec_info::lookup_def.
4410 (vect_is_simple_reduction): Likewise
4411 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4413 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4415 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4416 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4417 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4419 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4420 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4421 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4422 (vect_is_slp_reduction, vectorizable_induction)
4423 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4424 * tree-vect-patterns.c (vect_init_pattern_stmt):
4425 (vect_determine_min_output_precision_1, vect_determine_precisions)
4426 (vect_pattern_recog): Likewise.
4427 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4428 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4429 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4430 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4431 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4432 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4433 info field from a loop to a loop_vec_info.
4435 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4437 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4438 (vec_info::add_stmt): Declare.
4439 * tree-vectorizer.c (vec_info::add_stmt): New function.
4440 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4441 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4442 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4443 (vectorizable_induction): Likewise.
4444 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4445 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4446 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4447 (vectorizable_load): Likewise.
4448 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4449 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4450 (vect_recog_gather_scatter_pattern): Likewise.
4451 (append_pattern_def_seq): Likewise. Remove a check that is
4452 performed by add_stmt itself.
4454 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4456 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4457 which make_ssa_name was called with new_stmt before new_stmt
4460 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4462 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4464 (vect_is_slp_reduction): ...here...
4465 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4466 that are already known to be false.
4468 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4470 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4471 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4472 STMT_VINFO_NUM_SLP_USES when it's true.
4473 (vect_free_slp_instance): Add a final_p parameter and pass it to
4475 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4476 (vect_analyze_slp_instance): Likewise.
4477 (vect_slp_analyze_operations): Likewise.
4478 (vect_slp_analyze_bb_1): Likewise.
4479 * tree-vectorizer.c (vec_info): Likewise.
4480 * tree-vect-loop.c (vect_transform_loop): Likewise.
4482 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4484 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4485 function is not called for second and subsequent members of
4488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4490 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4491 cases for nested loops from here to ...
4492 (vect_create_epilog_for_reduction): ...here. Only call
4493 vect_is_simple_use for inner-loop reductions.
4495 2018-07-31 Martin Liska <mliska@suse.cz>
4497 PR gcov-profile/85338
4498 PR gcov-profile/85350
4499 PR gcov-profile/85372
4500 * profile.c (struct location_triplet): New.
4501 (struct location_triplet_hash): Likewise.
4502 (output_location): Do not output a BB that
4503 is already recorded for a line.
4504 (branch_prob): Use streamed_locations.
4506 2018-07-31 Martin Liska <mliska@suse.cz>
4508 PR gcov-profile/85370
4509 * coverage.c (coverage_begin_function): Do not mark target
4510 clones as artificial functions.
4512 2018-07-31 Martin Liska <mliska@suse.cz>
4514 PR gcov-profile/83813
4515 PR gcov-profile/84758
4516 PR gcov-profile/85217
4517 PR gcov-profile/85332
4518 * profile.c (branch_prob): Do not record GOTO expressions
4519 for GIMPLE statements which locations are already streamed.
4521 2018-07-31 Olivier Hainque <hainque@adacore.com>
4523 * gcc.c (handle_spec_function): Accept a soft_matched_part
4524 argument, as do_spec_1. Pass it down to ...
4525 (eval_spec_function): Accept a soft_matched_part argument,
4526 and pass it down to ...
4527 (do_spec_2): Accept a soft_matched_part argument, and pass
4528 it down to do_spec_1.
4529 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4530 (handle_braces): Update call to handle_spec_function.
4531 (driver::set_up_specs): Update calls to do_spec_2.
4532 (compare_debug_dump_opt_spec_function): Likewise.
4533 (compare_debug_self_opt_spec_function): Likewise.
4535 2018-07-31 Olivier Hainque <hainque@adacore.com>
4537 * common.opt (nolibc): New option.
4538 * doc/invoke.texi (Link Options): Document it.
4539 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4540 * config/alpha/linux.h: Likewise.
4541 * config/arc/elf.h: Likewise.
4542 * config/arm/uclinux-elf.h: Likewise.
4543 * config/arm/unknown-elf.h: Likewise.
4544 * config/avr/avrlibc.h: Likewise.
4545 * config/bfin/bfin.h: Likewise.
4546 * config/bfin/linux.h: Likewise.
4547 * config/bfin/uclinux.h: Likewise.
4548 * config/darwin.h: Likewise.
4549 * config/darwin10.h: Likewise.
4550 * config/darwin12.h: Likewise.
4551 * config/gnu-user.h: Likewise.
4552 * config/lm32/uclinux-elf.h: Likewise.
4553 * config/pa/pa-hpux11.h: Likewise.
4554 * config/pa/pa64-hpux.h: Likewise.
4555 * config/sparc/sparc.h: Likewise.
4557 2018-07-31 Olivier Hainque <hainque@adacore.com>
4559 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4560 undefined variables.
4562 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4565 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4568 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4570 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4571 terminated string literal.
4573 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4575 PR rtl-optimization/85160
4576 * combine.c (is_just_move): New function.
4577 (try_combine): Allow combining two instructions into two if neither of
4578 the original instructions was a move.
4580 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4583 * doc/extend.texi (Global Register Variables): Discourage use of type
4585 (Local Register Variables): Likewise.
4587 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4589 PR tree-optimization/86506
4590 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4592 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4595 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4596 hard_regno, make sure no insn between `from` and `to` clobbers it.
4598 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4599 Tom de Vries <tdevries@suse.de>
4601 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4602 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4603 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4604 PTX_DEFAULT_RUNTIME_DIM.
4605 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4607 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4609 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4610 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4611 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4613 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4615 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4617 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4618 predicate to reflect toc fusion has been deleted.
4619 (toc_fusion_mem_raw): Delete, no longer used.
4620 (toc_fusion_mem_wrapped): Likewise.
4621 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4623 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4624 Delete, no longer used.
4625 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4626 meant to be used for toc fusion.
4627 (rs6000_debug_print_mode): Delete toc fusion debugging.
4628 (rs6000_debug_reg_global): Likewise.
4629 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4630 fusion and secondary reload support that were never used.
4631 (rs6000_option_override_internal): Delete TOC fusion, that was only
4632 partially defined, and it did not work unless you also used the
4634 (rs6000_legitimate_address_p): Delete TOC fusion support.
4635 (rs6000_opt_masks): Likewise.
4636 (fusion_wrap_memory_address): Delete function, no longer used.
4637 (fusion_split_address); Delete TOC fusion support.
4638 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4639 longer used with toc fusion being deleted.
4640 (TARGET_TOC_FUSION_FP): Likewise.
4641 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4643 (toc fusion spliter): Delete TOC fusion support.
4644 (toc_fusionload_<mode>): Likewise.
4645 (toc_fusionload_di): Likewise.
4646 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4647 longer needs to be named. Rename predicate to delete TOC fusion.
4648 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4649 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4650 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4651 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4652 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4654 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4656 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4657 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4658 __int128 in built-in function prototypes.
4659 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4660 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4662 2018-07-27 Martin Sebor <msebor@redhat.com>
4664 PR tree-optimization/86696
4665 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4666 types, including enums.
4667 (handle_char_store): Be prepared for the above function to fail.
4669 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4671 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4672 when optimization level is lower than 2 or optimize for size.
4674 2018-07-26 Martin Sebor <msebor@redhat.com>
4676 PR tree-optimization/86043
4677 PR tree-optimization/86042
4678 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4679 (get_string_cst_length): Rename...
4680 (get_min_string_length): ...to this. Add argument.
4681 (handle_char_store): Extend to handle multi-character stores by
4683 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4684 * tree.h (initializer_zerop): Add argument.
4686 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4689 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4690 declare target to variables if they have always,{to,from,tofrom} map
4693 2018-07-26 Martin Liska <mliska@suse.cz>
4696 * lto-wrapper.c: Add linker_output as prefix
4697 for ltrans_output_file.
4699 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4701 PR rtl-optimization/85805
4702 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4703 value for hard registers if that was written in the same mode.
4705 2018-07-26 Martin Liska <mliska@suse.cz>
4707 PR gcov-profile/86536
4708 * gcov.c (format_gcov): Use printf format %.*f directly
4709 and do not handle special values.
4711 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4713 * common/config/arc/arc-common.c (arc_option_optimization_table):
4714 Update default optimizations for size.
4716 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4718 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4719 * config/arc/constraints.md (CfZ): New constraint.
4720 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4721 (subsf3_fpu): Likewise.
4722 (cmpsf_fpu): Likewise.
4723 (cmpsf_fpu_uneq): Likewise.
4725 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4727 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4729 (arc_is_uncached_mem_p): uncached applies to both the variable and
4732 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4734 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4737 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4739 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4740 field "m_scopes" from vec to auto_vec.
4742 2018-07-25 Martin Liska <mliska@suse.cz>
4744 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4747 2018-07-25 Richard Biener <rguenther@suse.de>
4750 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4751 special wrt context_die late.
4752 (gen_subprogram_die): Re-use DIEs in local scope.
4754 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4756 PR tree-optimization/86644
4757 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4759 2018-07-25 Martin Liska <mliska@suse.cz>
4762 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4763 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4765 2018-07-25 Martin Liska <mliska@suse.cz>
4768 * params.def: Explain ASan abbreviation and provide
4769 a documentation link.
4771 2018-07-24 Martin Sebor <msebor@redhat.com>
4773 PR tree-optimization/86622
4774 PR tree-optimization/86532
4775 * builtins.h (string_length): Declare.
4776 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4777 (check_access): Be prepared for non-constant length ranges.
4778 (string_length): Make extern.
4779 * expr.c (string_constant): Only handle the minor non-constant
4780 array index. Use string_constant to compute the length of
4781 a generic string constant.
4783 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4785 PR tree-optimization/86618
4786 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4787 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4789 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4791 PR tree-optimization/86636
4792 * json.cc (json::object::set): Fix comment. Add assertions.
4793 (json::array::append): Move here from json.h. Add comment and an
4795 (json::string::string): Likewise.
4796 * json.h (json::array::append): Move to json.cc.
4797 (json::string::string): Likewise.
4798 * optinfo-emit-json.cc
4799 (optrecord_json_writer::impl_location_to_json): Assert that we
4800 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4801 wrapper around it. Expand the location once, rather than three
4803 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4804 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4806 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4807 places. Fix some overlong lines.
4809 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4811 * config/aarch64/aarch64-simd.md
4812 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4813 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4814 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4815 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4816 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4817 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4818 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4819 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4820 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4822 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4825 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4826 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4827 and abs_d == d, do the power of two handling if profitable.
4829 2018-07-24 Richard Biener <rguenther@suse.de>
4831 * match.pd: Add BIT_FIELD_REF canonicalizations.
4833 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4836 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4838 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4840 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4841 terminated STRING_CST object.
4843 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4845 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4847 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4849 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4850 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4851 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4852 the elements into a register.
4853 (rs6000_split_v4si_init_di_reg): Delete.
4854 (rs6000_split_v4si_init): Delete.
4855 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4856 (vsx_init_v4si): Rewrite as a define_expand.
4858 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4860 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4861 zero_extend argument from memory): New.
4863 2018-07-22 Martin Sebor <msebor@redhat.com>
4866 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4867 diagnosing calls with unknown arguments unless -Walloca-larger-than
4868 is restricted to less than PTRDIFF_MAX bytes.
4870 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4872 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4874 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4876 * pretty-print.c (text_info::set_location): Remove redundant
4877 "line_table" parameter from call to rich_location::set_range.
4879 2018-07-20 Martin Sebor <msebor@redhat.com>
4882 * builtins.c (expand_builtin_alloca): Adjust.
4883 * calls.c (alloc_max_size): Simplify.
4884 * cgraphunit.c (cgraph_node::expand): Adjust.
4885 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4887 (frame_larger_than_size): Same.
4888 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4889 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4891 * doc/invoke.texi (GCC Command Options): Document option arguments.
4892 Explain byte-size arguments and suffixes.
4893 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4894 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4895 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4896 * doc/options.texi (UInteger): Expand.
4897 (Host_Wide_Int, ByteSize): Document new properties.
4898 * final.c (final_start_function_1): Include sizes in an error message.
4899 * function.c (frame_offset_overflow): Same.
4900 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4901 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4902 Diagnose unbounded alloca calls only for limits of less than
4904 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4905 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4907 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4908 only for limits of less than PTRDIFF_MAX.
4909 * langhooks-def.h (lhd_handle_option): Change function argument
4911 * langhooks.c (lhd_handle_option): Same.
4912 * langhooks.h (handle_option): Same.
4913 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4915 (var_type, var_type_struct): Same.
4916 (var_set): Handle ByteSize flag.
4917 * optc-gen.awk: Add comments to output to ease debugging. Make
4918 use of HOST_WIDE_INT where appropriate.
4919 * opts-gen-save.awk: Use %lx to format unsigned long.
4920 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4921 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4922 arguments. Parse bytes-size suffixes.
4923 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4924 (enum_value_to_arg): Same.
4925 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4926 (handle_option): Adjust.
4927 (generate_option): Change function argument to HOST_WIDE_INT.
4928 (cmdline_handle_error): Adjust.
4929 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4930 (set_option): Change function argument to HOST_WIDE_INT.
4931 (option_enabled): Handle cl_host_wide_int.
4932 (get_option_state): Handle CLVC_SIZE.
4933 (control_warning_option): Same.
4934 * opts.c (common_handle_option): Change function argument to
4935 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4936 OPT_Wvla_larger_than_.
4937 * opts.h (enum cl_var_type): Add an enumerator.
4938 * stor-layout.c (layout_decl): Print a more meaningful warning.
4939 * toplev.c (output_stack_usage): Adjust.
4941 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4943 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4944 call to inline_expand_builtin_string_cmp.
4945 (expand_builtin_strcmp): Likewise.
4946 (expand_builtin_strncmp): Likewise.
4947 (inline_string_cmp): Delete the last parameter, change char_type_node
4948 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4950 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4951 the inlining expansion on target where the type of the call has same or
4952 narrower precision than unsigned char.
4954 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4956 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4957 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4958 * common.opt (fsave-optimization-record): New option.
4959 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4960 * doc/invoke.texi (-fsave-optimization-record): New option.
4961 * dumpfile.c: Include "optinfo-emit-json.h".
4962 (struct kv_pair): Move to coretypes.h.
4963 (optgroup_options): Make non-static.
4964 (dump_context::end_scope): Call
4965 optimization_records_maybe_pop_dump_scope.
4966 * dumpfile.h (optgroup_options): New decl.
4967 * json.cc: New file.
4969 * optinfo-emit-json.cc: New file.
4970 * optinfo-emit-json.h: New file.
4971 * optinfo.cc: Include "optinfo-emit-json.h".
4972 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4973 (optinfo_enabled_p): Check optimization_records_enabled_p.
4974 (optinfo_wants_inlining_info_p): Likewise.
4975 * optinfo.h: Update comment.
4976 * profile-count.c (profile_quality_as_string): New function.
4977 * profile-count.h (profile_quality_as_string): New decl.
4978 (profile_count::quality): New accessor.
4979 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4980 and optinfo_emit_json_cc_tests.
4981 * selftest.h (selftest::json_cc_tests): New decl.
4982 (selftest::optinfo_emit_json_cc_tests): New decl.
4983 * toplev.c: Include "optinfo-emit-json.h".
4984 (compile_file): Call optimization_records_finish.
4985 (do_compile): Call optimization_records_start.
4986 * tree-ssa-live.c: Include optinfo.h.
4987 (remove_unused_scope_block_p): Retain inlining information if
4988 optinfo_wants_inlining_info_p returns true.
4990 2018-07-20 Richard Biener <rguenther@suse.de>
4993 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4994 to cover -flto-partition=none.
4996 2018-07-20 Martin Liska <mliska@suse.cz>
4998 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4999 (get_decl_source_range): Remove unused function.
5001 2018-07-20 Richard Biener <rguenther@suse.de>
5003 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5004 (struct vn_phi_s): Likewise.
5005 (struct vn_reference_s): Likewise.
5006 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5007 for searching the slot of an entry known to be in the hash itself.
5008 (vn_phi_hasher::equal): Likewise.
5009 (vn_reference_hasher::equal): Likewise.
5010 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5012 (optimistic_info, current_info): Remove, keeping only valid_info.
5013 (vn_reference_lookup_1): Remove fallback lookup.
5014 (vn_reference_lookup_2): Likewise.
5015 (vn_nary_op_lookup_1): Likewise.
5016 (vn_phi_lookup): Likewise.
5017 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5019 (vn_reference_insert): Adjust, chain the inserted hash element
5020 at last_inserted_ref.
5021 (vn_reference_insert_pieces): Likewise.
5022 (visit_reference_op_call): Likewise.
5023 (vn_nary_op_insert_into): Chain the inserted hash element at
5025 (vn_nary_op_insert_pieces): Adjust.
5026 (vn_nary_op_insert): Likewise.
5027 (vn_nary_op_insert_stmt): Likewise.
5028 (vn_phi_insert): Adjust, chain the inserted hash element at
5030 (process_scc): Remove clearing and copying the optimistic
5031 table. Instead remove elements inserted during an optimistic
5032 iteration from the single table we maintain.
5033 (init_scc_vn): Adjust.
5034 (free_scc_vn): Likewise.
5035 (sccvn_dom_walker::record_cond): Likewise.
5036 (sccvn_dom_walker::after_dom_children): Likewise.
5038 2018-07-19 Martin Sebor <msebor@redhat.com>
5040 PR tree-optimization/84047
5041 PR tree-optimization/83776
5042 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5043 (check_array_bounds): Call it.
5045 2018-07-19 Martin Sebor <msebor@redhat.com>
5047 * align.h (align_flags): Use member initialization.
5049 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5051 * Makefile.in (OBJS): Add optinfo.o.
5052 * coretypes.h (class symtab_node): New forward decl.
5053 (struct cgraph_node): New forward decl.
5054 (class varpool_node): New forward decl.
5055 * dump-context.h: New file.
5056 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5058 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5059 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5060 (set_alt_dump_file): Likewise.
5061 (dump_context::~dump_context): New dtor.
5062 (dump_gimple_stmt): Move implementation to...
5063 (dump_context::dump_gimple_stmt): ...this new member function.
5064 Add the stmt to any pending optinfo, creating one if need be.
5065 (dump_gimple_stmt_loc): Move implementation to...
5066 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5067 Start a new optinfo and add the stmt to it.
5068 (dump_gimple_expr): Move implementation to...
5069 (dump_context::dump_gimple_expr): ...this new member function.
5070 Add the stmt to any pending optinfo, creating one if need be.
5071 (dump_gimple_expr_loc): Move implementation to...
5072 (dump_context::dump_gimple_expr_loc): ...this new member function.
5073 Start a new optinfo and add the stmt to it.
5074 (dump_generic_expr): Move implementation to...
5075 (dump_context::dump_generic_expr): ...this new member function.
5076 Add the tree to any pending optinfo, creating one if need be.
5077 (dump_generic_expr_loc): Move implementation to...
5078 (dump_context::dump_generic_expr_loc): ...this new member
5079 function. Add the tree to any pending optinfo, creating one if
5081 (dump_printf): Move implementation to...
5082 (dump_context::dump_printf_va): ...this new member function. Add
5083 the text to any pending optinfo, creating one if need be.
5084 (dump_printf_loc): Move implementation to...
5085 (dump_context::dump_printf_loc_va): ...this new member function.
5086 Start a new optinfo and add the stmt to it.
5087 (dump_dec): Move implementation to...
5088 (dump_context::dump_dec): ...this new member function. Add the
5089 value to any pending optinfo, creating one if need be.
5090 (dump_context::dump_symtab_node): New member function.
5091 (dump_context::get_scope_depth): New member function.
5092 (dump_context::begin_scope): New member function.
5093 (dump_context::end_scope): New member function.
5094 (dump_context::ensure_pending_optinfo): New member function.
5095 (dump_context::begin_next_optinfo): New member function.
5096 (dump_context::end_any_optinfo): New member function.
5097 (dump_context::s_current): New global.
5098 (dump_context::s_default): New global.
5099 (dump_scope_depth): Delete global.
5100 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5101 (dump_symtab_node): New function.
5102 (get_dump_scope_depth): Reimplement in terms of dump_context.
5103 (dump_begin_scope): Likewise.
5104 (dump_end_scope): Likewise.
5105 (selftest::temp_dump_context::temp_dump_context): New ctor.
5106 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5107 (selftest::verify_item): New function.
5108 (ASSERT_IS_TEXT): New macro.
5109 (ASSERT_IS_TREE): New macro.
5110 (ASSERT_IS_GIMPLE): New macro.
5111 (selftest::test_capture_of_dump_calls): New test.
5112 (selftest::dumpfile_c_tests): Call it.
5113 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5114 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5115 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5116 descriptive comment.
5117 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5118 (dump_node, dump_bb): Move these unrelated decls.
5119 (class dump_manager): Add leading comment.
5120 * optinfo.cc: New file.
5121 * optinfo.h: New file.
5123 2018-07-19 Michael Collison <michael.collison@arm.com>
5124 Richard Henderson <rth@redhat.com>
5126 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5127 (subti): Handle op1 zero.
5128 (subvti4, usub4ti4): New.
5129 (*sub<GPI>3_compare1_imm): New.
5130 (sub<GPI>3_carryinCV): New.
5131 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5132 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5134 2018-07-19 Michael Collison <michael.collison@arm.com>
5135 Richard Henderson <rth@redhat.com>
5137 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5138 (addti3): Create simpler code if low part is already known to be 0.
5139 (addvti4, uaddvti4): New.
5140 (*add<GPI>3_compareC_cconly_imm): New.
5141 (*add<GPI>3_compareC_cconly): New.
5142 (*add<GPI>3_compareC_imm): New.
5143 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5144 handle constants within this pattern..
5145 (*add<GPI>3_compareV_cconly_imm): New.
5146 (*add<GPI>3_compareV_cconly): New.
5147 (*add<GPI>3_compareV_imm): New.
5148 (add<GPI>3_compareV): New.
5149 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5150 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5151 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5152 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5153 with 'comparison' operator.
5154 (*add<GPI>3_compareV_cconly_imm): Ditto.
5155 (*add<GPI>3_compareV_cconly): Ditto.
5156 (*add<GPI>3_compareV_imm): Ditto.
5157 (add<GPI>3_compareV): Ditto.
5158 (add<mode>3_carryinC): Ditto.
5159 (*add<mode>3_carryinC_zero): Ditto.
5160 (*add<mode>3_carryinC): Ditto.
5161 (add<mode>3_carryinV): Ditto.
5162 (*add<mode>3_carryinV_zero): Ditto.
5163 (*add<mode>3_carryinV): Ditto.
5165 2018-07-19 Michael Collison <michael.collison@arm.com>
5166 Richard Henderson <rth@redhat.com>
5168 * config/aarch64/aarch64-modes.def (CC_V): New.
5169 * config/aarch64/aarch64-protos.h
5170 (aarch64_addti_scratch_regs): Declare
5171 (aarch64_subvti_scratch_regs): Declare.
5172 (aarch64_expand_subvti): Declare.
5173 (aarch64_gen_unlikely_cbranch): Declare
5174 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5175 for signed overflow using CC_Vmode.
5176 (aarch64_get_condition_code_1): Handle CC_Vmode.
5177 (aarch64_gen_unlikely_cbranch): New function.
5178 (aarch64_addti_scratch_regs): New function.
5179 (aarch64_subvti_scratch_regs): New function.
5180 (aarch64_expand_subvti): New function.
5182 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5184 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5186 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5187 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5190 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5193 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5194 address check not strict.
5196 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5198 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5200 (store_pair_lanes<mode>): Likewise.
5201 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5202 enum value 'ADDR_QUERY_LDP_STP_N'.
5203 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5204 (aarch64_print_address_internal): Add declaration.
5205 (aarch64_print_ldpstp_address): Remove.
5206 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5207 (aarch64_print_operand): Change printing of 'y'.
5208 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5209 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5210 'true' rather than '1'.
5211 * config/aarch64/constraints.md (Uml): Likewise.
5212 (Uml): Rename to Umn.
5215 2018-07-19 Richard Biener <rguenther@suse.de>
5217 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5219 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5220 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5221 (vn_reference_hasher): Likewise.
5222 (struct vn_tables_s): Remove obstack and alloc-pool members.
5223 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5224 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5225 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5226 (vn_reference_insert_pieces): Likewise.
5227 (alloc_vn_nary_op_noinit): Adjust.
5228 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5229 (vn_phi_eq): Adjust.
5230 (shared_lookup_phiargs): Remove.
5231 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5232 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5233 (visit_reference_op_call): Likewise.
5234 (copy_nary, copy_phi, copy_reference): Remove.
5235 (process_scc): Rewind the obstack when iterating. Do not
5236 copy the elements to valid_info but just move them from one
5237 hashtable to the other.
5238 (allocate_vn_table): Adjust.
5239 (free_vn_table): Likewise.
5240 (init_scc_vn): Likewise.
5241 (free_scc_vn): Likewise.
5243 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5246 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5247 indirect_return as function type attribute.
5248 (ix86_attribute_table): Change indirect_return to function
5250 * doc/extend.texi: Update indirect_return attribute.
5252 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5254 * wide-int.h (widest2_int): New.
5255 * gimple-fold.c (arith_overflowed_p): Use it.
5256 * tree.h (widest2_int_cst): New.
5257 * tree-vrp.c (wide_int_binop_overflow): Rename from
5258 vrp_int_const_binop.
5259 Rewrite to work on trees.
5260 (extract_range_from_multiplicative_op_1): Abstract code to...
5261 (wide_int_range_min_max): ...here.
5262 (wide_int_range_cross_product): ...and here.
5263 (extract_range_from_binary_expr_1): Abstract overflow code to...
5264 (wide_int_range_mult_wrapping): ...here.
5265 * tree-vrp.h (wide_int_range_cross_product): New.
5266 (wide_int_range_mult_wrapping): New.
5268 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5269 Julia Koval <julia.koval@intel.com>
5271 * config/i386/x86-tune-costs.h (skylake_memcpy,
5272 skylake_memset): Replace rep_prefix with unrolling for size 512.
5274 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5277 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5278 comparision with EQ_EXPR in last stmt.
5280 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5282 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5283 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5284 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5285 previously known as "PowerPC AltiVec Built-in Functions". Move
5286 some material to new subsubsections "PowerPC AltiVec Built-in
5287 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5289 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5290 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5291 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5292 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5294 2018-07-18 Richard Biener <rguenther@suse.de>
5296 PR tree-optimization/86557
5297 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5300 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5302 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5304 2018-07-17 Jeff Law <law@redhat.com>
5306 * config/arm/arm.c (get_label_padding): Update for recent
5307 changes to label_to_alignment.
5309 PR tree-optimization/86010
5310 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5312 * config/mips/mips.c (vr4130_align_insns): Update for recent
5313 changes to label_to_alignment.
5315 * config/frv/frv.c (frv_label_align): Update for recent changes
5316 to label_to_alignment.
5318 * config/nios2/nios2.c (nios2_label_align): Update for recent
5319 changes which dropped ALIGN_LABELS_LOG.
5321 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5323 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5324 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5326 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5328 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5329 deprecated align_labels_log.
5331 2018-07-17 Richard Biener <rguenther@suse.de>
5334 * dwarf2out.c (init_sections_and_labels): Always generate
5335 a debug_line_str_section for early LTO debug.
5336 (dwarf2out_finish): Reset debug_line_str_hash output early.
5337 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5339 (dwarf2out_early_finish): Output debug_line_str.
5341 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5343 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5344 index register on z196 or later.
5346 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5348 * config/s390/s390.c (s390_default_align): Set default function
5350 (s390_override_options_after_change): Call s390_default align.
5351 (s390_option_override_internal): Call s390_default_align.
5352 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5354 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5357 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5358 to _looptemp_ clauses, other than the first two.
5360 2018-07-17 Martin Liska <mliska@suse.cz>
5362 * opts.c: Do not enable OPT_falign_* for -Os.
5364 2018-07-17 Martin Liska <mliska@suse.cz>
5366 * align.h (MAX_CODE_ALIGN): New.
5367 (MAX_CODE_ALIGN_VALUE): New.
5368 * common/config/i386/i386-common.c (ix86_handle_option):
5369 (MAX_CODE_ALIGN): Moved to align.h.
5370 * final.c (MAX_CODE_ALIGN): Likewise.
5371 * opts.c (parse_and_check_align_values):
5372 (MAX_CODE_ALIGN): Likewise.
5373 (MAX_CODE_ALIGN_VALUE): Likewise.
5375 2018-07-17 Martin Liska <mliska@suse.cz>
5377 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5378 in order to fulfil coding style.
5379 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5380 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5381 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5382 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5383 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5384 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5385 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5386 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5387 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5389 2018-07-17 Martin Liska <mliska@suse.cz>
5391 * align.h: New file.
5392 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5394 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5395 align_flags of label_to_alignment.
5396 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5398 * config/m68k/m68k.c: Do not use removed align_labels_value and
5400 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5401 (LOOP_ALIGN): Likewise.
5402 (LABEL_ALIGN): Likewise.
5403 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5404 Remove not used macro.
5405 (rs6000_loop_align): Change return type to align_flags.
5406 (rs6000_loop_align_max_skip): Remove.
5407 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5408 Change return type to align_flags.
5409 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5410 Remove not used macro.
5411 (rs6000_loop_align): Change return type to align_flags.
5412 (rs6000_loop_align_max_skip): Remove.
5413 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5414 * config/rx/rx-protos.h (rx_align_for_label): Make it
5416 * config/rx/rx.c (rx_align_for_label): Change return type
5418 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5420 into align_flags class.
5421 (LABEL_ALIGN): Likewise.
5422 (LOOP_ALIGN): Likewise.
5423 * config/s390/s390.c (s390_label_align): Use align_flags
5425 (s390_asm_output_function_label): Likewise.
5426 * config/sh/sh.c (sh_override_options_after_change):
5427 Use align_flags class directly without macros.
5428 (find_barrier): Likewise.
5429 (barrier_align): Likewise.
5430 (sh_loop_align): Likewise.
5431 * config/spu/spu.c (spu_option_override):
5432 Use align_flags_tuple::get_value instead of removed macros.
5433 (spu_sched_init): Likewise.
5434 * config/spu/spu.h (GTY): Likewise.
5435 * config/visium/visium.c (visium_option_override):
5436 Set "8" as default secondary alignment.
5437 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5438 in order to guarantee secondary alignment of 8.
5439 * coretypes.h: Include align.h header file.
5440 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5441 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5442 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5443 * doc/tm.texi.in: Likewise.
5444 * final.c (struct label_alignment): Remove not used structure.
5445 (LABEL_ALIGN): Change type to align_flags.
5446 (LOOP_ALIGN): Likewise.
5447 (JUMP_ALIGN): Likewise.
5448 (default_loop_align_max_skip): Remove.
5449 (default_label_align_max_skip): Likewise.
5450 (default_jump_align_max_skip): Likewise.
5451 (default_label_align_after_barrier_max_skip):
5452 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5453 (LABEL_TO_MAX_SKIP): Remove.
5454 (label_to_alignment): Return align_flags type instead of integer.
5455 (label_to_max_skip): Remove.
5456 (align_fuzz): Use align_flags type.
5457 (compute_alignments): Use align_flags type and use align_flags::max
5458 to combine multiple alignments.
5459 (grow_label_align): Grow vec instead of C array.
5460 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5461 (shorten_branches): Use align_flags type and use align_flags::max
5462 to combine multiple alignments.
5463 (final_scan_insn_1): Remove usage of secondary alignment that comes
5464 from label alignment, but instead use proper secondary alignment
5465 which is computed in grow_label_align.
5466 * flags.h (struct align_flags_tuple): Move to align.h.
5467 (struct align_flags): Likewise.
5468 (state_align_loops): Rename to align_loops.
5469 (state_align_jumps): Rename to align_jumps.
5470 (state_align_labels): Rename to align_labels.
5471 (state_align_functions): Rename to align_functions.
5472 (align_loops_log): Remove.
5473 (align_jumps_log): Remove.
5474 (align_labels_log): Remove.
5475 (align_functions_log): Remove.
5476 (align_loops_max_skip): Remove.
5477 (align_jumps_max_skip): Remove.
5478 (align_labels_max_skip): Remove.
5479 (align_functions_max_skip): Remove.
5480 (align_loops_value): Remove.
5481 (align_jumps_value): Remove.
5482 (align_labels_value): Remove.
5483 (align_functions_value): Remove.
5484 * output.h (label_to_alignment): Change return type to align_flags.
5485 (label_to_max_skip): Remove.
5486 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5487 jump_align_max_skip macros.
5488 * targhooks.h (default_loop_align_max_skip): Remove.
5489 (default_label_align_max_skip): Likewise.
5490 (default_jump_align_max_skip): Likewise.
5491 (default_label_align_after_barrier_max_skip): Remove.
5492 * toplev.c (read_log_maxskip): Use ::normalize function.
5493 (parse_N_M): Remove not used argument and also call ::normalize.
5494 (parse_alignment_opts): Do not pass unused arguments.
5495 * varasm.c (assemble_start_function): Use directly align_functions
5496 instead of removed macros.
5497 * system.h: Do not poison removed macros.
5499 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5502 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5503 and cond temporaries don't have reference type if iterator has
5504 pointer type. For init use &for_pre_body instead of pre_p if
5505 for_pre_body is non-empty.
5507 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5509 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5510 double-double modes to SFmode directly directly.
5511 (trunc<mode>sf2_fprs): Delete.
5513 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5515 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5516 for conversions between IFmode and the decimal floating point modes.
5517 (init_float128_ieee): Use the correct names for conversions between
5518 KFmode and the decimal floating point modes.
5520 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5522 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5523 for the conversions between TDmode and IFmode.
5524 (init_float128_ieee): Use more correct names for the conversions
5525 between TDmode and KFmode.
5527 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5529 PR tree-optimization/86526
5530 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5531 (inline_expand_builtin_string_cmp): Likewise.
5532 (inline_string_cmp): Likewise. Use c_readstr instead of
5533 builtin_memcpy_read_str. Add unit_mode temporary.
5535 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5538 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5539 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5541 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5543 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5544 Alphabetize prototypes of built-in functions, separating out
5545 built-in functions that are listed in this section but should be
5546 described elsewhere.
5548 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5551 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5552 conditional move when trapping comparison was split to a
5553 non-trapping one (and vice versa).
5555 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5557 * config/s390/s390.c (s390_function_profiler): Generate nops
5558 instead of profiler call sequences.
5559 * config/s390/s390.opt: Add the new option.
5561 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5563 * config/s390/s390.c (s390_function_profiler): Generate
5564 __mcount_loc section.
5565 * config/s390/s390.opt: Add the new option.
5567 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5569 * common.opt: Add the new warning.
5570 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5571 %r0,__fentry__" when -mfentry is specified.
5572 (s390_option_override_internal): Disallow -mfentry for 31-bit
5574 * config/s390/s390.opt: Add the new option.
5576 2018-07-16 Richard Biener <rguenther@suse.de>
5579 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5580 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5582 2018-07-16 Martin Liska <mliska@suse.cz>
5585 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5588 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5590 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5592 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5594 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5596 * config/arc/arc-cpus.def (hs4x): New cpu.
5598 * config/arc/arc-tables.opt: Regenerate.
5599 * config/arc/arc.c (arc_sched_issue_rate): New function.
5600 (TARGET_SCHED_ISSUE_RATE): Define.
5601 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5602 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5604 (attr tune): Add ARCHS4x tune values.
5605 (attr tune_dspmpy): Define.
5606 (*tst): Correct instruction type.
5607 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5608 * config/arc/arcHS4x.md: New file.
5609 * config/arc/fpu.md: Update instruction type attributes.
5610 * config/arc/t-multilib: Regenerate.
5612 2018-07-16 Tom de Vries <tdevries@suse.de>
5615 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5617 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5619 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5622 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5624 PR tree-optimization/86514
5625 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5626 conversion to a boolean type from a type with greater precision.
5628 2018-07-16 Tom de Vries <tdevries@suse.de>
5630 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5631 dump_flags request TDF_SLIM.
5633 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5635 * fold-const.c (int_const_binop_1): Abstract...
5636 (wide_int_binop): ...wide int code here.
5637 (poly_int_binop): ...poly int code here.
5638 Abstract the rest of int_const_binop_1 into int_const_binop.
5639 * fold-const.h (wide_int_binop): New.
5640 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5641 Remove useless PLUS/MINUS_EXPR case.
5642 (zero_nonzero_bits_from_vr): Move wide int code...
5643 (zero_nonzero_bits_from_bounds): ...here.
5644 (extract_range_from_binary_expr_1): Move mask optimization code...
5645 (range_easy_mask_min_max): ...here.
5646 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5647 (range_easy_mask_min_max): New.
5649 2018-07-15 Jeff Law <law@redhat.com>
5652 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5655 2018-07-14 Jim Wilson <jimw@sifive.com>
5657 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5659 2018-07-14 Paul Koning <ni1d@arrl.net>
5661 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5663 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5665 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5668 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5669 Steve Munroe <munroesj52@gmail.com>
5671 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5672 (_mm_andnot_si128): Likewise.
5673 (_mm_or_si128): Likewise.
5674 (_mm_xor_si128): Likewise.
5676 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5679 * builtins.c (expand_builtin_memcmp): Inline the calls first
5680 when result_eq is false.
5681 (expand_builtin_strcmp): Inline the calls first.
5682 (expand_builtin_strncmp): Likewise.
5683 (inline_string_cmp): New routine. Expand a string compare
5684 call by using a sequence of char comparison.
5685 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5686 a call to str(n)cmp/memcmp.
5687 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5689 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5691 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5693 * config/arm/driver-arm.c: Include arm-native.h.
5694 (host_detect_local_cpu): Use auto-generated data tables.
5695 (vendors, arm_cpu_table): Delete. Move part information to ...
5696 * config/arm/arm-cpus.in: ... here.
5697 * config/arm/parsecpu.awk (gen_native): New function.
5698 (vendor, part): New CPU fields.
5699 (END): Add support for building the native CPU detection tables.
5700 * config/arm/t-arm (arm-native.h): Add build rule.
5701 (driver-arm.o): Add dependency on arm-native.h.
5703 2018-07-13 Richard Biener <rguenther@suse.de>
5706 * match.pd (addr1 - addr2): Allow either of the operand to
5709 2018-07-13 Tom de Vries <tdevries@suse.de>
5711 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5714 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5716 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5717 arrays instead of numbered variables.
5719 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5721 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5722 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5724 2018-07-13 Richard Biener <rguenther@suse.de>
5727 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5728 instead of get_context_die.
5730 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5731 Richard Biener <rguenther@suse.de>
5734 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5735 that the loop latch destination where phi is defined.
5737 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5739 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5740 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5741 (riscv_set_current_function): Extract getting interrupt type to new
5743 (riscv_get_interrupt_type): New function.
5744 (riscv_merge_decl_attributes): New function, checking interrupt type is
5746 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5748 2018-07-12 Paul Koning <ni1d@arrl.net>
5750 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5753 2018-07-12 Paul Koning <ni1d@arrl.net>
5755 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5756 zero reference, add doloop_end instead.
5757 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5758 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5759 detail for doloop_end.
5761 2018-07-12 Martin Sebor <msebor@redhat.com>
5764 * attribs.c (decl_attributes): Reject conflicting attributes before
5765 calling attribute handlers.
5767 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5769 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5771 (gcc::dump_manager::get_dump_file_name): likewise.
5772 (dump_begin): Likewise.
5773 * dumpfile.h (dump_begin): Update prototype.
5774 (gcc::dump_manager::get_dump_file_name,
5775 gcc::dump_manager::get_dump_file_name): Update prototype.
5777 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5779 * internal-fn.h (vectorizable_internal_fn_p): New function.
5780 * tree-vect-slp.c (compatible_calls_p): Likewise.
5781 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5782 to internal functions.
5783 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5785 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5787 * fold-const.h (inverse_conditions_p): Declare.
5788 * fold-const.c (inverse_conditions_p): New function.
5789 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5790 that test the inverse condition of a conditional internal function.
5791 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5792 * internal-fn.c (internal_fn_mask_index): Handle conditional
5794 (vectorized_internal_fn_supported_p): New function.
5795 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5796 (any_pred_load_store): Replace with...
5797 (need_to_predicate): ...this new variable.
5798 (redundant_ssa_names): New variable.
5799 (ifcvt_can_use_mask_load_store): Move initial checks to...
5800 (ifcvt_can_predicate): ...this new function. Handle tree codes
5801 for which a conditional internal function exists.
5802 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5803 instead of ifcvt_can_use_mask_load_store. Update after variable
5805 (predicate_load_or_store): New function, split out from
5806 predicate_mem_writes.
5807 (check_redundant_cond_expr): New function.
5808 (value_available_p): Likewise.
5809 (predicate_rhs_code): Likewise.
5810 (predicate_mem_writes): Rename to...
5811 (predicate_statements): ...this. Use predicate_load_or_store
5812 and predicate_rhs_code.
5813 (combine_blocks, tree_if_conversion): Update after above name changes.
5814 (ifcvt_local_dce): Handle redundant_ssa_names.
5815 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5816 general conditional functions.
5817 * tree-vect-stmts.c (vectorizable_call): Likewise.
5819 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5820 Alan Hayward <alan.hayward@arm.com>
5821 David Sherwood <david.sherwood@arm.com>
5823 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5824 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5825 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5826 plus and minus and convert them into IFN_COND_FMA-based sequences.
5827 (convert_mult_to_fma): Handle conditional plus and minus.
5829 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5831 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5832 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5833 (cond_fnms_optab): New optabs.
5834 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5836 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5837 * internal-fn.h (get_conditional_internal_fn): Declare.
5838 (get_unconditional_internal_fn): Likewise.
5839 * internal-fn.c (cond_ternary_direct): New macro.
5840 (expand_cond_ternary_optab_fn): Likewise.
5841 (direct_cond_ternary_optab_supported_p): Likewise.
5842 (FOR_EACH_COND_FN_PAIR): Likewise.
5843 (get_conditional_internal_fn): New function.
5844 (get_unconditional_internal_fn): Likewise.
5845 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5846 (gimple_match_op::gimple_match_op): Add a new overload for 5
5848 (gimple_match_op::set_op): Likewise.
5849 (gimple_resimplify5): Declare.
5850 * genmatch.c (decision_tree::gen): Generate simplifications for
5852 * gimple-match-head.c (gimple_simplify): Define an overload for
5853 5 operands. Handle calls with 5 arguments in the top-level overload.
5854 (convert_conditional_op): Handle conversions from unconditional
5855 internal functions to conditional ones.
5856 (gimple_resimplify5): New function.
5857 (build_call_internal): Pass a fifth operand.
5858 (maybe_push_res_to_seq): Likewise.
5859 (try_conditional_simplification): Try converting conditional
5860 internal functions to unconditional internal functions.
5861 Handle 3-operand unconditional forms.
5862 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5863 Define ternary equivalents of the current rules for binary conditional
5865 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5867 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5868 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5869 (optab): Handle them.
5870 (SVE_COND_FP_TERNARY): New int iterator.
5871 (sve_fmla_op, sve_fmad_op): New int attributes.
5872 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5873 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5874 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5876 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5878 * target.def (preferred_else_value): New target hook.
5879 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5880 * doc/tm.texi: Regenerate.
5881 * targhooks.h (default_preferred_else_value): Declare.
5882 * targhooks.c (default_preferred_else_value): New function.
5883 * internal-fn.h (conditional_internal_fn_code): Declare.
5884 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5885 (get_conditional_internal_fn): Use it.
5886 (conditional_internal_fn_code): New function.
5887 * gimple-match.h (gimple_match_cond): New struct.
5888 (gimple_match_op): Add a cond member function.
5889 (gimple_match_op::gimple_match_op): Update all forms to take a
5891 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5892 for the suboperation, but don't specify a particular else_value.
5893 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5894 (visit_nary_op, visit_reference_op_load): Pass
5895 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5896 * gimple-match-head.c: Include tree-eh.h
5897 (convert_conditional_op): New function.
5898 (maybe_resimplify_conditional_op): Likewise.
5899 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5900 (gimple_resimplify2): Likewise.
5901 (gimple_resimplify3): Likewise.
5902 (gimple_resimplify4): Likewise.
5903 (maybe_push_res_to_seq): Return null for conditional operations.
5904 (try_conditional_simplification): New function.
5905 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5907 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5909 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5911 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5913 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5915 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5917 (hash_tree): Do not hash DECL_FCONTEXT
5918 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5919 Do not stream DECL_FCONTEXT.
5920 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5921 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5923 2018-07-12 Richard Biener <rguenther@suse.de>
5926 * dwarf2out.c (gen_block_die): Only output blocks when they have
5927 at least one !DECL_IGNORED_P variable.
5929 2018-07-12 Richard Biener <rguenther@suse.de>
5932 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5933 Remove -mieee-fp handling.
5935 2018-07-12 Richard Biener <rguenther@suse.de>
5937 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5938 left-over from last patch.
5940 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5942 PR tree-optimization/86492
5943 * gimple-ssa-store-merging.c
5944 (imm_store_chain_info::coalesce_immediate_stores): Call
5945 check_no_overlap even for the merge_overlapping case. Formatting fix.
5947 2018-07-12 Richard Biener <rguenther@suse.de>
5950 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5951 move possibly trapping operations into the conditional.
5953 2018-07-12 Richard Biener <rguenther@suse.de>
5955 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5956 (vn_lookup_simplify_result): Remove recursion limit applied
5958 (vn_nary_build_or_lookup_1): Adjust.
5959 (try_to_simplify): Likewise.
5960 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5962 (gimple_resimplify2): Likewise.
5963 (gimple_resimplify3): Likewise.
5964 (gimple_resimplify4): Likewise.
5966 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5968 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5969 Use __mmask64 type instead of __mmask8 for __M argument.
5970 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5971 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5973 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5974 __mmask16 for __M argument.
5975 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5976 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5977 to __mmask16 instead of __mmask8.
5978 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5979 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5980 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5981 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5982 instead of __mmask16 for __U argument.
5983 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5984 __mmask16 instead of __mmask8 for __U argument.
5985 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5987 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5989 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5991 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5993 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5995 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5997 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5999 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6001 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6003 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6005 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6006 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6007 return type as well as __M argument type and all casts from __mmask8
6009 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6010 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6011 return type as well as __M argument type and all casts from __mmask8
6013 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6014 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6015 return type as well as __M argument type and all casts from __mmask8
6017 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6018 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6019 return type as well as __M argument type and all casts from __mmask8
6021 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6022 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6025 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6027 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6028 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6031 2018-07-11 Paul Koning <ni1d@arrl.net>
6033 * doc/md.texi (define_subst): Document how multiple occurrences of
6034 the same argument in the replacement pattern are handled.
6036 2018-07-11 Paul Koning <ni1d@arrl.net>
6038 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6040 (Common Type Attributes): Add "mode" attribute.
6042 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6044 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6045 stream DECL_ORIGINAL_TYPE.
6046 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6047 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6048 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6049 Do not walk original type.
6050 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6052 (write_ts_decl_non_common_tree_pointers): Do not stream
6054 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6055 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6057 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6059 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6060 thread twice from the same starting edge.
6062 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6064 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6065 * gimple.c (gimple_call_nonnull_result_p): ...here...
6066 (gimple_call_nonnull_arg): ...and here.
6067 * gimple.h (gimple_call_nonnull_result_p): New.
6068 (gimple_call_nonnull_arg): New.
6070 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6072 * config/arm/arm-cpus.in: Move information from fpu field of each
6073 cpu definition to the isa field.
6074 * config/arm/parsecpu.awk (fpu): Delete match rule.
6075 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6077 2018-07-11 Richard Biener <rguenther@suse.de>
6080 * dwarf2out.c (init_sections_and_labels): Use
6081 output_asm_line_debug_info consistently.
6082 (dwarf2out_early_finish): Likewise.
6083 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6086 2018-07-11 Richard Biener <rguenther@suse.de>
6088 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6089 Rework father_bb setting in a way to avoid propagating constants
6090 multiple times on a loop body.
6092 2018-07-10 Mark Wielaard <mark@klomp.org>
6095 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6097 2018-07-10 Richard Biener <rguenther@suse.de>
6099 * hash-map.h (hash_map::iterator::operator*): Return
6100 references to key and value.
6102 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6105 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6106 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6107 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6108 (gimplify_omp_for): For composite loops, move outer
6109 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6110 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6111 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6112 TREE_LIST for both the original class iterator and the "last" helper
6113 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6114 loop, remember has_decl_expr from outer composite loops for the
6115 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6117 2018-07-09 Martin Sebor <msebor@redhat.com>
6121 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6122 accessing implicitly initialized array elements.
6123 * expr.c (string_constant): Handle string initializers of
6124 character arrays within aggregates.
6125 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6126 Store element offset. As a special case, handle zero size.
6127 (fold_nonarray_ctor_reference): Same.
6128 (fold_ctor_reference): Add argument. Store subobject offset.
6129 * gimple-fold.h (fold_ctor_reference): Add argument.
6131 2018-07-09 Paul Koning <ni1d@arrl.net>
6133 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6134 (pdp11_insn_cost): New function.
6135 (pdp11_md_asm_adjust): New function.
6136 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6137 (pdp11_rtx_costs): Update to match machine better.
6138 (output_addr_const_pdp11): Correct format mismatch warnings.
6139 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6140 * config/pdp11/pdp11.md: General change to add base_cost and/or
6141 length attributes for use by new pdp11_insn_cost function.
6142 (MIN_BRANCH): Correct definition.
6144 (doloop_end): Use standard pattern name for looping pattern.
6145 (doloop_end_nocc): New.
6146 (movsf): Add another constraint alternative.
6147 (zero_extendqihi2): Add constraint alternatives for not in place
6149 (zero_extendhisi2): Remove.
6150 (shift patterns): Add CC handling variants.
6154 (define_peephole2): New peephole to recognize mov that sets CC for
6157 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6159 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6160 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6163 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6166 * real.c (real_nextafter): Return true if result is denormal.
6168 2018-07-09 Martin Liska <mliska@suse.cz>
6170 * common.opt: Add back wrongly removed attribute.
6172 2018-07-09 Richard Biener <rguenther@suse.de>
6175 * dwarf2out.c (gen_block_die): For an early generated DIE
6176 always output high/low PC attributes.
6178 2018-07-09 Tom de Vries <tdevries@suse.de>
6180 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6181 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6182 onto VAR_DECL with abstract origin.
6184 2018-07-07 Jim Wilson <jimw@sifive.com>
6186 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6188 2018-07-07 Tom de Vries <tdevries@suse.de>
6190 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6192 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6194 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6196 (combine_bound): Use wide-int overflow calculation instead of
6198 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6200 * fold-const.c (int_const_binop_2): Same.
6201 (extract_muldiv_1): Same.
6202 (fold_div_compare): Same.
6203 (fold_abs_const): Same.
6205 * poly-int.h (add): Same.
6209 * predict.c (predict_iv_comparison): Same.
6210 * profile-count.c (slow_safe_scale_64bit): Same.
6211 * simplify-rtx.c (simplify_const_binary_operation): Same.
6212 * tree-chrec.c (tree_fold_binomial): Same.
6213 * tree-data-ref.c (split_constant_offset_1): Same.
6214 * tree-if-conv.c (idx_within_array_bound): Same.
6215 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6216 * tree-ssa-phiopt.c (minmax_replacement): Same.
6217 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6218 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6219 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6220 * wide-int.cc (wi::add_large): Same.
6221 (wi::mul_internal): Same.
6222 (wi::sub_large): Same.
6223 (wi::divmod_internal): Same.
6224 * wide-int.h: Change overflow type to overflow_type for neg, add,
6225 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6226 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6227 mul_internal, divmod_internal.
6228 (overflow_type): New enum.
6229 (accumulate_overflow): New.
6231 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6233 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6234 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6236 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6238 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6239 argument is checked for zero before entering loop, avoid checking again.
6241 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6243 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6244 * gimplify.h (generic_expr_could_trap_p): Likwise.
6245 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6247 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6249 PR tree-optimization/86401
6250 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6251 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6252 (fold_bit_and_mask): ... here. New helper function for match.pd.
6253 * fold-const.h (fold_bit_and_mask): Declare.
6254 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6256 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6259 * target.def (translate_mode_attribute): New hook.
6260 * targhooks.h (default_translate_mode_attribute): Declare.
6261 * targhooks.c (default_translate_mode_attribute): New function.
6262 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6263 * doc/tm.texi: Regenerate.
6264 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6265 (rs6000_translate_mode_attribute): New function.
6267 2018-07-06 Paul Koning <ni1d@arrl.net>
6269 * doc/md.texi (define_split): Document DONE and FAIL.
6270 (define_peephole2): Ditto.
6272 2018-07-05 Jeff Law <law@redhat.com>
6274 PR tree-optimization/86010
6275 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6276 both the head and tail of mem* and str* calls.
6278 2018-07-05 Jim Wilson <jimw@sifive.com>
6280 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6282 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6284 * config/aarch64/aarch64-simd.md: correct flags text for
6285 MIN_EXPR replacement.
6287 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6289 * configure: Regenerated.
6291 2018-07-05 Carl Love <cel@us.ibm.com>
6293 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6294 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6295 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6296 VSX_BUILTIN_DOUBLEL_V4SF.
6298 2018-07-05 Martin Sebor <msebor@redhat.com>
6301 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6302 than its domain to compute its the upper bound of a char array.
6304 2018-07-05 Nathan Sidwell <nathan@acm.org>
6306 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6307 * doc/cpp.texi: Update comment.
6308 * doc/tm.texi: Rebuilt.
6309 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6310 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6311 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6312 headers affected by extern "C".
6313 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6314 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6315 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6316 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6317 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6318 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6319 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6320 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6321 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6322 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6323 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6324 config/sparc/sp64-elf.h, config/spu/spu.h,
6325 config/stormy16/stormy16.h, config/v850/v850.h,
6326 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6327 define NO_IMPLICIT_EXTERN_C.
6328 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6330 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6333 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6334 instead of GET_MODE_SIZE when comparing Units.
6336 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6339 * rtlanal.c (set_noop_p): Constrain on mode change,
6340 include hard-reg-set.h
6342 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6344 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6346 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6349 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6352 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6354 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6356 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6359 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6361 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6363 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6366 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6368 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6370 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6371 neg_*_op* variables.
6373 2018-07-04 Martin Liska <mliska@suse.cz>
6375 * tree-switch-conversion.c: Define
6376 max_ratio_for_speed and max_ratio_for_size constants.
6378 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6379 Martin Liska <mliska@suse.cz>
6384 * common.opt: Rename align options with 'str_' prefix.
6385 * common/config/i386/i386-common.c (set_malign_value): New
6387 (ix86_handle_option): Use it to set -falign-* options/
6388 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6389 type from int to string.
6390 * config/aarch64/aarch64.c: Update default values from int
6392 * config/alpha/alpha.c (alpha_override_options_after_change):
6394 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6395 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6396 max skip conditionally.
6397 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6398 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6399 max skip conditionally.
6400 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6401 max skip conditionally.
6402 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6403 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6404 max skip conditionally.
6405 * config/i386/i386.c (struct ptt): Change type from int to
6407 (ix86_default_align): Set default values.
6408 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6409 max skip conditionally.
6410 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6411 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6412 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6413 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6414 max skip conditionally.
6415 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6416 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6417 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6418 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6419 max skip conditionally.
6420 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6421 * config/ia64/ia64.c (ia64_option_override): Set default values
6422 for alignment options.
6423 * config/m68k/m68k.c: Handle new str_align_* options.
6424 * config/mips/mips.c (mips_set_compression_mode): Change
6426 (mips_option_override): Set default values for options.
6427 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6429 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6431 * config/rx/rx.c (rx_option_override): Likewise.
6432 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6433 (LABEL_ALIGN): Use align_labels_log.
6434 (LOOP_ALIGN): Use align_loops_align.
6435 * config/s390/s390.c (s390_asm_output_function_label): Use new
6437 * config/sh/sh.c (sh_override_options_after_change):
6438 Change type of constants.
6439 * config/spu/spu.c (spu_sched_init): Likewise.
6440 * config/sparc/sparc.c (sparc_option_override): Set default
6442 * config/visium/visium.c (visium_option_override): Likewise.
6443 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6444 emit p2align format with last argument if it's not needed.
6445 * doc/invoke.texi: Document extended format of -falign-*.
6446 * final.c: Use align_labels alignment.
6447 * flags.h (struct target_flag_state): Change type to use
6449 (struct align_flags_tuple): New.
6450 (struct align_flags): Likewise.
6451 (align_loops_log): Redefine macro to use new types.
6452 (align_loops_max_skip): Redefine macro to use new types.
6453 (align_jumps_log): Redefine macro to use new types.
6454 (align_jumps_max_skip): Redefine macro to use new types.
6455 (align_labels_log): Redefine macro to use new types.
6456 (align_labels_max_skip): Redefine macro to use new types.
6457 (align_functions_log): Redefine macro to use new types.
6458 (align_loops): Redefine macro to use new types.
6459 (align_jumps): Redefine macro to use new types.
6460 (align_labels): Redefine macro to use new types.
6461 (align_functions): Redefine macro to use new types.
6462 (align_functions_max_skip): Redefine macro to use new types.
6463 (align_loops_value): New macro.
6464 (align_jumps_value): New macro.
6465 (align_labels_value): New macro.
6466 (align_functions_value): New macro.
6467 * function.c (invoke_set_current_function_hook): Propagate
6468 alignment values from flags to global variables default in
6470 * ipa-icf.c (sem_function::equals_wpa): Use
6471 cl_optimization_option_eq instead of memcmp.
6472 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6474 (cl_optimization_stream_in): Likewise.
6475 * optc-save-gen.awk: Support strings in cl_optimization.
6476 * opth-gen.awk: Likewise.
6477 * opts.c (finish_options): Remove error checking of invalid
6479 (MAX_CODE_ALIGN): Remove.
6480 (MAX_CODE_ALIGN_VALUE): Likewise.
6481 (parse_and_check_align_values): New function.
6482 (check_alignment_argument): Likewise.
6483 (common_handle_option): Use check_alignment_argument.
6484 * opts.h (parse_and_check_align_values): Declare.
6485 * toplev.c (init_alignments): Remove.
6486 (read_log_maxskip): New.
6487 (parse_N_M): Likewise.
6488 (parse_alignment_opts): Likewise.
6489 (backend_init_target): Remove usage of init_alignments.
6490 * toplev.h (parse_alignment_opts): Declare.
6491 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6493 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6494 * tree.c (cl_option_hasher::equal): New.
6495 * varasm.c: Use new global macros.
6497 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6499 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6500 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6501 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6502 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6503 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6504 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6505 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6506 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6507 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6508 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6509 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6510 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6511 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6513 2018-07-04 Martin Liska <mliska@suse.cz>
6514 Jonathan Wakely <jwakely@redhat.com>
6516 * coverage.c: Use correct type.
6517 * doc/invoke.texi: Language correction.
6519 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6522 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6523 ENDBRANCH for non-tail call which may return via indirect branch.
6524 * doc/extend.texi: Document indirect_return attribute.
6526 2018-07-03 Martin Sebor <msebor@redhat.com>
6528 PR tree-optimization/86274
6529 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6531 (format_floating): Correct handling of infinities and NaNs.
6533 2018-07-03 Martin Sebor <msebor@redhat.com>
6535 * print-tree.c (print_real_cst): New function.
6536 (print_node_brief): Call it.
6537 (print_node): Ditto.
6539 2018-07-03 Jeff Law <law@redhat.com>
6541 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6542 into a single pattern.
6544 * config/h8300/h8300.md (ors code_iterator): New.
6545 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6546 a single pattern and single splitter.
6547 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6548 (iorqi3_1, xorqi3_1): Likewise.
6549 (iorqi3, xorqi3 expanders): Similarly.
6551 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6552 (movmd_internal) into a single pattern using the P mode iterator.
6553 (movmd splitters): Similarly.
6554 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6555 (movsd splitters): Similarly.
6557 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6558 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6559 right table based on the size of the operand.
6560 * config/h8300/h8300.md (length_table): Corresponding changes. All
6561 references to "addb", "addw" and "addl" changed to "add".
6562 (btst patterns): Merge two variants into a single pattern.
6563 (tstqi, tsthi): Likewise.
6564 (addhi3_incdec, addsi3_incdec): Likewise.
6565 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6566 (mulhi3, mulsi3): Likewise.
6567 (udivhi3, udivsi3): Likewise.
6568 (divhi3, divsi3): Likewise.
6569 (andorqi3, andorhi3, andorsi3): Likewise.
6571 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6574 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6575 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6577 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6579 PR tree-optimization/85694
6580 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6581 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6583 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6584 (<u>avg<mode>3_ceil): New patterns.
6586 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6588 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6589 scan-tree-dump directive.
6590 * gcc.dg/vect/slp-perm-2.c: Likewise.
6591 * gcc.dg/vect/slp-perm-3.c: Likewise.
6592 * gcc.dg/vect/slp-perm-5.c: Likewise.
6593 * gcc.dg/vect/slp-perm-6.c: Likewise.
6594 * gcc.dg/vect/slp-perm-7.c: Likewise.
6595 * gcc.dg/vect/slp-perm-8.c: Likewise.
6597 2018-07-03 Marek Polacek <polacek@redhat.com>
6600 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6602 2018-07-03 Richard Biener <rguenther@suse.de>
6605 * tree-ssa-structalias.c (find_func_clobbers): Properly
6606 handle indirect calls.
6608 2018-07-03 Jeff Law <law@redhat.com>
6610 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6611 (shifts): New code iterator.
6612 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6613 expander. Fix HImode handling on H8/SX.
6614 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6615 (subqi3, subhi3, subsi3 expanders): Likewise.
6616 (andqi3, andhi3, andsi3 expanders): Likewise.
6617 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6618 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6619 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6620 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6621 (zero_extendqihi2, zero_extendqisi2): Likewise.
6622 (extendqihi2, extendqisi2): Likewise.
6623 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6624 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6625 (rotlqi3_1, rotlhi3_1): Likewise.
6626 (logicalhi3_sn, logicalsi3_sn): Likewise.
6627 (logicalhi3, logicalsi3): Likewise.
6629 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6631 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6632 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6633 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6634 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6635 type to append_pattern_def_seq instead of creating a stmt_vec_info
6637 (build_mask_conversion): Likewise. Remove vinfo argument.
6638 (vect_add_conversion_to_patterm): Likewise, renaming to...
6639 (vect_add_conversion_to_pattern): ...this.
6640 (vect_recog_mask_conversion_pattern): Update call to
6641 build_mask_conversion. Pass the vector type to
6642 append_pattern_def_seq here too.
6643 (vect_recog_gather_scatter_pattern): Update call to
6644 vect_add_conversion_to_pattern.
6646 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6648 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6649 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6650 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6651 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6652 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6653 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6654 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6655 append_pattern_def_seq instead of new_pattern_def_seq.
6656 (vect_recog_divmod_pattern): Do both of the above.
6657 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6660 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6662 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6663 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6664 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6665 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6666 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6667 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6668 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6669 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6670 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6671 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6672 parameter with a single stmt_vec_info.
6673 (vect_recog_func_ptr): Likewise.
6674 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6675 (vect_try_gather_scatter_pattern): ...this.
6676 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6677 the stmt_vec_info of the statement to be matched. Don't clear
6678 STMT_VINFO_RELATED_STMT.
6679 (vect_pattern_recog): Update call accordingly.
6681 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6683 PR tree-optimization/85694
6684 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6685 (uavgM3_ceil): Document new optabs.
6686 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6687 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6689 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6690 (savg_ceil_optab): New optabs.
6691 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6692 (vect_vect_recog_func_ptrs): Add it.
6693 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6694 constant directly from the associated lhs.
6696 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6698 * tree-vect-patterns.c (vect_split_statement): New function.
6699 (vect_convert_input): Use it to try to split an existing cast.
6701 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6703 * poly-int.h (print_hex): New function.
6704 * dumpfile.h (dump_dec, dump_hex): Declare.
6705 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6706 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6707 min_input_precision, operation_precision and operation_sign.
6708 * tree-vect-patterns.c (vect_get_range_info): New function.
6709 (vect_same_loop_or_bb_p, vect_single_imm_use)
6710 (vect_operation_fits_smaller_type): Delete.
6711 (vect_look_through_possible_promotion): Add an optional
6712 single_use_p parameter.
6713 (vect_recog_over_widening_pattern): Rewrite to use new
6714 stmt_vec_info infomration. Handle one operation at a time.
6715 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6716 (vect_truncatable_operation_p, vect_set_operation_type)
6717 (vect_set_min_input_precision): New functions.
6718 (vect_determine_min_output_precision_1): Likewise.
6719 (vect_determine_min_output_precision): Likewise.
6720 (vect_determine_precisions_from_range): Likewise.
6721 (vect_determine_precisions_from_users): Likewise.
6722 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6723 (vect_vect_recog_func_ptrs): Put over_widening first.
6725 (vect_pattern_recog): Call vect_determine_precisions.
6727 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6729 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6730 statements that have been replaced by further pattern statements.
6731 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6733 2018-07-03 Richard Biener <rguenther@suse.de>
6735 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6736 always set *dt. Dump vectype in vectype overload.
6737 * dumpfile.h (dump_gimple_expr): New function.
6738 (dump_gimple_expr_loc): Likewise.
6739 * dumpfile.c (dump_gimple_expr): New function.
6740 (dump_gimple_expr_loc): Likewise.
6742 2018-07-02 Jeff Law <law@redhat.com>
6744 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6745 the H8/300, H8/300H and H8/S variants into a single pattern.
6746 (movhi_h8300, movqi_h8300hs): Similarly.
6747 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6748 (QHI mode iterator): New.
6750 * config/h8300/h8300.md: Remove trailing whitespace.
6752 2018-07-02 Jim Wilson <jimw@sifive.com>
6754 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6755 instead of emit_insn for interrupt returns.
6756 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6757 (riscv_sret, riscv_uret): Likewise.
6759 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6761 * pretty-print.c (selftest::test_pp_format): Move save and restore
6762 of quotes to class auto_fix_quotes, and add an instance.
6763 * selftest.c: Include "intl.h".
6764 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6765 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6766 * selftest.h (selftest::auto_fix_quotes): New class.
6768 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6770 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6771 (aarch64_sve_prepare_conditional_op): Remove.
6772 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6773 Allow aarch64_simd_reg_or_zero as select operand; remove
6774 the aarch64_sve_prepare_conditional_op call.
6775 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6776 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6777 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6778 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6779 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6780 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6781 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6782 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6783 and a splitters to match all of the *_any patterns.
6784 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6786 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6787 (SVE_COND_FP_BINARY_REV): Remove.
6788 (sve_int_op_rev, sve_fp_op_rev): New.
6789 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6790 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6791 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6792 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6793 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6794 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6795 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6796 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6797 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6799 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6800 Remove match_dup 1 from the inner unspec.
6801 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6803 * config/aarch64/aarch64.md (movprfx): New attr.
6804 (length): Default movprfx to 8.
6805 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6806 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6807 (*<su>mul<SVE_I>3_highpart): Likewise.
6808 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6809 (*v<ASHIFT><SVE_I>3): Likewise.
6810 (*<su><MAXMIN><SVE_I>3): Likewise.
6811 (*<su><MAXMIN><SVE_F>3): Likewise.
6812 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6813 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6814 (*div<SVE_F>4): Likewise.
6816 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6818 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6821 2018-07-02 Richard Biener <rguenther@suse.de>
6823 PR tree-optimization/86363
6824 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6825 memset argument refers to a non-variable address.
6827 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6829 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6830 {PLUS,MINUS}_EXPR code to...
6831 (adjust_symbolic_bound): ...here,
6832 (combine_bound): ...here,
6833 (set_value_range_with_overflow): ...and here.
6835 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6837 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6839 (extract_range_from_abs_expr): ...here.
6841 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6843 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6844 -fno-omit-frame-pointer when not optimizing.
6846 2018-07-02 Martin Liska <mliska@suse.cz>
6849 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6850 (propagate_nothrow): Likewise.
6852 2018-07-02 Martin Liska <mliska@suse.cz>
6855 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6857 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6859 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6860 function in r262149, changing "loc" param from source_location to
6861 const dump_location_t &.
6862 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6863 declaration, as above.
6865 2018-07-01 Paul Koning <ni1d@arrl.net>
6867 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6868 -munit-asm, -mgnu-asm, -mdec-asm.
6869 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6870 (pdp11_output_labelref): New.
6871 (pdp11_output_def): New.
6872 (pdp11_output_addr_vec_elt): New.
6873 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6874 %# and %@ format codes.
6875 (pdp11_option_override): New.
6876 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6877 (pdp11_output_ident): New.
6878 (pdp11_asm_named_section): New.
6879 (pdp11_asm_init_sections): New.
6880 (pdp11_file_start): New.
6881 (pdp11_file_end): New.
6882 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6883 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6884 %o, like %c but octal.
6885 (pdp11_option_override): New.
6886 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6888 (DATA_SECTION_ASM_OP): Ditto.
6889 (READONLY_DATA_SECTION_ASM_OP): New.
6890 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6891 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6892 (ASM_OUTPUT_LABELREF): Ditto.
6893 (ASM_OUTPUT_DEF): Ditto.
6894 (ASM_OUTPUT_EXTERNAL): New.
6895 (ASM_OUTPUT_SOURCE_FILENAME): New.
6896 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6897 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6898 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6899 %# and %@ format codes.
6900 * config/pdp11/pdp11.opt (mgnu-asm): New.
6901 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6902 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6903 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6905 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6907 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6908 dereferencing path[] beyond its length.
6910 (debug_all_paths): New.
6911 (rewire_first_differing_edge): New.
6912 (adjust_paths_after_duplication): New.
6913 (duplicate_thread_path): Call adjust_paths_after_duplication.
6915 (thread_through_all_blocks): Add new argument to
6916 duplicate_thread_path.
6918 2018-06-30 Jim Wilson <jimw@sifive.com>
6920 * config/riscv/predicates.md (p2m1_shift_operand): New.
6921 (high_mask_shift_operand): New.
6922 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6923 pattern using p2m1_shift_operand.
6924 (lshsi3_zero_extend_3+2): New combiner pattern using
6925 high_mask_shift_operand.
6927 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6929 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6931 (vect_recog_rotate_pattern): ...here.
6932 (vect_convert_input): Try to insert casts of invariants in the
6934 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6935 preheader to be empty.
6937 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6939 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6940 vector type. If given, install it in the new statement's
6942 (vect_element_precision): New function.
6943 (vect_unpromoted_value): New struct.
6944 (vect_unpromoted_value::vect_unpromoted_value): New function.
6945 (vect_unpromoted_value::set_op): Likewise.
6946 (vect_look_through_possible_promotion): Likewise.
6947 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6948 (vect_widened_op_tree, vect_convert_input): Likewise.
6949 (vect_convert_inputs, vect_convert_output): Likewise.
6950 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6951 to handle the optional cast of the multiplication result and
6952 vect_widened_op_tree to detect the widened multiplication itself.
6953 Do not require the input and output of promotion casts to have
6954 the same sign, but base the signedness of the operation on the
6955 input rather than the result. If the pattern includes two
6956 promotions, check that those promotions have the same sign.
6957 Do not restrict the MULT_EXPR handling to a double-width result;
6958 handle quadruple-width results and wider. Use vect_convert_inputs
6959 to convert the inputs to the common type.
6960 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6961 to handle the optional cast of the ABS result. Also allow a sign
6962 change or a sign extension between the ABS and MINUS.
6963 Use vect_widened_op_tree to detect the widened subtraction and use
6964 vect_convert_inputs to convert the inputs to the common type.
6965 (vect_handle_widen_op_by_const): Delete.
6966 (vect_recog_widen_op_pattern): New function.
6967 (vect_recog_widen_mult_pattern): Use it.
6968 (vect_recog_widen_shift_pattern): Likewise.
6969 (vect_recog_widen_sum_pattern): Use
6970 vect_look_through_possible_promotion to handle the promoted
6973 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6975 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6976 the containing gimple_seq *.
6977 * gimple-iterator.h (gsi_for_stmt): Declare it.
6978 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6979 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6980 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6981 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6982 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6984 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6986 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6987 statement being replaced is part of an existing pattern
6988 definition sequence, inserting the new pattern statements before
6990 (vect_pattern_recog_1): Don't return a bool. If the statement
6991 is already part of a pattern, instead apply pattern matching
6992 to the pattern definition statements. Don't clear the
6993 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6994 (vect_pattern_recog): Don't break after the first match;
6995 continue processing the pattern definition statements instead.
6996 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6998 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7000 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7001 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7002 (vect_recog_widen_sum_pattern): Use it.
7004 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7006 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7007 phi is not a pattern statement and has not been replaced by
7008 a pattern statement.
7009 * tree-vect-patterns.c (type_conversion_p): Don't check
7010 STMT_VINFO_IN_PATTERN_P.
7011 (vect_recog_vector_vector_shift_pattern): Likewise.
7012 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7013 the pattern statement rather than the original statement; check
7014 directly for a WIDEN_MULT_EXPR here.
7015 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7016 vect_is_simple_use to return the pattern statement rather
7017 than the original statement; use is_pattern_stmt_p to check
7018 for such a pattern statement.
7019 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7020 to return the pattern statement rather than the original statement;
7021 don't do the same transformation here.
7022 (vect_is_simple_use): If the defining statement has been replaced
7023 by a pattern statement, return the pattern statement instead.
7024 Remove the corresponding (local) transformation from the vectype
7027 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7029 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7030 end and default to null.
7031 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7032 (vectorizable_reduction): Update calls accordingly, dropping the
7033 gimple ** argument if the passed-back statement isn't needed.
7034 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7035 (vect_recog_rotate_pattern): Likewise.
7036 (vect_recog_mask_conversion_pattern): Likewise.
7037 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7038 (vect_mask_constant_operand_p): Likewise.
7039 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7040 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7041 (get_group_load_store_type, get_load_store_type): Likewise.
7042 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7043 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7044 (vectorizable_conversion, vectorizable_assignment): Likewise.
7045 (vectorizable_shift, vectorizable_operation): Likewise.
7046 (vectorizable_store, vect_is_simple_cond): Likewise.
7047 (vectorizable_condition, vectorizable_comparison): Likewise.
7048 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7049 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7050 and move it to the end. Cope with null def_stmt_outs.
7052 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7054 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7056 2018-06-29 Jeff Law <law@redhat.com>
7058 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7059 displacements for TARGET_V850E2V3 and newer.
7060 (TARGET_LRA_P): Remove. Defaults to LRA now.
7061 * config/v850/v850.md (sign23byte_load): Remove.
7062 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7063 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7065 2018-06-29 Martin Liska <mliska@suse.cz>
7068 * coverage.c (coverage_init): Mangle full path name.
7069 * doc/invoke.texi: Document the change.
7070 * gcov-io.c (mangle_path): New.
7071 * gcov-io.h (mangle_path): Likewise.
7072 * gcov.c (mangle_name): Use mangle_path for path mangling.
7074 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7076 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7077 if starting source register is not even.
7079 2018-06-29 Martin Liska <mliska@suse.cz>
7081 PR tree-optimization/86263
7082 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7083 Make edge redirection.
7085 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7087 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7088 (dump_scope_depth): New variable.
7089 (get_dump_scope_depth): New function.
7090 (dump_begin_scope): New function.
7091 (dump_end_scope): New function.
7092 * dumpfile.h (get_dump_scope_depth): New declaration.
7093 (dump_begin_scope): New declaration.
7094 (dump_end_scope): New declaration.
7095 (class auto_dump_scope): New class.
7096 (AUTO_DUMP_SCOPE): New macro.
7097 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7100 2018-06-29 Richard Biener <rguenther@suse.de>
7102 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7103 compute_all_dependences succeeds.
7104 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7105 exceed --param loop-max-datarefs-for-datadeps.
7107 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7109 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7111 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7114 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7115 alternative 0 in preferred_for_speed attribute.
7117 2018-06-28 Paul Koning <ni1d@arrl.net>
7119 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7120 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7121 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7122 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7123 for shift insn patterns.
7125 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7127 * cgraph.c (cgraph_node::get_body): Replace assignments to
7128 "dump_file" with calls to set_dump_file.
7129 * dumpfile.c (alt_dump_file): Make static, and group with...
7130 (alt_flags): ...this definition.
7131 (dumps_are_enabled): New variable.
7132 (refresh_dumps_are_enabled): New function.
7133 (set_dump_file): New function.
7134 (set_alt_dump_file): New function.
7135 (gcc::dump_manager::dump_start): Replace assignments to
7136 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7138 (gcc::dump_manager::dump_finish): Likewise.
7139 * dumpfile.h (alt_dump_file): Delete decl.
7140 (dumps_are_enabled): New variable decl.
7141 (set_dump_file): New function decl.
7142 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7144 * tree-nested.c (lower_nested_functions): Replace assignments to
7145 "dump_file" with calls to set_dump_file.
7147 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7149 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7150 goto_locus of each outgoing edge of each basic block.
7152 2018-06-28 Richard Biener <rguenther@suse.de>
7154 * dwarf2out.c (decl_scope_table): Remove.
7155 (push_decl_scope): Likewise.
7156 (pop_decl_scope): Likewise.
7157 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7158 (gen_struct_or_union_type_die): Likewise.
7159 (gen_tagged_type_die): Likewise.
7160 (dwarf2out_init): Do not initialize decl_scope_table.
7161 (dwarf2out_c_finalize): Do not free it.
7163 2018-06-28 Richard Biener <rguenther@suse.de>
7165 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7166 deciding whether to not re-use a DIE.
7168 2018-06-28 Richard Biener <rguenther@suse.de>
7170 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7171 DW_AT_abstract_origin attribute.
7173 2018-06-28 Martin Liska <mliska@suse.cz>
7175 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7176 Use newly introduced constants.
7177 * tree-switch-conversion.h (struct jump_table_cluster):
7178 Define max_ratio_for_size and max_ratio_for_speed.
7180 2018-06-28 Martin Liska <mliska@suse.cz>
7182 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7183 Add new checking assert to catch invalid state.
7184 (jump_table_cluster::can_be_handled): Handle single case
7186 (jump_table_cluster::is_beneficial): Bail out for such case.
7187 (bit_test_cluster::find_bit_tests):
7188 Add new checking assert to catch invalid state.
7189 (bit_test_cluster::can_be_handled): Handle single case
7191 (bit_test_cluster::is_beneficial): Bail out for such case.
7192 (switch_decision_tree::analyze_switch_statement):
7195 2018-06-28 Martin Liska <mliska@suse.cz>
7197 * common.opt: Introduce -completion option.
7198 * gcc.c (driver_handle_option): Handle it.
7199 (driver::main): Print completions if completion
7201 * opt-suggestions.c (option_proposer::get_completions):
7203 (option_proposer::suggest_completion): Likewise.
7204 (option_proposer::find_param_completions): Likewise.
7205 (verify_autocompletions): Likewise.
7206 (test_completion_valid_options): Likewise.
7207 (test_completion_valid_params): Likewise.
7208 (in_completion_p): Likewise.
7209 (empty_completion_p): Likewise.
7210 (test_completion_partial_match): Likewise.
7211 (test_completion_garbage): Likewise.
7212 (opt_proposer_c_tests): Likewise.
7213 * opt-suggestions.h: Declare new functions.
7214 * opts.c (common_handle_option): Handle OPT__completion_.
7215 * selftest-run-tests.c (selftest::run_tests): Add
7216 opt_proposer_c_tests.
7217 * selftest.c (assert_str_startswith): New.
7218 * selftest.h (assert_str_startswith): Likewise.
7219 (opt_proposer_c_tests): New.
7220 (ASSERT_STR_STARTSWITH): Likewise.
7222 2018-06-28 Martin Liska <mliska@suse.cz>
7224 * Makefile.in: Add opt-suggestions.o.
7225 * gcc-main.c: Include opt-suggestions.h.
7226 * gcc.c (driver::driver): Likewise.
7227 (driver::~driver): Remove m_option_suggestions.
7228 (driver::build_option_suggestions): Moved to option_proposer.
7229 (driver::suggest_option): Likewise.
7230 (driver::handle_unrecognized_options): Use option_proposer.
7231 * gcc.h (class driver): Add new memver m_option_proposer.
7232 * opt-suggestions.c: New file.
7233 * opt-suggestions.h: New file.
7235 2018-06-28 Martin Liska <mliska@suse.cz>
7237 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7238 (auto_string_vec::~auto_string_vec): Likewise.
7240 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7242 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7243 prevent_decl_creation_for_types fields up and add reset_location field.
7244 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7245 statement if id->reset_location is true.
7246 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7247 id->reset_location is true.
7248 (copy_phis_for_bb): Force input_location on the arguments if
7249 id->reset_location is true.
7250 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7251 is set on the function to be inlined.
7253 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7255 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7257 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7259 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7260 registers for Pmode.
7261 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7262 hard registers for the clobbered pseudo.
7264 2018-06-27 Paul Koning <ni1d@arrl.net>
7266 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7267 mutually exclusive options.
7268 * config/pdp11/constraints.md (h): New constraint.
7269 (O): Update definition to match shift code generation.
7270 (D): New constraint.
7271 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7273 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7275 (output_jump): Change arguments.
7276 (pdp11_fixed_cc_regs): New function.
7277 (pdp11_cc_mode): Ditto.
7278 (pdp11_expand_shift): Ditto.
7279 (pdp11_assemble_shift): Ditto.
7280 (pdp11_small_shift): Ditto.
7281 (pdp11_branch_cost): Remove.
7282 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7284 (pdp11_register_move_cost): Update for CC registers.
7285 (pdp11_rtx_costs): Add case for LSHIFTRT.
7286 (pdp11_output_jump): Add CCNZ mode conditional branches.
7287 (notice_update_cc_on_set): Remove.
7288 (pdp11_cc_mode): New function.
7289 (simple_memory_operand): Correct pre/post decrement case.
7290 (no_side_effect_operand): New function.
7291 (pdp11_regno_reg_class): Add CC_REGS class.
7292 (pdp11_fixed_cc_regs): New function.
7293 (pdp11_small_shift): New function.
7294 (pdp11_expand_shift): New function to expand shift insns.
7295 (pdp11_assemble_shift): New function to output shifts.
7296 (pdp11_branch_cost): Remove.
7297 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7298 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7299 (WCHAR_TYPE): Ditto.
7300 (PTRDIFF_TYPE): Ditto.
7301 (ADJUST_INSN_LENGTH): New macro.
7302 (FIXED_REGISTERS): Add CC registers.
7303 (CALL_USED_REGISTERS): Ditto.
7305 (REG_CLASS_NAMES): Ditto.
7306 (REG_CLASS_CONTENTS): Ditto.
7307 (SELECT_CC_MODE): Use new function.
7308 (TARGET_FLAGS_REGNUM): New macro.
7309 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7310 (cc0_reg_rtx): Remove.
7311 (CC_STATUS_MDEP): Remove.
7312 (CC_STATUS_MDEFP_INIT): Remove.
7313 (CC_IN_FPU): Remove.
7314 (NOTICE_UPDATE_CC): Remove.
7315 (REGISTER_NAMES): Add CC registers.
7316 (BRANCH_COST): Change to constant 1.
7317 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7319 * config/pdp11/pdp11.opt (mbcopy): Remove.
7320 (mbcopy-builtin): Remove.
7321 (mbranch-cheap): Remove.
7322 (mbranch-expensive): Remove.
7323 * config/pdp11/predicates.md (expand_shift_operand): Update to
7324 match shift code generation.
7325 (ccnz_operator): New predicate.
7326 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7327 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7328 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7330 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7331 description of O constraint.
7333 2018-06-27 Jeff Law <law@redhat.com>
7334 Austin Law <austinklaw@gmail.com>
7336 * config/v850/v850.md (addsi3_set_flags): New pattern.
7337 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7338 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7339 (zero_extendhisi2_v850_set_flags): Likewise.
7340 (zero_extendqisi2_v850_set_flags): Likewise.
7341 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7342 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7343 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7345 * config/v850/v850-protos.h (notice_update_cc): Remove.
7346 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7347 (v850_print_operand): Handle 'D' and "d".
7348 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7349 Add handling of arithmetic/logical operations compared against zero.
7350 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7351 Do not look at v850_compare_op, instead get mode from last argument.
7352 (v850_gen_compare): Remove
7353 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7354 after reload for prologue insns.
7355 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7357 (construct_save_jarl): Likewise.
7358 (TARGET_FLAGS_REGNUM): Define.
7359 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7360 (NOTICE_UPDATE_CC): Remove.
7361 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7362 than cc0. Conditionalize on reload_completed.
7363 (cmpsi_insn, setfcc_insn): Likewise.
7364 (tst1 splitter): Turn into define_and_split which sets the flags
7366 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7367 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7368 (cstoresf4, cstoredf4): Clobber the flags.
7369 (cmpsi, cmpsf, cmpdf): Remove expanders.
7370 (setf_insn): Remove pattern.
7371 (addsi3): Turn into define_and_split which clobbers the flags after
7372 reload and a suitable pattern (addsi3_clobber_flags) for use after
7374 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7375 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7376 (ashrsi3, ashrsi3_v850e2): Likewise.
7377 (bins): Clobber the flags.
7378 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7379 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7380 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7381 (call_value_internal_short, call_value_internal_long): Likewise.
7382 (callt_save_interrupt, callt_return_interrupt): Likewise.
7383 (save_interrupt, return_interrupt): Likewise.
7384 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7385 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7386 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7387 (All FP comparisons): Only allow after reload has completed.
7389 (divh, divhu): Tweak output template.
7390 (branch_z_normal, branch_z_invert): Remove
7391 (branch_nz_normal, branch_nz_invert): Likewise.
7392 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7394 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7395 * config/v850/v850.c (notice_update_cc): Remove.
7396 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7397 (CC_NO_CARRY): Likewise.
7398 (NOTICE_UPDATE_CC): Define to nothing.
7399 * config/v850/v850.md: Remove block comment on cc0 handling
7400 Remove "cc" attribute from all patterns. Remove cc_status handling
7401 from all patterns. Minor formatting fixes.
7403 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7405 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7406 (cortex-a76.cortex-a55): Likewise.
7407 * config/aarch64/aarch64-tune.md: Regenerate.
7408 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7409 cortex-a76.cortex-a55.
7411 2018-06-27 Jeff Law <law@redhat.com>
7413 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7414 (MULTILIB_DIRNAMES): Similarly.
7416 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7418 * gimple.h (gimple_return_retbnd): Delete.
7419 (gimple_return_set_retbnd): Likewise.
7420 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7421 gimple_return_set_retbnd.
7422 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7423 gimple_return_retbnd and adjust.
7424 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7425 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7426 Explicitly return NULL in a couple more cases. Move assertion
7427 on debug statements and remove unreachable code.
7428 (reset_debug_binding): Do not test id->retbnd.
7429 (expand_call_inline): Do not set it.
7431 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7433 * configure.ac: Add --disable-gcov option.
7434 * configure: Regenerate.
7435 * Makefile.in: Honour @enable_gcov@.
7436 * doc/install.texi: Document --disable-gcov.
7438 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7440 * config/arm/arm-cpus.in (cortex-a76): New entry.
7441 (cortex-a76.cortex-a55): Likewise.
7442 * config/arm/arm-tables.opt: Regenerate.
7443 * config/arm/arm-tune.md: Likewise.
7444 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7445 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7446 cortex-a76.cortex-a55.
7448 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7451 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7453 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7455 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7457 (EPILOGUE_USES): Likewise.
7459 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7461 * tree-inline.c (remap_location): New function extracted from...
7462 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7463 (copy_phis_for_bb): ...here. Call remap_location.
7464 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7466 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7468 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7469 unaligned vsx for 16B memset.
7471 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7474 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7475 ieee128_float_type_node to long_double_type_node unless
7476 TARGET_LONG_DOUBLE_128 is set.
7478 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7480 * cfgloop.c (get_loop_location): Convert return type from
7481 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7482 by implicit construction from rtx_insn *, and using
7483 dump_user_location_t::from_function_decl for the fallback case.
7484 * cfgloop.h (get_loop_location): Convert return type from
7485 location_t to dump_user_location_t.
7486 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7487 dump_printf_loc to pass in a dump_location_t rather than a
7488 location_t, via the gimple stmt.
7489 * coverage.c (get_coverage_counts): Update calls to
7490 dump_printf_loc to pass in dump_location_t rather than a
7492 * doc/optinfo.texi (Dump types): Convert example of
7493 dump_printf_loc from taking "locus" to taking "insn". Update
7494 description of the "_loc" calls to cover dump_location_t.
7495 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7497 (dump_user_location_t::dump_user_location_t): New constructors,
7498 from gimple *stmt and rtx_insn *.
7499 (dump_user_location_t::from_function_decl): New function.
7500 (dump_loc): Make static.
7501 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7502 const dump_location_t &.
7503 (dump_generic_expr_loc): Delete.
7504 (dump_printf_loc): Convert param "loc" from location_t to
7505 const dump_location_t &.
7506 (selftest::test_impl_location): New function.
7507 (selftest::dumpfile_c_tests): New function.
7508 * dumpfile.h: Include "profile-count.h".
7509 (class dump_user_location_t): New class.
7510 (struct dump_impl_location_t): New struct.
7511 (class dump_location_t): New class.
7512 (dump_printf_loc): Convert 2nd param from source_location to
7513 const dump_location_t &.
7514 (dump_generic_expr_loc): Delete.
7515 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7516 const dump_location_t &.
7517 * gimple-fold.c (fold_gimple_assign): Update call to
7518 dump_printf_loc to pass in a dump_location_t rather than a
7519 location_t, via the gimple stmt.
7520 (gimple_fold_call): Likewise.
7521 * gimple-loop-interchange.cc
7522 (loop_cand::analyze_iloop_reduction_var): Update for change to
7523 check_reduction_path.
7524 (tree_loop_interchange::interchange): Update for change to
7526 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7527 change in return-type of find_loop_location.
7528 (graphite_regenerate_ast_isl): Likewise.
7529 * graphite-optimize-isl.c (optimize_isl): Likewise.
7530 * graphite.c (graphite_transform_loops): Likewise.
7531 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7532 pass in a dump_location_t rather than a location_t, via the
7534 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7535 * ipa.c (walk_polymorphic_call_targets): Likewise.
7536 * loop-unroll.c (report_unroll): Convert "locus" param from
7537 location_t to dump_location_t.
7538 (decide_unrolling): Update for change to get_loop_location's
7540 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7541 location_t to dump_user_location_t.
7542 (grid_find_single_omp_among_assignments_1): Updates calls to
7543 dump_printf_loc to pass in a dump_location_t rather than a
7544 location_t, via the gimple stmt.
7545 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7546 location_t to dump_location_t. Updates calls to dump_printf_loc
7547 to pass in a dump_location_t rather than a location_t, via the
7549 (grid_inner_loop_gridifiable_p): Likewise.
7550 (grid_dist_follows_simple_pattern): Likewise.
7551 (grid_gfor_follows_tiling_pattern): Likewise.
7552 (grid_target_follows_gridifiable_pattern): Likewise.
7553 (grid_attempt_target_gridification): Convert initialization
7554 of local "grid" from memset to zero-initialization; FIXME: does
7555 this require C++11? Update call to dump_printf_loc to pass in a
7556 optinfo_location rather than a location_t, via the gimple stmt.
7557 * profile.c (read_profile_edge_counts): Updates call to
7558 dump_printf_loc to pass in a dump_location_t rather than a
7560 (compute_branch_probabilities): Likewise.
7561 * selftest-run-tests.c (selftest::run_tests): Call
7563 * selftest.h (dumpfile_c_tests): New decl.
7564 * tree-loop-distribution.c (pass_loop_distribution::execute):
7565 Update for change in return type of find_loop_location.
7566 * tree-parloops.c (parallelize_loops): Likewise.
7567 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7568 "locus" from location_t to dump_user_location_t.
7569 (canonicalize_loop_induction_variables): Likewise.
7570 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7571 for change in return type of find_loop_location.
7572 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7573 to dump_printf_loc to pass in a dump_location_t rather than a
7574 location_t, via the stmt.
7575 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7577 * tree-vect-loop-manip.c (find_loop_location): Convert return
7578 type from source_location to dump_user_location_t.
7579 (vect_do_peeling): Update for above change.
7580 (vect_loop_versioning): Update for change in type of
7582 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7583 from location_t to dump_user_location_t.
7584 (vect_estimate_min_profitable_iters): Update for change in type
7586 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7587 location_t to dump_location_t.
7588 (vect_slp_bb): Update for change in type of vect_location.
7589 * tree-vectorizer.c (vect_location): Convert from source_location
7590 to dump_user_location_t.
7591 (try_vectorize_loop_1): Update for change in vect_location's type.
7592 (vectorize_loops): Likewise.
7593 (increase_alignment): Likewise.
7594 * tree-vectorizer.h (vect_location): Convert from source_location
7595 to dump_user_location_t.
7596 (find_loop_location): Convert return type from source_location to
7597 dump_user_location_t.
7598 (check_reduction_path): Convert 1st param from location_t to
7599 dump_user_location_t.
7600 * value-prof.c (check_counter): Update call to dump_printf_loc to
7601 pass in a dump_user_location_t rather than a location_t; update
7602 call to error_at for change in type of "locus".
7603 (check_ic_target): Update call to dump_printf_loc to
7604 pass in a dump_user_location_t rather than a location_t, via the
7607 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7609 * config/s390/s390.h (enum processor_flags): Do not use
7610 default tune parameter when -march was specified.
7612 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7615 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7616 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7619 2018-06-26 Richard Biener <rguenther@suse.de>
7621 PR tree-optimization/86287
7623 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7624 (vect_analyze_loop): Initialize n_stmts.
7626 2018-06-26 Richard Biener <rguenther@suse.de>
7629 * fold-const.c (fold_convertible_p): Pointer extension
7632 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7635 * dwarf2out.c (loc_list_has_views): Adjust comments.
7636 (dw_loc_list): Split single cross-partition range with
7639 2018-06-25 Jeff Law <law@redhat.com>
7641 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7642 on -mbig-switch by default.
7644 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7646 (const_float_0_operand): Remove unused predicate.
7647 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7648 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7649 (recipsf2): New expander. Original pattern now called
7651 (recipdf2, recipdf2_insn): Similarly.
7652 (rsqrtsf2, rsqrtsf2_insn): Similarly
7653 (rsqrtdf2, rsqrtdf2_insn): Similarly
7655 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7657 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7658 Simplify logic for FreeBSD (twice).
7660 2018-06-25 Martin Sebor <msebor@redhat.com>
7662 PR tree-optimization/86204
7663 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7664 a strnlen result if it's less than the length of the string.
7666 2018-06-25 Martin Sebor <msebor@redhat.com>
7668 PR tree-optimization/85700
7669 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7670 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7671 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7673 2018-06-25 Martin Sebor <msebor@redhat.com>
7675 * doc/extend.texi (Zero-length arrays): Update and clarify.
7677 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7679 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7680 added IEEE/IBM long double multilib support on PowerPC little
7681 endian Linux systems.
7682 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7683 (MULTILIB_DEFAULTS): Likewise.
7684 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7686 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7687 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7688 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7690 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7693 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7694 (REORDER_45): Likewise.
7696 2018-06-25 Jeff Law <law@redhat.com>
7698 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7699 dividend to 32 bits. Adjust length.
7700 (udivmodhi4): Cleanup output template. Fix length.
7702 2018-06-25 Carl Love <cel@us.ibm.com>
7704 * config/rs6000/vsx.md: Change word selector to prefered location.
7706 2018-06-25 Richard Biener <rguenther@suse.de>
7708 PR tree-optimization/86304
7709 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7710 epilogue-if-converted loops as well.
7712 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7714 * lto-section-out.c (lto_begin_section): Do not print section
7715 name for noaddr and unnumbered dumps.
7717 2018-06-25 Richard Biener <rguenther@suse.de>
7719 * tree-vectorizer.h (struct vec_info_shared): New structure
7720 with parts split out from struct vec_info and loop_nest from
7721 struct _loop_vec_info.
7722 (struct vec_info): Adjust accordingly.
7723 (struct _loop_vec_info): Likewise.
7724 (LOOP_VINFO_LOOP_NEST): Adjust.
7725 (LOOP_VINFO_DATAREFS): Likewise.
7726 (LOOP_VINFO_DDRS): Likewise.
7727 (struct _bb_vec_info): Likewise.
7728 (BB_VINFO_DATAREFS): Likewise.
7729 (BB_VINFO_DDRS): Likewise.
7730 (struct _stmt_vec_info): Add dr_aux member.
7731 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7732 (DR_MISALIGNMENT_UNINITIALIZED): New.
7733 (set_dr_misalignment): Adjust.
7734 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7735 (vect_analyze_loop): Adjust prototype.
7736 (vect_analyze_loop_form): Likewise.
7737 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7738 Compute dependences lazily.
7739 (vect_record_base_alignments): Use shared datarefs/ddrs.
7740 (vect_verify_datarefs_alignment): Likewise.
7741 (vect_analyze_data_refs_alignment): Likewise.
7742 (vect_analyze_data_ref_accesses): Likewise.
7743 (vect_analyze_data_refs): Likewise.
7744 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7745 constructor parameter for shared part.
7746 (vect_analyze_loop_form): Pass in shared part and adjust.
7747 (vect_analyze_loop_2): Pass in storage for the number of
7748 stmts. Move loop nest finding to the caller. Compute
7750 (vect_analyze_loop): Pass in shared part.
7751 (vect_transform_loop): Verify shared datarefs are unchanged.
7752 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7753 constructor parameter for shared part.
7754 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7755 (vect_slp_bb): Verify shared datarefs are unchanged before
7757 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7759 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7760 DR_MISALIGNMENT_UNINITIALIZED.
7761 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7762 parameter for shared part.
7763 (vec_info::~vec_info): Adjust.
7764 (vec_info_shared::vec_info_shared): New.
7765 (vec_info_shared::~vec_info_shared): Likewise.
7766 (vec_info_shared::save_datarefs): Likewise.
7767 (vec_info_shared::check_datarefs): Likewise.
7768 (try_vectorize_loop_1): Construct shared part live for analyses
7769 of a single loop for multiple vector sizes.
7770 * tree-parloops.c (gather_scalar_reductions): Adjust.
7772 2018-06-25 Richard Biener <rguenther@suse.de>
7774 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7775 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7776 (vect_analyze_data_refs): Remove similar code from here and
7777 simplify accordingly.
7779 2018-06-25 Richard Biener <rguenther@suse.de>
7781 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7782 for reverse storage order accesses rather than asserting
7783 they cannot happen here.
7785 2018-06-25 Tom de Vries <tdevries@suse.de>
7788 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7789 Use data16 instead of .byte for insn prefix.
7791 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7794 * parser.c (make_char_string_pack): Pass this literal chars
7795 through cpp_interpret_string.
7796 (cp_parser_userdef_numeric_literal): Check the result of
7797 make_char_string_pack.
7799 2018-06-24 Maya Rashish <coypu@sdf.org>
7801 * ginclude/stddef.h: Simplify conditions around avoiding
7802 re-definition of __size_t.
7804 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7806 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7807 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7809 2018-06-22 Maya Rashish <coypu@sdf.org>
7811 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7812 made to OpenBSD and NetBSD through the years.
7814 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7816 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7817 behavior of vec_pack (vector double, vector double) to match
7818 behavior of vec_float2 (vector double, vector double).
7820 2018-06-22 Olivier Hainque <hainque@adacore.com>
7822 * gimplify.c (gimplify_function_tree): Prevent creation
7823 of a trampoline for the address of the current function
7824 passed to entry/exit instrumentation hooks.
7826 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7829 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7832 2018-06-22 Martin Liska <mliska@suse.cz>
7834 PR tree-optimization/86263
7835 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7836 Bail out if is_enabled is false.
7837 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7839 (jump_table_cluster::is_enabled): New function.
7841 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7843 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7844 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7845 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7846 (lto_input_ts_binfo_tree_pointers): Likewise.
7847 * tree-streamer-out.c (streamer_write_tree_bitfields,
7848 write_ts_binfo_tree_pointers): Likewise.
7849 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7851 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7853 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7855 2018-06-22 Martin Liska <mliska@suse.cz>
7857 * symbol-summary.h (get): Make it pure and inline move
7858 functionality from ::get function.
7859 (get): Remove and inline into ::get and ::get_create.
7860 (get_create): Move code from ::get function.
7862 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7865 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7866 -x assembler-with-cpp.
7868 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7870 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7871 _FILE_OFFSET_BITS=64 for C++.
7873 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7875 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7876 conversion insn that shows up when pr85657-3.c is compiled using
7877 IEEE 128-bit long double.
7878 (neg<mode>2_internal): Use the correct mode to check whether the
7879 mode is IBM extended.
7880 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7881 multiply and divide external functions from being created more
7884 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7886 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7888 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7889 the edge can be forwarded.
7890 (cfg_layout_merge_blocks): Likewise.
7892 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7894 * except.c (finish_eh_generation): Commit edge insertions only after
7895 the EH edges have been redirected from post-landing to landing pads.
7897 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7899 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7900 create_tmp_var_for to create the FRAME decl.
7901 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7903 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7905 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7906 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7907 debug statement when resetting its value.
7908 (expand_call_inline): Copy the locus of the call onto the assignment
7909 of the return value, if any. Use local variable in more cases.
7911 2018-06-21 Martin Liska <mliska@suse.cz>
7913 * ipa-pure-const.c (propagate_nothrow): Use
7914 funct_state_summaries->get.
7915 (dump_malloc_lattice): Likewise.
7916 (propagate_malloc): Likewise.
7918 2018-06-21 Richard Biener <rguenther@suse.de>
7920 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7921 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7922 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7924 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7925 BLOCK_ABSTRACT_ORIGIN unconditionally.
7927 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7929 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7931 * ipa-reference.c (ipa_reference_c_finalize): Delete
7932 ipa_ref_opt_sum_summaries and set it to NULL.
7934 2018-06-21 Tom de Vries <tdevries@suse.de>
7936 PR tree-optimization/85859
7937 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7938 test with comment from bb_no_side_effects_p.
7940 2018-06-21 Richard Biener <rguenther@suse.de>
7942 PR tree-optimization/86232
7943 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7944 max for constant niter.
7946 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7948 * config/aarch64/aarch64-simd.md
7949 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7951 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7953 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7954 Make opernads of the unspec commutative.
7956 2018-06-21 Richard Biener <rguenther@suse.de>
7958 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7959 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7960 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7961 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7963 (vect_record_base_alignments): Do not record base alignment
7964 for gathers or scatters.
7965 (vect_compute_data_ref_alignment): Drop return value that is always
7966 true. Bail out early for gathers or scatters.
7967 (vect_enhance_data_refs_alignment): Bail out early for gathers
7969 (vect_find_same_alignment_drs): Likewise.
7970 (vect_analyze_data_refs_alignment): Remove dead code.
7971 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7972 (vect_analyze_data_refs): For possible gathers or scatters do
7973 not create an alternate DR, just check their possible validity
7974 and mark them. Adjust DECL_NONALIASED handling to not rely
7976 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7977 update inits of gathers or scatters.
7978 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7979 Also copy gather/scatter flag to pattern vinfo.
7981 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7983 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7984 behavior of vec_packsu (vector unsigned long long, vector unsigned
7985 long long) to match behavior of vec_packs with same signature.
7987 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7988 Thomas Schwinge <thomas@codesourcery.com>
7989 Cesar Philippidis <cesar@codesourcery.com>
7991 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7992 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7993 (gimplify_adjust_omp_clauses): Likewise.
7994 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7995 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7996 (gimplify_omp_target_update): Update handling of acc update and
7998 * omp-low.c (install_var_field): Remove unused parameter
7999 base_pointers_restrict.
8000 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8001 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8003 (omp_target_base_pointers_restrict_p): Delete.
8004 (scan_omp_target): Update call to scan_sharing_clauses.
8005 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8007 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8008 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8009 (convert_local_omp_clauses): Likewise.
8010 * tree-pretty-print.c (dump_omp_clause): Likewise.
8011 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8013 (omp_clause_code_name): Likewise.
8015 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8018 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8021 PR tree-optimization/86231
8022 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8023 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8025 2018-06-20 Tom de Vries <tdevries@suse.de>
8027 PR tree-optimization/86097
8028 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8029 iv type if signedness of iv type is not the same as that of *nit.
8031 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8033 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8034 EDGE_EH edges, verify they are all EDGE_EH.
8036 2018-06-20 Maya Rashish <coypu@sdf.org>
8038 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8040 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8042 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8043 * config/aarch64/aarch64.c (xgene1_tunings): Add
8044 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8045 (aarch64_mode_valid_for_sched_fusion_p):
8046 Allow 16-byte modes.
8047 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8048 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8050 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8052 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8053 * config/aarch64/iterators.md (VQ2): New mode iterator.
8055 2018-06-20 Martin Liska <mliska@suse.cz>
8057 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8058 Change default ratio from 10 to 8.
8060 2018-06-20 Martin Liska <mliska@suse.cz>
8062 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8064 (bit_test_cluster::find_bit_tests): Likewise.
8065 (switch_decision_tree::analyze_switch_statement): Find clusters.
8066 * tree-switch-conversion.h (struct jump_table_cluster): Document
8069 2018-06-20 Martin Liska <mliska@suse.cz>
8071 * tree-switch-conversion.c (switch_conversion::collect):
8072 Record m_uniq property.
8073 (switch_conversion::expand): Bail out for special conditions.
8074 (group_cluster::~group_cluster): New.
8075 (group_cluster::group_cluster): Likewise.
8076 (group_cluster::dump): Likewise.
8077 (jump_table_cluster::emit): New.
8078 (switch_decision_tree::fix_phi_operands_for_edges): New.
8079 (struct case_node): Remove struct.
8080 (jump_table_cluster::can_be_handled): New.
8081 (case_values_threshold): Moved to header.
8082 (reset_out_edges_aux): Likewise.
8083 (jump_table_cluster::is_beneficial): New.
8084 (bit_test_cluster::can_be_handled): Likewise.
8085 (add_case_node): Remove.
8086 (bit_test_cluster::is_beneficial): New.
8087 (case_bit_test::cmp): New.
8088 (bit_test_cluster::emit): New.
8089 (expand_switch_as_decision_tree_p): Remove.
8090 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8091 (fix_phi_operands_for_edge): Likewise.
8092 (switch_decision_tree::analyze_switch_statement): New.
8093 (compute_cases_per_edge): Move ...
8094 (switch_decision_tree::compute_cases_per_edge): ... here.
8095 (try_switch_expansion): Likewise.
8096 (switch_decision_tree::try_switch_expansion): Likewise.
8097 (record_phi_operand_mapping): Likewise.
8098 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8099 (emit_case_decision_tree): Likewise.
8100 (switch_decision_tree::emit): Likewise.
8101 (balance_case_nodes): Likewise.
8102 (switch_decision_tree::balance_case_nodes): Likewise.
8103 (dump_case_nodes): Likewise.
8104 (switch_decision_tree::dump_case_nodes): Likewise.
8105 (emit_jump): Likewise.
8106 (switch_decision_tree::emit_jump): Likewise.
8107 (emit_cmp_and_jump_insns): Likewise.
8108 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8109 (emit_case_nodes): Likewise.
8110 (switch_decision_tree::emit_case_nodes): Likewise.
8111 (conditional_probability): Remove.
8112 * tree-switch-conversion.h (enum cluster_type): New.
8114 (struct cluster): Likewise.
8115 (cluster::cluster): Likewise.
8116 (struct simple_cluster): Likewise.
8117 (simple_cluster::simple_cluster): Likewise.
8118 (struct group_cluster): Likewise.
8119 (struct jump_table_cluster): Likewise.
8120 (struct bit_test_cluster): Likewise.
8121 (struct min_cluster_item): Likewise.
8122 (struct case_tree_node): Likewise.
8123 (case_tree_node::case_tree_node): Likewise.
8124 (jump_table_cluster::case_values_threshold): Likewise.
8125 (struct case_bit_test): Likewise.
8126 (struct switch_decision_tree): Likewise.
8127 (struct switch_conversion): Likewise.
8128 (switch_decision_tree::reset_out_edges_aux): Likewise.
8130 2018-06-20 Martin Liska <mliska@suse.cz>
8132 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8133 (hoist_edge_and_branch_if_true): Likewise.
8134 (expand_switch_using_bit_tests_p): Likewise.
8135 (struct case_bit_test): Likewise.
8136 (case_bit_test_cmp): Likewise.
8137 (emit_case_bit_tests): Likewise.
8138 (switch_conversion::switch_conversion): New class.
8139 (struct switch_conv_info): Remove old struct.
8140 (collect_switch_conv_info): More to ...
8141 (switch_conversion::collect): ... this.
8142 (check_range): Likewise.
8143 (switch_conversion::check_range): Likewise.
8144 (check_all_empty_except_final): Likewise.
8145 (switch_conversion::check_all_empty_except_final): Likewise.
8146 (check_final_bb): Likewise.
8147 (switch_conversion::check_final_bb): Likewise.
8148 (create_temp_arrays): Likewise.
8149 (switch_conversion::create_temp_arrays): Likewise.
8150 (free_temp_arrays): Likewise.
8151 (gather_default_values): Likewise.
8152 (switch_conversion::gather_default_values): Likewise.
8153 (build_constructors): Likewise.
8154 (switch_conversion::build_constructors): Likewise.
8155 (constructor_contains_same_values_p): Likewise.
8156 (switch_conversion::contains_same_values_p): Likewise.
8157 (array_value_type): Likewise.
8158 (switch_conversion::array_value_type): Likewise.
8159 (build_one_array): Likewise.
8160 (switch_conversion::build_one_array): Likewise.
8161 (build_arrays): Likewise.
8162 (switch_conversion::build_arrays): Likewise.
8163 (gen_def_assigns): Likewise.
8164 (switch_conversion::gen_def_assigns): Likewise.
8165 (prune_bbs): Likewise.
8166 (switch_conversion::prune_bbs): Likewise.
8167 (fix_phi_nodes): Likewise.
8168 (switch_conversion::fix_phi_nodes): Likewise.
8169 (gen_inbound_check): Likewise.
8170 (switch_conversion::gen_inbound_check): Likewise.
8171 (process_switch): Use the newly created class.
8172 (switch_conversion::expand): New.
8173 (switch_conversion::~switch_conversion): New.
8174 * tree-switch-conversion.h: New file.
8176 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8178 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8179 tree-vect-patterns.c.
8180 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8181 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8182 (vect_recog_sad_pattern): Likewise.
8183 (vect_recog_widen_sum_pattern): Likewise.
8184 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8185 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8186 (vect_recog_rotate_pattern): Likewise.
8187 (vect_recog_mult_pattern): Likewise.
8188 (vect_recog_vector_vector_shift_pattern): Likewise.
8189 (vect_recog_divmod_pattern): Likewise.
8190 (vect_recog_mixed_size_cond_pattern): Likewise.
8191 (vect_recog_bool_pattern): Likewise.
8192 (vect_recog_mask_conversion_pattern): Likewise.
8193 (vect_try_gather_scatter_pattern): Likewise.
8194 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8195 (vect_recog_over_widening_pattern): Likewise.
8196 (vect_recog_gather_scatter_pattern): Likewise.
8197 (vect_recog_func_ptr): Move from tree-vectorizer.h
8198 (vect_vect_recog_func_ptrs): Move further down the file.
8199 (vect_recog_func): Likewise. Remove the third argument.
8200 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8201 (vect_pattern_recog_1): Expect the pattern function to do any
8202 necessary target tests. Also expect it to provide a vector type.
8203 Remove the type_in handling.
8205 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8207 * tree-vect-patterns.c (vect_pattern_detected): New function.
8208 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8209 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8210 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8211 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8212 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8213 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8214 (vect_recog_mask_conversion_pattern)
8215 (vect_try_gather_scatter_pattern): Likewise.
8217 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8219 * tree-vect-patterns.c (vect_get_internal_def): New function.
8220 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8221 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8222 (search_type_for_mask_1): Use it.
8224 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8226 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8227 redundant WIDEN_SUM_EXPR handling.
8228 (vect_recog_sad_pattern): Likewise.
8230 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8232 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8233 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8234 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8235 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8236 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8238 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8240 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8241 use the stmt_vec_info of the original bb statement for the
8242 new zero assignment, even if the call is part of a pattern.
8244 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8246 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8247 that the sequence is attached to the original statement rather
8248 than the pattern statement.
8249 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8250 PATTERN_DEF_SEQ from the original statement rather than
8251 the main pattern statement.
8252 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8253 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8254 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8256 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8258 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8259 definition statements before the early exit for statements that aren't
8261 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8263 (vect_transform_loop): ...here. Process pattern definition
8264 statements without first checking whether the main pattern
8265 statement is live or relevant.
8267 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8269 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8270 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8272 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8274 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8275 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8276 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8277 (expand_block_compare): Change select_block_compare_mode call.
8278 (expand_strncmp_align_check): Use new functions, fix comment.
8279 (emit_final_str_compare_gpr): New function.
8280 (expand_strn_compare): Refactor and clean up code.
8281 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8283 2018-06-19 Tony Reix <tony.reix@atos.com>
8284 Damien Bergamini <damien.bergamini@atos.com>
8285 David Edelsohn <dje.gcc@gmail.com>
8287 * collect2.c (static_obj): New variable.
8288 (static_libs): New variable.
8289 (is_in_list): Uncomment declaration.
8290 (main): Track AIX libraries linked statically.
8291 (is_in_list): Uncomment definition.
8292 (scan_prog_file): Don't add AIX shared libraries initializer
8293 to constructor list if linking statically.
8295 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8297 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8299 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8301 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8303 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8306 2018-06-19 Martin Liska <mliska@suse.cz>
8308 * config/i386/i386.c (ix86_can_inline_p): Do not use
8309 ipa_fn_summaries::get_create.
8310 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8312 (devirtualization_time_bonus): Likewise.
8313 (ipcp_propagate_stage): Likewise.
8314 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8315 (edge_set_predicate): Likewise.
8316 (evaluate_conditions_for_known_args): Likewise.
8317 (evaluate_properties_for_edge): Likewise.
8318 (ipa_call_summary::reset): Tranform to ...
8319 (ipa_call_summary::~ipa_call_summary): ... this.
8320 (ipa_fn_summary::reset): Transform to ...
8321 (ipa_fn_summary::~ipa_fn_summary): ... this.
8322 (ipa_fn_summary_t::remove): Rename to ...
8323 (ipa_fn_summary_t::remove_callees): ... this.
8324 (ipa_fn_summary_t::duplicate): Use placement new
8325 instead of memory copy.
8326 (ipa_call_summary_t::duplicate): Likewise.
8327 (ipa_call_summary_t::remove): Remove.
8328 (dump_ipa_call_summary): Change get_create to get.
8329 (ipa_dump_fn_summary): Dump only when summary exists.
8330 (analyze_function_body): Use symbol_summary::get instead
8332 (compute_fn_summary): Likewise.
8333 (estimate_edge_devirt_benefit): Likewise.
8334 (estimate_edge_size_and_time): Likewise.
8335 (inline_update_callee_summaries): Likewise.
8336 (remap_edge_change_prob): Likewise.
8337 (remap_edge_summaries): Likewise.
8338 (ipa_merge_fn_summary_after_inlining): Likewise.
8339 (write_ipa_call_summary): Likewise.
8340 (ipa_fn_summary_write): Likewise.
8341 (ipa_free_fn_summary): Likewise.
8342 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8343 (struct ipa_call_summary): Likewise.
8344 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8346 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8347 (estimate_size_after_inlining): Likewise.
8348 (estimate_growth): Likewise.
8349 (growth_likely_positive): Likewise.
8350 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8351 (inline_call): Likewise.
8352 * ipa-inline.c (caller_growth_limits): Likewise.
8353 (can_inline_edge_p): Likewise.
8354 (can_inline_edge_by_limits_p): Likewise.
8355 (compute_uninlined_call_time): Likewise.
8356 (compute_inlined_call_time): Likewise.
8357 (want_inline_small_function_p): Likewise.
8358 (edge_badness): Likewise.
8359 (update_caller_keys): Likewise.
8360 (update_callee_keys): Likewise.
8361 (inline_small_functions): Likewise.
8362 (inline_to_all_callers_1): Likewise.
8363 (dump_overall_stats): Likewise.
8364 (early_inline_small_functions): Likewise.
8365 (early_inliner): Likewise.
8366 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8367 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8368 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8369 * ipa-split.c (execute_split_functions): Likewise.
8370 * symbol-summary.h: Likewise.
8371 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8373 2018-06-19 Richard Biener <rguenther@suse.de>
8375 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8376 (vectorize_loops): ... here. Fix dbgcnt handling.
8377 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8379 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8382 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8383 ieee128 argument takes up only one (vector) register, not two (floating
8386 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8388 * gimplify.c (gimplify_init_constructor): Really never clear for an
8389 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8391 2018-06-19 Richard Biener <rguenther@suse.de>
8393 PR tree-optimization/86179
8394 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8395 after failed recognition.
8397 2018-06-18 Martin Sebor <msebor@redhat.com>
8400 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8401 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8402 Handle integer subtraction.
8403 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8404 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8406 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8408 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8409 param from rtx to rtx_insn *.
8410 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8412 (frv_ifcvt_modify_insn): Likwise.
8413 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8414 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8415 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8416 as_a <rtx_insn *> cast to local "unprotected_region" once
8417 it's been established that it's not NULL or pc_rtx.
8418 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8419 param "sethi" from rtx to rtx_insn *.
8420 (nds32_group_float_insns): Likewise for param "insn".
8421 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8423 (vax_output_int_subtract): Likewise.
8424 * config/vax/vax.c (vax_output_int_add): Likewise for param
8426 (vax_output_int_subtract): Likewise.
8427 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8428 (emit_pattern_after): Likewise for param "after".
8429 (emit_insn_after): Likewise.
8430 (emit_jump_insn_after): Likewise.
8431 (emit_call_insn_after): Likewise.
8432 (emit_debug_insn_after): Likewise.
8433 (emit_pattern_before): Likewise for param "before".
8434 (emit_insn_before): Likewise.
8435 (emit_jump_insn_before): Likewise.
8436 * final.c (get_insn_template): Likewise for param "insn", removing
8438 * output.h (get_insn_template): Likewise for 2nd param.
8439 * rtl.h (emit_insn_before): Likewise.
8440 (emit_jump_insn_before): Likewise.
8441 (emit_debug_insn_before_noloc): Likewise.
8442 (emit_insn_after): Likewise.
8443 (emit_jump_insn_after): Likewise.
8444 (emit_call_insn_after): Likewise.
8445 (emit_debug_insn_after): Likewise.
8446 (set_insn_deleted): Likewise for param.
8448 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8451 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8452 floating point modes, so that IFmode is numerically greater than
8453 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8454 to declare the ordering. This prevents IFmode from being
8455 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8456 machine. Include rs6000-modes.h to share the fractional values
8457 between genmodes* and the rest of the compiler.
8461 * config/rs6000/rs6000-modes.h: New file.
8462 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8463 meaning of rs6000_long_double_size so that 126..128 selects an
8464 appropriate 128-bit floating point type.
8465 (rs6000_option_override_internal): Likewise.
8466 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8467 (TARGET_LONG_DOUBLE_128): Change the meaning of
8468 rs6000_long_double_size so that 126..128 selects an appropriate
8469 128-bit floating point type.
8470 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8471 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8472 source and destination to match the standard usage.
8473 (truncifkf2): Likewise.
8474 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8475 ISA 2.07 to use an explicit clobber, instead of passing in a
8477 (copysign<mode>3_soft): Likewise.
8479 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8481 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8482 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8483 (vect_slp_analyze_instance_dependence): Likewise.
8484 (vect_enhance_data_refs_alignment): Likewise.
8485 (vect_analyze_data_refs_alignment): Likewise.
8486 (vect_slp_analyze_and_verify_instance_alignment
8487 (vect_analyze_data_ref_accesses): Likewise.
8488 (vect_prune_runtime_alias_test_list): Likewise.
8489 (vect_analyze_data_refs): Likewise.
8490 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8491 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8492 (vect_analyze_scalar_cycles_1): Likewise.
8493 (vect_get_loop_niters): Likewise.
8494 (vect_analyze_loop_form_1): Likewise.
8495 (vect_update_vf_for_slp): Likewise.
8496 (vect_analyze_loop_operations): Likewise.
8497 (vect_analyze_loop): Likewise.
8498 (vectorizable_induction): Likewise.
8499 (vect_transform_loop): Likewise.
8500 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8501 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8502 (vect_make_slp_decision): Likewise.
8503 (vect_detect_hybrid_slp): Likewise.
8504 (vect_slp_analyze_operations): Likewise.
8505 (vect_slp_bb): Likewise.
8506 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8507 (vectorizable_bswap): Likewise.
8508 (vectorizable_call): Likewise.
8509 (vectorizable_simd_clone_call): Likewise.
8510 (vectorizable_conversion): Likewise.
8511 (vectorizable_assignment): Likewise.
8512 (vectorizable_shift): Likewise.
8513 (vectorizable_operation): Likewise.
8514 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8516 2018-06-18 Martin Sebor <msebor@redhat.com>
8518 PR tree-optimization/81384
8519 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8520 * builtins.c (expand_builtin_strnlen): New function.
8521 (expand_builtin): Call it.
8522 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8523 * builtins.def (BUILT_IN_STRNLEN): New.
8524 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8525 Warn for bounds in excess of maximum object size.
8526 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8527 single-value ranges. Handle strnlen.
8528 (handle_builtin_strlen): Handle strnlen.
8529 (strlen_check_and_optimize_stmt): Same.
8530 * doc/extend.texi (Other Builtins): Document strnlen.
8532 2018-06-18 Maya Rashish <coypu@sdf.org>
8534 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8535 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8536 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8538 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8540 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8542 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8544 * tree.c (escaped_string::escape): Replace cast to char * by
8545 const_cast<char *> (unescaped).
8547 2018-06-18 Nick Clifton <nickc@redhat.com>
8550 * tree.c (escaped_string): New class. Converts an unescaped
8551 string into its escaped equivalent.
8552 (warn_deprecated_use): Use the new class to convert the
8553 deprecation message, if present.
8554 (test_escaped_strings): New self test.
8555 (test_c_tests): Add test_escaped_strings.
8556 * doc/extend.texi (deprecated): Add a note that the
8557 deprecation message is affected by the -fmessage-length
8558 option, and that control characters will be escaped.
8559 (#pragma GCC error): Document this pragma.
8560 (#pragma GCC warning): Likewise.
8561 * doc/invoke.texi (-fmessage-length): Document this option's
8562 effect on the #warning and #error preprocessor directives and
8563 the deprecated attribute.
8565 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8567 * tree.c (decl_value_expr_lookup): Revert latest change.
8568 (decl_value_expr_insert): Likewise.
8570 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8572 * gimplify.c (nonlocal_vlas): Delete.
8573 (nonlocal_vla_vars): Likewise.
8574 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8576 (gimplify_body): Do not create and destroy nonlocal_vlas.
8577 * tree-nested.c: Include diagnostic.h.
8578 (use_pointer_in_frame): Tweak.
8579 (lookup_field_for_decl): Add assertion and declare the transformation.
8580 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8581 internal error when the reference is in a wrong context. Do not
8582 create a debug decl by default.
8583 (note_nonlocal_block_vlas): Delete.
8584 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8585 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8586 create a debug decl by default.
8587 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8588 call is in a wrong context.
8589 (fixup_vla_decls): New function.
8590 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8591 debug variables were created.
8592 * tree.c (decl_value_expr_lookup): Add checking assertion.
8593 (decl_value_expr_insert): Likewise.
8595 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8598 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8599 * tree-scalar-evolution.c (interpret_expr): Likewise.
8600 (expression_expensive_p): Likewise.
8601 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8602 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8603 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8604 (ssa_defined_by_minus_one_stmt_p): New.
8606 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8609 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8610 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8611 * dojump.c (do_jump): Likewise.
8612 * expr.c (expand_expr_real_2): Check operand type's sign.
8613 * fold-const.c (const_unop): Handle ABSU_EXPR.
8614 (fold_abs_const): Likewise.
8615 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8616 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8617 (strip_sign_op_1): Likesise.
8618 * match.pd: Add new pattern to generate ABSU_EXPR.
8619 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8620 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8621 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8622 * tree-inline.c (estimate_operator_cost): Likewise.
8623 * tree-pretty-print.c (dump_generic_node): Likewise.
8624 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8625 * tree.def (ABSU_EXPR): New.
8627 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8630 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8631 documented as preserved for backward compatibility only.
8632 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8634 PR rtl-optimization/86108
8635 * bb-reorder.c (create_forwarder_block): Renamed to ...
8636 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8637 jump from new landing pad to the second part.
8638 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8641 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8644 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8645 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8646 Only call store_expr for halves if the mode is the same.
8649 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8650 Fix up comment formatting.
8652 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8654 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8655 (typed_splay_tree::closure,
8656 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8657 (typed_splay_tree::typed_splay_tree,
8658 typed_splay_tree::operator =): Declared private.
8659 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8660 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8661 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8662 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8663 typed_splay_tree::splay_tree_splay,
8664 typed_splay_tree::splay_tree_foreach_helper,
8665 typed_splay_tree::splay_tree_insert,
8666 typed_splay_tree::splay_tree_remove,
8667 typed_splay_tree::splay_tree_lookup,
8668 typed_splay_tree::splay_tree_predecessor,
8669 typed_splay_tree::splay_tree_successor,
8670 typed_splay_tree::splay_tree_min,
8671 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8672 (typed_splay_tree::root, typed_splay_tree::comp,
8673 typed_splay_tree::delete_key,
8674 typed_splay_tree::delete_value): New data members.
8675 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8676 typed_splay_tree::remove.
8678 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8680 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8681 -mginv and -mno-ginv to the assembler.
8682 * config/mips/mips.opt (-mcrc): New option.
8684 * doc/invoke.text (-mcrc): Document.
8687 2018-06-15 Nick Clifton <nickc@redhat.com>
8690 * tree.c (escaped_string): New class. Converts an unescaped
8691 string into its escaped equivalent.
8692 (warn_deprecated_use): Use the new class to convert the
8693 deprecation message, if present.
8694 (test_escaped_strings): New self test.
8695 (test_c_tests): Add test_escaped_strings.
8696 * doc/extend.texi (deprecated): Add a note that the
8697 deprecation message is affected by the -fmessage-length
8698 option, and that control characters will be escaped.
8699 (#pragma GCC error): Document this pragma.
8700 (#pragma GCC warning): Likewise.
8701 * doc/invoke.texi (-fmessage-length): Document this option's
8702 effect on the #warning and #error preprocessor directives and
8703 the deprecated attribute.
8705 2018-06-15 Richard Biener <rguenther@suse.de>
8707 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8708 here, also noting vector size used.
8709 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8710 size used in MSG_OPTIMIZED_LOCATIONS dump.
8711 (pass_slp_vectorize::execute): Adjust.
8713 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8716 * config/arc/arc.c (arc_return_address_register): Fix
8719 2018-06-15 Richard Biener <rguenther@suse.de>
8722 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8723 leave useless conversion stripping to force_gimple_operand_gsi.
8724 (gimplify_build2): Likewise.
8725 (gimplify_build1): Likewise.
8727 2018-06-15 Richard Biener <rguenther@suse.de>
8730 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8731 before adjusting their block.
8733 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8735 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8736 multilibs for *-*-rtems*.
8737 * config/riscv/t-rtems: New file.
8739 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8742 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8743 unsigned_type_for returns NULL.
8746 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8747 subregs of multi-word pseudos unless the float mode has word size.
8749 2018-06-14 Richard Biener <rguenther@suse.de>
8752 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8753 duplicate and harmful type_hash_canon.
8754 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8756 2018-06-14 Richard Biener <rguenther@suse.de>
8759 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8762 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8764 * config/rtems.h (STDINT_LONG32): Define.
8766 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8767 Prachi Godbole <prachi.godbole@imgtec.com>
8769 * config/mips/mips-cpus.def: Define P6600.
8770 * config/mips/mips-tables.opt: Regenerate.
8771 * config/mips/mips.c (mips_ucbranch_type): New enum.
8772 (mips_rtx_cost_data): Add support for P6600.
8773 (mips_issue_rate): Likewise.
8774 (mips_multipass_dfa_lookahead): Likewise.
8775 (mips_avoid_hazard): Likewise.
8776 (mips_reorg_process_insns): Likewise.
8777 (mips_classify_branch_p6600): New function.
8778 * config/mips/mips.h (TUNE_P6600): New define.
8779 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8780 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8781 * config/mips/mips.md: Include p6600.md.
8782 (processor): Add p6600.
8783 * config/mips/p6600.md: New file.
8784 * doc/invoke.texi: Add p6600 to supported architectures.
8786 2018-06-13 Martin Sebor <msebor@redhat.com>
8788 PR tree-optimization/86114
8789 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8791 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8793 2018-06-13 Richard Biener <rguenther@suse.de>
8795 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8796 Properly set vector type of the intermediate stmt.
8797 * tree-vect-stmts.c (vectorizable_operation): The destination
8798 var always has vectype_out type.
8800 2018-06-13 Jeff Law <law@redhat.com>
8802 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8803 integer 0 for argument to print_rtl_with_bb.
8804 (rl78_reorg): Likewise.
8806 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8808 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8809 from rtx to rtx_insn *.
8810 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8812 (add_sched_insns_for_speculation): Likewise for local "target",
8813 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8814 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8815 from rtx_insn ** to rtx_code_label **.
8816 (reorg_emit_nops): Likewise.
8817 (c6x_reorg): Likewise for local "call_labels".
8818 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8820 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8821 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8822 the loops over LABEL_REFS.
8823 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8825 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8826 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8827 (split_branches): Strengthen local "olabel" from rtx to
8828 rtx_insn *, adding a safe_as_a cast.
8829 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8831 (add_insn_after): Likewise for first two params.
8832 (add_insn_before): Likewise.
8833 (remove_insn): Likewise for param.
8834 (emit_pattern_before_noloc): Likewise for second and third params.
8835 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8836 (emit_call_insn_before_noloc): Likewise.
8837 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8839 (emit_barrier_before): Likewise.
8840 (emit_label_before): Strengthen "label" param from "rtx" to
8841 "rtx_code_label *". Strengthen "before" param from "rtx" to
8843 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8845 (emit_pattern_after_noloc): Likewise.
8846 (emit_insn_after_noloc): Likewise.
8847 (emit_jump_insn_after_noloc): Likewise.
8848 (emit_call_insn_after_noloc): Likewise.
8849 (emit_debug_insn_after_noloc): Likewise.
8850 (emit_barrier_after): Likewise.
8851 (emit_label_after): Likewise for both params.
8852 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8853 "loc" param from "int" to "location_t".
8854 (emit_insn_after_setloc): Likewise.
8855 (emit_jump_insn_after_setloc): Likewise.
8856 (emit_call_insn_after_setloc): Likewise.
8857 (emit_debug_insn_after_setloc): Likewise.
8858 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8859 "loc" param from "int" to "location_t".
8860 (emit_pattern_before): Convert NULL_RTX to NULL.
8861 (emit_insn_before_setloc): Convert "loc" param from "int" to
8863 (emit_jump_insn_before_setloc): Likewise.
8864 (emit_call_insn_before_setloc): Likewise.
8865 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8866 rtx_insn *. Convert "loc" param from "int" to "location_t".
8867 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8868 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8869 Convert 3rd param from "int" to "location_t".
8870 (emit_barrier_before, emit_barrier_after, next_real_insn):
8871 Strengthen param from rtx to rtx_insn *.
8872 (emit_label_before): Strengthen 1st param from "rtx" to
8873 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8875 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8876 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8877 Strengthen 2nd param from "rtx" to "rtx_insn *".
8878 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8879 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8880 Likewise. Convert 3rd param from "int" to "location_t".
8881 (emit_label_after): Strengthen 1st param from "rtx" to
8883 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8885 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8886 from "rtx" to "rtx_insn *".
8888 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8890 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8891 bodies streamed in with -Q.
8892 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8893 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8894 * gimple-streamer-out.c: Include gimple-pretty-print.h
8895 (output_bb): Dump stmts streamed.
8896 * lto-section-out.c: Include print-tree.h
8897 (lto_begin_section): Dump sections created.
8898 (lto_output_decl_index): Dump decl encoded.
8899 * lto-streamer-out.c: Include print-tree.h
8900 (create_output_block): Dump output block created.
8901 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8902 (output_function): Dump function output.
8903 (output_constructor): Dump constructor streamed.
8904 (write_global_stream): Output indexes encoded.
8905 (produce_asm_for_decls): Dump streams encoded.
8906 * lto-streamer.c (streamer_dump_file): New global var.
8907 * lto-streamer.h (streamer_dump_file): Declare.
8908 * passes.c (ipa_write_summaries): Initialize streamer dump.
8909 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8912 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8915 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8916 offsets for register save directives. Emit a second batch of save
8917 directives, if need be, when the function accesses prior frames.
8919 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8921 * config/arc/fpu.md (fmasf4): Force operand to register.
8922 (fnmasf4): Likewise.
8924 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8926 * config/arc/arc-protos.h (arc_pad_return): Remove.
8927 * config/arc/arc.c (machine_function): Remove force_short_suffix
8929 (arc_print_operand): Adjust printing of '&'.
8930 (arc_verify_short): Remove conditional printing of short suffix.
8931 (arc_final_prescan_insn): Remove reference to size_reason.
8932 (pad_return): New function.
8933 (arc_reorg): Call pad_return.
8934 (arc_pad_return): Remove.
8935 (arc_init_machine_status): Remove reference to force_short_suffix.
8936 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8937 (attr length): When attribute iscompact is true force to 2
8938 regardless; in the case of maybe check if we want to force the
8939 instruction to have 4 bytes length.
8940 (nopv): Change it to generate 4 byte long nop as well.
8941 (blockage): New pattern.
8942 (simple_return): Remove call to arc_pad_return.
8943 (p_return_i): Likewise.
8945 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8947 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8949 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8951 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8954 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8956 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8957 for ARC700 and ARCv2.
8959 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8962 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8963 operands[2] instead of operands[1].
8966 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8968 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8969 case, check whether the outer register overlaps an unallocatable
8970 register, not just whether it fits the required class.
8972 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8974 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8976 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8977 (memrefs_conflict_p): Likewise.
8978 (init_alias_analysis): Likewise.
8979 * cfgexpand.c (expand_debug_expr): Likewise.
8980 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8981 * cse.c (fold_rtx): Likewise.
8982 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8983 * expr.c (emit_block_move_hints): Likewise.
8984 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8985 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8986 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8987 (emit_group_store): Likewise.
8988 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8989 to read the PRE/POST_MODIFY increment.
8990 * calls.c (store_one_arg): Use strip_offset.
8991 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8993 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8995 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8996 (simplify_binary_operation_1): Extend CONST_INT handling to
8998 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8999 than a HOST_WIDE_INT.
9000 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9002 (adjust_mems, add_stores): Update accodingly.
9003 (vt_canonicalize_addr): Track polynomial offsets.
9004 (emit_note_insn_var_location): Likewise.
9005 (vt_add_function_parameter): Likewise.
9006 (vt_initialize): Likewise.
9008 2018-06-12 Jeff Law <law@redhat.com>
9010 * config.gcc (alpha*-*-freebsd*): Remove.
9011 * config/alpha/freebsd.h: Remove.
9013 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9016 * spellcheck-tree.c (levenshtein_distance): Rename to...
9017 (get_edit_distance): ...this, and update for underlying renaming.
9018 * spellcheck-tree.h (levenshtein_distance): Rename to...
9019 (get_edit_distance): ...this.
9020 * spellcheck.c (levenshtein_distance): Rename to...
9021 (get_edit_distance): ...this. Convert from Levenshtein distance
9022 to Damerau-Levenshtein distance by supporting transpositions of
9023 adjacent characters. Rename "v1" to "v_next" and "v0" to
9025 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9026 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9027 update for underlying renaming.
9028 (selftest::levenshtein_distance_unit_test): Rename to...
9029 (selftest::test_get_edit_distance_unit): ...this, and update for
9030 underlying renaming.
9031 (selftest::test_find_closest_string): Add example from PR 69968
9032 where transposition helps
9033 (selftest::test_metric_conditions): Update for renaming.
9034 (selftest::test_metric_conditions): Likewise.
9035 (selftest::spellcheck_c_tests): Likewise.
9036 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9037 (get_edit_distance): ...this.
9038 (best_match::consider): Update for renaming.
9040 2018-06-12 Martin Sebor <msebor@redhat.com>
9042 PR tree-optimization/85259
9043 * builtins.c (compute_objsize): Handle constant offsets.
9044 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9045 true iff a warning has been issued.
9046 * gimple.h (gimple_nonartificial_location): New function.
9047 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9048 gimple_nonartificial_location and handle -Wno-system-headers.
9049 (handle_builtin_stxncpy): Same.
9051 2018-06-12 Martin Sebor <msebor@redhat.com>
9054 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9056 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9058 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9059 BUILTIN_VEC_XST entries for pointer to double and long long.
9061 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9064 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9066 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9069 2018-06-12 Martin Liska <mliska@suse.cz>
9071 * doc/options.texi: Document IntegerRange.
9073 2018-06-12 Martin Liska <mliska@suse.cz>
9075 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9076 * opt-functions.awk: Handle Deprecated flag.
9077 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9079 (read_cmdline_option): Report warning for a deprecated option.
9080 * opts.h (struct cl_option): Add new field cl_deprecated.
9081 (CL_ERR_DEPRECATED): New.
9083 2018-06-12 Martin Liska <mliska@suse.cz>
9085 * doc/options.texi: Document Deprecated option flag.
9087 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9089 * config/arc/arc-arch.h (arc_extras): New enum.
9090 (arc_cpu_t):Add field extra.
9091 (arc_cpu_types): Consider the extras.
9092 * config/arc/arc-cpus.def: Add extras info.
9093 * config/arc/arc-opts.h (processor_type): Consider extra field.
9094 * config/arc/arc.c (arc_override_options): Handle extra field.
9096 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9098 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9099 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9101 * config/arc/arc.c (arc_init): Update pic warning.
9102 (irq_range): Update irq range parsing warnings.
9103 (arc_override_options): Update various warning messages.
9104 (arc_handle_aux_attribute): Likewise.
9106 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9108 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9110 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9112 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9113 compiler messages directives.
9115 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9117 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9118 * config/mips/mips-tables.opt: Regenerate.
9119 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9121 * doc/invoke.texi: Document -march=i6500.
9123 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9125 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9126 (i6400_gpmul): Add cpu_unit.
9127 (i6400_gpdiv): Likewise.
9128 (i6400_msa_add_d): Update reservations.
9129 (i6400_msa_int_add) Likewise.
9130 (i6400_msa_short_logic3) Likewise.
9131 (i6400_msa_short_logic2) Likewise.
9132 (i6400_msa_short_logic) Likewise.
9133 (i6400_msa_move) Likewise.
9134 (i6400_msa_cmp) Likewise.
9135 (i6400_msa_short_float2) Likewise.
9136 (i6400_msa_div_d) Likewise.
9137 (i6400_msa_long_logic1) Likewise.
9138 (i6400_msa_long_logic2) Likewise.
9139 (i6400_msa_mult) Likewise.
9140 (i6400_msa_long_float2) Likewise.
9141 (i6400_msa_long_float4) Likewise.
9142 (i6400_msa_long_float5) Likewise.
9143 (i6400_msa_long_float8) Likewise.
9144 (i6400_fpu_fadd): Include frint type.
9145 (i6400_fpu_store): New define_insn_reservation.
9146 (i6400_fpu_load): Likewise.
9147 (i6400_fpu_move): Likewise.
9148 (i6400_fpu_fcmp): Likewise.
9149 (i6400_fpu_fmadd): Likewise.
9150 (i6400_int_mult): Include imul3nc type and update reservation.
9151 (i6400_int_div): Include idiv3 type and update reservation.
9152 (i6400_int_load): Update to check type not move_type.
9153 (i6400_int_store): Likewise.
9154 (i6400_int_prefetch): Set zero latency.
9156 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9158 * gcc.c: Document new %@{...} sequence.
9159 (LINK_COMMAND_SPEC): Use it for the -L switches.
9160 (cpp_unique_options): Use it for the -I switches.
9161 (at_file_argbuf): New global variable.
9162 (in_at_file): Likewise.
9163 (alloc_args): Create at_file_argbuf.
9164 (clear_args): Truncate at_file_argbuf.
9165 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9166 (open_at_file): New function.
9167 (close_at_file): Likewise.
9168 (create_at_file): Delete.
9169 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9172 (validate_switches_from_spec): Deal with %@{...} sequence.
9173 (validate_switches): Likewise.
9174 (driver::finalize): Call clear_args.
9176 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9178 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9180 2018-06-11 Martin Sebor <msebor@redhat.com>
9182 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9183 (Wno-class-memaccess): Add @opindex.
9184 (Wno-templates, Wno-multiple-inheritance): Same.
9185 (Wno-virtual-inheritance, Wno-namespaces): Same.
9186 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9187 (Wno-format-overflow, Wno-format-truncation): Same.
9188 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9189 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9190 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9191 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9192 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9193 (Wno-misspelled-isr): Same.
9195 2018-06-11 Martin Sebor <msebor@redhat.com>
9197 * PR tree-optimization/86083
9198 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9200 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9202 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9204 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9207 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9208 on the correct operand.
9209 (*movdi_internal64): Ditto.
9211 2018-06-11 Martin Liska <mliska@suse.cz>
9213 PR tree-optimization/86089
9214 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9216 2018-06-11 Julia Koval <julia.koval@intel.com>
9218 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9219 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9220 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9222 2018-06-11 Olivier Hainque <hainque@adacore.com>
9224 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9225 for Ada with strict dwarf2.
9227 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9230 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9233 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9235 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9237 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9239 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9242 2018-06-08 Martin Liska <mliska@suse.cz>
9244 * tree-cfg.h (debug_function): Fix argument type to match
9247 2018-06-08 Martin Liska <mliska@suse.cz>
9249 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9250 Remove usage of MPX-related (and removed) fields.
9251 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9253 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9255 * cfg.c (debug): Use TDF_NONE rather than 0.
9256 * cfghooks.c (debug): Likewise.
9257 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9258 (struct dump_option_value_info): Convert to...
9259 (struct kv_pair): ...this template type.
9260 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9262 (optinfo_verbosity_options): Likewise.
9263 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9265 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9266 than int for "optgroup_flags" param.
9267 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9269 (dump_dec): Likewise.
9270 (dump_finish): Use TDF_NONE rather than 0.
9271 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9272 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9273 than 0. Update for change to option_ptr.
9274 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9275 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9276 0. Update for changes to optinfo_verbosity_options and
9278 (opt_info_switch_p): Convert optgroup_flags from int to
9280 (dump_basic_block): Use dump_flags_t rather than int
9281 for "dump_kind" param.
9282 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9283 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9284 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9285 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9286 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9287 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9288 TDF_NONE): Convert from macros to...
9289 (enum dump_flag): ...this new enum.
9290 (dump_flags_t): Update to use enum.
9291 (operator|, operator&, operator~, operator|=, operator&=):
9292 Implement for dump_flags_t.
9293 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9294 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9295 Convert from macros to...
9296 (enum optgroup_flag): ...this new enum.
9297 (optgroup_flags_t): New typedef.
9298 (operator|, operator|=): Implement for optgroup_flags_t.
9299 (struct dump_file_info): Convert field "alt_flags" to
9300 dump_flags_t. Convert field "optgroup_flags" to
9302 (dump_basic_block): Use dump_flags_t rather than int for param.
9303 (dump_generic_expr_loc): Likewise.
9304 (dump_dec): Likewise.
9305 (dump_register): Convert param "optgroup_flags" to
9307 (opt_info_enable_passes): Likewise.
9308 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9310 * gimple-pretty-print.c (debug): Likewise.
9311 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9312 (merged_store_group::apply_stores): Likewise.
9313 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9314 * gimple.c (verify_gimple_pp): Likewise.
9315 * graphite-poly.c (print_pbb_body): Likewise.
9316 * passes.c (pass_manager::register_one_dump_file): Convert
9317 local "optgroup_flags" to optgroup_flags_t.
9318 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9320 (debug_body): Likewise.
9321 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9322 to optgroup_flags_t.
9323 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9325 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9326 (convert_mult_to_fma): Likewise.
9327 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9328 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9329 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9330 "dump_kind" to dump_flags_t.
9332 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9334 * config/rs6000/rs6000.c (min, max): Delete.
9336 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9338 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9339 -mabi=spe and -mabi=no-spe.
9341 2018-06-08 Martin Liska <mliska@suse.cz>
9343 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9344 where we expect an existing summary.
9346 2018-06-08 Martin Liska <mliska@suse.cz>
9348 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9349 * ipa-inline.h (estimate_edge_growth): Likewise.
9351 2018-06-08 Martin Liska <mliska@suse.cz>
9353 * cgraph.c (function_version_hasher::hash): Use
9354 cgraph_node::get_uid ().
9355 (function_version_hasher::equal):
9356 * cgraph.h (cgraph_node::get_uid): New method.
9357 * ipa-inline.c (update_caller_keys): Use
9358 cgraph_node::get_uid ().
9359 (update_callee_keys): Likewise.
9360 * ipa-utils.c (searchc): Likewise.
9361 (ipa_reduced_postorder): Likewise.
9362 * lto-cgraph.c (input_node): Likewise.
9363 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9364 * symbol-summary.h (symtab_insertion): Likewise.
9365 (symtab_removal): Likewise.
9366 (symtab_duplication): Likewise.
9367 * tree-pretty-print.c (dump_function_header): Likewise.
9368 * tree-sra.c (convert_callers_for_node): Likewise.
9370 2018-06-08 Martin Liska <mliska@suse.cz>
9372 * cgraph.c (symbol_table::create_edge): Always assign a new
9374 (symbol_table::free_edge): Do not recycle numbers.
9375 * cgraph.h (cgraph_edge::get): New method.
9376 * symbol-summary.h (symtab_removal): Use it.
9377 (symtab_duplication): Likewise.
9378 (call_summary::hashable_uid): Remove.
9380 2018-06-08 Martin Liska <mliska@suse.cz>
9382 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9383 (initialize_growth_caches): Remove.
9384 (free_growth_caches): Likewise.
9385 (do_estimate_edge_time): Use edge_growth_cache.
9386 (do_estimate_edge_size): Likewise.
9387 (do_estimate_edge_hints): Likewise.
9388 * ipa-inline.c (reset_edge_caches): Likewise.
9389 (recursive_inlining): Likewise.
9390 (inline_small_functions): Likewise.
9391 * ipa-inline.h (initialize_growth_caches): Remove.
9392 (estimate_edge_size): Likewise.
9393 (estimate_edge_time): Likewise.
9394 (estimate_edge_hints): Likewise.
9395 (reset_edge_growth_cache): Likewise.
9396 * symbol-summary.h (call_summary::remove): New method.
9398 2018-06-08 Martin Liska <mliska@suse.cz>
9400 * ipa-cp.c (class edge_clone_summary): New summary.
9401 (grow_edge_clone_vectors): Remove.
9402 (ipcp_edge_duplication_hook): Remove.
9403 (class edge_clone_summary_t): New call_summary class.
9404 (ipcp_edge_removal_hook): Remove.
9405 (edge_clone_summary_t::duplicate): New function.
9406 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9407 (create_specialized_node): Likewise.
9408 (ipcp_driver): Initialize edge_clone_summaries and do not
9411 2018-06-08 Martin Liska <mliska@suse.cz>
9413 * symbol-summary.h (get): New function.
9414 (call_summary::m_initialize_when_cloning): New class member.
9416 2018-06-08 Martin Liska <mliska@suse.cz>
9418 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9419 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9420 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9421 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9422 (remove_cgraph_node_from_order): Use the removed_nodes set.
9423 (do_per_function_toporder): Likwise.
9424 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9425 instead of summary_uid.
9426 (symtab_removal): Likewise.
9427 (symtab_duplication): Likewise.
9429 2018-06-08 Martin Liska <mliska@suse.cz>
9431 * ipa-cp.c (ipcp_store_bits_results): Use
9432 ipcp_transformation_sum.
9433 (ipcp_store_vr_results): Likewise.
9434 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9436 (ipcp_transformation_initialize): ... this.
9437 (ipa_set_node_agg_value_chain):
9438 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9439 (write_ipcp_transformation_info): Likewise.
9440 (read_ipcp_transformation_info): Likewise.
9441 (ipcp_update_bits): Likewise.
9442 (ipcp_update_vr): Likewise.
9443 (ipcp_transform_function): Likewise.
9444 * ipa-prop.h: Rename ipcp_transformation_summary to
9445 ipcp_transformation.
9446 (class ipcp_transformation_t): New function summary.
9447 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9448 (ipa_get_agg_replacements_for_node): Likewise.
9450 2018-06-08 Martin Liska <mliska@suse.cz>
9452 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9454 (class funct_state_summary_t): New function_summary class.
9455 (has_function_state): Remove.
9456 (get_function_state): Likewise.
9457 (set_function_state): Likewise.
9458 (add_new_function): Likewise.
9459 (funct_state_summary_t::insert): New function.
9460 (duplicate_node_data): Remove.
9461 (remove_node_data): Remove.
9462 (funct_state_summary_t::duplicate): New function.
9463 (register_hooks): Create new funct_state_summaries.
9464 (pure_const_generate_summary): Use it.
9465 (pure_const_write_summary): Likewise.
9466 (pure_const_read_summary): Likewise.
9467 (propagate_pure_const): Likewise.
9468 (propagate_nothrow): Likewise.
9469 (dump_malloc_lattice): Likewise.
9470 (propagate_malloc): Likewise.
9471 (execute): Do not register hooks, just remove summary
9473 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9476 2018-06-08 Martin Liska <mliska@suse.cz>
9478 * ipa-reference.c (remove_node_data): Remove.
9479 (duplicate_node_data): Likewise.
9480 (class ipa_ref_var_info_summary_t): New class.
9481 (class ipa_ref_opt_summary_t): Likewise.
9482 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9483 (get_reference_optimization_summary): Use
9484 ipa_ref_opt_sum_summaries.
9485 (set_reference_vars_info): Remove.
9486 (set_reference_optimization_summary): Likewise.
9487 (ipa_init): Create summaries.
9488 (init_function_info): Use function summary.
9489 (ipa_ref_opt_summary_t::duplicate): New function.
9490 (ipa_ref_opt_summary_t::remove): New function.
9491 (get_read_write_all_from_node): Fix GNU coding style.
9492 (propagate): Use function summary.
9493 (write_node_summary_p): Fix GNU coding style.
9494 (stream_out_bitmap): Likewise.
9495 (ipa_reference_read_optimization_summary): Use function summary.
9496 (ipa_reference_c_finalize): Do not release hooks.
9498 2018-06-08 Martin Liska <mliska@suse.cz>
9500 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9501 (analyze_function_body): Extract multiple calls of get_create.
9502 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9503 * ipa-inline.c (recursive_inlining): Use ::get method.
9504 * ipa-inline.h (estimate_edge_growth): Likewise.
9506 2018-06-08 Martin Liska <mliska@suse.cz>
9508 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9510 (hsa_function_summary::hsa_function_summary): Use the new enum
9512 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9513 * hsa-gen.c (hsa_get_host_function): Likewise.
9514 (get_brig_function_name): Likewise.
9515 * ipa-hsa.c (process_hsa_functions): Likewise.
9516 (ipa_hsa_write_summary): Likewise.
9517 * symbol-summary.h (symtab_duplication): Use ::get function/
9518 (get): New function.
9520 2018-06-08 Martin Liska <mliska@suse.cz>
9522 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9524 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9525 (hsa_register_kernel): Likewise.
9526 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9527 * hsa-gen.c (hsa_get_host_function): Likewise.
9528 (get_brig_function_name): Likewise.
9529 (generate_hsa): Likewise.
9530 (pass_gen_hsail::execute): Likewise.
9531 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9532 (devirtualization_time_bonus): Likewise.
9533 (ipcp_propagate_stage): Likewise.
9534 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9535 (edge_set_predicate): Likewise.
9536 (evaluate_conditions_for_known_args): Likewise.
9537 (evaluate_properties_for_edge): Likewise.
9538 (ipa_fn_summary::reset): Likewise.
9539 (ipa_fn_summary_t::duplicate): Likewise.
9540 (dump_ipa_call_summary): Likewise.
9541 (ipa_dump_fn_summary): Likewise.
9542 (analyze_function_body): Likewise.
9543 (compute_fn_summary): Likewise.
9544 (estimate_edge_devirt_benefit): Likewise.
9545 (estimate_edge_size_and_time): Likewise.
9546 (estimate_calls_size_and_time): Likewise.
9547 (estimate_node_size_and_time): Likewise.
9548 (inline_update_callee_summaries): Likewise.
9549 (remap_edge_change_prob): Likewise.
9550 (remap_edge_summaries): Likewise.
9551 (ipa_merge_fn_summary_after_inlining): Likewise.
9552 (ipa_update_overall_fn_summary): Likewise.
9553 (read_ipa_call_summary): Likewise.
9554 (inline_read_section): Likewise.
9555 (write_ipa_call_summary): Likewise.
9556 (ipa_fn_summary_write): Likewise.
9557 (ipa_free_fn_summary): Likewise.
9558 * ipa-hsa.c (process_hsa_functions): Likewise.
9559 (ipa_hsa_write_summary): Likewise.
9560 (ipa_hsa_read_section): Likewise.
9561 * ipa-icf.c (sem_function::merge): Likewise.
9562 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9563 (do_estimate_edge_time): Likewise.
9564 (estimate_size_after_inlining): Likewise.
9565 (estimate_growth): Likewise.
9566 (growth_likely_positive): Likewise.
9567 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9568 (inline_call): Likewise.
9569 * ipa-inline.c (caller_growth_limits): Likewise.
9570 (can_inline_edge_p): Likewise.
9571 (can_inline_edge_by_limits_p): Likewise.
9572 (compute_uninlined_call_time): Likewise.
9573 (compute_inlined_call_time): Likewise.
9574 (want_inline_small_function_p): Likewise.
9575 (edge_badness): Likewise.
9576 (update_caller_keys): Likewise.
9577 (update_callee_keys): Likewise.
9578 (recursive_inlining): Likewise.
9579 (inline_small_functions): Likewise.
9580 (inline_to_all_callers_1): Likewise.
9581 (dump_overall_stats): Likewise.
9582 (early_inline_small_functions): Likewise.
9583 (early_inliner): Likewise.
9584 * ipa-inline.h (estimate_edge_growth): Likewise.
9585 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9586 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9587 * ipa-prop.h (IPA_NODE_REF): Likewise.
9588 (IPA_EDGE_REF): Likewise.
9589 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9590 (propagate_malloc): Likewise.
9591 * ipa-split.c (execute_split_functions): Likewise.
9592 * symbol-summary.h: Rename get to get_create.
9594 (get_create): Likewise.
9595 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9597 2018-06-08 Martin Liska <mliska@suse.cz>
9599 * symbol-summary.h (release): Move definition out of class
9601 (symtab_removal): Likewise.
9602 (symtab_duplication): Likewise.
9604 2018-06-08 Martin Liska <mliska@suse.cz>
9606 * symbol-summary.h (function_summary): Move constructor
9607 implementation out of class declaration.
9608 (release): Likewise.
9609 (symtab_insertion): Likewise.
9610 (symtab_removal): Likewise.
9611 (symtab_duplication): Likewise.
9614 2018-06-08 Martin Liska <mliska@suse.cz>
9616 * Makefile.in: Remove support for MPX (macros, related functions,
9617 fields in cgraph_node, ...).
9618 * builtin-types.def (BT_BND): Likewise.
9619 (BT_FN_BND_CONST_PTR): Likewise.
9620 (BT_FN_CONST_PTR_BND): Likewise.
9621 (BT_FN_VOID_PTR_BND): Likewise.
9622 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9623 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9624 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9625 (expand_builtin_mempcpy_with_bounds): Likewise.
9626 (expand_builtin_memset_with_bounds): Likewise.
9627 (expand_builtin_memset_args): Likewise.
9628 (std_expand_builtin_va_start): Likewise.
9629 (expand_builtin): Likewise.
9630 (expand_builtin_with_bounds): Likewise.
9631 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9632 (DEF_LIB_BUILTIN_CHKP): Likewise.
9633 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9634 (DEF_CHKP_BUILTIN): Likewise.
9635 (BUILT_IN_MEMCPY): Likewise.
9636 (BUILT_IN_MEMMOVE): Likewise.
9637 (BUILT_IN_MEMPCPY): Likewise.
9638 (BUILT_IN_MEMSET): Likewise.
9639 (BUILT_IN_STPCPY): Likewise.
9640 (BUILT_IN_STRCAT): Likewise.
9641 (BUILT_IN_STRCHR): Likewise.
9642 (BUILT_IN_STRCPY): Likewise.
9643 (BUILT_IN_STRLEN): Likewise.
9644 (BUILT_IN_MEMCPY_CHK): Likewise.
9645 (BUILT_IN_MEMMOVE_CHK): Likewise.
9646 (BUILT_IN_MEMPCPY_CHK): Likewise.
9647 (BUILT_IN_MEMSET_CHK): Likewise.
9648 (BUILT_IN_STPCPY_CHK): Likewise.
9649 (BUILT_IN_STRCAT_CHK): Likewise.
9650 (BUILT_IN_STRCPY_CHK): Likewise.
9651 * calls.c (store_bounds): Likewise.
9652 (emit_call_1): Likewise.
9653 (special_function_p): Likewise.
9654 (maybe_warn_nonstring_arg): Likewise.
9655 (initialize_argument_information): Likewise.
9656 (finalize_must_preallocate): Likewise.
9657 (compute_argument_addresses): Likewise.
9658 (expand_call): Likewise.
9659 * cfgexpand.c (expand_call_stmt): Likewise.
9660 (expand_return): Likewise.
9661 (expand_gimple_stmt_1): Likewise.
9662 (pass_expand::execute): Likewise.
9663 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9664 (cgraph_node::remove): Likewise.
9665 (cgraph_node::dump): Likewise.
9666 (cgraph_node::verify_node): Likewise.
9667 * cgraph.h (chkp_function_instrumented_p): Likewise.
9668 (symtab_node::get_alias_target): Likewise.
9669 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9670 (cgraph_local_p): Likewise.
9671 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9672 (cgraph_edge::rebuild_references): Likewise.
9673 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9674 (walk_polymorphic_call_targets): Likewise.
9675 (cgraph_node::expand_thunk): Likewise.
9676 (symbol_table::output_weakrefs): Likewise.
9677 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9678 (ix86_handle_option): Likewise.
9679 * config/i386/constraints.md: Likewise.
9680 * config/i386/i386-builtin-types.def (BND): Likewise.
9684 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9685 (BDESC_FIRST): Likewise.
9687 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9688 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9689 * config/i386/i386.c (enum reg_class): Likewise.
9690 (ix86_target_string): Likewise.
9691 (ix86_option_override_internal): Likewise.
9692 (ix86_conditional_register_usage): Likewise.
9693 (ix86_valid_target_attribute_inner_p): Likewise.
9694 (ix86_set_indirect_branch_type): Likewise.
9695 (ix86_set_current_function): Likewise.
9696 (ix86_function_arg_regno_p): Likewise.
9697 (init_cumulative_args): Likewise.
9698 (ix86_function_arg_advance): Likewise.
9699 (ix86_function_arg): Likewise.
9700 (ix86_pass_by_reference): Likewise.
9701 (ix86_function_value_regno_p): Likewise.
9702 (ix86_function_value_1): Likewise.
9703 (ix86_function_value_bounds): Likewise.
9704 (ix86_return_in_memory): Likewise.
9705 (ix86_setup_incoming_vararg_bounds): Likewise.
9706 (ix86_va_start): Likewise.
9707 (indirect_thunk_need_prefix): Likewise.
9708 (print_reg): Likewise.
9709 (ix86_print_operand): Likewise.
9710 (ix86_expand_call): Likewise.
9711 (ix86_output_function_return): Likewise.
9712 (reg_encoded_number): Likewise.
9713 (BDESC_VERIFYS): Likewise.
9714 (ix86_init_mpx_builtins): Likewise.
9715 (ix86_init_builtins): Likewise.
9716 (ix86_emit_cmove): Likewise.
9717 (ix86_emit_move_max): Likewise.
9718 (ix86_expand_builtin): Likewise.
9719 (ix86_builtin_mpx_function): Likewise.
9720 (ix86_get_arg_address_for_bt): Likewise.
9721 (ix86_load_bounds): Likewise.
9722 (ix86_store_bounds): Likewise.
9723 (ix86_load_returned_bounds): Likewise.
9724 (ix86_store_returned_bounds): Likewise.
9725 (ix86_class_likely_spilled_p): Likewise.
9726 (ix86_hard_regno_mode_ok): Likewise.
9727 (x86_order_regs_for_local_alloc): Likewise.
9728 (ix86_mitigate_rop): Likewise.
9729 (ix86_bnd_prefixed_insn_p): Likewise.
9730 (ix86_mpx_bound_mode): Likewise.
9731 (ix86_make_bounds_constant): Likewise.
9732 (ix86_initialize_bounds): Likewise.
9733 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9734 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9735 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9736 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9737 (TARGET_CHKP_BOUND_MODE): Likewise.
9738 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9739 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9740 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9741 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9742 * config/i386/i386.h (TARGET_MPX): Likewise.
9743 (TARGET_MPX_P): Likewise.
9744 (VALID_BND_REG_MODE): Likewise.
9745 (FIRST_BND_REG): Likewise.
9746 (LAST_BND_REG): Likewise.
9747 (enum reg_class): Likewise.
9748 (BND_REG_P): Likewise.
9749 (BND_REGNO_P): Likewise.
9750 (BNDmode): Likewise.
9751 (ADJUST_INSN_LENGTH): Likewise.
9752 * config/i386/i386.md: Likewise.
9753 * config/i386/i386.opt: Likewise.
9754 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9755 (defined): Likewise.
9756 (LINK_MPX): Likewise.
9757 (MPX_SPEC): Likewise.
9758 (LIBMPX_SPEC): Likewise.
9759 (LIBMPXWRAPPERS_SPEC): Likewise.
9760 (CHKP_SPEC): Likewise.
9761 * config/i386/predicates.md: Likewise.
9762 * dbxout.c (dbxout_type): Likewise.
9763 * doc/extend.texi: Likewise.
9764 * doc/invoke.texi: Likewise.
9765 * doc/md.texi: Likewise.
9766 * doc/tm.texi: Likewise.
9767 * doc/tm.texi.in: Likewise.
9768 * dwarf2out.c (is_base_type): Likewise.
9769 (gen_formal_types_die): Likewise.
9770 (gen_subprogram_die): Likewise.
9771 (gen_type_die_with_usage): Likewise.
9772 (gen_decl_die): Likewise.
9773 (dwarf2out_late_global_decl): Likewise.
9774 * expr.c (expand_assignment): Likewise.
9775 (emit_storent_insn): Likewise.
9776 (store_expr_with_bounds): Likewise.
9777 (store_expr): Likewise.
9778 (expand_expr_real_1): Likewise.
9779 * expr.h (store_expr_with_bounds): Likewise.
9780 * function.c (use_register_for_decl): Likewise.
9781 (struct bounds_parm_data): Likewise.
9782 (assign_parms_augmented_arg_list): Likewise.
9783 (assign_parm_find_entry_rtl): Likewise.
9784 (assign_parm_is_stack_parm): Likewise.
9785 (assign_parm_load_bounds): Likewise.
9786 (assign_bounds): Likewise.
9787 (assign_parms): Likewise.
9788 (expand_function_start): Likewise.
9789 * gcc.c (CHKP_SPEC): Likewise.
9790 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9791 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9792 (wrestrict_dom_walker::check_call): Likewise.
9793 * gimple.c (gimple_build_call_from_tree): Likewise.
9794 * gimple.h (enum gf_mask): Likewise.
9795 (gimple_call_with_bounds_p): Likewise.
9796 (gimple_call_set_with_bounds): Likewise.
9797 * gimplify.c (gimplify_init_constructor): Likewise.
9798 * ipa-cp.c (initialize_node_lattices): Likewise.
9799 (propagate_constants_across_call): Likewise.
9800 (find_more_scalar_values_for_callers_subset): Likewise.
9801 * ipa-hsa.c (process_hsa_functions): Likewise.
9802 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9803 * ipa-icf.c (sem_function::merge): Likewise.
9804 * ipa-inline.c (early_inliner): Likewise.
9805 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9806 (warn_function_cold): Likewise.
9807 (propagate_pure_const): Likewise.
9808 * ipa-ref.h (enum GTY): Likewise.
9809 * ipa-split.c (find_retbnd): Likewise.
9810 (consider_split): Likewise.
9811 (split_function): Likewise.
9812 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9813 * ipa.c (walk_polymorphic_call_targets): Likewise.
9814 (symbol_table::remove_unreachable_nodes): Likewise.
9815 (process_references): Likewise.
9816 (cgraph_build_static_cdtor_1): Likewise.
9817 * lto-cgraph.c (lto_output_node): Likewise.
9818 (output_refs): Likewise.
9819 (compute_ltrans_boundary): Likewise.
9820 (input_overwrite_node): Likewise.
9821 (input_node): Likewise.
9822 (input_cgraph_1): Likewise.
9823 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9824 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9825 (class pass_chkp_instrumentation_passes): Likewise.
9826 (make_pass_chkp_instrumentation_passes): Likewise.
9827 * passes.def: Likewise.
9828 * rtl.h (struct GTY): Likewise.
9829 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9830 * stor-layout.c (layout_type): Likewise.
9831 * symtab.c: Likewise.
9832 * target.def: Likewise.
9833 * targhooks.c (default_chkp_bound_type): Likewise.
9834 (default_chkp_bound_mode): Likewise.
9835 (default_builtin_chkp_function): Likewise.
9836 (default_chkp_function_value_bounds): Likewise.
9837 (default_chkp_make_bounds_constant): Likewise.
9838 (default_chkp_initialize_bounds): Likewise.
9839 * targhooks.h (default_chkp_bound_type): Likewise.
9840 (default_chkp_bound_mode): Likewise.
9841 (default_builtin_chkp_function): Likewise.
9842 (default_chkp_function_value_bounds): Likewise.
9843 (default_chkp_make_bounds_constant): Likewise.
9844 (default_chkp_initialize_bounds): Likewise.
9845 * toplev.c (compile_file): Likewise.
9846 (process_options): Likewise.
9847 * tree-core.h (DEF_BUILTIN): Likewise.
9848 (DEF_BUILTIN_CHKP): Likewise.
9849 * tree-inline.c (declare_return_variable): Likewise.
9850 (remap_gimple_stmt): Likewise.
9851 (copy_bb): Likewise.
9852 (initialize_inlined_parameters): Likewise.
9853 (expand_call_inline): Likewise.
9854 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9855 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9856 (make_pass_ipa_chkp_produce_thunks): Likewise.
9857 (make_pass_chkp): Likewise.
9858 (make_pass_chkp_opt): Likewise.
9859 (make_pass_chkp_instrumentation_passes): Likewise.
9860 * tree-pretty-print.c (dump_generic_node): Likewise.
9861 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9862 * tree-ssa-dce.c (propagate_necessity): Likewise.
9863 (eliminate_unnecessary_stmts): Likewise.
9864 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9865 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9866 * tree-ssa-sccvn.h: Likewise.
9867 * tree-ssa-strlen.c (get_string_length): Likewise.
9868 (valid_builtin_call): Likewise.
9869 (adjust_last_stmt): Likewise.
9870 (handle_builtin_strchr): Likewise.
9871 (handle_builtin_strcpy): Likewise.
9872 (handle_builtin_stxncpy): Likewise.
9873 (handle_builtin_memcpy): Likewise.
9874 (handle_builtin_strcat): Likewise.
9875 (strlen_check_and_optimize_stmt): Likewise.
9876 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9877 * tree-streamer-in.c: Likewise.
9878 * tree-streamer.c (record_common_node): Likewise.
9879 * tree.c (tree_code_size): Likewise.
9880 (wide_int_to_tree_1): Likewise.
9881 (type_contains_placeholder_1): Likewise.
9882 (build_common_tree_nodes): Likewise.
9883 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9884 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9885 (POINTER_BOUNDS_P): Likewise.
9886 (BOUNDED_TYPE_P): Likewise.
9887 (BOUNDED_P): Likewise.
9888 (CALL_WITH_BOUNDS_P): Likewise.
9889 (pointer_bounds_type_node): Likewise.
9890 * value-prof.c (gimple_ic): Likewise.
9891 * var-tracking.c (vt_add_function_parameters): Likewise.
9892 * varasm.c (make_decl_rtl): Likewise.
9893 (assemble_start_function): Likewise.
9894 (output_constant): Likewise.
9895 (maybe_assemble_visibility): Likewise.
9896 * varpool.c (ctor_for_folding): Likewise.
9897 * chkp-builtins.def: Remove.
9898 * ipa-chkp.c: Remove.
9899 * ipa-chkp.h: Remove.
9900 * rtl-chkp.c: Remove.
9901 * rtl-chkp.h: Remove.
9902 * tree-chkp-opt.c: Remove.
9903 * tree-chkp.c: Remove.
9904 * tree-chkp.h: Remove.
9906 2018-06-07 Carl Love <cel@us.ibm.com>
9908 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9909 vextract_fp_from_shortl): Add BE support.
9911 2018-06-07 Paul Koning <ni1d@arrl.net>
9913 * compare-elim.c (try_merge_compare): Don't merge compare if
9914 address contains a side effect.
9915 (try_eliminate_compare): Likewise.
9917 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9919 * config.gcc: Support "tremont".
9920 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9921 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9923 * config/i386/i386.c (m_TREMONT): Define.
9924 (processor_target_table): Add "tremont".
9925 (PTA_TREMONT): Define.
9926 (ix86_lea_outperforms): Add TARGET_TREMONT.
9927 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9928 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9929 and M_INTEL_GOLDMONT_PLUS.
9930 (fold_builtin_cpu): Add "tremont".
9931 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9932 (ix86_option_override_internal): Add "tremont".
9933 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9934 (processor_type): Add PROCESSOR_TREMONT.
9935 * config/i386/x86-tune.def: Add m_TREMONT.
9936 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9938 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9940 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9941 symbol defined for msp430i* devices to be lower case.
9943 2018-06-07 Richard Biener <rguenther@suse.de>
9945 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9946 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9947 Properly wrap signed arithmetic if overflow wraps.
9949 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9951 PR tree-optimization/69615
9952 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9953 of a cast from a same precision integral SSA_NAME in a bb dominated
9954 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9955 cast to utype if rhs2 has already a compatible type.
9957 2018-06-07 Richard Biener <rguenther@suse.de>
9959 PR tree-optimization/85935
9960 * graphite-scop-detection.c (find_params_in_bb): Analyze
9961 condition operands with respect to the correct loop. Assert
9962 the analysis doesn't fail.
9964 2018-06-04 Carl Love <cel@us.ibm.com>
9966 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9967 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9968 as it is slightly cheaper.
9969 (first_match_or_eos_index_<mode>):
9970 Calculate index using natural element order.
9971 (first_match_index_<mode>):
9972 Calculate index using natural element order.
9973 (first_match_or_eos_index_<mode>):
9974 Calculate index using natural order.
9975 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9976 for BE and LE modes.
9977 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9978 P9V_BUILTIN_VCLZLSBB_V16QI.
9979 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9982 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9984 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9985 indentation and line wrap for many prototypes. Add missing
9986 @smallexample directives around block of prototypes for vec_xl and
9989 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9991 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9992 track if we pass or return IEEE 128-bit floating point.
9993 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9994 C++ mangling that is compatible with GCC 8.1.
9995 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9996 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9997 floating point types.
9998 (rs6000_function_arg_advance_1): Likewise.
9999 (rs6000_mangle_type): Optionally generate mangled names that match
10000 what GCC 8.1 generated for IEEE 128-bit floating point types.
10001 (rs6000_globalize_decl_name): If we have an external function that
10002 passes or returns IEEE 128-bit types, generate a weak reference
10003 from the mangled name used in GCC 8.1 to the current mangled
10005 (rs6000_init_builtins): Make __ibm128 use the long double type if
10006 long double is IBM extended double. Make __float128 use the long
10007 double type if long double is IEEE 128-bit.
10010 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10011 macro for __ibm128 built-in functions.
10012 (PACK_IF): Add __ibm128 pack/unpack functions.
10013 (UNPACK_IF): Likewise.
10014 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10015 enable long double built-in functions if long double is IEEE
10016 128-bit floating point.
10017 (rs6000_invalid_builtin): Update long double built-in function
10019 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10020 functions, adjust the built-in function to use the long double
10021 built-in function if __ibm128 and long double are the same type.
10022 * doc/extend.texi (PowerPC builtins): Update documention for
10023 __builtin_{,un}pack_longdouble. Add documentation for
10024 __builtin_{,un}pack_ibm128.
10026 2018-06-06 Jim Wilson <jimw@sifive.com>
10028 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10029 (struct machine_function): New field interrupt_mode.
10030 (riscv_handle_type_attribute): New function. Add forward declaration.
10031 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10032 (riscv_expand_epilogue): Check interrupt_mode field.
10033 (riscv_set_current_function): Check interrupt attribute args and
10034 set interrupt_mode field.
10035 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10036 (riscv_sret, riscv_uret): New.
10037 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10038 new arguments to interrupt attribute.
10040 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10043 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10044 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10046 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10048 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10049 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10050 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10051 several redundant entries.
10053 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10055 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10056 type from "rtx" to "rtx_insn *".
10057 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10058 for local "call_insn", removing cast.
10059 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10061 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10063 PR tree-optimization/86066
10064 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10065 for BIT_INSERT_EXPR stores.
10067 2018-06-06 Richard Biener <rguenther@suse.de>
10069 PR tree-optimization/86062
10070 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10071 component refs ontop
10072 of to be offsetted base.
10074 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10076 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10077 to be static and remove check on interrupt attribute name.
10079 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10081 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10082 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10084 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10087 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10089 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10090 Remove second argument, change how error is called.
10091 (aarch64_layout_arg): Remove second argument from
10092 aarch64_err_no_fpadvsimd call.
10093 (aarch64_init_cumulative_args): Ditto.
10094 (aarch64_gimplify_va_arg_expr): Ditto.
10095 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10097 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10099 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10100 (*simple_return_indirect_internal<mode>): Rename from
10101 simple_return_indirect_internal. Use W mode iterator.
10102 (rstorssp): New expander.
10103 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10104 (clrssbsy): New expander.
10105 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10107 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10109 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10111 (cmse_check_pointed_object): Likewise.
10113 2018-06-05 Martin Liska <mliska@suse.cz>
10115 PR gcov-profile/47618
10116 * doc/invoke.texi: Document how -fprofile-dir format
10119 2018-06-05 Richard Biener <rguenther@suse.de>
10121 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10122 removal pretend DOM info isn't available so we do not update
10123 it and only remove edges, not dominated blocks. Actually free
10124 DOM info in case we removed something. Remove unreachable blocks.
10125 (mfb_keep_latches): Work with either DOM info or marked backedges.
10126 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10127 first. Mark backedges if DOM info isn't available.
10128 (Re-)compute DOM info after cleanup_control_flow_pre.
10130 2018-06-05 Richard Biener <rguenther@suse.de>
10132 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10133 (locus_discrim_hasher::hash): Adjust.
10134 (locus_discrim_hasher::equal): Likewise.
10135 (next_discriminator_for_locus): Work on line directly.
10136 (same_line_p): Pass in expanded locus1 as well.
10137 (assign_discriminators): Avoid redundant location expansions.
10139 2018-06-05 Richard Biener <rguenther@suse.de>
10141 PR tree-optimization/86046
10142 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10143 if required after clearing TREE_ADDRESSABLE.
10145 2018-06-05 Richard Biener <rguenther@suse.de>
10147 PR tree-optimization/86047
10148 * tree-ssa-loop.c (for_each_index): Glob handling of all
10149 decls and constants and really handle all of them.
10151 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10154 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10155 qualifier_void_pointer and qualifier_const_void_pointer.
10156 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10157 (arm_init_builtins): Handle the above.
10158 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10159 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10160 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10163 2018-06-05 Martin Liska <mliska@suse.cz>
10165 * auto-profile.c (read_autofdo_file): Do not use
10166 gcov_ctr_summary struct.
10167 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10168 * coverage.c (struct counts_entry): Likewise.
10169 (read_counts_file): Read just single summary entry.
10170 (get_coverage_counts): Use gcov_summary struct.
10171 * coverage.h (get_coverage_counts): Likewise.
10172 * gcov-dump.c (dump_working_sets): Likewise.
10173 (tag_summary): Dump just single summary.
10174 * gcov-io.c (gcov_write_summary): Write just histogram
10176 (gcov_read_summary): Read just single summary.
10177 (compute_working_sets): Use gcov_summary struct.
10178 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10179 of GCOV_COUNTERS_SUMMABLE.
10180 (GCOV_COUNTERS_SUMMABLE): Remove.
10181 (GCOV_FIRST_VALUE_COUNTER): Replace with
10182 GCOV_COUNTER_V_INTERVAL.
10183 (struct gcov_ctr_summary): Remove.
10184 (struct gcov_summary): Directly use fields of former
10186 (compute_working_sets): Use gcov_summary struct.
10187 * gcov.c (read_count_file): Do not use ctrs fields.
10188 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10190 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10192 * profile.c: Likewise.
10193 * profile.h: Likewise.
10195 2018-06-05 Martin Liska <mliska@suse.cz>
10197 PR gcov-profile/84846
10198 * gcov.c (output_lines): Print working directory only
10199 in intermediate format.
10201 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10203 * config/s390/s390-builtin-types.def: Add void function type.
10204 * config/s390/s390-builtins.def: Use the function type for the
10207 2018-06-04 Jim Wilson <jimw@sifive.com>
10209 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10211 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10212 and maybe_eh_return. Change regno to unsigned int. Use new args to
10213 handle EH_RETURN_DATA_REGNO registers properly.
10214 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10215 (riscv_expand_epilogue): Update comment. Change argument name and
10216 type. Update code to use new name and type. Pass new args to
10217 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10219 * config/riscv/riscv.md (NORMAL_RETURN): New.
10220 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10221 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10222 (eh_return): Call gen_eh_return_internal and emit barrier.
10223 (eh_return_internal): Call riscv_expand_epilogue.
10225 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10227 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10228 bit_insertion field and declare can_be_merged_into method.
10229 (merged_store_group::can_be_merged_into): New method.
10230 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10231 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10232 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10234 2018-06-04 Richard Biener <rguenther@suse.de>
10236 PR tree-optimization/85955
10237 * builtins.c (fold_builtin_sincos): Convert pointers to
10238 destination to appropriate type before dereferencing.
10240 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10242 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10244 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10246 * expr.c (expand_expr_real_1): Force the operand into memory if
10247 its TYPE_MODE is BLKmode and if there is no integer mode for
10248 the number of bits being extracted.
10250 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10254 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10255 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10257 2018-06-04 Richard Biener <rguenther@suse.de>
10259 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10260 (cleanup_tree_cfg_noloop): ... single caller. Do
10261 start_recording_case_labels later.
10263 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10265 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10266 to _IMMINTRIN_H_INCLUDED.
10267 * config/i386/pconfigintrin.h: Ditto.
10268 * config/i386/waitpkgintrin.h: Ditto.
10269 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10270 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10271 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10272 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10273 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10274 waitpkgintrin.h and cldemoteintrin.h.
10276 2018-06-04 Richard Biener <rguenther@suse.de>
10278 PR tree-optimization/86038
10279 * tracer.c (find_best_successor): Check probability for
10280 being initialized, bail out if not.
10282 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10285 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10286 of bits to ignore when comparing architectures.
10288 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10290 PR tree-optimization/69615
10291 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10292 maximum or minimum of the type, try to merge it also as if
10293 range1 is + [-, x - 1] or + [x + 1, -].
10296 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10298 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10300 PR tree-optimization/86034
10301 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10302 the unsigned bitfield type in a bit insertion sequence if it does not
10303 have a larger precision than the bitfield size.
10304 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10306 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10308 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10310 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10312 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10313 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10314 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10315 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10317 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10319 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10320 Disable -fdelete-null-pointer-checks for ELF toolchain.
10322 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10323 Kito Cheng <kito.cheng@gmail.com>
10325 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10326 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10327 (nds32*-*-*): Add glibc and uclibc conditions.
10328 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10329 (TARGET_EXCEPT_UNWIND_INFO): Define.
10330 * config/nds32/elf.h: New file.
10331 * config/nds32/linux.h: New file.
10332 * config/nds32/nds32-elf.opt: New file.
10333 * config/nds32/nds32-linux.opt: New file.
10334 * config/nds32/nds32-fp-as-gp.c
10335 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10336 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10338 (nds32_asm_file_end): Ditto.
10339 (nds32_print_operand): Ditto.
10340 (nds32_insert_attributes): Ditto.
10341 (nds32_init_libfuncs): New function.
10342 (TARGET_HAVE_TLS): Define.
10343 (TARGET_INIT_LIBFUNCS): Define.
10344 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10346 (TARGET_ELF): Apply different mcmodel setting.
10347 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10348 been migrated into elf.h and linux.h files.
10349 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10350 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10351 (mcmodel): The content has been migrated into nds32-elf.opt and
10352 nds32-linux.opt files.
10353 * config/nds32/t-elf: New file.
10354 * config/nds32/t-linux: New file.
10356 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10357 Shiva Chen <shiva0217@gmail.com>
10359 * config/nds32/constants.md (unspec_volatile_element): Add
10360 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10361 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10363 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10364 (make_pass_nds32_fp_as_gp): Declare.
10365 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10367 (nds32_asm_function_end_prologue): Remove unused asm output.
10368 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10369 (nds32_asm_file_start): Output necessary fp_as_gp information.
10370 (nds32_option_override): Adjust register usage.
10371 (nds32_expand_prologue): Consider fp_as_gp situation.
10372 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10373 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10376 (simple_return): Ditto.
10377 (omit_fp_begin): Output special directive for fp_as_gp.
10378 (omit_fp_end): Output special directive for fp_as_gp.
10379 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10380 mforbid-fp-as-gp): New options.
10382 2018-06-01 Mark Wielaard <mark@klomp.org>
10384 * dwarf2out.c (dwarf2out_finish): Remove generation of
10385 DW_AT_loclists_base.
10387 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10389 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10390 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10391 (struct merged_store_group): Add bit_insertion field.
10392 (dump_char_array): Use standard hexadecimal format.
10393 (merged_store_group::merged_store_group): Set bit_insertion to false.
10394 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10395 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10396 also print the mask in the dump file.
10397 (pass_store_merging::gate): Minor tweak.
10398 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10399 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10400 stores with INTEGER_CST stores.
10401 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10402 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10403 and use it throughout. Generate bit insertion sequences if need be.
10404 (pass_store_merging::process_store): Remove redundant condition.
10405 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10407 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10409 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10410 the 128-bit floating point types. Fix function comment.
10412 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10414 * config/aarch64/aarch64-simd.md
10415 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10417 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10420 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10422 PR tree-optimization/85989
10423 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10425 (backprop::intersect_uses): Check it when deciding whether this
10426 is a backedge reference.
10427 (backprop::process_block): Add each phi to m_visited_phis
10428 after visiting it, then clear it at the end.
10430 2018-06-01 Richard Biener <rguenther@suse.de>
10432 * tree-vectorizer.h (vect_dr_stmt): New function.
10433 (vect_get_load_cost): Adjust.
10434 (vect_get_store_cost): Likewise.
10435 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10436 Use vect_dr_stmt instead of DR_SMTT.
10437 (vect_record_base_alignments): Likewise.
10438 (vect_calculate_target_alignment): Likewise.
10439 (vect_compute_data_ref_alignment): Likewise and make static.
10440 (vect_update_misalignment_for_peel): Likewise.
10441 (vect_verify_datarefs_alignment): Likewise.
10442 (vector_alignment_reachable_p): Likewise.
10443 (vect_get_data_access_cost): Likewise. Pass down
10444 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10445 (vect_get_peeling_costs_all_drs): Likewise.
10446 (vect_peeling_hash_get_lowest_cost): Likewise.
10447 (vect_enhance_data_refs_alignment): Likewise.
10448 (vect_find_same_alignment_drs): Likewise.
10449 (vect_analyze_data_refs_alignment): Likewise.
10450 (vect_analyze_group_access_1): Likewise.
10451 (vect_analyze_group_access): Likewise.
10452 (vect_analyze_data_ref_access): Likewise.
10453 (vect_analyze_data_ref_accesses): Likewise.
10454 (vect_vfa_segment_size): Likewise.
10455 (vect_small_gap_p): Likewise.
10456 (vectorizable_with_step_bound_p): Likewise.
10457 (vect_prune_runtime_alias_test_list): Likewise.
10458 (vect_analyze_data_refs): Likewise.
10459 (vect_supportable_dr_alignment): Likewise.
10460 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10461 (vect_gen_prolog_loop_niters): Likewise.
10462 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10463 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10465 (vect_recog_mask_conversion_pattern): Likewise.
10466 (vect_try_gather_scatter_pattern): Likewise.
10467 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10468 to vect_get_store_cost.
10469 (vect_get_store_cost): Get stmt_info instead of DR.
10470 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10471 (vect_get_load_cost): Get stmt_info instead of DR.
10473 2018-06-01 Richard Biener <rguenther@suse.de>
10475 PR middle-end/86017
10476 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10477 vars wrapped in MEM_REFs.
10479 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10481 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10482 Fix subreg tests so that we only return a choice between
10483 GENERAL_REGS and FP_REGS if the original classes included both.
10485 2018-06-01 Richard Biener <rguenther@suse.de>
10488 * tree-ssa-structalias.c (get_function_part_constraint):
10489 Handle NULL fi->decl.
10490 (find_func_aliases_for_call): Properly handle indirect
10491 fi from direct call.
10492 (find_func_clobbers): Likewise.
10493 (ipa_pta_execute): Likewise.
10494 (create_variable_info_for): For functions that are ifunc_resolver
10495 resolve to a varinfo that contains the result of the resolver call.
10496 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10499 2018-05-31 Michael Collison <michael.collison@arm.com>
10501 * config/aarch64/aarch64.md:
10502 (*fix_to_zero_extenddfdi2): New pattern.
10503 * gcc.target/aarch64/fix_extend1.c: New testcase.
10505 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10507 PR middle-end/78809
10508 PR middle-end/83026
10509 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10510 and BUILT_IN_STRNCMP_EQ.
10511 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10512 BUILT_IN_STRNCMP_EQ.
10513 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10514 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10515 (gimple_fold_builtin): Likewise.
10516 * tree-ssa-strlen.c (compute_string_length): New function.
10517 (determine_min_obsize): New function.
10518 (handle_builtin_string_cmp): New function to handle calls to
10519 string compare functions.
10520 (strlen_optimize_stmt): Add handling to builtin string compare
10522 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10523 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10524 * tree.c (build_common_builtin_nodes): Add new defines of
10525 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10527 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10530 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10531 functions with naked attribute.
10533 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10535 * config/i386/sse.md (avx_vec_concat<mode>):
10536 Substitute concat_tg_mode mode attribute with xtg_mode.
10537 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10538 (concat_tg_mode): Remove mode attribute.
10540 2018-05-31 Martin Sebor <msebor@redhat.com>
10543 * calls.c (alloc_max_size): Correct a logic error/typo.
10544 Treat excessive arguments as infinite. Warn for invalid arguments.
10545 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10547 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10550 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10551 and movx for Haswell.
10553 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10554 Cesar Philippidis <cesar@codesourcery.com>
10556 PR middle-end/85879
10557 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10558 when emitting error on private/firstprivate reductions.
10559 * omp-low.c (lower_omp_target): Avoid reference-type processing
10560 on pointers for firstprivate clause.
10562 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10564 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10567 * config/aarch64/aarch64-simd.md
10568 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10569 (aarch64_ld1_x3_<mode>): Likewise
10570 (aarch64_st1x2<VALLDIF:mode>): Likewise
10571 (aarch64_st1_x2_<mode>): Likewise
10572 (aarch64_st1x3<VALLDIF:mode>): Likewise
10573 (aarch64_st1_x3_<mode>): Likewise
10574 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10575 (vld1_s8_x3): Likewise.
10576 (vld1_u16_x3): Likewise.
10577 (vld1_s16_x3): Likewise.
10578 (vld1_u32_x3): Likewise.
10579 (vld1_s32_x3): Likewise.
10580 (vld1_u64_x3): Likewise.
10581 (vld1_s64_x3): Likewise.
10582 (vld1_f16_x3): Likewise.
10583 (vld1_f32_x3): Likewise.
10584 (vld1_f64_x3): Likewise.
10585 (vld1_p8_x3): Likewise.
10586 (vld1_p16_x3): Likewise.
10587 (vld1_p64_x3): Likewise.
10588 (vld1q_u8_x3): Likewise.
10589 (vld1q_s8_x3): Likewise.
10590 (vld1q_u16_x3): Likewise.
10591 (vld1q_s16_x3): Likewise.
10592 (vld1q_u32_x3): Likewise.
10593 (vld1q_s32_x3): Likewise.
10594 (vld1q_u64_x3): Likewise.
10595 (vld1q_s64_x3): Likewise.
10596 (vld1q_f16_x3): Likewise.
10597 (vld1q_f32_x3): Likewise.
10598 (vld1q_f64_x3): Likewise.
10599 (vld1q_p8_x3): Likewise.
10600 (vld1q_p16_x3): Likewise.
10601 (vld1q_p64_x3): Likewise.
10602 (vst1_s64_x2): Likewise.
10603 (vst1_u64_x2): Likewise.
10604 (vst1_f64_x2): Likewise.
10605 (vst1_s8_x2): Likewise.
10606 (vst1_p8_x2): Likewise.
10607 (vst1_s16_x2): Likewise.
10608 (vst1_p16_x2): Likewise.
10609 (vst1_s32_x2): Likewise.
10610 (vst1_u8_x2): Likewise.
10611 (vst1_u16_x2): Likewise.
10612 (vst1_u32_x2): Likewise.
10613 (vst1_f16_x2): Likewise.
10614 (vst1_f32_x2): Likewise.
10615 (vst1_p64_x2): Likewise.
10616 (vst1q_s8_x2): Likewise.
10617 (vst1q_p8_x2): Likewise.
10618 (vst1q_s16_x2): Likewise.
10619 (vst1q_p16_x2): Likewise.
10620 (vst1q_s32_x2): Likewise.
10621 (vst1q_s64_x2): Likewise.
10622 (vst1q_u8_x2): Likewise.
10623 (vst1q_u16_x2): Likewise.
10624 (vst1q_u32_x2): Likewise.
10625 (vst1q_u64_x2): Likewise.
10626 (vst1q_f16_x2): Likewise.
10627 (vst1q_f32_x2): Likewise.
10628 (vst1q_f64_x2): Likewise.
10629 (vst1q_p64_x2): Likewise.
10630 (vst1_s64_x3): Likewise.
10631 (vst1_u64_x3): Likewise.
10632 (vst1_f64_x3): Likewise.
10633 (vst1_s8_x3): Likewise.
10634 (vst1_p8_x3): Likewise.
10635 (vst1_s16_x3): Likewise.
10636 (vst1_p16_x3): Likewise.
10637 (vst1_s32_x3): Likewise.
10638 (vst1_u8_x3): Likewise.
10639 (vst1_u16_x3): Likewise.
10640 (vst1_u32_x3): Likewise.
10641 (vst1_f16_x3): Likewise.
10642 (vst1_f32_x3): Likewise.
10643 (vst1_p64_x3): Likewise.
10644 (vst1q_s8_x3): Likewise.
10645 (vst1q_p8_x3): Likewise.
10646 (vst1q_s16_x3): Likewise.
10647 (vst1q_p16_x3): Likewise.
10648 (vst1q_s32_x3): Likewise.
10649 (vst1q_s64_x3): Likewise.
10650 (vst1q_u8_x3): Likewise.
10651 (vst1q_u16_x3): Likewise.
10652 (vst1q_u32_x3): Likewise.
10653 (vst1q_u64_x3): Likewise.
10654 (vst1q_f16_x3): Likewise.
10655 (vst1q_f32_x3): Likewise.
10656 (vst1q_f64_x3): Likewise.
10657 (vst1q_p64_x3): Likewise.
10659 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10661 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10662 user_label_prefix to name.
10664 * tree-core.h: Update comment about the format of NAME string
10665 passed to handler in attribute_spec.
10667 * config/msp430/msp430.md: Remove erroneous subreg expression from
10668 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10669 zero_extend{q,h}isi2.
10671 2018-05-30 Borislav Petkov <bp@suse.de>
10673 * doc/extend.texi: Document some architecture specific
10674 constraints and sort entries.
10676 2018-05-30 Martin Sebor <msebor@redhat.com>
10678 PR middle-end/85369
10679 * builtins.c (expand_builtin_stpcpy_1): New function.
10680 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10681 only if the former succeeds.
10683 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10685 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10688 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10690 * doc/invoke.texi (-flinker-output): Document
10692 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10694 * passes.c (ipa_write_summaries): Only modify statements if body
10696 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10697 incrementally linking.
10698 (ipa_passes): Likewise.
10699 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10700 pass down resolution info.
10701 * common.opt (flag_incremental_link): Update info.
10702 * gcc.c (plugin specs): Turn flinker-output=* to
10703 -plugin-opt=-linker-output-known
10704 * toplev.c (compile_file): Also cut compilation when doing incremental
10706 * flag-types. (enum lto_partition_model): Add
10707 LTO_LINKER_OUTPUT_NOLTOREL.
10708 (invoke.texi): Add -flinker-output docs.
10709 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10710 link same way as WPA; do not stream in dead initializers.
10712 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10713 darf2out_register_external_decl): Support incremental link.
10715 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10717 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10719 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10721 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10722 it down to simple_object_copy_lto_debug_sections.
10723 (run_gcc): Determine incremental LTO link time and configure
10724 lto1 into non-wpa mode, disable renaming of debug sections.
10726 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10728 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10729 descriptions of various incorrectly documented functions.
10731 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10734 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10735 address check not strict.
10737 2018-05-30 Richard Biener <rguenther@suse.de>
10739 PR tree-optimization/85964
10740 * tracer.c (better_p): Drop initialized count check, we only
10741 call the function with initialized counts now.
10742 (find_best_successor): Do find a best edge if one
10743 has uninitialized count.
10744 (find_best_predecessor): Likewise. Do BB frequency check only
10745 if count is initialized.
10747 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10749 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10750 (aarch64_ldrstr_offset_compare): New.
10751 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10752 load/store orderings.
10753 (aarch64_gen_adjusted_ldpstp): Likewise.
10755 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10757 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10758 Check for subset of GENERAL_REGS and FP_REGS.
10759 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10762 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10764 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10765 and wi::to_poly_offset. Add the current offset and then check
10766 whether the sum fits, rather than using an unchecked addition of
10767 a checked term. Check for a shwi rather than a uhwi.
10768 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10769 (store_constructor): Use poly_int_tree_p.
10770 (expand_expr_real_1): Likewise.
10771 * function.c (assign_temp): Likewise.
10772 * fold-const.c (const_binop): Use poly_int_tree_p and
10773 wi::to_poly_offset.
10774 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10776 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10777 to_poly_offset for MEM offsets.
10778 * ipa-icf.c (sem_variable::equals): Likewise.
10779 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10780 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10781 wi::to_poly_offset for BIT_FIELD_REF offsets.
10782 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10783 wi::to_poly_offset.
10784 * var-tracking.c (emit_note_insn_var_location): Use
10785 tree_to_poly_uint64.
10787 2018-05-29 Jim Wilson <jimw@sifive.com>
10789 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10791 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10794 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10795 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10797 (sse4_1_round<mode>2): Use nonimmediate_operand
10798 for operand 1 predicate.
10800 2018-05-29 Martin Sebor <msebor@redhat.com>
10801 Richard Biener <rguenther@suse.de>
10804 * calls.c (get_size_range): Call determine_value_range instead
10805 of get_value_range..
10806 * tree-vrp.h (determine_value_range): Declared new function.
10807 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10809 2018-05-29 Richard Biener <rguenther@suse.de>
10811 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10812 sure to use non-pattern stmts for get_earlier_stmt arguments.
10813 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10814 called on pattern stmts.
10815 (get_later_stmt): Likewise.
10817 2018-05-29 Martin Liska <mliska@suse.cz>
10819 PR gcov-profile/85759
10820 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10823 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10825 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10827 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10831 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10832 VEC_PACK_FLOAT_EXPR): New tree codes.
10833 * tree-pretty-print.c (op_code_prio): Handle
10834 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10835 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10836 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10837 * tree-inline.c (estimate_operator_cost): Likewise.
10838 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10839 * fold-const.c (const_binop): Likewise.
10840 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10841 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10842 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10843 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10844 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10845 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10846 * expr.c (expand_expr_real_2): Likewise.
10847 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10848 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10849 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10851 * optabs.c (expand_widen_pattern_expr): For
10852 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10853 sign from result type rather than operand's type.
10854 (expand_binop_directly): For vec_packu_float_optab and
10855 vec_packs_float_optab allow result type to be different from operand's
10857 * optabs-tree.c (optab_for_tree_code): Handle
10858 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10859 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10860 * tree-vect-generic.c (expand_vector_operations_1): Handle
10861 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10862 VEC_PACK_FLOAT_EXPR.
10863 * tree-vect-stmts.c (supportable_widening_operation): Handle
10865 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10866 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10867 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10868 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10869 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10871 (vec_pack<floatprefix>_float_<mode>): New expander.
10872 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10874 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10875 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10876 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10877 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10878 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10880 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10881 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10882 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10883 VEC_PACK_FLOAT_EXPR): Document.
10885 2018-05-29 Richard Biener <rguenther@suse.de>
10887 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10889 (stmt_vec_info_vec): Make pointer.
10890 (init_stmt_vec_info_vec): Remove.
10891 (free_stmt_vec_info_vec): Likewise.
10892 (set_stmt_vec_info_vec): New function.
10893 (free_stmt_vec_infos): Likewise.
10894 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10895 (set_vinfo_for_stmt): Likewise.
10896 (get_earlier_stmt): Likewise.
10897 (get_later_stmt): Likewise.
10898 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10899 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10900 (vec_info::~vec_info): Free stmt_vec_infos.
10901 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10902 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10903 (pass_slp_vectorize::execute): Likewise.
10904 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10905 (free_stmt_vec_info_vec): Likewise.
10906 (set_stmt_vec_info_vec): New function.
10907 (free_stmt_vec_infos): Likewise.
10908 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10909 the global stmt_vec_info_vec.
10910 * tree-parloops.c (gather_scalar_reductions): Use
10911 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10914 2018-05-29 Richard Biener <rguenther@suse.de>
10916 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10918 2018-05-29 Martin Liska <mliska@suse.cz>
10919 David Malcolm <dmalcolm@redhat.com>
10921 * vec.c (test_reverse): New.
10922 (vec_c_tests): Add new test.
10923 * vec.h (vl_ptr>::reverse): New function.
10925 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10927 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10929 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10932 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10934 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10936 2018-05-28 Richard Biener <rguenther@suse.de>
10938 PR tree-optimization/85933
10939 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10940 look at stmts marked as vectorizable.
10942 2018-05-28 Richard Biener <rguenther@suse.de>
10944 PR tree-optimization/85934
10945 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10946 vector boolean check before scalar optimization.
10948 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10950 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10953 2018-05-28 Mark Wielaard <mark@klomp.org>
10955 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10956 if it is an expression containing a minus sign.
10958 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10960 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10962 2018-05-27 Paul Koning <ni1d@arrl.net>
10964 * config/pdp11/pdp11.md (truncsihi2): Remove.
10966 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10967 Chung-Ju Wu <jasonwucj@gmail.com>
10969 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10971 (unaligned_store_dw): Ditto.
10972 * config/nds32/nds32-memory-manipulation.c
10973 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10974 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10975 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10976 (emit_setmem_word_loop): Rename to ...
10977 (emit_setmem_doubleword_loop): ... this.
10978 (nds32_gen_dup_4_byte_to_word_value): New function.
10979 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10980 (nds32_expand_setmem_loop): Refine implementation.
10981 (nds32_expand_setmem_loop_v3m): Ditto.
10982 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10985 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10987 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10989 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10991 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10992 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10993 machine->attr_no_prologue_p.
10994 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10995 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10996 (nds32_expand_epilogue): Consider attr_naked_p.
10997 (nds32_expand_epilogue_v3pop): Likewise.
10998 (nds32_can_use_return_insn): Likewise.
10999 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11000 attr_no_prologue_p fields.
11001 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11003 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11006 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11008 * config/i386/sse.md
11009 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11011 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11013 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11015 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11017 (*<floatsuffix>floatv2div2sf2): Rename to ...
11018 (*float<floatunssuffix>v2div2sf2): ... this.
11019 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11020 (float<floatunssuffix>v2div2sf2_mask): ... this.
11021 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11022 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11023 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11025 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11027 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11029 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11031 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11033 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11035 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11036 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11037 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11038 gen_ufix_truncv8dfv8si2.
11039 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11040 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11041 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11042 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11043 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11044 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11045 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11046 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11048 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11052 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11054 2018-05-25 Jim Wilson <jimw@sifive.com>
11056 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11057 * config/riscv/riscv.c (struct machine_function): Add
11058 interrupt_handler_p and attribute_checked_p fields.
11059 (riscv_attribute_table): Add interrupt.
11060 (riscv_interrupt_type_p): New.
11061 (riscv_save_reg_p): Save extra regs for interrupt handler.
11062 (riscv_use_save_libcall): Return false for interrupt handler.
11063 (riscv_first_stack_step): Add forward declaration.
11064 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11065 for interrupt handler with large frame. Use it for saved reg list.
11066 (riscv_expand_prologue): Move flag_stack_usage_info support to
11067 eliminate duplication.
11068 (riscv_expand_epilogue): Generate mret for interrupt handler.
11069 (riscv_epilogue_uses): New.
11070 (riscv_can_use_return_insn): Return false for interrupt handler.
11071 (riscv_function_ok_for_sibcall): Likewise.
11072 (riscv_set_current_function): Add interrupt handler support.
11073 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11074 * config/riscv/riscv.md (UNSPECV_MRET): New.
11076 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11078 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11080 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11082 PR tree-optimization/85712
11083 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11084 this candidate has already been replaced in-situ by a copy.
11086 2018-05-25 Jason Merrill <jason@redhat.com>
11088 PR c++/80485 - inline function non-zero address.
11089 * symtab.c (nonzero_address): Check DECL_COMDAT.
11091 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11094 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11095 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11096 extension of SImode operation. Use const123_operand predicate.
11097 (*saddsi_1): Remove.
11098 (*saddl_se_1): Ditto.
11099 (*ssubsi_1): Ditto.
11100 (*ssubl_se_1): Ditto.
11101 * config/alpha/predicates.md (const123_operand): New predicate.
11102 * config/alpha/constraints.md (P): Use IN_RANGE.
11104 2018-05-25 Richard Biener <rguenther@suse.de>
11106 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11108 (ref_maybe_used_by_stmt_p): Likewise.
11109 (stmt_may_clobber_ref_p): Likewise.
11110 (stmt_may_clobber_ref_p_1): Likewise.
11111 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11113 (ref_maybe_used_by_stmt_p): Likewise.
11114 (stmt_may_clobber_ref_p): Likewise.
11115 (stmt_may_clobber_ref_p_1): Likewise.
11116 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11117 the alias oracle to disambiguate DRs with stmts DR analysis
11119 (vect_analyze_data_refs): Do not give up on not analyzable
11120 DRs for BB vectorization. Remove code truncating the dataref
11123 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11126 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11127 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11128 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11130 2018-05-25 Richard Biener <rguenther@suse.de>
11132 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11133 function, combining stmt data ref gathering and fatal analysis
11135 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11136 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11137 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11138 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11139 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11141 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11143 PR tree-optimization/85720
11144 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11145 SCC if all partitions are builtins.
11146 (version_loop_by_alias_check): New parameter. Generate cancelable
11147 runtime alias check if all partitions are builtins.
11148 (distribute_loop): Update call to above function.
11150 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11152 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11153 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11154 (parm_default_def_partition_arg): Ditto.
11155 (set_parm_default_def_partition): Ditto.
11156 (get_parm_default_def_partitions): Ditto and make it static.
11157 (get_undefined_value_partitions): Ditto and make it static.
11158 (remove_ssa_form): Refactor call to init_var_map here.
11159 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11160 computation for loop region.
11161 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11162 (register_default_def): Delete.
11163 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11164 (parm_default_def_partition_arg): Ditto.
11165 (set_parm_default_def_partition): Ditto.
11166 (get_parm_default_def_partitions): Ditto and make it static.
11167 (get_undefined_value_partitions): Ditto and make it static.
11168 (coalesce_with_default, coalesce_with_default): Update comment.
11169 (create_coalesce_list_for_region): New func factored out from
11170 create_outofssa_var_map.
11171 (populate_coalesce_list_for_outofssa): New func factored out from
11172 create_outofssa_var_map and coalesce_ssa_name.
11173 (create_outofssa_var_map): Delete.
11174 (coalesce_ssa_name): Refactor to support live range computation.
11175 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11176 (get_parm_default_def_partitions): Delete.
11177 (get_undefined_value_partitions): Ditto.
11178 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11179 computation for loop region.
11180 (new_tree_live_info, loe_visit_block): Ditto.
11181 (live_worklist, set_var_live_on_entry): Ditto.
11182 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11183 * tree-ssa-live.h (struct _var_map): New fields.
11184 (init_var_map): Change decl.
11185 (region_contains_p): New.
11187 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11189 * tree-ssa-live.h (live_merge_and_clear): Delete.
11191 2018-05-25 Richard Biener <rguenther@suse.de>
11194 * tree-dump.c (dequeue_and_dump): Remove access to removed
11195 operand 2 of a SWITCH_EXPR.
11197 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11199 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11200 multiplication and division.
11201 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11202 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11203 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11204 (cond_udiv_optab, cond_umod_optab): New optabs.
11205 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11206 (IFN_COND_RDIV): New internal functions.
11207 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11208 TRUNC_MOD_EXPR and RDIV_EXPR.
11209 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11210 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11212 (SVE_INT_BINARY): Include mult.
11213 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11214 (optab, sve_int_op): Handle mult.
11215 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11217 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11218 for SVE_INT_BINARY_SD.
11220 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11222 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11223 (optab, sve_int_op): Handle div and udiv.
11224 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11225 for SVE_INT_BINARY_SD.
11226 (*<optab><mode>3): New insn for the same.
11228 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11230 * tree-vect-patterns.c: Include predict.h.
11231 (vect_recog_divmod_pattern): Restrict check for division support
11232 to when optimizing for size.
11234 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11236 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11237 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11238 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11239 (gimple_match_op::set_op): Likewise.
11240 (gimple_resimplify4): Declare.
11241 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11242 (expr::gen_transform): Likewise.
11243 (decision_tree::gen): Generate a simplification routine for 4 operands.
11244 * gimple-match-head.c (gimple_simplify): Add an overload for
11245 4 operands. In the top-level function, handle up to 4 call
11246 arguments and call gimple_resimplify4.
11247 (gimple_resimplify4): New function.
11248 (build_call_internal): Pass a fourth operand.
11249 (maybe_push_to_seq): Likewise.
11250 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11251 Fold VEC_COND_EXPRs of an operation and a default value into
11252 an IFN_COND_* function if possible.
11253 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11255 (SVE_COND_FP_BINARY): Include them.
11256 (optab, sve_fp_op): Handle them.
11257 (SVE_INT_BINARY_REV): New code iterator.
11258 (SVE_COND_FP_BINARY_REV): New int iterator.
11259 (commutative): New int attribute.
11260 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11262 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11264 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11265 (*cond_<optab><mode>): New patterns for reversed operands.
11267 2018-05-25 Richard Biener <rguenther@suse.de>
11269 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11270 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11271 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11272 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11273 * tree-vect-data-refs.c (everywhere): Adjust users.
11274 * tree-vect-loop.c (everywhere): Likewise.
11275 * tree-vect-slp.c (everywhere): Likewise.
11276 * tree-vect-stmts.c (everywhere): Likewise.
11277 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11279 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11281 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11283 (gcc_cv_as_section_exclude): ... this.
11284 Try Solaris as #exclude syntax.
11285 * configure: Regenerate.
11286 * config.in: Regenerate.
11287 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11289 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11290 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11292 * varasm.c (default_elf_asm_named_section): Don't check if
11293 HAVE_GAS_SECTION_EXCLUDE is defined.
11295 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11297 * doc/md.texi: Update the documentation of the cond_* optabs
11298 to mention the new final operand. Fix GET_MODE_NUNITS call.
11299 Describe the scalar case too.
11300 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11301 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11303 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11304 (get_conditional_internal_fn): Update comment.
11305 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11306 accumulator value as a final argument to conditional functions.
11307 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11308 a define_expand and add an "else" operand. Assert for now that
11309 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11310 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11311 (*cond_<optab><mode>): New patterns.
11312 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11313 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11314 (UNSPEC_COND_EOR): Delete.
11315 (optab): Remove associated mappings.
11316 (SVE_INT_BINARY): New code iterator.
11317 (sve_int_op): Remove int attribute and add "minus" to the code
11319 (SVE_COND_INT_OP): Delete.
11320 (SVE_COND_FP_OP): Rename to...
11321 (SVE_COND_FP_BINARY): ...this.
11323 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11325 * optabs.c (can_reuse_operands_p): New function.
11326 (maybe_legitimize_operands): Try to reuse the results for
11329 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11331 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11332 Add {q} suffix to insn mnemonic.
11334 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11336 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11337 (msp430_warn_func_return): New.
11339 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11341 * fold-const.c (tree_nonzero_bits): New function.
11342 * fold-const.h (tree_nonzero_bits): Likewise.
11343 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11344 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11346 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11350 * varasm.c (assemble_alias): Check ifunc_resolver only on
11353 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11356 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11357 when memory input operand is handled.
11359 2018-05-24 Luis Machado <luis.machado@linaro.org>
11361 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11363 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11365 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11367 * match.pd: Delay FMA folds until after vectorization.
11369 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11372 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11373 address check not strict.
11375 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11377 * gimple-match.h (gimple_match_op): New class.
11378 (mprts_hook): Replace parameters with a gimple_match_op *.
11379 (maybe_build_generic_op): Likewise.
11380 (gimple_simplified_result_is_gimple_val): Replace parameters with
11381 a const gimple_match_op *.
11382 (gimple_simplify): Replace code_helper * and tree * parameters with
11383 a gimple_match_op * parameter.
11384 (gimple_resimplify1): Replace code_helper *, tree and tree *
11385 parameters with a gimple_match_op * parameter.
11386 (gimple_resimplify2): Likewise.
11387 (gimple_resimplify3): Likewise.
11388 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11389 parameters with a gimple_match_op * parameter.
11390 * gimple-match-head.c (gimple_simplify): Change prototypes of
11391 auto-generated functions to take a gimple_match_op * instead of
11392 separate code_helper * and tree * parameters. Make the same
11393 change in the top-level overload and update calls to the
11394 gimple_resimplify routines. Update calls to the auto-generated
11395 functions and to maybe_push_res_to_seq in the publicly-facing
11396 operation-specific gimple_simplify overloads.
11397 (gimple_match_op::MAX_NUM_OPS): Define.
11398 (gimple_resimplify1): Replace rcode and ops with a single res_op
11399 parameter. Update call to gimple_simplify.
11400 (gimple_resimplify2): Likewise.
11401 (gimple_resimplify3): Likewise.
11402 (mprts_hook): Replace parameters with a gimple_match_op *.
11403 (maybe_build_generic_op): Likewise.
11404 (build_call_internal): Replace type, nargs and ops with
11405 a gimple_match_op *.
11406 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11407 with a single gimple_match_op *. Update calls to mprts_hook,
11408 build_call_internal and gimple_simplified_result_is_gimple_val.
11409 Factor out code that is common to the tree_code and combined_fn cases.
11410 * genmatch.c (expr::gen_transform): Replace tem_code and
11411 tem_ops with a gimple_match_op called tem_op. Update calls
11412 to the gimple_resimplify functions and maybe_push_res_to_seq.
11413 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11414 res_ops. Update call to the gimple_resimplify functions.
11415 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11416 (decision_tree::gen): Make the functions take a gimple_match_op *
11417 called res_op instead of separate res_code and res_ops parameters.
11418 Update call accordingly.
11419 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11420 and ops with a single res_op parameter. Update calls to
11421 maybe_build_generic_op and maybe_push_res_to_seq.
11422 (fold_stmt_1): Update calls to gimple_simplify and
11423 replace_stmt_with_simplification.
11424 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11425 and gimple_simplified_result_is_gimple_val.
11426 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11428 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11429 with a gimple_match_op *.
11430 (vn_nary_build_or_lookup): Likewise. Update call to
11431 vn_nary_build_or_lookup_1.
11432 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11433 gimple_match_op *. Update calls to the gimple_resimplify routines
11434 and to gimple_simplified_result_is_gimple_val.
11435 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11436 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11437 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11438 (visit_nary_op): Likewise.
11439 (visit_reference_op_load): Likewise.
11441 2018-05-23 Luis Machado <luis.machado@linaro.org>
11443 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11444 modifier for printing the step amount.
11446 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11449 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11452 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11454 * doc/sourcebuild.texi (Endianness): New subsubsection.
11456 2018-05-23 Luis Machado <luis.machado@linaro.org>
11458 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11459 <prefetch_dynamic_strides>: New const bool field.
11460 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11461 prefetch_dynamic_strides.
11462 (exynosm1_prefetch_tune): Likewise.
11463 (thunderxt88_prefetch_tune): Likewise.
11464 (thunderx_prefetch_tune): Likewise.
11465 (thunderx2t99_prefetch_tune): Likewise.
11466 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11468 (aarch64_override_options_internal): Update to set
11469 PARAM_PREFETCH_DYNAMIC_STRIDES.
11470 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11471 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11472 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11473 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11474 prefetch-dynamic-strides setting.
11476 2018-05-23 Luis Machado <luis.machado@linaro.org>
11478 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11479 <minimum_stride>: New const int field.
11480 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11481 minimum_stride field defaulting to -1.
11482 (exynosm1_prefetch_tune): Likewise.
11483 (thunderxt88_prefetch_tune): Likewise.
11484 (thunderx_prefetch_tune): Likewise.
11485 (thunderx2t99_prefetch_tune): Likewise.
11486 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11487 <default_opt_level>: Set to 3.
11488 (aarch64_override_options_internal): Update to set
11489 PARAM_PREFETCH_MINIMUM_STRIDE.
11490 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11491 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11492 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11493 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11494 stride is constant and is below the minimum stride threshold.
11496 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11498 * config/arm/arm-cpus.in (mode26): Delete.
11499 (armv4): Delete mode26 reference.
11500 * config/arm/arm.c (arm_configure_build_target): Delete use of
11503 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11505 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11507 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11508 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11510 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11511 (floatunsdidf2): Ditto.
11513 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11515 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11516 (fixuns_trunc<mode>si2_avx512f): Ditto.
11517 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11518 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11519 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11521 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11523 PR rtl-optimization/79985
11524 * df-scan.c (df_insn_refs_collect): Remove special case for
11525 global registers and asm statements.
11527 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11529 * extend.texi (Global Register Variables): Rewrite the bullet list.
11530 Note that the register is available for allocation. Note that access
11531 via inline asm must use constraints. Add note about async-signal
11532 handlers. Remove paragraph about automagic register selection.
11534 2018-05-23 Richard Biener <rguenther@suse.de>
11536 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11537 of fixed offset from memset VN.
11539 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11541 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11542 first_interp field.
11543 (alloc_cand_and_find_basis): Initialize first_interp field.
11544 (slsr_process_mul): Modify first_interp field.
11545 (slsr_process_add): Likewise.
11546 (slsr_process_cast): Modify first_interp field for each new
11548 (slsr_process_copy): Likewise.
11549 (dump_candidate): Dump first_interp field.
11550 (replace_mult_candidate): Process all interpretations, not just
11552 (replace_rhs_if_not_dup): Likewise.
11553 (replace_one_candidate): Likewise.
11555 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11557 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11559 (aarch64_needs_frame_chain): New function.
11560 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11562 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11565 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11566 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11567 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11568 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11569 as true for strict-align.
11570 (aarch64_can_inline_p): Perform checks even when callee has no
11571 attributes to check for strict alignment.
11572 * doc/extend.texi (AArch64 Function Attributes): Document
11574 * doc/invoke.texi: (AArch64 Options): Likewise.
11576 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11578 PR tree-optimization/85853
11579 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11580 the handling of the root of the node to...
11581 (vect_slp_analyze_node_operations_1): ...this new function,
11582 and run the whole thing with the child nodes' def types
11583 set according to their SLP node's def type.
11585 2018-05-23 Richard Biener <rguenther@suse.de>
11587 PR middle-end/85874
11588 * tree-data-ref.c (create_runtime_alias_checks): Defer
11589 and ignore overflow warnings.
11591 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11593 PR tree-optimization/85822
11594 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11597 2018-05-23 Richard Biener <rguenther@suse.de>
11599 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11600 memset constants via native_interpret_expr.
11602 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11605 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11607 (cgraph_node::create_alias): Likewise.
11608 (cgraph_node::get_availability): Check ifunc_resolver instead
11609 of looking up ifunc attribute.
11610 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11611 * varasm.c (do_assemble_alias): Likewise.
11612 (assemble_alias): Likewise.
11613 (default_binds_local_p_3): Likewise.
11614 * cgraph.h (cgraph_node): Add ifunc_resolver.
11615 (cgraph_node::only_called_directly_or_aliased_p): Return false
11616 for IFUNC resolver.
11617 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11619 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11620 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11621 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11622 instead of looking up ifunc attribute.
11624 2018-05-22 Luis Machado <luis.machado@linaro.org>
11626 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11628 2018-05-22 Martin Sebor <msebor@redhat.com>
11630 PR middle-end/85359
11631 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11632 only when expasion succeeds.
11633 (expand_builtin_strcmp): Same.
11634 (expand_builtin_strncmp): Same.
11636 2018-05-22 Martin Sebor <msebor@redhat.com>
11638 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11640 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11641 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11643 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11644 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11646 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11647 Add check for legitimate_address.
11648 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11649 (aarch64_swap_ldrstr_operands): New.
11650 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11653 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11654 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11656 * config/aarch64/aarch64.md: New patterns to generate stp
11658 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11659 single words and double words.
11660 (load_pair_sw, load_pair_dw): Likewise.
11661 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11663 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11665 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11666 for different mode ldpstp and add peephole for merged zero stores.
11667 Likewise for loads.
11668 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11670 (aarch64_gen_store_pair): Rename calls to match new patterns.
11671 (aarch64_gen_load_pair): Rename calls to match new patterns.
11672 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11673 (load_pair<DREG:mode><DREG2:mode>): ... This.
11674 (store_pair<mode>): Rename to...
11675 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11676 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11677 New mode iterators.
11678 (V_INT_EQUIV): Handle SImode.
11679 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11682 2018-05-22 Martin Sebor <msebor@redhat.com>
11685 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11686 or ajust the presumed bound on an operation to avoid unnecessary
11689 2018-05-22 Martin Sebor <msebor@redhat.com>
11691 PR tree-optimization/85826
11692 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11693 assuming that a DECL necesarily has a constant size.
11695 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11697 PR middle-end/85862
11698 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11700 2018-05-22 Richard Biener <rguenther@suse.de>
11702 PR tree-optimization/85834
11703 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11704 non-constant and non-zero memset arguments.
11706 2018-05-22 Martin Liska <mliska@suse.cz>
11709 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11711 2018-05-22 Richard Biener <rguenther@suse.de>
11713 PR tree-optimization/85863
11714 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11715 comparisons when vectype is specified.
11716 (vectorizable_condition): Do not specify vectype for
11717 vect_is_simple_cond when SLP vectorizing.
11719 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11722 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11723 define __ibm128 as long double.
11724 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11725 as a distinct type when IEEE 128-bit support is enabled.
11726 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11727 128-bit types to use the correct functions.
11728 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11729 convert between 128-bit floating point types that have different
11730 modes but the same representation, instead of using gen_lowpart to
11732 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11734 (IFKF_reg): New attributes to give the register constraints for
11736 (extend<mode>tf2_internal): New insns to mark an explicit
11737 conversion between 128-bit floating point types that have a
11738 different mode but share the same representation.
11740 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11742 PR tree-optimization/85814
11743 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11744 a null return from get_strinfo when unsharing the next
11745 strinfo in the chain.
11747 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11750 * varasm.c (weak_finish): Clean up weak_decls.
11752 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11754 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11755 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11756 UNSPEC_UADALP values.
11757 * config/aarch64/iterators.md (ABAL): New int iterator.
11760 (sur): Add mappings for the above.
11761 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11763 (aarch64_<sur>abal<mode>_4): Likewise.
11764 (aarch64_<sur>adalp<mode>_3): Likewise.
11765 (<sur>sadv16qi): New define_expand.
11767 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11769 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11770 (*movdf_internal): Ditto.
11771 (*rcpsf2_sse): Ditto.
11772 (*rsqrtsf2_sse): Ditto.
11773 (*sqrt<mode>2_sse): Ditto.
11775 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11777 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11779 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11780 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11781 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11782 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11784 * config/aarch64/arm_neon.h: Likewise.
11785 * config/aarch64/iterators.md (VQ_I): New.
11787 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11789 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11791 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11794 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11796 * config/nds32/constraints.md (S): New constraint.
11797 * config/nds32/nds32.md (call_internal): Use constraint S.
11798 (call_value_internal): Likewise.
11799 (sibcall_internal): Likewise.
11800 (sibcall_value_internal): Likewise.
11802 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11803 Chung-Ju Wu <jasonwucj@gmail.com>
11805 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11806 into consideration.
11808 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11809 Chung-Ju Wu <jasonwucj@gmail.com>
11811 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11812 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11813 (nds32_rtx_costs_impl): Simplify.
11814 (nds32_address_cost_impl): Simplify.
11815 (nds32_init_rtx_costs): New function.
11816 (nds32_rtx_costs_speed_prefer): Likewise.
11817 (nds32_rtx_costs_size_prefer): Likewise.
11818 (nds32_address_cost_speed_prefer): Likewise.
11819 (nds32_address_cost_speed_fwprop): Likewise.
11820 (nds32_address_cost_size_prefer): Likewise.
11821 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11822 * config/nds32/nds32.c (nds32_option_override): Use
11823 nds32_init_rtx_costs function.
11825 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11827 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11828 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11829 (TARGET_PIPELINE_N8): Likewise.
11830 (TARGET_PIPELINE_N10): Likewise.
11831 (TARGET_PIPELINE_N13): Likewise.
11832 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11834 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11836 * config/nds32/nds32-fpu.md: Update copyright year.
11838 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11840 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11842 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11844 * config/nds32/nds32.c
11845 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11846 * config/nds32/nds32.opt (minline-asm-r15): New option.
11848 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11850 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11852 * config/nds32/nds32.md (abssi2): New pattern.
11854 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11856 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11857 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11858 Merge insn pattern from sse_cvtsi2ss<round_name> and
11859 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11860 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11861 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11862 using SWI48 mode iterator.
11863 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11864 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11865 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11866 pattern from sse_cvttss2si<round_saeonly_name>
11867 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11868 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11869 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11870 using SWI48 mode iterator.
11871 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11872 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11873 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11874 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11875 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11876 using SWI48 mode iterator.
11877 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11878 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11879 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11880 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11881 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11882 SWI48 mode iterator.
11883 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11884 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11885 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11886 pattern from sse_cvttsd2si<round_saeonly_name>
11887 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11889 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11891 * config/nds32/nds32-md-auxiliary.c
11892 (nds32_valid_smw_lwm_base_p): Refine.
11893 (nds32_output_smw_single_word): Refine.
11894 (nds32_output_smw_double_word): New.
11895 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11897 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11899 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11900 (nds32_output_stack_pop): Refine.
11901 (nds32_expand_unaligned_load): Refine.
11902 (nds32_expand_unaligned_store): Refine.
11904 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11905 Chung-Ju Wu <jasonwucj@gmail.com>
11907 * config/nds32/constants.md: Add TP_REGNUM constant.
11908 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11909 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11911 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11912 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11913 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11914 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11915 and PIC code generation.
11916 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11918 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11920 * config/nds32/nds32.md: Support TLS and PIC.
11921 * config/nds32/nds32.c: Support TLS and PIC.
11922 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11923 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11926 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11928 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11929 mode with E_ prefix.
11931 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11932 Chung-Ju Wu <jasonwucj@gmail.com>
11934 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11935 * config/nds32/nds32-md-auxiliary.c
11936 (symbolic_reference_mentioned_p): New.
11937 (nds32_legitimize_ict_address): New.
11938 (nds32_expand_ict_move): New.
11939 (nds32_indirect_call_referenced_p): New.
11940 (nds32_symbol_binds_local_p): Delete.
11941 (nds32_long_call_p): Modify.
11942 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11943 * config/nds32/nds32-protos.h
11944 (symbolic_reference_mentioned_p): Declare.
11945 (nds32_legitimize_ict_address): Declare.
11946 (nds32_expand_ict_move): Declare.
11947 (nds32_indirect_call_referenced_p): Declare.
11948 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11949 (nds32_relax_group): Use nds32_ict_const_p as condition.
11950 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11951 (nds32_asm_file_start): Output ict_model directive in asm code.
11952 (nds32_legitimate_address_p): Consider indirect call.
11953 (nds32_print_operand): Consider indirect call.
11954 (nds32_print_operand_address): Consider indirect call.
11955 (nds32_insert_attributes): Handle "indirect_call" attribute.
11956 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11957 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11958 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11959 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11960 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11961 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11962 (TARGET_ICT_MODEL_SMALL): Define.
11963 (TARGET_ICT_MODEL_LARGE): Define.
11964 * config/nds32/nds32.md (movsi): Consider ict model.
11965 (call, call_value): Consider ict model.
11966 (sibcall, sibcall_value): Consider ict model.
11967 * config/nds32/nds32.opt (mict-model): New option.
11968 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11971 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11972 Monk Chiang <sh.chiang04@gmail.com>
11973 Jim Wilson <jimw@sifive.com>
11975 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11976 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11977 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11978 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11979 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11980 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11981 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11982 compute save_libcall_adjustment properly.
11983 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11984 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11985 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11986 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11987 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11988 (ABI_SPEC): Handle mabi=ilp32e.
11989 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11990 (RVE): Add RVE mask.
11991 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11992 <-march>: Add rv32e as an example.
11994 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11997 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11998 (intra_create_variable_infos): Handle C++ constructors.
12000 2018-05-18 Martin Liska <mliska@suse.cz>
12002 * passes.def: Remove a redundant pass.
12004 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12007 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12009 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12011 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12013 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12015 (armv2, armv2a, armv3, armv3m): Delete architectures.
12016 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12017 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12018 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12020 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12021 (*mulsidi3adddi): Likewise.
12022 (mulsidi3): Likewise.
12023 (*mulsidi3_nov6): Likewise.
12024 (umulsidi3): Likewise.
12025 (umulsidi3_nov6): Likewise.
12026 (umaddsidi4): Likewise.
12027 (*umulsidi3adddi): Likewise.
12028 (smulsi3_highpart): Likewise.
12029 (*smulsi3_highpart_nov6): Likewise.
12030 (umulsi3_highpart): Likewise.
12031 (*umulsi3_highpart_nov6): Likewise.
12032 * config/arm/arm.h (arm_arch3m): Delete.
12033 * config/arm/arm.c (arm_arch3m): Delete.
12034 (arm_option_override_internal): Update armv3-related comment.
12035 (arm_configure_build_target): Delete use of isa_bit_mode32.
12036 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12037 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12038 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12039 (mulsa3): Likewise.
12040 (mulusa3): Likewise.
12041 * config/arm/arm-protos.h (arm_arch3m): Delete.
12042 * config/arm/arm-tables.opt: Regenerate.
12043 * config/arm/arm-tune.md: Likewise.
12044 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12045 deleted architectures.
12047 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12049 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12050 (armv5t, armv5te): New features.
12051 (ARMv5, ARMv5e): Delete fgroups.
12052 (ARMv5t, ARMv5te): Adjust for above changes.
12053 (ARMv6m): Likewise.
12054 (armv5, armv5e): Delete arches.
12055 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12057 (*call_reg_arm): Likewise.
12058 (*call_value_reg_armv5): Likewise.
12059 (*call_value_reg_arm): Likewise.
12060 (*call_symbol): Likewise.
12061 (*call_value_symbol): Likewise.
12062 (*sibcall_insn): Likewise.
12063 (*sibcall_value_insn): Likewise.
12064 (clzsi2): Likewise.
12065 (prefetch): Likewise.
12066 (define_split and define_peephole2 dependent on arm_arch5):
12068 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12070 (TARGET_ARM_QBIT): Likewise.
12071 (TARGET_DSP_MULTIPLY): Likewise.
12072 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12073 (arm_arch5, arm_arch5e): Delete.
12074 (arm_arch5t, arm_arch5te): Declare.
12075 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12076 (arm_arch5t): Declare.
12077 (arm_option_reconfigure_globals): Update for the above.
12078 (arm_options_perform_arch_sanity_checks): Update comment, replace
12079 use of arm_arch5 with arm_arch5t.
12080 (use_return_insn): Likewise.
12081 (arm_emit_call_insn): Likewise.
12082 (output_return_instruction): Likewise.
12083 (arm_final_prescan_insn): Likewise.
12084 (arm_coproc_builtin_available): Likewise.
12085 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12086 arm_arch5e with arm_arch5t and arm_arch5te.
12087 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12088 (arm_arch5t, arm_arch5te): Declare.
12089 * config/arm/arm-tables.opt: Regenerate.
12090 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12091 * config/arm/t-multilib: Likewise.
12092 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12093 instead of arm_arch5.
12094 (*call_reg_thumb1): Likewise.
12095 (*call_value_reg_thumb1_v5): Likewise.
12096 (*call_value_reg_thumb1): Likewise.
12097 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12099 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12101 2018-05-18 Martin Liska <mliska@suse.cz>
12103 PR gcov-profile/84846
12104 * doc/gcov.texi: Document -t option of gcov tool.
12106 2018-05-18 Martin Liska <mliska@suse.cz>
12108 PR gcov-profile/84846
12109 * gcov.c (print_usage): Add new -t option.
12110 (process_args): Handle the option.
12111 (generate_results): Use stdout as output when requested by
12114 2018-05-18 Martin Liska <mliska@suse.cz>
12116 PR gcov-profile/84846
12117 * coverage.c (coverage_init): Write PWD to .gcno file.
12118 * doc/gcov.texi: Document how working directory is printed.
12119 * gcov-dump.c (dump_gcov_file): Print PWD.
12120 * gcov.c (output_intermediate_file): Likewise.
12121 (read_graph_file): Read PWD string.
12122 (output_lines): Print PWD.
12124 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12126 PR middle-end/85817
12127 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12128 for retval and return false if all args to phi are zero.
12130 2018-05-18 Richard Biener <rguenther@suse.de>
12132 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12134 (evrp_dom_walker::before_dom_children): Call it.
12136 2018-05-18 Richard Biener <rguenther@suse.de>
12138 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12139 results when processing array refs with variable index.
12141 2018-05-18 Toon Moene <toon@moene.org>
12143 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12144 directly after that of -floop-interchange. Indicate that both
12145 options are enabled by default when specifying -O3.
12147 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12149 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12150 iterator. Delete separate integer-mode vec_set<mode> expander.
12151 (aarch64_simd_vec_setv2di): Delete.
12152 (vec_setv2di): Delete.
12153 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12154 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12155 the "w, r" alternative.
12157 2018-05-18 Martin Liska <mliska@suse.cz>
12159 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12160 * tree-pass.h (make_pass_lower_switch_O0): New function.
12161 * tree-switch-conversion.c (node_has_low_bound): Remove.
12162 (node_has_high_bound): Likewise.
12163 (node_is_bounded): Likewise.
12164 (class pass_lower_switch): Make it a template type and create
12166 (pass_lower_switch::execute): Add template argument.
12167 (make_pass_lower_switch): New function.
12168 (make_pass_lower_switch_O0): New function.
12169 (do_jump_if_equal): Remove.
12170 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12171 all the hard work to tree optimization passes.
12173 2018-05-18 Martin Liska <mliska@suse.cz>
12175 * dbgcnt.c (limit_low): Renamed from limit.
12176 (limit_high): New variable.
12177 (dbg_cnt_is_enabled): Check for upper limit.
12178 (dbg_cnt): Adjust dumping.
12179 (dbg_cnt_set_limit_by_index): Add new argument for high
12181 (dbg_cnt_set_limit_by_name): Likewise.
12182 (dbg_cnt_process_single_pair): Parse new format.
12183 (dbg_cnt_process_opt): Use strtok.
12184 (dbg_cnt_list_all_counters): Remove 'value' and add
12186 * doc/invoke.texi: Document changes.
12188 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12190 * doc/sourcebuild.texi (scalar_all_fma): Document.
12191 * tree.def (FMA_EXPR): Delete.
12192 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12193 * internal-fn.c (ternary_direct): New macro.
12194 (expand_ternary_optab_fn): Likewise.
12195 (direct_ternary_optab_supported_p): Likewise.
12196 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12197 * builtins.c (fold_builtin_fma): Delete.
12198 (fold_builtin_3): Don't call it.
12199 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12200 * expr.c (expand_expr_real_2): Likewise.
12201 * fold-const.c (operand_equal_p): Likewise.
12202 (fold_ternary_loc): Likewise.
12203 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12204 * gimple.c (DEFTREECODE): Likewise.
12205 * gimplify.c (gimplify_expr): Likewise.
12206 * optabs-tree.c (optab_for_tree_code): Likewise.
12207 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12208 * tree-eh.c (operation_could_trap_p): Likewise.
12209 (stmt_could_throw_1_p): Likewise.
12210 * tree-inline.c (estimate_operator_cost): Likewise.
12211 * tree-pretty-print.c (dump_generic_node): Likewise.
12212 (op_code_prio): Likewise.
12213 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12214 * tree-ssa-operands.c (get_expr_operands): Likewise.
12215 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12216 * fold-const-call.h (fold_fma): Delete.
12217 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12218 CFN_FNMA and CFN_FNMS.
12219 (fold_fma): Delete.
12220 * genmatch.c (combined_fn): New enum.
12221 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12222 (commutative_op): New function.
12223 (commutate): Use it. Handle more than 2 operands.
12224 (dt_operand::gen_gimple_expr): Use commutative_op.
12225 (parser::parse_expr): Allow :c to be used with non-binary
12226 operators if the commutative operand is known.
12227 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12228 CFN_FMS, CFN_FNMA and CFN_FNMS.
12229 (backprop::process_assign_use): Remove FMA_EXPR handling.
12230 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12231 (gen_hsa_fma): New function.
12232 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12233 IFN_FNMA and IFN_FNMS.
12234 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12235 * gimple-fold.h (follow_all_ssa_edges): Declare.
12236 * gimple-fold.c (follow_all_ssa_edges): New function.
12237 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12238 gimple_build interface and use follow_all_ssa_edges to fold the result.
12239 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12240 instead of checking for optabs directly.
12241 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12242 rather than FMA_EXPRs.
12243 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12244 call to IFN_FMA instead of an FMA_EXPR.
12246 2018-05-17 Jim Wilson <jimw@sifive.com>
12248 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12249 sign extended promoted subreg, and the range does not have the sign bit
12250 set, then do a sign extend.
12252 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12253 test, check for sign extended subreg and/or constant operands, and
12254 do a sign extend in that case.
12256 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12258 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12259 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12261 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12262 Change logics_shift_reg to logics_shift_imm.
12263 (thunderx2t99_fp_loadpair_basic): Delete.
12264 (thunderx2t99_fp_storepair_basic): Delete.
12265 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12266 (thunderx2t99_asimd_polynomial): Delete.
12267 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12268 and neon_fp_mul_d_scalar_q.
12269 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12270 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12271 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12272 (thunderx2t99_asimd_lut): Add missing tbl types.
12273 (thunderx2t99_asimd_ext): Delete.
12274 (thunderx2t99_asimd_load1_1_mult): Delete.
12275 (thunderx2t99_asimd_load1_2_mult): Delete.
12276 (thunderx2t99_asimd_load1_ldp): New.
12277 (thunderx2t99_asimd_load1): New.
12278 (thunderx2t99_asimd_load2): Add missing *load2* types.
12279 (thunderx2t99_asimd_load3): New.
12280 (thunderx2t99_asimd_load4): New.
12281 (thunderx2t99_asimd_store1_1_mult): Delete.
12282 (thunderx2t99_asimd_store1_2_mult): Delete.
12283 (thunderx2t99_asimd_store2_mult): Delete.
12284 (thunderx2t99_asimd_store2_onelane): Delete.
12285 (thunderx2t99_asimd_store_stp): New.
12286 (thunderx2t99_asimd_store1): New.
12287 (thunderx2t99_asimd_store2): New.
12288 (thunderx2t99_asimd_store3): New.
12289 (thunderx2t99_asimd_store4): New.
12291 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12293 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12294 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12296 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12297 Segher Boessenkool <segher@kernel.crashing.org>
12300 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12303 2018-05-17 Richard Biener <rguenther@suse.de>
12305 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12306 for pruning loop and prune defs feeding only already visited PHIs.
12308 2018-05-17 Richard Biener <rguenther@suse.de>
12310 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12312 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12313 Richard Biener <rguenther@suse.de>
12315 PR tree-optimization/85793
12316 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12317 for VMAT_ELEMENTWISE.
12319 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12321 * internal-fn.h (lookup_internal_fn): Declare
12322 * internal-fn.c (lookup_internal_fn): New function.
12323 * gimple.c (gimple_build_call_from_tree): Handle calls to
12324 internal functions.
12325 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12326 internal function names.
12327 * tree-pretty-print.c (dump_generic_node): Likewise.
12328 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12330 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12332 * gimple-fold.h (gimple_build): Make the function forms take
12333 combined_fn rather than built_in_function.
12334 (gimple_simplify): Likewise.
12335 * gimple-match-head.c (gimple_simplify): Likewise.
12336 * gimple-fold.c (gimple_build): Likewise.
12337 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12338 rather than gimple_build_call_internal.
12339 (get_initial_defs_for_reduction): Likewise.
12340 (vect_create_epilog_for_reduction): Likewise.
12341 (vectorizable_live_operation): Likewise.
12343 2018-05-17 Martin Liska <mliska@suse.cz>
12345 * gimple-ssa-sprintf.c (format_directive): Do not use
12346 space in between 'G_' and '('.
12348 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12351 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12352 even if the mask is not all ones.
12355 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12357 (ix86_gimple_fold_builtin): Likewise.
12360 * config/i386/i386.c: Include tree-vector-builder.h.
12361 (ix86_vector_shift_count): New function.
12362 (ix86_fold_builtin): Fold shift builtins by scalar count.
12363 (ix86_gimple_fold_builtin): Likewise.
12365 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12366 _mm512_setzero): New intrinsics.
12368 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12369 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12371 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12372 code generation for cases where splatting a value is not useful.
12373 * simplify-rtx.c (simplify_ternary_operation): Simplify
12374 vec_merge across a vec_duplicate and a paradoxical subreg forming
12375 a vector mode to a vec_concat.
12377 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12379 * config.gcc: Support "goldmont-plus".
12380 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12382 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12383 PROCESSOR_GOLDMONT_PLUS.
12384 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12385 (processor_target_table): Add "goldmont-plus".
12386 (PTA_GOLDMONT_PLUS): Define.
12387 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12388 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12389 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12390 (fold_builtin_cpu): Add "goldmont-plus".
12391 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12392 (ix86_option_override_internal): Add "goldmont-plus".
12393 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12394 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12395 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12396 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12398 2018-05-17 Richard Biener <rguenther@suse.de>
12400 PR tree-optimization/85757
12401 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12402 remove defs that only feed that PHI from further processing.
12404 2018-05-16 Jim Wilson <jimw@sifive.com>
12406 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12408 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12410 2018-05-16 Mark Wielaard <mark@klomp.org>
12412 * dwarf2out.c (count_index_strings): New function.
12413 (output_indirect_strings): Call count_index_strings and generate
12414 header for dwarf_version >= 5.
12416 2018-05-16 Mark Wielaard <mark@klomp.org>
12418 * dwarf2out.c (dwarf_FORM): New function.
12419 (set_indirect_string): Use dwarf_FORM.
12420 (reset_indirect_string): Likewise.
12421 (size_of_die): Likewise.
12422 (value_format): Likewise.
12423 (output_die): Likewise.
12424 (add_skeleton_AT_string): Likewise.
12425 (output_macinfo_op): Likewise.
12426 (index_string): Likewise.
12427 (output_index_string_offset): Likewise.
12428 (output_index_string): Likewise.
12429 (count_index_strings): Likewise.
12431 2018-05-16 Carl Love <cel@us.ibm.com>
12433 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12434 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12436 2018-05-16 Martin Jambor <mjambor@suse.cz>
12438 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12439 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12441 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12443 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12444 (fnma<mode>4): Likewise.
12445 (fms<mode>4): Likewise.
12446 (fnms<mode>4): Likewise.
12447 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12448 (aarch64_fnma<mode>4): Likewise.
12449 (aarch64_fms<mode>4): Likewise.
12450 (aarch64_fnms<mode>4): Likewise.
12451 (aarch64_fnmadd<mode>4): Likewise.
12453 2018-05-16 Jason Merrill <jason@redhat.com>
12455 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12457 2018-05-16 Richard Biener <rguenther@suse.de>
12459 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12460 (dump_stmt_cost): Declare.
12461 (add_stmt_cost): Dump cost we add.
12462 (add_stmt_costs): New function.
12463 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12464 No longer exported.
12465 (vect_analyze_stmt): Adjust prototype.
12466 (vectorizable_condition): Likewise.
12467 (vectorizable_live_operation): Likewise.
12468 (vectorizable_reduction): Likewise.
12469 (vectorizable_induction): Likewise.
12470 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12471 cost vector to pass to vectorizable_ and record afterwards.
12472 (vect_model_reduction_cost): Take cost vector argument and adjust.
12473 (vect_model_induction_cost): Likewise.
12474 (vectorizable_reduction): Likewise.
12475 (vectorizable_induction): Likewise.
12476 (vectorizable_live_operation): Likewise.
12477 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12478 SLP_TREE_NUMBER_OF_VEC_STMTS.
12479 (vect_analyze_slp_cost_1): Remove.
12480 (vect_analyze_slp_cost): Likewise.
12481 (vect_slp_analyze_node_operations): Take visited args and
12482 a target cost vector. Avoid processing already visited stmt sets.
12483 (vect_slp_analyze_operations): Use a local cost vector to gather
12484 costs and register those of non-discarded instances.
12485 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12486 (vect_schedule_slp_instance): Remove copying of
12487 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12489 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12490 adding cost. Record cost entry location.
12491 (vect_prologue_cost_for_slp_op): Function to compute cost of
12492 a constant or invariant generated for SLP vect in the prologue,
12493 split out from vect_analyze_slp_cost_1.
12494 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12495 (vect_model_promotion_demotion_cost): Likewise.
12496 (vect_model_store_cost): Likewise, make static.
12497 (vect_model_load_cost): Likewise.
12498 (vectorizable_bswap): Add cost vector arg and adjust.
12499 (vectorizable_call): Likewise.
12500 (vectorizable_simd_clone_call): Likewise.
12501 (vectorizable_conversion): Likewise.
12502 (vectorizable_assignment): Likewise.
12503 (vectorizable_shift): Likewise.
12504 (vectorizable_operation): Likewise.
12505 (vectorizable_store): Likewise.
12506 (vectorizable_load): Likewise.
12507 (vectorizable_condition): Likewise.
12508 (vectorizable_comparison): Likewise.
12509 (can_vectorize_live_stmts): Likewise.
12510 (vect_analyze_stmt): Likewise.
12511 (vect_transform_stmt): Adjust calls to vectorizable_*.
12512 * tree-vectorizer.c: Include gimple-pretty-print.h.
12513 (dump_stmt_cost): New function.
12515 2018-05-16 Richard Biener <rguenther@suse.de>
12517 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12518 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12519 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12520 (check_name): New callback.
12521 (dse_classify_store): Track cycles via a visited bitmap of PHI
12522 defs and simplify handling of in-loop and across loop dead stores
12523 and properly fail for loop-variant refs. Handle byte-tracking with
12524 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12527 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12529 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12530 (vect_get_mask_type_for_stmt): Likewise.
12531 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12533 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12534 to determine the statement's vector type and the vector type that
12535 should be used for calculating nunits. Deal with cases in which
12536 the type has to be deferred.
12537 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12538 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12539 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12540 (vect_determine_vf_for_stmt): New functions, split out from...
12541 (vect_determine_vectorization_factor): ...here.
12542 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12543 (vect_get_mask_type_for_stmt): New functions, split out from
12544 vect_determine_vectorization_factor.
12546 2018-05-16 Richard Biener <rguenther@suse.de>
12548 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12549 verify the [VEC_]COND_EXPR embedded comparison.
12551 2018-05-15 Martin Sebor <msebor@redhat.com>
12553 PR tree-optimization/85753
12554 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12555 RECORD_TYPE in addition to ARRAY_TYPE.
12557 2018-05-15 Martin Sebor <msebor@redhat.com>
12559 PR middle-end/85643
12560 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12562 2018-05-15 Richard Biener <rguenther@suse.de>
12564 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12565 add by_clobber_p one. Change algorithm to collect all defs
12566 representing uses we need to walk and try reducing them to
12567 a single one before failing.
12568 (dse_dom_walker::dse_optimize_stmt): Adjust.
12570 2018-05-13 Mark Wielaard <mark@klomp.org>
12572 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12573 (size_of_loc_descr): Likewise.
12574 (output_loc_operands): Likewise.
12575 (output_loc_operands_raw): Likewise.
12576 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12577 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12578 (hash_loc_operands): Likewise.
12579 (compare_loc_operands): Likewise.
12581 2018-05-14 Mark Wielaard <mark@klomp.org>
12583 * dwarf2out.c (count_index_addrs): New function.
12584 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12586 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12588 PR tree-optimization/83648
12589 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12590 return value as malloc candidate.
12592 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12595 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12596 param as true in call to suggest_attribute.
12598 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12600 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12601 -mreadonly-in-sdata.
12603 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12605 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12607 (aarch64_crypto_aesd_fused): Likewise.
12609 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12611 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12612 (movsi_aarch64): Likewise.
12613 (load_pairsi): Likewise.
12614 (load_pairdi): Likewise.
12615 (store_pairsi): Likewise.
12616 (store_pairdi): Likewise.
12617 (load_pairsf): Likewise.
12618 (load_pairdf): Likewise.
12619 (store_pairsf): Likewise.
12620 (store_pairdf): Likewise.
12621 (zero_extend): Likewise.
12622 (trunc): Swap alternatives.
12623 (fcvt_target): Add '?' to prefer w over r.
12625 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12628 * config/i386/i386.md: Disallow non-commutative arithmetics in
12629 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12630 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12631 in the peephole2 before it.
12633 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12635 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12636 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12637 (ix86_handle_option): Handle -mcldemote.
12638 * config.gcc: New header.
12639 * config/i386/cldemoteintrin.h: New file.
12640 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12641 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12643 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12644 OPTION_MASK_ISA_CLDEMOTE.
12645 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12646 (ix86_valid_target_attribute_inner_p): Ditto.
12647 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12648 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12649 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12650 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12651 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12653 * config/i386/i386.opt: Add -mcldemote.
12654 * config/i386/x86intrin.h: New header.
12655 * doc/invoke.texi: Add -mcldemote.
12657 2018-05-14 Richard Biener <rguenther@suse.de>
12659 * doc/match-and-simplify.texi: Adjust :s documentation.
12661 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12663 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12664 intended memcpy size.
12665 (REORDER_45): Likewise.
12667 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12669 * sort.cc: New file.
12670 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12671 * vec.c (qsort_chk): Use gcc_qsort.
12672 * Makefile.in (OBJS-libcommon): Add sort.o.
12673 (build/sort.o): New target. Use it...
12674 (BUILD_RTL): ... here, and...
12675 (build/gencfn-macros): ... here, and...
12676 (build/genmatch): ... here.
12678 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12679 Chung-Ju Wu <jasonwucj@gmail.com>
12681 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12682 * config/nds32/nds32-graywolf.md: New file.
12683 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12684 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12686 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12687 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12688 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12689 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12690 * config/nds32/pipelines.md: Include n15 settings.
12692 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12693 Chung-Ju Wu <jasonwucj@gmail.com>
12695 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12696 * config/nds32/nds32-n13.md: New file.
12697 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12698 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12700 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12701 * config/nds32/nds32.md (pipeline_model): Add n13.
12702 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12703 * config/nds32/pipelines.md: Include n13 settings.
12705 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12706 Chung-Ju Wu <jasonwucj@gmail.com>
12708 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12709 * config/nds32/nds32-n10.md: New file.
12710 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12711 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12713 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12714 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12715 * config/nds32/nds32.md (pipeline_model): Add n10.
12716 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12717 * config/nds32/pipelines.md: Include n10 settings.
12719 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12720 Kito Cheng <kito.cheng@gmail.com>
12721 Chung-Ju Wu <jasonwucj@gmail.com>
12723 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12724 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12725 Add enum values for DSP extension instructions.
12726 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12728 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12729 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12730 New code iterators.
12731 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12732 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12733 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12734 * config/nds32/nds32-intrinsic.md: Likewise.
12735 * config/nds32/nds32_intrinsic.h: Likewise.
12736 * config/nds32/nds32-md-auxiliary.c: Likewise.
12737 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12738 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12739 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12740 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12741 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12742 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12743 TYPE_DMAC in switch statement.
12744 * config/nds32/nds32.c: New checking and implementation for DSP
12745 extension instructions.
12746 * config/nds32/nds32.h: Likewise.
12747 * config/nds32/nds32.md: Likewise.
12748 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12749 * config/nds32/predicates.md: Implement new predicates for DSP
12752 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12754 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12755 Reformat alternatives and attributes so it is easier to identify
12756 which constraints/attributes go with which instruction.
12757 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12758 (mov<mode>_softfloat32, FMOVE64): Likewise.
12759 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12760 (mov<mode>_softfloat64, FMOVE64): Likewise.
12762 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12764 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12766 (Basic PowerPC Built-in Functions): The new name of the
12767 subsection previously known as "PowerPC Built-in Functions".
12768 (Basic PowerPC Built-in Functions Available on all Configurations):
12770 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12771 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12772 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12773 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12775 2018-05-11 Martin Jambor <mjambor@suse.cz>
12778 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12781 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12784 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12786 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12788 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12789 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12790 (ix86_handle_option): Handle -mwaitpkg.
12791 * config.gcc: New header.
12792 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12793 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12794 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12796 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12797 OPTION_MASK_ISA_WAITPKG.
12798 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12799 (ix86_option_override_internal): Add PTA_WAITPKG.
12800 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12801 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12802 IX86_BUILTIN_TPAUSE.
12803 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12804 __builtin_ia32_umwait and __builtin_ia32_tpause.
12805 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12806 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12807 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12808 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12809 UNSPECV_TPAUSE): New.
12810 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12811 * config/i386/i386.opt: Add -mwaitpkg.
12812 * config/i386/waitpkgintrin.h: New file.
12813 * config/i386/x86intrin.h: New header.
12814 * doc/invoke.texi: Add -mwaitpkg.
12816 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12819 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12821 (cortex-m0): Use armv6s-m isa.
12822 (cortex-m0plus): Likewise.
12823 (cortex-m1): Likewise.
12824 (cortex-m0.small-multiply): Likewise.
12825 (cortex-m0plus.small-multiply): Likewise.
12826 (cortex-m1.small-multiply): Likewise.
12828 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12829 Jakub Jelinek <jakub@redhat.com>
12831 PR tree-optimization/85692
12832 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12833 source permute as well.
12835 2018-05-11 Martin Liska <mliska@suse.cz>
12838 * doc/extend.texi: Document LLVM style format for no_sanitize
12841 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12843 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12844 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12845 (mode_supports_vsx_dform_quad): Likewise.
12846 (mode_supports_vmx_dform): Move these functions to be next to the
12847 other mode_supports functions.
12848 (mode_supports_dq_form): Likewise.
12849 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12850 mode_supports_dq_form.
12851 (reg_offset_addressing_ok_p): Likewise.
12852 (offsettable_ok_by_alignment): Likewise.
12853 (rs6000_legitimate_offset_address_p): Likewise.
12854 (legitimate_lo_sum_address_p): Likewise.
12855 (rs6000_legitimize_address): Likewise.
12856 (rs6000_legitimize_reload_address): Likewise.
12857 (rs6000_secondary_reload_inner): Likewise.
12858 (rs6000_preferred_reload_class): Likewise.
12859 (rs6000_output_move_128bit): Likewise.
12861 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12863 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12864 Generate SImode target register for null target.
12865 <case IX86_BUILTIN_XGETBV>: Ditto.
12866 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12867 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12869 2018-05-10 Carl Love <cel@us.ibm.com>
12871 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12872 dcbtt and dcbtstt if operands[2] is 0.
12874 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12877 * config/i386/sse.md (usadv64qi): New expander.
12879 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12881 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12882 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12883 -maltivec=be support.
12884 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12885 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12886 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12887 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12888 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12889 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12890 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12891 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12892 altivec_vsumsws): Adjust.
12893 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12894 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12895 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12897 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12898 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12899 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12900 (altivec_lve<VI_char>x): Delete expand.
12901 (*altivec_lve<VI_char>x_internal): Rename to...
12902 (altivec_lve<VI_char>x): ... this.
12903 (altivec_lvxl_<mode>): Delete expand.
12904 (*altivec_lvxl_<mode>_internal): Rename to ...
12905 (altivec_lvxl_<mode>): ... this.
12906 (altivec_stvxl_<mode>): Delete expand.
12907 (*altivec_stvxl_<mode>_internal): Rename to ...
12908 (altivec_stvxl_<mode>): ... this.
12909 (altivec_stve<VI_char>x): Delete expand.
12910 (*altivec_stve<VI_char>x_internal): Rename to ...
12911 (altivec_stve<VI_char>x): ... this.
12912 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12913 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12914 reduc_plus_scal_<mode>): Adjust.
12915 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12917 (rs6000_cpu_cpp_builtins): Adjust.
12918 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12919 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12920 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12921 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12922 -maltivec=be support.
12923 (rs6000_split_vec_extract_var): Adjust.
12924 (rs6000_split_v4si_init): Adjust.
12925 (swap_selector_for_mode): Delete.
12926 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12927 altivec_expand_stvex_be): Delete.
12928 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12929 -maltivec=be support.
12930 (rs6000_gimple_fold_builtin): Ditto.
12931 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12933 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12934 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12935 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12936 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12937 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12938 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12939 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12940 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12941 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12942 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12943 anonymous split): Adjust.
12944 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12945 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12947 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12949 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12950 when --with-gxx-include-dir is also specified.
12951 * configure: Regenerate.
12953 2018-05-09 Jim Wilson <jimw@sifive.com>
12956 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12957 * config/riscv/t-withmultilib: New.
12958 * config/riscv/withmultilib.h: New.
12959 * doc/install.texi: Document RISC-V --with-multilib-list support.
12961 2018-05-09 Richard Biener <rguenther@suse.de>
12963 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12965 (vect_bb_vectorization_profitable_p): Adjust. Compute
12966 actual scalar cost using the cost vector and the add_stmt_cost
12969 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12971 PR rtl-optimization/85645
12972 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12973 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12975 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12977 PR rtl-optimization/85645
12978 * shrink-wrap.c (spread_components): Return a boolean saying if
12979 anything was changed.
12980 (try_shrink_wrapping_separate): Iterate spread_components until
12981 nothing changes anymore.
12983 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12985 PR rtl-optimization/85645
12986 * regrename.c (build_def_use): Also kill the chains that include the
12987 destination of a REG_CFA_REGISTER note.
12989 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12991 PR rtl-optimization/85645
12992 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12993 insn that has a REG_CFA_REGISTER note.
12995 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12997 * cfgexpand.c (expand_clobber): New function.
12998 (expand_gimple_stmt_1): Use it.
12999 * tree-vect-stmts.c (vect_clobber_variable): New function,
13001 (vectorizable_simd_clone_call): ...here.
13002 (vectorizable_store): Emit a clobber either side of an
13003 IFN_STORE_LANES sequence.
13004 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13006 2018-05-09 Tom de Vries <tom@codesourcery.com>
13009 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13010 (define_insn "trap_if_false"): Add exit after trap.
13012 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13014 PR rtl-optimization/85638
13015 * bb-reorder.c: Include common/common-target.h.
13016 (create_forwarder_block): New function extracted from...
13017 (fix_up_crossing_landing_pad): ...here. Rename into...
13018 (dw2_fix_up_crossing_landing_pad): ...this.
13019 (sjlj_fix_up_crossing_landing_pad): New function.
13020 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13021 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13022 from both partitions and exit the loop after one iteration.
13024 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13027 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13029 (Basic PowerPC Built-in Functions): The new name of the
13030 subsection previously known as "PowerPC Built-in Functions".
13031 (Basic PowerPC Built-in Functions Available on all Configurations):
13033 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13035 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13037 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13039 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13042 2018-05-08 Jim Wilson <jimw@sifive.com>
13044 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13045 (LD_EMUL_SUFFIX): New.
13046 (LINK_SPEC): Use it.
13048 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13050 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13052 (Basic PowerPC Built-in Functions): The new name of the
13053 subsection previously known as "PowerPC Built-in Functions".
13054 (Basic PowerPC Built-in Functions Available on all Configurations):
13056 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13058 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13060 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13062 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13065 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13068 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13069 after cmpelim optimization.
13071 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13073 * config.gcc: Support "goldmont".
13074 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13075 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13076 PROCESSOR_GOLDMONT.
13077 * config/i386/i386.c (m_GOLDMONT): Define.
13078 (processor_target_table): Add "goldmont".
13079 (PTA_GOLDMONT): Define.
13080 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13081 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13082 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13083 (fold_builtin_cpu): Add "goldmont".
13084 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13085 (ix86_option_override_internal): Add "goldmont".
13086 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13087 (processor_type): Add PROCESSOR_GOLDMONT.
13088 * config/i386/i386.md: Add CPU "glm".
13089 * config/i386/glm.md: New file.
13090 * config/i386/x86-tune.def: Add m_GOLDMONT.
13091 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13093 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13096 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13098 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13099 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13100 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13103 * config/i386/i386.c (ix86_fold_builtin): Handle
13104 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13107 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13108 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13110 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13113 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13114 (check_arch): Likewise.
13115 (check_fpu): Return the result rather than printing it.
13116 (end arch): Fix operator precedence.
13117 (end cpu): Likewise.
13118 (END): Print the result from check_fpu.
13120 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13121 Alan Hayward <alan.hayward@arm.com>
13122 David Sherwood <david.sherwood@arm.com>
13124 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13125 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13126 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13127 (*fcmuo<mode>_and): New patterns.
13129 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13131 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13132 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13133 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13134 (cmp_op, sve_imm_con): New code attributes.
13135 (SVE_COND_INT_CMP, imm_con): Delete.
13136 (cmp_op): Remove above unspecs from int attribute.
13137 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13139 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13140 comparison-specific unspecs.
13141 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13142 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13143 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13144 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13145 (*vec_fcm<cmp_op><mode>): Rename to...
13146 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13147 (*vec_fcmuo<mode>): Rename to...
13148 (*fcmuo<mode>): ...this and adjust likewise.
13149 (*pred_fcm<cmp_op><mode>): New pattern.
13150 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13151 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13153 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13155 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13156 (aarch64_emit_sve_predicated_cond): New function.
13157 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13158 (aarch64_emit_unspec_cond_or): Replace with...
13159 (aarch64_emit_sve_or_conds): ...this new function. Use
13160 aarch64_emit_sve_ptrue_op for the individual comparisons and
13161 aarch64_emit_binop to OR them together.
13162 (aarch64_emit_inverted_unspec_cond): Replace with...
13163 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13164 aarch64_emit_sve_ptrue_op for the comparison and
13165 aarch64_emit_unop to invert the result.
13166 (aarch64_expand_sve_vec_cmp_float): Update after the above
13167 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13169 2018-05-07 Nathan Sidwell <nathan@acm.org>
13171 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13172 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13173 (Backwards Compatibility): Likewise.
13175 2018-05-07 Luis Machado <luis.machado@linaro.org>
13179 2018-05-07 Luis Machado <luis.machado@linaro.org>
13181 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13182 <prefetch_dynamic_strides>: New const bool field.
13183 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13184 prefetch_dynamic_strides.
13185 (exynosm1_prefetch_tune): Likewise.
13186 (thunderxt88_prefetch_tune): Likewise.
13187 (thunderx_prefetch_tune): Likewise.
13188 (thunderx2t99_prefetch_tune): Likewise.
13189 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13191 (aarch64_override_options_internal): Update to set
13192 PARAM_PREFETCH_DYNAMIC_STRIDES.
13193 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13194 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13195 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13196 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13197 prefetch-dynamic-strides setting.
13199 2018-05-07 Luis Machado <luis.machado@linaro.org>
13201 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13202 <minimum_stride>: New const int field.
13203 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13204 minimum_stride field.
13205 (exynosm1_prefetch_tune): Likewise.
13206 (thunderxt88_prefetch_tune): Likewise.
13207 (thunderx_prefetch_tune): Likewise.
13208 (thunderx2t99_prefetch_tune): Likewise.
13209 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13210 (aarch64_override_options_internal): Update to set
13211 PARAM_PREFETCH_MINIMUM_STRIDE.
13212 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13213 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13214 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13215 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13216 stride is constant and is below the minimum stride threshold.
13218 2018-05-07 Luis Machado <luis.machado@linaro.org>
13220 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
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-06 Jakub Jelinek <jakub@redhat.com>
13265 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13266 the type is addressable. Don't force op into register if it has
13269 2018-05-05 Roland McGrath <mcgrathr@google.com>
13272 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13273 any section for which we don't know a specific type it should have,
13274 regardless of name. Previously this was done only for the exact
13275 names ".init_array", ".fini_array", and ".preinit_array".
13276 (default_elf_asm_named_section): Add comment about
13277 relationship with default_section_type_flags and SECTION_NOTYPE.
13278 (get_section): Don't consider it a type conflict if one side has
13279 SECTION_NOTYPE and the other doesn't, as long as neither has the
13280 SECTION_BSS et al used in the default_section_type_flags logic.
13282 2018-05-05 Tom de Vries <tom@codesourcery.com>
13285 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13286 (workaround_barsyncs): New function.
13287 (nvptx_reorg): Use workaround_barsyncs.
13288 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13289 (define_expand "nvptx_membar_cta"): New define_expand.
13290 (define_insn "*nvptx_membar_cta"): New insn.
13292 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13294 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13295 To improve optimization opportunities.
13296 * builtin-types.def: The new needed builtin types for the above.
13298 2018-05-04 Richard Biener <rguenther@suse.de>
13300 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13301 * gimple-ssa-store-merging.c
13302 (imm_store_chain_info::output_merged_store): Remove redundant create,
13303 release split_store vector contents on failure.
13304 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13305 scalar stmt vector on cache hit.
13307 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13309 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13311 * config.gcc (powerpc-xilinx-eabi*): Remove.
13312 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13314 (fusion_addis_mem_combo_load): Ditto.
13315 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13317 (rs6000_cpu_cpp_builtins): Ditto.
13318 * config/rs6000/rs6000-linux.c
13319 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13320 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13321 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13323 (rs6000_setup_reg_addr_masks): Ditto.
13324 (rs6000_init_hard_regno_mode_ok): Ditto.
13325 (rs6000_option_override_internal): Ditto.
13326 (legitimate_lo_sum_address_p): Ditto.
13327 (rs6000_legitimize_address): Ditto.
13328 (rs6000_legitimize_reload_address): Ditto.
13329 (rs6000_legitimate_address_p): Ditto.
13330 (abi_v4_pass_in_fpr): Ditto.
13331 (setup_incoming_varargs): Ditto.
13332 (rs6000_gimplify_va_arg): Ditto.
13333 (rs6000_split_multireg_move): Ditto.
13334 (rs6000_savres_strategy): Ditto.
13335 (rs6000_emit_prologue_components): Ditto.
13336 (rs6000_emit_epilogue_components): Ditto.
13337 (rs6000_emit_prologue): Ditto.
13338 (rs6000_emit_epilogue): Ditto.
13339 (rs6000_elf_file_end): Ditto.
13340 (rs6000_function_value): Ditto.
13341 (rs6000_libcall_value): Ditto.
13342 * config/rs6000/rs6000.h: Ditto.
13343 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13344 (TARGET_MINMAX): ... this. New.
13345 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13346 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13347 (*movsi_internal1_single): Delete.
13348 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13349 mfpu=, mxilinx-fpu): Delete.
13350 * config/rs6000/singlefp.h: Delete.
13351 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13352 * config/rs6000/t-rs6000: Ditto.
13353 * config/rs6000/t-xilinx: Delete.
13354 * config/rs6000/titan.md: Adjust for fp_type removal.
13355 * config/rs6000/vsx.md: Remove Xilinx FP support.
13356 (VStype_simple): Delete.
13357 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13358 * config/rs6000/xfpu.h: Delete.
13359 * config/rs6000/xfpu.md: Delete.
13360 * config/rs6000/xilinx.h: Delete.
13361 * config/rs6000/xilinx.opt: Delete.
13362 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13363 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13365 2018-05-04 Tom de Vries <tom@codesourcery.com>
13368 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13371 2018-05-04 Richard Biener <rguenther@suse.de>
13373 PR middle-end/85627
13374 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13375 (expand_complex_div_wide): Likewise.
13376 (expand_complex_operations_1): Likewise.
13377 (expand_complex_libcall): Preserve EH info of the original stmt.
13378 (tree_lower_complex): Handle removed blocks.
13379 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13380 on complex multiplication and division libcall builtins.
13382 2018-05-04 Richard Biener <rguenther@suse.de>
13384 PR middle-end/85574
13385 * fold-const.c (negate_expr_p): Restrict negation of operand
13386 zero of a division to when we know that can happen without
13388 (fold_negate_expr_1): Likewise.
13390 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13393 * real.h (real_nextafter): Declare.
13394 * real.c (real_nextafter): New function.
13395 * fold-const-call.c (fold_const_nextafter): New function.
13396 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13397 CASE_CFN_NEXTTOWARD.
13398 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13399 even when arg1_mode is different from arg0_mode.
13401 2018-05-03 Nathan Sidwell <nathan@acm.org>
13403 * doc/extend.texi (Deprecated Features): Remove
13404 -ffriend-injection.
13405 (Backwards Compatibility): Likewise.
13406 * doc/invoke.texi (C++ Language Options): Likewise.
13407 (C++ Dialect Options): Likewise.
13409 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13412 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13413 _mm512_mask_mullox_epi64): New intrinsics.
13415 2018-05-03 Tom de Vries <tom@codesourcery.com>
13418 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13419 dump files): Add offload-tree.
13421 2018-05-03 Richard Biener <rguenther@suse.de>
13423 PR tree-optimization/85615
13424 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13425 to loops not nested in BBs loop father to avoid creating multi-entry
13428 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13430 PR tree-optimization/70291
13431 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13432 arguments. Change return type to tree. Emit libcall as a new
13433 statement rather than replacing existing one when inplace_p is true.
13434 (expand_complex_multiplication_components): New function.
13435 (expand_complex_multiplication): Expand floating-point complex
13436 multiplication using the above.
13437 (expand_complex_division): Rename inner_type parameter to type.
13438 Update expand_complex_libcall call-site.
13439 (expand_complex_operations_1): Update expand_complex_multiplication
13440 and expand_complex_division call-sites.
13442 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13445 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13446 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13447 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13448 the highest significant bit of the shift count mask is clear. In
13449 check whether and[sq]i3 is needed verify that all significant bits
13450 of the shift count other than the highest are set.
13452 2018-05-02 Tom de Vries <tom@codesourcery.com>
13455 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13456 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13457 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13458 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13459 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13460 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13461 __builtin_goacc_parlevel_size.
13463 2018-05-02 Richard Biener <rguenther@suse.de>
13465 PR tree-optimization/85597
13466 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13467 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13470 2018-05-02 Tom de Vries <tom@codesourcery.com>
13473 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13474 dump files): Add ltrans-tree.
13476 2018-05-02 Tom de Vries <tom@codesourcery.com>
13479 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13480 dump files): Add wpa-ipa.
13482 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13484 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13485 powerpc*-*-linux*paired* target.
13486 * config/rs6000/750cl.h: Delete.
13487 * config/rs6000/paired.h: Delete.
13488 * config/rs6000/paired.md: Delete.
13489 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13491 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13492 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13493 comment. Remove paired float support.
13494 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13495 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13497 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13498 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13500 * config/rs6000/rs6000.c: Remove paired float support.
13501 (paired_expand_vector_init, paired_expand_vector_move,
13502 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13503 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13504 paired_expand_builtin, paired_expand_predicate_builtin,
13505 paired_init_builtins): Delete.
13506 * config/rs6000/rs6000.h: Remove paired float support.
13507 * config/rs6000/rs6000.md: Remove paired float support.
13508 (move_from_CR_ov_bit): Delete.
13509 * config/rs6000/rs6000.opt (mpaired): Delete.
13510 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13511 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13513 2018-05-02 Richard Biener <rguenther@suse.de>
13515 PR middle-end/85567
13516 * gimplify.c (gimplify_save_expr): When in SSA form allow
13517 SAVE_EXPRs to compute to SSA vars.
13519 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13522 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13523 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13524 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13525 clobber operands[2], instead use a new pseudo. Formatting fixes.
13527 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13529 PR tree-optimization/85586
13530 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13531 exit early for statements in the same group if the accesses are
13534 2018-05-02 Tom de Vries <tom@codesourcery.com>
13537 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13540 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13542 PR tree-optimization/85143
13543 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13545 2018-05-01 Tom de Vries <tom@codesourcery.com>
13548 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13549 not found" error message.
13551 2018-05-01 Tom de Vries <tom@codesourcery.com>
13554 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13555 * vec.c (test_ordered_remove_if): New function.
13556 (vec_c_tests): Call test_ordered_remove_if.
13557 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13558 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13559 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13560 VEC_ORDERED_REMOVE_IF.
13562 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13564 PR tree-optimization/82665
13565 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13566 pointer subtraction where arguments come from a memchr call.
13568 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13570 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13571 --push-state --as-needed and --pop-state instead of --as-needed and
13572 --no-as-needed if ld supports it.
13573 * configure: Regenerated.
13576 * doc/install.texi2html: Replace _002d with - and _002a with * in
13577 generated html files using sed.
13579 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13582 * gcc-rich-location.c (blank_line_before_p): New function.
13583 (use_new_line): New function.
13584 (gcc_rich_location::add_fixit_insert_formatted): New function.
13585 * gcc-rich-location.h
13586 (gcc_rich_location::add_fixit_insert_formatted): New function.
13588 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13590 * selftest.c (assert_streq): Rename "expected" and "actual" to
13591 "val1" and "val2". Extend NULL-handling to cover both inputs
13592 symmetrically, while still requiring both to be non-NULL for a pass.
13593 * selftest.h (assert_streq): Rename "expected" and "actual" to
13595 (ASSERT_EQ): Likewise.
13596 (ASSERT_EQ_AT): Likewise.
13597 (ASSERT_KNOWN_EQ): Likewise.
13598 (ASSERT_KNOWN_EQ_AT): Likewise.
13599 (ASSERT_NE): Likewise.
13600 (ASSERT_MAYBE_NE): Likewise.
13601 (ASSERT_MAYBE_NE_AT): Likewise.
13602 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13603 the assertion to pass.
13604 (ASSERT_STREQ_AT): Likewise.
13606 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13608 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13609 interaction with -pie.
13611 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13613 * selftest.h: Fix alphabetization of per-source-file selftest
13616 2018-04-30 Jason Merrill <jason@redhat.com>
13618 PR c++/61982 - dead stores to destroyed objects.
13619 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13622 2018-04-30 Jason Merrill <jason@redhat.com>
13624 * tree.c (build_clobber): New.
13625 * tree.h: Declare it.
13626 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13628 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13630 * diagnostic-show-locus.c (layout::layout): Update for
13631 location_get_source_line returning a char_span.
13632 (struct char_span): Move to input.h.
13633 (struct correction): Update for fields in char_span becoming
13635 (struct source_line): Update for location_get_source_line
13636 returning a char_span.
13637 (layout::print_line): Likewise.
13638 * edit-context.c (edited_file::print_content): Likewise.
13639 (edited_file::print_diff_hunk): Likewise.
13640 (edited_file::print_run_of_changed_lines): Likewise.
13641 (edited_file::get_num_lines): Likewise.
13642 (edited_line::edited_line): Likewise.
13643 * final.c (asm_show_source): Likewise.
13644 * input.c (location_get_source_line): Convert return type
13645 from const char * to char_span, losing the final "line_len"
13647 (dump_location_info): Update for the above.
13648 (get_substring_ranges_for_loc): Likewise. Use a char_span
13649 when handling the literal within the line.
13650 (test_reading_source_line): Update for location_get_source_line
13651 returning a char_span.
13652 * input.h (class char_span): Move here from
13653 diagnostic-show-locus.c, converting from a struct to a class.
13654 Make data members private.
13655 (char_span::operator bool): New.
13656 (char_span::length): New.
13657 (char_span::get_buffer): New.
13658 (char_span::operator[]): New.
13659 (char_span::subspan): Make const.
13660 (char_span::xstrdup): New.
13661 (location_get_source_line): Convert return type from const char *
13662 to char_span, losing the final "line_size" param.
13664 2018-04-30 Jan Hubicka <jh@suse.cz>
13666 * lto-wrapper.c (ltrans_priorities): New static var.
13667 (cmp_priority): New.
13668 (run_gcc): Read priorities and if doing parallel build order
13669 the Makefile by them.
13671 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13673 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13675 2018-04-30 Richard Biener <rguenther@suse.de>
13677 * tree-cfg.c (verify_address): Remove base argument, add
13678 flag whether to check TREE_ADDRESSABLE and do that.
13679 (verify_expr): Remove.
13680 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13681 (verify_gimple_assign_single): Likewise.
13682 (verify_gimple_switch): Likewise.
13683 (verify_expr_location_1): Dereference tp once. Add (disabled)
13684 piece from verify_expr.
13685 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13687 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13689 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13691 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13693 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13694 (small_data_pattern): Likewise.
13695 (arc_rewrite_small_data): Likewise.
13696 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13697 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13698 (get_symbol_alignment): New function.
13699 (legitimate_small_data_address_p): Likewise.
13700 (legitimate_scaled_address): Update, call
13701 legitimate_small_data_address_p.
13702 (output_sdata): New static variable.
13703 (arc_print_operand): Update how we handle small data operands.
13704 (arc_print_operand_address): Likewise.
13705 (arc_legitimate_address_p): Update, use
13706 legitimate_small_data_address_p.
13707 (arc_rewrite_small_data_p): Remove.
13708 (arc_rewrite_small_data_1): Likewise.
13709 (arc_rewrite_small_data): Likewise.
13710 (small_data_pattern): Likewise.
13711 (compact_sda_memory_operand): Update to use
13712 legitimate_small_data_address_p and get_symbol_alignment.
13713 (prepare_move_operands): Don't rewite sdata pattern.
13714 (prepare_extend_operands): Remove.
13715 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13717 (zero_extendqisi2): Likewise.
13718 (zero_extendhisi2): Likewise.
13719 (extendqihi2): Likewise.
13720 (extendqisi2): Likewise.
13721 (extendhisi2): Likewise.
13722 (addsi3): Likewise.
13723 (subsi3): Likewise.
13724 (andsi3): Likewise.
13725 * config/arc/constraints.md (Usd): Change it to memory constraint.
13727 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13729 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13730 as source of std instructions.
13731 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13732 allow 6-bit constants as source for store instructions.
13733 (movdi_insn): Update instruction pattern to allow 6-bit constants
13734 as source for store instructions.
13736 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13738 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13740 2018-04-30 Nathan Sidwell <nathan@acm.org>
13741 Sandra Loosemore <sandra@codesourcery.com>
13743 * dumpfile.c (dump_open): Allow '-' for stdout.
13744 * doc/invoke.texi (Developer Options): Document dump filename
13745 determination early. Document stdin/stdout selection.
13747 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13749 Microblaze Target: PIC data text relative
13751 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13752 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13754 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13755 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13756 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13757 New addressing mode for data-text relative position indepenedent code.
13758 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13759 'ADDRESS_SYMBOLIC_TXT_REL'.
13760 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13761 (microblaze_legitimate_pic_operand): Exclude function calls from
13762 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13763 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13765 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13766 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13767 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13768 for 'address + offset'.
13769 (microblaze_expand_prologue): Add new function prologue call for
13771 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13772 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13773 table in case of TARGET_PIC_DATA_TEXT_REL.
13774 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13775 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13776 Add new macros 'UNSPEC_TEXT',
13777 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13778 + exclude function calls from 'UNSPEC_PLT' in case of data text
13780 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13781 new target hook for generating address diff vector tables in case of
13783 * doc/tm.texi : Regenerate.
13784 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13785 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13786 of addr diff vector generation.
13787 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13788 target hook definition.
13789 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13790 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13791 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13792 option for data text relative.
13794 2018-04-30 Richard Biener <rguenther@suse.de>
13796 * tree-chrec.h (evolution_function_is_constant_p): Remove
13798 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13800 2018-04-30 Richard Biener <rguenther@suse.de>
13803 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13805 2018-04-30 Richard Biener <rguenther@suse.de>
13807 PR tree-optimization/28364
13808 PR tree-optimization/85275
13809 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13810 copying first exit test.
13812 2018-04-28 Mark Wielaard <mark@klomp.org>
13814 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13815 dwarf_version >= 5.
13816 (dwarf_AT): Handle DW_AT_addr_base.
13817 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13819 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13822 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13823 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13824 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13825 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13827 2018-04-28 Richard Biener <rguenther@suse.de>
13829 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13830 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13831 to reflect use. Only add interesting stmts.
13833 2018-04-27 Martin Jambor <mjambor@suse.cz>
13836 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13837 the jump function allows for passing through aggregate values.
13839 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13841 * input.h (in_system_header_at): Convert from macro to inline
13843 (from_macro_expansion_at): Likewise.
13844 (from_macro_definition_at): Likewise.
13846 2018-04-27 Jeff Law <law@redhat.com>
13848 * config.gcc: Mark tile* targets as deprecated/obsolete.
13850 2018-04-27 Richard Biener <rguenther@suse.de>
13852 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13855 2018-04-27 Richard Biener <rguenther@suse.de>
13857 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13859 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13861 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13862 with Yd constraint. Set "preferred_for_speed" attribute from
13863 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13864 with Yd constraint.
13865 (*movdi_internal): Ditto.
13866 (movti_interunit splitters): Remove
13867 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13868 (movdi_interunit splitters): Ditto.
13869 * config/i386/constraints.md (Ye): Remove.
13870 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13872 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13875 * config/aarch64/constraints.md (Usg): Limit to 31.
13876 (Usj): Limit to 63.
13878 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13880 PR tree-optimization/85529
13881 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13882 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13883 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13884 zero extension or masking of the MSB bit.
13885 (optimize_range_tests): Add FIRST_BB argument, pass it through
13886 to optimize_range_tests_var_bound.
13887 (maybe_optimize_range_tests, reassociate_bb): Adjust
13888 optimize_range_tests callers.
13890 2018-04-26 Richard Biener <rguenther@suse.de>
13891 Jakub Jelinek <jakub@redhat.com>
13893 * cgraph.h (symbol_table): Just declare debug method here.
13894 * symtab.c (symbol_table::debug): Define.
13896 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13898 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13900 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13902 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13903 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13904 (*movdi_internal): Substitute Yi and Yj constraint with x
13905 and Ym and Yn constraint with y constraint. Update "isa"
13906 attribute and set "preferred_for_speed" attribute from
13907 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13908 (*movsi_internal): Ditto.
13909 (*movdf_internal): Ditto.
13910 (*movsf_internal): Ditto.
13911 (*zero_extendsidi2): Ditto.
13912 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13913 (sse2_loadld): Ditto.
13914 (*vec_extract<ssevecmodelower>_0): Ditto.
13915 (*vec_extractv4si_0_zext_sse4): Ditto.
13916 (vec_concatv2di): Ditto.
13917 (*vec_dup<mode>): Ditto.
13918 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13919 * config/i386/constraints.md (Yi): Remove.
13924 2018-04-26 Nathan Sidwell <nathan@acm.org>
13926 * dumpfile.c (dump_open): New.
13927 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13928 (dump_finish): Detect stdio/stderr by value not name.
13930 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13932 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13934 2018-04-26 Tom de Vries <tom@codesourcery.com>
13937 * config/nvptx/nvptx.c (verify_neutering_jumps)
13938 (verify_neutering_labels): New function
13939 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13941 2018-04-26 Tom de Vries <tom@codesourcery.com>
13944 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13945 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13948 2018-04-26 Richard Biener <rguenther@suse.de>
13949 Tom de Vries <tom@codesourcery.com>
13952 * lto-streamer-out.c (output_function): Fixup loops if required to match
13953 discovery done in the reader.
13955 2018-04-26 Richard Biener <rguenther@suse.de>
13957 PR tree-optimization/85116
13958 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13959 have a loop exit from the single latch predecessor. Remove
13960 case of header with just condition.
13961 (ch_base::copy_headers): Exclude infinite loops from any
13963 (pass_ch::execute): Record exits.
13965 2018-04-26 Richard Biener <rguenther@suse.de>
13967 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13968 prologue cost vector and pass it to vect_get_load_cost.
13969 (vect_get_peeling_costs_all_drs): Likewise.
13970 (vect_peeling_hash_get_lowest_cost): Likewise.
13971 (vect_enhance_data_refs_alignment): Likewise.
13973 2018-04-26 Richard Biener <rguenther@suse.de>
13975 PR middle-end/85450
13976 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13977 checking of integer<->pointer conversions.
13978 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13979 sign-/zero-extending pointer types.
13980 (expand_omp_for_static_chunk): Likewise.
13982 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13983 Jean Lee <xiaoyur347@gmail.com>
13985 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13986 (TARGET_ASAN_SHADOW_OFFSET): Define.
13987 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13988 true for -fsanitize=address.
13990 2018-04-25 Mark Wielaard <mark@klomp.org>
13992 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13995 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13997 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13998 than "alu", remove explicit "memory" and "imm_disp" attributes.
13999 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14001 PR middle-end/85414
14002 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14003 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14004 gen_lowpart_no_emit.
14006 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14009 * config/i386/i386.c (ix86_expand_builtin): Change memory
14010 operand to XI, extend p0 to Pmode.
14011 * config/i386/i386.md: Change unspec volatile and operand
14012 1 mode to XI, change operand 0 mode to P.
14014 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14016 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14017 GET_MODE_MASK before any checking.
14018 (nds32_can_use_bset_p): Likewise.
14019 (nds32_can_use_btgl_p): Likewise.
14021 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14023 * config/nds32/nds32-doubleword.md: New define_split pattern for
14024 illegal register number.
14026 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14028 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14030 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14032 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14034 2018-04-25 Richard Biener <rguenther@suse.de>
14036 * lto-streamer.h (LTO_major_version): Bump to 8.
14038 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14040 * BASE-VER: Set to 9.0.0.
14042 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14044 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14045 in __abskf2 and __powikf2.
14047 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14050 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14051 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14052 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14053 Use the above on operand 2. Reindent.
14054 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14056 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14059 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14061 * config/i386/i386.opt (mcet): Removed.
14062 * doc/install.texi: Remove -mcet documentation.
14063 * doc/invoke.texi: Likewise.
14065 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14068 * doc/install.texi: Remove -mcet from bootstrap-cet.
14070 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14073 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14074 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14078 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14079 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14080 containing a CONST_VECTOR.
14082 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14084 * doc/install.texi: Update newlib dependency for nvptx.
14086 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14089 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14090 instead of INTVAL when shifting x left.
14092 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14094 PR tree-optimization/85478
14095 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14096 vect_grouped_store_supported for single element vectors.
14098 2018-04-24 Richard Biener <rguenther@suse.de>
14101 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14102 load cost increase to the case of non-constant step.
14104 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14107 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14108 destination if any_malformed_asm.
14110 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14112 PR middle-end/85496
14113 * expr.c (store_field): In the bitfield case, if the value comes from
14114 a function call and is returned in registers by means of a PARALLEL,
14115 do not change the mode of the temporary unless BLKmode and VOIDmode.
14117 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14119 PR rtl-optimization/85423
14120 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14121 dependencies to debug insns when the previous insn is non-debug.
14123 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14125 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14126 enums into a single definition.
14127 (fls): Fix predicates and printing.
14130 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14132 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14133 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14134 and short u6 immediate.
14135 (check_if_valid_sleep_operand): Remove.
14136 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14138 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14140 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14141 flag_always_save_lp condition.
14142 * config/nds32/nds32.opt (malways-save-lp): New option.
14144 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14146 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14147 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14148 * config/nds32/nds32.h
14149 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14150 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14152 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14154 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14155 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14157 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14158 Chung-Ju Wu <jasonwucj@gmail.com>
14160 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14162 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14163 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14165 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14167 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14169 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14171 * config/nds32/nds32-protos.h (nds32_data_alignment,
14172 nds32_local_alignment): Declare.
14173 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14174 nds32_local_alignment): New functions.
14175 (TARGET_CONSTANT_ALIGNMENT): Define.
14176 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14178 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14180 * config/nds32/nds32.c
14181 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14182 (TARGET_MODES_TIEABLE_P): Likewise.
14184 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14186 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14187 level Ofast and Og.
14189 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14190 Chung-Ju Wu <jasonwucj@gmail.com>
14192 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14193 for unaligned access.
14194 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14196 * config/nds32/nds32-intrinsic.md: Likewise.
14197 * config/nds32/nds32_intrinsic.h: Likewise.
14198 * config/nds32/nds32.h (nds32_builtins): Likewise.
14199 * config/nds32/nds32.opt (munaligned-access): New option.
14200 * config/nds32/nds32.c (nds32_asm_file_start): Display
14201 flag_unaligned_access status.
14203 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14205 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14206 -mno-relax is present.
14207 * config/riscv/linux.h (LINK_SPEC): Ditto.
14209 2018-04-20 Martin Sebor <msebor@redhat.com>
14212 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14214 (gimple_fold_builtin_stxcpy_chk): Same.
14215 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14217 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14220 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14221 __powikf2 when long double is IEEE 128-bit.
14223 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14225 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14226 step to make sure stack always aligned.
14228 2018-04-20 Carl Love <cel@us.ibm.com>
14231 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14232 size check for arg0.
14234 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14235 Tom de Vries <tom@codesourcery.com>
14238 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14239 Emit insns for calls too.
14240 (nvptx_find_par): Always look for worker-level predecessor insn.
14241 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14243 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14244 (nvptx_process_pars): Propagate frames for calls.
14246 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14249 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14251 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14252 (ix86_handle_option): Don't handle OPT_mibt.
14253 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14255 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14257 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14258 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14259 (ix86_target_macros): Define __CET__ with flag_cf_protection
14260 for -fcf-protection.
14261 * config/i386/i386.c (isa2_opts): Remove -mibt.
14262 * config/i386/i386.h (TARGET_IBT): Removed.
14263 (TARGET_IBT_P): Likewise.
14264 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14265 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14266 * config/i386/i386.opt (mcet): Update help message.
14267 (mshstk): Likewise.
14269 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14270 -mcet as an alias for -mshstk.
14272 2018-04-20 Richard Biener <rguenther@suse.de>
14274 PR middle-end/85475
14275 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14276 complexity by forcing a single use of the multiply operand.
14278 2018-04-20 Martin Jambor <mjambor@suse.cz>
14281 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14282 recursion dependency to only apply to non-clones.
14284 2018-04-20 Martin Jambor <mjambor@suse.cz>
14287 * ipa-cp.c (create_specialized_node): Check that clones of
14288 self-recursive edges exist during IPA-CP.
14290 2018-04-19 Toon Moene <toon@moene.org>
14292 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14295 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14297 PR tree-optimization/85467
14298 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14299 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14300 VECTOR_CST element to type.
14302 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14305 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14306 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14307 (builtin_longjmp): Likewise.
14308 (save_stack_nonlocal): New pattern.
14309 (restore_stack_nonlocal): Likewise.
14311 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14314 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14315 Replace ASM_OUTPUT_LABEL with fprintf.
14317 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14320 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14321 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14322 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14323 define __IBT__ and __SHSTK__ for -fcf-protection.
14324 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14326 (ix86_trampoline_init): Likewise.
14327 (x86_output_mi_thunk): Likewise.
14328 (ix86_notrack_prefixed_insn_p): Likewise.
14329 (ix86_option_override_internal): Don't disallow -fcf-protection.
14330 * config/i386/i386.md (rdssp<mode>): Also enable for
14332 (incssp<mode>): Likewise.
14333 (nop_endbr): Likewise.
14334 * config/i386/i386.opt (mcet): Change help message to built-in
14337 (mshstk): Likewise.
14338 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14339 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14340 enable CET built-in functions.
14342 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14344 * common/config/i386/i386-common.c
14345 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14346 OPTION_MASK_ISA_MOVDIRI_UNSET,
14347 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14348 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14349 * config.gcc (movdirintrin.h): New header.
14350 * config/i386/cpuid.h (bit_MOVDIRI,
14351 bit_MOVDIR64B): New bits.
14352 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14354 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14355 (VOID, PVOID, PCVOID)): New function types.
14356 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14357 __builtin_ia32_directstoreu_u64,
14358 __builtin_ia32_movdir64b): New builtins.
14359 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14360 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14362 (ix86_valid_target_attribute_inner_p): Ditto.
14363 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14364 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14365 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14366 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14367 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14368 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14369 (movdiri<mode>, movdir64b_<mode>): New.
14370 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14371 * config/i386/immintrin.h: Include movdirintrin.h.
14372 * config/i386/movdirintrin.h: New file.
14373 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14375 2018-04-19 Richard Biener <rguenther@suse.de>
14377 PR middle-end/85455
14378 * cfg.c (clear_bb_flags): When loop state says we have
14379 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14381 2018-04-19 Richard Biener <rguenther@suse.de>
14383 PR tree-optimization/84737
14384 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14385 copying restrict info.
14386 (vect_setup_realignment): Use it.
14387 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14388 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14389 the first DR to all generated stores.
14390 (vectorizable_load): Likewise for loads.
14392 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14394 PR tree-optimization/85446
14395 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14396 the integral and pointer types to have the same precision.
14398 * doc/install.texi: Document --disable-cet being the default and
14401 2018-04-18 Martin Liska <mliska@suse.cz>
14403 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14406 2018-04-18 Martin Liska <mliska@suse.cz>
14409 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14412 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14413 arguments if they are comparable.
14415 2018-04-18 Martin Liska <mliska@suse.cz>
14418 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14421 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14424 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14427 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14428 ENDBR after calling __morestack.
14430 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14433 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14434 by using gcc_base_ver to generate a gcc_driver_version, and use
14435 it when generating GCC_DRIVER_NAME.
14436 * configure: Regenerate.
14438 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14441 * config.gcc: Obsolete powerpc*-*-*spe*.
14443 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14446 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14447 (stabstr_D): Change type of unum from unsigned int to
14448 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14451 2018-04-17 Jim Wilson <jimw@sifive.com>
14454 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14455 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14456 Set arg_pointer_offset after using pretend_args_size.
14458 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14460 PR rtl-optimization/85431
14461 * dse.c (record_store): Ignore zero width stores.
14464 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14465 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14466 __builtin_stack_restore rather than after it.
14467 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14468 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14469 argument instead of virtual_dynamic_stack_rtx.
14471 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14473 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14475 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14476 Add note to error message to explain internal mapping of overloaded
14477 built-in function name to non-overloaded built-in function name.
14478 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14481 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14484 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14485 where the inputs overlap with the output.
14487 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14489 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14490 (=v, v) alternative and explicit "memory" attribute.
14491 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14492 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14494 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14495 "sselog1" type instead of "sselog".
14496 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14497 "sselog". Remove explicit "memory" attribute.
14498 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14499 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14501 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14502 "sselog1" type instead of "sselog". Remove explicit "memory"
14504 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14505 use "sselog1" type instead of "sselog". Remove explicit "memory"
14507 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14508 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14510 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14511 "sselog1" type instead of "sselog". Remove explicit "memory"
14513 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14514 use "sselog1" type instead of "sselog". Remove explicit "memory"
14518 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14520 PR middle-end/85414
14521 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14524 2018-04-17 Martin Jambor <mjambor@suse.cz>
14527 * ipa-cp.c (create_specialized_node): Call
14528 expand_all_artificial_thunks if necessary.
14530 2018-04-17 Martin Liska <mliska@suse.cz>
14533 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14534 in message, remote space in between '_G' and '('.
14536 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14539 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14540 avx512f_vmcmp<mode>3<round_saeonly_name>,
14541 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14542 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14543 avx512f_rndscale<mode><round_saeonly_name>,
14544 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14545 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14546 Use %<iptr>2 instead of %2 for -masm=intel.
14547 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14548 avx512f_vcvttss2usi<round_saeonly_name>,
14549 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14551 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14552 avx512f_vcvttsd2usi<round_saeonly_name>,
14553 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14554 Use %q1 instead of %1 for -masm=intel.
14555 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14556 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14557 of %3 for -masm=intel.
14558 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14560 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14562 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14564 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14565 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14567 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14569 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14570 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14571 %g1 and one with %0 and %1.
14572 (avx512er_vmrcp28<mode><round_saeonly_name>,
14573 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14574 %1 for -masm=intel.
14575 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14576 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14577 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14578 of %0 and %{%4%} for -masm=intel.
14579 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14580 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14581 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14582 order of %0 and %{%5%}%{z%} for -masm=intel.
14584 2018-04-17 Jan Hubicka <jh@suse.cz>
14587 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14589 2018-04-17 Martin Liska <mliska@suse.cz>
14592 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14593 for target_clone error message. Make default implementation
14594 clone to be a local declaration.
14595 (separate_attrs): Add new argument and check for an empty
14597 (expand_target_clones): Handle it.
14598 (ipa_target_clone): Make redirection just for target_clones
14601 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14602 Tom de Vries <tom@codesourcery.com>
14604 PR middle-end/84955
14605 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14606 tiled basic blocks without omp continue statements.
14608 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14611 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14612 vec_extract expression as having side effects to make sure it gets
14615 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14618 * config/i386/i386.c (get_builtin_code_for_version): Check
14621 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14624 * config.gcc: Support "skylake".
14625 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14627 * config/i386/i386.c (m_SKYLAKE): Define.
14628 (processor_target_table): Add "skylake".
14629 (ix86_option_override_internal): Add "skylake".
14630 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14631 PROCESSOR_CANNONLAKE.
14632 (get_builtin_code_for_version): Fix priority for
14633 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14634 PROCESSOR_SKYLAKE-AVX512.
14635 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14636 (processor_type): Add PROCESSOR_SKYLAKE.
14638 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14639 Jason Merrill <jason@redhat.com>
14642 * convert.c (convert_to_integer_1): Use direct recursion for
14643 enumeral types and types with a precision less than the number
14644 of bits in their mode.
14646 2018-04-16 Julia Koval <julia.koval@intel.com>
14649 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14650 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14652 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14655 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14656 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14657 and -mno-direct-move.
14659 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14662 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14663 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14664 Ensure negative shifts result in {0}.
14666 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14668 PR rtl-optimization/79916
14669 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14670 regs (if any) to define how to gnerate SD moves when LRA is in
14673 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14675 PR rtl-optimization/85393
14676 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14677 * except.c (expand_dw2_landing_pad_for_region): Make static.
14678 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14679 a label and unconditional jump to old_bb, rather than
14680 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14683 PR rtl-optimization/85376
14684 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14685 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14686 instead of a specific value.
14688 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14689 Bin Cheng <bin.cheng@arm.com>
14691 PR tree-optimization/82965
14692 PR tree-optimization/83991
14693 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14694 by_profile_only parameter.
14695 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14696 information if the loop was predicted to iterate too many times.
14697 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14699 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14702 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14705 2018-04-13 Martin Liska <mliska@suse.cz>
14706 Jakub Jelinek <jakub@redhat.com>
14708 PR middle-end/81657
14709 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14710 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14711 * builtins.c (expand_builtin_memory_copy_args): Use
14712 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14713 handle dest_addr == pc_rtx.
14715 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14718 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14719 asked to not generate direct moves.
14720 (fix_trunc<mode>si2_stfiwx): Similar.
14721 (fix_trunc<mode>si2_internal): Similar.
14723 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14726 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14727 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14728 lookup if dest in some wider mode is known to be const0_rtx and
14729 if so, record permanent equivalence for it to be ZERO_EXTEND of
14730 the narrower mode destination.
14732 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14734 * lto-streamer-out.c (output_function): Revert 259346.
14735 * omp-expand.c (expand_oacc_for): Likewise.
14737 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14739 PR rtl-optimization/85354
14740 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14741 * sel-sched.c (sel_global_init): ... here.
14743 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14746 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14747 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14748 mode for PE-COFF targets.
14749 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14750 (i386_pe_asm_lto_end): Likewise.
14751 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14752 (TARGET_ASM_LTO_END): Likewise.
14753 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14754 (i386_pe_asm_lto_start): New function.
14755 (i386_pe_asm_lto_end): Likewise.
14757 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14758 Richard Biener <rguenther@suse.de>
14760 PR middle-end/84955
14761 * lto-streamer-out.c (output_function): Fix CFG loop state before
14763 * omp-expand.c (expand_oacc_for): Handle calls to internal
14764 functions like regular functions.
14766 2018-04-12 Richard Biener <rguenther@suse.de>
14769 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14770 for the early LTO debug to properly generate references to it
14771 during DIE emission. Do not re-use that for the skeleton for
14773 (dwarf2out_early_finish): Likewise.
14775 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14778 * config/i386/sse.md
14779 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14780 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14781 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14782 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14783 and output is a reg, avoid creating invalid lowpart subreg, but
14784 instead split into a 512-bit move. Don't split if not AVX512VL,
14785 input is xmm16+ reg and output is a mem.
14786 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14787 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14788 xmm16+ reg and output is a mem.
14790 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14792 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14793 also for flag_dwarf2_cfi_asm.
14795 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14797 PR rtl-optimization/85342
14798 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14799 a bool scalar var inside of the loop instead. Don't try to update
14800 recog_data.operand after failed apply_change_group.
14802 2018-04-12 Tom de Vries <tom@codesourcery.com>
14805 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14806 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14807 array with flexible array member as array without given dimension.
14808 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14809 argument for undefined param to true.
14811 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14814 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14815 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14816 from PowerPC section.
14817 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14818 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14819 help text that is too long.
14820 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14821 help text that is too long.
14822 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14823 help text that is too long.
14825 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14827 * config/alpha/alpha.md (stack_probe_internal): Rename
14828 from "probe_stack". Update all callers.
14830 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14832 PR rtl-optimization/84566
14833 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14834 sched_macro_fuse_insns.
14836 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14839 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14840 (compute_block_dependences): ... from here.
14842 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14844 PR tree-optimization/85331
14845 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14846 from int to HOST_WIDE_INT.
14848 2018-04-11 Martin Jambor <mjambor@suse.cz>
14851 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14852 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14853 not the same as the source val.
14854 (cgraph_edge_brings_value_p): New parameter.
14855 (gather_edges_for_value): Pass destination value to
14856 cgraph_edge_brings_value_p.
14857 (perhaps_add_new_callers): Likewise.
14858 (get_info_about_necessary_edges): Likewise and exclude values brought
14859 only by self-recursive edges.
14860 (create_specialized_node): Redirect only clones of self-calling edges.
14861 (+self_recursive_pass_through_p): New function.
14862 (find_more_scalar_values_for_callers_subset): Use it.
14863 (find_aggregate_values_for_callers_subset): Likewise.
14864 (known_aggs_to_agg_replacement_list): Removed.
14865 (decide_whether_version_node): Re-calculate known constants for all
14866 remaining context clones.
14868 2018-04-11 Richard Biener <rguenther@suse.de>
14871 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14872 from early DWARF output.
14873 (dwarf2out_early_finish): Output line info unconditionally into
14874 early DWARF and add reference to it.
14876 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14879 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14880 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14881 other than V2DFmode using iptr mode attribute.
14882 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14884 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14886 PR rtl-optimization/84659
14887 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14889 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14892 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14894 (output_loc_list): Pass address of a dummy size variable even in the
14895 locview handling loop.
14896 (index_location_lists): Add comment on why skip_loc_list_entry can't
14899 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14902 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14905 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14908 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14909 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14910 and -mstring-compare-inline-limit.
14912 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14915 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14916 for stack clash protection in a register whenever we need it to be in
14919 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14921 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14922 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14924 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14927 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14929 (mlong-double-): Ditto.
14930 * config/rs6000/sysv4.opt (msdata=): Ditto.
14931 (mtls-size=): Ditto.
14933 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14935 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14936 erroneous entries for
14937 "vector int vec_ldl (int, long int *)", and
14938 "vector unsigned int vec_ldl (int, unsigned long int *)".
14939 Add comments and entries for
14940 "vector bool char vec_ldl (int, bool char *)",
14941 "vector bool short vec_ldl (int, bool short *)",
14942 "vector bool int vec_ldl (int, bool int *)",
14943 "vector bool long long vec_ldl (int, bool long long *)",
14944 "vector pixel vec_ldl (int, pixel *)",
14945 "vector long long vec_ldl (int, long long *)",
14946 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14947 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14948 type tree bool_long_long_type_node and correct definition of
14949 bool_V2DI_type_node to make reference to this new type tree.
14950 (rs6000_mangle_type): Replace erroneous reference to
14951 bool_long_type_node with bool_long_long_type_node.
14952 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14953 comments to emphasize sign distinctions for char and int types and
14954 replace RS6000_BTI_bool_long constant with
14955 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14956 use of RS6000_BTI_pixel.
14957 (bool_long_type_node): Remove this macro definition.
14958 (bool_long_long_type_node): New macro definition
14960 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14962 PR rtl-optimization/85300
14963 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14964 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14965 simplify_unary_operation fails.
14967 2018-04-10 Martin Liska <mliska@suse.cz>
14969 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14970 cgraph_edge and ipa_ref.
14972 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14976 * config/i386/sse.md
14977 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14978 computation of the VEC_MERGE selector from mask.
14979 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14980 Fix decoding of the VEC_MERGE selector into mask.
14982 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14984 PR tree-optimization/85286
14985 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14987 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14989 * final.c (final_1): Set insn_last_address as well as
14990 insn_current_address.
14992 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14995 * explow.c (emit_stack_probe): Call validize_mem on memory location
14996 before passing it to gen_probe_stack. Create address operand and
14997 legitimize it for the probe_stack_address case.
14999 2018-04-09 Jan Hubicka <jh@suse.cz>
15002 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15003 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15004 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15006 (free_lang_data): Rebuild type inheritance graph.
15008 2018-04-09 Martin Sebor <msebor@redhat.com>
15010 * invoke.texi (-finline-small-functions): Mention other optimization
15012 (-findirect-inlining, -fpartial-inlining): Same.
15013 (-finline-functions-called-once): Same.
15014 (-freorder-blocks-and-partition): Same.
15016 2018-04-09 Jan Hubicka <jh@suse.cz>
15019 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15020 jumps; choose last target that matches the criteria (i.e.
15021 no partition changes for non-crossing jumps).
15022 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15023 support for redirecting crossing jumps to non-crossing.
15025 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15027 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15028 also for naked functions.
15030 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15032 * config/arc/arc.md (add_shift): New pattern.
15033 (add_shift2): Likewise.
15034 (sub_shift): Likewise.
15035 (sub_shift_cmp0_noout): Likewise.
15036 (compare_si_ashiftsi): Likewise.
15037 (xbfu_cmp0_noout): New combine pattern.
15038 (xbfu_cmp0"): Likewise.
15039 (movsi_set_cc_insn): Place the predicable variant first.
15040 (commutative_binary_cmp0_noout): Remove clobber.
15041 (commutative_binary_cmp0): New pattern.
15042 (noncommutative_binary_cmp0): Likewise.
15043 (noncommutative_binary_cmp0_noout): Likewise.
15044 (noncommutative_binary_comparison_result_used): Removed.
15045 (rsub_cmp0): New pattern.
15046 (rsub_cmp0_noout): Likewise.
15047 (extzvsi): Changed, keep only meaningful variants.
15048 (SQH, SEZ): New iterators.
15049 (SQH_postfix): New mode attribute.
15050 (SEZ_prefix): New code attribute.
15051 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15052 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15053 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15054 of numerical value.
15055 (noncommutative_operator): Check the availability of barrel
15058 2018-04-09 Richard Biener <rguenther@suse.de>
15060 PR tree-optimization/85284
15061 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15062 Only use the niter constraining form of simple_iv when the exit
15063 is always executed.
15065 2018-04-09 Tom de Vries <tom@codesourcery.com>
15068 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15069 (define_expand "*memory_barrier"): New define_expand.
15070 (define_insn "memory_barrier"): New insn.
15072 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15074 PR rtl-optimization/80463
15075 PR rtl-optimization/83972
15076 PR rtl-optimization/83480
15078 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15079 correct producer for the insn.
15080 (tidy_control_flow): Fixup seqnos in case of debug insns.
15082 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15084 PR rtl-optimization/83913
15086 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15087 different sched-times when merging exprs.
15089 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15091 PR rtl-optimization/83962
15093 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15094 tidy_fallthru_edge and tidy_control_flow.
15096 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15098 PR rtl-optimization/83530
15100 * sel-sched.c (force_next_insn): New global variable.
15101 (remove_insn_for_debug): When force_next_insn is true, also leave only
15102 next insn in the ready list.
15103 (sel_sched_region): When the region wasn't scheduled, make another pass
15104 over it with force_next_insn set to 1.
15106 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15108 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15110 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15111 for interrupt control.
15112 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15113 functions for interrupt control.
15114 * config/nds32/nds32-intrinsic.md: Likewise.
15115 * config/nds32/nds32_intrinsic.h: Likewise.
15116 * config/nds32/nds32.h (nds32_builtins): Likewise.
15118 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15120 * config/nds32/nds32.c (nds32_init_machine_status,
15121 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15122 strict_aligned_p field.
15123 (nds32_expand_to_rtl_hook): New function.
15124 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15125 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15127 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15128 Chung-Ju Wu <jasonwucj@gmail.com>
15130 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15131 * config/nds32/nds32-n7.md: New file.
15132 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15133 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15135 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15136 * config/nds32/nds32.md (pipeline_model): Add n7.
15137 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15138 * config/nds32/pipelines.md: Include n7 settings.
15140 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15141 Chung-Ju Wu <jasonwucj@gmail.com>
15143 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15144 * config/nds32/nds32-e8.md: New file.
15145 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15146 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15148 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15149 * config/nds32/nds32.md (pipeline_model): Add e8.
15150 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15151 * config/nds32/pipelines.md: Include e8 settings.
15153 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15154 Chung-Ju Wu <jasonwucj@gmail.com>
15156 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15157 * config/nds32/nds32-n8.md: New file.
15158 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15159 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15161 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15162 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15163 * config/nds32/nds32.md (pipeline_model): Add n8.
15164 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15165 * config/nds32/pipelines.md: Include n8 settings.
15167 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15168 Chung-Ju Wu <jasonwucj@gmail.com>
15170 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15171 * config/nds32/nds32-n9-2r1w.md: New file.
15172 * config/nds32/nds32-n9-3r2w.md: New file.
15173 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15174 nds32_register_ports): New or modify for cpu n9.
15175 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15177 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15178 * config/nds32/nds32-utils.c: New file.
15179 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15180 TARGET_MUL_SLOW): Define.
15181 * config/nds32/nds32.md (pipeline_model): New attribute.
15182 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15183 New options that support cpu n9.
15184 * config/nds32/pipelines.md: Include n9 settings.
15185 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15187 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15189 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15190 information if necessary.
15191 (output_cond_branch_compare_zero): Likewise.
15192 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15193 (nds32_target_alignment): Refine for alignment.
15194 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15195 (FUNCTION_BOUNDARY): Modify.
15196 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15198 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15200 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15202 * config/nds32/constants.md (unspec_volatile_element): Add values for
15203 TLB operation and data prefetch.
15204 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15205 functions for TLB operation and data prefetch.
15206 * config/nds32/nds32-intrinsic.md: Likewise.
15207 * config/nds32/nds32_intrinsic.h: Likewise.
15208 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15209 (nds32_print_operand): Likewise.
15210 * config/nds32/nds32.h (nds32_builtins): Likewise.
15212 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15213 Andrew Pinski <pinsika@gcc.gnu.org>
15215 PR middle-end/82976
15216 * match.pd: Use constant_boolean_node of correct type instead of
15217 boolean_true_node or boolean_false_node for simplifying
15218 pointer comparisons to zero.
15220 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15222 PR tree-optimization/80021
15223 * tree.c (verify_type_variant): Make error call in verify_variant_match
15224 translatable and remove final full stop.
15226 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15228 * config/nds32/constants.md (unspec_volatile_element): Add
15229 UNSPEC_VOLATILE_EH_RETURN.
15230 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15231 nds32_output_stack_pop): Support dwarf exception handling process.
15232 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15233 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15234 exception handling process.
15235 (nds32_compute_stack_frame): Likewise.
15236 (nds32_return_addr_rtx): Likewise.
15237 (nds32_initial_elimination_offset): Likewise.
15238 (nds32_expand_prologue): Likewise.
15239 (nds32_expand_epilogue): Likewise.
15240 (nds32_dynamic_chain_address): New function.
15241 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15242 exception handling.
15243 (DYNAMIC_CHAIN_ADDRESS): Define.
15244 (EH_RETURN_DATA_REGNO): Define.
15245 (EH_RETURN_STACKADJ_RTX): Define.
15246 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15247 patterns for dwarf exception handling.
15249 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15251 * config/nds32/nds32.h: Clean up obsolete macros.
15253 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15255 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15256 Add enum values for particular instructions.
15257 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15258 particular intrinsic functions.
15259 * config/nds32/nds32-intrinsic.md: Likewise.
15260 * config/nds32/nds32_intrinsic.h: Likewise.
15261 * config/nds32/nds32.h (nds32_builtins): Likewise.
15262 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15263 (btst, ave): New patterns for particular instructions.
15265 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15267 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15268 Add enum values for atomic load/store and memory sync.
15269 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15271 * config/nds32/nds32-intrinsic.md: Likewise.
15272 * config/nds32/nds32_intrinsic.h: Likewise.
15273 * config/nds32/nds32.h (nds32_builtins): Likewise.
15275 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15277 PR tree-optimization/85257
15278 * fold-const.c (native_encode_vector): If not all elts could fit
15279 and off is -1, return 0 rather than offset.
15280 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15281 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15282 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15283 adjust buffer in native_interpret_expr call.
15285 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15287 * config/nds32/constants.md (unspec_volatile_element): Add cache
15288 control enum values.
15289 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15290 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15291 * config/nds32/nds32.c (nds32_cctl_names): New.
15292 (nds32_print_operand): Handle cache control register names.
15293 * config/nds32/nds32.h (nds32_builtins): New enum values.
15294 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15296 * config/nds32/nds32.md (type): Add mmu.
15297 * config/nds32/pipelines.md (simple_insn): Add mmu.
15299 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15301 * config/nds32/nds32.md (type): Remove call.
15302 * config/nds32/pipelines.md (simple_insn): Likewise.
15304 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15306 * config/nds32/constants.md (unspec_volatile_element): Add
15307 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15308 UNSPEC_VOLATILE_FMFCFG.
15309 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15310 description for fmfcfg and fmfcsr.
15311 (bdesc_1arg): Add fmtcsr.
15312 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15313 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15314 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15315 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15316 unspec_fmfcfg): New patterns.
15317 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15318 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15319 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15320 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15321 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15322 __nds32__fmfcfg): Define.
15324 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15326 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15327 intrinsic register names.
15328 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15329 intrinsic register enum values and macros.
15331 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15333 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15334 for load/store addressing form.
15335 (nds32_print_operand_address): Likewise.
15337 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15340 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15341 based on LABEL_REF. Remove useless assertion.
15342 (pic_address_needs_scratch): Fix formatting.
15343 (sparc_legitimize_pic_address): Minor tweaks.
15344 (sparc_delegitimize_address): Adjust assertion accordingly.
15345 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15346 into symbolic_operand.
15347 (movsi_high_pic_label_ref): Likewise.
15348 (movsi_lo_sum_pic_label_ref): Likewise.
15349 (movdi_pic_label_ref): Likewise.
15350 (movdi_high_pic_label_ref): Likewise.
15351 (movdi_lo_sum_pic_label_ref): Likewise.
15353 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15355 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15356 custom LIB_SPEC setup.
15358 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15359 Kito Cheng <kito.cheng@gmail.com>
15361 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15362 * config/riscv/freebsd.h: New.
15364 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15366 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15367 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15370 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15371 Kito Cheng <kito.cheng@gmail.com>
15373 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15374 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15375 * config/nds32/nds32-protos.h (nds32_output_call,
15376 nds32_output_return): Declare.
15377 * config/nds32/nds32.md: Refine all the call and return patterns.
15379 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15382 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15383 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15385 PR rtl-optimization/84872
15386 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15387 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15388 EDGE_CROSSING edge.
15390 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15392 * expr.c (copy_blkmode_to_reg): Revert 254862.
15393 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15395 2018-04-06 Richard Biener <rguenther@suse.de>
15397 PR middle-end/85244
15398 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15399 after seeing a component reference with an adjacent field. Treat
15400 refs to arrays at struct end of external decls similar to
15401 refs to unconstrained commons.
15403 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15406 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15407 look through SAVE_EXPRs with non-side-effects argument. Adjust
15409 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15412 2018-04-06 Richard Biener <rguenther@suse.de>
15414 PR middle-end/85180
15415 * alias.c (find_base_term): New wrapper around find_base_term
15416 unwinding CSELIB_VAL_PTR changes.
15417 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15420 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15422 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15424 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15425 constant definitions.
15426 ("nop"): lr 0,0 -> nopr r0
15427 ("nop_lr0", "nop_lr1"): New insn definitions.
15429 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15431 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15432 NDS32_V3PUSH_AVAILABLE_P macro.
15434 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15435 Chung-Ju Wu <jasonwucj@gmail.com>
15437 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15438 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15439 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15440 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15441 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15442 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15443 * config/nds32/constraints.md: New constraints and checking for hard
15444 float configuration.
15445 * config/nds32/iterators.md: New mode iterator and attribute for hard
15446 float configuration.
15447 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15449 * config/nds32/nds32-fpu.md: New file.
15450 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15451 deal with hard float code generation.
15452 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15454 (abi_type, float_reg_number): New enum type.
15455 * config/nds32/nds32-predicates.c: New predicates for hard float.
15456 * config/nds32/nds32-protos.h: Declare functions for hard float.
15457 * config/nds32/nds32.c: Implementation for hard float configuration.
15458 * config/nds32/nds32.h: Definitions for hard float configuration.
15459 * config/nds32/nds32.md: Include hard float machine description and
15460 modify patterns for hard float configuration.
15461 * config/nds32/nds32.opt: New options for hard float configuration.
15462 * config/nds32/predicates.md: New predicates for hard float
15465 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15467 * common/config/nds32/nds32-common.c
15468 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15470 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15472 PR middle-end/85195
15473 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15474 CONSTRUCTOR_ELT (ctor, ...)->value.
15476 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15479 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15481 2018-04-05 Tom de Vries <tom@codesourcery.com>
15484 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15487 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15488 Kito Cheng <kito.cheng@gmail.com>
15490 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15491 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15492 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15493 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15495 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15496 Kito Cheng <kito.cheng@gmail.com>
15498 * config/nds32/constraints.md (Ufe): New memory constraint.
15499 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15500 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15501 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15503 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15504 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15506 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15508 * config/nds32/nds32.md: Use optimize_size in the condition for
15509 alu-shift instructions.
15511 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15513 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15515 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15517 * config/nds32/nds32.md (negsi2): Refine pattern.
15519 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15520 Chung-Ju Wu <jasonwucj@gmail.com>
15522 * config/nds32/iterators.md (shift_rotate): New code iterator.
15523 (shift): New code attribute.
15524 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15525 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15526 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15527 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15528 bit-wise operations.
15529 (andsi3, *andsi3): Ditto.
15530 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15531 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15532 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15533 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15534 nds32_ior_operand, nds32_xor_operand): New predicates.
15536 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15538 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15539 (addsi3, subsi3): ... this.
15541 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15543 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15545 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15547 * config/nds32/nds32.md: Adjust indention.
15549 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15551 * config/nds32/nds32.md (feature): New attribute.
15553 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15555 * config/nds32/nds32.md (subtype): New attribute.
15557 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15560 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15561 expansion to perform a bitwise AND of the argument followed by a
15562 boolean negation of the result.
15564 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15566 PR rtl-optimization/84878
15567 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15568 the basic block. Assert the use reference is not artificial and that
15569 it has an associated insn.
15571 2018-04-04 Michael Matz <matz@suse.de>
15573 * builtins.c (compute_objsize): Pass correct operand
15574 to array_at_struct_end_p.
15576 2018-04-04 Richard Biener <rguenther@suse.de>
15579 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15580 from contexts for DINFO_LEVEL_TERSE and below.
15582 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15584 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15585 resiter_operand condition.
15586 * config/nds32/nds32.md (*move<mode>): Ditto.
15588 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15589 Monk Chiang <sh.chiang04@gmail.com>
15591 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15593 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15595 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15597 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15598 Kito Cheng <kito.cheng@gmail.com>
15600 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15601 nds32_cond_code_str, output_cond_branch,
15602 output_cond_branch_compare_zero, nds32_expand_cbranch,
15603 nds32_expand_cstore, nds32_expand_movcc,
15604 nds32_output_cbranchsi4_equality_zero,
15605 nds32_output_cbranchsi4_equality_reg,
15606 nds32_output_cbranchsi4_equality_reg_or_const_int,
15607 nds32_output_cbranchsi4_greater_less_zero: New functions.
15608 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15609 nds32_expand_cstore, nds32_expand_movcc,
15610 nds32_output_cbranchsi4_equality_zero,
15611 nds32_output_cbranchsi4_equality_reg,
15612 nds32_output_cbranchsi4_equality_reg_or_const_int,
15613 nds32_output_cbranchsi4_greater_less_zero): Declare.
15614 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15615 nds32_rimm11s_operand): New predicates.
15616 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15617 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15620 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15622 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15623 * config/nds32/nds32.md: Ditto.
15624 * config/nds32/pipelines.md: Ditto.
15626 2018-04-04 Richard Biener <rguenther@suse.de>
15628 PR tree-optimization/85168
15629 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15630 propagating abnormals.
15632 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15634 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15636 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15637 Kito Cheng <kito.cheng@gmail.com>
15639 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15640 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15641 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15642 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15643 * config/nds32/nds32.md (sibcall_internal): New.
15644 (sibcall_register): Remove.
15645 (sibcall_immediate): Remove.
15646 (sibcall_value_internal): New.
15647 (sibcall_value_register): Remove.
15648 (sibcall_value_immediate): Remove.
15649 * config/nds32/predicates.md (nds32_general_register_operand): New.
15650 (nds32_call_address_operand): New.
15652 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15654 PR rtl-optimization/85167
15655 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15656 bb_defs if *split_p, instead preinitialize it to NULL.
15658 PR tree-optimization/85156
15659 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15660 evaluating the argument multiple times.
15662 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15664 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15666 (_mm_cvtpd_ps): Likewise.
15667 (_mm_cvttpd_epi32): Likewise.
15668 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15669 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15670 vector, pixel, and bool following altivec.h include.
15672 2018-04-03 Martin Sebor <msebor@redhat.com>
15674 * doc/extend.texi (Common Function Attributes): Clarify.
15675 (const attribute): Likewise.
15676 (pure attribute): Likewise.
15678 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15681 * config/i386/i386.c (ix86_expand_vector_set): Use
15682 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15684 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15686 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15687 instructions when changing rounding bits to preserve precision bits
15688 in the x87 control word.
15690 2018-04-03 Martin Liska <mliska@suse.cz>
15692 PR tree-optimization/82491
15693 * rtl.h (strip_offset_and_add): Replace += suboffset with
15694 poly_uint64 () + suboffset.
15696 2018-03-29 Martin Liska <mliska@suse.cz>
15697 Martin Jambor <mjambor@suse.cz>
15700 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15701 param_type is not an integral or pointer type.
15703 2018-04-03 Richard Biener <rguenther@suse.de>
15705 * sese.h (recompute_all_dominators): Remove.
15707 2018-04-02 Martin Sebor <msebor@redhat.com>
15709 * doc/invoke.texi (-Wrestrict): Fix typos.
15711 2018-04-02 Jim Wilson <jimw@sifive.com>
15713 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15714 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15715 (<optab>di3, <optab>si3_extend): Likewise.
15716 (<optab>si3_mask, <optab>si3_mask_1): New.
15717 (<optab>di3_mask, <optab>di3_mask_1): New.
15718 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15719 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15720 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15722 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15724 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15727 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15729 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15730 (nds32_canonicalize_comparison): New function.
15732 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15733 Kito Cheng <kito.cheng@gmail.com>
15734 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15736 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15737 * config/nds32/constants.md (unspec_volatile_element): Add
15738 UNSPEC_VOLATILE_RELAX_GROUP.
15739 * config/nds32/nds32-relax-opt.c: New file.
15740 * config/nds32/nds32-predicates.c
15741 (nds32_symbol_load_store_p): New function.
15742 * config/nds32/nds32-protos.h
15743 (nds32_symbol_load_store_p): Declare function.
15744 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15745 * config/nds32/nds32.c
15746 (nds32_register_pass): New function to register pass.
15747 (nds32_register_passes): New function to register passes.
15748 * config/nds32/nds32.md (relax_group): New pattern.
15749 * config/nds32/nds32.opt (mrelax-hint): New option.
15750 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15752 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15754 * config/nds32/t-nds32: Modify files dependency.
15756 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15758 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15759 (PROFILE_HOOK): Define its implementation.
15761 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15763 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15764 type and 32-bit size.
15766 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15768 PR middle-end/85090
15769 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15770 (V_128_256): New mode iterator.
15771 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15772 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15773 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15775 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15776 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15778 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15781 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15782 NaN inputs correctly.
15784 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15787 * config/rs6000/vsx.md (??r): New mode attribute.
15788 (*vsx_mov<mode>_64bit): Use it.
15789 (*vsx_mov<mode>_32bit): Likewise.
15791 2018-03-30 Martin Sebor <msebor@redhat.com>
15793 PR tree-optimization/84818
15794 * builtins.c (check_access): Use warning_n.
15796 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15799 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15801 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15804 2018-03-30 Julia Koval <julia.koval@intel.com>
15807 * x86-tune.def (movx, partial_reg_dependency): Enable for
15810 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15812 PR inline-asm/84985
15813 * lra-constraints.c (process_alt_operands): Move setting
15814 this_alternative_matches below.
15816 2018-03-29 Martin Liska <mliska@suse.cz>
15819 * doc/invoke.texi: Document how LTO works with debug info.
15820 Describe auto-load support of binutils. Mention 'x86-64'
15821 as valid option value of -march option.
15823 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15825 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15828 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15829 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15830 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15833 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15836 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15837 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15838 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15839 for RS6000_BTM_POWERPC64.
15840 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15841 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15842 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15845 (DIVDEU): Likewise.
15847 2018-03-28 Carl Love <cel@us.ibm.com>
15850 2017-09-27 Carl Love <cel@us.ibm.com>
15852 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15853 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15854 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15857 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15859 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15860 instead of __vector bool.
15861 (_mm_max_pu8): Likewise.
15862 (_mm_min_pi16): Likewise.
15864 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15867 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15868 (DIVWEUO): Likewise.
15869 (DIVDEO): Likewise.
15870 (DIVDEUO): Likewise.
15871 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15872 DIVWEUO and DIVDEUO.
15873 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15874 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15875 (div_extend): Likewise.
15876 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15878 (__builtin_divweuo): Likewise.
15879 (__builtin_divdeo): Likewise.
15880 (__builtin_divdeuo): Likewise.
15882 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15885 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15886 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15888 PR tree-optimization/82004
15889 * gimple-match-head.c (optimize_pow_to_exp): New function.
15890 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15891 Don't fold to exp if optimize_pow_to_exp is false.
15893 2018-03-28 Martin Liska <mliska@suse.cz>
15896 * calls.c (initialize_argument_information): Fix trailing space.
15897 * common.opt: Fix typo and provide better explanation for
15898 -fsanitize-coverage option.
15899 * config/i386/i386.opt: Fix typo.
15901 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15902 Martin Liska <mliska@suse.cz>
15905 * gimplify.c (asan_poison_variable): Don't do the check for
15906 gimplify_omp_ctxp here.
15907 (gimplify_decl_expr): Do it here.
15908 (gimplify_target_expr): Likewise.
15910 2018-03-28 Martin Liska <mliska@suse.cz>
15913 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15914 chkp_type_bounds_count if MPX is not enabled.
15916 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15918 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15920 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15923 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15924 function to create the function decl for complex long double
15925 multiply and divide for -mabi=ieeelongdouble.
15926 (init_float128_ieee): Call it.
15928 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15931 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15932 -fcf-protection=branch -mibt.
15933 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15935 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15938 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15939 arm_word_relocations.
15941 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15944 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15945 extern array declarations.
15947 2018-03-27 Richard Biener <rguenther@suse.de>
15949 PR middle-end/84067
15950 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15951 explicit single_use checks.
15953 2018-03-27 Richard Biener <rguenther@suse.de>
15955 PR tree-optimization/85082
15956 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15959 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15961 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15962 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15963 Turn on fasynchronous-unwind-tables and funwind-tables.
15965 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15968 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15969 (*bmi_blsr_<mode>_ccz): Ditto.
15971 2018-03-26 Tom de Vries <tom@codesourcery.com>
15973 PR tree-optimization/85063
15974 * omp-general.c (offloading_function_p): New function. Factor out
15976 * omp-offload.c (pass_omp_target_link::gate): ... here.
15977 * omp-general.h (offloading_function_p): Declare.
15978 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15979 with attribute omp declare target for offloading functions.
15981 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15983 PR tree-optimization/84005
15984 * tree-data-ref.h (get_base_for_alignment): Declare.
15985 * tree-data-ref.c (get_base_for_alignment_1): New function.
15986 (get_base_for_alignment): Likewise.
15987 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15988 get_base_for_alignment to find a suitable base object, instead
15989 of always using drb->base_address.
15991 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15993 PR inline-asm/85022
15994 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15995 known size by default.
15997 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15999 PR inline-asm/85030
16000 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16001 and non BLKmode operands.
16003 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16006 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16007 Clean up attributes.
16009 2018-03-23 Richard Biener <rguenther@suse.de>
16012 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16013 we are going to emit early debug for LTO.
16015 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16017 PR inline-asm/85034
16018 * function.c (match_asm_constraints_1): Don't optimize if input
16019 doesn't satisfy general_operand predicate for output's mode.
16021 PR inline-asm/85022
16022 * alias.c (write_dependence_p): Don't require for x_canonicalized
16023 non-VOIDmode if x has VOIDmode.
16026 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16027 just don't try to optimize it rather than assert it never happens.
16029 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16031 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16032 macro expansions for definition of ST_INTERNAL_<mode> and
16033 LD_INTERNAL_<mode> builtins.
16034 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16036 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16038 (altivec_expand_st_builtin): Likewise.
16039 (altivec_expand_builtin): Remove calls to deleted functions.
16040 (rs6000_address_for_altivec): Delete this function.
16041 * config/rs6000/vector.md: Remove expands for
16042 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16044 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16047 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16048 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16049 re-computing once computed.
16050 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16051 (arm_init_machine_status): Initialize
16052 machine->static_chain_stack_bytes.
16054 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16057 * doc/extend.texi: Add four new prototypes for vec_ld.
16058 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16059 definitions for more logical presentation.
16060 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16061 entries for V1TI variants of __builtin_altivec_ld builtin.
16062 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16063 handling of V1TI variant of LVX icode pattern.
16064 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16065 (rs6000_gimple_fold_builtin): Likewise.
16066 (altivec_init_builtins): Add code to define
16067 __builtin_altivec_lvx_v1ti function.
16069 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16071 PR inline-asm/84941
16072 * function.c (match_asm_constraints_1): Don't do the optimization
16073 if input isn't a REG, SUBREG, MEM or constant.
16075 2018-03-22 Tom de Vries <tom@codesourcery.com>
16077 PR tree-optimization/84956
16078 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16079 bb_has_abnormal_pred.
16081 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16084 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16085 DECL_INITIAL (decl) to decl at the end.
16086 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16087 adjust the comment.
16089 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16091 * doc/extend.texi (__builtin_tgmath): Document when complex
16092 integer types are treated as _Complex _Float64.
16094 2018-03-21 Tom de Vries <tom@codesourcery.com>
16096 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16098 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16100 PR tree-optimization/84960
16101 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16102 if it is ENTRY block, move them into single succ of ENTRY in that case.
16104 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16106 PR tree-optimization/84811
16107 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16108 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16109 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16110 (known_subrange_p): Update accordingly. Cast each value involved
16111 in the size comparison, rather than casting the result of the
16114 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16116 PR tree-optimization/84982
16117 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16118 by flipping the least significant bit rather than all bits from
16119 bitpos to bitpos + bitsize - 1.
16121 2018-03-21 Nathan Sidwell <nathan@acm.org>
16123 * doc/extend.texi (Deprecated Features): Remove mention of
16124 long-deleted deprecations.
16126 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16129 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16130 * configure: Regenerate.
16132 2018-03-21 Tom de Vries <tom@codesourcery.com>
16134 PR tree-optimization/83126
16135 * tree-parloops.c (num_phis): New function.
16136 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16138 2018-03-21 Nathan Sidwell <nathan@acm.org>
16140 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16141 mention anon-struct/union members and trailing attributes.
16143 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16145 PR tree-optimization/84969
16146 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16147 builtin memset partitions if they set different rhs values.
16149 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16151 PR rtl-optimization/84989
16152 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16153 VEC_DUPLICATE with scalar result mode.
16155 2018-03-21 Martin Liska <mliska@suse.cz>
16158 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16159 not intended return statement.
16161 2018-03-21 Martin Liska <mliska@suse.cz>
16164 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16165 (chkp_find_bound_slots_1): Limit number of iterations.
16167 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16170 * Minor grammar fixes for x86 options.
16172 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16175 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16176 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16178 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16181 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16182 (altivec_lvx_<mode>_1op): Likewise.
16183 (altivec_stvx_<mode>_2op): Likewise.
16184 (altivec_stvx_<mode>_1op): Likewise.
16185 (altivec_lvx_<VM2:mode>): New define_expand.
16186 (altivec_stvx_<VM2:mode>): Likewise.
16187 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16188 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16189 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16190 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16191 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16192 (rs6000_gen_lvx): Likewise.
16193 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16194 (altivec_expand_stv_builtin): Likewise.
16195 (altivec_expand_builtin): Likewise.
16196 * config/rs6000/vector.md: Likewise.
16198 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16201 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16204 2018-03-20 Richard Biener <rguenther@suse.de>
16207 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16208 sign-conversions as zero, fall back to standard scalar_stmt
16211 2018-03-20 Martin Liska <mliska@suse.cz>
16214 * predict.c (rebuild_frequencies): Handle case when we have
16215 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16217 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16220 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16221 flag_section_anchors.
16222 * varasm.c (use_blocks_for_decl_p): Remove hack for
16223 dw2_force_const_mem.
16226 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16228 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16229 be created, use lowpart_subreg of operands[0] rather than operands[0]
16231 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16232 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16233 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16234 and n constraint instead of aarch64_shift_imm_di and Usd.
16235 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16236 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16238 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16241 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16242 to favor GPR over NEON registers.
16243 (<shift>di3_neon): Likewise.
16245 2018-03-20 Tom de Vries <tom@codesourcery.com>
16248 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16249 (nvptx_process_pars): Emit bar.sync asap and alap.
16251 2018-03-20 Tom de Vries <tom@codesourcery.com>
16254 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16255 seen_label if seen_label is already set.
16257 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16260 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16261 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16262 Use 1U instead of 1. Formatting fixes.
16265 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16266 instead of TREE_TYPE (s1) for the return value.
16268 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16270 PR tree-optimization/84946
16271 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16272 bitsize + bitsize in poly_uint64 rather than poly_int64.
16275 * dwarf2asm.c: Include fold-const.c.
16276 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16277 of decl rather than decl itself.
16279 PR rtl-optimization/84643
16280 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16282 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16285 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16286 calling assemble_variable.
16288 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16291 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16292 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16294 2018-03-19 Jim Wilson <jimw@sifive.com>
16297 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16298 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16299 (riscv_first_stack_step): Likewise.
16300 (riscv_option_override): Use STACK_BOUNDARY instead of
16301 MIN_STACK_BOUNDARY.
16302 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16303 MIN_STACK_BOUNDARY.
16304 (BIGGEST_ALIGNMENT): Set to 128.
16305 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16306 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16309 2018-03-19 Richard Biener <rguenther@suse.de>
16311 PR tree-optimization/84933
16312 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16313 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16315 2018-03-19 Richard Biener <rguenther@suse.de>
16317 PR tree-optimization/84859
16318 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16319 (cond_if_else_store_replacement): Perform sinking operation on
16320 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16321 Generalize what a BB with a single eligible store is.
16323 2018-03-19 Richard Biener <rguenther@suse.de>
16325 PR tree-optimization/84929
16326 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16327 chrec_is_positive against non-chrec arg.
16329 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16332 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16334 2018-03-18 Martin Liska <mliska@suse.cz>
16336 PR rtl-optimization/84635
16337 * regrename.c (build_def_use): Use matches_mode only when
16340 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16342 PR tree-optimization/84913
16343 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16344 vectorize chains of COND_EXPRs.
16346 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16348 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16350 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16352 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16354 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16356 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16358 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16359 Kito Cheng <kito.cheng@gmail.com>
16361 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16362 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16363 (nds32_adjust_reg_alloc_order): New function.
16364 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16366 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16368 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16369 nds32_print_operand, nds32_print_operand_address): Use
16370 HOST_WIDE_INT_PRINT_DEC instead.
16372 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16374 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16376 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16379 * config/i386/i386.c (initial_ix86_tune_features,
16380 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16381 unsigned long long.
16382 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16383 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16384 rather than 1u << ix86_tune. Formatting fix.
16385 (ix86_option_override_internal): Change ix86_arch_mask from
16386 unsigned int to unsigned HOST_WIDE_INT, initialize to
16387 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16388 (ix86_function_specific_restore): Likewise.
16390 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16393 * postreload.c (reload_combine_recognize_pattern): Perform
16394 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16395 truncate_int_for_mode the result for the destination's mode.
16398 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16399 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16401 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16404 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16407 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16408 regno_allocno_class_array and sorted_pseudos.
16409 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16410 insns where regno is used.
16412 2018-03-16 Martin Liska <mliska@suse.cz>
16415 * multiple_target.c (create_dispatcher_calls): Redirect
16416 reference in the symbol table.
16418 2018-03-16 Martin Liska <mliska@suse.cz>
16421 * multiple_target.c (create_dispatcher_calls): Redirect also
16424 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16428 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16429 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16430 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16432 2018-03-16 Julia Koval <julia.koval@intel.com>
16434 * doc/invoke.texi (Skylake Server): Add CLWB.
16435 Cannonlake): Remove CLWB.
16437 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16439 PR tree-optimization/84841
16440 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16442 (FLOAT_ONE_CONST_TYPE): Define.
16443 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16444 (sort_by_operand_rank): Put entries with higher constant_type last
16445 rather than first to match comments.
16447 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16449 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16452 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16455 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16456 check and use address of target always.
16458 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16461 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16462 (indirect_thunk_bnd_needed): Likewise.
16463 (indirect_thunks_used): Likewise.
16464 (indirect_thunks_bnd_used): Likewise.
16465 (indirect_return_needed): New.
16466 (indirect_return_bnd_needed): Likewise.
16467 (output_indirect_thunk_function): Add a bool argument for
16469 (output_indirect_thunk_function): Don't generate alias for
16470 function return thunk.
16471 (ix86_code_end): Call output_indirect_thunk_function to generate
16472 function return thunks.
16473 (ix86_output_function_return): Set indirect_return_bnd_needed
16474 and indirect_return_needed instead of indirect_thunk_bnd_needed
16475 and indirect_thunk_needed.
16477 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16479 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16480 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16481 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16483 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16484 Paul Hua <paul.hua.gm@gmail.com>
16487 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16489 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16491 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16492 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16493 resp. SFmode cases.
16495 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16498 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16499 instead of GET_MODE_SIZE when comparing Units.
16501 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16504 * varasm.c (hash_section): Return an unchangeble hash value
16505 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16506 Return !aarch64_can_use_per_function_literal_pools_p ().
16508 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16511 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16512 rather than address of cmode as last argument to prepare_cmp_insn.
16514 2018-03-15 Julia Koval <julia.koval@intel.com>
16516 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16517 F_AVX512VNNI, F_AVX512BITALG): New.
16519 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16522 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16523 insn for floating-point loads and stores.
16525 2018-03-14 Carl Love <cel@us.ibm.com>
16527 * config/rs6000/rs6000-c.c: Add macro definitions for
16528 ALTIVEC_BUILTIN_VEC_PERMXOR.
16529 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16530 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16531 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16532 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16534 * config/doc/extend.texi: Add prototypes for vec_permxor.
16536 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16539 * diagnostic-show-locus.c (class layout_point): Convert m_line
16540 from int to linenum_type.
16541 (line_span::comparator): Use linenum "compare" function when
16542 comparing line numbers.
16543 (test_line_span): New function.
16544 (layout_range::contains_point): Convert param "row" from int to
16546 (layout_range::intersects_line_p): Likewise.
16547 (layout::will_show_line_p): Likewise.
16548 (layout::print_source_line): Likewise.
16549 (layout::should_print_annotation_line_p): Likewise.
16550 (layout::print_annotation_line): Likewise.
16551 (layout::print_leading_fixits): Likewise.
16552 (layout::annotation_line_showed_range_p): Likewise.
16553 (struct line_corrections): Likewise for field m_row.
16554 (line_corrections::line_corrections): Likewise for param "row".
16555 (layout::print_trailing_fixits): Likewise.
16556 (layout::get_state_at_point): Likewise.
16557 (layout::get_x_bound_for_row): Likewise.
16558 (layout::print_line): Likewise.
16559 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16560 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16561 * input.c (selftest::test_linenum_comparisons): New function.
16562 (selftest::input_c_tests): Call it.
16563 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16564 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16565 * selftest.h (ASSERT_GT): New macro.
16566 (ASSERT_GT_AT): New macro.
16567 (ASSERT_LT): New macro.
16568 (ASSERT_LT_AT): New macro.
16570 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16572 PR rtl-optimization/84780
16573 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16575 2018-03-14 Martin Liska <mliska@suse.cz>
16577 * tree.c (record_node_allocation_statistics): Use
16578 get_stats_node_kind.
16579 (get_stats_node_kind): New function extracted from
16580 record_node_allocation_statistics.
16581 (free_node): Use get_stats_node_kind.
16583 2018-03-14 Richard Biener <rguenther@suse.de>
16585 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16586 that the value-set of ANTIC_IN doesn't grow.
16589 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16591 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16592 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16594 2018-03-14 Julia Koval <julia.koval@intel.com>
16596 * config.gcc (icelake-client, icelake-server): New.
16598 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16599 (initial_ix86_arch_features): Ditto.
16600 (PTA_SKYLAKE): Add SGX.
16601 (PTA_ICELAKE): Remove.
16602 (PTA_ICELAKE_CLIENT): New.
16603 (PTA_ICELAKE_SERVER): New.
16604 (ix86_option_override_internal): Split up icelake on icelake client and
16606 (get_builtin_code_for_version): Ditto.
16607 (fold_builtin_cpu): Ditto.
16608 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16609 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16610 * config/i386/i386.h (processor_type): Ditto.
16611 * doc/invoke.texi: Ditto.
16613 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16616 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16617 INTEGER_CST offset, add it together with bitpos / 8 and
16618 sign extend based on POINTER_SIZE.
16622 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16625 * config/i386/constraints.md (Yc): New register constraint.
16626 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16627 Use Yc constraint for alternative 2 of operand 0. Remove
16628 preferred_for_speed attribute.
16630 2018-03-14 Richard Biener <rguenther@suse.de>
16632 PR tree-optimization/84830
16633 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16634 with the old one to avoid oscillations.
16636 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16639 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16641 (assign_by_spills): Return a flag of reload assignment failure.
16642 Do not process the reload assignment failures. Do not spill other
16643 reload pseudos if they has the same reg class. Update n if
16645 (lra_assign): Add a return arg. Set up from the result of
16646 assign_by_spills call.
16647 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16648 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16649 usage_insns if it is not NULL.
16650 (spill_hard_reg_in_range): New function.
16651 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16652 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16653 function prototypes.
16654 (lra_assign): Change prototype.
16655 * lra.c (lra): Add code to deal with fails by splitting hard reg
16658 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16660 * config/riscv/riscv.opt (mrelax): New option.
16661 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16662 "norelax" when riscv_mrelax is disabled.
16663 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16665 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16668 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16669 reassociation for int modes.
16671 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16673 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16674 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16676 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16677 * config/aarch64/aarch64-sve.md
16678 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16679 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16680 (*extend<mode><Vwide>2): Rename to...
16681 (aarch64_sve_extend<mode><Vwide>2): ...this.
16682 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16683 renaming the old pattern to...
16684 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16686 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16687 define_expand, renaming the old pattern to...
16688 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16689 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16690 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16691 account when deciding which SVE instruction the optab should use.
16692 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16694 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16696 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16697 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16698 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16699 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16700 (tlsdesc_small_<mode>): Turn a define_expand and use
16701 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16702 (tlsdesc_small_advsimd_<mode>): ...this.
16703 (tlsdesc_small_sve_<mode>): New pattern.
16705 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16707 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16708 (UNSPEC_UMUL_HIGHPART): New constants.
16709 (MUL_HIGHPART): New int iteraor.
16710 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16711 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16713 (*<su>mul<mode>3_highpart): New define_insn.
16715 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16718 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16721 2018-03-13 Martin Liska <mliska@suse.cz>
16724 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16726 (sem_item_optimizer::~sem_item_optimizer): Release it.
16727 (sem_item_optimizer::merge_classes): Register variable aliases.
16728 (sem_item_optimizer::fixup_pt_set): New function.
16729 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16730 * ipa-icf.h: Declare new variables and functions.
16732 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16734 PR middle-end/84834
16735 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16736 integer_pow2p@2 and test integer_pow2p in condition.
16737 (A < 0 ? C : 0): Similarly for @1.
16739 PR middle-end/84831
16740 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16741 characters starting at p contain '\0' character, don't look beyond
16745 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16746 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16749 * reg-stack.c (change_stack): Change update_end var from int to
16750 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16751 also call set_block_for_insn on the newly added insns and rescan.
16754 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16755 on the last operand.
16758 * tree.c (stabilize_reference_1): Return save_expr (e) for
16759 STATEMENT_LIST even if it doesn't have side-effects.
16761 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16763 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16765 2018-03-12 Renlin Li <renlin.li@arm.com>
16767 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16768 aarch64_output_scalar_simd_mov_immediate.
16770 2018-03-12 Martin Sebor <msebor@redhat.com>
16772 PR tree-optimization/83456
16773 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16774 for perfectly overlapping calls to memcpy.
16775 (gimple_fold_builtin_memory_chk): Same.
16776 (gimple_fold_builtin_strcpy): Handle no-warning.
16777 (gimple_fold_builtin_stxcpy_chk): Same.
16778 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16780 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16782 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16783 parameter. Use it for SFmode.
16784 (rs6000_function_arg_advance_1): Adjust.
16785 (rs6000_function_arg): Adjust.
16786 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16788 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16790 PR rtl-optimization/84169
16791 PR rtl-optimization/84780
16792 * combine.c (can_combine_p): Check for a 2-insn combination whether
16793 the destination register is used between the two insns, too.
16795 2018-03-12 Richard Biener <rguenther@suse.de>
16797 PR tree-optimization/84803
16798 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16799 for refs DR analysis didn't process.
16801 2018-03-12 Richard Biener <rguenther@suse.de>
16803 PR tree-optimization/84777
16804 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16805 force-vectorize loops ignore whether we are optimizing for size.
16807 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16809 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16810 (TARGET_MD_ASM_ADJUST): Define.
16812 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16813 Kito Cheng <kito.cheng@gmail.com>
16814 Chung-Ju Wu <jasonwucj@gmail.com>
16816 * config/nds32/nds32.c (nds32_compute_stack_frame,
16817 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16818 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16819 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16820 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16821 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16822 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16823 * config/nds32/nds32.md (prologue, epilogue): Use macro
16824 NDS32_V3PUSH_AVAILABLE_P to do checking.
16826 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16829 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16830 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16831 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16832 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16833 addition of most attributes on !orig_type_die or the attribute not
16834 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16836 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16837 Chung-Ju Wu <jasonwucj@gmail.com>
16839 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16840 __NDS32_VH__ macro.
16841 * config/nds32/nds32.opt (mvh): New option.
16843 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16844 Chung-Ju Wu <jasonwucj@gmail.com>
16846 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16848 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16849 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16852 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16853 Chung-Ju Wu <jasonwucj@gmail.com>
16855 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16857 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16858 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16860 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16861 Kito Cheng <kito.cheng@gmail.com>
16862 Chung-Ju Wu <jasonwucj@gmail.com>
16864 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16865 UNSPEC_FFMISM and UNSPEC_FLMISM.
16866 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16867 for ffb, ffmism and flmism.
16868 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16869 (unspec_ffmism): Ditto.
16870 (unspec_flmism): Ditto.
16871 (nds32_expand_builtin_impl): Check if string extension is available.
16872 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16873 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16875 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16878 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16881 * lra-assigns.c (assign_by_spills): Return a flag of reload
16882 assignment failure. Do not process the reload assignment
16883 failures. Do not spill other reload pseudos if they has the same
16885 (lra_assign): Add a return arg. Set up from the result of
16886 assign_by_spills call.
16887 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16888 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16889 usage_insns if it is not NULL.
16890 (spill_hard_reg_in_range): New function.
16891 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16892 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16893 function prototypes.
16894 (lra_assign): Change prototype.
16895 * lra.c (lra): Add code to deal with fails by splitting hard reg
16898 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16901 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16903 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16906 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16907 (dw_val_node): Add val_symbolic_view.
16908 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16909 (symview_upper_bound): New.
16910 (new_line_info_table): Initialize symviews_since_reset.
16911 (dwarf2out_source_line): Count symviews_since_reset and set
16912 symview_upper_bound.
16913 (dw_val_equal_p): Handle symview.
16914 (add_AT_symview): New.
16915 (print_dw_val): Handle symview.
16916 (attr_checksum, attr_checksum_ordered): Likewise.
16917 (same_dw_val_p, size_of_die): Likewise.
16918 (value_format, output_die): Likewise.
16919 (add_high_low_attributes): Use add_AT_symview for entry_view.
16920 (dwarf2out_finish): Reset symview_upper_bound, clear
16923 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16926 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16927 Add strict argument and use it.
16928 (rs6000_split_multireg_move): Update for new strict argument.
16929 (mem_operand_gpr): Disallow all non-offsettable addresses.
16930 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16932 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16935 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16936 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16937 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16940 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16941 decl, use remap_type if we want to use the type.
16943 2018-03-09 Martin Sebor <msebor@redhat.com>
16945 PR tree-optimization/84526
16946 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16948 (builtin_access::generic_overlap): Be prepared to handle non-array
16951 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16953 PR rtl-optimization/84682
16954 * lra-constraints.c (process_address_1): Check is_address flag
16955 for address constraints.
16956 (process_alt_operands): Likewise.
16957 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16958 preprocess_constraints.
16959 * recog.h (preprocess_constraints): Add oploc parameter.
16961 * recog.c (preprocess_constraints): Test address_operand for
16962 CT_ADDRESS constraints.
16964 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16967 * lra-assigns.c (assign_by_spills): Return a flag of reload
16968 assignment failure. Do not process the reload assignment
16969 failures. Do not spill other reload pseudos if they has the same
16971 (lra_assign): Add a return arg. Set up from the result of
16972 assign_by_spills call.
16973 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16974 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16975 usage_insns if it is not NULL.
16976 (spill_hard_reg_in_range): New function.
16977 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16978 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16979 function prototypes.
16980 (lra_assign): Change prototype.
16981 * lra.c (lra): Add code to deal with fails by splitting hard reg
16984 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16987 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16988 Accept complain bool parameter. Only emit errors if it is true.
16989 (arm_parse_cpu_option_name): Likewise.
16990 (arm_target_thumb_only): Adjust callers of the above.
16991 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16992 prototype to take a default true bool parameter.
16993 (arm_parse_arch_option_name): Likewise.
16995 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16996 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17000 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17001 * configure: Regenerate.
17002 * configure.ac ("linker --version-script option"): New.
17003 ("linker soname option"): New.
17005 2018-03-09 Richard Biener <rguenther@suse.de>
17007 PR tree-optimization/84775
17008 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17009 immediate uses of predicate stmts and mark them modified.
17012 PR tree-optimization/84178
17013 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17015 (version_loop_for_if_conversion): Delay update_ssa call.
17016 (tree_if_conversion): Delay update_ssa until after predicate
17019 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17022 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17023 when the function accesses prior frames.
17025 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17028 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17029 gen_llsym, otherwise call maybe_gen_llsym.
17031 PR inline-asm/84742
17032 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17033 has ',' character inside of it.
17035 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17038 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17039 as clobbering CC_REGNUM.
17041 2018-03-08 Richard Biener <rguenther@suse.de>
17043 PR middle-end/84552
17044 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17045 (follow_copies_to_constant): Do not follow SSA names registered
17048 2018-03-08 Richard Biener <rguenther@suse.de>
17050 PR tree-optimization/84178
17051 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17053 (version_loop_for_if_conversion): Delay update_ssa call.
17054 (tree_if_conversion): Delay update_ssa until after predicate
17057 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17059 PR tree-optimization/84178
17060 * tree-if-conv.c (release_bb_predicate): Remove the
17061 the assertion that the stmts have NULL use_ops.
17062 Discard the statements, asserting that they haven't
17063 yet been added to a BB.
17065 2018-03-08 Richard Biener <rguenther@suse.de>
17067 PR tree-optimization/84746
17068 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17069 (phi_translate): Pass in destination ANTIC_OUT set.
17070 (phi_translate_1): Likewise. For a simplified result lookup
17071 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17072 (phi_translate_set): Adjust.
17073 (do_pre_regular_insertion): Likewise.
17074 (do_pre_partial_partial_insertion): Likewise.
17076 2018-03-08 Martin Liska <mliska@suse.cz>
17078 PR gcov-profile/84735
17079 * doc/gcov.texi: Document usage of profile files.
17080 * gcov-io.h: Document changes in the format.
17082 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17086 * dwarf2out.c (struct dw_line_info_table): Update comments for
17088 (FORCE_RESET_NEXT_VIEW): New.
17089 (FORCE_RESETTING_VIEW_P): New.
17090 (RESETTING_VIEW_P): Check for -1 too.
17091 (ZERO_VIEW_P): Likewise.
17092 (new_line_info_table): Force-reset next view.
17093 (dwarf2out_begin_function): Likewise.
17094 (dwarf2out_source_line): Simplify zero_view_p initialization.
17095 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17096 view directly. Omit view when omitting .loc at line 0.
17098 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17100 PR tree-optimization/84740
17101 * tree-switch-conversion.c (process_switch): Call build_constructors
17102 only if info.phi_count is non-zero.
17104 PR tree-optimization/84739
17105 * tree-tailcall.c (find_tail_calls): Check call arguments against
17106 DECL_ARGUMENTS (current_function_decl) rather than
17107 DECL_ARGUMENTS (func) when checking for tail recursion.
17109 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17111 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17112 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17113 Volker Reichelt's entry and add entries for people that perform
17114 GCC fuzzy testing and report numerous bugs.
17116 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17119 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17120 readonly data in sdata, if that is disabled.
17121 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17122 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17123 -mreadonly-in-sdata option.
17125 2018-03-07 Martin Sebor <msebor@redhat.com>
17127 PR tree-optimization/84468
17128 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17129 basic block when looking for nul assignment.
17131 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17134 * except.h (output_function_exception_table): Adjust prototype.
17135 * except.c (output_function_exception_table): Remove FNNAME parameter
17136 and add SECTION parameter. Ouput one part of the table at a time.
17137 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17138 the first part of the exception table and emit unwind directives.
17139 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17140 (i386_pe_seh_cold_init): Likewise.
17141 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17142 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17143 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17144 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17145 * config/i386/winnt.c: Include except.h.
17146 (struct seh_frame_state): Add reg_offset, after_prologue and
17147 in_cold_section fields.
17148 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17149 (i386_pe_seh_cold_init): New function.
17150 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17151 to seh->in_cold_section.
17152 (seh_emit_push): Record the offset of the push.
17153 (seh_emit_save): Record the offet of the save.
17154 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17155 Test seh->after_prologue to disregard the epilogue.
17156 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17157 (i386_pe_end_cold_function): New function.
17159 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17162 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17163 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17166 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17168 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17169 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17171 PR middle-end/84723
17172 * multiple_target.c: Include tree-inline.h and intl.h.
17173 (expand_target_clones): Diagnose and fail if node->definition and
17174 !tree_versionable_function_p (node->decl).
17176 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17178 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17180 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17181 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17182 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17184 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17187 * combine.c (try_combine): Use reg_or_subregno instead of handling
17188 just paradoxical SUBREGs and REGs.
17190 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17192 * config/arc/arc.c (arc_finalize_pic): Remove function.
17193 (arc_must_save_register): We use single base PIC register, remove
17194 checks to save/restore the PIC register.
17195 (arc_expand_prologue): Likewise.
17196 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17198 (arc_verify_short): Likewise.
17199 (arc_attr_type): Likewise.
17200 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17201 (walk_stores): Likewise.
17202 (arc_address_cost): Make it static.
17203 (arc_verify_short): Likewise.
17204 (branch_dest): Likewise.
17205 (arc_attr_type): Likewise.
17206 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17207 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17208 (arc_final_prescan_insn): Remove inserting the nops due to
17209 hardware hazards. It is done in reorg step.
17210 (insn_length_variant_t): Remove.
17211 (insn_length_parameters_t): Likewise.
17212 (arc_insn_length_parameters): Likewise.
17213 (arc_get_insn_variants): Likewise.
17214 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17216 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17218 PR inline-asm/84683
17219 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17222 PR tree-optimization/84687
17223 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17225 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17227 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17229 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17230 Rename to ppc_speculation_barrier.
17231 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17232 __builtin_ppc_speculation_barrier.
17234 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17237 * combine.c (combine_simplify_rtx): Don't try to simplify if
17238 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17241 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17243 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17244 to 32 bytes when compiling for POWER9.
17246 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17249 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17250 regparm >= 3 with no arg reg available also for calls with
17251 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17254 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17256 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17258 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17261 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17263 2018-03-05 Richard Biener <rguenther@suse.de>
17265 PR tree-optimization/84486
17266 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17267 When inserting a __builtin_assume_aligned call set the LHS
17268 SSA name alignment info accordingly.
17270 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17272 PR tree-optimization/84114
17273 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17274 Avoid reassociation of FLOAT_MODE addition.
17276 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17278 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17279 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17280 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17281 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17282 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17283 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17284 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17286 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17287 __builtin_ia32_wbinvd): New builtins.
17288 (SPECIAL_ARGS2): New.
17289 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17290 (SPECIAL_ARGS2): New.
17291 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17292 (ix86_valid_target_attribute_inner_p): Ditto.
17293 (ix86_init_mmx_sse_builtins): Add special_args2.
17294 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17295 TARGET_WBNOINVD_P): New.
17296 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17297 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17298 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17299 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17300 * config/i386/pconfigintrin.h: New file.
17301 * config/i386/wbnoinvdintrin.h: Ditto.
17302 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17304 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17306 2018-03-05 Richard Biener <rguenther@suse.de>
17308 PR tree-optimization/84670
17309 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17311 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17312 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17313 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17314 doesn't grow if all successors (recursively) were visited at least
17317 2018-03-05 Richard Biener <rguenther@suse.de>
17319 PR tree-optimization/84650
17320 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17321 if executed in the loop pipeline.
17323 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17325 * doc/configfiles.texi (Configuration Files): Move info about
17326 conditionalizing $target-protos.h to...
17327 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17328 differs from $target-protos.h.
17330 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17331 Chung-Ju Wu <jasonwucj@gmail.com>
17333 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17334 * config/nds32/nds32-multiple.md (setmemsi): Define.
17335 * config/nds32/nds32-memory-manipulation.c
17336 (nds32_gen_dup_4_byte_to_word_value): New.
17337 (emit_setmem_word_loop): New.
17338 (emit_setmem_byte_loop): New.
17339 (nds32_expand_setmem_loop): New.
17340 (nds32_expand_setmem_loop_v3m): New.
17341 (nds32_expand_setmem_unroll): New.
17342 (nds32_expand_setmem): New.
17344 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17345 Chung-Ju Wu <jasonwucj@gmail.com>
17347 * config/nds32/nds32-memory-manipulation.c
17348 (nds32_emit_load_store): New.
17349 (nds32_emit_post_inc_load_store): New.
17350 (nds32_emit_mem_move): New.
17351 (nds32_emit_mem_move_block): New.
17352 (nds32_expand_movmemsi_loop_unknown_size): New.
17353 (nds32_expand_movmemsi_loop_known_size): New.
17354 (nds32_expand_movmemsi_loop): New.
17355 (nds32_expand_movmemsi_unroll): New.
17356 (nds32_expand_movmemqi): Rename ...
17357 (nds32_expand_movmemsi): ... to this.
17358 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17359 (movmemsi): ... to this.
17360 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17361 (nds32_expand_movmemsi): ... to this.
17363 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17364 Monk Chiang <sh.chiang04@gmail.com>
17365 Chung-Ju Wu <jasonwucj@gmail.com>
17367 * config/nds32/nds32-protos.h
17368 (nds32_expand_load_multiple): New arguments.
17369 (nds32_expand_store_multiple): Ditto.
17370 (nds32_valid_multiple_load_store): Rename ...
17371 (nds32_valid_multiple_load_store_p): ... to this.
17372 * config/nds32/nds32-memory-manipulation.c
17373 (nds32_expand_load_multiple): Refine implementation.
17374 (nds32_expand_store_multiple): Ditto.
17375 * config/nds32/nds32-multiple.md
17376 (load_multiple): Update nds32_expand_load_multiple interface.
17377 (store_multiple): Update nds32_expand_store_multiple interface.
17378 * config/nds32/nds32-predicates.c
17379 (nds32_valid_multiple_load_store): Rename ...
17380 (nds32_valid_multiple_load_store_p): ... to this and refine
17382 * config/nds32/predicates.md
17383 (nds32_load_multiple_and_update_address_operation): New predicate.
17384 (nds32_store_multiple_and_update_address_operation): New predicate.
17386 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17387 Chung-Ju Wu <jasonwucj@gmail.com>
17389 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17390 (combo): New attribute.
17391 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17393 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17395 * config/nds32/nds32.opt: Change -mcmodel= default value.
17397 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17398 Monk Chiang <sh.chiang04@gmail.com>
17399 Chung-Ju Wu <jasonwucj@gmail.com>
17401 * config/nds32/constants.md (unspec_element): New enum.
17402 * config/nds32/constraints.md (Umw): New constraint.
17403 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17404 * config/nds32/nds32-intrinsic.md: Likewise.
17405 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17406 (nds32_valid_smw_lwm_base_p): New.
17407 (nds32_output_smw_single_word): New.
17408 (nds32_output_lmw_single_word): New.
17409 (nds32_expand_unaligned_load): New.
17410 (nds32_expand_unaligned_store): New.
17411 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17412 (nds32_output_smw_single_word): Declare.
17413 (nds32_output_lmw_single_word): Declare.
17414 (nds32_expand_unaligned_load): Declare.
17415 (nds32_expand_unaligned_store): Declare.
17416 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17417 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17418 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17419 NDS32_BUILTIN_UASTORE_DW.
17420 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17423 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17424 Kito Cheng <kito.cheng@gmail.com>
17425 Chung-Ju Wu <jasonwucj@gmail.com>
17427 * config/nds32/nds32-intrinsic.c
17428 (nds32_expand_builtin_null_ftype_reg): Delete.
17429 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17430 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17431 (nds32_read_argument): New.
17432 (nds32_legitimize_target): Ditto.
17433 (nds32_legitimize_argument): Ditto.
17434 (nds32_check_constant_argument): Ditto.
17435 (nds32_expand_unop_builtin): Ditto.
17436 (nds32_expand_unopimm_builtin): Ditto.
17437 (nds32_expand_binop_builtin): Ditto.
17438 (nds32_builtin_decl_impl): Ditto.
17439 (builtin_description): Ditto.
17440 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17441 (nds32_init_builtins_impl): Ditto.
17442 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17443 (nds32_builtin_decl): New.
17444 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17445 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17447 2018-03-02 Jeff Law <law@redhat.com>
17449 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17450 (redundant_insn, fill_simple_delay_slots): Likewise.
17451 (fill_slots_from_thread): Likewise.
17452 * resource.c (mark_referenced_resources): Likewise.
17453 (mark_set_resources, find_dead_or_set_registers): Likewise.
17455 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17457 * substring-locations.h (format_warning_va): Formatting fix for
17458 ATTRIBUTE_GCC_DIAG.
17459 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17461 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17462 * substring-locations.c: Include intl.h.
17463 (format_warning_va): Turned into small wrapper around
17464 format_warning_n_va, renamed to ...
17465 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17466 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17468 (format_warning_at_substring_n): New function.
17469 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17470 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17471 format_warning_at_substring with just a shorter name instead of
17472 const function pointer.
17473 (fmtwarn_n): New function.
17474 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17475 appropriate, get rid of all the fmtstr temporaries, move conditionals
17476 with G_() wrapped string literals directly into fmtwarn arguments,
17477 cast dir.len to (int), formatting fixes.
17479 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17481 * doc/invoke.texi: Remove "Cilk Plus" references.
17483 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17484 Richard Biener <rguenther@suse.de>
17487 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17488 for error or warning attributes if CALL_FROM_THUNK_P is set.
17491 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17494 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17495 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17498 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17499 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17501 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17502 instead of -1U in last predictors element's probability member.
17504 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17507 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17508 arguments if they are comparable.
17510 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17512 PR tree-optimization/84634
17513 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17514 masks and masked_loop_p with a single loop_masks, making sure it's
17515 null for bb vectorization.
17517 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17519 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17520 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17521 loop->force_vectorize to check whether there is no alias.
17523 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17526 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17528 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17530 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17531 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17532 instead of a loop around prev_real_insn.
17533 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17536 PR inline-asm/84625
17537 * config/i386/i386.c (ix86_print_operand): Use conditional
17538 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17541 2018-03-02 Richard Biener <rguenther@suse.de>
17543 PR tree-optimization/84427
17544 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17545 (bitmap_set_subtract_values): Rewrite to handle multiple
17548 (prune_clobbered_mems): Likewise.
17549 (phi_translate): Take edge instead of pred/phiblock.
17550 (phi_translate_1): Likewise.
17551 (phi_translate_set): Likewise. Insert all translated
17552 exprs for a value into the set, keeping possibly multiple
17553 expressions per value.
17554 (compute_antic_aux): Adjust for phi_translate changes.
17555 When intersecting union the expressions and prune those
17556 not in the final value set, keeping possibly multiple
17557 expressions per value. Do not use value-insertion
17558 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17559 all expressions. Add verification that the value-sets
17560 only shrink during iteration.
17561 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17562 (do_pre_regular_insertion): Likewise.
17563 (do_pre_partial_partial_insertion): Likewise.
17565 2018-03-02 Richard Biener <rguenther@suse.de>
17568 * config/darwin.c (saved_debug_info_level): New static global.
17569 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17570 (darwin_asm_lto_end): Restore debug info generation settings.
17572 2018-03-01 Martin Liska <mliska@suse.cz>
17575 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17576 volatile arguments.
17578 2018-03-01 Richard Biener <rguenther@suse.de>
17581 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17582 type annotation with LTO when debug was disabled at compile-time.
17584 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17586 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17588 (mips_final_postscan_insn): Likewise.
17590 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17592 PR rtl-optimization/84528
17593 * alias.c (init_alias_target): Add commentary.
17594 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17595 a unique base value if the frame pointer is not eliminated
17596 to the stack pointer.
17598 2018-03-01 Tom de Vries <tom@codesourcery.com>
17600 PR rtl-optimization/83327
17601 * lra-int.h (hard_regs_spilled_into): Declare.
17602 * lra.c (hard_regs_spilled_into): Define.
17603 (init_reg_info): Init hard_regs_spilled_into.
17604 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17605 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17606 (process_bb_lives): Handle hard_regs_spilled_into.
17607 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17608 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17610 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17612 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17613 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17614 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17615 * config/rs6000/aix72.h: New file.
17617 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17619 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17620 instead of warning_at with conditional singular and plural messages
17624 * stor-layout.c (update_alignment_for_field): For
17625 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17626 && !DECL_PACKED (field), do the alignment update, just use
17627 only desired_align instead of MAX (type_align, desired_align)
17629 (place_field): Don't do known_align < desired_align handling
17630 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17631 is non-NULL, instead do it after rli->prev_field handling and
17632 only if not within a bitfield word. For DECL_PACKED (field)
17633 use type_align of BITS_PER_UNIT.
17635 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17637 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17638 superfluous parentheses and trailing spaces.
17640 2018-02-28 Richard Biener <rguenther@suse.de>
17642 PR tree-optimization/84584
17643 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17644 SCoPs with fake exit edge.
17646 2018-02-28 Martin Liska <mliska@suse.cz>
17649 * timevar.c (timer::print): Fix format to properly print 100%
17652 2018-02-28 Richard Biener <rguenther@suse.de>
17654 PR middle-end/84607
17655 * genmatch.c (capture_info::walk_match): Do not mark
17656 captured expressions without operands as expr_p given
17657 they act more like predicates and should be subject to
17658 "lost tail" side-effect preserving.
17660 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17662 PR rtl-optimization/81611
17663 * auto-inc-dec.c (attempt_change): Move dead note from
17664 mem_insn if it's the next use of regno
17665 (find_address): Take address use of reg holding
17666 non-incremented value. Add parm to limit search to the named
17668 (merge_in_block): Attempt to use a mem insn that is the next
17669 use of the original regno.
17671 2018-02-27 Martin Sebor <msebor@redhat.com>
17674 * doc/invoke.texi (-Wmissing-attributes): New option.
17675 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17677 2018-02-27 Martin Sebor <msebor@redhat.com>
17679 PR translation/84207
17680 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17681 n argument to unsigned HOST_WIDE_INT.
17682 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17683 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17684 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17685 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17687 2018-02-27 Richard Biener <rguenther@suse.de>
17689 PR tree-optimization/84512
17690 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17691 Do not use the estimate returned from record_stmt_cost for
17692 the scalar iteration cost but sum properly using add_stmt_cost.
17694 2018-02-27 Richard Biener <rguenther@suse.de>
17696 PR tree-optimization/84466
17697 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17698 Adjust last change to less strictly validate use operands.
17700 2018-02-27 Martin Liska <mliska@suse.cz>
17702 PR gcov-profile/84548
17703 * gcov.c (process_file): Allow partial overlap and consider it
17704 also as group functions.
17705 (output_lines): Properly calculate range of lines for a group.
17707 2018-02-27 Martin Liska <mliska@suse.cz>
17709 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17710 'ggc' suffixes. Change first column width.
17711 (timer::print): Fix formatting of the column.
17713 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17715 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17716 preserve inline entry blocks for the sake of debug inline
17717 entry point markers alone.
17718 (remove_unused_locals): Suggest in comments a better place to
17719 force the preservation of inline entry blocks that are
17720 otherwise unused, but do not preserve them.
17722 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17724 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17726 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17729 * config/i386/constraints.md (Bs): Replace
17730 ix86_indirect_branch_register with
17731 TARGET_INDIRECT_BRANCH_REGISTER.
17733 * config/i386/i386.md (indirect_jump): Likewise.
17734 (tablejump): Likewise.
17735 (*sibcall_memory): Likewise.
17736 (*sibcall_value_memory): Likewise.
17737 Peepholes of indirect call and jump via memory: Likewise.
17738 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17739 (*sibcall_value_GOT_32): Likewise.
17740 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17741 (GOT_memory_operand): Likewise.
17742 (call_insn_operand): Likewise.
17743 (sibcall_insn_operand): Likewise.
17744 (GOT32_symbol_operand): Likewise.
17745 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17747 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17749 PR rtl-optimization/83496
17750 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17751 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17752 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17753 redundant insn, if any.
17754 (relax_delay_slots): Likewise.
17755 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17757 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17759 PR tree-optimization/83965
17760 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17761 that grouped statements are part of a reduction chain. Return
17762 true if the statement is not marked as a reduction itself but
17763 is part of a group.
17764 (vect_recog_dot_prod_pattern): Don't check whether the statement
17765 is part of a group here.
17766 (vect_recog_sad_pattern): Likewise.
17767 (vect_recog_widen_sum_pattern): Likewise.
17769 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17772 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17774 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17777 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17779 (ix86_output_indirect_function_return): New prototype.
17780 (ix86_split_simple_return_pop_internal): Likewise.
17781 * config/i386/i386.c (indirect_return_via_cx): New.
17782 (indirect_return_via_cx_bnd): Likewise.
17783 (indirect_thunk_name): Handle return va CX_REG.
17784 (output_indirect_thunk_function): Create alias for
17785 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17786 (ix86_output_indirect_jmp): Remove the bool argument.
17787 (ix86_output_indirect_function_return): New function.
17788 (ix86_split_simple_return_pop_internal): Likewise.
17789 * config/i386/i386.md (*indirect_jump): Don't pass false
17790 to ix86_output_indirect_jmp.
17791 (*tablejump_1): Likewise.
17792 (simple_return_pop_internal): Change it to define_insn_and_split.
17793 Call ix86_split_simple_return_pop_internal to split it for
17794 -mfunction-return=.
17795 (simple_return_indirect_internal): Call
17796 ix86_output_indirect_function_return instead of
17797 ix86_output_indirect_jmp.
17799 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17802 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17803 memset and value initialization afterwards.
17805 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17807 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17809 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17812 * common/config/aarch64/aarch64-common.c
17813 (aarch_option_optimization_table[]): Switch
17814 off fomit-frame-pointer
17816 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17817 Chung-Ju Wu <jasonwucj@gmail.com>
17819 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17821 (store_multiple): Ditto.
17823 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17825 * config.gcc: Add --with-cpu support for nds32 target.
17826 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17827 * config/nds32/nds32.opt: Add -mcpu= option.
17829 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17831 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17832 isel=yes): Warn for these deprecated options.
17834 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17836 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17837 ISA_2_5_MASKS_EMBEDDED.
17839 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17841 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17842 p->max as pointers rather than using iterative_hash_expr.
17844 2018-02-23 Carl Love <cel@us.ibm.com>
17846 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17847 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17849 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17850 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17851 P8V_BUILTIN_VEC_VUNSIGNED2.
17853 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17856 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17857 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17859 * lra-constraints.c (curr_insn_transform): Set up
17860 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17862 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17863 * lra-eliminations.c (spill_pseudos): Ditto.
17864 (process_insn_for_elimination): Ditto.
17865 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17866 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17867 LRA_NON_CLOBBERED_ALT.
17869 2018-02-22 Martin Sebor <msebor@redhat.com>
17871 PR tree-optimization/84480
17872 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17873 to maybe_diag_stxncpy_trunc. Call it.
17874 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17875 from gimple_fold_builtin_strcpy. Print inlining stack.
17876 (handle_builtin_stxncpy): Print inlining stack.
17877 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17879 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17882 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17883 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17884 and -fcheck-pointer-bounds are used together.
17885 (indirect_thunk_prefix): New enum.
17886 (indirect_thunk_need_prefix): New function.
17887 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17888 "_nt" instead of "_bnd" for NOTRACK prefix.
17889 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17890 (output_indirect_thunk_function): Likewise.
17892 (ix86_code_end): Update output_indirect_thunk_function calls.
17893 (ix86_output_indirect_branch_via_reg): Replace
17894 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17895 (ix86_output_indirect_branch_via_push): Likewise.
17896 (ix86_output_function_return): Likewise.
17897 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17898 incompatible with -fcf-protection=branch and
17899 -fcheck-pointer-bounds.
17901 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17904 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17905 Change gcc_assert call to output_operand_lossage.
17907 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17909 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17911 2018-02-22 DJ Delorie <dj@redhat.com>
17912 Sebastian Perta <sebastian.perta@renesas.com>
17913 Oleg Endo <olegendo@gcc.gnu.org>
17915 * config/rx/rx.c (rx_rtx_costs): New function.
17916 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17918 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17920 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17922 2018-02-22 Martin Liska <mliska@suse.cz>
17925 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17926 Add "native" as a possible value.
17928 2018-02-22 Martin Liska <mliska@suse.cz>
17931 * config/i386/i386.c (ix86_option_override_internal):
17932 Add "native" as a possible value for -march and -mtune.
17934 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17937 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17938 to all type variants.
17940 PR tree-optimization/84503
17941 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17942 width as info->bitpos + info->bitsize - start.
17943 (merged_store_group::merge_overlapping): Simplify width computation.
17944 (check_no_overlap): New function.
17945 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17946 start + width and last_order of the group, fail if check_no_overlap
17948 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17949 to group if check_no_overlap fails.
17951 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17953 * config/rs6000/altivec.md: Delete contraint arguments to
17954 define_expand, define_split, and define_peephole2, and in
17955 define_insn_and_split if always unused.
17956 * config/rs6000/darwin.md: Ditto.
17957 * config/rs6000/dfp.md: Ditto.
17958 * config/rs6000/rs6000.md: Ditto.
17959 * config/rs6000/sync.md: Ditto.
17960 * config/rs6000/vector.md: Ditto.
17961 * config/rs6000/vsx.md: Ditto.
17963 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17965 * config/rs6000/altivec.md: Write output control strings as braced
17966 blocks instead of double-quoted strings.
17967 * config/rs6000/darwin.md: Ditto.
17968 * config/rs6000/rs6000.md: Ditto.
17969 * config/rs6000/vector.md: Ditto.
17970 * config/rs6000/vsx.md: Ditto.
17972 2018-02-21 Jason Merrill <jason@redhat.com>
17974 PR c++/84314 - ICE with templates and fastcall attribute.
17975 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17977 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17979 * ipa-cp.c (determine_versionability): Fix comment typos.
17981 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17984 * ipa-cp.c (determine_versionability): Do not version functions caling
17987 2018-02-21 Martin Liska <mliska@suse.cz>
17990 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17991 Add "native" as a possible value.
17992 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17993 the macro when native cpu detection is available.
17995 2018-02-21 Martin Liska <mliska@suse.cz>
17998 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17999 Add "native" as a possible value.
18000 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18001 when native cpu detection is available.
18003 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18004 Martin Sebor <msebor@redhat.com>
18006 PR tree-optimization/84478
18007 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18009 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18010 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18011 support which is conservatively correct, for 2 only stay conservative
18012 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18013 argument to the 2 argument get_range_strlen, adjust 6 arg
18014 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18016 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18017 (gimple_fold_builtin_strlen): Pass true as last argument to
18020 2018-02-20 Martin Sebor <msebor@redhat.com>
18022 PR middle-end/84095
18023 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18024 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18025 (builtin_memref::builtin_memref): Factor out parts into
18026 set_base_and_offset and call it.
18028 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18030 PR middle-end/84406
18031 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18032 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18033 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18034 search at the associated MODE_INT.
18036 2018-02-20 Jeff Law <law@redhat.com>
18038 PR middle-end/82123
18039 PR tree-optimization/81592
18040 PR middle-end/79257
18041 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18042 for range data rather than using global data.
18043 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18044 range data rather than using global data.
18045 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18046 pass it to children as needed.
18047 (struct directive::fmtresult): Similarly.
18048 (struct directive::set_width): Similarly.
18049 (struct directive::set_precision): Similarly.
18050 (format_integer, format_directive, parse_directive): Similarly.
18051 (format_none): Accept unnamed vr_values parameter.
18052 (format_percent, format_floating, format_character): Similarly.
18053 (format_string, format_plain): Similarly.
18054 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18055 the EVRP range analyzer for range data rather than using global data.
18056 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18057 gimple-ssa-evrp-analyze.h
18058 (class sprintf_dom_walker): Add after_dom_children member function.
18059 Add evrp_range_analyzer member.
18060 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18061 range analyzer as needed.
18062 (sprintf_dom_walker::after_dom_children): New member function.
18063 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18065 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18066 (evrp_range_analyzer::pop_to_marker): Likewise.
18068 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18070 PR tree-optimization/84419
18071 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18072 with the required type if its current type is compatible but
18075 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18077 PR middle-end/82004
18078 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18079 after vectorization.
18081 2018-02-20 Martin Liska <mliska@suse.cz>
18084 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18085 possible values if we don't have a hint.
18087 2018-02-20 Martin Liska <mliska@suse.cz>
18091 * final.c (shorten_branches): Build align_tab array with one
18093 * opts.c (finish_options): Add alignment option limit check.
18094 (MAX_CODE_ALIGN): Likewise.
18095 (MAX_CODE_ALIGN_VALUE): Likewise.
18096 * doc/invoke.texi: Document maximum allowed option value for
18097 all -falign-* options.
18099 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18102 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18103 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18104 * var-tracking.c (emit_note_insn_var_location): Remove all references
18105 to NOTE_INSN_CALL_ARG_LOCATION.
18106 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18107 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18108 Use copy_rtx_if_shared.
18109 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18110 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18111 (dwarf2out_var_location): Remove handling of
18112 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18114 * final.c (final_scan_insn): Remove all references to
18115 NOTE_INSN_CALL_ARG_LOCATION.
18116 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18117 before dumping final insns.
18118 * except.c (emit_note_eh_region_end): Remove all references to
18119 NOTE_INSN_CALL_ARG_LOCATION.
18120 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18121 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18122 * config/arc/arc.c (hwloop_optimize): Likewise.
18123 * config/arm/arm.c (create_fix_barrier): Likewise.
18124 * config/s390/s390.c (s390_chunkify_start): Likewise.
18125 * config/sh/sh.c (find_barrier): Likewise.
18126 * config/i386/i386.c (rest_of_insert_endbranch,
18127 ix86_seh_fixup_eh_fallthru): Likewise.
18128 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18129 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18130 * config/frv/frv.c (frv_function_prologue): Likewise.
18131 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18133 (note_outside_basic_block_p): Remove all references to
18134 NOTE_INSN_CALL_ARG_LOCATION.
18135 * gengtype.c (adjust_field_rtx_def): Likewise.
18136 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18138 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18139 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18142 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18145 PR tree-optimization/84452
18146 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18147 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18150 2018-02-19 Martin Liska <mliska@suse.cz>
18153 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18155 2018-02-19 Martin Liska <mliska@suse.cz>
18156 Richard Sandiford <richard.sandiford@linaro.org>
18158 PR tree-optimization/82491
18159 * gimple-fold.c (get_base_constructor): Make earlier bail out
18162 2018-02-19 Carl Love <cel@us.ibm.com>
18164 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18165 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18167 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18168 P8V_BUILTIN_VEC_NEG.
18170 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18172 * config/rl78/rl78.md (movdf): New define expand.
18174 2018-02-19 Martin Liska <mliska@suse.cz>
18177 * doc/invoke.texi: Fix typo.
18178 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18180 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18182 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18183 handle rs6000_single_float and rs6000_double_float specially for
18186 2018-02-16 Jeff Law <law@redhat.com>
18188 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18189 (pop_regs): Use it.
18191 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18194 * ipa-inline.c (inline_small_functions): Fix a typo.
18196 2018-02-16 Nathan Sidwell <nathan@acm.org>
18198 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18200 2018-02-16 Carl Love <cel@us.ibm.com>
18202 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18203 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18204 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18205 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18206 expansion to P8V_BUILTIN_VEC_FLOAT2.
18208 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18210 PR rtl-optimization/70023
18211 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18212 src_regno into account.
18214 2018-02-16 Carl Love <cel@us.ibm.com>
18216 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18217 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18218 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18219 * config/rs6000/rs6000.c: Remove case statements for
18220 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18221 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18222 and P9V_BUILTIN_VEC_VINSERT4B.
18223 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18224 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18225 * config/rs6000/vsx.md:
18226 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18229 2018-02-16 Carl Love <cel@us.ibm.com>
18231 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18233 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18235 * config/rs6000/rs6000-c.c: Add the definitions for
18236 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18237 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18238 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18239 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18240 definition for insert4b and define insn *insert3b_internal.
18241 * doc/extend.texi: Add documentation for vec_extract4b.
18243 2018-02-16 Nathan Sidwell <nathan@acm.org>
18245 * doc/extend.texi (Backwards Compatibility): Mention friend
18246 injection. Note for-scope is deprecated.
18247 * doc/invoke.texi (-ffriend-injection): Deprecate.
18249 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18251 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18252 that moved to I2, also allow destinations that are a paradoxical
18253 subreg (instead of a normal reg).
18255 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18258 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18261 2018-02-16 Richard Biener <rguenther@suse.de>
18263 PR tree-optimization/84037
18264 PR tree-optimization/84016
18266 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18267 Adjust vec_construct for the fact we need additional higher latency
18268 128bit inserts for AVX256 and AVX512 vector builds.
18269 (ix86_add_stmt_cost): Scale vector construction cost for
18272 2018-02-16 Richard Biener <rguenther@suse.de>
18274 PR tree-optimization/84417
18275 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18276 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18277 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18279 2018-02-16 Martin Liska <mliska@suse.cz>
18282 * internal-fn.def (ASAN_CHECK): Set proper flags.
18283 (ASAN_MARK): Likewise.
18285 2018-02-16 Julia Koval <julia.koval@intel.com>
18287 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18288 from PTA_CANNONLAKE.
18290 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18293 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18294 Use ++iter rather than iter++ for std::list iterators.
18295 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18296 defer deleting them until all nodes in the forest are processed. Do
18297 free even leaf nodes. Change to_process into auto_vec.
18300 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18301 * vec.h (vec_default_construct): Use memset instead of placement new
18302 if BROKEN_VALUE_INITIALIZATION is defined.
18303 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18304 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18307 PR rtl-optimization/83723
18308 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18309 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18310 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18312 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18314 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18316 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18318 PR rtl-optimization/81443
18319 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18320 from inner REGs to paradoxical SUBREGs.
18322 2018-02-16 Richard Biener <rguenther@suse.de>
18324 PR tree-optimization/84399
18325 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18326 For operands we can analyze at their definition make sure we can
18327 analyze them at each use as well.
18329 2018-02-16 Richard Biener <rguenther@suse.de>
18331 PR tree-optimization/84190
18332 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18333 volatile accesses if the decl isn't volatile.
18335 2018-02-15 Jason Merrill <jason@redhat.com>
18337 PR c++/84314 - ICE with templates and fastcall attribute.
18338 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18339 TYPE_CANONICAL on an existing type.
18341 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18343 PR tree-optimization/84383
18344 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18345 dstoff nor call operand_equal_p if dstbase is NULL.
18347 PR tree-optimization/84334
18348 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18349 also a CONSTANT_CLASS_P, punt.
18351 2018-02-14 Jim Wilson <jimw@sifive.com>
18353 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18354 first SMALL_OPERAND check. New local min_second_step. Move assert
18355 to where locals are set. Add TARGET_RVC support.
18356 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18358 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18360 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18362 2018-02-14 Martin Sebor <msebor@redhat.com>
18364 PR tree-optimization/83698
18365 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18366 arrays constrain the offset range to their bounds.
18367 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18368 (builtin_access::overlap): Avoid setting the size of overlap if it's
18370 (maybe_diag_overlap): Also consider arrays when deciding what values
18371 of offsets to include in diagnostics.
18373 2018-02-14 Martin Sebor <msebor@redhat.com>
18376 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18377 that correspond to the kind of a declaration.
18379 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18382 * config/pa/pa.md: Load address of PIC label using the linkage table
18383 if the label is nonlocal.
18385 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18387 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18388 warning message if user requests -maltivec=be.
18389 * doc/invoke.texi: Document deprecation of -maltivec=be.
18391 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18394 * config/rs6000/rs6000-c.c: Update definitions for
18395 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18396 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18398 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18401 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18402 add _get_ssp intrinsics. Remove argument from
18403 __builtin_ia32_rdssp[d|q].
18404 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18405 * config/i386/i386-builtin.def: Remove argument from
18406 __builtin_ia32_rdssp[d|q].
18407 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18408 ix86_expand_special_args_builtin for _rdssp[d|q].
18409 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18410 Clear register before usage.
18411 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18412 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18414 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18416 PR tree-optimization/84357
18417 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18418 operand 1 of an ARRAY_REF too.
18420 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18423 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18424 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18426 (set_of_reg): New struct.
18427 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18428 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18429 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18431 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18432 Split into bitclr, bitset, bitinvert patterns if appropriate.
18433 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18434 use rx_fuse_in_memory_bitop.
18435 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18436 to named insn, correct maximum insn length.
18438 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18441 * machmode.def: Define a complex mode for PARTIAL_INT.
18442 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18444 * doc/rtl.texi: Document CSPImode.
18445 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18447 (msp430_hard_regno_nregs_with_padding): Likewise.
18449 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18452 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18454 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18456 PR rtl-optimization/84169
18457 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18458 we generated a parallel as new i3 and we split that to new i2 and i3
18459 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18460 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18461 those to i2, not i1. Partially rewrite this scan code.
18463 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18466 * stor-layout.c (place_field): For variable length fields, adjust
18467 offset_align afterwards not just based on the field's alignment,
18468 but also on the size.
18470 PR middle-end/84309
18471 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18472 of exps and logs in the use_exp2 case.
18474 2018-02-13 Jeff Law <law@redhat.com>
18476 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18477 entry for "vector".
18479 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18482 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18486 * common.opt (gas-loc-support, gas-locview-support): New.
18487 (ginline-points, ginternal-reset-location-views): New.
18488 * doc/invoke.texi: Document them. Use @itemx where intended.
18489 (gvariable-location-views): Adjust.
18490 * target.def (reset_location_view): New.
18491 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18492 (TARGET_RESET_LOCATION_VIEW): New.
18493 * doc/tm.texi: Rebuilt.
18494 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18495 (dwarf2out_default_as_locview_support): New.
18496 (output_asm_line_debug_info): Use option variables.
18497 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18498 (output_loc_list): Likewise.
18499 (add_high_low_attributes): Check option variables.
18500 Don't output entry view attribute in strict mode.
18501 (gen_inlined_subroutine_die): Check option variables.
18502 (dwarf2out_inline_entry): Likewise.
18503 (init_sections_and_labels): Likewise.
18504 (dwarf2out_early_finish): Likewise.
18505 (maybe_reset_location_view): New, from...
18506 (dwarf2out_var_location): ... here. Call it.
18507 * debug.h (dwarf2out_default_as_loc_support): Declare.
18508 (dwarf2out_default_as_locview_support): Declare.
18509 * hooks.c (hook_int_rtx_insn_0): New.
18510 * hooks.h (hook_int_rtx_insn_0): Declare.
18511 * toplev.c (process_options): Take -gas-loc-support and
18512 -gas-locview-support from dwarf2out. Enable
18513 -gvariable-location-views by default only with locview
18514 assembler support. Enable -ginternal-reset-location-views by
18515 default only if the target defines the corresponding hook.
18516 Enable -ginline-points by default if location views are
18517 enabled; force it disabled if statement frontiers are
18519 * tree-inline.c (expand_call_inline): Check option variables.
18520 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18522 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18524 PR tree-optimization/84321
18525 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18526 handling. Also check whether the anti-range contains any values
18527 that satisfy the mask; switch to a VR_RANGE if not.
18529 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18532 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18534 2018-02-13 Martin Jambor <mjambor@suse.cz>
18537 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18538 of call statements, also set location of a load to a temporary.
18540 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18542 * config/rl78/rl78.c (add_vector_labels): New function.
18543 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18544 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18545 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18546 which checks that no arguments are passed.
18547 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18548 * doc/extend.texi: Documentation for the new attribute.
18550 2018-02-13 Andreas Schwab <schwab@suse.de>
18552 * config/riscv/linux.h (CPP_SPEC): Define.
18554 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18557 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18558 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18559 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18560 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18561 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18562 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18563 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18564 temporarily for AES and PCLMUL builtins.
18566 PR tree-optimization/84339
18567 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18568 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18571 PR middle-end/84309
18572 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18573 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18574 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18576 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18578 * omp-simd-clone.h: New file.
18579 * omp-simd-clone.c: Include omp-simd-clone.h.
18580 (expand_simd_clones): No longer static.
18581 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18582 cgraph.h and omp-simd-clone.h.
18583 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18584 (vect_recog_widen_shift_pattern): Formatting fix.
18585 (vect_pattern_recog_1): Don't check optab for calls.
18588 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18589 operands[2] into a REG before using gen_lowpart on it.
18591 2018-02-12 Jeff Law <law@redhat.com>
18594 * config/sh/sh.c (find_barrier): Consider a sibling call
18597 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18598 successfully back substituting a reg.
18600 2018-02-12 Richard Biener <rguenther@suse.de>
18602 PR tree-optimization/84037
18603 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18604 parameter, move visited init to caller.
18605 (vect_slp_analyze_operations): Separate cost from validity
18606 check, initialize visited once for all instances.
18607 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18609 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18611 (vect_model_promotion_demotion_cost): Likewise.
18612 (vectorizable_bswap): Guard cost modeling with !slp_node
18613 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18615 (vectorizable_call): Likewise.
18616 (vectorizable_conversion): Likewise.
18617 (vectorizable_assignment): Likewise.
18618 (vectorizable_shift): Likewise.
18619 (vectorizable_operation): Likewise.
18620 (vectorizable_store): Likewise.
18621 (vectorizable_load): Likewise.
18622 (vectorizable_condition): Likewise.
18623 (vectorizable_comparison): Likewise.
18625 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18628 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18629 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18630 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18632 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18634 PR middle-end/83665
18635 * params.def (inline-min-speedup): Increase from 8 to 15.
18636 (max-inline-insns-auto): Decrease from 40 to 30.
18637 * ipa-split.c (consider_split): Add some buffer for function to
18638 be considered inlining candidate.
18639 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18642 2018-02-12 Richard Biener <rguenther@suse.de>
18644 PR tree-optimization/84037
18645 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18646 matched stmts if we cannot swap the non-matched ones.
18648 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18650 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18651 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18652 _mm_maskz_scalef_round_ss): New intrinsics.
18653 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18654 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18655 __builtin_ia32_scalefss_round): Remove.
18656 (__builtin_ia32_scalefsd_mask_round,
18657 __builtin_ia32_scalefss_mask_round): New intrinsics.
18658 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18659 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18660 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18661 "<round_constraint>")): Changed to ...
18662 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18663 "<round_scalar_constraint>")): ... this.
18664 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18665 %0, %1, %2<round_op3>}"): Changed to ...
18666 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18667 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18668 %2<round_scalar_mask_op3>}"): ... this.
18669 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18671 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18673 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18674 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18675 (_mm_maskz_sqrt_round_ss): New intrinsics.
18676 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18677 (__builtin_ia32_sqrtsd_mask_round)
18678 (__builtin_ia32_sqrtss_mask_round): New builtins.
18679 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18680 (__builtin_ia32_sqrtss_round): Remove.
18681 (__builtin_ia32_sqrtsd_mask_round)
18682 (__builtin_ia32_sqrtss_mask_round): New builtins.
18683 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18684 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18685 ((match_operand:VF_128 1 "vector_operand"
18686 "xBm,<round_constraint>")): Changed to ...
18687 ((match_operand:VF_128 1 "vector_operand"
18688 "xBm,<round_scalar_constraint>")): ... this.
18689 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18690 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18691 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18692 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18693 %<iptr>1<round_scalar_mask_op3>}): ... this.
18694 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18695 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18697 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18700 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18701 Cast vec_cmpeq result to correct type.
18702 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18703 Cast vec_cmpgt result to correct type.
18705 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18707 * final.c (final_scan_insn_1): Renamed from...
18708 (final_scan_insn): ... this. New wrapper, to recover
18709 seen from the outermost call in recursive ones.
18710 * config/sparc/sparc.c (output_return): Drop seen from call.
18711 (output_sibcall): Likewise.
18712 * config/visium/visium.c (output_branch): Likewise.
18714 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18716 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18719 2018-02-10 Alan Modra <amodra@gmail.com>
18722 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18723 Specify LR as an input.
18725 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18728 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18729 remove_member_access_dummy_vars): New functions.
18730 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18731 lower_omp_1, execute_lower_omp): Use them.
18733 PR rtl-optimization/84308
18734 * shrink-wrap.c (spread_components): Release todo vector.
18736 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18738 PR rtl-optimization/57193
18739 * ira-color.c (struct allocno_color_data): Add member
18740 conflict_allocno_hard_prefs.
18741 (update_conflict_allocno_hard_prefs): New.
18742 (bucket_allocno_compare_func): Add a preference based on
18743 conflict_allocno_hard_prefs.
18744 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18745 (color_allocnos): Remove a dead code. Initiate
18746 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18748 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18751 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18752 constraint from =wa to wa. Avoid a subreg on the output operand,
18753 instead use a pseudo and subreg it in a move.
18754 (p9_xxbrd_<mode>): Changed to ...
18755 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18756 (p9_xxbrd_v2df): New expander.
18757 (p9_xxbrw_<mode>): Changed to ...
18758 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18759 (p9_xxbrw_v4sf): New expander.
18761 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18763 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18765 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18768 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18769 multiply in 32-bit mode.
18770 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18771 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18774 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18776 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18777 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18778 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18779 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18781 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18784 * dwarf2out.c (is_trivial_indirect_ref): New function.
18785 (dwarf2out_late_global_decl): Do not generate a location
18786 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18787 and that are not defined in the current unit.
18789 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18791 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18792 instead of a libcall for UNORDERED.
18794 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18797 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18798 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18800 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18803 * config/s390/s390.c (s390_set_current_function): Invoke
18804 s390_indirect_branch_settings also if fndecl didn't change.
18806 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18808 * config/rs6000/rs6000.md (blockage): Set length to zero.
18810 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18812 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18814 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18817 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18818 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18822 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18823 PARALLEL incoming that failed vt_get_decl_and_offset check.
18825 PR middle-end/84237
18826 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18827 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18829 (get_variable_section): For decls in named .bss* sections pass true as
18830 second argument to bss_initializer_p.
18832 2018-02-09 Marek Polacek <polacek@redhat.com>
18833 Jakub Jelinek <jakub@redhat.com>
18836 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18837 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18838 Sync some changes from cxx_fold_indirect_ref.
18840 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18842 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18844 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18845 (BLOCK_INLINE_ENTRY_LABEL): New.
18846 (dwarf2out_var_location): Disregard inline entry markers.
18847 (inline_entry_data): New struct.
18848 (inline_entry_data_hasher): New hashtable type.
18849 (inline_entry_data_hasher::hash): New.
18850 (inline_entry_data_hasher::equal): New.
18851 (inline_entry_data_table): New variable.
18852 (add_high_low_attributes): Add DW_AT_entry_pc and
18853 DW_AT_GNU_entry_view attributes if a pending entry is found
18854 in inline_entry_data_table. Add old entry_pc attribute only
18855 if debug nonbinding markers are disabled.
18856 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18857 markers are enabled.
18858 (block_within_block_p, dwarf2out_inline_entry): New.
18859 (dwarf2out_finish): Check that no entries remained in
18860 inline_entry_data_table.
18861 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18862 (final_scan_insn, notice_source_line): Likewise.
18863 (rest_of_clean_state): Skip inline entry markers.
18864 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18866 * gimple.c (gimple_build_debug_inline_entry): New.
18867 * gimple.h (enum gimple_debug_subcode): Add
18868 GIMPLE_DEBUG_INLINE_ENTRY.
18869 (gimple_build_debug_inline_entry): Declare.
18870 (gimple_debug_inline_entry_p): New.
18871 (gimple_debug_nonbind_marker_p): Adjust.
18872 * insn-notes.def (INLINE_ENTRY): New.
18873 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18874 inline entry marker notes.
18875 (print_insn): Likewise.
18876 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18877 (INSN_DEBUG_MARKER_KIND): Likewise.
18878 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18879 * tree-inline.c (expand_call_inline): Build and insert
18880 debug_inline_entry stmt.
18881 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18882 inline entry blocks early, if nonbind markers are enabled.
18883 (dump_scope_block): Dump fragment info.
18884 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18885 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18886 (gimple_build_debug_inline_entry): New.
18887 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18888 Enable/disable inline entry points too.
18889 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18890 (DEBUG_INSN): Describe inline entry markers.
18892 * common.opt (gvariable-location-views): New.
18893 (gvariable-location-views=incompat5): New.
18894 * config.in: Rebuilt.
18895 * configure: Rebuilt.
18896 * configure.ac: Test assembler for view support.
18897 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18898 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18899 * dwarf2out.c (var_loc_view): New typedef.
18900 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18901 (dwarf2out_locviews_in_attribute): New.
18902 (dwarf2out_locviews_in_loclist): New.
18903 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18904 (enum dw_line_info_opcode): Add LI_adv_address.
18905 (struct dw_line_info_table): Add view.
18906 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18907 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18908 (zero_view_p): New variable.
18909 (ZERO_VIEW_P): New macro.
18910 (output_asm_line_debug_info): New.
18911 (struct var_loc_node): Add view.
18912 (add_AT_view_list, AT_loc_list): New.
18913 (add_var_loc_to_decl): Add view param. Test it against last.
18914 (new_loc_list): Add view params. Record them.
18915 (AT_loc_list_ptr): Handle loc and view lists.
18916 (view_list_to_loc_list_val_node): New.
18917 (print_dw_val): Handle dw_val_class_view_list.
18918 (size_of_die): Likewise.
18919 (value_format): Likewise.
18920 (loc_list_has_views): New.
18921 (gen_llsym): Set vl_symbol too.
18922 (maybe_gen_llsym, skip_loc_list_entry): New.
18923 (dwarf2out_maybe_output_loclist_view_pair): New.
18924 (output_loc_list): Output view list or entries too.
18925 (output_view_list_offset): New.
18926 (output_die): Handle dw_val_class_view_list.
18927 (output_dwarf_version): New.
18928 (output_compilation_unit_header): Use it.
18929 (output_skeleton_debug_sections): Likewise.
18930 (output_rnglists, output_line_info): Likewise.
18931 (output_pubnames, output_aranges): Update version comments.
18932 (output_one_line_info_table): Output view numbers in asm comments.
18933 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18934 Call maybe_gen_llsym.
18935 (loc_list_from_tree_1): Adjust.
18936 (add_AT_location_description): Create view list attribute if
18937 needed, check it's absent otherwise.
18938 (convert_cfa_to_fb_loc_list): Adjust.
18939 (maybe_emit_file): Call output_asm_line_debug_info for test.
18940 (dwarf2out_var_location): Reset views as needed. Precompute
18941 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18942 attribute. Set view.
18943 (new_line_info_table): Reset next view.
18944 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18945 (dwarf2out_source_line): Likewise. Output view resets and labels to
18946 the assembler, or select appropriate line info opcodes.
18947 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18948 (optimize_string_length): Catch it. Adjust.
18949 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18950 dw_val_class_view_list, and remove it if no longer needed.
18951 (hash_loc_list): Hash view numbers.
18952 (loc_list_hasher::equal): Compare them.
18953 (optimize_location_lists): Check whether a view list symbol is
18954 needed, and whether the locview attribute is present, and
18955 whether they match. Remove the locview attribute if no longer
18957 (index_location_lists): Call skip_loc_list_entry for test.
18958 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18959 Use output_dwarf_version.
18960 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18961 (struct dw_val_node): Add val_view_list.
18962 * final.c (SEEN_NEXT_VIEW): New.
18963 (set_next_view_needed): New.
18964 (clear_next_view_needed): New.
18965 (maybe_output_next_view): New.
18966 (final_start_function): Rename to...
18967 (final_start_function_1): ... this. Take pointer to FIRST,
18968 add SEEN parameter. Emit param bindings in the initial view.
18969 (final_start_function): Reintroduce SEEN-less interface.
18970 (final): Rename to...
18971 (final_1): ... this. Take SEEN parameter. Output final pending
18972 next view at the end.
18973 (final): Reintroduce seen-less interface.
18974 (final_scan_insn): Output pending next view before switching
18975 sections or ending a block. Mark the next view as needed when
18976 outputting variable locations. Notify debug backend of section
18977 changes, and of location view changes.
18978 (rest_of_handle_final): Adjust.
18979 * toplev.c (process_options): Autodetect value for debug variable
18980 location views option. Warn on incompat5 without -gdwarf-5.
18981 * doc/invoke.texi (gvariable-location-views): New.
18982 (gvariable-location-views=incompat5): New.
18983 (gno-variable-location-views): New.
18985 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18987 PR tree-optimization/84136
18988 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18989 that the result of find_edge is non-NULL.
18991 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18994 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18995 storing integer register in SImode. Fix cost of 256 and 512
18996 byte aligned SSE register store.
18998 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19000 * config/i386/i386.c (ix86_multiplication_cost): Fix
19001 multiplication cost for TARGET_AVX512DQ.
19003 2018-02-08 Marek Polacek <polacek@redhat.com>
19005 PR tree-optimization/84238
19006 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19009 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19011 PR tree-optimization/84265
19012 * tree-vect-stmts.c (vectorizable_store): Don't treat
19013 VMAT_CONTIGUOUS accesses as grouped.
19014 (vectorizable_load): Likewise.
19016 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19018 PR tree-optimization/81635
19019 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19020 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19021 (test_round_for_mask): New functions.
19022 (wide_int_cc_tests): Call test_round_for_mask.
19023 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19024 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19025 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19026 range returned by get_range_info.
19028 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19031 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19032 * symtab.c: Include builtins.h
19033 (symtab_node::output_to_lto_symbol_table_p): Move here
19034 from lto-streamer-out.c:output_symbol_p.
19035 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19036 (output_symbol_p): Move all logic to symtab.c
19037 (produce_symtab): Update.
19039 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19041 * config/s390/s390-opts.h (enum indirect_branch): Define.
19042 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19043 (s390_indirect_branch_via_thunk)
19044 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19045 (enum s390_indirect_branch_type): Define.
19046 * config/s390/s390.c (struct s390_frame_layout, struct
19047 machine_function): Remove.
19048 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19049 (indirect_branch_table_label_no, indirect_branch_table_name):
19051 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19052 (enum s390_indirect_branch_option): Define.
19053 (s390_return_addr_from_memory): New function.
19054 (s390_handle_string_attribute): New function.
19055 (s390_attribute_table): Add new attribute handler.
19056 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19057 (s390_indirect_branch_via_thunk): New function.
19058 (s390_indirect_branch_via_inline_thunk): New function.
19059 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19060 sibling call optimization for non z10 compiles.
19061 (s390_emit_call): Force indirect branch target to be a single
19062 register. Add r1 clobber for non-z10 compiles.
19063 (s390_emit_epilogue): Emit return jump via return_use expander.
19064 (s390_reorg): Handle JUMP_INSNs as execute targets.
19065 (s390_option_override_internal): Perform validity checks for the
19066 new command line options.
19067 (s390_indirect_branch_attrvalue): New function.
19068 (s390_indirect_branch_settings): New function.
19069 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19070 (s390_output_indirect_thunk_function): New function.
19071 (s390_code_end): Implement target hook.
19072 (s390_case_values_threshold): Implement target hook.
19073 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19075 * config/s390/s390.h (struct s390_frame_layout)
19076 (struct machine_function): Move here from s390.c.
19077 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19078 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19079 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19080 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19081 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19082 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19083 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19084 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19085 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19086 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19087 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19088 (mnemonic attribute): Add values which aren't recognized
19090 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19091 pattern for branch conversion. Fix mnemonic attribute.
19092 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19093 indirect branch via thunk if requested.
19094 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19095 ("*indirect_jump"): Disable for branch conversion using out of
19097 ("indirect_jump_via_thunk<mode>_z10")
19098 ("indirect_jump_via_thunk<mode>")
19099 ("indirect_jump_via_inlinethunk<mode>_z10")
19100 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19101 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19102 ("casesi_jump_via_inlinethunk<mode>_z10")
19103 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19104 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19105 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19106 ("*indirect2_jump"): Disable for branch conversion.
19107 ("casesi_jump"): Turn into expander and expand patterns for branch
19109 ("return_use"): New expander.
19110 ("*return"): Emit return via thunk and rename it to ...
19111 ("*return<mode>"): ... this one.
19112 * config/s390/s390.opt: Add new options and and enum for the
19115 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19117 * lra-constraints.c (match_reload): Unconditionally use
19118 gen_lowpart_SUBREG, rather than selecting between that
19119 and equivalent gen_rtx_SUBREG code.
19121 2018-02-08 Richard Biener <rguenther@suse.de>
19123 PR tree-optimization/84233
19124 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19125 changed flag instead of boguously re-using phi_inserted.
19127 2018-02-08 Martin Jambor <mjambor@suse.cz>
19129 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19130 static local variables.
19132 2018-02-08 Richard Biener <rguenther@suse.de>
19134 PR tree-optimization/84278
19135 * tree-vect-stmts.c (vectorizable_store): When looking for
19136 smaller vector types to perform grouped strided loads/stores
19137 make sure the mode is supported by the target.
19138 (vectorizable_load): Likewise.
19140 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19142 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19143 Increase LDP/STP opportunities by adding adjacent callee-saves.
19145 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19147 PR rtl-optimization/84068
19148 PR rtl-optimization/83459
19149 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19151 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19153 PR tree-optimization/84224
19154 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19155 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19156 non-zero arguments.
19158 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19161 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19162 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19163 count, remove one USE.
19165 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19167 * doc/install.texi (Configuration): Document the
19168 --with-long-double-format={ibm,ieee} PowerPC configuration
19172 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19173 Convert from define_expand to be define_insn_and_split. Rework
19174 float/double/_Float128 conversions to QI/HI/SImode to work with
19175 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19176 conversions to QI/HImode types did a store and then a load to
19177 truncate the value. For conversions to VSX registers, don't split
19178 the insn, instead emit the code directly. Use the code iterator
19179 any_fix to combine signed and unsigned conversions.
19180 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19181 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19182 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19183 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19184 (fix_<mode>di2_hw): Likewise.
19185 (fixuns_<mode>di2_hw): Likewise.
19186 (fix_<mode>si2_hw): Likewise.
19187 (fixuns_<mode>si2_hw): Likewise.
19188 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19189 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19190 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19191 fix<uns>_trunc<SFDF:mode>si2_p8.
19192 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19193 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19194 (fix<uns>_<mode>_mem): Likewise.
19195 (fctiw<u>z_<mode>_mem): Likewise.
19196 (fix<uns>_<mode>_mem): Likewise.
19197 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19198 the register allocator from doing a direct move to the GPRs to do
19199 a store, and instead use the ISA 3.0 store byte/half-word from
19200 vector register instruction. For IEEE 128-bit floating point,
19201 also optimize stores of 32-bit ints.
19202 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19204 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19206 * genextract.c (push_pathstr_operand): New function to support
19208 (walk_rtx): Call push_pathstr_operand.
19209 (print_path): Support [a-zA-Z].
19211 2018-02-07 Richard Biener <rguenther@suse.de>
19213 PR tree-optimization/84037
19214 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19215 (cse_and_gimplify_to_preheader): Declare.
19216 (vect_get_place_in_interleaving_chain): Likewise.
19217 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19219 (_loop_vec_info::~_loop_vec_info): Delete it.
19220 (cse_and_gimplify_to_preheader): New function.
19221 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19222 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19223 (vectorizable_load): Likewise. For grouped stores always base
19224 the IV on the first element.
19225 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19226 condition before gimplifying.
19228 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19230 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19231 *DIV_EXPR and *MOD_EXPR.
19233 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19236 * config/i386/i386.c (ix86_option_override_internal): Mask out
19237 the CF_SET bit when checking -fcf-protection.
19239 2018-02-07 Tom de Vries <tom@codesourcery.com>
19242 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19245 2018-02-07 Richard Biener <rguenther@suse.de>
19247 PR tree-optimization/84204
19248 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19251 PR tree-optimization/84205
19252 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19253 special-case isl_ast_op_zdiv_r.
19255 PR tree-optimization/84223
19256 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19257 Only add conditions from within the region.
19258 (gather_bbs::after_dom_children): Adjust.
19260 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19263 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19264 * config/avr/avr.md: Only post-reload split REG-REG moves if
19265 either register is GENERAL_REG_P.
19267 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19269 PR tree-optimization/84235
19270 * tree-ssa-scopedtables.c
19271 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19272 if the subtraction is performed in floating point type where NaNs are
19273 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19274 build 1. Formatting fix.
19276 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19279 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19280 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19281 and skip it regardless of bb boundaries. Use CALL_P macro,
19282 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19283 unnecessarily, formatting fix.
19285 2018-02-06 Michael Collison <michael.collison@arm.com>
19287 * config/arm/thumb2.md:
19288 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19289 (*thumb_mov_notscc): Ditto.
19291 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19294 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19295 unsigned_fix, not "s".
19297 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19299 * configure.ac (gcc_fn_eh_frame_ro): New function.
19300 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19301 correct .eh_frame permissions.
19302 * configure: Regenerate.
19304 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19306 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19307 irrelevant options.
19309 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19311 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19312 Display warning message for -mno-speculate-indirect-jumps.
19314 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19316 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19318 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19320 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19322 PR tree-optimization/84225
19323 * tree-eh.c (find_trapping_overflow): Only call
19324 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19326 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19329 * config/i386/i386.c: Reimplement the check of possible options
19330 -mibt/-mshstk conbination. Change error messages.
19331 * doc/invoke.texi: Fix a typo: remove extra '='.
19333 2018-02-06 Marek Polacek <polacek@redhat.com>
19335 PR tree-optimization/84228
19336 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19338 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19341 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19342 emitted arch directives.
19343 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19344 __ARM_FEATURE_COPROC before changing architectures.
19346 2018-02-06 Richard Biener <rguenther@suse.de>
19348 * config/i386/i386.c (print_reg): Fix typo.
19349 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19351 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19353 * configure: Regenerate.
19355 2018-02-05 Martin Sebor <msebor@redhat.com>
19357 PR tree-optimization/83369
19358 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19361 2018-02-05 Martin Liska <mliska@suse.cz>
19363 * doc/invoke.texi: Cherry-pick upstream r323995.
19365 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19367 * ira.c (ira_init_register_move_cost): Adjust comment.
19369 2018-02-05 Martin Liska <mliska@suse.cz>
19371 PR gcov-profile/84137
19372 * doc/gcov.texi: Fix typo in documentation.
19374 2018-02-05 Martin Liska <mliska@suse.cz>
19376 PR gcov-profile/83879
19377 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19378 using dlopen functionality.
19380 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19382 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19383 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19384 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19385 _mm_maskz_range_round_ss): New intrinsics.
19386 (__builtin_ia32_rangesd128_round)
19387 (__builtin_ia32_rangess128_round): Remove.
19388 (__builtin_ia32_rangesd128_mask_round,
19389 __builtin_ia32_rangess128_mask_round): New builtins.
19390 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19391 __builtin_ia32_rangess128_round): Remove.
19392 (__builtin_ia32_rangesd128_mask_round,
19393 __builtin_ia32_rangess128_mask_round): New builtins.
19394 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19395 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19396 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19397 "<round_saeonly_constraint>")): Changed to ...
19398 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19399 "<round_saeonly_scalar_constraint>")): ... this.
19400 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19401 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19402 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19403 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19404 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19406 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19408 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19410 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19411 Remove all values except native, 8540 and 8548.
19413 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19415 * config/i386/i386.c (ix86_output_function_return): Pass
19416 INVALID_REGNUM, instead of -1, as invalid register number to
19417 indirect_thunk_name and output_indirect_thunk.
19419 2018-02-02 Julia Koval <julia.koval@intel.com>
19421 * config.gcc: Add -march=icelake.
19422 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19423 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19424 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19425 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19426 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19427 (processor_target_table): Add icelake.
19428 (ix86_option_override_internal): Handle new PTAs.
19429 (get_builtin_code_for_version): Handle icelake.
19430 (M_INTEL_COREI7_ICELAKE): New.
19431 (fold_builtin_cpu): Handle icelake.
19432 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19433 * doc/invoke.texi: Add -march=icelake.
19435 2018-02-02 Julia Koval <julia.koval@intel.com>
19437 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19438 to wide_int_bitmask.
19439 * wide-int-bitmask.h: New.
19441 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19444 * config/i386/i386.md: Replace Pmode with word_mode in
19445 builtin_setjmp_setup and builtin_longjmp to support x32.
19447 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19451 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19453 (rs6000_supported_cpu_names): New static variable.
19454 (linux_cpu_translation_table): Likewise.
19455 (elf_platform) <cpu>: Define new static variable and use it.
19456 Translate kernel AT_PLATFORM name to canonical name if needed.
19457 Error if platform name is unknown.
19459 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19462 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19464 2018-02-01 Jeff Law <law@redhat.com>
19467 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19468 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19469 the scratch if RELEASE_VIA_POP is false.
19470 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19471 If we have to save a temporary register, decrement SIZE appropriately.
19472 Pass new arguments to release_scratch_register_on_entry.
19473 (ix86_adjust_stack_and_probe): Likewise.
19474 (ix86_emit_probe_stack_range): Pass new arguments to
19475 release_scratch_register_on_entry.
19477 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19479 PR rtl-optimization/84157
19480 * combine.c (change_zero_ext): Use REG_P predicate in
19481 front of HARD_REGISTER_P predicate.
19483 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19485 * config/avr/avr.c (avr_option_override): Move disabling of
19486 -fdelete-null-pointer-checks to...
19487 * common/config/avr/avr-common.c (avr_option_optimization_table):
19490 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19492 PR tree-optimization/81635
19493 * tree-data-ref.c (split_constant_offset_1): For types that
19494 wrap on overflow, try to use range info to prove that wrapping
19497 2018-02-01 Renlin Li <renlin.li@arm.com>
19500 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19501 TAILCALL_ADDR_REGS.
19502 (aarch64_register_move_cost): Likewise.
19503 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19504 TAILCALL_ADDR_REGS.
19505 (REG_CLASS_NAMES): Likewise.
19506 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19507 TAILCALL_ADDR_REGS. Remove IP registers.
19508 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19510 2018-02-01 Richard Biener <rguenther@suse.de>
19512 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19513 for specifying RPO order and allow NULL for that.
19514 * domwalk.c (dom_walker::dom_walker): Likewise.
19515 (dom_walker::walk): Handle NULL RPO order.
19516 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19518 (rewrite_update_dom_walker): Likewise.
19519 (mark_def_dom_walker): Likewise.
19521 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19523 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19524 (aarch64_maybe_expand_sve_subreg_move): Declare.
19525 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19526 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19528 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19529 that are semantically a reverse operation.
19530 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19531 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19532 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19534 (aarch64_can_change_mode_class): For big-endian, forbid changes
19535 between two SVE modes if they have different element sizes.
19537 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19539 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19540 the TImode handling for big-endian targets.
19542 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19544 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19545 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19547 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19548 Remove BSWAP handing for big-endian targets and use the form of
19549 LD1RQ appropariate for the mode.
19551 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19553 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19554 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19555 duplicated element.
19557 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19560 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19561 check for operands that need to go through aarch64_sve_reload_be.
19563 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19565 PR tree-optimization/81661
19566 PR tree-optimization/84117
19567 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19568 * tree-eh.c: Include gimplify.h.
19569 (find_trapping_overflow, replace_trapping_overflow,
19570 rewrite_to_non_trapping_overflow): New functions.
19571 * tree-vect-loop.c: Include tree-eh.h.
19572 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19573 * tree-data-ref.c: Include tree-eh.h.
19574 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19576 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19578 PR rtl-optimization/84123
19579 * combine.c (change_zero_ext): Check if hard register satisfies
19580 can_change_dest_mode before calling gen_lowpart_SUBREG.
19582 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19585 * ira.c (ira_init_register_move_cost): Remove assert.
19587 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19589 PR rtl-optimization/84071
19590 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19591 * doc/tm.texi: Regenerate.
19593 2018-01-31 Richard Biener <rguenther@suse.de>
19595 PR tree-optimization/84132
19596 * tree-data-ref.c (analyze_miv_subscript): Properly
19597 check whether evolution_function_is_affine_multivariate_p
19598 before calling gcd_of_steps_may_divide_p.
19600 2018-01-31 Julia Koval <julia.koval@intel.com>
19603 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19604 * config/i386/i386.md (rdpid_rex64) New.
19605 (rdpid): Make 32bit only.
19607 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19610 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19611 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19613 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19616 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19618 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19620 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19622 PR rtl-optimization/84071
19623 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19624 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19626 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19628 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19629 (arc_attribute_table): Add 'aux' attribute.
19630 (arc_in_small_data_p): Consider aux like variables.
19631 (arc_is_aux_reg_p): New function.
19632 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19633 (arc_get_aux_arg): New function.
19634 (prepare_move_operands): Handle aux-register access.
19635 (arc_handle_aux_attribute): New function.
19636 * doc/extend.texi (ARC Variable attributes): Add subsection.
19638 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19640 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19641 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19642 (arc_attribute_table): Add 'uncached' attribute.
19643 (arc_print_operand): Print '.di' flag for uncached memory
19645 (arc_in_small_data_p): Do not consider for small data the uncached
19647 (arc_is_uncached_mem_p): New function.
19648 * config/arc/predicates.md (compact_store_memory_operand): Check
19649 for uncached memory accesses.
19650 (nonvol_nonimm_operand): Likewise.
19651 * doc/extend.texi (ARC Type Attribute): New subsection.
19653 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19656 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19657 falign-loops=): Add Optimization flag.
19659 2018-01-30 Jeff Law <law@redhat.com>
19662 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19663 INT_REGISTERS_SAVED. Check it prior to calling
19664 get_scratch_register_on_entry.
19665 (ix86_adjust_stack_and_probe): Similarly.
19666 (ix86_emit_probe_stack_range): Similarly.
19667 (ix86_expand_prologue): Corresponding changes.
19669 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19672 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19673 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19675 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19678 * lra-constraints.c (curr_insn_transform): Process AND in the
19681 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19683 PR rtl-optimization/83986
19684 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19685 dependence against last_pending_memory_flush in addition to
19686 pending_jump_insns.
19688 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19690 PR tree-optimization/81611
19691 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19694 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19697 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19700 2018-01-30 Richard Biener <rguenther@suse.de>
19701 Jakub Jelinek <jakub@redhat.com>
19703 PR tree-optimization/84111
19704 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19705 inner loops added during recursion, as they don't have up-to-date
19708 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19711 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19712 (can_inline_edge_by_limits_p): ... here.
19713 (can_early_inline_edge_p, check_callers,
19714 update_caller_keys, update_callee_keys, recursive_inlining,
19715 add_new_edges_to_heap, speculation_useful_p,
19716 inline_small_functions,
19717 inline_small_functions, flatten_function,
19718 inline_to_all_callers_1): Update.
19720 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19722 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19725 2018-01-30 Richard Biener <rguenther@suse.de>
19727 PR tree-optimization/83008
19728 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19729 invariant and constant vector uses in stmts when they need
19730 more than one stmt.
19732 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19735 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19736 * configure: Regenerate.
19738 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19740 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19742 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19743 Use gen_rtx_REG rather than gen_lowpart.
19745 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19747 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19748 rather than 0 when creating partial subregs.
19750 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19752 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19755 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19758 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19759 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19760 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19761 flags. This restores the settings used before the 2017-07-24.
19762 Turning off pre increment/decrement/modify allows IVOPTS to
19763 optimize DF/SF loops where the index is an int.
19765 2018-01-29 Richard Biener <rguenther@suse.de>
19766 Kelvin Nilsen <kelvin@gcc.gnu.org>
19769 * tree-vect-stmts.c (vectorizable_call): Don't call
19770 targetm.vectorize_builtin_md_vectorized_function if callee is
19773 2018-01-22 Carl Love <cel@us.ibm.com>
19775 * doc/extend.tex: Fix typo in second arg in
19776 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19778 2018-01-29 Richard Biener <rguenther@suse.de>
19780 PR tree-optimization/84086
19781 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19782 (flush_ssaname_freelist): When SSA names were released reset
19783 the SCEV hash table.
19785 2018-01-29 Richard Biener <rguenther@suse.de>
19787 PR tree-optimization/84057
19788 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19789 removed paths when removing edges.
19791 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19793 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19794 -mfunction-return=@var{choice}.
19796 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19798 PR diagnostic/84034
19799 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19800 Handle CR like TAB.
19801 (layout::print_source_line): Likewise.
19802 (test_get_line_width_without_trailing_whitespace): Add test cases.
19804 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19806 PR middle-end/84040
19807 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19810 2018-01-26 Jim Wilson <jimw@sifive.com>
19812 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19814 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19817 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19819 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19820 and CMP + SUB-immediate -> SUBS.
19822 2018-01-26 Martin Sebor <msebor@redhat.com>
19824 PR tree-optimization/83896
19825 * tree-ssa-strlen.c (get_string_len): Rename...
19826 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19827 Avoid assuming length is constant.
19828 (handle_char_store): Use HOST_WIDE_INT for string length.
19830 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19833 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19834 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19836 2018-01-26 Richard Biener <rguenther@suse.de>
19838 PR rtl-optimization/84003
19839 * dse.c (record_store): Only record redundant stores when
19840 the earlier store aliases at least all accesses the later one does.
19842 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19844 PR rtl-optimization/83985
19845 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19846 REG_CFA_RESTORE insns.
19847 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19848 REG_CFA_RESTORE insns here.
19851 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19852 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19854 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19856 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19857 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19858 (arc_init): Likewise.
19859 (arc_override_options): Likewise.
19860 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19862 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19864 * config/arc/arc.h (TARGET_DBNZ): Define.
19865 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19866 properly set the tune attribute.
19867 (dbnz): Use TARGET_DBNZ guard.
19868 * config/arc/arc.opt (mtune): Add core3 option.
19870 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19872 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19873 recognize new pic like addresses.
19874 (arc_delegitimize_address): Clean up.
19876 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19878 * config/arc/arc-arches.def: Option mrf16 valid for all
19880 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19881 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19882 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19883 * config/arc/arc-tables.opt: Regenerate.
19884 * config/arc/arc.c (arc_conditional_register_usage): Handle
19885 reduced register file case.
19886 (arc_file_start): Set must have build attributes.
19887 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19888 mrf16 option value.
19889 * config/arc/arc.opt (mrf16): Add new option.
19890 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19891 * config/arc/genmultilib.awk: Handle new mrf16 option.
19892 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19893 * config/arc/t-multilib: Regenerate.
19894 * doc/invoke.texi (ARC Options): Document mrf16 option.
19896 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19898 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19899 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19900 (arc_attribute_table): Add 'secure_call' attribute.
19901 (arc_print_operand): Print secure call operand.
19902 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19904 (arc_is_secure_call_p): New function. * config/arc/arc.md
19905 (call_i): Add support for sjli instruction.
19906 (call_value_i): Likewise.
19907 * config/arc/constraints.md (Csc): New constraint.
19909 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19910 John Eric Martin <John.Martin@emmicro-us.com>
19912 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19913 * config/arc/arc.c (_arc_jli_section): New struct.
19914 (arc_jli_section): New type.
19915 (rc_jli_sections): New static variable.
19916 (arc_handle_jli_attribute): New function.
19917 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19918 (arc_file_end): New function.
19919 (TARGET_ASM_FILE_END): Define.
19920 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19921 (arc_add_jli_section): New function.
19922 (jli_call_scan): Likewise.
19923 (arc_reorg): Call jli_call_scan.
19924 (arc_output_addsi): Remove 'S' from printing asm operand.
19925 (arc_is_jli_call_p): New function.
19926 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19928 (movhi_insn): Likewise.
19929 (movsi_insn): Likewise.
19930 (movsi_set_cc_insn): Likewise.
19931 (loadqi_update): Likewise.
19932 (load_zeroextendqisi_update): Likewise.
19933 (load_signextendqisi_update): Likewise.
19934 (loadhi_update): Likewise.
19935 (load_zeroextendhisi_update): Likewise.
19936 (load_signextendhisi_update): Likewise.
19937 (loadsi_update): Likewise.
19938 (loadsf_update): Likewise.
19939 (movsicc_insn): Likewise.
19940 (bset_insn): Likewise.
19941 (bxor_insn): Likewise.
19942 (bclr_insn): Likewise.
19943 (bmsk_insn): Likewise.
19944 (bicsi3_insn): Likewise.
19945 (cmpsi_cc_c_insn): Likewise.
19946 (movsi_ne): Likewise.
19947 (movsi_cond_exec): Likewise.
19948 (clrsbsi2): Likewise.
19949 (norm_f): Likewise.
19959 (call_i): Remove 'S' asm letter, add jli instruction.
19960 (call_value_i): Likewise.
19961 * config/arc/arc.op (mjli-always): New option.
19962 * config/arc/constraints.md (Cji): New constraint.
19963 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19965 (subsf3_fpx): Likewise.
19966 (mulsf3_fpx): Likewise.
19967 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19969 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19970 function attrbutes.
19971 * doc/invoke.texi (ARC): Document mjli-always option.
19973 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19975 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19976 avoid addition with 0 and use incw and decw where possible.
19978 2018-01-26 Richard Biener <rguenther@suse.de>
19980 PR tree-optimization/81082
19981 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19982 association if it requires casting to unsigned.
19983 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19984 from fold_plusminus_mult_expr to catch important cases late when
19985 range info is available.
19987 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19989 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19990 * configure.ac (hidden_linkonce): New test.
19991 * configure: Regenerate.
19992 * config.in: Regenerate.
19994 2018-01-26 Julia Koval <julia.koval@intel.com>
19996 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19997 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19998 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19999 _mm_mask_bitshuffle_epi64_mask): Fix type.
20000 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20001 USI_FTYPE_V4DI_V4DI_USI): Remove.
20002 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20003 __builtin_ia32_vpshufbitqmb256_mask,
20004 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20005 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20006 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20008 2018-01-26 Alan Modra <amodra@gmail.com>
20011 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20012 UNSPEC_VBPERMQ. Sort other unspecs.
20014 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20016 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20018 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20020 PR middle-end/83055
20021 * predict.c (drop_profile): Do not push/pop cfun; update also
20023 (handle_missing_profiles): Fix logic looking for zero profiles.
20025 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20027 PR middle-end/83977
20028 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20029 on functions with #pragma omp declare simd or functions with simd
20031 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20032 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20033 Remove trailing \n from warning_at calls.
20035 2018-01-25 Tom de Vries <tom@codesourcery.com>
20038 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20039 for neutered workers.
20041 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20044 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20045 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20047 2018-01-24 Jeff Law <law@redhat.com>
20050 * i386.c (get_probe_interval): Move to earlier point.
20051 (ix86_compute_frame_layout): If -fstack-clash-protection and
20052 the frame is larger than the probe interval, then use pushes
20053 to save registers rather than reg->mem moves.
20054 (ix86_expand_prologue): Remove conditional for int_registers_saved
20057 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20060 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20061 min/max for never referenced object.
20063 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20065 PR middle-end/83977
20066 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20068 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20069 attributes from DECL_ATTRIBUTES (decl) without affecting
20070 DECL_ATTRIBUTES (current_function_decl).
20071 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20072 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20074 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20076 PR tree-optimization/83979
20077 * fold-const.c (fold_comparison): Use constant_boolean_node
20078 instead of boolean_{true,false}_node.
20080 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20082 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20085 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20087 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20088 Simplify the clause that sets the length attribute.
20089 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20090 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20091 clause that sets the length attribute.
20092 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20094 2018-01-24 Tom de Vries <tom@codesourcery.com>
20097 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20098 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20099 Add strict parameter.
20100 (prevent_branch_around_nothing): Insert dummy insn between branch to
20101 label and label with no ptx insn inbetween.
20102 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20104 2018-01-24 Tom de Vries <tom@codesourcery.com>
20107 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20108 for neutered threads in warp.
20109 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20111 2018-01-24 Richard Biener <rguenther@suse.de>
20113 PR tree-optimization/83176
20114 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20117 2018-01-24 Richard Biener <rguenther@suse.de>
20119 PR tree-optimization/82819
20120 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20121 code generating pluses that are no-ops in the target precision.
20123 2018-01-24 Richard Biener <rguenther@suse.de>
20125 PR middle-end/84000
20126 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20128 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20130 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20131 to merge probabilities.
20132 * predict.c (probably_never_executed): Also mark as cold functions
20133 with global 0 profile and guessed local profile.
20134 * profile-count.c (profile_probability::combine_with_count): New
20136 * profile-count.h (profile_probability::operator*,
20137 profile_probability::operator*=, profile_probability::operator/,
20138 profile_probability::operator/=): Reduce precision to adjusted
20139 and set value to guessed on contradictory divisions.
20140 (profile_probability::combine_with_freq): Remove.
20141 (profile_probability::combine_wiht_count): Declare.
20142 (profile_count::force_nonzero):: Set to adjusted.
20143 (profile_count::probability_in):: Set quality to adjusted.
20144 * tree-ssa-tail-merge.c (replace_block_by): Use
20145 combine_with_count.
20147 2018-01-23 Andrew Waterman <andrew@sifive.com>
20148 Jim Wilson <jimw@sifive.com>
20150 * config/riscv/riscv.c (riscv_stack_boundary): New.
20151 (riscv_option_override): Set riscv_stack_boundary. Handle
20152 riscv_preferred_stack_boundary_arg.
20153 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20154 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20155 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20156 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20157 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20158 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20160 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20163 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20164 of struct ix86_frame.
20165 (ix86_expand_epilogue): Likewise. Add a local variable for
20166 the reg_save_offset field in struct ix86_frame.
20168 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20170 PR tree-optimization/82604
20171 * tree-loop-distribution.c (enum partition_kind): New enum item
20172 PKIND_PARTIAL_MEMSET.
20173 (partition_builtin_p): Support above new enum item.
20174 (generate_code_for_partition): Ditto.
20175 (compute_access_range): Differentiate cases that equality can be
20176 proven at all loops, the innermost loops or no loops.
20177 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20178 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20179 (finalize_partitions, distribute_loop): Don't fuse partition of
20180 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20181 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20182 parloop is enabled.
20184 2018-01-23 Martin Liska <mliska@suse.cz>
20186 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20187 order to ignore the predictor.
20188 (PRED_POLYMORPHIC_CALL): Likewise.
20189 (PRED_RECURSIVE_CALL): Likewise.
20191 2018-01-23 Martin Liska <mliska@suse.cz>
20193 * tree-profile.c (tree_profiling): Print function header to
20194 aware reader which function we are working on.
20195 * value-prof.c (gimple_find_values_to_profile): Do not print
20196 not interesting value histograms.
20198 2018-01-23 Martin Liska <mliska@suse.cz>
20200 * profile-count.h (enum profile_quality): Add
20201 profile_uninitialized as the first value. Do not number values
20202 as they are zero based.
20203 (profile_count::verify): Update sanity check.
20204 (profile_probability::verify): Likewise.
20206 2018-01-23 Nathan Sidwell <nathan@acm.org>
20208 * doc/invoke.texi (ffor-scope): Deprecate.
20210 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20212 PR tree-optimization/83510
20213 * domwalk.c (set_all_edges_as_executable): New function.
20214 (dom_walker::dom_walker): Convert bool param
20215 "skip_unreachable_blocks" to enum reachability. Move setup of
20216 edge flags to set_all_edges_as_executable and only do it when
20217 reachability is REACHABLE_BLOCKS.
20218 * domwalk.h (enum dom_walker::reachability): New enum.
20219 (dom_walker::dom_walker): Convert bool param
20220 "skip_unreachable_blocks" to enum reachability.
20221 (set_all_edges_as_executable): New decl.
20222 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20223 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20225 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20226 but converting true to REACHABLE_BLOCKS.
20227 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20229 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20230 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20231 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20233 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20234 if check_all_array_refs will be called.
20236 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20238 * tree.c (selftest::test_location_wrappers): Add more test
20241 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20243 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20244 (selftest::test_bit_in_range): Likewise.
20246 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20249 * doc/sourcebuild.texi (vect_float): Say that the selector
20250 only describes the situation when -funsafe-math-optimizations is on.
20251 (vect_float_strict): Document.
20253 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20255 PR tree-optimization/83965
20256 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20257 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20258 instead of checking only for a reduction.
20259 (vect_recog_widen_sum_pattern): Likewise.
20261 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20263 * predict.c (probably_never_executed): Only use precise profile info.
20264 (compute_function_frequency): Skip after inlining hack since we now
20265 have quality checking.
20267 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20269 * profile-count.h (profile_probability::very_unlikely,
20270 profile_probability::unlikely, profile_probability::even): Set
20271 precision to guessed.
20273 2018-01-23 Richard Biener <rguenther@suse.de>
20275 PR tree-optimization/83963
20276 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20277 Properly terminate dominator walk when crossing the exit edge not
20278 when visiting its source block.
20280 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20283 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20284 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20286 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20288 PR tree-optimization/83957
20289 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20290 semicolon after for body surrounded by braces.
20292 PR tree-optimization/83081
20293 * profile-count.h (profile_probability::split): New method.
20294 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20295 Use profile_probability::split.
20296 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20297 when splitting a single conditional jump into 2.
20299 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20301 PR tree-optimization/69452
20302 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20305 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20307 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20308 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20309 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20311 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20313 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20315 * config/rl78/rl78.md (movdi): New define_expand.
20316 * config/rl78/rl78.c (rl78_split_movdi): New function.
20318 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20321 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20323 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20324 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20325 128-bit to produce an UNSPEC move to get the double word with the
20326 signbit and then a shift directly to do signbit.
20327 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20328 implementation with a new version that just does either a direct
20329 move or a regular move. Move memory interface to separate insns.
20330 Move insns so they are next to the expander.
20331 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20332 with signbit move. Split big and little endian case.
20333 (signbit<mode>2_dm_mem_le): Likewise.
20334 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20335 (signbit<mode>2_dm2): Likewise.
20337 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20339 * config/rl78/rl78.md (anddi3): New define_expand.
20341 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20343 * config/rl78/rl78.md (umindi3): New define_expand.
20345 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20347 * config/rl78/rl78.md (smindi3): New define_expand.
20349 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20351 * config/rl78/rl78.md (smaxdi3): New define_expand.
20353 2018-01-22 Carl Love <cel@us.ibm.com>
20355 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20356 LVX_V1TI): Add macro expansion.
20357 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20358 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20359 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20360 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20361 Change check to determine if the instruction is a byte reversing
20362 entry. Fix typo in comment.
20363 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20364 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20365 Add def_builtin calls for new builtins.
20366 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20367 Add define_insn expansion.
20369 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20371 * config/rl78/rl78.md (umaxdi3): New define_expand.
20373 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20375 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20376 for non-QImode registers.
20378 2018-01-22 Richard Biener <rguenther@suse.de>
20380 PR tree-optimization/83963
20381 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20382 including the loop exit block.
20383 (scop_detection::merge_sese): Likewise.
20384 (scop_detection::add_scop): Do it here instead.
20386 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20388 * doc/sourcebuild.texi (arm_softfloat): Document.
20390 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20393 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20394 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20395 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20397 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20398 David Edelsohn <dje.gcc@gmail.com>
20401 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20402 Change "crset eq" to "crset 2".
20403 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20404 (*call_indirect_aix<mode>_nospec): Likewise.
20405 (*call_value_indirect_aix<mode>_nospec): Likewise.
20406 (*call_indirect_elfv2<mode>_nospec): Likewise.
20407 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20408 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20409 change assembly output from . to $.
20410 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20411 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20412 (*tablejump<mode>_internal1_nospec): Likewise.
20414 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20417 * config/sh/sh_optimize_sett_clrt.cc:
20418 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20420 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20422 PR tree-optimization/83940
20423 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20424 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20425 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20426 use it to pass back the definition type.
20427 (vect_check_store_rhs): Likewise rhs_dt_out.
20428 (vect_build_gather_load_calls): Add a mask_dt argument and use
20429 it instead of a call to vect_is_simple_use.
20430 (vectorizable_store): Update calls to vect_check_load_store_mask
20431 and vect_check_store_rhs. Use the dt returned by the latter instead
20432 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20433 instead of calls to vect_is_simple_use. Pass the scalar rather
20434 than the vector operand to vect_is_simple_use when handling
20435 second and subsequent copies of an rhs value.
20436 (vectorizable_load): Update calls to vect_check_load_store_mask
20437 and vect_build_gather_load_calls. Use the cached mask_dt and
20438 gs_info.offset_dt instead of calls to vect_is_simple_use.
20440 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20442 PR middle-end/83945
20443 * tree-emutls.c: Include gimplify.h.
20444 (lower_emutls_2): New function.
20445 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20446 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20447 it before further processing.
20450 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20451 UINTVAL (trueop1) instead of INTVAL (op1).
20453 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20457 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20458 INCOMING_FRAME_SP_OFFSET if not defined.
20459 (scan_trace): Add ENTRY argument. If true and
20460 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20461 emit a note to adjust the CFA offset.
20462 (create_cfi_notes): Adjust scan_trace callers.
20463 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20464 INCOMING_FRAME_SP_OFFSET in the CIE.
20465 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20466 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20468 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20469 * doc/tm.texi: Regenerated.
20471 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20473 PR rtl-optimization/83147
20474 * lra-constraints.c (remove_inheritance_pseudos): Use
20475 lra_substitute_pseudo_within_insn.
20477 2018-01-19 Tom de Vries <tom@codesourcery.com>
20478 Cesar Philippidis <cesar@codesourcery.com>
20481 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20483 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20486 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20487 spaces for function labels.
20489 2018-01-19 Martin Liska <mliska@suse.cz>
20491 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20492 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20493 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20494 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20495 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20496 (PRED_CONST_RETURN): Change from 69 to 65.
20497 (PRED_NULL_RETURN): Change from 91 to 71.
20498 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20499 (PRED_LOOP_GUARD): Change from 66 to 73.
20501 2018-01-19 Martin Liska <mliska@suse.cz>
20503 * predict.c (predict_insn_def): Add new assert.
20504 (struct branch_predictor): Change type to signed integer.
20505 (test_prediction_value_range): Amend test to cover
20506 PROB_UNINITIALIZED.
20507 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20508 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20509 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20510 (PRED_LOOP_IV_COMPARE): Likewise.
20511 * predict.h (PROB_UNINITIALIZED): Define new constant.
20513 2018-01-19 Martin Liska <mliska@suse.cz>
20515 * predict.c (dump_prediction): Add new format for
20516 analyze_brprob.py script which is enabled with -details
20518 * profile-count.h (precise_p): New function.
20520 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20522 PR tree-optimization/83922
20523 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20524 there are no statements that need masking.
20525 (vect_active_double_reduction_p): New function.
20526 (vect_analyze_loop_operations): Use it when handling phis that
20527 are not in the loop header.
20529 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20531 PR tree-optimization/83914
20532 * tree-vect-loop.c (vectorizable_induction): Don't convert
20533 init_expr or apply the peeling adjustment for inductions
20534 that are nested within the vectorized loop.
20536 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20538 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20541 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20545 * function.h (gimplify_parameters): Add gimple_seq * argument.
20546 * function.c: Include gimple.h and options.h.
20547 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20548 for the added local temporaries if needed.
20549 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20550 if there are any parameter cleanups, wrap whole body into a
20551 try/finally with the cleanups.
20553 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20556 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20557 Use GET_MODE_CLASS for scalar floating point.
20559 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20563 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20564 Fix call of call_cgraph_insertion_hooks.
20566 2018-01-18 Martin Sebor <msebor@redhat.com>
20568 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20570 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20573 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20576 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20579 * common.opt: (-ffile-prefix-map): New option.
20580 * opts.c (common_handle_option): Defer it.
20581 * opts-global.c (handle_common_deferred_options): Handle it.
20582 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20583 * file-prefix-map.h: New file.
20584 (remap_debug_filename, add_debug_prefix_map): ...here.
20585 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20586 * final.c (debug_prefix_map, add_debug_prefix_map
20587 remap_debug_filename): Move to...
20588 * file-prefix-map.c: New file.
20589 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20590 generalize, get rid of alloca(), use strrchr() instead of strchr().
20591 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20592 Implement in terms of add_prefix_map().
20593 (remap_macro_filename, remap_debug_filename): Implement in term of
20595 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20596 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20597 * dbxout.c: Include file-prefix-map.h.
20598 * varasm.c: Likewise.
20599 * vmsdbgout.c: Likewise.
20600 * xcoffout.c: Likewise.
20601 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20602 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20603 * doc/invoke.texi (-ffile-prefix-map): Document.
20604 (-fdebug-prefix-map): Update description.
20606 2018-01-18 Martin Liska <mliska@suse.cz>
20608 * config/i386/i386.c (indirect_thunk_name): Document that also
20610 (output_indirect_thunk): Document why both instructions
20611 (pause and lfence) are generated.
20613 2018-01-18 Richard Biener <rguenther@suse.de>
20615 PR tree-optimization/83887
20616 * graphite-scop-detection.c
20617 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20618 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20619 (scop_detection::merge_sese): Re-implement with a flood-fill
20620 algorithm that properly finds a SESE region if it exists.
20622 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20625 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20626 pointer_diff optimizations use view_convert instead of convert.
20628 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20630 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20631 Generate different code for -mno-speculate-indirect-jumps.
20632 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20633 (*call_indirect_aix<mode>): Disable for
20634 -mno-speculate-indirect-jumps.
20635 (*call_indirect_aix<mode>_nospec): New define_insn.
20636 (*call_value_indirect_aix<mode>): Disable for
20637 -mno-speculate-indirect-jumps.
20638 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20639 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20640 -mno-speculate-indirect-jumps.
20641 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20643 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20645 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20646 long double type, set the flags for noting the default long double
20647 type, even if we don't pass or return a long double type.
20649 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20652 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20655 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20657 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20658 support for merge[hl].
20659 (fold_mergehl_helper): New helper function.
20660 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20661 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20662 (altivec_vmrglw_direct): Add xxmrglw insn.
20664 2018-01-17 Andrew Waterman <andrew@sifive.com>
20666 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20667 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20669 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20672 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20673 call the lto_location_cache before reading the
20674 DECL_SOURCE_LOCATION of the types.
20676 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20677 Richard Sandiford <richard.sandiford@linaro.org>
20679 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20680 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20681 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20682 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20683 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20685 * config/aarch64/constraints.md (aarch64_movti_operand):
20687 * config/aarch64/predicates.md (Uti): Add new constraint.
20689 2018-01-17 Carl Love <cel@us.ibm.com>
20691 * config/rs6000/vsx.md (define_expand xl_len_r,
20692 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20693 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20695 (define_expand, define_insn): Move the shift left from the
20696 define_insn to the define_expand for lxvl and stxvl instructions.
20697 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20698 and XL_LEN_R definitions to PURE.
20700 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20702 * config/i386/i386.c (indirect_thunk_name): Declare regno
20703 as unsigned int. Compare regno with INVALID_REGNUM.
20704 (output_indirect_thunk): Ditto.
20705 (output_indirect_thunk_function): Ditto.
20706 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20707 in the call to output_indirect_thunk_function.
20709 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20711 PR middle-end/83884
20712 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20713 rather than the size of inner_type to determine the stack slot size
20714 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20716 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20719 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20722 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20724 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20725 endian Linux systems to optionally enable multilibs for selecting
20726 the long double type if the user configured an explicit type.
20727 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20728 have no long double multilibs if not defined.
20729 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20730 warn if the user used -mabi={ieee,ibm}longdouble and we built
20731 multilibs for long double.
20732 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20733 appropriate multilib option.
20734 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20736 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20737 for building long double multilibs.
20738 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20740 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20742 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20745 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20747 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20750 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20753 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20756 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20758 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20759 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20761 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20763 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20764 different rtl trees depending on TARGET_64BIT.
20765 (rs6000_gen_lvx): Likewise.
20767 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20769 * config/visium/visium.md (nop): Tweak comment.
20770 (hazard_nop): Likewise.
20772 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20774 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20775 -mspeculate-indirect-jumps.
20776 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20777 for -mno-speculate-indirect-jumps.
20778 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20779 (*call_value_indirect_elfv2<mode>): Disable for
20780 -mno-speculate-indirect-jumps.
20781 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20782 (indirect_jump): Emit different RTL for
20783 -mno-speculate-indirect-jumps.
20784 (*indirect_jump<mode>): Disable for
20785 -mno-speculate-indirect-jumps.
20786 (*indirect_jump<mode>_nospec): New define_insn.
20787 (tablejump): Emit different RTL for
20788 -mno-speculate-indirect-jumps.
20789 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20790 (tablejumpsi_nospec): New define_expand.
20791 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20792 (tablejumpdi_nospec): New define_expand.
20793 (*tablejump<mode>_internal1): Disable for
20794 -mno-speculate-indirect-jumps.
20795 (*tablejump<mode>_internal1_nospec): New define_insn.
20796 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20799 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20801 * caller-save.c (insert_save): Drop unnecessary parameter. All
20804 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20805 Richard Biener <rguenth@suse.de>
20808 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20809 return early, inline manually is_gimple_sizepos. Make sure if we
20810 call gimplify_expr we don't end up with a gimple constant.
20811 * tree.c (variably_modified_type_p): Don't return true for
20812 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20813 * gimplify.h (is_gimple_sizepos): Remove.
20815 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20817 PR tree-optimization/83857
20818 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20819 vectorizable_live_operation for pure SLP statements.
20820 (vectorizable_live_operation): Handle PHIs.
20822 2018-01-16 Richard Biener <rguenther@suse.de>
20824 PR tree-optimization/83867
20825 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20826 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20828 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20831 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20832 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20833 If off is not INTEGER_CST, issue a may not be aligned warning
20834 rather than isn't aligned. Use isn%'t rather than isn't.
20835 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20837 <case MULT_EXPR>: Improve the case when bottom and one of the
20838 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20839 operand, in that case check if the other operand is multiple of
20840 bottom divided by the INTEGER_CST operand.
20842 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20845 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20846 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20847 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20848 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20849 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20850 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20851 (pa_function_arg_size): New function.
20853 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20855 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20856 in a separate statement.
20858 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20860 PR tree-optimization/83847
20861 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20862 group gathers and scatters.
20864 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20866 PR rtl-optimization/86620
20867 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20869 PR rtl-optimization/83213
20870 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20871 to last if both are JUMP_INSNs.
20873 PR tree-optimization/83843
20874 * gimple-ssa-store-merging.c
20875 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20876 store_immediate_info for bswap/nop orig_stores.
20878 2018-01-15 Andrew Waterman <andrew@sifive.com>
20880 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20882 <UDIV>: Increase cost if !TARGET_DIV.
20884 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20886 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20887 (define_attr "cr_logical_3op"): New.
20888 (cceq_ior_compare): Adjust.
20889 (cceq_ior_compare_complement): Adjust.
20890 (*cceq_rev_compare): Adjust.
20891 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20892 (is_cracked_insn): Adjust.
20893 (insn_must_be_first_in_group): Adjust.
20894 * config/rs6000/40x.md: Adjust.
20895 * config/rs6000/440.md: Adjust.
20896 * config/rs6000/476.md: Adjust.
20897 * config/rs6000/601.md: Adjust.
20898 * config/rs6000/603.md: Adjust.
20899 * config/rs6000/6xx.md: Adjust.
20900 * config/rs6000/7450.md: Adjust.
20901 * config/rs6000/7xx.md: Adjust.
20902 * config/rs6000/8540.md: Adjust.
20903 * config/rs6000/cell.md: Adjust.
20904 * config/rs6000/e300c2c3.md: Adjust.
20905 * config/rs6000/e500mc.md: Adjust.
20906 * config/rs6000/e500mc64.md: Adjust.
20907 * config/rs6000/e5500.md: Adjust.
20908 * config/rs6000/e6500.md: Adjust.
20909 * config/rs6000/mpc.md: Adjust.
20910 * config/rs6000/power4.md: Adjust.
20911 * config/rs6000/power5.md: Adjust.
20912 * config/rs6000/power6.md: Adjust.
20913 * config/rs6000/power7.md: Adjust.
20914 * config/rs6000/power8.md: Adjust.
20915 * config/rs6000/power9.md: Adjust.
20916 * config/rs6000/rs64.md: Adjust.
20917 * config/rs6000/titan.md: Adjust.
20919 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20921 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20922 ix86_indirect_branch_register logic.
20924 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20926 * config/i386/constraints.md (Bs): Update
20927 ix86_indirect_branch_register check. Don't check
20928 ix86_indirect_branch_register with GOT_memory_operand.
20930 * config/i386/predicates.md (GOT_memory_operand): Don't check
20931 ix86_indirect_branch_register here.
20932 (GOT32_symbol_operand): Likewise.
20934 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20936 * config/i386/predicates.md (constant_call_address_operand):
20937 Rewrite ix86_indirect_branch_register logic.
20938 (sibcall_insn_operand): Likewise.
20940 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20942 * config/i386/constraints.md (Bs): Replace
20943 ix86_indirect_branch_thunk_register with
20944 ix86_indirect_branch_register.
20946 * config/i386/i386.md (indirect_jump): Likewise.
20947 (tablejump): Likewise.
20948 (*sibcall_memory): Likewise.
20949 (*sibcall_value_memory): Likewise.
20950 Peepholes of indirect call and jump via memory: Likewise.
20951 * config/i386/i386.opt: Likewise.
20952 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20953 (GOT_memory_operand): Likewise.
20954 (call_insn_operand): Likewise.
20955 (sibcall_insn_operand): Likewise.
20956 (GOT32_symbol_operand): Likewise.
20958 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20960 PR middle-end/83837
20961 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20962 type rather than type addr's type points to.
20963 (expand_omp_atomic_mutex): Likewise.
20964 (expand_omp_atomic): Likewise.
20966 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20969 * config/i386/i386.c (output_indirect_thunk_function): Use
20970 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20971 for __x86_return_thunk.
20973 2018-01-15 Richard Biener <rguenther@suse.de>
20975 PR middle-end/83850
20976 * expmed.c (extract_bit_field_1): Fix typo.
20978 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20981 * config/arm/iterators.md (VF): New mode iterator.
20982 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20983 Remove integer-related logic from pattern.
20984 (neon_vabd<mode>_3): Likewise.
20986 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20988 PR middle-end/82694
20989 * common.opt (fstrict-overflow): No longer an alias.
20990 (fwrapv-pointer): New option.
20991 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20992 also for pointer types based on flag_wrapv_pointer.
20993 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20994 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20995 opts->x_flag_wrapv got set.
20996 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20997 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20998 POINTER_TYPE_OVERFLOW_UNDEFINED.
20999 * match.pd: Likewise in address comparison pattern.
21000 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21002 2018-01-15 Richard Biener <rguenther@suse.de>
21005 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21006 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21007 Reset type names to their identifier if their TYPE_DECL doesn't
21008 have linkage (and thus is used for ODR and devirt).
21009 (save_debug_info_for_decl): Remove.
21010 (save_debug_info_for_type): Likewise.
21011 (add_tree_to_fld_list): Adjust.
21012 * tree-pretty-print.c (dump_generic_node): Make dumping of
21013 type names more robust.
21015 2018-01-15 Richard Biener <rguenther@suse.de>
21017 * BASE-VER: Bump to 8.0.1.
21019 2018-01-14 Martin Sebor <msebor@redhat.com>
21022 * builtins.c (check_access): Avoid warning when the no-warning bit
21025 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21027 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21028 * ira-color (allocno_hard_regs_compare): Likewise.
21030 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21033 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21034 Use .pushsection/.popsection.
21036 2018-01-14 Martin Sebor <msebor@redhat.com>
21039 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21041 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21043 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21044 entry from extra_headers.
21045 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21046 extra_headers, make the list bitwise identical to the i?86-*-* one.
21048 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21050 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21051 -mcmodel=large with -mindirect-branch=thunk,
21052 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21053 -mfunction-return=thunk-extern.
21054 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21055 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21056 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21058 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21060 * config/i386/i386.c (print_reg): Print the name of the full
21061 integer register without '%'.
21062 (ix86_print_operand): Handle 'V'.
21063 * doc/extend.texi: Document 'V' modifier.
21065 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21067 * config/i386/constraints.md (Bs): Disallow memory operand for
21068 -mindirect-branch-register.
21070 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21071 (GOT_memory_operand): Likewise.
21072 (call_insn_operand): Likewise.
21073 (sibcall_insn_operand): Likewise.
21074 (GOT32_symbol_operand): Likewise.
21075 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21076 for -mindirect-branch-register.
21077 (tablejump): Likewise.
21078 (*sibcall_memory): Likewise.
21079 (*sibcall_value_memory): Likewise.
21080 Disallow peepholes of indirect call and jump via memory for
21081 -mindirect-branch-register.
21082 (*call_pop): Replace m with Bw.
21083 (*call_value_pop): Likewise.
21084 (*sibcall_pop_memory): Replace m with Bs.
21085 * config/i386/i386.opt (mindirect-branch-register): New option.
21086 * doc/invoke.texi: Document -mindirect-branch-register option.
21088 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21090 * config/i386/i386-protos.h (ix86_output_function_return): New.
21091 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21092 set function_return_type.
21093 (indirect_thunk_name): Add ret_p to indicate thunk for function
21095 (output_indirect_thunk_function): Pass false to
21096 indirect_thunk_name.
21097 (ix86_output_indirect_branch_via_reg): Likewise.
21098 (ix86_output_indirect_branch_via_push): Likewise.
21099 (output_indirect_thunk_function): Create alias for function
21100 return thunk if regno < 0.
21101 (ix86_output_function_return): New function.
21102 (ix86_handle_fndecl_attribute): Handle function_return.
21103 (ix86_attribute_table): Add function_return.
21104 * config/i386/i386.h (machine_function): Add
21105 function_return_type.
21106 * config/i386/i386.md (simple_return_internal): Use
21107 ix86_output_function_return.
21108 (simple_return_internal_long): Likewise.
21109 * config/i386/i386.opt (mfunction-return=): New option.
21110 (indirect_branch): Mention -mfunction-return=.
21111 * doc/extend.texi: Document function_return function attribute.
21112 * doc/invoke.texi: Document -mfunction-return= option.
21114 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21116 * config/i386/i386-opts.h (indirect_branch): New.
21117 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21118 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21119 with local indirect jump when converting indirect call and jump.
21120 (ix86_set_indirect_branch_type): New.
21121 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21122 (indirectlabelno): New.
21123 (indirect_thunk_needed): Likewise.
21124 (indirect_thunk_bnd_needed): Likewise.
21125 (indirect_thunks_used): Likewise.
21126 (indirect_thunks_bnd_used): Likewise.
21127 (INDIRECT_LABEL): Likewise.
21128 (indirect_thunk_name): Likewise.
21129 (output_indirect_thunk): Likewise.
21130 (output_indirect_thunk_function): Likewise.
21131 (ix86_output_indirect_branch_via_reg): Likewise.
21132 (ix86_output_indirect_branch_via_push): Likewise.
21133 (ix86_output_indirect_branch): Likewise.
21134 (ix86_output_indirect_jmp): Likewise.
21135 (ix86_code_end): Call output_indirect_thunk_function if needed.
21136 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21138 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21139 (ix86_attribute_table): Add indirect_branch.
21140 * config/i386/i386.h (machine_function): Add indirect_branch_type
21141 and has_local_indirect_jump.
21142 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21144 (tablejump): Likewise.
21145 (*indirect_jump): Use ix86_output_indirect_jmp.
21146 (*tablejump_1): Likewise.
21147 (simple_return_indirect_internal): Likewise.
21148 * config/i386/i386.opt (mindirect-branch=): New option.
21149 (indirect_branch): New.
21152 (thunk-inline): Likewise.
21153 (thunk-extern): Likewise.
21154 * doc/extend.texi: Document indirect_branch function attribute.
21155 * doc/invoke.texi: Document -mindirect-branch= option.
21157 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21160 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21162 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21164 * ipa-inline.c (want_inline_small_function_p): Return false if
21165 inlining has already failed with CIF_FINAL_ERROR.
21166 (update_caller_keys): Call want_inline_small_function_p before
21168 (update_callee_keys): Likewise.
21170 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21172 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21174 (rs6000_quadword_masked_address_p): Likewise.
21175 (quad_aligned_load_p): Likewise.
21176 (quad_aligned_store_p): Likewise.
21177 (const_load_sequence_p): Add comment to describe the outer-most loop.
21178 (mimic_memory_attributes_and_flags): New function.
21179 (rs6000_gen_stvx): Likewise.
21180 (replace_swapped_aligned_store): Likewise.
21181 (rs6000_gen_lvx): Likewise.
21182 (replace_swapped_aligned_load): Likewise.
21183 (replace_swapped_load_constant): Capitalize argument name in
21184 comment describing this function.
21185 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21186 and stores that access quad-word aligned addresses and replace
21187 with stvx or lvx instructions when appropriate.
21188 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21189 New function prototype.
21190 (rs6000_quadword_masked_address_p): Likewise.
21191 (rs6000_gen_lvx): Likewise.
21192 (rs6000_gen_stvx): Likewise.
21193 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21194 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21195 when memory address is aligned.
21196 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21197 this split to select lvx instruction when memory address is aligned.
21198 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21199 instruction when memory address is aligned.
21200 (*vsx_le_perm_load_v16qi): Likewise.
21201 (four unnamed splitters): Modify to select the stvx instruction
21202 when memory is aligned.
21204 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21206 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21207 which appears in the queue multiple times.
21209 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21210 Alan Hayward <alan.hayward@arm.com>
21211 David Sherwood <david.sherwood@arm.com>
21213 * tree-vectorizer.h (vec_lower_bound): New structure.
21214 (_loop_vec_info): Add check_nonzero and lower_bounds.
21215 (LOOP_VINFO_CHECK_NONZERO): New macro.
21216 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21217 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21218 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21219 fields. Make seg_len the distance travelled, not including the
21221 (dr_direction_indicator): Declare.
21222 (dr_zero_step_indicator): Likewise.
21223 (dr_known_forward_stride_p): Likewise.
21224 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21226 (runtime_alias_check_p): Allow runtime alias checks with
21228 (operator ==): Compare access_size and align.
21229 (prune_runtime_alias_test_list): Rework for new distinction between
21230 the access_size and seg_len.
21231 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21233 (get_segment_min_max): New function.
21234 (create_intersect_range_checks): Use it.
21235 (dr_step_indicator): New function.
21236 (dr_direction_indicator): Likewise.
21237 (dr_zero_step_indicator): Likewise.
21238 (dr_known_forward_stride_p): Likewise.
21239 * tree-loop-distribution.c (data_ref_segment_size): Return
21240 DR_STEP * (niters - 1).
21241 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21243 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21244 (vect_preserves_scalar_order_p): New function, split out from...
21245 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21246 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21247 (vect_vfa_access_size): New function.
21248 (vect_vfa_align): Likewise.
21249 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21250 (dump_lower_bound): New function.
21251 (vect_check_lower_bound): Likewise.
21252 (vect_small_gap_p): Likewise.
21253 (vectorizable_with_step_bound_p): Likewise.
21254 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21255 depencies if the vectorization factor is 1. Convert the checks
21256 for nonzero steps into checks on the bounds of DR_STEP. Try using
21257 a bunds check for variable steps if the minimum required step is
21258 relatively small. Update calls to the dr_with_seg_len
21259 constructor and to vect_compile_time_alias.
21260 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21262 (vect_loop_versioning): Call it.
21263 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21265 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21267 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21268 Alan Hayward <alan.hayward@arm.com>
21269 David Sherwood <david.sherwood@arm.com>
21271 * doc/sourcebuild.texi (vect_scatter_store): Document.
21272 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21274 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21276 * genopinit.c (main): Add supports_vec_scatter_store and
21277 supports_vec_scatter_store_cached to target_optabs.
21278 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21279 IFN_MASK_SCATTER_STORE.
21280 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21282 * internal-fn.h (internal_store_fn_p): Declare.
21283 (internal_fn_stored_value_index): Likewise.
21284 * internal-fn.c (scatter_store_direct): New macro.
21285 (expand_scatter_store_optab_fn): New function.
21286 (direct_scatter_store_optab_supported_p): New macro.
21287 (internal_store_fn_p): New function.
21288 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21289 IFN_MASK_SCATTER_STORE.
21290 (internal_fn_mask_index): Likewise.
21291 (internal_fn_stored_value_index): New function.
21292 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21293 for scatter stores.
21294 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21295 * optabs-query.c (supports_vec_scatter_store_p): New function.
21296 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21297 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21298 true for scatter stores.
21299 (vect_gather_scatter_fn_p): Handle scatter stores too.
21300 (vect_check_gather_scatter): Consider using scatter stores if
21301 supports_vec_scatter_store_p.
21302 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21303 scatter stores too.
21304 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21305 internal_fn_stored_value_index.
21306 (check_load_store_masking): Handle scatter stores too.
21307 (vect_get_store_rhs): Make public.
21308 (vectorizable_call): Use internal_store_fn_p.
21309 (vectorizable_store): Handle scatter store internal functions.
21310 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21311 when deciding whether the end of the group has been reached.
21312 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21313 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21314 (mask_scatter_store<mode>): New insns.
21316 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21317 Alan Hayward <alan.hayward@arm.com>
21318 David Sherwood <david.sherwood@arm.com>
21320 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21321 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21322 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21324 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21325 Use vect_truncate_gather_scatter_offset if we can't treat the
21326 operation as a normal gather load or scatter store.
21327 (get_group_load_store_type): Take the gather_scatter_info
21328 as argument. Try using a gather load or scatter store for
21329 single-element groups.
21330 (get_load_store_type): Update calls to get_group_load_store_type
21331 and vect_use_strided_gather_scatters_p.
21333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21334 Alan Hayward <alan.hayward@arm.com>
21335 David Sherwood <david.sherwood@arm.com>
21337 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21338 optional tree argument.
21339 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21341 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21342 but continue to use the current value as a fallback.
21343 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21344 to compare the updates.
21345 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21346 (get_load_store_type): Use it when handling a strided access.
21347 (vect_get_strided_load_store_ops): New function.
21348 (vect_get_data_ptr_increment): Likewise.
21349 (vectorizable_load): Handle strided gather loads. Always pass
21350 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21353 Alan Hayward <alan.hayward@arm.com>
21354 David Sherwood <david.sherwood@arm.com>
21356 * doc/md.texi (gather_load@var{m}): Document.
21357 (mask_gather_load@var{m}): Likewise.
21358 * genopinit.c (main): Add supports_vec_gather_load and
21359 supports_vec_gather_load_cached to target_optabs.
21360 * optabs-tree.c (init_tree_optimization_optabs): Use
21361 ggc_cleared_alloc to allocate target_optabs.
21362 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21363 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21365 * internal-fn.h (internal_load_fn_p): Declare.
21366 (internal_gather_scatter_fn_p): Likewise.
21367 (internal_fn_mask_index): Likewise.
21368 (internal_gather_scatter_fn_supported_p): Likewise.
21369 * internal-fn.c (gather_load_direct): New macro.
21370 (expand_gather_load_optab_fn): New function.
21371 (direct_gather_load_optab_supported_p): New macro.
21372 (direct_internal_fn_optab): New function.
21373 (internal_load_fn_p): Likewise.
21374 (internal_gather_scatter_fn_p): Likewise.
21375 (internal_fn_mask_index): Likewise.
21376 (internal_gather_scatter_fn_supported_p): Likewise.
21377 * optabs-query.c (supports_at_least_one_mode_p): New function.
21378 (supports_vec_gather_load_p): Likewise.
21379 * optabs-query.h (supports_vec_gather_load_p): Declare.
21380 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21381 and memory_type field.
21382 (NUM_PATTERNS): Bump to 15.
21383 * tree-vect-data-refs.c: Include internal-fn.h.
21384 (vect_gather_scatter_fn_p): New function.
21385 (vect_describe_gather_scatter_call): Likewise.
21386 (vect_check_gather_scatter): Try using internal functions for
21387 gather loads. Recognize existing calls to a gather load function.
21388 (vect_analyze_data_refs): Consider using gather loads if
21389 supports_vec_gather_load_p.
21390 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21391 (vect_get_gather_scatter_offset_type): Likewise.
21392 (vect_convert_mask_for_vectype): Likewise.
21393 (vect_add_conversion_to_patterm): Likewise.
21394 (vect_try_gather_scatter_pattern): Likewise.
21395 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21396 (vect_vect_recog_func_ptrs): Add it.
21397 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21398 internal_fn_mask_index and internal_gather_scatter_fn_p.
21399 (check_load_store_masking): Take the gather_scatter_info as an
21400 argument and handle gather loads.
21401 (vect_get_gather_scatter_ops): New function.
21402 (vectorizable_call): Check internal_load_fn_p.
21403 (vectorizable_load): Likewise. Handle gather load internal
21405 (vectorizable_store): Update call to check_load_store_masking.
21406 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21407 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21408 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21409 (aarch64_gather_scale_operand_d): New predicates.
21410 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21411 (mask_gather_load<mode>): New insns.
21413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21414 Alan Hayward <alan.hayward@arm.com>
21415 David Sherwood <david.sherwood@arm.com>
21417 * optabs.def (fold_left_plus_optab): New optab.
21418 * doc/md.texi (fold_left_plus_@var{m}): Document.
21419 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21420 * internal-fn.c (fold_left_direct): Define.
21421 (expand_fold_left_optab_fn): Likewise.
21422 (direct_fold_left_optab_supported_p): Likewise.
21423 * fold-const-call.c (fold_const_fold_left): New function.
21424 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21425 * tree-parloops.c (valid_reduction_p): New function.
21426 (gather_scalar_reductions): Use it.
21427 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21428 (vect_finish_replace_stmt): Declare.
21429 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21430 (needs_fold_left_reduction_p): New function, split out from...
21431 (vect_is_simple_reduction): ...here. Accept reductions that
21432 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21433 (vect_force_simple_reduction): Also store the reduction type in
21434 the assignment's STMT_VINFO_REDUC_TYPE.
21435 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21436 (merge_with_identity): New function.
21437 (vect_expand_fold_left): Likewise.
21438 (vectorize_fold_left_reduction): Likewise.
21439 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21440 scalar phi in place for it. Check for target support and reject
21441 cases that would reassociate the operation. Defer the transform
21442 phase to vectorize_fold_left_reduction.
21443 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21444 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21445 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21449 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21450 call to ifc_temp_var.
21452 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21453 Alan Hayward <alan.hayward@arm.com>
21454 David Sherwood <david.sherwood@arm.com>
21456 * target.def (legitimize_address_displacement): Take the original
21457 offset as a poly_int.
21458 * targhooks.h (default_legitimize_address_displacement): Update
21460 * targhooks.c (default_legitimize_address_displacement): Likewise.
21461 * doc/tm.texi: Regenerate.
21462 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21463 as an argument, moving assert of ad->disp == ad->disp_term to...
21464 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21465 Try calling targetm.legitimize_address_displacement before expanding
21466 the address rather than afterwards, and adjust for the new interface.
21467 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21468 Match the new hook interface. Handle SVE addresses.
21469 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21470 new hook interface.
21472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21474 * Makefile.in (OBJS): Add early-remat.o.
21475 * target.def (select_early_remat_modes): New hook.
21476 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21477 * doc/tm.texi: Regenerate.
21478 * targhooks.h (default_select_early_remat_modes): Declare.
21479 * targhooks.c (default_select_early_remat_modes): New function.
21480 * timevar.def (TV_EARLY_REMAT): New timevar.
21481 * passes.def (pass_early_remat): New pass.
21482 * tree-pass.h (make_pass_early_remat): Declare.
21483 * early-remat.c: New file.
21484 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21486 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21488 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21489 Alan Hayward <alan.hayward@arm.com>
21490 David Sherwood <david.sherwood@arm.com>
21492 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21493 vfm1 with a bound_epilog parameter.
21494 (vect_do_peeling): Update calls accordingly, and move the prologue
21495 call earlier in the function. Treat the base bound_epilog as 0 for
21496 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21497 this base when peeling for gaps.
21498 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21499 with fully-masked loops.
21500 (vect_estimate_min_profitable_iters): Handle the single peeled
21501 iteration in that case.
21503 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21504 Alan Hayward <alan.hayward@arm.com>
21505 David Sherwood <david.sherwood@arm.com>
21507 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21508 single-element interleaving even if the size is not a power of 2.
21509 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21510 accesses for single-element interleaving if the group size is
21513 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21514 Alan Hayward <alan.hayward@arm.com>
21515 David Sherwood <david.sherwood@arm.com>
21517 * doc/md.texi (fold_extract_last_@var{m}): Document.
21518 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21519 * optabs.def (fold_extract_last_optab): New optab.
21520 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21521 * internal-fn.c (fold_extract_direct): New macro.
21522 (expand_fold_extract_optab_fn): Likewise.
21523 (direct_fold_extract_optab_supported_p): Likewise.
21524 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21525 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21526 EXTRACT_LAST_REDUCTION.
21527 (get_initial_def_for_reduction): Do not create an initial vector
21528 for EXTRACT_LAST_REDUCTION reductions.
21529 (vectorizable_reduction): Leave the scalar phi in place for
21530 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21531 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21532 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21533 transform phase to vectorizable_condition.
21534 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21536 (vect_finish_stmt_generation): ...here.
21537 (vect_finish_replace_stmt): New function.
21538 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21539 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21541 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21543 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21544 Alan Hayward <alan.hayward@arm.com>
21545 David Sherwood <david.sherwood@arm.com>
21547 * doc/md.texi (extract_last_@var{m}): Document.
21548 * optabs.def (extract_last_optab): New optab.
21549 * internal-fn.def (EXTRACT_LAST): New internal function.
21550 * internal-fn.c (cond_unary_direct): New macro.
21551 (expand_cond_unary_optab_fn): Likewise.
21552 (direct_cond_unary_optab_supported_p): Likewise.
21553 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21554 loops using EXTRACT_LAST.
21555 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21556 (extract_last_<mode>): ...this optab.
21557 (vec_extract<mode><Vel>): Update accordingly.
21559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21560 Alan Hayward <alan.hayward@arm.com>
21561 David Sherwood <david.sherwood@arm.com>
21563 * target.def (empty_mask_is_expensive): New hook.
21564 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21565 * doc/tm.texi: Regenerate.
21566 * targhooks.h (default_empty_mask_is_expensive): Declare.
21567 * targhooks.c (default_empty_mask_is_expensive): New function.
21568 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21569 if the target says that empty masks are expensive.
21570 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21572 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21574 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21575 Alan Hayward <alan.hayward@arm.com>
21576 David Sherwood <david.sherwood@arm.com>
21578 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21579 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21580 (vect_use_loop_mask_for_alignment_p): New function.
21581 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21582 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21583 niters_skip argument. Make sure that the first niters_skip elements
21584 of the first iteration are inactive.
21585 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21586 Update call to vect_set_loop_masks_directly.
21587 (get_misalign_in_elems): New function, split out from...
21588 (vect_gen_prolog_loop_niters): ...here.
21589 (vect_update_init_of_dr): Take a code argument that specifies whether
21590 the adjustment should be added or subtracted.
21591 (vect_update_init_of_drs): Likewise.
21592 (vect_prepare_for_masked_peels): New function.
21593 (vect_do_peeling): Skip prologue peeling if we're using a mask
21594 instead. Update call to vect_update_inits_of_drs.
21595 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21597 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21598 alignment. Do not include the number of peeled iterations in
21599 the minimum threshold in that case.
21600 (vectorizable_induction): Adjust the start value down by
21601 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21602 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21603 Take the number of skipped iterations into account when calculating
21605 * tree-vect-stmts.c (vect_gen_while_not): New function.
21607 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21608 Alan Hayward <alan.hayward@arm.com>
21609 David Sherwood <david.sherwood@arm.com>
21611 * doc/sourcebuild.texi (vect_fully_masked): Document.
21612 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21613 default value to 0.
21614 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21616 (vect_analyze_loop_2): ...here. Don't check the vectorization
21617 factor against the number of loop iterations if the loop is
21620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21621 Alan Hayward <alan.hayward@arm.com>
21622 David Sherwood <david.sherwood@arm.com>
21624 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21625 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21626 (dump_groups): Update accordingly.
21627 (iv_use::mem_type): New member variable.
21628 (address_p): New function.
21629 (record_use): Add a mem_type argument and initialize the new
21631 (record_group_use): Add a mem_type argument. Use address_p.
21632 Remove obsolete null checks of base_object. Update call to record_use.
21633 (find_interesting_uses_op): Update call to record_group_use.
21634 (find_interesting_uses_cond): Likewise.
21635 (find_interesting_uses_address): Likewise.
21636 (get_mem_type_for_internal_fn): New function.
21637 (find_address_like_use): Likewise.
21638 (find_interesting_uses_stmt): Try find_address_like_use before
21639 calling find_interesting_uses_op.
21640 (addr_offset_valid_p): Use the iv mem_type field as the type
21641 of the addressed memory.
21642 (add_autoinc_candidates): Likewise.
21643 (get_address_cost): Likewise.
21644 (split_small_address_groups_p): Use address_p.
21645 (split_address_groups): Likewise.
21646 (add_iv_candidate_for_use): Likewise.
21647 (autoinc_possible_for_pair): Likewise.
21648 (rewrite_groups): Likewise.
21649 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21650 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21651 (get_alias_ptr_type_for_ptr_address): New function.
21652 (rewrite_use_address): Rewrite address uses in calls that were
21653 identified by find_address_like_use.
21655 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21656 Alan Hayward <alan.hayward@arm.com>
21657 David Sherwood <david.sherwood@arm.com>
21659 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21661 * gimple-expr.h (is_gimple_addressable: Likewise.
21662 * gimple-expr.c (is_gimple_address): Likewise.
21663 * internal-fn.c (expand_call_mem_ref): New function.
21664 (expand_mask_load_optab_fn): Use it.
21665 (expand_mask_store_optab_fn): Likewise.
21667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21668 Alan Hayward <alan.hayward@arm.com>
21669 David Sherwood <david.sherwood@arm.com>
21671 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21672 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21673 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21674 (cond_umax@var{mode}): Document.
21675 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21676 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21677 (cond_umin_optab, cond_umax_optab): New optabs.
21678 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21679 (COND_IOR, COND_XOR): New internal functions.
21680 * internal-fn.h (get_conditional_internal_fn): Declare.
21681 * internal-fn.c (cond_binary_direct): New macro.
21682 (expand_cond_binary_optab_fn): Likewise.
21683 (direct_cond_binary_optab_supported_p): Likewise.
21684 (get_conditional_internal_fn): New function.
21685 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21686 Cope with reduction statements that are vectorized as calls rather
21688 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21689 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21690 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21691 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21692 (UNSPEC_COND_EOR): New unspecs.
21693 (optab): Add mappings for them.
21694 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21695 (sve_int_op, sve_fp_op): New int attributes.
21697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21698 Alan Hayward <alan.hayward@arm.com>
21699 David Sherwood <david.sherwood@arm.com>
21701 * optabs.def (while_ult_optab): New optab.
21702 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21703 * internal-fn.def (WHILE_ULT): New internal function.
21704 * internal-fn.h (direct_internal_fn_supported_p): New override
21705 that takes two types as argument.
21706 * internal-fn.c (while_direct): New macro.
21707 (expand_while_optab_fn): New function.
21708 (convert_optab_supported_p): Likewise.
21709 (direct_while_optab_supported_p): New macro.
21710 * wide-int.h (wi::udiv_ceil): New function.
21711 * tree-vectorizer.h (rgroup_masks): New structure.
21712 (vec_loop_masks): New typedef.
21713 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21714 and fully_masked_p.
21715 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21716 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21717 (vect_max_vf): New function.
21718 (slpeel_make_loop_iterate_ntimes): Delete.
21719 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21720 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21721 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21722 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21723 internal-fn.h, stor-layout.h and optabs-query.h.
21724 (vect_set_loop_mask): New function.
21725 (add_preheader_seq): Likewise.
21726 (add_header_seq): Likewise.
21727 (interleave_supported_p): Likewise.
21728 (vect_maybe_permute_loop_masks): Likewise.
21729 (vect_set_loop_masks_directly): Likewise.
21730 (vect_set_loop_condition_masked): Likewise.
21731 (vect_set_loop_condition_unmasked): New function, split out from
21732 slpeel_make_loop_iterate_ntimes.
21733 (slpeel_make_loop_iterate_ntimes): Rename to..
21734 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21735 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21736 (vect_do_peeling): Update call accordingly.
21737 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21739 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21740 mask_compare_type, can_fully_mask_p and fully_masked_p.
21741 (release_vec_loop_masks): New function.
21742 (_loop_vec_info): Use it to free the loop masks.
21743 (can_produce_all_loop_masks_p): New function.
21744 (vect_get_max_nscalars_per_iter): Likewise.
21745 (vect_verify_full_masking): Likewise.
21746 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21747 retries, and free the mask rgroups before retrying. Check loop-wide
21748 reasons for disallowing fully-masked loops. Make the final decision
21749 about whether use a fully-masked loop or not.
21750 (vect_estimate_min_profitable_iters): Do not assume that peeling
21751 for the number of iterations will be needed for fully-masked loops.
21752 (vectorizable_reduction): Disable fully-masked loops.
21753 (vectorizable_live_operation): Likewise.
21754 (vect_halve_mask_nunits): New function.
21755 (vect_double_mask_nunits): Likewise.
21756 (vect_record_loop_mask): Likewise.
21757 (vect_get_loop_mask): Likewise.
21758 (vect_transform_loop): Handle the case in which the final loop
21759 iteration might handle a partial vector. Call vect_set_loop_condition
21760 instead of slpeel_make_loop_iterate_ntimes.
21761 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21762 (check_load_store_masking): New function.
21763 (prepare_load_store_mask): Likewise.
21764 (vectorizable_store): Handle fully-masked loops.
21765 (vectorizable_load): Likewise.
21766 (supportable_widening_operation): Use vect_halve_mask_nunits for
21768 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21769 (vect_gen_while): New function.
21770 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21771 (aarch64_uqdec<mode>): New insn.
21773 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21774 Alan Hayward <alan.hayward@arm.com>
21775 David Sherwood <david.sherwood@arm.com>
21777 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21778 (reduc_xor_scal_optab): New optabs.
21779 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21780 (reduc_xor_scal_@var{m}): Document.
21781 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21782 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21783 internal functions.
21784 * fold-const-call.c (fold_const_call): Handle them.
21785 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21786 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21787 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21788 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21789 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21790 (UNSPEC_XORV): New unspecs.
21791 (optab): Add entries for them.
21792 (BITWISEV): New int iterator.
21793 (bit_reduc_op): New int attributes.
21795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21796 Alan Hayward <alan.hayward@arm.com>
21797 David Sherwood <david.sherwood@arm.com>
21799 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21800 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21801 * optabs.def (vec_shl_insert_optab): New optab.
21802 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21803 (duplicate_and_interleave): Likewise.
21804 * tree-vect-loop.c: Include internal-fn.h.
21805 (neutral_op_for_slp_reduction): New function, split out from
21806 get_initial_defs_for_reduction.
21807 (get_initial_def_for_reduction): Handle option 2 for variable-length
21808 vectors by loading the neutral value into a vector and then shifting
21809 the initial value into element 0.
21810 (get_initial_defs_for_reduction): Replace the code argument with
21811 the neutral value calculated by neutral_op_for_slp_reduction.
21812 Use gimple_build_vector for constant-length vectors.
21813 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21814 but the first group_size elements have a neutral value.
21815 Use duplicate_and_interleave otherwise.
21816 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21817 Update call to get_initial_defs_for_reduction. Handle SLP
21818 reductions for variable-length vectors by creating one vector
21819 result for each scalar result, with the elements associated
21820 with other scalar results stubbed out with the neutral value.
21821 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21822 Require IFN_VEC_SHL_INSERT for double reductions on
21823 variable-length vectors, or SLP reductions that have
21824 a neutral value. Require can_duplicate_and_interleave_p
21825 support for variable-length unchained SLP reductions if there
21826 is no neutral value, such as for MIN/MAX reductions. Also require
21827 the number of vector elements to be a multiple of the number of
21828 SLP statements when doing variable-length unchained SLP reductions.
21829 Update call to vect_create_epilog_for_reduction.
21830 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21831 and remove initial values.
21832 (duplicate_and_interleave): Make public.
21833 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21834 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21837 Alan Hayward <alan.hayward@arm.com>
21838 David Sherwood <david.sherwood@arm.com>
21840 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21841 (can_duplicate_and_interleave_p): New function.
21842 (vect_get_and_check_slp_defs): Take the vector of statements
21843 rather than just the current one. Remove excess parentheses.
21844 Restriction rejectinon of vect_constant_def and vect_external_def
21845 for variable-length vectors to boolean types, or types for which
21846 can_duplicate_and_interleave_p is false.
21847 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21848 (duplicate_and_interleave): New function.
21849 (vect_get_constant_vectors): Use gimple_build_vector for
21850 constant-length vectors and suitable variable-length constant
21851 vectors. Use duplicate_and_interleave for other variable-length
21852 vectors. Don't defer the update when inserting new statements.
21854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21855 Alan Hayward <alan.hayward@arm.com>
21856 David Sherwood <david.sherwood@arm.com>
21858 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21859 min_profitable_iters doesn't go negative.
21861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21862 Alan Hayward <alan.hayward@arm.com>
21863 David Sherwood <david.sherwood@arm.com>
21865 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21866 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21867 * optabs.def (vec_mask_load_lanes_optab): New optab.
21868 (vec_mask_store_lanes_optab): Likewise.
21869 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21870 (MASK_STORE_LANES): Likewise.
21871 * internal-fn.c (mask_load_lanes_direct): New macro.
21872 (mask_store_lanes_direct): Likewise.
21873 (expand_mask_load_optab_fn): Handle masked operations.
21874 (expand_mask_load_lanes_optab_fn): New macro.
21875 (expand_mask_store_optab_fn): Handle masked operations.
21876 (expand_mask_store_lanes_optab_fn): New macro.
21877 (direct_mask_load_lanes_optab_supported_p): Likewise.
21878 (direct_mask_store_lanes_optab_supported_p): Likewise.
21879 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21881 (vect_load_lanes_supported): Likewise.
21882 * tree-vect-data-refs.c (strip_conversion): New function.
21883 (can_group_stmts_p): Likewise.
21884 (vect_analyze_data_ref_accesses): Use it instead of checking
21885 for a pair of assignments.
21886 (vect_store_lanes_supported): Take a masked_p parameter.
21887 (vect_load_lanes_supported): Likewise.
21888 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21889 vect_store_lanes_supported and vect_load_lanes_supported.
21890 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21891 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21892 parameter. Don't allow gaps for masked accesses.
21893 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21894 and vect_load_lanes_supported.
21895 (get_load_store_type): Take a masked_p parameter and update
21896 call to get_group_load_store_type.
21897 (vectorizable_store): Update call to get_load_store_type.
21898 Handle IFN_MASK_STORE_LANES.
21899 (vectorizable_load): Update call to get_load_store_type.
21900 Handle IFN_MASK_LOAD_LANES.
21902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21903 Alan Hayward <alan.hayward@arm.com>
21904 David Sherwood <david.sherwood@arm.com>
21906 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21908 * config/aarch64/aarch64-protos.h
21909 (aarch64_sve_struct_memory_operand_p): Declare.
21910 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21911 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21912 (VPRED, vpred): Handle SVE structure modes.
21913 * config/aarch64/constraints.md (Utx): New constraint.
21914 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21915 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21916 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21917 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21918 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21919 structure modes. Split into pieces after RA.
21920 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21921 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21923 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21924 SVE structure modes.
21925 (aarch64_classify_address): Likewise.
21926 (sizetochar): Move earlier in file.
21927 (aarch64_print_operand): Handle SVE register lists.
21928 (aarch64_array_mode): New function.
21929 (aarch64_sve_struct_memory_operand_p): Likewise.
21930 (TARGET_ARRAY_MODE): Redefine.
21932 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21933 Alan Hayward <alan.hayward@arm.com>
21934 David Sherwood <david.sherwood@arm.com>
21936 * target.def (array_mode): New target hook.
21937 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21938 * doc/tm.texi: Regenerate.
21939 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21940 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21941 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21942 targetm.array_mode.
21943 * stor-layout.c (mode_for_array): Likewise. Support polynomial
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 * fold-const.c (fold_binary_loc): Check the argument types
21951 rather than the result type when testing for a vector operation.
21953 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21955 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21956 * doc/tm.texi: Regenerate.
21958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21959 Alan Hayward <alan.hayward@arm.com>
21960 David Sherwood <david.sherwood@arm.com>
21962 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21963 (sve): Document new AArch64 extension.
21964 * doc/md.texi (w): Extend the description of the AArch64
21965 constraint to include SVE vectors.
21966 (Upl, Upa): Document new AArch64 predicate constraints.
21967 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21969 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21970 (msve-vector-bits=): New option.
21971 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21972 SVE when these are disabled.
21973 (sve): New extension.
21974 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21975 modes. Adjust their number of units based on aarch64_sve_vg.
21976 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21977 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21978 aarch64_addr_query_type.
21979 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21980 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21981 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21982 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21983 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21984 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21985 (aarch64_simd_imm_zero_p): Delete.
21986 (aarch64_check_zero_based_sve_index_immediate): Declare.
21987 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21988 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21989 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21990 (aarch64_sve_float_mul_immediate_p): Likewise.
21991 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21992 rather than an rtx.
21993 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21994 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21995 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21996 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21997 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21998 (aarch64_regmode_natural_size): Likewise.
21999 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22000 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22002 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22003 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22004 for VG and the SVE predicate registers.
22005 (V_ALIASES): Add a "z"-prefixed alias.
22006 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22007 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22008 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22009 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22010 (REG_CLASS_NAMES): Add entries for them.
22011 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22012 and the predicate registers.
22013 (aarch64_sve_vg): Declare.
22014 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22015 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22016 (REGMODE_NATURAL_SIZE): Define.
22017 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22019 * config/aarch64/aarch64.c: Include cfgrtl.h.
22020 (simd_immediate_info): Add a constructor for series vectors,
22021 and an associated step field.
22022 (aarch64_sve_vg): New variable.
22023 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22024 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22025 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22026 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22027 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22028 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22029 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22030 (aarch64_get_mask_mode): New functions.
22031 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22032 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22033 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22034 predicate modes and predicate registers. Explicitly restrict
22035 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22036 to store a vector mode if it is recognized by
22037 aarch64_classify_vector_mode.
22038 (aarch64_regmode_natural_size): New function.
22039 (aarch64_hard_regno_caller_save_mode): Return the original mode
22041 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22042 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22043 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22044 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22046 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22047 does not overlap dest if the function is frame-related. Handle
22049 (aarch64_split_add_offset): New function.
22050 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22051 them aarch64_add_offset.
22052 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22053 and update call to aarch64_sub_sp.
22054 (aarch64_add_cfa_expression): New function.
22055 (aarch64_expand_prologue): Pass extra temporary registers to the
22056 functions above. Handle the case in which we need to emit new
22057 DW_CFA_expressions for registers that were originally saved
22058 relative to the stack pointer, but now have to be expressed
22059 relative to the frame pointer.
22060 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22062 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22063 IP0 and IP1 values for SVE frames.
22064 (aarch64_expand_vec_series): New function.
22065 (aarch64_expand_sve_widened_duplicate): Likewise.
22066 (aarch64_expand_sve_const_vector): Likewise.
22067 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22068 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22069 into the register, rather than emitting a SET directly.
22070 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22071 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22072 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22073 (offset_9bit_signed_scaled_p): New functions.
22074 (aarch64_replicate_bitmask_imm): New function.
22075 (aarch64_bitmask_imm): Use it.
22076 (aarch64_cannot_force_const_mem): Reject expressions involving
22077 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22078 (aarch64_classify_index): Handle SVE indices, by requiring
22079 a plain register index with a scale that matches the element size.
22080 (aarch64_classify_address): Handle SVE addresses. Assert that
22081 the mode of the address is VOIDmode or an integer mode.
22082 Update call to aarch64_classify_symbol.
22083 (aarch64_classify_symbolic_expression): Update call to
22084 aarch64_classify_symbol.
22085 (aarch64_const_vec_all_in_range_p): New function.
22086 (aarch64_print_vector_float_operand): Likewise.
22087 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22088 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22089 and the FP immediates 1.0 and 0.5.
22090 (aarch64_print_address_internal): Handle SVE addresses.
22091 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22092 (aarch64_regno_regclass): Handle predicate registers.
22093 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22095 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22096 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22097 (aarch64_convert_sve_vector_bits): New function.
22098 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22099 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22100 rather than an rtx.
22101 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22102 Handle SVE vector and predicate modes. Accept VL-based constants
22103 that need only one temporary register, and VL offsets that require
22104 no temporary registers.
22105 (aarch64_conditional_register_usage): Mark the predicate registers
22106 as fixed if SVE isn't available.
22107 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22108 Return true for SVE vector and predicate modes.
22109 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22110 rather than an unsigned int. Handle SVE modes.
22111 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22113 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22115 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22116 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22117 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22118 (aarch64_sve_float_mul_immediate_p): New functions.
22119 (aarch64_sve_valid_immediate): New function.
22120 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22121 Explicitly reject structure modes. Check for INDEX constants.
22122 Handle PTRUE and PFALSE constants.
22123 (aarch64_check_zero_based_sve_index_immediate): New function.
22124 (aarch64_simd_imm_zero_p): Delete.
22125 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22126 vector modes. Accept constants in the range of CNT[BHWD].
22127 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22128 ask for an Advanced SIMD mode.
22129 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22130 (aarch64_simd_vector_alignment): Handle SVE predicates.
22131 (aarch64_vectorize_preferred_vector_alignment): New function.
22132 (aarch64_simd_vector_alignment_reachable): Use it instead of
22134 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22135 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22137 (MAX_VECT_LEN): Delete.
22138 (expand_vec_perm_d): Add a vec_flags field.
22139 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22140 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22141 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22143 (aarch64_evpc_rev): Rename to...
22144 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22145 (aarch64_evpc_rev_global): New function.
22146 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22147 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22149 (aarch64_evpc_sve_tbl): New function.
22150 (aarch64_expand_vec_perm_const_1): Update after rename of
22151 aarch64_evpc_rev. Handle SVE permutes too, trying
22152 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22153 than aarch64_evpc_tbl.
22154 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22155 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22156 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22157 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22158 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22159 (aarch64_expand_sve_vcond): New functions.
22160 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22161 of aarch64_vector_mode_p.
22162 (aarch64_dwarf_poly_indeterminate_value): New function.
22163 (aarch64_compute_pressure_classes): Likewise.
22164 (aarch64_can_change_mode_class): Likewise.
22165 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22166 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22167 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22168 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22169 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22170 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22171 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22172 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22174 (Dn, Dl, Dr): Accept const as well as const_vector.
22175 (Dz): Likewise. Compare against CONST0_RTX.
22176 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22177 of "vector" where appropriate.
22178 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22179 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22180 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22181 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22182 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22183 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22184 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22185 (v_int_equiv): Extend to SVE modes.
22186 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22188 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22189 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22190 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22191 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22192 (SVE_COND_FP_CMP): New int iterators.
22193 (perm_hilo): Handle the new unpack unspecs.
22194 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22196 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22197 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22198 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22199 (aarch64_equality_operator, aarch64_constant_vector_operand)
22200 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22201 (aarch64_sve_nonimmediate_operand): Likewise.
22202 (aarch64_sve_general_operand): Likewise.
22203 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22204 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22205 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22206 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22207 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22208 (aarch64_sve_float_arith_immediate): Likewise.
22209 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22210 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22211 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22212 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22213 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22214 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22215 (aarch64_sve_float_arith_operand): Likewise.
22216 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22217 (aarch64_sve_float_mul_operand): Likewise.
22218 (aarch64_sve_vec_perm_operand): Likewise.
22219 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22220 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22221 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22222 as well as const_vector.
22223 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22224 in file. Use CONST0_RTX and CONSTM1_RTX.
22225 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22226 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22227 Use aarch64_simd_imm_zero.
22228 * config/aarch64/aarch64-sve.md: New file.
22229 * config/aarch64/aarch64.md: Include it.
22230 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22231 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22232 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22233 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22234 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22235 (sve): New attribute.
22236 (enabled): Disable instructions with the sve attribute unless
22238 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22239 aarch64_expand_mov_immediate.
22240 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22241 CNT[BHSD] immediates.
22242 (movti): Split CONST_POLY_INT moves into two halves.
22243 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22244 Split additions that need a temporary here if the destination
22245 is the stack pointer.
22246 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22247 (*add<mode>3_poly_1): New instruction.
22248 (set_clobber_cc): New expander.
22250 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22252 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22253 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22254 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22255 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22256 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22257 Change innermode from fixed_mode_size to machine_mode.
22258 (simplify_subreg): Update call accordingly. Handle a constant-sized
22259 subreg of a variable-length CONST_VECTOR.
22261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22262 Alan Hayward <alan.hayward@arm.com>
22263 David Sherwood <david.sherwood@arm.com>
22265 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22266 (add_offset_to_base): New function, split out from...
22267 (create_mem_ref): ...here. When handling a scale other than 1,
22268 check first whether the address is valid without the offset.
22269 Add it into the base if so, leaving the index and scale as-is.
22271 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22274 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22275 fold_for_warn before checking if arg2 is INTEGER_CST.
22277 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22279 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22280 (store_multiple_operation): Delete.
22281 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22282 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22283 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22284 guarded by TARGET_STRING.
22285 (rs6000_output_load_multiple): Delete.
22286 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22287 OPTION_MASK_STRING / TARGET_STRING handling.
22288 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22289 (const rs6000_opt_masks) <"string">: Change mask to 0.
22290 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22291 (MASK_STRING): Delete.
22292 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22294 (load_multiple): Delete.
22301 (store_multiple): Delete.
22308 (movmemsi_8reg): Delete.
22309 (corresponding unnamed define_insn): Delete.
22310 (movmemsi_6reg): Delete.
22311 (corresponding unnamed define_insn): Delete.
22312 (movmemsi_4reg): Delete.
22313 (corresponding unnamed define_insn): Delete.
22314 (movmemsi_2reg): Delete.
22315 (corresponding unnamed define_insn): Delete.
22316 (movmemsi_1reg): Delete.
22317 (corresponding unnamed define_insn): Delete.
22318 * config/rs6000/rs6000.opt (mno-string): New.
22319 (mstring): Replace by deprecation warning stub.
22320 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22322 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22324 * regrename.c (regrename_do_replace): If replacing the same
22325 reg multiple times, try to reuse last created gen_raw_REG.
22328 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22329 main to workaround a bug in GDB.
22331 2018-01-12 Tom de Vries <tom@codesourcery.com>
22334 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22336 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22338 PR rtl-optimization/80481
22339 * ira-color.c (get_cap_member): New function.
22340 (allocnos_conflict_by_live_ranges_p): Use it.
22341 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22342 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22344 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22347 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22348 (*saddl_se_1): Ditto.
22349 (*ssubsi_1): Ditto.
22350 (*ssubl_se_1): Ditto.
22352 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22354 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22355 rather than wi::to_widest for DR_INITs.
22356 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22357 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22358 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22360 (vect_analyze_group_access_1): Note that here.
22362 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22364 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22365 polynomial type sizes.
22367 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22369 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22370 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22371 (gimple_add_tmp_var): Likewise.
22373 2018-01-12 Martin Liska <mliska@suse.cz>
22375 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22376 (gimple_alloc_sizes): Likewise.
22377 (dump_gimple_statistics): Use PRIu64 in printf format.
22378 * gimple.h: Change uint64_t to int.
22380 2018-01-12 Martin Liska <mliska@suse.cz>
22382 * tree-core.h: Use uint64_t instead of int.
22383 * tree.c (tree_node_counts): Likewise.
22384 (tree_node_sizes): Likewise.
22385 (dump_tree_statistics): Use PRIu64 in printf format.
22387 2018-01-12 Martin Liska <mliska@suse.cz>
22389 * Makefile.in: As qsort_chk is implemented in vec.c, add
22390 vec.o to linkage of gencfn-macros.
22391 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22392 passing the info to record_node_allocation_statistics.
22393 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22395 * ggc-common.c (struct ggc_usage): Add operator== and use
22396 it in operator< and compare function.
22397 * mem-stats.h (struct mem_usage): Likewise.
22398 * vec.c (struct vec_usage): Remove operator< and compare
22399 function. Can be simply inherited.
22401 2018-01-12 Martin Jambor <mjambor@suse.cz>
22404 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22405 * tree-ssa-math-opts.c: Include domwalk.h.
22406 (convert_mult_to_fma_1): New function.
22407 (fma_transformation_info): New type.
22408 (fma_deferring_state): Likewise.
22409 (cancel_fma_deferring): New function.
22410 (result_of_phi): Likewise.
22411 (last_fma_candidate_feeds_initial_phi): Likewise.
22412 (convert_mult_to_fma): Added deferring logic, split actual
22413 transformation to convert_mult_to_fma_1.
22414 (math_opts_dom_walker): New type.
22415 (math_opts_dom_walker::after_dom_children): New method, body moved
22416 here from pass_optimize_widening_mul::execute, added deferring logic
22418 (pass_optimize_widening_mul::execute): Moved most of code to
22419 math_opts_dom_walker::after_dom_children.
22420 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22421 * config/i386/i386.c (ix86_option_override_internal): Added
22422 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22424 2018-01-12 Richard Biener <rguenther@suse.de>
22427 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22428 inline instance vars.
22430 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22433 * config/rx/rx.c (rx_is_restricted_memory_address):
22434 Handle SUBREG case.
22436 2018-01-12 Richard Biener <rguenther@suse.de>
22438 PR tree-optimization/80846
22439 * target.def (split_reduction): New target hook.
22440 * targhooks.c (default_split_reduction): New function.
22441 * targhooks.h (default_split_reduction): Declare.
22442 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22443 target requests first reduce vectors by combining low and high
22445 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22446 (get_vectype_for_scalar_type_and_size): Export.
22447 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22448 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22449 * doc/tm.texi: Regenerate.
22450 * config/i386/i386.c (ix86_split_reduction): Implement
22451 TARGET_VECTORIZE_SPLIT_REDUCTION.
22453 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22456 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22457 in PIC mode except for TARGET_VXWORKS_RTP.
22458 * config/sparc/sparc.c: Include cfgrtl.h.
22459 (TARGET_INIT_PIC_REG): Define.
22460 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22461 (sparc_pic_register_p): New predicate.
22462 (sparc_legitimate_address_p): Use it.
22463 (sparc_legitimize_pic_address): Likewise.
22464 (sparc_delegitimize_address): Likewise.
22465 (sparc_mode_dependent_address_p): Likewise.
22466 (gen_load_pcrel_sym): Remove 4th parameter.
22467 (load_got_register): Adjust call to above. Remove obsolete stuff.
22468 (sparc_expand_prologue): Do not call load_got_register here.
22469 (sparc_flat_expand_prologue): Likewise.
22470 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22471 (sparc_use_pseudo_pic_reg): New function.
22472 (sparc_init_pic_reg): Likewise.
22473 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22474 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22476 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22478 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22479 Add item for branch_cost.
22481 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22483 PR rtl-optimization/83565
22484 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22485 not extend the result to a larger mode for rotate operations.
22486 (num_sign_bit_copies1): Likewise.
22488 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22491 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22493 Use values-Xc.o for -pedantic.
22494 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22496 2018-01-12 Martin Liska <mliska@suse.cz>
22499 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22501 (possible_polymorphic_call_targets): Use it.
22502 (ipa_devirt): Likewise.
22504 2018-01-12 Martin Liska <mliska@suse.cz>
22506 * profile-count.h (enum profile_quality): Use 0 as invalid
22507 enum value of profile_quality.
22509 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22511 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22512 -mext-string options.
22514 2018-01-12 Richard Biener <rguenther@suse.de>
22516 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22517 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22518 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22520 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22522 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22524 * configure.ac (--with-long-double-format): Add support for the
22525 configuration option to change the default long double format on
22527 * config.gcc (powerpc*-linux*-*): Likewise.
22528 * configure: Regenerate.
22529 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22530 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22531 used without modification.
22533 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22535 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22536 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22537 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22538 MISC_BUILTIN_SPEC_BARRIER.
22539 (rs6000_init_builtins): Likewise.
22540 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22542 (speculation_barrier): New define_insn.
22543 * doc/extend.texi: Document __builtin_speculation_barrier.
22545 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22548 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22549 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22550 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22552 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22553 integral modes instead of "ss" and "sd".
22554 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22555 vectors with 32-bit and 64-bit elements.
22556 (vecdupssescalarmodesuffix): New mode attribute.
22557 (vec_dup<mode>): Use it.
22559 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22562 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22563 frame if argument is passed on stack.
22565 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22568 * ree.c (combine_reaching_defs): Optimize also
22569 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22570 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22572 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22574 PR middle-end/83189
22575 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22577 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22579 PR middle-end/83718
22580 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22581 after they are computed.
22583 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22585 PR tree-optimization/83695
22586 * gimple-loop-linterchange.cc
22587 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22588 reset cached scev information after interchange.
22589 (pass_linterchange::execute): Remove call to scev_reset_htab.
22591 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22593 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22594 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22595 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22596 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22597 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22598 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22599 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22600 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22601 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22602 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22603 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22604 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22605 (V_lane_reg): Likewise.
22606 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22608 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22609 (vfmal_lane_low<mode>_intrinsic,
22610 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22611 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22612 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22613 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22614 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22615 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22617 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22619 * config/arm/arm-cpus.in (fp16fml): New feature.
22620 (ALL_SIMD): Add fp16fml.
22621 (armv8.2-a): Add fp16fml as an option.
22622 (armv8.3-a): Likewise.
22623 (armv8.4-a): Add fp16fml as part of fp16.
22624 * config/arm/arm.h (TARGET_FP16FML): Define.
22625 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22627 * config/arm/arm-modes.def (V2HF): Define.
22628 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22629 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22630 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22631 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22632 vfmsl_low, vfmsl_high): New set of builtins.
22633 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22634 (vfml_op): New code attribute.
22635 (VFMLHALVES): New int iterator.
22636 (VFML, VFMLSEL): New mode attributes.
22637 (V_reg): Define mapping for V2HF.
22638 (V_hi, V_lo): New mode attributes.
22639 (VF_constraint): Likewise.
22640 (vfml_half, vfml_half_selector): New int attributes.
22641 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22643 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22644 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22646 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22647 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22648 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22649 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22651 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22652 Document new effective target and option set.
22654 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22656 * config/arm/arm-cpus.in (armv8_4): New feature.
22657 (ARMv8_4a): New fgroup.
22658 (armv8.4-a): New arch.
22659 * config/arm/arm-tables.opt: Regenerate.
22660 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22661 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22662 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22663 Add matching rules for -march=armv8.4-a and extensions.
22664 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22666 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22669 * config/rx/rx.md (BW): New mode attribute.
22670 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22672 2018-01-11 Richard Biener <rguenther@suse.de>
22674 PR tree-optimization/83435
22675 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22676 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22677 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22679 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22680 Alan Hayward <alan.hayward@arm.com>
22681 David Sherwood <david.sherwood@arm.com>
22683 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22685 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22686 (aarch64_print_address_internal): Use it to check for a zero offset.
22688 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22689 Alan Hayward <alan.hayward@arm.com>
22690 David Sherwood <david.sherwood@arm.com>
22692 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22693 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22694 Return a poly_int64 rather than a HOST_WIDE_INT.
22695 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22696 rather than a HOST_WIDE_INT.
22697 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22698 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22699 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22700 final_offset from HOST_WIDE_INT to poly_int64.
22701 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22702 to_constant when getting the number of units in an Advanced SIMD
22704 (aarch64_builtin_vectorized_function): Check for a constant number
22706 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22708 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22709 attribute instead of GET_MODE_NUNITS.
22710 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22711 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22712 GET_MODE_SIZE for fixed-size registers.
22713 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22714 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22715 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22716 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22717 (aarch64_print_operand, aarch64_print_address_internal)
22718 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22719 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22720 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22721 Handle polynomial GET_MODE_SIZE.
22722 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22723 wider than SImode without modification.
22724 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22725 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22726 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22727 passing and returning SVE modes.
22728 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22729 rather than GEN_INT.
22730 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22731 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22732 (aarch64_allocate_and_probe_stack_space): Likewise.
22733 (aarch64_layout_frame): Cope with polynomial offsets.
22734 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22735 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22736 polynomial offsets.
22737 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22738 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22739 poly_int64 rather than a HOST_WIDE_INT.
22740 (aarch64_get_separate_components, aarch64_process_components)
22741 (aarch64_expand_prologue, aarch64_expand_epilogue)
22742 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22743 (aarch64_anchor_offset): New function, split out from...
22744 (aarch64_legitimize_address): ...here.
22745 (aarch64_builtin_vectorization_cost): Handle polynomial
22746 TYPE_VECTOR_SUBPARTS.
22747 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22749 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22750 number of elements from the PARALLEL rather than the mode.
22751 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22752 rather than GET_MODE_BITSIZE.
22753 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22754 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22755 (aarch64_expand_vec_perm_const_1): Handle polynomial
22756 d->perm.length () and d->perm elements.
22757 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22758 Apply to_constant to d->perm elements.
22759 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22760 polynomial CONST_VECTOR_NUNITS.
22761 (aarch64_move_pointer): Take amount as a poly_int64 rather
22763 (aarch64_progress_pointer): Avoid temporary variable.
22764 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22765 the mode attribute instead of GET_MODE.
22767 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22768 Alan Hayward <alan.hayward@arm.com>
22769 David Sherwood <david.sherwood@arm.com>
22771 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22772 x exists before using it.
22773 (aarch64_add_constant_internal): Rename to...
22774 (aarch64_add_offset_1): ...this. Replace regnum with separate
22775 src and dest rtxes. Handle the case in which they're different,
22776 including when the offset is zero. Replace scratchreg with an rtx.
22777 Use 2 additions if there is no spare register into which we can
22778 move a 16-bit constant.
22779 (aarch64_add_constant): Delete.
22780 (aarch64_add_offset): Replace reg with separate src and dest
22781 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22782 Use aarch64_add_offset_1.
22783 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22784 an rtx rather than an int. Take the delta as a poly_int64
22785 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22786 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22787 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22788 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22789 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22790 and aarch64_add_sp.
22791 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22792 aarch64_add_constant.
22794 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22796 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22797 Use scalar_float_mode.
22799 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22801 * config/aarch64/aarch64-simd.md
22802 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22803 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22804 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22805 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22806 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22807 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22808 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22809 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22810 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22811 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22813 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22816 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22817 targ_options->x_arm_arch_string is non NULL.
22819 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22821 * config/aarch64/aarch64.h
22822 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22824 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22827 * expmed.c (emit_store_flag_force): Swap if const op0
22828 and change VOIDmode to mode of op0.
22830 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22832 PR rtl-optimization/83761
22833 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22834 than bytes to mode_for_size.
22836 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22838 PR middle-end/83189
22839 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22840 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22843 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22845 PR middle-end/83575
22846 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22847 when in layout mode.
22848 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22849 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22852 2018-01-10 Michael Collison <michael.collison@arm.com>
22854 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22855 * config/aarch64/aarch64-option-extension.def: Add
22856 AARCH64_OPT_EXTENSION of 'fp16fml'.
22857 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22858 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22859 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22860 * config/aarch64/constraints.md (Ui7): New constraint.
22861 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22862 (VFMLA_SEL_W): Ditto.
22865 (VFMLA16_LOW): New int iterator.
22866 (VFMLA16_HIGH): Ditto.
22867 (UNSPEC_FMLAL): New unspec.
22868 (UNSPEC_FMLSL): Ditto.
22869 (UNSPEC_FMLAL2): Ditto.
22870 (UNSPEC_FMLSL2): Ditto.
22871 (f16mac): New code attribute.
22872 * config/aarch64/aarch64-simd-builtins.def
22873 (aarch64_fmlal_lowv2sf): Ditto.
22874 (aarch64_fmlsl_lowv2sf): Ditto.
22875 (aarch64_fmlalq_lowv4sf): Ditto.
22876 (aarch64_fmlslq_lowv4sf): Ditto.
22877 (aarch64_fmlal_highv2sf): Ditto.
22878 (aarch64_fmlsl_highv2sf): Ditto.
22879 (aarch64_fmlalq_highv4sf): Ditto.
22880 (aarch64_fmlslq_highv4sf): Ditto.
22881 (aarch64_fmlal_lane_lowv2sf): Ditto.
22882 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22883 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22884 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22885 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22886 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22887 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22888 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22889 (aarch64_fmlal_lane_highv2sf): Ditto.
22890 (aarch64_fmlsl_lane_highv2sf): Ditto.
22891 (aarch64_fmlal_laneq_highv2sf): Ditto.
22892 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22893 (aarch64_fmlalq_lane_highv4sf): Ditto.
22894 (aarch64_fmlsl_lane_highv4sf): Ditto.
22895 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22896 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22897 * config/aarch64/aarch64-simd.md:
22898 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22899 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22900 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22901 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22902 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22903 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22904 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22905 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22906 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22907 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22908 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22909 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22910 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22911 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22912 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22913 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22914 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22915 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22916 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22917 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22918 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22919 (vfmlsl_low_u32): Ditto.
22920 (vfmlalq_low_u32): Ditto.
22921 (vfmlslq_low_u32): Ditto.
22922 (vfmlal_high_u32): Ditto.
22923 (vfmlsl_high_u32): Ditto.
22924 (vfmlalq_high_u32): Ditto.
22925 (vfmlslq_high_u32): Ditto.
22926 (vfmlal_lane_low_u32): Ditto.
22927 (vfmlsl_lane_low_u32): Ditto.
22928 (vfmlal_laneq_low_u32): Ditto.
22929 (vfmlsl_laneq_low_u32): Ditto.
22930 (vfmlalq_lane_low_u32): Ditto.
22931 (vfmlslq_lane_low_u32): Ditto.
22932 (vfmlalq_laneq_low_u32): Ditto.
22933 (vfmlslq_laneq_low_u32): Ditto.
22934 (vfmlal_lane_high_u32): Ditto.
22935 (vfmlsl_lane_high_u32): Ditto.
22936 (vfmlal_laneq_high_u32): Ditto.
22937 (vfmlsl_laneq_high_u32): Ditto.
22938 (vfmlalq_lane_high_u32): Ditto.
22939 (vfmlslq_lane_high_u32): Ditto.
22940 (vfmlalq_laneq_high_u32): Ditto.
22941 (vfmlslq_laneq_high_u32): Ditto.
22942 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22943 (AARCH64_FL_FOR_ARCH8_4): New.
22944 (AARCH64_ISA_F16FML): New ISA flag.
22945 (TARGET_F16FML): New feature flag for fp16fml.
22946 (doc/invoke.texi): Document new fp16fml option.
22948 2018-01-10 Michael Collison <michael.collison@arm.com>
22950 * config/aarch64/aarch64-builtins.c:
22951 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22952 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22953 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22954 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22955 (AARCH64_ISA_SHA3): New ISA flag.
22956 (TARGET_SHA3): New feature flag for sha3.
22957 * config/aarch64/iterators.md (sha512_op): New int attribute.
22958 (CRYPTO_SHA512): New int iterator.
22959 (UNSPEC_SHA512H): New unspec.
22960 (UNSPEC_SHA512H2): Ditto.
22961 (UNSPEC_SHA512SU0): Ditto.
22962 (UNSPEC_SHA512SU1): Ditto.
22963 * config/aarch64/aarch64-simd-builtins.def
22964 (aarch64_crypto_sha512hqv2di): New builtin.
22965 (aarch64_crypto_sha512h2qv2di): Ditto.
22966 (aarch64_crypto_sha512su0qv2di): Ditto.
22967 (aarch64_crypto_sha512su1qv2di): Ditto.
22968 (aarch64_eor3qv8hi): Ditto.
22969 (aarch64_rax1qv2di): Ditto.
22970 (aarch64_xarqv2di): Ditto.
22971 (aarch64_bcaxqv8hi): Ditto.
22972 * config/aarch64/aarch64-simd.md:
22973 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22974 (aarch64_crypto_sha512su0qv2di): Ditto.
22975 (aarch64_crypto_sha512su1qv2di): Ditto.
22976 (aarch64_eor3qv8hi): Ditto.
22977 (aarch64_rax1qv2di): Ditto.
22978 (aarch64_xarqv2di): Ditto.
22979 (aarch64_bcaxqv8hi): Ditto.
22980 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22981 (vsha512h2q_u64): Ditto.
22982 (vsha512su0q_u64): Ditto.
22983 (vsha512su1q_u64): Ditto.
22984 (veor3q_u16): Ditto.
22985 (vrax1q_u64): Ditto.
22986 (vxarq_u64): Ditto.
22987 (vbcaxq_u16): Ditto.
22988 * config/arm/types.md (crypto_sha512): New type attribute.
22989 (crypto_sha3): Ditto.
22990 (doc/invoke.texi): Document new sha3 option.
22992 2018-01-10 Michael Collison <michael.collison@arm.com>
22994 * config/aarch64/aarch64-builtins.c:
22995 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22996 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22997 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22998 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22999 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23000 (AARCH64_ISA_SM4): New ISA flag.
23001 (TARGET_SM4): New feature flag for sm4.
23002 * config/aarch64/aarch64-simd-builtins.def
23003 (aarch64_sm3ss1qv4si): Ditto.
23004 (aarch64_sm3tt1aq4si): Ditto.
23005 (aarch64_sm3tt1bq4si): Ditto.
23006 (aarch64_sm3tt2aq4si): Ditto.
23007 (aarch64_sm3tt2bq4si): Ditto.
23008 (aarch64_sm3partw1qv4si): Ditto.
23009 (aarch64_sm3partw2qv4si): Ditto.
23010 (aarch64_sm4eqv4si): Ditto.
23011 (aarch64_sm4ekeyqv4si): Ditto.
23012 * config/aarch64/aarch64-simd.md:
23013 (aarch64_sm3ss1qv4si): Ditto.
23014 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23015 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23016 (aarch64_sm4eqv4si): Ditto.
23017 (aarch64_sm4ekeyqv4si): Ditto.
23018 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23019 (sm3part_op): Ditto.
23020 (CRYPTO_SM3TT): Ditto.
23021 (CRYPTO_SM3PART): Ditto.
23022 (UNSPEC_SM3SS1): New unspec.
23023 (UNSPEC_SM3TT1A): Ditto.
23024 (UNSPEC_SM3TT1B): Ditto.
23025 (UNSPEC_SM3TT2A): Ditto.
23026 (UNSPEC_SM3TT2B): Ditto.
23027 (UNSPEC_SM3PARTW1): Ditto.
23028 (UNSPEC_SM3PARTW2): Ditto.
23029 (UNSPEC_SM4E): Ditto.
23030 (UNSPEC_SM4EKEY): Ditto.
23031 * config/aarch64/constraints.md (Ui2): New constraint.
23032 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23033 * config/arm/types.md (crypto_sm3): New type attribute.
23034 (crypto_sm4): Ditto.
23035 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23036 (vsm3tt1aq_u32): Ditto.
23037 (vsm3tt1bq_u32): Ditto.
23038 (vsm3tt2aq_u32): Ditto.
23039 (vsm3tt2bq_u32): Ditto.
23040 (vsm3partw1q_u32): Ditto.
23041 (vsm3partw2q_u32): Ditto.
23042 (vsm4eq_u32): Ditto.
23043 (vsm4ekeyq_u32): Ditto.
23044 (doc/invoke.texi): Document new sm4 option.
23046 2018-01-10 Michael Collison <michael.collison@arm.com>
23048 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23049 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23050 (AARCH64_FL_FOR_ARCH8_4): New.
23051 (AARCH64_FL_V8_4): New flag.
23052 (doc/invoke.texi): Document new armv8.4-a option.
23054 2018-01-10 Michael Collison <michael.collison@arm.com>
23056 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23057 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23058 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23059 * config/aarch64/aarch64-option-extension.def: Add
23060 AARCH64_OPT_EXTENSION of 'sha2'.
23061 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23062 (crypto): Disable sha2 and aes if crypto disabled.
23063 (crypto): Enable aes and sha2 if enabled.
23064 (simd): Disable sha2 and aes if simd disabled.
23065 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23067 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23068 (TARGET_SHA2): New feature flag for sha2.
23069 (TARGET_AES): New feature flag for aes.
23070 * config/aarch64/aarch64-simd.md:
23071 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23072 conditional on TARGET_AES.
23073 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23074 (aarch64_crypto_sha1hsi): Make pattern conditional
23076 (aarch64_crypto_sha1hv4si): Ditto.
23077 (aarch64_be_crypto_sha1hv4si): Ditto.
23078 (aarch64_crypto_sha1su1v4si): Ditto.
23079 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23080 (aarch64_crypto_sha1su0v4si): Ditto.
23081 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23082 (aarch64_crypto_sha256su0v4si): Ditto.
23083 (aarch64_crypto_sha256su1v4si): Ditto.
23084 (doc/invoke.texi): Document new aes and sha2 options.
23086 2018-01-10 Martin Sebor <msebor@redhat.com>
23088 PR tree-optimization/83781
23089 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23092 2018-01-11 Martin Sebor <msebor@gmail.com>
23093 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23095 PR tree-optimization/83501
23096 PR tree-optimization/81703
23098 * tree-ssa-strlen.c (get_string_cst): Rename...
23099 (get_string_len): ...to this. Handle global constants.
23100 (handle_char_store): Adjust.
23102 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23103 Jim Wilson <jimw@sifive.com>
23105 * config/riscv/riscv-protos.h (riscv_output_return): New.
23106 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23107 (riscv_attribute_table, riscv_output_return),
23108 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23109 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23110 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23112 (riscv_expand_prologue): Add early return for naked function.
23113 (riscv_expand_epilogue): Likewise.
23114 (riscv_function_ok_for_sibcall): Return false for naked function.
23115 (riscv_set_current_function): New.
23116 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23117 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23118 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23119 * doc/extend.texi (RISC-V Function Attributes): New.
23121 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23123 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23124 check for 128-bit long double before checking TCmode.
23125 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23126 128-bit long doubles before checking TFmode or TCmode.
23127 (FLOAT128_IBM_P): Likewise.
23129 2018-01-10 Martin Sebor <msebor@redhat.com>
23131 PR tree-optimization/83671
23132 * builtins.c (c_strlen): Unconditionally return zero for the empty
23134 Use -Warray-bounds for warnings.
23135 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23136 for non-constant array indices with COMPONENT_REF, arrays of
23137 arrays, and pointers to arrays.
23138 (gimple_fold_builtin_strlen): Determine and set length range for
23139 non-constant character arrays.
23141 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23143 PR middle-end/81897
23144 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23147 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23149 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23151 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23154 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23155 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23156 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23157 indexed_or_indirect_operand predicate.
23158 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23159 (*vsx_le_perm_load_v8hi): Likewise.
23160 (*vsx_le_perm_load_v16qi): Likewise.
23161 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23162 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23163 (*vsx_le_perm_store_v8hi): Likewise.
23164 (*vsx_le_perm_store_v16qi): Likewise.
23165 (eight unnamed splitters): Likewise.
23167 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23169 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23170 * config/rs6000/emmintrin.h: Likewise.
23171 * config/rs6000/mmintrin.h: Likewise.
23172 * config/rs6000/xmmintrin.h: Likewise.
23174 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23177 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23179 * tree.c (tree_nop_conversion): Return true for location wrapper
23181 (maybe_wrap_with_location): New function.
23182 (selftest::check_strip_nops): New function.
23183 (selftest::test_location_wrappers): New function.
23184 (selftest::tree_c_tests): Call it.
23185 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23186 (maybe_wrap_with_location): New decl.
23187 (EXPR_LOCATION_WRAPPER_P): New macro.
23188 (location_wrapper_p): New inline function.
23189 (tree_strip_any_location_wrapper): New inline function.
23191 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23194 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23195 stack_realign_offset for the largest alignment of stack slot
23197 (ix86_find_max_used_stack_alignment): New function.
23198 (ix86_finalize_stack_frame_flags): Use it. Set
23199 max_used_stack_alignment if we don't realign stack.
23200 * config/i386/i386.h (machine_function): Add
23201 max_used_stack_alignment.
23203 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23205 * config/arm/arm.opt (-mbranch-cost): New option.
23206 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23209 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23212 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23213 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23215 2018-01-10 Richard Biener <rguenther@suse.de>
23218 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23219 early out so it also covers the case where we have a non-NULL
23222 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23224 PR tree-optimization/83753
23225 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23226 for non-strided grouped accesses if the number of elements is 1.
23228 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23231 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23232 * i386.h (TARGET_USE_GATHER): Define.
23233 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23235 2018-01-10 Martin Liska <mliska@suse.cz>
23238 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23239 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23241 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23242 CLEANUP_NO_PARTITIONING is not set.
23244 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23246 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23247 for vectors, as a partial revert of r254296.
23248 * rtl.h (const_vec_p): Delete.
23249 (const_vec_duplicate_p): Don't test for vector CONSTs.
23250 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23251 * expmed.c (make_tree): Likewise.
23254 * common.md (E, F): Use CONSTANT_P instead of checking for
23256 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23257 checking for CONST_VECTOR.
23259 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23261 PR middle-end/83575
23262 * predict.c (force_edge_cold): Handle in more sane way edges
23263 with no prediction.
23265 2018-01-09 Carl Love <cel@us.ibm.com>
23267 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23269 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23270 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23271 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23272 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23273 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23274 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23275 * config/rs6000/rs6000-protos.h: Add extern defition for
23276 rs6000_generate_float2_double_code.
23277 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23279 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23280 (float2_v2df): Add define_expand.
23282 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23285 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23286 op_mode in the force_to_mode call.
23288 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23290 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23291 instead of checking each element individually.
23292 (aarch64_evpc_uzp): Likewise.
23293 (aarch64_evpc_zip): Likewise.
23294 (aarch64_evpc_ext): Likewise.
23295 (aarch64_evpc_rev): Likewise.
23296 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23297 instead of checking each element individually. Return true without
23299 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23300 whether all selected elements come from the same input, instead of
23301 checking each element individually. Remove calls to gen_rtx_REG,
23302 start_sequence and end_sequence and instead assert that no rtl is
23305 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23307 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23308 order of HIGH and CONST checks.
23310 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23312 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23313 if the destination isn't an SSA_NAME.
23315 2018-01-09 Richard Biener <rguenther@suse.de>
23317 PR tree-optimization/83668
23318 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23320 (canonicalize_loop_form): ... here, renamed from ...
23321 (canonicalize_loop_closed_ssa_form): ... this and amended to
23322 swap successor edges for loop exit blocks to make us use
23323 the RPO order we need for initial schedule generation.
23325 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23327 PR tree-optimization/64811
23328 * match.pd: When optimizing comparisons with Inf, avoid
23329 introducing or losing exceptions from comparisons with NaN.
23331 2018-01-09 Martin Liska <mliska@suse.cz>
23334 * asan.c (shadow_mem_size): Add gcc_assert.
23336 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23338 Don't save registers in main().
23341 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23342 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23343 * config/avr/avr.c (avr_set_current_function): Don't error if
23344 naked, OS_task or OS_main are specified at the same time.
23345 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23347 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23349 * common/config/avr/avr-common.c (avr_option_optimization_table):
23350 Switch on -mmain-is-OS_task for optimizing compilations.
23352 2018-01-09 Richard Biener <rguenther@suse.de>
23354 PR tree-optimization/83572
23355 * graphite.c: Include cfganal.h.
23356 (graphite_transform_loops): Connect infinite loops to exit
23357 and remove fake edges at the end.
23359 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23361 * ipa-inline.c (edge_badness): Revert accidental checkin.
23363 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23366 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23367 symbols; not inline clones.
23369 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23372 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23373 hard registers. Formatting fixes.
23375 PR preprocessor/83722
23376 * gcc.c (try_generate_repro): Pass
23377 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23378 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23381 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23382 Kito Cheng <kito.cheng@gmail.com>
23384 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23385 (riscv_leaf_function_p): Delete.
23386 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23388 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23390 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23392 (do_ifelse): New function.
23393 (do_isel): New function.
23394 (do_sub3): New function.
23395 (do_add3): New function.
23396 (do_load_mask_compare): New function.
23397 (do_overlap_load_compare): New function.
23398 (expand_compare_loop): New function.
23399 (expand_block_compare): Call expand_compare_loop() when appropriate.
23400 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23401 option description.
23402 (-mblock-compare-inline-loop-limit): New option.
23404 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23407 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23408 Reverse order of second and third operands in first alternative.
23409 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23410 of first and second elements in UNSPEC_VPERMR vector.
23411 (altivec_expand_vec_perm_le): Likewise.
23413 2018-01-08 Jeff Law <law@redhat.com>
23415 PR rtl-optimizatin/81308
23416 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23417 (process_switch): If group_case_labels makes a change, then set
23419 (pass_convert_switch::execute): If a switch is converted, then
23420 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23422 PR rtl-optimization/81308
23423 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23426 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23428 PR target/83663 - Revert r255946
23429 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23430 generation for cases where splatting a value is not useful.
23431 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23432 across a vec_duplicate and a paradoxical subreg forming a vector
23433 mode to a vec_concat.
23435 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23437 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23438 -march=armv8.3-a variants.
23439 * config/arm/t-multilib: Likewise.
23440 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23442 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23444 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23446 (cceq_ior_compare_complement): Give it a name so I can use it, and
23447 change boolean_or_operator predicate to boolean_operator so it can
23448 be used to generate a crand.
23449 (eqne): New code iterator.
23450 (bd/bd_neg): New code_attrs.
23451 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23452 a single define_insn.
23453 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23454 decrement (bdnzt/bdnzf/bdzt/bdzf).
23455 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23456 with the new names of the branch decrement patterns, and added the
23457 names of the branch decrement conditional patterns.
23459 2018-01-08 Richard Biener <rguenther@suse.de>
23461 PR tree-optimization/83563
23462 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23465 2018-01-08 Richard Biener <rguenther@suse.de>
23467 PR middle-end/83713
23468 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23470 2018-01-08 Richard Biener <rguenther@suse.de>
23472 PR tree-optimization/83685
23473 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23474 references to abnormals.
23476 2018-01-08 Richard Biener <rguenther@suse.de>
23479 * dwarf2out.c (output_indirect_strings): Handle empty
23480 skeleton_debug_str_hash.
23481 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23483 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23485 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23486 (emit_store_direct): Likewise.
23487 (arc_trampoline_adjust_address): Likewise.
23488 (arc_asm_trampoline_template): New function.
23489 (arc_initialize_trampoline): Use asm_trampoline_template.
23490 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23491 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23492 * config/arc/arc.md (flush_icache): Delete pattern.
23494 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23496 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23497 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23500 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23503 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23504 by not USED_FOR_TARGET.
23505 (make_pass_resolve_sw_modes): Likewise.
23507 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23509 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23512 2018-01-08 Richard Biener <rguenther@suse.de>
23514 PR middle-end/83580
23515 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23517 2018-01-08 Richard Biener <rguenther@suse.de>
23519 PR middle-end/83517
23520 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23522 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23524 PR middle-end/81897
23525 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23526 basic blocks with a small number of successors.
23527 (convert_control_dep_chain_into_preds): Improve handling of
23529 (dump_predicates): Split apart into...
23530 (dump_pred_chain): ...here...
23531 (dump_pred_info): ...and here.
23532 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23533 (can_chain_union_be_invalidated_p): Improve check for invalidation
23535 (uninit_uses_cannot_happen): Avoid unnecessary if
23536 convert_control_dep_chain_into_preds yielded nothing.
23538 2018-01-06 Martin Sebor <msebor@redhat.com>
23540 PR tree-optimization/83640
23541 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23542 subtracting negative offset from size.
23543 (builtin_access::overlap): Adjust offset bounds of the access to fall
23544 within the size of the object if possible.
23546 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23548 PR rtl-optimization/83699
23549 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23550 extract_bit_field_as_subreg to cases in which the extracted
23551 value is also a vector.
23553 * lra-constraints.c (process_alt_operands): Test for the equivalence
23554 substitutions when detecting a possible reload cycle.
23556 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23559 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23560 by default if flag_selective_schedling{,2}. Formatting fixes.
23562 PR rtl-optimization/83682
23563 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23564 if it has non-VECTOR_MODE element mode.
23565 (vec_duplicate_p): Likewise.
23567 PR middle-end/83694
23568 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23569 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23571 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23574 * config/i386/i386-builtin.def
23575 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23576 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23577 Require also OPTION_MASK_ISA_AVX512F in addition to
23578 OPTION_MASK_ISA_GFNI.
23579 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23580 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23581 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23582 to OPTION_MASK_ISA_GFNI.
23583 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23584 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23585 OPTION_MASK_ISA_AVX512BW.
23586 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23587 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23588 addition to OPTION_MASK_ISA_GFNI.
23589 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23590 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23591 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23592 to OPTION_MASK_ISA_GFNI.
23593 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23594 a requirement for all ISAs rather than any of them with a few
23596 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23598 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23599 bitmasks to be enabled with 3 exceptions, instead of requiring any
23600 enabled ISA with lots of exceptions.
23601 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23602 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23603 Change avx512bw in isa attribute to avx512f.
23604 * config/i386/sgxintrin.h: Add license boilerplate.
23605 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23606 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23607 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23608 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23610 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23611 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23612 temporarily sse2 rather than sse if not enabled already.
23615 * config/i386/sse.md (VI248_VLBW): Rename to ...
23616 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23617 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23618 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23619 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23620 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23621 mode iterator instead of VI248_VLBW.
23623 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23625 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23626 (record_modified): Skip clobbers; add debug output.
23627 (param_change_prob): Use sreal frequencies.
23629 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23631 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23632 punt for user-aligned variables.
23634 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23636 * tree-chrec.c (chrec_contains_symbols): Return true for
23639 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23642 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23643 of (x|y) == x for BICS pattern.
23645 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23647 PR tree-optimization/83605
23648 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23649 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23652 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23654 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23655 * config/epiphany/rtems.h: New file.
23657 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23658 Uros Bizjak <ubizjak@gmail.com>
23661 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23662 QIreg_operand instead of register_operand predicate.
23663 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23664 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23665 comments instead of -fmitigate[-_]rop.
23667 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23670 * cgraphunit.c (symbol_table::compile): Switch to text_section
23671 before calling assembly_start debug hook.
23672 * run-rtl-passes.c (run_rtl_passes): Likewise.
23675 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23677 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23678 range_int_cst_p rather than !symbolic_range_p before calling
23679 extract_range_from_multiplicative_op_1.
23681 2018-01-04 Jeff Law <law@redhat.com>
23683 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23684 redundant test in assertion.
23686 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23688 * doc/rtl.texi: Document machine_mode wrapper classes.
23690 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23692 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23693 using tree_to_uhwi.
23695 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23697 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23698 the VEC_PERM_EXPR fold to fail.
23700 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23703 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23704 to switched_sections.
23706 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23709 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23710 test for d.testing.
23712 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23715 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23716 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23718 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23721 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23722 is BLKmode and bitpos not zero or mode change is needed.
23724 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23727 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23730 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23733 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23734 instead of MULT rtx. Update all corresponding splitters.
23735 (*saddl_se): Ditto.
23736 (*ssub<modesuffix>): Ditto.
23737 (*ssubl_se): Ditto.
23738 (*cmp_sadd_di): Update split patterns.
23739 (*cmp_sadd_si): Ditto.
23740 (*cmp_sadd_sidi): Ditto.
23741 (*cmp_ssub_di): Ditto.
23742 (*cmp_ssub_si): Ditto.
23743 (*cmp_ssub_sidi): Ditto.
23744 * config/alpha/predicates.md (const23_operand): New predicate.
23745 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23746 Look for ASHIFT, not MULT inner operand.
23747 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23749 2018-01-04 Martin Liska <mliska@suse.cz>
23751 PR gcov-profile/83669
23752 * gcov.c (output_intermediate_file): Add version to intermediate
23754 * doc/gcov.texi: Document new field 'version' in intermediate
23755 file format. Fix location of '-k' option of gcov command.
23757 2018-01-04 Martin Liska <mliska@suse.cz>
23760 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23762 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23764 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23766 2018-01-03 Martin Sebor <msebor@redhat.com>
23768 PR tree-optimization/83655
23769 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23770 checking calls with invalid arguments.
23772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23774 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23775 (vectorizable_mask_load_store): Delete.
23776 (vectorizable_call): Return false for masked loads and stores.
23777 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23778 instead of gimple_assign_rhs1.
23779 (vectorizable_load): Handle IFN_MASK_LOAD.
23780 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23784 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23786 (vectorizable_mask_load_store): ...here.
23787 (vectorizable_load): ...and here.
23789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23791 * tree-vect-stmts.c (vect_build_all_ones_mask)
23792 (vect_build_zero_merge_argument): New functions, split out from...
23793 (vectorizable_load): ...here.
23795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23797 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23799 (vectorizable_mask_load_store): ...here.
23800 (vectorizable_store): ...and here.
23802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23804 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23806 (vectorizable_mask_load_store): ...here.
23808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23810 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23811 (vect_model_store_cost): Take a vec_load_store_type instead of a
23813 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23814 (vect_model_store_cost): Take a vec_load_store_type instead of a
23816 (vectorizable_mask_load_store): Update accordingly.
23817 (vectorizable_store): Likewise.
23818 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23822 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23823 IFN_MASK_LOAD calls here rather than...
23824 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23827 Alan Hayward <alan.hayward@arm.com>
23828 David Sherwood <david.sherwood@arm.com>
23830 * expmed.c (extract_bit_field_1): For vector extracts,
23831 fall back to extract_bit_field_as_subreg if vec_extract
23834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23835 Alan Hayward <alan.hayward@arm.com>
23836 David Sherwood <david.sherwood@arm.com>
23838 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23839 they are variable or constant sized.
23840 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23841 slots for constant-sized data.
23843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23844 Alan Hayward <alan.hayward@arm.com>
23845 David Sherwood <david.sherwood@arm.com>
23847 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23848 handling COND_EXPRs with boolean comparisons, try to find a better
23849 basis for the mask type than the boolean itself.
23851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23853 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23854 is calculated and how it can be overridden.
23855 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23856 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23858 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23862 Alan Hayward <alan.hayward@arm.com>
23863 David Sherwood <david.sherwood@arm.com>
23865 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23866 Remove the mode argument.
23867 (aarch64_simd_valid_immediate): Remove the mode and inverse
23869 * config/aarch64/iterators.md (bitsize): New iterator.
23870 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23871 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23872 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23873 aarch64_simd_valid_immediate.
23874 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23875 (aarch64_reg_or_bic_imm): Likewise.
23876 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23877 with an insn_type enum and msl with a modifier_type enum.
23878 Replace element_width with a scalar_mode. Change the shift
23879 to unsigned int. Add constructors for scalar_float_mode and
23880 scalar_int_mode elements.
23881 (aarch64_vect_float_const_representable_p): Delete.
23882 (aarch64_can_const_movi_rtx_p)
23883 (aarch64_simd_scalar_immediate_valid_for_move)
23884 (aarch64_simd_make_constant): Update call to
23885 aarch64_simd_valid_immediate.
23886 (aarch64_advsimd_valid_immediate_hs): New function.
23887 (aarch64_advsimd_valid_immediate): Likewise.
23888 (aarch64_simd_valid_immediate): Remove mode and inverse
23889 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23890 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23891 and aarch64_float_const_representable_p on the result.
23892 (aarch64_output_simd_mov_immediate): Remove mode argument.
23893 Update call to aarch64_simd_valid_immediate and use of
23894 simd_immediate_info.
23895 (aarch64_output_scalar_simd_mov_immediate): Update call
23898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23899 Alan Hayward <alan.hayward@arm.com>
23900 David Sherwood <david.sherwood@arm.com>
23902 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23903 (mode_nunits): Likewise CONST_MODE_NUNITS.
23904 * machmode.def (ADJUST_NUNITS): Document.
23905 * genmodes.c (mode_data::need_nunits_adj): New field.
23906 (blank_mode): Update accordingly.
23907 (adj_nunits): New variable.
23908 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23910 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23911 listed in adj_nunits.
23912 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23913 listed in adj_nunits. Don't emit case statements for such modes.
23914 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23915 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23916 nothing if adj_nunits is nonnull.
23917 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23918 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23919 (emit_mode_fbit): Update use of print_maybe_const_decl.
23920 (emit_move_size): Likewise. Treat the array as non-const
23922 (emit_mode_adjustments): Handle adj_nunits.
23924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23926 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23927 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23928 (VECTOR_MODES): Use it.
23929 (make_vector_modes): Take the prefix as an argument.
23931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23932 Alan Hayward <alan.hayward@arm.com>
23933 David Sherwood <david.sherwood@arm.com>
23935 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23936 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23937 for MODE_VECTOR_BOOL.
23938 * machmode.def (VECTOR_BOOL_MODE): Document.
23939 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23940 (make_vector_bool_mode): New function.
23941 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23943 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23944 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23946 * stor-layout.c (int_mode_for_mode): Likewise.
23947 * tree.c (build_vector_type_for_mode): Likewise.
23948 * varasm.c (output_constant_pool_2): Likewise.
23949 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23950 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23951 for MODE_VECTOR_BOOL.
23952 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23953 of mode class checks.
23954 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23955 instead of a list of mode class checks.
23956 (expand_vector_scalar_condition): Likewise.
23957 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23960 Alan Hayward <alan.hayward@arm.com>
23961 David Sherwood <david.sherwood@arm.com>
23963 * machmode.h (mode_size): Change from unsigned short to
23965 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23966 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23967 or if measurement_type is not polynomial.
23968 (fixed_size_mode::includes_p): Check for constant-sized modes.
23969 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23970 return a poly_uint16 rather than an unsigned short.
23971 (emit_mode_size): Change the type of mode_size from unsigned short
23972 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23973 (emit_mode_adjustments): Cope with polynomial vector sizes.
23974 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23976 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23978 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23979 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23980 * caller-save.c (setup_save_areas): Likewise.
23981 (replace_reg_with_saved_mem): Likewise.
23982 * calls.c (emit_library_call_value_1): Likewise.
23983 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23984 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23985 (gen_lowpart_for_combine): Likewise.
23986 * convert.c (convert_to_integer_1): Likewise.
23987 * cse.c (equiv_constant, cse_insn): Likewise.
23988 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23989 (cselib_subst_to_values): Likewise.
23990 * dce.c (word_dce_process_block): Likewise.
23991 * df-problems.c (df_word_lr_mark_ref): Likewise.
23992 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23993 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23994 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23995 (rtl_for_decl_location): Likewise.
23996 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23997 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23998 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23999 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24000 (expand_expr_real_1): Likewise.
24001 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24002 (pad_below): Likewise.
24003 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24004 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24005 * ira.c (get_subreg_tracking_sizes): Likewise.
24006 * ira-build.c (ira_create_allocno_objects): Likewise.
24007 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24008 (ira_sort_regnos_for_alter_reg): Likewise.
24009 * ira-costs.c (record_operand_costs): Likewise.
24010 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24011 (resolve_simple_move): Likewise.
24012 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24013 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24014 (lra_constraints): Likewise.
24015 (CONST_POOL_OK_P): Reject variable-sized modes.
24016 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24017 (add_pseudo_to_slot, lra_spill): Likewise.
24018 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24019 * optabs-query.c (get_best_extraction_insn): Likewise.
24020 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24021 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24022 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24023 * recog.c (offsettable_address_addr_space_p): Likewise.
24024 * regcprop.c (maybe_mode_change): Likewise.
24025 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24026 * regrename.c (build_def_use): Likewise.
24027 * regstat.c (dump_reg_info): Likewise.
24028 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24029 (find_reloads, find_reloads_subreg_address): Likewise.
24030 * reload1.c (eliminate_regs_1): Likewise.
24031 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24032 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24033 (simplify_binary_operation_1, simplify_subreg): Likewise.
24034 * targhooks.c (default_function_arg_padding): Likewise.
24035 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24036 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24037 (verify_gimple_assign_ternary): Likewise.
24038 * tree-inline.c (estimate_move_cost): Likewise.
24039 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24040 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24041 (get_address_cost_ainc): Likewise.
24042 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24043 (vect_supportable_dr_alignment): Likewise.
24044 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24045 (vectorizable_reduction): Likewise.
24046 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24047 (vectorizable_operation, vectorizable_load): Likewise.
24048 * tree.c (build_same_sized_truth_vector_type): Likewise.
24049 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24050 * var-tracking.c (emit_note_insn_var_location): Likewise.
24051 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24052 (ADDR_VEC_ALIGN): Likewise.
24054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24055 Alan Hayward <alan.hayward@arm.com>
24056 David Sherwood <david.sherwood@arm.com>
24058 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24060 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24061 or if measurement_type is polynomial.
24062 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24063 * combine.c (make_extraction): Likewise.
24064 * dse.c (find_shift_sequence): Likewise.
24065 * dwarf2out.c (mem_loc_descriptor): Likewise.
24066 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24067 (extract_bit_field, extract_low_bits): Likewise.
24068 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24069 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24070 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24071 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24072 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24073 * reload.c (find_reloads): Likewise.
24074 * reload1.c (alter_reg): Likewise.
24075 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24076 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24077 * tree-if-conv.c (predicate_mem_writes): Likewise.
24078 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24079 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24080 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24081 * valtrack.c (dead_debug_insert_temp): Likewise.
24082 * varasm.c (mergeable_constant_section): Likewise.
24083 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24086 Alan Hayward <alan.hayward@arm.com>
24087 David Sherwood <david.sherwood@arm.com>
24089 * expr.c (expand_assignment): Cope with polynomial mode sizes
24090 when assigning to a CONCAT.
24092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24093 Alan Hayward <alan.hayward@arm.com>
24094 David Sherwood <david.sherwood@arm.com>
24096 * machmode.h (mode_precision): Change from unsigned short to
24098 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24100 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24101 or if measurement_type is not polynomial.
24102 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24103 in which the mode is already known to be a scalar_int_mode.
24104 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24105 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24107 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24108 for GET_MODE_PRECISION.
24109 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24110 for GET_MODE_PRECISION.
24111 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24113 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24114 (expand_field_assignment, make_extraction): Likewise.
24115 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24116 (get_last_value): Likewise.
24117 * convert.c (convert_to_integer_1): Likewise.
24118 * cse.c (cse_insn): Likewise.
24119 * expr.c (expand_expr_real_1): Likewise.
24120 * lra-constraints.c (simplify_operand_subreg): Likewise.
24121 * optabs-query.c (can_atomic_load_p): Likewise.
24122 * optabs.c (expand_atomic_load): Likewise.
24123 (expand_atomic_store): Likewise.
24124 * ree.c (combine_reaching_defs): Likewise.
24125 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24126 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24127 * tree.h (type_has_mode_precision_p): Likewise.
24128 * ubsan.c (instrument_si_overflow): Likewise.
24130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24131 Alan Hayward <alan.hayward@arm.com>
24132 David Sherwood <david.sherwood@arm.com>
24134 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24135 polynomial numbers of units.
24136 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24137 (valid_vector_subparts_p): New function.
24138 (build_vector_type): Remove temporary shim and take the number
24139 of units as a poly_uint64 rather than an int.
24140 (build_opaque_vector_type): Take the number of units as a
24141 poly_uint64 rather than an int.
24142 * tree.c (build_vector_from_ctor): Handle polynomial
24143 TYPE_VECTOR_SUBPARTS.
24144 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24145 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24146 (build_vector_from_val): If the number of units is variable,
24147 use build_vec_duplicate_cst for constant operands and
24148 VEC_DUPLICATE_EXPR otherwise.
24149 (make_vector_type): Remove temporary is_constant ().
24150 (build_vector_type, build_opaque_vector_type): Take the number of
24151 units as a poly_uint64 rather than an int.
24152 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24154 * cfgexpand.c (expand_debug_expr): Likewise.
24155 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24156 (store_constructor, expand_expr_real_1): Likewise.
24157 (const_scalar_mask_from_tree): Likewise.
24158 * fold-const-call.c (fold_const_reduction): Likewise.
24159 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24160 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24161 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24162 (fold_relational_const): Likewise.
24163 (native_interpret_vector): Likewise. Change the size from an
24164 int to an unsigned int.
24165 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24166 TYPE_VECTOR_SUBPARTS.
24167 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24168 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24169 duplicating a non-constant operand into a variable-length vector.
24170 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24171 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24172 * ipa-icf.c (sem_variable::equals): Likewise.
24173 * match.pd: Likewise.
24174 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24175 * print-tree.c (print_node): Likewise.
24176 * stor-layout.c (layout_type): Likewise.
24177 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24178 * tree-cfg.c (verify_gimple_comparison): Likewise.
24179 (verify_gimple_assign_binary): Likewise.
24180 (verify_gimple_assign_ternary): Likewise.
24181 (verify_gimple_assign_single): Likewise.
24182 * tree-pretty-print.c (dump_generic_node): Likewise.
24183 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24184 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24185 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24186 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24187 (vect_shift_permute_load_chain): Likewise.
24188 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24189 (expand_vector_condition, optimize_vector_constructor): Likewise.
24190 (lower_vec_perm, get_compute_type): Likewise.
24191 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24192 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24193 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24194 (vect_recog_mask_conversion_pattern): Likewise.
24195 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24196 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24197 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24198 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24199 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24200 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24201 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24202 (supportable_widening_operation): Likewise.
24203 (supportable_narrowing_operation): Likewise.
24204 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24206 * varasm.c (output_constant): Likewise.
24208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24209 Alan Hayward <alan.hayward@arm.com>
24210 David Sherwood <david.sherwood@arm.com>
24212 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24213 so that both the length == 3 and length != 3 cases set up their
24214 own permute vectors. Add comments explaining why we know the
24215 number of elements is constant.
24216 (vect_permute_load_chain): Likewise.
24218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24219 Alan Hayward <alan.hayward@arm.com>
24220 David Sherwood <david.sherwood@arm.com>
24222 * machmode.h (mode_nunits): Change from unsigned char to
24224 (ONLY_FIXED_SIZE_MODES): New macro.
24225 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24226 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24227 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24229 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24230 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24231 or if measurement_type is not polynomial.
24232 * genmodes.c (ZERO_COEFFS): New macro.
24233 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24235 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24236 Use ZERO_COEFFS when emitting initializers.
24237 * data-streamer.h (bp_pack_poly_value): New function.
24238 (bp_unpack_poly_value): Likewise.
24239 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24240 for GET_MODE_NUNITS.
24241 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24242 for GET_MODE_NUNITS.
24243 * tree.c (make_vector_type): Remove temporary shim and make
24244 the real function take the number of units as a poly_uint64
24245 rather than an int.
24246 (build_vector_type_for_mode): Handle polynomial nunits.
24247 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24248 * emit-rtl.c (const_vec_series_p_1): Likewise.
24249 (gen_rtx_CONST_VECTOR): Likewise.
24250 * fold-const.c (test_vec_duplicate_folding): Likewise.
24251 * genrecog.c (validate_pattern): Likewise.
24252 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24253 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24254 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24255 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24256 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24257 * rtlanal.c (subreg_get_info): Likewise.
24258 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24259 (vect_grouped_load_supported): Likewise.
24260 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24261 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24262 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24263 (simplify_const_unary_operation, simplify_binary_operation_1)
24264 (simplify_const_binary_operation, simplify_ternary_operation)
24265 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24266 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24267 instead of CONST_VECTOR_NUNITS.
24268 * varasm.c (output_constant_pool_2): Likewise.
24269 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24270 explicit-encoded elements in the XVEC for variable-length vectors.
24272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24274 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24277 Alan Hayward <alan.hayward@arm.com>
24278 David Sherwood <david.sherwood@arm.com>
24280 * coretypes.h (fixed_size_mode): Declare.
24281 (fixed_size_mode_pod): New typedef.
24282 * builtins.h (target_builtins::x_apply_args_mode)
24283 (target_builtins::x_apply_result_mode): Change type to
24284 fixed_size_mode_pod.
24285 * builtins.c (apply_args_size, apply_result_size, result_vector)
24286 (expand_builtin_apply_args_1, expand_builtin_apply)
24287 (expand_builtin_return): Update accordingly.
24289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24291 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24292 * cselib.c (cselib_hash_rtx): Likewise.
24293 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24294 CONST_VECTOR encoding.
24296 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24297 Jeff Law <law@redhat.com>
24300 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24301 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24302 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24303 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24306 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24307 explicitly probe *sp in a noreturn function if there were any callee
24308 register saves or frame pointer is needed.
24310 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24313 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24314 BLKmode for ternary, binary or unary expressions.
24317 * var-tracking.c (delete_vta_debug_insn): New inline function.
24318 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24319 insns from get_insns () to NULL instead of each bb separately.
24320 Use delete_vta_debug_insn. No longer static.
24321 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24322 delete_vta_debug_insns callers.
24323 * rtl.h (delete_vta_debug_insns): Declare.
24324 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24325 instead of variable_tracking_main.
24327 2018-01-03 Martin Sebor <msebor@redhat.com>
24329 PR tree-optimization/83603
24330 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24331 arguments past the endof the argument list in functions declared
24332 without a prototype.
24333 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24334 Avoid checking when arguments are null.
24336 2018-01-03 Martin Sebor <msebor@redhat.com>
24339 * doc/extend.texi (attribute const): Fix a typo.
24340 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24341 issuing -Wsuggest-attribute for void functions.
24343 2018-01-03 Martin Sebor <msebor@redhat.com>
24345 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24346 offset_int::from instead of wide_int::to_shwi.
24347 (maybe_diag_overlap): Remove assertion.
24348 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24349 * gimple-ssa-sprintf.c (format_directive): Same.
24350 (parse_directive): Same.
24351 (sprintf_dom_walker::compute_format_length): Same.
24352 (try_substitute_return_value): Same.
24354 2018-01-03 Jeff Law <law@redhat.com>
24356 PR middle-end/83654
24357 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24358 non-constant residual for zero at runtime and avoid probing in
24359 that case. Reorganize code for trailing problem to mirror handling
24362 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24364 PR tree-optimization/83501
24365 * tree-ssa-strlen.c (get_string_cst): New.
24366 (handle_char_store): Call get_string_cst.
24368 2018-01-03 Martin Liska <mliska@suse.cz>
24370 PR tree-optimization/83593
24371 * tree-ssa-strlen.c: Include tree-cfg.h.
24372 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24373 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24374 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24376 (strlen_dom_walker::before_dom_children): Call
24377 gimple_purge_dead_eh_edges. Dump tranformation with details
24379 (strlen_dom_walker::before_dom_children): Update call by adding
24380 new argument cleanup_eh.
24381 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24383 2018-01-03 Martin Liska <mliska@suse.cz>
24386 * cif-code.def (VARIADIC_THUNK): New enum value.
24387 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24390 2018-01-03 Jan Beulich <jbeulich@suse.com>
24392 * sse.md (mov<mode>_internal): Tighten condition for when to use
24393 vmovdqu<ssescalarsize> for TI and OI modes.
24395 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24397 Update copyright years.
24399 2018-01-03 Martin Liska <mliska@suse.cz>
24402 * ipa-visibility.c (function_and_variable_visibility): Skip
24403 functions with noipa attribure.
24405 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24407 * gcc.c (process_command): Update copyright notice dates.
24408 * gcov-dump.c (print_version): Ditto.
24409 * gcov.c (print_version): Ditto.
24410 * gcov-tool.c (print_version): Ditto.
24411 * gengtype.c (create_file): Ditto.
24412 * doc/cpp.texi: Bump @copying's copyright year.
24413 * doc/cppinternals.texi: Ditto.
24414 * doc/gcc.texi: Ditto.
24415 * doc/gccint.texi: Ditto.
24416 * doc/gcov.texi: Ditto.
24417 * doc/install.texi: Ditto.
24418 * doc/invoke.texi: Ditto.
24420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24422 * vector-builder.h (vector_builder::m_full_nelts): Change from
24423 unsigned int to poly_uint64.
24424 (vector_builder::full_nelts): Update prototype accordingly.
24425 (vector_builder::new_vector): Likewise.
24426 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24427 (vector_builder::operator ==): Likewise.
24428 (vector_builder::finalize): Likewise.
24429 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24430 Take the number of elements as a poly_uint64 rather than an
24432 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24433 from unsigned int to poly_uint64.
24434 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24435 (vec_perm_indices::new_vector): Likewise.
24436 (vec_perm_indices::length): Likewise.
24437 (vec_perm_indices::nelts_per_input): Likewise.
24438 (vec_perm_indices::input_nelts): Likewise.
24439 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24440 number of elements per input as a poly_uint64 rather than an
24441 unsigned int. Use the original encoding for variable-length
24442 vectors, rather than clamping each individual element.
24443 For the second and subsequent elements in each pattern,
24444 clamp the step and base before clamping their sum.
24445 (vec_perm_indices::series_p): Handle polynomial element counts.
24446 (vec_perm_indices::all_in_range_p): Likewise.
24447 (vec_perm_indices_to_tree): Likewise.
24448 (vec_perm_indices_to_rtx): Likewise.
24449 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24450 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24451 (tree_vector_builder::new_binary_operation): Handle polynomial
24452 element counts. Return false if we need to know the number
24453 of elements at compile time.
24454 * fold-const.c (fold_vec_perm): Punt if the number of elements
24455 isn't known at compile time.
24457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24459 * vec-perm-indices.h (vec_perm_builder): Change element type
24460 from HOST_WIDE_INT to poly_int64.
24461 (vec_perm_indices::element_type): Update accordingly.
24462 (vec_perm_indices::clamp): Handle polynomial element_types.
24463 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24464 (vec_perm_indices::all_in_range_p): Likewise.
24465 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24467 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24468 polynomial vec_perm_indices element types.
24469 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24470 * fold-const.c (fold_vec_perm): Likewise.
24471 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24472 * tree-vect-generic.c (lower_vec_perm): Likewise.
24473 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24474 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24475 element type to HOST_WIDE_INT.
24477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24478 Alan Hayward <alan.hayward@arm.com>
24479 David Sherwood <david.sherwood@arm.com>
24481 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24482 rather than an int. Use plus_constant.
24483 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24484 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24487 Alan Hayward <alan.hayward@arm.com>
24488 David Sherwood <david.sherwood@arm.com>
24490 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24491 a HOST_WIDE_INT to a poly_int64.
24493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24494 Alan Hayward <alan.hayward@arm.com>
24495 David Sherwood <david.sherwood@arm.com>
24497 * calls.c (load_register_parameters): Cope with polynomial
24498 mode sizes. Require a constant size for BLKmode parameters
24499 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24500 forces a parameter to be padded at the lsb end in order to
24501 fill a complete number of words, require the parameter size
24502 to be ordered wrt UNITS_PER_WORD.
24504 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24505 Alan Hayward <alan.hayward@arm.com>
24506 David Sherwood <david.sherwood@arm.com>
24508 * reload1.c (spill_stack_slot_width): Change element type
24509 from unsigned int to poly_uint64_pod.
24510 (alter_reg): Treat mode sizes as polynomial.
24512 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24513 Alan Hayward <alan.hayward@arm.com>
24514 David Sherwood <david.sherwood@arm.com>
24516 * reload.c (complex_word_subreg_p): New function.
24517 (reload_inner_reg_of_subreg, push_reload): Use it.
24519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24520 Alan Hayward <alan.hayward@arm.com>
24521 David Sherwood <david.sherwood@arm.com>
24523 * lra-constraints.c (process_alt_operands): Reject matched
24524 operands whose sizes aren't ordered.
24525 (match_reload): Refer to this check here.
24527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24528 Alan Hayward <alan.hayward@arm.com>
24529 David Sherwood <david.sherwood@arm.com>
24531 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24532 that the mode size is in the set {1, 2, 4, 8, 16}.
24534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24535 Alan Hayward <alan.hayward@arm.com>
24536 David Sherwood <david.sherwood@arm.com>
24538 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24539 Use plus_constant instead of gen_rtx_PLUS.
24541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24542 Alan Hayward <alan.hayward@arm.com>
24543 David Sherwood <david.sherwood@arm.com>
24545 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24546 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24547 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24548 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24549 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24550 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24551 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24552 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24553 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24554 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24556 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24557 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24558 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24559 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24560 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24561 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24562 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24563 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24564 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24565 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24567 * expr.c (emit_move_resolve_push): Treat the input and result
24568 of PUSH_ROUNDING as a poly_int64.
24569 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24570 (emit_push_insn): Likewise.
24571 * lra-eliminations.c (mark_not_eliminable): Likewise.
24572 * recog.c (push_operand): Likewise.
24573 * reload1.c (elimination_effects): Likewise.
24574 * rtlanal.c (nonzero_bits1): Likewise.
24575 * calls.c (store_one_arg): Likewise. Require the padding to be
24576 known at compile time.
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 * expr.c (emit_single_push_insn_1): 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 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24590 rather than an int.
24592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24593 Alan Hayward <alan.hayward@arm.com>
24594 David Sherwood <david.sherwood@arm.com>
24596 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24597 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24598 via stack temporaries. Treat the mode size as polynomial too.
24600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24601 Alan Hayward <alan.hayward@arm.com>
24602 David Sherwood <david.sherwood@arm.com>
24604 * expr.c (expand_expr_real_2): When handling conversions involving
24605 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24606 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24607 as a poly_uint64 too.
24609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24610 Alan Hayward <alan.hayward@arm.com>
24611 David Sherwood <david.sherwood@arm.com>
24613 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24615 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24616 Alan Hayward <alan.hayward@arm.com>
24617 David Sherwood <david.sherwood@arm.com>
24619 * combine.c (can_change_dest_mode): Handle polynomial
24620 REGMODE_NATURAL_SIZE.
24621 * expmed.c (store_bit_field_1): Likewise.
24622 * expr.c (store_constructor): Likewise.
24623 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24624 and polynomial REGMODE_NATURAL_SIZE.
24625 (gen_lowpart_common): Likewise.
24626 * reginfo.c (record_subregs_of_mode): Likewise.
24627 * rtlanal.c (read_modify_subreg_p): Likewise.
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 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24634 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
24642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24643 Alan Hayward <alan.hayward@arm.com>
24644 David Sherwood <david.sherwood@arm.com>
24646 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24647 in a POINTER_PLUS_EXPR.
24649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24650 Alan Hayward <alan.hayward@arm.com>
24651 David Sherwood <david.sherwood@arm.com>
24653 * omp-simd-clone.c (simd_clone_subparts): New function.
24654 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24655 (ipa_simd_modify_function_body): Likewise.
24657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24658 Alan Hayward <alan.hayward@arm.com>
24659 David Sherwood <david.sherwood@arm.com>
24661 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24662 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24663 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24664 (expand_vector_condition, vector_element): Likewise.
24665 (subparts_gt): New function.
24666 (get_compute_type): Use subparts_gt.
24667 (count_type_subparts): Delete.
24668 (expand_vector_operations_1): Use subparts_gt instead of
24669 count_type_subparts.
24671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24672 Alan Hayward <alan.hayward@arm.com>
24673 David Sherwood <david.sherwood@arm.com>
24675 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24676 (vect_compile_time_alias): ...this new function. Do the calculation
24677 on poly_ints rather than trees.
24678 (vect_prune_runtime_alias_test_list): Update call accordingly.
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 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24686 (vect_schedule_slp_instance): Likewise.
24688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24689 Alan Hayward <alan.hayward@arm.com>
24690 David Sherwood <david.sherwood@arm.com>
24692 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24693 constant and extern definitions for variable-length vectors.
24694 (vect_get_constant_vectors): Note that the number of units
24695 is known to be constant.
24697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24698 Alan Hayward <alan.hayward@arm.com>
24699 David Sherwood <david.sherwood@arm.com>
24701 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24702 of units as polynomial. Choose between WIDE and NARROW based
24705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24706 Alan Hayward <alan.hayward@arm.com>
24707 David Sherwood <david.sherwood@arm.com>
24709 * tree-vect-stmts.c (simd_clone_subparts): New function.
24710 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24713 Alan Hayward <alan.hayward@arm.com>
24714 David Sherwood <david.sherwood@arm.com>
24716 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24717 vectors as polynomial. Use build_index_vector for
24718 IFN_GOMP_SIMD_LANE.
24720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24721 Alan Hayward <alan.hayward@arm.com>
24722 David Sherwood <david.sherwood@arm.com>
24724 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24725 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24726 for variable-length vectors.
24727 (vectorizable_mask_load_store): Treat the number of units as
24728 polynomial, asserting that it is constant if the condition has
24729 already been enforced.
24730 (vectorizable_store, vectorizable_load): 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-loop.c (vectorizable_live_operation): Treat the number
24737 of units as polynomial. Punt if we can't tell at compile time
24738 which vector contains the final result.
24740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24741 Alan Hayward <alan.hayward@arm.com>
24742 David Sherwood <david.sherwood@arm.com>
24744 * tree-vect-loop.c (vectorizable_induction): Treat the number
24745 of units as polynomial. Punt on SLP inductions. Use an integer
24746 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24747 cast of such a series for variable-length floating-point
24750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24751 Alan Hayward <alan.hayward@arm.com>
24752 David Sherwood <david.sherwood@arm.com>
24754 * tree.h (build_index_vector): Declare.
24755 * tree.c (build_index_vector): New function.
24756 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24757 of units as polynomial, forcibly converting it to a constant if
24758 vectorizable_reduction has already enforced the condition.
24759 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24760 to create a {1,2,3,...} vector.
24761 (vectorizable_reduction): Treat the number of units as polynomial.
24762 Choose vectype_in based on the largest scalar element size rather
24763 than the smallest number of units. Enforce the restrictions
24766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24767 Alan Hayward <alan.hayward@arm.com>
24768 David Sherwood <david.sherwood@arm.com>
24770 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24771 number of units as polynomial.
24773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24774 Alan Hayward <alan.hayward@arm.com>
24775 David Sherwood <david.sherwood@arm.com>
24777 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24778 * target.def (autovectorize_vector_sizes): Return the vector sizes
24779 by pointer, using vector_sizes rather than a bitmask.
24780 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24781 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24782 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24784 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24785 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24786 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24787 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24788 * omp-general.c (omp_max_vf): Likewise.
24789 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24790 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24791 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24792 * tree-vect-slp.c (vect_slp_bb): Likewise.
24793 * doc/tm.texi: Regenerate.
24794 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24796 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24797 the vector size as a poly_uint64 rather than an unsigned int.
24798 (current_vector_size): Change from an unsigned int to a poly_uint64.
24799 (get_vectype_for_scalar_type): Update accordingly.
24800 * tree.h (build_truth_vector_type): Take the size and number of
24801 units as a poly_uint64 rather than an unsigned int.
24802 (build_vector_type): Add a temporary overload that takes
24803 the number of units as a poly_uint64 rather than an unsigned int.
24804 * tree.c (make_vector_type): Likewise.
24805 (build_truth_vector_type): Take the number of units as a poly_uint64
24806 rather than an unsigned int.
24808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24809 Alan Hayward <alan.hayward@arm.com>
24810 David Sherwood <david.sherwood@arm.com>
24812 * target.def (get_mask_mode): Take the number of units and length
24813 as poly_uint64s rather than unsigned ints.
24814 * targhooks.h (default_get_mask_mode): Update accordingly.
24815 * targhooks.c (default_get_mask_mode): Likewise.
24816 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24817 * doc/tm.texi: Regenerate.
24819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24820 Alan Hayward <alan.hayward@arm.com>
24821 David Sherwood <david.sherwood@arm.com>
24823 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24824 * omp-general.c (omp_max_vf): Likewise.
24825 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24826 (expand_omp_simd): Handle polynomial safelen.
24827 * omp-low.c (omplow_simd_context): Add a default constructor.
24828 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24829 (lower_rec_simd_input_clauses): Update accordingly.
24830 (lower_rec_input_clauses): Likewise.
24832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24833 Alan Hayward <alan.hayward@arm.com>
24834 David Sherwood <david.sherwood@arm.com>
24836 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24837 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24838 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24839 (vect_analyze_slp_cost): Likewise.
24840 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24841 (vect_model_load_cost): Likewise.
24843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24844 Alan Hayward <alan.hayward@arm.com>
24845 David Sherwood <david.sherwood@arm.com>
24847 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24848 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24849 from an unsigned int * to a poly_uint64_pod *.
24850 (calculate_unrolling_factor): New function.
24851 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24854 Alan Hayward <alan.hayward@arm.com>
24855 David Sherwood <david.sherwood@arm.com>
24857 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24858 from an unsigned int to a poly_uint64.
24859 (_loop_vec_info::slp_unrolling_factor): Likewise.
24860 (_loop_vec_info::vectorization_factor): Change from an int
24862 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24863 (vect_get_num_vectors): New function.
24864 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24865 (vect_get_num_copies): Use vect_get_num_vectors.
24866 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24867 to an unsigned int *.
24868 (vect_analyze_data_refs): Change min_vf from an int * to a
24870 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24871 than an unsigned HOST_WIDE_INT.
24872 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24873 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24874 to an unsigned int *.
24875 (vect_analyze_data_ref_dependences): Likewise.
24876 (vect_compute_data_ref_alignment): Handle polynomial vf.
24877 (vect_enhance_data_refs_alignment): Likewise.
24878 (vect_prune_runtime_alias_test_list): Likewise.
24879 (vect_shift_permute_load_chain): Likewise.
24880 (vect_supportable_dr_alignment): Likewise.
24881 (dependence_distance_ge_vf): Take the vectorization factor as a
24882 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24883 (vect_analyze_data_refs): Change min_vf from an int * to a
24885 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24886 vfm1 as a poly_uint64 rather than an int. Make the same change
24887 for the returned bound_scalar.
24888 (vect_gen_vector_loop_niters): Handle polynomial vf.
24889 (vect_do_peeling): Likewise. Update call to
24890 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24891 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24893 * tree-vect-loop.c (vect_determine_vectorization_factor)
24894 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24895 (vect_get_known_peeling_cost): Likewise.
24896 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24897 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24898 (vect_transform_loop): Likewise. Use the lowest possible VF when
24899 updating the upper bounds of the loop.
24900 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24901 rather than an int.
24902 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24903 polynomial unroll factors.
24904 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24905 (vect_make_slp_decision): Likewise.
24906 (vect_supported_load_permutation_p): Likewise, and polynomial
24908 (vect_analyze_slp_cost): Handle polynomial vf.
24909 (vect_slp_analyze_node_operations): Likewise.
24910 (vect_slp_analyze_bb_1): Likewise.
24911 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24912 than an unsigned HOST_WIDE_INT.
24913 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24914 (vectorizable_load): Handle polynomial vf.
24915 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24917 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24920 Alan Hayward <alan.hayward@arm.com>
24921 David Sherwood <david.sherwood@arm.com>
24923 * match.pd: Handle bit operations involving three constants
24924 and try to fold one pair.
24926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24928 * tree-vect-loop-manip.c: Include gimple-fold.h.
24929 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24930 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24931 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24932 Add a path that uses a step of VF instead of 1, but disable it
24934 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24935 and niters_no_overflow parameters. Update calls to
24936 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24937 Create a new SSA name if the latter choses to use a ste other
24938 than zero, and return it via niters_vector_mult_vf_var.
24939 * tree-vect-loop.c (vect_transform_loop): Update calls to
24940 vect_do_peeling, vect_gen_vector_loop_niters and
24941 slpeel_make_loop_iterate_ntimes.
24942 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24943 (vect_gen_vector_loop_niters): Update declarations after above changes.
24945 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24947 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24948 128-bit round to integer instructions.
24949 (ceil<mode>2): Likewise.
24950 (btrunc<mode>2): Likewise.
24951 (round<mode>2): Likewise.
24953 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24955 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24956 unaligned VSX load/store on P8/P9.
24957 (expand_block_clear): Allow the use of unaligned VSX
24958 load/store on P8/P9.
24960 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24962 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24964 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24965 swap associated with both a load and a store.
24967 2018-01-02 Andrew Waterman <andrew@sifive.com>
24969 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24970 * config/riscv/riscv.md (clear_cache): Use it.
24972 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24974 * web.c: Remove out-of-date comment.
24976 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24978 * expr.c (fixup_args_size_notes): Check that any existing
24979 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24980 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24981 (emit_single_push_insn): ...here.
24983 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24985 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24986 (const_vector_encoded_nelts): New function.
24987 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24988 (const_vector_int_elt, const_vector_elt): Declare.
24989 * emit-rtl.c (const_vector_int_elt_1): New function.
24990 (const_vector_elt): Likewise.
24991 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24992 of CONST_VECTOR_ELT.
24994 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24996 * expr.c: Include rtx-vector-builder.h.
24997 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24998 directly on the tree encoding.
24999 (const_vector_from_tree): Likewise.
25000 * optabs.c: Include rtx-vector-builder.h.
25001 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25002 sequence of "u" values.
25003 * vec-perm-indices.c: Include rtx-vector-builder.h.
25004 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25005 directly on the vec_perm_indices encoding.
25007 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25009 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25010 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25011 * rtx-vector-builder.h: New file.
25012 * rtx-vector-builder.c: Likewise.
25013 * rtl.h (rtx_def::u2): Add a const_vector field.
25014 (CONST_VECTOR_NPATTERNS): New macro.
25015 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25016 (CONST_VECTOR_DUPLICATE_P): Likewise.
25017 (CONST_VECTOR_STEPPED_P): Likewise.
25018 (CONST_VECTOR_ENCODED_ELT): Likewise.
25019 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25020 (unwrap_const_vec_duplicate): Likewise.
25021 (const_vec_series_p): Check for a non-duplicated vector encoding.
25022 Say that the function only returns true for integer vectors.
25023 * emit-rtl.c: Include rtx-vector-builder.h.
25024 (gen_const_vec_duplicate_1): Delete.
25025 (gen_const_vector): Call gen_const_vec_duplicate instead of
25026 gen_const_vec_duplicate_1.
25027 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25028 (gen_const_vec_duplicate): Use rtx_vector_builder.
25029 (gen_const_vec_series): Likewise.
25030 (gen_rtx_CONST_VECTOR): Likewise.
25031 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25032 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25033 Build a new vector rather than modifying a CONST_VECTOR in-place.
25034 (handle_special_swappables): Update call accordingly.
25035 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25036 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25037 Build a new vector rather than modifying a CONST_VECTOR in-place.
25038 (handle_special_swappables): Update call accordingly.
25040 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25042 * simplify-rtx.c (simplify_const_binary_operation): Use
25043 CONST_VECTOR_ELT instead of XVECEXP.
25045 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25047 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25048 the selector elements to be different from the data elements
25049 if the selector is a VECTOR_CST.
25050 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25051 ssizetype for the selector.
25053 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25055 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25056 before testing each element individually.
25057 * tree-vect-generic.c (lower_vec_perm): Likewise.
25059 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25061 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25062 * selftest-run-tests.c (selftest::run_tests): Call it.
25063 * vector-builder.h (vector_builder::operator ==): New function.
25064 (vector_builder::operator !=): Likewise.
25065 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25066 (vec_perm_indices::all_from_input_p): New function.
25067 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25068 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25069 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25070 instead of reading the VECTOR_CST directly. Detect whether both
25071 vector inputs are the same before constructing the vec_perm_indices,
25072 and update the number of inputs argument accordingly. Use the
25073 utility functions added above. Only construct sel2 if we need to.
25075 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25077 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25078 the broadcast of the low byte.
25079 (expand_mult_highpart): Use an explicit encoding for the permutes.
25080 * optabs-query.c (can_mult_highpart_p): Likewise.
25081 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25082 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25083 (vectorizable_bswap): Likewise.
25084 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25085 explicit encoding for the power-of-2 permutes.
25086 (vect_permute_store_chain): Likewise.
25087 (vect_grouped_load_supported): Likewise.
25088 (vect_permute_load_chain): Likewise.
25090 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25092 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25093 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25094 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25095 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25096 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25097 (vect_gen_perm_mask_any): Likewise.
25099 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25101 * int-vector-builder.h: New file.
25102 * vec-perm-indices.h: Include int-vector-builder.h.
25103 (vec_perm_indices): Redefine as an int_vector_builder.
25104 (auto_vec_perm_indices): Delete.
25105 (vec_perm_builder): Redefine as a stand-alone class.
25106 (vec_perm_indices::vec_perm_indices): New function.
25107 (vec_perm_indices::clamp): Likewise.
25108 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25109 (vec_perm_indices::new_vector): New function.
25110 (vec_perm_indices::new_expanded_vector): Update for new
25111 vec_perm_indices class.
25112 (vec_perm_indices::rotate_inputs): New function.
25113 (vec_perm_indices::all_in_range_p): Operate directly on the
25114 encoded form, without computing elided elements.
25115 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25116 encoding. Update for new vec_perm_indices class.
25117 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25118 the given vec_perm_builder.
25119 (expand_vec_perm_var): Update vec_perm_builder constructor.
25120 (expand_mult_highpart): Use vec_perm_builder instead of
25121 auto_vec_perm_indices.
25122 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25123 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25124 or double series encoding as appropriate.
25125 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25126 vec_perm_indices instead of auto_vec_perm_indices.
25127 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25128 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25129 (vect_permute_store_chain): Likewise.
25130 (vect_grouped_load_supported): Likewise.
25131 (vect_permute_load_chain): Likewise.
25132 (vect_shift_permute_load_chain): Likewise.
25133 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25134 (vect_transform_slp_perm_load): Likewise.
25135 (vect_schedule_slp_instance): Likewise.
25136 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25137 (vectorizable_mask_load_store): Likewise.
25138 (vectorizable_bswap): Likewise.
25139 (vectorizable_store): Likewise.
25140 (vectorizable_load): Likewise.
25141 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25142 vec_perm_indices instead of auto_vec_perm_indices. Use
25143 tree_to_vec_perm_builder to read the vector from a tree.
25144 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25145 vec_perm_builder instead of a vec_perm_indices.
25146 (have_whole_vector_shift): Use vec_perm_builder and
25147 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25148 truncation to calc_vec_perm_mask_for_shift.
25149 (vect_create_epilog_for_reduction): Likewise.
25150 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25151 from auto_vec_perm_indices to vec_perm_indices.
25152 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25153 instead of changing individual elements.
25154 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25155 the vector in d.perm.
25156 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25157 from auto_vec_perm_indices to vec_perm_indices.
25158 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25159 instead of changing individual elements.
25160 (arm_vectorize_vec_perm_const): Use new_vector to install
25161 the vector in d.perm.
25162 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25163 Update vec_perm_builder constructor.
25164 (rs6000_expand_interleave): Likewise.
25165 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25166 (rs6000_expand_interleave): Likewise.
25168 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25170 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25171 to qimode could truncate the indices.
25172 * optabs.c (expand_vec_perm_var): Likewise.
25174 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25176 * Makefile.in (OBJS): Add vec-perm-indices.o.
25177 * vec-perm-indices.h: New file.
25178 * vec-perm-indices.c: Likewise.
25179 * target.h (vec_perm_indices): Replace with a forward class
25181 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25182 * optabs.h: Include vec-perm-indices.h.
25183 (expand_vec_perm): Delete.
25184 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25185 (expand_vec_perm_const): Declare.
25186 * target.def (vec_perm_const_ok): Replace with...
25187 (vec_perm_const): ...this new hook.
25188 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25189 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25190 * doc/tm.texi: Regenerate.
25191 * optabs.def (vec_perm_const): Delete.
25192 * doc/md.texi (vec_perm_const): Likewise.
25193 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25194 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25195 expand_vec_perm for constant permutation vectors. Assert that
25196 the mode of variable permutation vectors is the integer equivalent
25197 of the mode that is being permuted.
25198 * optabs-query.h (selector_fits_mode_p): Declare.
25199 * optabs-query.c: Include vec-perm-indices.h.
25200 (selector_fits_mode_p): New function.
25201 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25202 is defined, instead of checking whether the vec_perm_const_optab
25203 exists. Use targetm.vectorize.vec_perm_const instead of
25204 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25205 fit in the vector mode before using a variable permute.
25206 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25207 vec_perm_indices instead of an rtx.
25208 (expand_vec_perm): Replace with...
25209 (expand_vec_perm_const): ...this new function. Take the selector
25210 as a vec_perm_indices rather than an rtx. Also take the mode of
25211 the selector. Update call to shift_amt_for_vec_perm_mask.
25212 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25213 Use vec_perm_indices::new_expanded_vector to expand the original
25214 selector into bytes. Check whether the indices fit in the vector
25215 mode before using a variable permute.
25216 (expand_vec_perm_var): Make global.
25217 (expand_mult_highpart): Use expand_vec_perm_const.
25218 * fold-const.c: Includes vec-perm-indices.h.
25219 * tree-ssa-forwprop.c: Likewise.
25220 * tree-vect-data-refs.c: Likewise.
25221 * tree-vect-generic.c: Likewise.
25222 * tree-vect-loop.c: Likewise.
25223 * tree-vect-slp.c: Likewise.
25224 * tree-vect-stmts.c: Likewise.
25225 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25227 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25228 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25229 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25230 (aarch64_vectorize_vec_perm_const): ...this new function.
25231 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25232 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25233 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25234 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25235 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25236 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25237 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25239 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25240 check for NEON modes.
25241 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25242 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25243 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25244 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25246 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25247 the old VEC_PERM_CONST conditions.
25248 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25249 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25250 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25251 (ia64_vectorize_vec_perm_const_ok): Merge into...
25252 (ia64_vectorize_vec_perm_const): ...this new function.
25253 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25254 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25255 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25256 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25257 * config/mips/mips.c (mips_expand_vec_perm_const)
25258 (mips_vectorize_vec_perm_const_ok): Merge into...
25259 (mips_vectorize_vec_perm_const): ...this new function.
25260 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25261 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25262 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25263 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25264 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25265 (rs6000_expand_vec_perm_const): Delete.
25266 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25268 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25269 (altivec_expand_vec_perm_const_le): Take each operand individually.
25270 Operate on constant selectors rather than rtxes.
25271 (altivec_expand_vec_perm_const): Likewise. Update call to
25272 altivec_expand_vec_perm_const_le.
25273 (rs6000_expand_vec_perm_const): Delete.
25274 (rs6000_vectorize_vec_perm_const_ok): Delete.
25275 (rs6000_vectorize_vec_perm_const): New function.
25276 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25277 an element count and rtx array.
25278 (rs6000_expand_extract_even): Update call accordingly.
25279 (rs6000_expand_interleave): Likewise.
25280 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25281 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25282 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25283 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25284 (rs6000_expand_vec_perm_const): Delete.
25285 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25286 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25287 (altivec_expand_vec_perm_const_le): Take each operand individually.
25288 Operate on constant selectors rather than rtxes.
25289 (altivec_expand_vec_perm_const): Likewise. Update call to
25290 altivec_expand_vec_perm_const_le.
25291 (rs6000_expand_vec_perm_const): Delete.
25292 (rs6000_vectorize_vec_perm_const_ok): Delete.
25293 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25294 reference to the SPE evmerge intructions.
25295 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25296 an element count and rtx array.
25297 (rs6000_expand_extract_even): Update call accordingly.
25298 (rs6000_expand_interleave): Likewise.
25299 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25300 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25302 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25304 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25306 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25307 vector mode and that that mode matches the mode of the data
25309 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25310 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25311 directly using expand_vec_perm_1 when forcing selectors into
25313 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25315 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25317 * optabs-query.h (can_vec_perm_p): Delete.
25318 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25319 * optabs-query.c (can_vec_perm_p): Split into...
25320 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25321 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25322 particular selector is valid.
25323 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25324 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25325 (vect_grouped_load_supported): Likewise.
25326 (vect_shift_permute_load_chain): Likewise.
25327 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25328 (vect_transform_slp_perm_load): Likewise.
25329 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25330 (vectorizable_bswap): Likewise.
25331 (vect_gen_perm_mask_checked): Likewise.
25332 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25333 implementations of variable permutation vectors into account
25334 when deciding which selector to use.
25335 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25336 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25337 with a false third argument.
25338 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25339 to test whether the constant selector is valid and can_vec_perm_var_p
25340 to test whether a variable selector is valid.
25342 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25344 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25345 * optabs-query.c (can_vec_perm_p): Likewise.
25346 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25347 instead of vec_perm_indices.
25348 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25349 (vect_gen_perm_mask_checked): Likewise,
25350 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25351 (vect_gen_perm_mask_checked): Likewise,
25353 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25355 * optabs-query.h (qimode_for_vec_perm): Declare.
25356 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25357 (qimode_for_vec_perm): ...this new function.
25358 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25360 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25362 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25363 does not have a conditional at the top.
25365 2018-01-02 Richard Biener <rguenther@suse.de>
25367 * ipa-inline.c (big_speedup_p): Fix expression.
25369 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25372 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25375 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25379 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25380 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25381 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25382 cond_taken_branch_cost 3->4.
25384 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25386 PR tree-optimization/83581
25387 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25388 TODO_cleanup_cfg if any changes have been made.
25390 PR middle-end/83608
25391 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25392 convert_modes if target mode has the right side, but different mode
25395 PR middle-end/83609
25396 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25397 last argument when extracting from CONCAT. If either from_real or
25398 from_imag is NULL, use expansion through memory. If result is not
25399 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25400 the parts directly to inner mode, if even that fails, use expansion
25403 PR middle-end/83623
25404 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25405 check for bswap in mode rather than HImode and use that in expand_unop
25408 Copyright (C) 2018 Free Software Foundation, Inc.
25410 Copying and distribution of this file, with or without modification,
25411 are permitted in any medium without royalty provided the copyright
25412 notice and this notice are preserved.