1 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
5 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6 (get_constant_size): Don't make STRING_CSTs larger than they are.
7 (check_string_literal): New check function for STRING_CSTs.
8 (output_constant): Use it.
10 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
13 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
15 2018-09-13 Richard Biener <rguenther@suse.de>
17 PR tree-optimization/87263
18 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
19 (struct unwind_state): Add max_rpo field.
20 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
21 Compute max_rpo, the max RPO number a block can be backwards reached
22 from. Re-write non-iterating mode to a RPO ordered worklist approach,
23 separating it from the iterating mode.
25 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
27 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
28 (rfs_decision): New scheduling decision.
30 2018-09-13 Richard Biener <rguenther@suse.de>
33 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
34 (vn_nary_op_insert_pieces_predicated): Do not write useless
35 valid_dominated_by_p entry outside of the allocated storage.
37 2018-09-13 Omar Sandoval <osandov@osandov.com>
38 Tom de Vries <tdevries@suse.de>
41 * dwarf2out.c (is_c): New function.
42 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
44 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
47 * config/aarch64/aarch64.md (*aarch64_bfxil):
49 * config/aarch64/constraints.md (Ulc): Define.
50 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
52 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
55 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
57 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
58 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
59 aarch64_layout_frame call.
60 (aarch64_expand_epilogue): Likewise.
61 (aarch64_initial_elimination_offset): Likewise.
62 (aarch64_get_separate_components): Likewise.
63 (aarch64_use_return_insn_p): Likewise.
64 (aarch64_layout_frame): Remove unneeded check.
66 2018-09-13 Jakub Jelinek <jakub@redhat.com>
68 * configure.ac: Only append
69 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
70 gcc_config_arguments if it was never reconfigured or last reconfigure
71 was with different arguments.
72 * configure: Regenerated.
74 2018-09-13 Jakub Jelinek <jakub@redhat.com>
75 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
78 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
79 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
81 2018-09-13 Jakub Jelinek <jakub@redhat.com>
83 PR tree-optimization/87287
84 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
85 X % C == 0 to X % (unsigned) C == 0 optimization to ...
86 * match.pd (X % C == 0): ... here. New optimization.
88 2018-09-12 Jakub Jelinek <jakub@redhat.com>
91 * expr.h (maybe_optimize_mod_cmp): Declare.
92 * expr.c (mod_inv): New function.
93 (maybe_optimize_mod_cmp): New function.
94 (do_store_flag): Use it.
95 * cfgexpand.c (expand_gimple_cond): Likewise.
97 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
98 Julian Brown <julian@codesourcery.com>
101 * gimplify.c (gimplify_scan_omp_clauses): Set
102 target_firstprivatize_array_bases in OpenACC parallel and kernels
103 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
104 OpenACC data regions.
106 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
108 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
109 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
111 2018-09-12 Richard Biener <rguenther@suse.de>
113 PR tree-optimization/87280
114 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
115 edge but unreachable target.
116 (do_rpo_vn): For conservatively handling a PHI only mark
117 the backedge executable but not the block reachable.
119 2018-09-12 Richard Biener <rguenther@suse.de>
121 PR tree-optimization/87266
122 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
125 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
127 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
129 ("trunc<BFP:mode><DFP_ALL:mode>2")
130 ("trunc<DFP_ALL:mode><BFP:mode>2")
131 ("extend<BFP:mode><DFP_ALL:mode>2")
132 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
133 according to the target operand type.
135 2018-09-12 Jakub Jelinek <jakub@redhat.com>
136 Andreas Krebbel <krebbel@linux.ibm.com>
138 PR tree-optimization/86844
139 * gimple-ssa-store-merging.c
140 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
141 there are any overlapping stores in between them, make sure they are
142 also coalesced or we give up completely.
144 2018-09-12 Jakub Jelinek <jakub@redhat.com>
147 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
148 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
150 2018-09-12 Tom de Vries <tdevries@suse.de>
152 * common.opt (gdescribe-dies): Add option.
153 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
154 attribute for artifical and nameless decls.
155 (dwarf2out_register_external_die): Add description attribute to
156 external reference die.
157 (add_desc_attribute): New functions.
158 (gen_subprogram_die): Add description attribute to
159 DW_TAG_call_site_parameter.
160 * tree-pretty-print.c (print_generic_expr_to_str): New function.
161 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
162 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
164 (@item -gdescribe-dies): Add.
166 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
168 * tree-vrp.c (vrp_shift_undefined_p): Remove.
169 (extract_range_from_binary_expr_1: Call
170 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
171 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
174 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
176 * gimple-ssa-warn-alloca.c
177 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
178 field for ALLOCA_BOUND_*_LARGE.
180 2018-09-11 Nathan Sidwell <nathan@acm.org>
182 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
184 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
186 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
187 for clobbers. Remove obsolete comment.
189 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
191 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
192 mpxchk, mpxld and mpxst types.
193 (define_attr length_immediate): Remove all processing of mpx types.
194 (define_attr prefix_0f): Ditto.
195 (define_attr memory): Ditto.
197 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
199 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
200 (log<mode>2): Change operand 1 predicate to general_operand.
201 Extend operand 1 to XFmode and generate logxf3 insn.
202 (log10<mode>2): Change operand 1 predicate to general_operand.
203 Extend operand 1 to XFmode and generate log10xf3 insn.
204 (log2<mode>2): Change operand 1 predicate to general_operand.
205 Extend operand 1 to XFmode and generate log2xf3 insn.
206 (fyl2xp1_extend<mode>xf3_i387): Remove.
207 (log1p<mode>2): Change operand 1 predicate to general_operand.
208 Extend operand 1 to XFmode and generate log1pxf3 insn.
209 (fxtract_extend<mode>xf3_i387): Remove.
210 (logb<mode>2): Change operand 1 predicate to general_operand.
211 Extend operand 1 to XFmode and generate logbxf3 insn.
212 (ilogb<mode>2): Change operand 1 predicate to general_operand.
213 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
214 (significand<mode>2): Change operand 1 predicate to general_operand.
215 Extend operand 1 to XFmode and generate significandxf3 insn.
217 2018-09-11 Nathan Sidwell <nathan@acm.org>
219 * gcc.c (perror_with_name, pfatal_with_name): Delete.
220 (load_specs): Use fatal_error.
221 (DELETE_IF_ORDINARY, process_command): Use error.
222 (execute, run_attempt): Use fatal_error.
224 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
226 * diagnostic-core.h (sorry_at): New prototype.
227 * diagnostic.c (sorry_at): New function.
229 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
231 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
232 by zero as VR_UNDEFINED.
234 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
236 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
237 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
238 (<sincos>mode2): New expander.
239 (sincos_extend<mode>xf3_i387): Remove insn pattern.
240 (sincos -> sin, cos splitters): Remove splitter patterns.
241 (sincos<mode>3): Change operand 2 predicate to general_operand.
242 Extend operand 2 to XFmode and generate sincosxf3 insn.
243 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
244 Change operand 3 predicate to const1_operand.
245 (fptan_extend<mode>xf4_i387): Remove insn pattern.
246 (tanxf2): Update operands in the call to fptanxf4_i387.
247 (tan<mode>2): Change operand 1 predicate to general_operand.
248 Extend operand 1 to XFmode and generate tanxf3 insn.
249 (atan2xf3): Rename from *fpatanxf3_i387.
250 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
251 (atan2xf3): Remove expander.
252 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
253 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
254 (atan<mode>2): Change operand 1 predicate to general_operand.
255 Extend operand 1 to XFmode and generate atanxf3 insn.
257 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
259 * config/i386/i386.md (x87/SSE constant load splitter): Use
260 memory_operand instead of nonimmediate_operand for input operand
263 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
265 * config/i386/i386.md (float partial SSE register stall splitter): Move
266 splitter near its instruction pattern.
267 (float_extend partial SSE register stall splitter): Ditto.
268 (float_truncate partial SSE register stall splitter): Ditto.
270 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
273 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
274 to speculation_safe_value_not_needed.
277 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
278 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
279 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
280 leaf_function_p, instead use has_hard_reg_initial_val.
282 2018-09-09 Nathan Sidwell <nathan@acm.org>
284 * gcc.h (pfatal_with_name): Don't declare here.
285 * gcc.c (pfatal_with_name): Make static.
287 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
289 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
292 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
294 PR rtl-optimization/85458
295 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
296 priority hook to reduce the priority of EXPR.
298 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
300 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
301 DImode for x87 on 32bit targets. Conditionally disable x87 modes
302 with X87_ENABLE_FLOAT. Remove preparation code.
303 (*float<SWI48:mode><MODEF:mode>2): Rename from
304 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
305 math using "enabled" attribute.
306 (*floatdi<MODEF:mode>2_i387): Rename from
307 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
308 enable for 32bit targets only.
309 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
311 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
312 as operand 1 predicate. Rewrite as define_insn_and_split.
313 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
315 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
317 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
318 to fallthru to FLOAT case.
320 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
323 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
324 around folding of vec_sl to handle out of range shift values.
326 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
328 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
329 Update callers to gen_fix_trunc<mode>_i387_fisttp
330 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
331 nonimmediate_operand.
332 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
333 and corresponding splitters.
334 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
335 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
336 (fix_truncdi_i387_with_temp): Remove insn pattern
337 and corresponding splitters.
338 (fix_trunc<mode>_i387): Change operand 0 predicate to
339 nonimmediate_operand.
340 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
341 and corresponding splitters.
342 (*fistdi2_1): Remove.
344 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
345 (lrintxfdi2): Remove expander. Reimplement as define_insn.
346 (*fist<mode>2_1): Remove.
347 (fist<mode>2): Ditto.
348 (fist<mode>2_with_temp): Remove insn pattern and corresponding
350 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
351 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
352 (fistdi2_<rounding>): Change operand 0 predicate to
353 nonimmediate_operand.
354 (fistdi2_<rounding>_with_temp): Remove insn pattern
355 and corresponding splitters.
356 (fist<mode>2_<rounding>): Change operand 0 predicate to
357 nonimmediate_operand.
358 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
359 and corresponding splitters.
361 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
363 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
365 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
368 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
370 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
371 early gimple folding of vec_splat().
372 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
373 * gimple-fold.h: Add an extern define for tree_vec_extract().
375 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
377 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
378 wrappers around TREE_TYPE comparisons.
380 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
383 * config/s390/predicates.md: Add nonsym_memory_operand.
384 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
385 contains a SYMBOL_REF, load it into an intermediate pseudo.
386 (s390_emit_compare_and_swap): Legitimize operand.
387 * config/s390/s390.md: Use the new nonsym_memory_operand
388 with UNSPECV_CAS patterns.
390 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
393 * config/s390/s390-passes.def: New file.
394 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
396 (make_pass_s390_early_mach): Add declaration.
397 * config/s390/s390.c (make_pass_s390_early_mach):
398 (s390_option_override): Remove dynamic registration.
399 * config/s390/t-s390: Add s390-passes.def.
401 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
403 * config/s390/s390.c (s390_decompose_constant_pool_ref):
404 Remove UNSPEC_LTREL_BASE check.
405 (annotate_constant_pool_refs): Likewise.
406 (find_constant_pool_ref): Likewise.
407 (find_ltrel_base): Removed.
408 (replace_ltrel_base): Removed.
409 (s390_mainpool_finish): Remove replace_ltrel_base call.
410 (s390_chunkify_start): Remove pending LTREL_BASE logic.
411 (s390_chunkify_finish): Remove replace_ltrel_base call.
412 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
414 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
417 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
418 to speculation_safe_value_not_needed.
420 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
421 Bernd Schmidt <bernds_cb1@t-online.de>
423 * config/nvptx/nvptx-opts.h: New file.
424 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
425 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
427 (TARGET_SM35): New macro.
428 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
430 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
433 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
435 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
437 * config/i386/i386.md (truncdfsf2): Remove expander.
438 (truncdfsf2_with_temp): Ditto.
439 (truncxf<mode>2): Ditto.
440 (*truncdfsf_fast_mixed): Remove insn pattern.
441 (*truncdfsf_fast_i387): Ditto.
442 (*truncdfsf_mixed): Ditto.
443 (*truncdfsf_i387): Ditto.
444 (*truncdfsf2_i387_1): Ditto.
445 (*truncxfsf2_mixed): Ditto.
446 (*truncxfdf2_mixed): Ditto.
447 (*truncxf<mode>2_i387_noop): Ditto. Update callers
448 to call gen_truncxf<mode>2 instead.
449 (*truncxf<mode>2_i387): Remove.
450 (reg->reg splitters): Remove splitter pattern.
451 (reg->mem splitters): Ditto.
453 (truncdfsf2): New insn pattern.
454 (truncxf<mode>2): Ditto.
456 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
458 * tree-ssa-math-opts.c (is_mult_by): New function.
459 (is_square_of): Use the above.
460 (optimize_recip_sqrt): New function.
461 (pass_cse_reciprocals::execute): Use the above.
463 2018-09-05 Richard Biener <rguenther@suse.de>
466 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
467 to zero-init the emplaced vec.
469 2018-09-05 Martin Liska <mliska@suse.cz>
471 PR tree-optimization/87205
472 * tree-switch-conversion.c (pass_lower_switch::execute):
473 Group cases for switch statements.
475 2018-09-05 Richard Biener <rguenther@suse.de>
477 PR tree-optimization/87217
478 * tree-ssa-sccvn.c (vuse_valueize): New.
479 (vn_reference_lookup_pieces): Use it.
480 (vn_reference_lookup): Likewise.
482 2018-09-05 Nathan Sidwell <nathan@acm.org>
485 * stor-layout.c (place_field): Scan forwards to check last
486 bitfield when ms_bitfield_placement is in effect.
488 2018-09-05 Richard Biener <rguenther@suse.de>
491 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
494 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
495 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
497 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
498 * config.gcc (extra_objs): Build it.
499 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
501 * config/aarch64/aarch64-passes.def
502 (pass_tag_collision_avoidance): New pass.
503 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
504 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
505 (aarch64_classify_address): Remove static qualifier.
506 (aarch64_address_info, aarch64_address_type): Move to...
507 * config/aarch64/aarch64-protos.h: ... here.
508 (make_pass_tag_collision_avoidance): New function.
509 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
512 2018-09-05 Martin Liska <mliska@suse.cz>
514 * doc/gcov.texi: Update documentation of humar
516 * gcov.c (format_count): Print one decimal place, it provides
517 more fine number of situations like '1G' vs. '1.4G'.
519 2018-09-05 Martin Liska <mliska@suse.cz>
522 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
523 * optc-gen.awk: Allow 'Var' for Deprecated options in order
524 to generate a MASK value.
526 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
529 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
530 if frame pointer isn't used.
531 (compute_frame_pointer_to_fb_displacement): Likewise.
533 2018-09-04 Jakub Jelinek <jakub@redhat.com>
536 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
537 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
538 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
539 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
540 and OPTION_MASK_ISA_XSAVEC_UNSET.
542 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
544 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
545 XOR operations in NAND case.
547 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
549 * wide-int-range.cc (wide_int_range_convert): New.
550 * wide-int-range.h (wide_int_range_convert): New.
551 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
552 code into wide_int_range_convert.
553 (extract_range_into_wide_ints): Do not munge anti range constants
554 into the entire domain. Just return the range back.
556 2018-09-04 Martin Liska <mliska@suse.cz>
558 * genmatch.c (output_line_directive): Add new argument
560 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
562 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
564 * doc/invoke.texi (Option Summary): Add whitespace.
566 * doc/invoke.texi (Option Summary): Add -Waligned-new.
568 2018-09-04 Richard Biener <rguenther@suse.de>
570 PR tree-optimization/87211
571 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
572 backedge value we're supposed to treat as VARYING also number
573 the PHI to VARYING in case it got a different value-number already.
575 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
577 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
578 (extract_range_from_binary_expr_1): Do not call
579 vrp_can_optimize_bit_op.
580 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
582 (wide_int_range_get_mask_and_bounds): New.
583 (wide_int_range_optimize_bit_op): New.
584 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
585 (wide_int_range_bit_and): Same.
586 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
587 (wide_int_range_optimize_bit_op): New.
588 (wide_int_range_get_mask_and_bounds): New.
590 2018-09-04 Richard Biener <rguenther@suse.de>
592 PR tree-optimization/87176
593 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
594 variable. When value-numbering a virtual PHI node make sure
595 to not value-number to the backedge value.
597 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
599 * doc/extend.texi (Long Long, Hex Floats): Document support for
600 long long and hex floats in more recent versions of ISO C++.
602 2018-09-03 Richard Biener <rguenther@suse.de>
604 PR tree-optimization/87177
605 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
608 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
610 * bb-reorder.c (edge_order): Convert to C-qsort-style
611 tri-state comparator.
612 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
614 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
616 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
617 tri-state comparator.
618 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
620 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
622 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
623 (mergesort): ... here as maximum count for using netsort.
624 (gcc_qsort): Set nlim to 3 if stable sort is requested.
625 (gcc_stablesort): New.
626 * system.h (gcc_stablesort): Declare.
628 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
630 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
631 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
632 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
634 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
636 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
637 lxsdx and stxsdx alternatives.
638 (*mov<mode>_hardfloat64): Ditto.
639 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
641 2018-09-03 Richard Biener <rguenther@suse.de>
643 PR tree-optimization/87200
644 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
647 2018-09-03 Martin Liska <mliska@suse.cz>
649 PR tree-optimization/87201
650 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
651 Fix parenthesis in an expression.
653 2018-09-03 Richard Biener <rguenther@suse.de>
655 PR tree-optimization/87197
656 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
657 visited. CSE the VN_INFO hashtable lookup.
659 PR tree-optimization/87169
660 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
661 iterating make sure there's no extra backedges from irreducible
662 regions feeding the header. Mark the destination block
665 2018-09-03 Martin Liska <mliska@suse.cz>
668 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
669 * common/common-targhooks.c (default_get_valid_option_values):
671 * common/common-targhooks.h (default_get_valid_option_values):
673 * common/config/i386/i386-common.c: Move processor_target_table
675 (ix86_get_valid_option_values): New function.
676 (TARGET_GET_VALID_OPTION_VALUES): New macro.
677 * config/i386/i386.c (struct ptt): Move to i386-common.c.
678 (PTA_*): Move all defined masks into i386-common.c.
679 (ix86_function_specific_restore): Use new processor_cost_table.
680 * config/i386/i386.h (struct ptt): Moved from i386.c.
681 (struct pta): Likewise.
682 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
683 * doc/tm.texi.in: Likewise.
684 * opt-suggestions.c (option_proposer::suggest_option):
685 Pass prefix to build_option_suggestions.
686 (option_proposer::get_completions): Likewise.
687 (option_proposer::build_option_suggestions): Use the new target
689 * opts.c (struct option_help_tuple): New struct.
690 (print_filtered_help): Use the new target hook.
692 2018-09-03 Martin Liska <mliska@suse.cz>
695 * predict.c (set_even_probabilities): Add likely_edges
696 argument and handle cases where we have precisely one
698 (combine_predictions_for_bb): Catch also likely_edges.
699 (tree_predict_by_opcode): Handle gswitch statements.
700 * tree-cfg.h (find_case_label_for_value): New declaration.
701 (find_taken_edge_switch_expr): Likewise.
702 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
703 Find pivot in decision tree based on probabily, not by number of
706 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
708 * doc/standards.texi (Standards): Update Objective-C reference.
710 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
712 * doc/install.texi (Prerequisites): Update link for MPC.
714 2018-09-01 Michael Matz <matz@suse.de>
716 PR tree-optimization/87074
717 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
718 PHIs for outer-loop uses.
720 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
722 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
723 * doc/invoke.texi (C Dialect Options): Ditto.
725 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
727 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
729 2018-08-31 Richard Biener <rguenther@suse.de>
731 PR tree-optimization/87168
732 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
733 (rpo_elim::eliminate_avail): When OP was not visited it must
736 2018-08-31 David Malcolm <dmalcolm@redhat.com>
738 * tree-vrp.c (copy_value_range): Convert param "from" from
739 "value_range *" to "const value_range *".
740 (range_is_null): Likewise for param "vr".
741 (range_int_cst_p): Likewise.
742 (range_int_cst_singleton_p): Likewise.
743 (symbolic_range_p): Likewise.
744 (value_ranges_intersect_p): Likewise for both params.
745 (value_range_nonnegative_p): Likewise for param "vr".
746 (value_range_constant_singleton): Likewise.
747 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
748 (extract_range_into_wide_ints): Likewise for param "vr".
749 (extract_range_from_multiplicative_op): Likewise for params "vr0"
751 (vrp_can_optimize_bit_op): Likewise.
752 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
754 (extract_range_from_unary_expr): Likewise.
755 (debug_value_range): Likewise for param "vr".
756 (value_range::dump): Add "const" qualifier.
757 (vrp_prop::check_array_ref): Convert local "vr" from
758 "value_range *" to "const value_range *".
759 (vrp_prop::check_mem_ref): Likewise.
760 (vrp_prop::visit_stmt): Likewise for local "old_vr".
761 (vrp_intersect_ranges_1): Likewise for param "vr_1".
762 (vrp_intersect_ranges): Likewise.
763 (simplify_stmt_for_jump_threading): Likewise for local "vr".
764 (vrp_prop::vrp_finalize): Likewise.
765 * tree-vrp.h (value_range::dump): Add "const" qualifier.
766 (vrp_intersect_ranges): Add "const" qualifier to params as above.
767 (extract_range_from_unary_expr): Likewise.
768 (value_range_constant_singleton): Likewise.
769 (symbolic_range_p): Likewise.
770 (copy_value_range): Likewise.
771 (extract_range_from_binary_expr_1): Likewise.
772 (range_int_cst_p): Likewise.
773 (vrp_set_zero_nonzero_bits): Likewise.
774 (range_int_cst_singleton_p): Likewise.
776 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
778 * config/aarch64/arm_neon.h (vabsd_s64): New.
779 (vnegd_s64): Likewise.
781 2018-08-31 Martin Jambor <mjambor@suse.cz>
783 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
785 2018-08-31 Martin Liska <mliska@suse.cz>
787 * ipa-icf.c (sem_item::add_type): Use
788 sem_item::m_type_hash_cache.
789 * ipa-icf.h: Move the cache from sem_item_optimizer
792 2018-08-31 Nathan Sidwell <nathan@acm.org>
794 * doc/extend.texi (Backwards Compatibility): Remove implicit
795 extern C leeway of () being (...).
797 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
799 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
801 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
805 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
807 2018-08-31 Jakub Jelinek <jakub@redhat.com>
810 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
811 gen_int_mode. Formatting fixes.
813 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
815 * target.def (custom_function_descriptors): Improve documentation.
816 * doc/tm.texi.in (Trampolines): Expand discussion of function
817 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
818 beginning of the section.
819 * doc/tm.texi: Regenerated.
821 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
823 * cfg.h (class auto_edge_flag): Spell out the template-id of the
824 base class in the initializer list. This is a workaround for
825 building with older GCC.
826 (class auto_bb_flag): Likewise.
828 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
830 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
831 (altivec_vcmpequ<VI_char>_p): Remove star.
832 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
834 (expand_strncmp_vec_sequence): New function.
835 (emit_final_str_compare_vec): New function.
836 (expand_strn_compare): Add support for vector strncmp.
837 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
838 length specification to bytes.
839 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
840 (vcmpnezb_p): New pattern.
841 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
842 for option -mstring-compare-inline-limit.
844 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
846 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
847 (PTA_SKYLAKE): Add PTA_AES.
848 (PTA_GOLDMONT): Likewise.
850 2018-08-29 Jan Hubicka <jh@suse.cz>
853 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
854 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
856 2018-08-29 Jan Hubicka <jh@suse.cz>
858 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
860 (hash_tree): Do not visit TYPE_STUB_DECL.
861 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
862 stream TYPE_STUB_DECL.
863 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
864 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
865 after free_lang_data.
866 (type_in_anonymous_namespace_p): Likewise.
868 2018-08-29 Jan Hubicka <jh@suse.cz>
870 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
871 comment that it has to be even number.
872 (class sreal): Change m_sig type to int32_t.
873 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
874 int64_t for temporary calculations.
875 (sreal_verify_basics): Drop one bit from minimum and maximum.
877 2018-08-30 Richard Biener <rguenther@suse.de>
879 PR tree-optimization/87147
880 * tree-ssa-sccvn.c (SSA_VISITED): New function.
881 (visit_phi): When the degenerate result is from the backedge and
882 we didn't visit its definition yet drop to VARYING.
883 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
885 2018-08-29 Jan Hubicka <jh@suse.cz>
887 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
889 (hash_tree): Likewise.
891 2018-08-29 Jan Hubicka <jh@suse.cz>
893 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
894 and TYPE_NEXT_REF_TO.
896 2018-08-29 Jan Hubicka <jh@suse.cz>
898 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
899 comment that it has to be even number.
900 (class sreal): Change m_sig type to int32_t.
901 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
902 int64_t for temporary calculations.
903 (sreal_verify_basics): Drop one bit from minimum and maximum.
905 2018-08-30 Tamar Christina <tamar.christina@arm.com>
907 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
909 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
912 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
913 if to_add is negative.
915 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
918 * builtins.c (c_strlen): Improve range checks.
920 2018-08-29 Martin Sebor <msebor@redhat.com>
921 Jeff Law <law@redhat.com>
923 PR tree-optimization/86714
924 PR tree-optimization/86711
925 * builtins.c (c_strlen): Add arguments to call to string_constant.
926 * expr.c (string_constant): Add argument. Detect missing nul
927 terminator and outermost declaration it's missing in.
928 * expr.h (string_constant): Add argument.
929 * fold-const.c (read_from_constant_string): Add arguments to call to
931 (c_getstr): Likewise.
932 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
934 * tree-ssa-strlen.c (get_stridx): Likewise.
936 2018-08-29 Jan Hubicka <jh@suse.cz>
938 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
939 Do not stream DECL_VINDEX.
940 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
941 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
942 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
944 2018-08-29 Richard Biener <rguenther@suse.de>
946 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
947 virtual operands that are not default defs to honor region
949 (rpo_vn_valueize): Remove ineffective code here.
951 2018-08-29 Richard Biener <rguenther@suse.de>
953 PR tree-optimization/87132
954 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
955 when skipping defs reachable over backedges.
957 2018-08-29 Richard Biener <rguenther@suse.de>
959 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
960 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
961 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
962 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
963 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
964 (vn_reference_lookup_3): Remove use of const_parms.
965 (free_rpo_vn): Do not free const_parms.
966 (do_rpo_vn): Do not call init_const_parms.
967 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
968 SSA_NAME_POINTS_TO_READONLY_MEMORY.
969 (call_may_clobber_ref_p_1): Likewise.
971 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
974 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
976 (-ftree-scev-cprop): Document.
978 2018-08-29 Jan Hubicka <jh@suse.cz>
980 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
982 (sreal constructor): Update.
983 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
984 sreal:operator/): Update.
986 2018-08-29 Martin Liska <mliska@suse.cz>
988 * tree-switch-conversion.c (switch_conversion::expand):
989 Strenghten assumption about gswitch statements.
991 2018-08-29 Richard Biener <rguenther@suse.de>
993 PR tree-optimization/87117
994 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
995 re-value-number released SSA VDEFs.
997 2018-08-29 Richard Biener <rguenther@suse.de>
999 PR tree-optimization/87126
1000 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1002 2018-08-28 Jim Wilson <jimw@sifive.com>
1004 * config/riscv/pic.md: Rewrite.
1005 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1007 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1008 (SOFTF, default_load, softload, softstore): New.
1010 2018-08-28 Jeff Law <law@redhat.com>
1012 * fold-const.c (fold_binary_loc): Remove recently added assert.
1014 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1016 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1017 to OP parmeter of generated function.
1019 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1021 PR tree-optimization/87009
1022 * match.pd: Add boolean optimizations.
1024 2018-08-28 Martin Sebor <msebor@redhat.com>
1027 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1028 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1029 (pass_walloca::gate): Use it.
1030 (alloca_call_type): Same.
1031 (pass_walloca::execute): Same.
1032 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1034 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1036 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1037 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1040 2018-08-28 Richard Biener <rguenther@suse.de>
1042 PR tree-optimization/87124
1043 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1044 constants before looking up avail.
1046 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1049 * calls.c (maybe_warn_nonstring_arg): Punt early if
1050 warn_stringop_overflow is zero. Don't call get_range_strlen
1051 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1052 Swap comparison operands to have constants on rhs. Only use
1053 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1054 increment lenrng[0].
1056 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1058 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1059 use of tree_to_shwi. Remove duplicated test for the size being
1060 a whole number of bytes.
1062 2018-08-28 Richard Biener <rguenther@suse.de>
1064 PR tree-optimization/87117
1065 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1066 Handle removed stmt without LHS (GIMPLE_NOP).
1068 2018-08-28 Richard Biener <rguenther@suse.de>
1070 PR tree-optimization/87117
1071 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1072 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1074 2018-08-28 Richard Biener <rguenther@suse.de>
1076 PR tree-optimization/87117
1077 * tree-ssa-pre.c (compute_avail): Do not make expressions
1078 with predicated values available.
1079 (get_expr_value_id): Assert we do not run into predicated value
1082 2018-08-28 Richard Biener <rguenther@suse.de>
1084 PR tree-optimization/87117
1085 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1086 get virtual operands.
1087 (get_expr_operands): Handle STRING_CST like other decls.
1089 2018-08-28 Martin Liska <mliska@suse.cz>
1091 * tree.h: Update documentation of fndecl_built_in_p
1095 2018-08-27 Jeff Law <law@redhat.com>
1096 PR tree-optimization/87110
1097 * tree-ssa-dse.c (compute_trims): Handle non-constant
1100 2018-08-27 Martin Sebor <msebor@redhat.com>
1102 PR tree-optimization/86914
1103 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1105 2018-08-27 Martin Sebor <msebor@redhat.com>
1107 PR tree-optimization/87112
1108 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1109 the type of the bound argument.
1111 2018-08-27 Jeff Law <law@redhat.com>
1113 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1114 type does not have a TYPE_SIZE_UNIT.
1116 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1118 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1119 with include of backend.h.
1121 2018-08-27 Richard Biener <rguenther@suse.de>
1123 PR tree-optimization/86927
1124 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1125 use const cond reduction code.
1127 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1129 PR tree-optimization/85758
1130 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1132 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1135 * diagnostic-show-locus.c (class layout_range): Update for
1136 conversion of show_caret_p to a tri-state.
1137 (layout_range::layout_range): Likewise.
1138 (make_range): Likewise.
1139 (layout::maybe_add_location_range): Likewise.
1140 (layout::should_print_annotation_line_p): Don't show annotation
1141 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1142 (layout::get_state_at_point): Update for conversion of
1143 show_caret_p to a tri-state. Bail out early for
1144 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1145 underlining or source colorization.
1146 (gcc_rich_location::add_location_if_nearby): Update for conversion
1147 of show_caret_p to a tri-state.
1148 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1149 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1151 (selftest::test_one_liner_labels): Likewise.
1152 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1153 conversion of show_caret_p to a tri-state.
1154 * pretty-print.c (text_info::set_location): Likewise.
1155 * pretty-print.h (text_info::set_location): Likewise.
1156 * substring-locations.c (format_warning_n_va): Likewise.
1157 * tree-diagnostic.c (default_tree_printer): Likewise.
1158 * tree-pretty-print.c (newline_and_indent): Likewise.
1160 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1163 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1164 line above for line-insertion fix-it hints.
1165 (selftest::test_fixit_insert_containing_newline): Update the
1166 expected results, and add a test with line-numbering enabled.
1168 2018-08-27 Martin Liska <mliska@suse.cz>
1171 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1172 params with DECL_HAS_VALUE_EXPR_P.
1174 2018-08-27 Martin Liska <mliska@suse.cz>
1176 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1177 selected expansion strategy.
1179 2018-08-27 Martin Liska <mliska@suse.cz>
1181 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1182 * builtins.c (is_builtin_fn): Likewise.
1183 * attribs.c (diag_attr_exclusions): Use new function
1184 fndecl_built_in_p and remove check for FUNCTION_DECL if
1186 (builtin_mathfn_code): Likewise.
1187 (fold_builtin_expect): Likewise.
1188 (fold_call_expr): Likewise.
1189 (fold_builtin_call_array): Likewise.
1190 (fold_call_stmt): Likewise.
1191 (set_builtin_user_assembler_name): Likewise.
1192 (is_simple_builtin): Likewise.
1193 * calls.c (gimple_alloca_call_p): Likewise.
1194 (maybe_warn_nonstring_arg): Likewise.
1195 * cfgexpand.c (expand_call_stmt): Likewise.
1196 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1197 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1198 (cgraph_node::verify_node): Likewise.
1199 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1200 (cgraph_node::create_clone): Likewise.
1201 * config/arm/arm.c (arm_insert_attributes): Likewise.
1202 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1203 * dse.c (scan_insn): Likewise.
1204 * expr.c (expand_expr_real_1): Likewise.
1205 * fold-const.c (operand_equal_p): Likewise.
1206 (fold_binary_loc): Likewise.
1207 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1208 * gimple-low.c (lower_stmt): Likewise.
1209 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1210 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1211 * gimple.c (gimple_build_call_from_tree): Likewise.
1212 (gimple_call_builtin_p): Likewise.
1213 (gimple_call_combined_fn): Likewise.
1214 * gimplify.c (gimplify_call_expr): Likewise.
1215 (gimple_boolify): Likewise.
1216 (gimplify_modify_expr): Likewise.
1217 (gimplify_addr_expr): Likewise.
1218 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1219 * ipa-cp.c (determine_versionability): Likewise.
1220 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1221 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1222 * ipa-split.c (visit_bb): Likewise.
1223 (split_function): Likewise.
1224 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1225 * lto-cgraph.c (input_node): Likewise.
1226 * lto-streamer-out.c (write_symbol): Likewise.
1227 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1228 (lower_omp_1): Likewise.
1229 * predict.c (strip_predict_hints): Likewise.
1230 * print-tree.c (print_node): Likewise.
1231 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1232 * trans-mem.c (is_tm_irrevocable): Likewise.
1233 (is_tm_load): Likewise.
1234 (is_tm_simple_load): Likewise.
1235 (is_tm_store): Likewise.
1236 (is_tm_simple_store): Likewise.
1237 (is_tm_abort): Likewise.
1238 (tm_region_init_1): Likewise.
1239 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1240 * tree-cfg.c (verify_gimple_call): Likewise.
1241 (move_stmt_r): Likewise.
1242 (stmt_can_terminate_bb_p): Likewise.
1243 * tree-eh.c (lower_eh_constructs_2): Likewise.
1244 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1245 * tree-inline.c (remap_gimple_stmt): Likewise.
1246 (copy_bb): Likewise.
1247 (estimate_num_insns): Likewise.
1248 (fold_marked_statements): Likewise.
1249 * tree-sra.c (scan_function): Likewise.
1250 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1251 (optimize_stack_restore): Likewise.
1252 (pass_fold_builtins::execute): Likewise.
1253 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1254 (mark_all_reaching_defs_necessary_1): Likewise.
1255 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1256 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1257 (pass_forwprop::execute): Likewise.
1258 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1259 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1260 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1261 * tree-ssa-strlen.c (get_string_length): Likewise.
1262 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1263 (find_func_aliases_for_call): Likewise.
1264 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1265 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1266 * tree-tailcall.c (find_tail_calls): Likewise.
1267 * tree.c (need_assembler_name_p): Likewise.
1268 (free_lang_data_in_decl): Likewise.
1269 (get_call_combined_fn): Likewise.
1270 * ubsan.c (is_ubsan_builtin_p): Likewise.
1271 * varasm.c (incorporeal_function_p): Likewise.
1272 * tree.h (DECL_BUILT_IN): Remove and replace with
1274 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1275 (fndecl_built_in_p): New.
1277 2018-08-27 Martin Liska <mliska@suse.cz>
1279 PR tree-optimization/86847
1280 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1281 Dump also subtree probability.
1282 (switch_decision_tree::do_jump_if_equal): New function.
1283 (switch_decision_tree::emit_case_nodes): Handle special
1284 situations in balanced tree that can be emitted much simpler.
1285 Fix calculation of probabilities that happen in tree expansion.
1286 * tree-switch-conversion.h (struct cluster): Add
1288 (struct simple_cluster): Likewise.
1289 (struct case_tree_node): Add new function has_child.
1290 (do_jump_if_equal): New.
1292 2018-08-27 Martin Liska <mliska@suse.cz>
1294 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1295 Add new argument to bit_test_cluster constructor.
1296 (bit_test_cluster::emit): Set bits really number of values
1298 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1299 probability argument.
1300 * tree-switch-conversion.h (struct bit_test_cluster):
1301 Add m_handles_entire_switch.
1303 2018-08-27 Martin Liska <mliska@suse.cz>
1305 PR tree-optimization/86702
1306 * tree-switch-conversion.c (jump_table_cluster::emit):
1307 Make probabilities even for values in jump table
1308 according to number of cases handled.
1309 (switch_decision_tree::compute_cases_per_edge): Pass
1310 argument to reset_out_edges_aux function.
1311 (switch_decision_tree::analyze_switch_statement): Likewise.
1312 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1315 2018-08-27 Martin Liska <mliska@suse.cz>
1317 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1318 cfun argument explicitly.
1319 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1320 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1321 function gimple_switch_default_bb.
1322 (convert_switch_statements):
1324 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1325 * stmt.c (label_to_block_fn): Use label_to_block and pass
1326 cfun argument explicitly and use gimple_switch_label_bb.
1327 (expand_case): Likewise.
1328 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1329 cfun argument explicitly. Likewise.
1330 (make_edges_bb): Likewise.
1331 (make_cond_expr_edges): Likewise.
1332 (get_cases_for_edge): Likewise.
1333 (make_gimple_switch_edges): Likewise.
1334 (label_to_block_fn): Likewise.
1335 (label_to_block): Likewise.
1336 (make_goto_expr_edges): Likewise.
1337 (make_gimple_asm_edges): Likewise.
1338 (main_block_label): Likewise.
1339 (group_case_labels_stmt): Likewise.
1340 (find_taken_edge_computed_goto): Likewise.
1341 (find_taken_edge_switch_expr): Likewise.
1342 (gimple_verify_flow_info): Likewise.
1343 (gimple_redirect_edge_and_branch): Likewise.
1344 (gimple_switch_label_bb): New function.
1345 (gimple_switch_default_bb): Likewise.
1346 (gimple_switch_edge): Likewise.
1347 (gimple_switch_default_edge): Likewise.
1348 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1349 (label_to_block): ... with this.
1350 (gimple_switch_label_bb): New.
1351 (gimple_switch_default_bb): Likewise.
1352 (gimple_switch_edge): Likewise.
1353 (gimple_switch_default_edge): Likewise.
1354 * tree-cfgcleanup.c (convert_single_case_switch): Use
1355 new gimple functions and pass new argument to label_to_block.
1356 (cleanup_control_flow_bb):
1357 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1358 cfun argument explicitly.
1359 (make_eh_edges): Likewise.
1360 (redirect_eh_dispatch_edge): Likewise.
1361 (lower_resx): Likewise.
1362 (lower_eh_dispatch): Likewise.
1363 (maybe_remove_unreachable_handlers): Likewise.
1364 (unsplit_eh): Likewise.
1365 (cleanup_empty_eh): Likewise.
1366 (verify_eh_edges): Likewise.
1367 (verify_eh_dispatch_edge): Likewise.
1368 * tree-ssa-dom.c (record_edge_info): Likewise.
1369 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1370 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1371 (thread_through_normal_block): Likewise.
1372 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1373 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1374 * tree-switch-conversion.c (switch_conversion::collect): Use new
1376 (switch_conversion::check_final_bb): Likewise.
1377 (switch_conversion::gather_default_values): Pass new argument
1379 (switch_conversion::build_constructors): Likewise.
1380 (switch_decision_tree::compute_cases_per_edge): Use new
1381 gimple_switch_edge function.
1382 (switch_decision_tree::analyze_switch_statement): Pass new argument
1384 (switch_decision_tree::try_switch_expansion): Use
1385 gimple_switch_default_edge.
1386 * tree-vrp.c (find_switch_asserts): Pass new argument
1388 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1389 (vr_values::simplify_switch_using_ranges): Likewise.
1391 2018-08-27 Richard Biener <rguenther@suse.de>
1393 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1394 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1396 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1397 (struct vn_nary_op_s): Add unwind_to member. Add
1398 predicated_values flag and put result into a union together
1399 with a linked list of vn_pval.
1400 (struct vn_ssa_aux): Add name member to make maintaining
1401 a map of SSA name to vn_ssa_aux possible. Remove no longer
1402 needed info, dfsnum, low, visited, on_sccstack, use_processed
1403 and range_info_anti_range_p members.
1404 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1405 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1407 (vn_valueize): New global.
1408 (vn_context_bb): Likewise.
1409 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1410 VN_INFO_PTR_INFO): Remove.
1411 * tree-ssa-sccvn.c: ... (rewrite)
1412 (pass_fre::execute): For -O2+ initialize loops and run
1413 RPO VN in optimistic mode (iterating). For -O1 and -Og
1414 run RPO VN in non-optimistic mode.
1415 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1416 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1417 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1418 (rpo-vn-max-loop-depth): Document.
1419 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1420 when valuezing the VUSE signals we walked out of the region.
1421 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1422 (phi_translate): Set VN context block to use for availability
1424 (compute_avail): Likewise.
1425 (pre_valueize): New function.
1426 (pass_pre::execute): Adjust to the RPO VN API.
1428 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1429 (propagate_constants_for_unrolling): Remove.
1430 (tree_unroll_loops_completely): Perform value-numbering
1431 on the unrolled bodies loop parent.
1433 2018-08-27 Richard Biener <rguenther@suse.de>
1435 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1436 for partial antic compute.
1438 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1440 PR rtl-optimization/87065
1441 * combine.c (simplify_if_then_else): Formatting fix.
1442 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1444 (known_cond): Don't return const_true_rtx for vector modes. Use
1445 CONST0_RTX instead of const0_rtx. Formatting fixes.
1447 2018-08-27 Martin Liska <mliska@suse.cz>
1449 PR gcov-profile/87069
1450 * gcov.c (process_file): Record files already processed
1451 and warn about a file being processed multiple times.
1453 2018-08-27 Martin Liska <mliska@suse.cz>
1456 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1457 Set default values for x_aarch64_*_string strings.
1458 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1459 prefix. For -mabi do not print '=ABI' in help and use
1460 <option_value> format for -msve-vector-bits and -moverride
1463 2018-08-26 Jeff Law <law@redhat.com>
1465 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1468 2018-08-26 Marek Polacek <polacek@redhat.com>
1470 PR c++/87029, Implement -Wredundant-move.
1471 * doc/invoke.texi: Document -Wredundant-move.
1473 2018-08-25 Martin Sebor <msebor@redhat.com>
1475 PR tree-optimization/87059
1476 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1477 to the same type as the other.
1478 * fold-const.c (fold_binary_loc): Assert expectation.
1480 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1482 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1483 extraneous parentheses, dead code section and formatting.
1485 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1488 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1489 wide enough for jumps in the line-numbering to be visible.
1490 (layout::print_gap_in_line_numbering): New member function.
1491 (layout::calculate_line_spans): When using line numbering, merge
1492 line spans that are only 1 line apart.
1493 (diagnostic_show_locus): When printing line numbers, show gaps in
1494 line numbering directly, rather than printing headers.
1495 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1496 line-numbering with multiple line spans.
1497 (selftest::test_fixit_insert_containing_newline_2): Add test of
1498 line-numbering, in which the spans are close enough to be merged.
1500 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1502 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1503 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1504 * tree-vrp.c (range_is_nonnull): Remove.
1505 (range_includes_zero_p): Accept value_range instead of min/max.
1506 (extract_range_from_binary_expr_1): Do not early bail on
1508 Use range_includes_zero_p instead of range_is_nonnull.
1509 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1510 of range_is_nonnull.
1511 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1512 special case VR_ANTI_RANGE.
1513 (vrp_finalize): Same.
1514 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1516 (range_is_nonnull): Remove.
1517 * vr-values.c (vrp_stmt_computes_nonzero): Use
1518 range_includes_zero_p instead of range_is_nonnull.
1519 (extract_range_basic): Pass value_range to range_includes_zero_p
1520 instead of range_is_nonnull.
1522 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1524 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1525 * emit-rtl.h (rtl_data): Remove return_bnd.
1526 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1527 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1528 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1529 (POINTER_BOUNDS_MODE): Remove definition.
1530 (make_pointer_bounds_mode): Remove.
1531 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1532 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1533 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1534 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1535 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1536 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1537 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1539 * config/i386/i386-modes.def (BND32, BND64): Remove.
1540 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1541 (dbx64_register_map): Ditto.
1542 (svr4_dbx_register_map): Ditto.
1543 (indirect_thunk_bnd_needed): Remove.
1544 (indirect_thunks_bnd_used): Ditto.
1545 (indirect_return_bnd_needed): Ditto.
1546 (indirect_return_via_cx_bnd): Ditto.
1547 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1548 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1549 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1550 (output_indirect_thunk_function): Remove handling of
1551 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1552 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1553 (ix86_save_reg): Remove handling of crtl->return_bnd.
1554 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1555 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1556 and UNSPEC_BNDLX_ADDR.
1557 (ix86_output_indirect_branch_via_reg): Remove handling of
1558 indirect_thunk_prefix_bnd.
1559 (ix86_output_indirect_branch_via_push): Ditto.
1560 (ix86_output_function_return): Ditto.
1561 (ix86_output_indirect_function_return): Ditto.
1562 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1563 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1564 (CALL_USED_REGISTERS): Ditto.
1565 (REG_ALLOC_ORDER): Update for removal of bound registers.
1566 (HI_REGISTER_NAMES): Ditto.
1567 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1568 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1569 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1570 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1571 (FIRST_PSEUDO_REG): Update.
1572 (BND): Remove mode iterator.
1573 * config/i386/predicates.md (bnd_mem_operator): Remove.
1575 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1577 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1580 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1582 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1583 the case in which the permute needs only a single element and
1584 repeats for every vector of the result. Extend that case to
1585 handle variable-length vectors.
1586 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1588 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1591 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1592 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1594 2018-08-24 Richard Biener <rguenther@suse.de>
1596 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1597 bb_flags_allocated members.
1598 (auto_flag): New RAII class for allocating flags.
1599 (auto_edge_flag): New RAII class for allocating edge flags.
1600 (auto_bb_flag): New RAII class for allocating bb flags.
1601 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1603 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1604 in favor of temporarily allocated BB flag.
1605 * hsa-brig.c: Re-order includes.
1606 * hsa-dump.c: Likewise.
1607 * hsa-regalloc.c: Likewise.
1608 * print-rtl.c: Likewise.
1609 * profile-count.c: Likewise.
1611 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1614 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1617 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1620 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1621 from wide_int_range_multiplicative_op.
1623 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1625 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1628 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1630 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1633 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1635 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1636 full GENERIC expression used for replacement.
1638 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1640 * tree-vrp.c (abs_extent_range): Remove.
1641 (extract_range_into_wide_ints): Pass wide ints by reference.
1642 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1643 Pass wide ints by reference in all calls to
1644 extract_range_into_wide_ints.
1645 * wide-int-range.cc (wide_int_range_div): New.
1646 * wide-int-range.h (wide_int_range_div): New.
1647 (wide_int_range_includes_zero_p): New.
1648 (wide_int_range_zero_p): New.
1650 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1652 * config/aarch64/aarch64.md (arches): New enum.
1653 (arch): New enum attr.
1654 (arch_enabled): New attr.
1655 (enabled): Now uses arch_enabled only.
1656 (simd, sve, fp16): Removed attribute.
1657 (fp): Attr now defined in terms of 'arch'.
1658 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1659 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1660 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1661 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1662 attributes into 'arch'.
1663 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1664 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1665 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1666 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1667 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1668 'simd' attribute into 'arch'.
1669 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1670 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1671 Convert use of 'fp' attribute to 'arch'.
1672 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1673 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1675 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1676 (different modes) Merge 'fp' and 'simd' into 'arch'.
1677 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1680 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1682 PR rtl-optimization/87026
1683 * expmed.c (canonicalize_comparison): If we can no longer create
1684 pseudoregisters, don't.
1686 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1689 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1691 * config/arm/arm.c (speculation_barrier_libfunc): New static
1693 (arm_init_libfuncs): Initialize it.
1694 (arm_emit_speculation_barrier): New function.
1695 * config/arm/arm.md (speculation_barrier): Call
1696 arm_emit_speculation_barrier for architectures that do not have
1698 (speculation_barrier_insn): Only match on Armv7 or later.
1700 2018-08-23 Richard Biener <rguenther@suse.de>
1703 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1706 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1708 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1709 of single-vector TBLs.
1710 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1713 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1716 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1717 aarch64_evpc_tbl guard.
1719 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1721 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1724 2018-08-22 Martin Sebor <msebor@redhat.com>
1727 * tree-pretty-print.c (pretty_print_string): Add argument.
1728 (dump_generic_node): Call to pretty_print_string with string size.
1730 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1732 PR rtl-optimization/86771
1733 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1734 of two SETs into those two SETs, one to be placed at i2, if that SETs
1735 destination is modified between i2 and i3.
1737 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1739 PR tree-optimization/86725
1740 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1742 (vect_analyze_scalar_cycles_1): Check it.
1744 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1746 PR tree-optimization/86725
1747 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1748 an outer loop phi as a double reduction, make sure that the
1749 single user of the phi result is an inner loop phi.
1751 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1753 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1754 grouped stores with gaps to a strided group.
1756 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1758 * tree-vect-stmts.c (get_group_load_store_type)
1759 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1760 first statement in a group.
1762 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1764 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1765 the sequence used in gcc/gcc.c.
1767 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1770 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1773 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1775 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1776 Darwin10-specific unwinder-shim.
1777 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1778 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1779 New to cater for Darwin10 Rosetta.
1781 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1783 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1784 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1786 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1791 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1792 (dwarf2out_switch_text_section): Generate a local label for the
1793 second function sub-section and apply it as the second FDE start
1795 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1796 second sub-section start.
1798 2018-08-22 Richard Biener <rguenther@suse.de>
1800 PR tree-optimization/86988
1801 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1803 2018-08-22 Richard Biener <rguenther@suse.de>
1805 PR tree-optimization/86945
1806 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1808 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1810 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1811 a comment about how uses of r2 for .sdata2 come about.
1813 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1815 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1817 2018-08-21 Marek Polacek <polacek@redhat.com>
1819 PR c++/86981, Implement -Wpessimizing-move.
1820 * doc/invoke.texi: Document -Wpessimizing-move.
1822 2018-08-21 Jan Hubicka <jh@suse.cz>
1824 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1825 * tree.h (is_redundant_typedef): Remove.
1826 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1828 2018-08-21 Jan Hubicka <jh@suse.cz>
1830 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1833 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1835 * expmed.c (extract_low_bits): Reject invalid subregs early.
1837 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1840 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1843 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1845 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1846 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1847 * config/vxworks.c: Likewise.
1849 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1851 * config/vxworks.c: Set targetm.have_ctors_dtors
1852 if HAVE_INITFINI_ARRAY_SUPPORT.
1853 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1854 if HAVE_INITFINI_ARRAY_SUPPORT.
1856 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1858 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1859 default search path for VxWorks < 7.
1861 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1863 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1864 (get_format_string): Refer to c_getstr.
1866 2018-08-21 Tom de Vries <tdevries@suse.de>
1868 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1869 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1870 (debuginfo_early_stop): Declare.
1871 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1872 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1873 (debuginfo_early_stop): New function.
1874 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1875 and debuginfo_early_stop.
1876 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1877 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1878 (general_init): Call debuginfo_early_init.
1879 (finalize): Call debuginfo_fini.
1880 (do_compile): Call debuginfo_init.
1881 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1883 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1885 2018-08-21 Tom de Vries <tdevries@suse.de>
1887 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1888 flag_dump_noaddr and flag_dump_unnumbered.
1890 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1892 * wide-int-range.cc (wide_int_range_abs): New.
1893 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1894 * wide-int-range.h (wide_int_range_abs): New.
1895 (wide_int_range_min_max): New.
1896 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1897 case to call wide_int_range_abs.
1898 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1899 (extract_range_from_abs_expr): Delete.
1901 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1904 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1905 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1908 2018-08-20 Nathan Sidwell <nathan@acm.org>
1909 Jeff Law <law@redhat.com>
1911 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1912 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1914 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1917 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1918 (decl_attributes): Likewise.
1919 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1921 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1922 * diagnostic-core.h (class auto_diagnostic_group): New class.
1923 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1924 (diagnostic_report_diagnostic): Handle the first diagnostics within
1926 (emit_diagnostic): Add auto_diagnostic_group instance.
1928 (inform_n): Likewise.
1929 (warning): Likewise.
1930 (warning_at): Likewise.
1931 (warning_n): Likewise.
1932 (pedwarn): Likewise.
1933 (permerror): Likewise.
1935 (error_n): Likewise.
1936 (error_at): Likewise.
1938 (fatal_error): Likewise.
1939 (internal_error): Likewise.
1940 (internal_error_no_backtrace): Likewise.
1941 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1942 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1943 * diagnostic.h (struct diagnostic_context): Add fields
1944 "diagnostic_group_nesting_depth",
1945 "diagnostic_group_emission_count", "begin_group_cb",
1947 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1948 Add auto_diagnostic_group instance(s).
1949 (find_explicit_erroneous_behavior): Likewise.
1950 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1951 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1952 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1953 (gimplify_va_arg_expr): Likewise.
1954 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1955 (HSA_SORRY_AT): Likewise.
1956 * ipa-devirt.c (compare_virtual_tables): Likewise.
1957 (warn_odr): Likewise.
1958 * multiple_target.c (expand_target_clones): Likewise.
1959 * opts-common.c (cmdline_handle_error): Likewise.
1960 * reginfo.c (globalize_reg): Likewise.
1961 * substring-locations.c (format_warning_n_va): Likewise.
1962 * tree-inline.c (expand_call_inline): Likewise.
1963 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1964 * tree-ssa-loop-niter.c
1965 (do_warn_aggressive_loop_optimizations): Likewise.
1966 * tree-ssa-uninit.c (warn_uninit): Likewise.
1967 * tree.c (warn_deprecated_use): Likewise.
1969 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1972 * config/i386/i386.md (eh_return): Always update EH return
1973 address in word_mode.
1975 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1977 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1978 TARGET_SPLIT_COMPLEX_ARG is defined.
1980 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1982 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1984 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1987 * expr.c (expand_assignment): Assert that bitpos is positive.
1988 (store_field): Likewise
1989 (expand_expr_real_1): Make sure that bitpos is positive.
1990 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1993 2018-08-20 Nathan Sidwell <nathan@acm.org>
1995 * Makefile.in (CPP_ID_DATA_H): Delete.
1996 (CPP_INTERNAL_H): Don't add it.
1997 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1998 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2000 2018-08-20 Richard Biener <rguenther@suse.de>
2002 PR tree-optimization/78655
2003 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2004 pointer + offset nonnull if either operand is nonnull work.
2006 2018-08-20 Tom de Vries <tdevries@suse.de>
2008 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2009 unless the referenced die describes the added property using
2010 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2011 Otherwise, add a DW_AT_location to the referenced die.
2013 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2016 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2017 register_operand when calling ix86_set_reg_reg_cost.
2018 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2019 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2020 predicate and to 1 otherwise.
2022 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2024 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2025 emit a diagnostic that it is not supported and reset the option.
2026 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2027 supported and consume the option. (ASM_FINAL_SPEC): New.
2029 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2031 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2034 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2036 C-SKY port: Documentation
2038 * doc/extend.texi (C-SKY Function Attributes): New section.
2039 * doc/invoke.texi (Option Summary): Add C-SKY options.
2040 (C-SKY Options): New section.
2041 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2043 2018-08-17 Jojo <jijie_rong@c-sky.com>
2044 Huibin Wang <huibin_wang@c-sky.com>
2045 Sandra Loosemore <sandra@codesourcery.com>
2046 Chung-Lin Tang <cltang@codesourcery.com>
2048 C-SKY port: Backend implementation
2050 * config/csky/*: New.
2051 * common/config/csky/*: New.
2053 2018-08-17 Jojo <jijie_rong@c-sky.com>
2054 Huibin Wang <huibin_wang@c-sky.com>
2055 Sandra Loosemore <sandra@codesourcery.com>
2056 Chung-Lin Tang <cltang@codesourcery.com>
2057 Andrew Jenner <andrew@codesourcery.com>
2059 C-SKY port: Configury
2061 * config.gcc (csky-*-*): New.
2062 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2063 * configure: Regenerated.
2065 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2067 * dump-context.h: Include "dumpfile.h".
2068 (dump_context::dump_printf_va): Convert final param from va_list
2069 to va_list *. Convert from ATTRIBUTE_PRINTF to
2070 ATTRIBUTE_GCC_DUMP_PRINTF.
2071 (dump_context::dump_printf_loc_va): Likewise.
2072 * dumpfile.c: Include "stringpool.h".
2073 (make_item_for_dump_printf_va): Delete.
2074 (make_item_for_dump_printf): Delete.
2075 (class dump_pretty_printer): New class.
2076 (dump_pretty_printer::dump_pretty_printer): New ctor.
2077 (dump_pretty_printer::emit_items): New member function.
2078 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2080 (dump_pretty_printer::emit_item): New member function.
2081 (dump_pretty_printer::stash_item): New member function.
2082 (dump_pretty_printer::format_decoder_cb): New member function.
2083 (dump_pretty_printer::decode_format): New member function.
2084 (dump_context::dump_printf_va): Reimplement in terms of
2085 dump_pretty_printer.
2086 (dump_context::dump_printf_loc_va): Convert final param from va_list
2088 (dump_context::begin_scope): Reimplement call to
2089 make_item_for_dump_printf.
2090 (dump_printf): Update for change to dump_printf_va.
2091 (dump_printf_loc): Likewise.
2092 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2093 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2094 with %T, %E, and %G.
2095 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2096 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2097 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2098 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2099 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2100 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2101 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2102 within a dump_printf_loc call to "%wu".
2103 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2104 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2105 missing space after "=".
2106 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2107 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2108 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2109 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2110 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2111 duplicate "vectorized" from message.
2113 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2115 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2116 polyNxK_t element's TYPE_STRING_FLAG.
2118 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2120 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2121 (they were unnamed before). Fix comments.
2123 2018-08-17 Nathan Sidwell <nathan@acm.org>
2125 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2127 2018-08-17 Richard Biener <rguenther@suse.de>
2129 PR tree-optimization/86841
2130 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2132 2018-08-17 Martin Liska <mliska@suse.cz>
2134 * common.opt: Remove Warn, Init and Report for options with
2135 Ignore/Deprecated flag. Warning is done automatically for
2137 * config/i386/i386.opt: Likewise.
2138 * config/ia64/ia64.opt: Likewise.
2139 * config/rs6000/rs6000.opt: Likewise.
2140 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2141 Remove usage of flag_check_pointer_bounds.
2142 * lto-wrapper.c (merge_and_complain): Do not handle
2143 OPT_fcheck_pointer_bounds.
2144 (append_compiler_options): Likewise.
2145 * opt-functions.awk: Do not handle Deprecated.
2146 * optc-gen.awk: Check that Var, Report and Init are not
2147 used for an option with Ignore/Deprecated flag.
2148 * opts-common.c (decode_cmdline_option): Do not report
2150 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2152 * opts.h (struct cl_option): Remove cl_deprecated flag.
2153 (CL_ERR_DEPRECATED): Remove error enum value.
2155 2018-08-17 Richard Biener <rguenther@suse.de>
2158 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2159 across a va-arg-pack using call adjust its return value accordingly.
2161 2018-08-16 Martin Sebor <msebor@redhat.com>
2163 PR tree-optimization/86853
2164 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2165 (struct fmtresult): Add member and initialize it in ctors.
2166 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2167 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2168 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2169 (parse_directive): Handle %C same as %c.
2170 (sprintf_dom_walker::compute_format_length): Adjust.
2171 (is_call_safe): Adjust.
2173 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2175 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2176 for determining how to count the elements.
2177 * builtins.h (c_strlen): Adjust prototype.
2178 * expr.c (string_constant): Add new parameter mem_size.
2179 Set *mem_size appropriately.
2180 * expr.h (string_constant): Adjust protoype.
2181 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2182 * gimple-fold.h (get_range_strlen): Adjust prototype.
2183 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2184 (format_string): Call get_string_length with eltsize.
2186 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2188 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2189 to emit the span, rather than setting it as the prefix.
2191 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2193 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2194 "margin_char" parameter, defaulting to space. Use it in place
2195 of pp_space for the initial part of the margin.
2196 (layout::print_leading_fixits): Use '+' when filling the margin
2197 of line-insertion fix-it hints.
2199 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2201 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2204 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2206 * config/rs6000/altivec.md: Don't set length attribute to the default
2208 * config/rs6000/darwin.md: Ditto.
2209 * config/rs6000/dfp.md: Ditto.
2210 * config/rs6000/htm.md: Ditto.
2211 * config/rs6000/rs6000.md: Ditto.
2212 * config/rs6000/sync.md: Ditto.
2213 * config/rs6000/vsx.md: Ditto.
2215 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2217 * config/rs6000/altivec.md: Don't set length attribute to the default
2218 value, for branch instructions.
2219 * config/rs6000/darwin.md: Ditto.
2220 * config/rs6000/rs6000.md: Ditto.
2222 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2224 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2225 (unnamed conditional branch define_insn): Set length to 4 or 8
2226 depending on offset.
2227 (<bd>_<mode>): Similar, for alternative 0.
2228 (<bd>tf_<mode>): Ditto.
2230 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2232 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2234 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2236 * doc/rtl.texi: Replace old RTX class names with new names.
2239 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2241 * expmed.h (canonicalize_comparison): New declaration.
2242 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2243 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2244 * optabs.c (prepare_cmp_insn): Likewise.
2245 * rtl.h (unsigned_condition_p): New function which checks if a
2246 comparison operator is unsigned.
2248 2018-08-16 Nathan Sidwell <nathan@acm.org>
2250 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2251 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2253 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2256 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2257 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2258 (mov<mov>): ..this and enable unconditionally.
2260 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2262 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2264 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2266 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2267 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2268 "Common" with "Target".
2270 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2272 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2273 * doc/invoke.texi (mmitigate-rop): Remove.
2274 * config/i386/i386.c: Do not include "regrename.h".
2275 (ix86_rop_should_change_byte_p, reg_encoded_number)
2276 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2278 (ix86_reorg): Remove call to ix86_mitigate_rop.
2279 * config/i386/i386.md (attr "modrm_class"): Remove.
2280 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2281 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2282 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2284 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2286 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2287 allow folding of mergeh() and mergel() for the float and double types.
2288 (fold_mergehl_helper): Rework to handle building a permute tree
2291 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2293 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2296 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2298 * common.opt (fdiagnostics-show-labels): New option.
2299 * diagnostic-show-locus.c (class layout_range): Add field
2301 (class layout): Add field "m_show_labels_p".
2302 (layout_range::layout_range): Add param "label" and use it to
2304 (make_range): Pass in NULL for new "label" param of layout_range's
2306 (layout::layout): Initialize m_show_labels_p.
2307 (layout::maybe_add_location_range): Pass in loc_range->m_label
2308 when constructing layout_range instances.
2309 (struct line_label): New struct.
2310 (layout::print_any_labels): New member function.
2311 (layout::print_line): Call it if label-printing is enabled.
2312 (selftest::test_one_liner_labels): New test.
2313 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2314 * diagnostic.c (diagnostic_initialize): Initialize
2315 context->show_labels_p.
2316 * diagnostic.h (struct diagnostic_context): Add field
2318 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2319 -fno-diagnostics-show-labels.
2320 * dwarf2out.c (gen_producer_string): Add
2321 OPT_fdiagnostics_show_labels to the ignored options.
2322 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2324 (gcc_rich_location::maybe_add_expr): Likewise.
2325 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2326 label" param, defaulting to NULL.
2327 (gcc_rich_location::add_expr): Add "label" param.
2328 (gcc_rich_location::maybe_add_expr): Likewise.
2329 (class text_range_label): New class.
2330 (class range_label_for_type_mismatch): New class.
2331 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2332 of format_warning_va.
2333 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2334 * lto-wrapper.c (merge_and_complain): Add
2335 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2336 (append_compiler_options): Likewise to the dropped options.
2337 (append_diag_options): Likewise to the passed-on options.
2338 * opts.c (common_handle_option): Handle the new option.
2339 * selftest-diagnostic.c
2340 (test_diagnostic_context::test_diagnostic_context): Enable
2342 * substring-locations.c: Include "gcc-rich-location.h".
2343 (format_warning_n_va): Add "fmt_label" and "param_label" params
2344 and use them as appropriate.
2345 (format_warning_va): Add "fmt_label" and "param_label" params,
2346 passing them on to format_warning_n_va.
2347 (format_warning_at_substring): Likewise.
2348 (format_warning_at_substring_n): Likewise.
2349 * substring-locations.h (format_warning_va): Add "fmt_label" and
2350 "param_label" params.
2351 (format_warning_n_va): Likewise.
2352 (format_warning_at_substring): Likewise.
2353 (format_warning_at_substring_n): Likewise.
2354 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2356 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2359 * builtins.c (expand_builtin_memcmp): Do not expand the call
2360 when overflow is detected.
2362 2018-08-15 Martin Sebor <msebor@redhat.com>
2364 PR tree-optimization/71625
2365 * config/aarch64/aarch64-builtins.c
2366 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2368 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2370 * config/s390/s390.c (s390_reorg): Remove loop.
2372 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2375 (darwin_function_switched_text_sections): Delete.
2376 * gcc/config/darwin.h
2377 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2379 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2382 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2383 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2384 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2386 2018-08-15 Martin Liska <mliska@suse.cz>
2388 PR tree-optimization/86925
2389 * predict.c (expr_expected_value_1): When taking
2390 later predictor, assign also probability.
2391 Use fold_build2_initializer_loc in order to fold
2392 the expression in -frounding-math.
2394 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2396 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2398 (expand_vec_perm_1): Try the new method.
2400 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2403 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2404 Check whether lra_live_max_point is 0 before dividing.
2406 2018-08-14 Martin Sebor <msebor@redhat.com>
2408 PR tree-optimization/86650
2409 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2410 (vrp_prop::check_mem_ref): Same.
2412 2018-08-13 Liu Hao <lh_mouse@126.com>
2414 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2415 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2416 and clear it thereafter, as it only works for DBCS.
2418 2018-08-13 Liu Hao <lh_mouse@126.com>
2420 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2421 handle returned by _get_osf_handle().
2423 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2425 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2426 for folding vec_perm.
2428 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2430 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2431 Add support for gimple-folding of vec_pack() and vec_unpack()
2434 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2436 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2437 vec_xst variants to the list.
2438 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2439 vector loads and stores.
2441 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2443 * config.gcc (rs6000-ibm-aix4.x): Delete.
2444 (rs6000-ibm-aix5.1): Delete.
2445 (rs6000-ibm-aix5.2): Delete.
2446 (rs6000-ibm-aix5.3): Delete.
2447 * config/rs6000/aix43.h: Delete.
2448 * config/rs6000/aix51.h: Delete.
2449 * config/rs6000/aix52.h: Delete.
2450 * config/rs6000/t-aix43: Delete.
2452 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2454 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2456 (s390_decompose_address): Factor out constant pool ref
2459 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2461 * config/nds32/nds32-predicates.c
2462 (nds32_can_use_bclr_p): Change return type as bool.
2463 (nds32_can_use_bset_p): Ditto.
2464 (nds32_can_use_btgl_p): Ditto.
2465 (nds32_can_use_bitci_p): Ditto.
2466 * config/nds32/nds32-protos.h
2467 (nds32_can_use_bclr_p): Change declaration.
2468 (nds32_can_use_bset_p): Ditto.
2469 (nds32_can_use_btgl_p): Ditto.
2470 (nds32_can_use_bitci_p): Ditto.
2472 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2474 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2475 Support -msched-prolog-epilog option.
2476 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2478 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2480 * common/config/nds32/nds32-common.c
2481 (nds32_option_optimization_table): Enalbe -malways-align.
2483 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2485 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2487 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2488 OPT_misr_secure_ case.
2489 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2490 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2491 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2493 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2494 (nds32_isr_info): New field security_level.
2495 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2496 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2497 * config/nds32/nds32.opt (misr-secure): New option.
2498 * config/nds32/nds32_init.inc: New file.
2499 * config/nds32/nds32_isr.h: New file.
2501 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2503 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2504 Update comment for atomic instructions.
2505 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2506 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2508 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2509 load for __ATOMIC_SEQ_CST model.
2510 (atomic_loaddi_1): Remove float register target.
2511 (atomic_storedi): Handle CONST_INT values.
2512 (atomic_storedi_1): Remove float register source. Add special case
2514 (memory_barrier): New expander and insn.
2516 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2518 PR tree-optimization/86835
2519 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2520 new_stmt after def_gsi, make sure to insert new_square_stmt after
2521 that stmt, not 2 stmts before it.
2523 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2526 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2529 2018-08-10 Martin Liska <mliska@suse.cz>
2532 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2534 * builtins.c (expand_builtin_expect_with_probability):
2536 (expand_builtin_expect_with_probability): New function.
2537 (build_builtin_expect_predicate): Add new argumnet probability
2538 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2539 (fold_builtin_expect):
2542 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2543 * builtins.h (fold_builtin_expect): Set new argument.
2544 * doc/extend.texi: Document __builtin_expect_with_probability.
2545 * doc/invoke.texi: Likewise.
2546 * gimple-fold.c (gimple_fold_call): Pass new argument.
2547 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2548 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2549 * predict.c (get_predictor_value): New function.
2550 (expr_expected_value): Add new argument probability. Assume
2551 that predictor and probability are always non-null.
2552 (expr_expected_value_1): Likewise. For __builtin_expect and
2553 __builtin_expect_with_probability set probability. Handle
2554 combination in binary expressions.
2555 (tree_predict_by_opcode): Simplify code by simply calling
2556 get_predictor_value.
2557 (pass_strip_predict_hints::execute): Add handling of
2558 BUILT_IN_EXPECT_WITH_PROBABILITY.
2559 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2561 * tree.h (DECL_BUILT_IN_P): New function.
2563 2018-08-10 Martin Liska <mliska@suse.cz>
2565 PR tree-optimization/85799
2566 * passes.def: Add argument for pass_strip_predict_hints.
2567 * predict.c (class pass_strip_predict_hints): Add new argument
2569 (strip_predictor_early): New function.
2570 (pass_strip_predict_hints::execute): Call the function to
2572 (strip_predict_hints): New function.
2573 * predict.def: Fix comment.
2575 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2577 * Makefile.in: Clarify which tm.texi to copy over to assert the
2578 right to grant a GFDL license for all.
2580 2018-08-09 Jeff Law <law@redhat.com>
2582 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2585 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2587 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2590 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2592 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2593 reductions for variable-length vectors.
2595 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2598 * common.opt (fdiagnostics-show-line-numbers): New option.
2599 * diagnostic-show-locus.c (class layout): Add fields
2600 "m_show_line_numbers_p" and "m_linenum_width";
2601 (num_digits): New function.
2602 (test_num_digits): New function.
2603 (layout::layout): Initialize new fields. Update m_x_offset
2604 logic to handle any left margin.
2605 (layout::print_source_line): Print line number when requested.
2606 (layout::start_annotation_line): New member function.
2607 (layout::print_annotation_line): Call it.
2608 (layout::print_leading_fixits): Likewise.
2609 (layout::print_trailing_fixits): Likewise. Update calls to
2610 move_to_column for new parameter.
2611 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2612 it to potentially call start_annotation_line.
2613 (layout::show_ruler): Call start_annotation_line.
2614 (selftest::test_line_numbers_multiline_range): New selftest.
2615 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2616 and selftest::test_line_numbers_multiline_range.
2617 * diagnostic.c (diagnostic_initialize): Initialize
2618 show_line_numbers_p.
2619 * diagnostic.h (struct diagnostic_context): Add field
2620 "show_line_numbers_p".
2621 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2622 -fno-diagnostics-show-line-numbers.
2623 * dwarf2out.c (gen_producer_string): Add
2624 OPT_fdiagnostics_show_line_numbers to the ignored options.
2625 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2626 one setting" options.
2627 (append_compiler_options): Likewise to the dropped options.
2628 (append_diag_options): Likewise to the passed-on options.
2629 * opts.c (common_handle_option): Handle the new option.
2630 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2632 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2634 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2635 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2636 third argument of type "const signed char" to descriptions of
2637 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2638 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2639 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2640 __builtin_bcdsub_ov functions.
2642 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2644 PR tree-optimization/86858
2645 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2646 flow_bb_inside_loop_p calls.
2648 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2650 PR tree-optimization/86871
2651 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2652 instead of gimple_assign_lhs.
2654 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2657 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2658 register constraint to operand 0.
2659 (add<mode>3_carryinC): Likewise.
2660 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2662 2018-08-09 Martin Liska <mliska@suse.cz>
2665 * common.opt: Remove extra line.
2667 2018-08-09 Martin Liska <mliska@suse.cz>
2669 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2670 at the end of a line, make first letter capital and end up
2671 a sentence with a dot.
2672 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2673 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2674 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2675 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2676 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2677 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2678 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2679 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2680 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2681 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2682 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2683 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2684 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2685 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2686 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2687 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2688 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2689 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2691 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2694 * config/s390/s390.c (s390_option_override_internal): Reduce the
2695 stack-clash-protection-probe-interval param if it would be too big
2698 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2701 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2702 * config/m68k/m68k.c (handle_move_double): Don't call
2703 m68k_final_prescan_insn.
2704 (m68k_adjust_decorated_operand): Renamed from
2705 m68k_final_prescan_insn, remove first and third operand and
2707 (print_operand): Call it.
2708 (print_operand_address): Call it.
2710 2018-08-08 Nathan Sidwell <nathan@acm.org>
2712 * diagnostic.c (diagnostic_report_current_module): Use
2713 linemap_included_from & linemap_included_from_linemap.
2715 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2717 * config/aarch64/aarch64-cores.def: Add phecda core.
2718 * config/aarch64/aarch64-tune.md: Regenerate.
2719 * doc/invoke.texi: Add phecda core.
2721 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2724 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2726 * config/s390/s390.md ("movti"): Add more alternatives for
2727 constant to GPR copies.
2729 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2731 * config/s390/s390.c: Fix whitespace damage throughout the file.
2732 * config/s390/s390.h: Likewise.
2733 * config/s390/tpf.h: Likewise.
2735 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2737 * config/s390/s390.c (s390_loadrelative_operand_p):
2738 Remove TARGET_CPU_ZARCH usages.
2739 (s390_rtx_costs): Likewise.
2740 (s390_legitimate_constant_p): Likewise.
2741 (s390_cannot_force_const_mem): Likewise.
2742 (legitimate_reload_constant_p): Likewise.
2743 (s390_preferred_reload_class): Likewise.
2744 (legitimize_pic_address): Likewise.
2745 (legitimize_tls_address): Likewise.
2746 (s390_split_branches): Removed.
2747 (s390_add_execute): Removed.
2748 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2749 (s390_mainpool_start): Likewise.
2750 (s390_mainpool_finish): Likewise.
2751 (s390_mainpool_cancel): Removed.
2752 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2753 (s390_chunkify_cancel): Likewise.
2754 (s390_return_addr_rtx): Likewise.
2755 (s390_register_info): Remove split_branches_pending_p uages.
2756 (s390_optimize_register_info): Likewise.
2757 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2758 split_branches_pending_p usages.
2759 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2760 (s390_load_got): Likewise.
2761 (s390_expand_split_stack_prologue): Likewise.
2762 (output_asm_nops): Likewise.
2763 (s390_function_profiler): Likewise.
2764 (s390_emit_call): Likewise.
2765 (s390_conditional_register_usage): Likewise.
2766 (s390_optimize_prologue): Likewise.
2767 (s390_reorg): Remove TARGET_CPU_ZARCH and
2768 split_branches_pending_p usages.
2769 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2771 (s390_output_indirect_thunk_function): Likewise.
2772 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2773 (TARGET_CPU_ZARCH_P): Removed.
2774 (struct machine_function): Remove split_branches_pending_p.
2775 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2777 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2779 * common/config/s390/s390-common.c (processor_flags_table):
2781 * config.gcc: Remove with_arch/with_tune support.
2782 * config/s390/2064.md: Remove cpu attribute comparisons.
2783 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2785 * config/s390/linux.h (ASM_SPEC):
2786 Remove -march support.
2787 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2788 Use a table to get an arch level.
2789 * config/s390/s390-opts.h (enum processor_type):
2791 * config/s390/s390.c
2792 (processor_table): Remove entries, add arch_level values.
2793 (s390_issue_rate): Remove cases.
2794 (s390_option_override): Adjust
2795 s390_option_override_internal() call.
2796 (s390_option_override_internal): Remove deprecation warning.
2797 (s390_valid_target_attribute_tree): Adjust
2798 s390_option_override_internal() call.
2799 * config/s390/s390.h (struct s390_processor):
2800 Share with s390-c.c, add arch_level field.
2801 * config/s390/s390.md:
2802 Remove occurrences in cpu attribute.
2803 * config/s390/s390.opt: Remove -march/-mtune support.
2804 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2805 * doc/invoke.texi: Remove deprecation warning.
2807 2018-08-08 Luis Machado <luis.machado@linaro.org>
2809 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2811 (qdf24xx_tunings): Set vector cost structure to
2812 qdf24xx_vector_cost.
2814 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2815 <register_sextend>: Set to 3.
2817 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2820 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2821 * config/aarch64/aarch64-simd.md
2822 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2823 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2824 (aarch64_frecpx<mode>): ...this new pattern.
2825 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2826 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2828 2018-08-07 Martin Liska <mliska@suse.cz>
2831 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2832 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2833 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2834 * doc/extend.texi: Document that malloc attribute adds
2837 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2840 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2841 Define to speculation_safe_value_not_needed.
2843 2018-08-06 Jeff Law <law@redhat.com>
2845 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2846 the vr_values instance to cprop_into_stmt.
2847 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2848 (cprop_operand): Also query EVRP to determine if OP is a constant.
2850 2018-08-06 Nathan Sidwell <nathan@acm.org>
2852 * diagnostic.c (diagnostic_report_current_module): Reroll
2853 included-at loop. Translate text.
2855 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2857 * function-tests.c (selftest::test_expansion_to_rtl): Call
2858 free_after_compilation.
2860 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2862 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2864 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2866 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2867 loops with memory block operations from getting unrolled.
2869 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2872 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2873 Define to speculation_safe_value_not_needed.
2875 2018-08-06 Jeff Law <law@redhat.com>
2877 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2880 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2883 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2884 with all enabled __intN types.
2886 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2888 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2890 * alias.c (record_set): Check for clobber high.
2891 * cfgexpand.c (expand_gimple_stmt): Likewise.
2892 * combine-stack-adj.c (single_set_for_csa): Likewise.
2893 * combine.c (find_single_use_1): Likewise.
2894 (set_nonzero_bits_and_sign_copies): Likewise.
2895 (get_combine_src_dest): Likewise.
2896 (is_parallel_of_n_reg_sets): Likewise.
2897 (try_combine): Likewise.
2898 (record_dead_and_set_regs_1): Likewise.
2899 (reg_dead_at_p_1): Likewise.
2900 (reg_dead_at_p): Likewise.
2901 * dce.c (deletable_insn_p): Likewise.
2902 (mark_nonreg_stores_1): Likewise.
2903 (mark_nonreg_stores_2): Likewise.
2904 * df-scan.c (df_find_hard_reg_defs): Likewise.
2905 (df_uses_record): Likewise.
2906 (df_get_call_refs): Likewise.
2907 * dwarf2out.c (mem_loc_descriptor): Likewise.
2908 * haifa-sched.c (haifa_classify_rtx): Likewise.
2909 * ira-build.c (create_insn_allocnos): Likewise.
2910 * ira-costs.c (scan_one_insn): Likewise.
2911 * ira.c (equiv_init_movable_p): Likewise.
2912 (rtx_moveable_p): Likewise.
2913 (interesting_dest_for_shprep): Likewise.
2914 * jump.c (mark_jump_label_1): Likewise.
2915 * postreload-gcse.c (record_opr_changes): Likewise.
2916 * postreload.c (reload_cse_simplify): Likewise.
2917 (struct reg_use): Add source expr.
2918 (reload_combine): Check for clobber high.
2919 (reload_combine_note_use): Likewise.
2920 (reload_cse_move2add): Likewise.
2921 (move2add_note_store): Likewise.
2922 * print-rtl.c (print_pattern): Likewise.
2923 * recog.c (decode_asm_operands): Likewise.
2924 (store_data_bypass_p): Likewise.
2925 (if_test_bypass_p): Likewise.
2926 * regcprop.c (kill_clobbered_value): Likewise.
2927 (kill_set_value): Likewise.
2928 * reginfo.c (reg_scan_mark_refs): Likewise.
2929 * reload1.c (maybe_fix_stack_asms): Likewise.
2930 (eliminate_regs_1): Likewise.
2931 (elimination_effects): Likewise.
2932 (mark_not_eliminable): Likewise.
2933 (scan_paradoxical_subregs): Likewise.
2934 (forget_old_reloads_1): Likewise.
2935 * reorg.c (find_end_label): Likewise.
2936 (try_merge_delay_insns): Likewise.
2937 (redundant_insn): Likewise.
2938 (own_thread_p): Likewise.
2939 (fill_simple_delay_slots): Likewise.
2940 (fill_slots_from_thread): Likewise.
2941 (dbr_schedule): Likewise.
2942 * resource.c (update_live_status): Likewise.
2943 (mark_referenced_resources): Likewise.
2944 (mark_set_resources): Likewise.
2945 * rtl.c (copy_rtx): Likewise.
2946 * rtlanal.c (reg_referenced_p): Likewise.
2947 (single_set_2): Likewise.
2948 (noop_move_p): Likewise.
2949 (note_stores): Likewise.
2950 * sched-deps.c (sched_analyze_reg): Likewise.
2951 (sched_analyze_insn): Likewise.
2953 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2955 * cse.c (invalidate_reg): New function extracted from...
2956 (invalidate): ...here.
2957 (canonicalize_insn): Check for clobber high.
2958 (invalidate_from_clobbers): invalidate clobber highs.
2959 (invalidate_from_sets_and_clobbers): Likewise.
2960 (count_reg_usage): Check for clobber high.
2961 (insn_live_p): Likewise.
2962 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2963 (cselib_invalidate_regno): Check for clobber in setter.
2964 (cselib_invalidate_rtx): Pass through setter.
2965 (cselib_invalidate_rtx_note_stores):
2966 (cselib_process_insn): Check for clobber high.
2967 * cselib.h (cselib_invalidate_rtx): Add operand.
2969 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2971 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2972 (mark_not_eliminable): Likewise.
2973 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2974 * lra-lives.c (process_bb_lives): Check for clobber high.
2975 * lra.c (new_insn_reg): Remember clobber highs.
2976 (collect_non_operand_hard_regs): Check for clobber high.
2977 (lra_set_insn_recog_data): Likewise.
2978 (add_regs_to_insn_regno_info): Likewise.
2979 (lra_update_insn_regno_info): Likewise.
2981 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2983 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2984 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2986 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2988 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2989 (copy_insn_1): Likewise.
2990 (gen_hard_reg_clobber_high): New gen function.
2991 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2992 * genemit.c (gen_exp): Likewise.
2993 (gen_emit_seq): Pass through info.
2994 (gen_insn): Check for CLOBBER_HIGH.
2995 (gen_expand): Pass through info.
2996 (gen_split): Likewise.
2997 (output_add_clobbers): Likewise.
2998 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2999 (remove_clobbers): Likewise.
3000 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3002 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3004 * doc/rtl.texi (clobber_high): Add.
3005 (parallel): Add in clobber high
3006 * rtl.c (rtl_check_failed_code3): Add function.
3007 * rtl.def (CLOBBER_HIGH): Add expression.
3008 * rtl.h (RTL_CHECKC3): Add macro.
3009 (rtl_check_failed_code3): Add declaration.
3010 (XC3EXP): Add macro.
3012 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3015 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3016 cfun->machine->max_used_stack_alignment if needed.
3018 2018-08-04 Martin Sebor <msebor@redhat.com>
3020 PR tree-optimization/86571
3021 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3024 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3027 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3030 2018-08-03 Jeff Law <law@redhat.com>
3033 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3034 Define to speculation_safe_value_not_needed.
3036 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3038 * doc/gcov.texi (-x): Remove duplicate "to".
3039 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3040 (-Wif-not-aligned): Remove duplicate "is".
3041 (-flto): Remove duplicate "the".
3042 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3043 duplicate "v5.00.b".
3044 (MSP430 Options): Remove duplicate "and" from the description
3045 of "-mgprel-sec=regexp".
3046 (x86 Options): Remove duplicate copies of "vmldLog102" and
3047 vmlsLog104 from description of "-mveclibabi=type".
3049 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3051 * internal-fn.h (first_commutative_argument): Declare.
3052 * internal-fn.c (first_commutative_argument): New function.
3053 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3054 restrictions for pattern statements. Use first_commutative_argument
3055 to look for commutative operands in calls to internal functions.
3057 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3059 * Makefile.in (wide-int-range.o): New.
3060 * tree-vrp.c: Move all the wide_int_* functions to...
3061 * wide-int-range.cc: ...here.
3062 * tree-vrp.h: Move all the wide_int_* prototypes to...
3063 * wide-int-range.h: ...here.
3065 2018-08-03 Tom de Vries <tdevries@suse.de>
3067 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3069 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3070 * except.c (output_function_exception_table): Do early exit if
3071 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3073 2018-08-03 Martin Liska <mliska@suse.cz>
3075 * predict.c (dump_prediction): Change to 2 digits
3078 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3080 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3082 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3084 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3086 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3087 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3088 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3089 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3090 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3092 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3094 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3095 pp_take_prefix when saving the existing prefix.
3096 * diagnostic.c (diagnostic_append_note): Likewise.
3097 * langhooks.c (lhd_print_error_function): Likewise.
3098 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3099 param's type. Free the existing prefix.
3100 (pp_take_prefix): New function.
3101 (pretty_printer::pretty_printer): Drop the prefix parameter.
3102 Rename the length parameter to match the comment.
3103 (pretty_printer::~pretty_printer): Free the prefix.
3104 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3106 (struct pretty_printer): Drop the "const" from "prefix" field's
3107 type and clarify memory management.
3108 (pp_set_prefix): Drop the "const" from the 2nd param.
3109 (pp_take_prefix): New decl.
3111 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3113 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3114 for word_mode_ok here instead of passing as argument.
3115 (expand_block_compare): Change select_block_compare_mode() call.
3116 (expand_strncmp_gpr_sequence): New function.
3117 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3119 2018-08-02 Jeff Law <law@redhat.com>
3122 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3123 Define to speculation_safe_value_not_needed.
3126 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3127 Define to speculation_safe_value_not_needed.
3129 2018-08-02 Tom de Vries <tdevries@suse.de>
3132 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3133 function. Return UI_TARGET unconditionally.
3134 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3135 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3137 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3139 * genemit.c (print_overload_test): Fix typo.
3141 2018-08-02 Richard Biener <rguenther@suse.de>
3143 PR tree-optimization/86816
3144 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3145 which checks for value availability before querying it.
3146 (gvn_uses_equal): Use it.
3147 (same_succ_hash): Likewise.
3148 (gimple_equal_p): Likewise.
3150 2018-08-02 Nick Clifton <nickc@redhat.com>
3153 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3154 Define to speculation_safe_value_not_needed.
3157 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3158 Define to speculation_safe_value_not_needed.
3161 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3162 Define to speculation_safe_value_not_needed.
3165 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3166 Define to speculation_safe_value_not_needed.
3169 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3170 Define to speculation_safe_value_not_needed.
3173 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3174 Define to speculation_safe_value_not_needed.
3177 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3178 Define to speculation_safe_value_not_needed.
3181 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3182 Define to speculation_safe_value_not_needed.
3185 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3186 speculation_safe_value_not_needed.
3189 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3190 to speculation_safe_value_not_needed.
3192 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3194 * doc/md.texi: Expand the documentation of instruction names
3195 to mention port-local uses. Document '@' in pattern names.
3196 * read-md.h (overloaded_instance, overloaded_name): New structs.
3198 (md_reader::handle_overloaded_name): New member function.
3199 (md_reader::get_overloads): Likewise.
3200 (md_reader::m_first_overload): New member variable.
3201 (md_reader::m_next_overload_ptr): Likewise.
3202 (md_reader::m_overloads_htab): Likewise.
3203 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3204 m_next_overload_ptr and m_overloads_htab.
3205 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3206 (get_mode_token, get_code_token, get_int_token): New functions.
3207 (map_attr_string): Add an optional argument that passes back
3208 the associated iterator.
3209 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3210 (md_reader::handle_overloaded_name, add_overload_instance): New
3212 (apply_iterators): Handle '@' names. Report an error if '@'
3213 is used without iterators.
3214 (initialize_iterators): Initialize the new iterator_group fields.
3215 * genopinit.c (handle_overloaded_code_for)
3216 (handle_overloaded_gen): New functions.
3217 (main): Use them to print declarations of maybe_code_for_* and
3218 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3219 * genemit.c (print_overload_arguments, print_overload_test)
3220 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3221 (main): Use it to print definitions of maybe_code_for_* and
3222 maybe_gen_* functions.
3223 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3224 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3225 instead of explicit mode checks.
3226 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3227 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3228 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3229 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3230 (aarch64_expand_compare_and_swap): Likewise
3231 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3232 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3233 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3234 (aarch64_constant_pool_reload_icode): Delete.
3235 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3236 instead of aarch64_constant_pool_reload_icode. Use
3237 code_for_aarch64_reload_mov instead of explicit mode checks.
3238 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3239 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3240 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3241 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3242 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3243 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3244 (aarch64_atomic_load_op_code): Delete.
3245 (aarch64_emit_atomic_load_op): Likewise.
3246 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3247 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3248 instead of aarch64_emit_atomic_load_op.
3249 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3250 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3251 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3252 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3253 character before the pattern name.
3254 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3255 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3256 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3257 (aarch64_frecps<mode>): Likewise.
3258 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3259 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3260 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3261 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3262 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3264 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3266 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3267 Allow HFmode constants if TARGET_FP_F16INST.
3269 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3272 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3273 No longer check last store for clobber of address register.
3275 2018-08-02 Martin Liska <mliska@suse.cz>
3277 PR gcov-profile/86817
3278 * gcov.c (process_all_functions): New function.
3280 (process_file): Move functions processing to
3281 process_all_functions.
3283 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3285 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3286 "const" to the "gimple *" and "rtx_insn *" parameters.
3287 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3289 (dump_location_t::dump_location_t): Likewise.
3291 2018-08-01 Martin Sebor <msebor@redhat.com>
3293 PR tree-optimization/86650
3294 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3295 rather than a "gcall *". Directly pass the data of interest
3296 to percent_K_format, rather than building a temporary CALL_EXPR
3298 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3299 (gimple_fold_builtin_strncat): Adjust.
3300 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3301 gcall* argument with gimple*.
3302 * gimple-ssa-warn-restrict.c (check_call): Same.
3303 (wrestrict_dom_walker::before_dom_children): Same.
3304 (builtin_access::builtin_access): Same.
3305 (check_bounds_or_overlap): Same
3306 (maybe_diag_overlap): Same.
3307 (maybe_diag_offset_bounds): Same.
3308 * tree-diagnostic.c (default_tree_printer): Move usage of
3309 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3311 * tree-pretty-print.c (percent_K_format): Add argument.
3312 * tree-pretty-print.h: Add argument.
3313 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3314 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3315 (maybe_diag_stxncpy_trunc): Same.
3316 (handle_builtin_stxncpy): Same.
3317 (handle_builtin_strcat): Same.
3319 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3321 * match.pd: Optimise pointer range checks.
3323 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3325 PR tree-optimization/86758
3326 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3327 to remove pattern statements.
3329 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3331 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3332 result of dfs_enumerate_from when constructing stmt_vec_infos,
3333 instead of additionally calling get_loop_body.
3335 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3337 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3339 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3340 When creating an iv, assert that the step is not known to be zero.
3341 (vect_setup_realignment): Update call accordingly.
3342 * tree-vect-stmts.c (vectorizable_store): Likewise.
3343 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3345 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3347 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3348 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3349 (vectorizable_reduction): Likewise.
3350 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3351 (vect_detect_hybrid_slp_stmts): Likewise.
3352 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3354 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3356 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3357 (wide_int_set_zero_nonzero_bits): ...this.
3358 (zero_nonzero_bits_from_vr): Rename to...
3359 (vrp_set_zero_nonzero_bits): ...this.
3360 (extract_range_from_multiplicative_op_1): Abstract wide int
3362 (wide_int_range_multiplicative_op): ...here.
3363 (extract_range_from_binary_expr_1): Extract wide int binary
3364 operations into their own functions.
3365 (wide_int_range_lshift): New.
3366 (wide_int_range_can_optimize_bit_op): New.
3367 (wide_int_range_shift_undefined_p): New.
3368 (wide_int_range_bit_xor): New.
3369 (wide_int_range_bit_ior): New.
3370 (wide_int_range_bit_and): New.
3371 (wide_int_range_trunc_mod): New.
3372 (extract_range_into_wide_ints): New.
3373 (vrp_shift_undefined_p): New.
3374 (extract_range_from_multiplicative_op): New.
3375 (vrp_can_optimize_bit_op): New.
3376 * tree-vrp.h (value_range::dump): New.
3377 (wide_int_range_multiplicative_op): New.
3378 (wide_int_range_lshift):New.
3379 (wide_int_range_shift_undefined_p): New.
3380 (wide_int_range_bit_xor): New.
3381 (wide_int_range_bit_ior): New.
3382 (wide_int_range_bit_and): New.
3383 (wide_int_range_trunc_mod): New.
3384 (zero_nonzero_bits_from_bounds): Rename to...
3385 (wide_int_set_zero_nonzero_bits): ...this.
3386 (zero_nonzero_bits_from_vr): Rename to...
3387 (vrp_set_zero_nonzero_bits): ...this.
3388 (range_easy_mask_min_max): Rename to...
3389 (wide_int_range_can_optimize_bit_op): this.
3390 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3391 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3393 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3395 * tree-vectorizer.h (vect_orig_stmt): New function.
3396 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3397 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3398 (vect_create_epilog_for_reduction): Likewise.
3399 (vectorizable_live_operation): Likewise.
3400 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3401 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3402 * tree-vect-stmts.c (vectorizable_call): Likewise.
3403 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3405 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3407 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3409 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3410 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3411 (vect_transform_loop): Likewise.
3412 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3414 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3416 * tree-vectorizer.h (vect_schedule_slp): Return void.
3417 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3418 (vect_schedule_slp): Likewise.
3420 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3422 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3424 (vect_transform_loop): Update calls accordingly. Schedule SLP
3425 instances before the main loop, if any exist.
3427 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3429 PR tree-optimization/86749
3430 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3431 If the lhs is used in a COND_EXPR, check that it is being used
3432 as the "then" or "else" value.
3434 2018-08-01 Tom de Vries <tdevries@suse.de>
3437 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3438 speculation_safe_value_not_needed.
3440 2018-08-01 Richard Biener <rguenther@suse.de>
3442 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3445 2018-08-01 Martin Liska <mliska@suse.cz>
3447 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3448 format how successful transformation is dumped.
3449 (gimple_mod_pow2_value_transform): Likewise.
3450 (gimple_mod_subtract_transform): Likewise.
3451 (gimple_stringops_transform): Likewise.
3453 2018-08-01 Martin Liska <mliska@suse.cz>
3456 * value-prof.c (interesting_stringop_to_profile_p):
3457 Simplify the code and add BUILT_IN_MEMMOVE.
3458 (gimple_stringops_transform): Likewise.
3460 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3462 * config/aarch64/aarch64-simd.md
3463 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3464 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3465 use GPI iterator instead of SI mode.
3467 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3469 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3470 rs6000_speculation_barrier.
3471 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3472 new barrier pattern name.
3474 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3476 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3477 (speculation_barrier): New insn.
3479 2018-08-01 Richard Biener <rguenther@suse.de>
3482 * graphite.h: Include isl/id.h and isl/space.h to allow build
3485 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3488 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3489 mode for COFF targets.
3490 * defaults.h (TARGET_COFF): Define.
3491 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3492 TARGET_COFF): Define.
3493 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3494 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3495 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3497 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3499 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3500 * gimple-streamer-out.c (output_bb): Save it.
3501 * lto-streamer-in.c (input_struct_function_base): Restore
3502 instance discriminator if available. Create map on demand.
3503 * lto-streamer-out.c (output_struct_function_base): Save it if
3505 * final.c (decl_to_instance_map): Document LTO strategy.
3507 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3508 Olivier Hainque <hainque@adacore.com>
3510 * debug.h (decl_to_instance_map_t): New type.
3511 (decl_to_instance_map): Declare.
3512 (maybe_create_decl_to_instance_map): New inline function.
3513 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3514 to track basic block discriminators.
3515 (final_start_function_1): Initialize them.
3516 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3518 (decl_to_instance_map): New variable.
3519 (map_decl_to_instance, maybe_set_discriminator): New functions.
3520 (notice_source_line): Set discriminator.
3522 2018-07-31 Ian Lance Taylor <iant@golang.org>
3524 * targhooks.c (default_have_speculation_safe_value): Add
3527 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3529 * dump-context.h: Include "pretty-print.h".
3530 (dump_context::refresh_dumps_are_enabled): New decl.
3531 (dump_context::emit_item): New decl.
3532 (class dump_context): Add fields "m_test_pp" and
3534 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3535 (temp_dump_context::get_dumped_text): New decl.
3536 (class temp_dump_context): Add field "m_pp".
3537 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3538 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3540 (set_dump_file): Update for above change.
3541 (set_alt_dump_file): Likewise.
3542 (dump_loc): New overload, taking a pretty_printer *.
3543 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3544 to any test pretty-printer.
3545 (make_item_for_dump_gimple_stmt): New function, adapted from
3546 optinfo::add_gimple_stmt.
3547 (dump_context::dump_gimple_stmt): Call it, and use the result,
3548 eliminating the direct usage of dump_file and alt_dump_file in
3549 favor of indirectly using them via emit_item.
3550 (make_item_for_dump_gimple_expr): New function, adapted from
3551 optinfo::add_gimple_expr.
3552 (dump_context::dump_gimple_expr): Call it, and use the result,
3553 eliminating the direct usage of dump_file and alt_dump_file in
3554 favor of indirectly using them via emit_item.
3555 (make_item_for_dump_generic_expr): New function, adapted from
3557 (dump_context::dump_generic_expr): Call it, and use the result,
3558 eliminating the direct usage of dump_file and alt_dump_file in
3559 favor of indirectly using them via emit_item.
3560 (make_item_for_dump_printf_va): New function, adapted from
3561 optinfo::add_printf_va.
3562 (make_item_for_dump_printf): New function.
3563 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3564 and use the result, eliminating the direct usage of dump_file and
3565 alt_dump_file in favor of indirectly using them via emit_item.
3566 (make_item_for_dump_dec): New function.
3567 (dump_context::dump_dec): Call it, and use the result,
3568 eliminating the direct usage of dump_file and alt_dump_file in
3569 favor of indirectly using them via emit_item.
3570 (make_item_for_dump_symtab_node): New function, adapted from
3571 optinfo::add_symtab_node.
3572 (dump_context::dump_symtab_node): Call it, and use the result,
3573 eliminating the direct usage of dump_file and alt_dump_file in
3574 favor of indirectly using them via emit_item.
3575 (dump_context::begin_scope): Reimplement, avoiding direct usage
3576 of dump_file and alt_dump_file in favor of indirectly using them
3578 (dump_context::emit_item): New member function.
3579 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3580 Set up test pretty-printer on the underlying context. Call
3581 refresh_dumps_are_enabled.
3582 (temp_dump_context::~temp_dump_context): Call
3583 refresh_dumps_are_enabled.
3584 (temp_dump_context::get_dumped_text): New member function.
3585 (selftest::verify_dumped_text): New function.
3586 (ASSERT_DUMPED_TEXT_EQ): New macro.
3587 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3588 and then without optinfo enabled. Add uses of
3589 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3590 * dumpfile.h: Update comment for the dump_* API.
3591 * optinfo-emit-json.cc
3592 (selftest::test_building_json_from_dump_calls): Update for new
3593 param for temp_dump_context ctor.
3594 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3595 and "m_owned" field.
3596 (optinfo_item::~optinfo_item): Likewise.
3597 (optinfo::add_item): New member function.
3598 (optinfo::emit): Update comment.
3599 (optinfo::add_string): Delete.
3600 (optinfo::add_printf): Delete.
3601 (optinfo::add_printf_va): Delete.
3602 (optinfo::add_gimple_stmt): Delete.
3603 (optinfo::add_gimple_expr): Delete.
3604 (optinfo::add_tree): Delete.
3605 (optinfo::add_symtab_node): Delete.
3606 (optinfo::add_dec): Delete.
3607 * optinfo.h (class dump_context): New forward decl.
3608 (optinfo::add_item): New decl.
3609 (optinfo::add_string): Delete.
3610 (optinfo::add_printf): Delete.
3611 (optinfo::add_printf_va): Delete.
3612 (optinfo::add_gimple_stmt): Delete.
3613 (optinfo::add_gimple_expr): Delete.
3614 (optinfo::add_tree): Delete.
3615 (optinfo::add_symtab_node): Delete.
3616 (optinfo::add_dec): Delete.
3617 (optinfo::add_poly_int): Delete.
3618 (optinfo_item::optinfo_item): Remove "owned" param.
3619 (class optinfo_item): Remove field "m_owned".
3621 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3624 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3625 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3626 requested variable alignment.
3627 (expand_one_ssa_partition): Likewise.
3628 (expand_one_var): Likewise.
3630 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3632 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3633 to speculation_safe_value_not_needed.
3635 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3637 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3638 * targhooks.c (speculation_safe_value_not_needed): New function.
3639 * target.def (have_speculation_safe_value): Update documentation.
3640 * doc/tm.texi: Regenerated.
3642 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3644 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3645 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3647 (despeculate_copy<ALLI:mode>_insn): New insn.
3648 (despeculate_copyti_insn): New insn.
3649 (despeculate_simple<ALLI:mode>): New insn
3650 (despeculate_simpleti): New insn.
3651 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3653 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3654 aarch64_speculation_safe_value.
3655 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3657 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3659 * config/aarch64/aarch64-speculation.cc: New file.
3660 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3661 before pass_reorder_blocks.
3662 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3664 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3665 X14 and X15 when tracking speculation.
3666 * config/aarch64/aarch64.md (register name constants): Add
3667 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3668 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3669 (speculation_barrier): New insn attribute.
3670 (cmp<mode>): Allow SP in comparisons.
3671 (speculation_tracker): New insn.
3672 (speculation_barrier): Add speculation_barrier attribute.
3673 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3674 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3675 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3677 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3679 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3680 aarch64_track_speculation is true.
3681 (tb<optab><mode>1): Likewise.
3682 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3683 generate CB[N]Z when tracking speculation.
3684 (aarch64_split_compare_and_swap): Likewise.
3685 (aarch64_split_atomic_op): Likewise.
3687 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3689 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3691 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3693 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3694 (speculation_barrier): New insn.
3696 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3698 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3699 * config/arm/arm.md (speculation_barrier): New expand.
3700 (speculation_barrier_insn): New pattern.
3702 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3704 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3705 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3706 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3707 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3709 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3710 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3711 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3712 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3713 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3714 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3715 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3716 * builtins.c (expand_speculation_safe_value): New function.
3717 (expand_builtin): Call it.
3718 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3719 * doc/extend.texi: Document __builtin_speculation_safe_value.
3720 * doc/md.texi: Document "speculation_barrier" pattern.
3721 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3722 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3723 * doc/tm.texi: Regenerated.
3724 * target.def (have_speculation_safe_value, speculation_safe_value): New
3726 * targhooks.c (default_have_speculation_safe_value): New function.
3727 (default_speculation_safe_value): New function.
3728 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3729 (default_speculation_safe_value): Add prototype.
3731 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3733 * dump-context.h (dump_context::dump_loc): New decl.
3734 * dumpfile.c (dump_context::dump_loc): New member function.
3735 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3736 and dump_gimple_stmt.
3737 (dump_context::dump_gimple_expr_loc): Likewise, using
3739 (dump_context::dump_generic_expr_loc): Likewise, using
3741 (dump_context::dump_printf_loc_va): Likewise, using
3743 (dump_context::begin_scope): Explicitly using the global function
3744 "dump_loc", rather than the member function.
3746 2018-07-31 Martin Sebor <msebor@redhat.com>
3748 PR tree-optimization/86741
3749 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3751 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3753 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3754 depend on whether prefetch instructions will be emitted or not.
3755 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3756 will be emitted or not.
3757 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3758 (TARGET_SETMEM_PFD): New macros.
3760 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3762 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3763 (NULL_STMT_VEC_INFO): Delete.
3764 (stmt_vec_info::operator*): Likewise.
3765 (stmt_vec_info::operator gimple *): Likewise.
3766 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3767 of NULL_STMT_VEC_INFO.
3768 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3769 (vect_reassociating_reduction_p): Likewise.
3770 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3771 (vectorizable_store): Likewise.
3772 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3773 (vec_info::free_stmt_vec_infos): Likewise.
3775 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3777 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3778 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3782 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3783 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3784 (vec_info::free_stmt_vec_info): New private member functions.
3785 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3786 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3787 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3788 set_stmt_vec_info_vec and free_stmt_vec_infos.
3789 * tree-vect-loop.c (_loop_vec_info): Remove call to
3790 set_stmt_vec_info_vec.
3791 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3792 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3793 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3794 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3795 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3796 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3797 with the clearing in the xcalloc.
3798 (stmt_vec_info_vec): Delete.
3799 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3800 (vectorize_loops): Likewise.
3801 (vec_info::~vec_info): Remove argument from call to
3802 free_stmt_vec_infos.
3803 (vec_info::add_stmt): Remove vinfo argument from call to
3806 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3808 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3809 rather than a gimple stmt.
3810 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3811 information for pattern statements when passed the original
3812 statement; instead wait to be passed the pattern statement itself.
3813 Don't call set_vinfo_for_stmt here.
3814 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3815 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3816 stmt_vec_infos here.
3817 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3818 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3819 stmt_vec_infos entry.
3821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3823 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3824 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3825 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3826 * tree-vect-stmts.c (vectorizable_call): Likewise.
3827 (vectorizable_simd_clone_call): Likewise.
3829 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3831 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3832 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3833 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3834 * tree-vect-loop.c (vect_transform_loop): Likewise.
3835 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3836 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3840 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3841 (vect_dr_stmt): Delete.
3842 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3843 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3845 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3846 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3847 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3848 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3849 (vect_analyze_data_refs): Likewise.
3850 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3852 (vect_find_same_alignment_drs): Likewise.
3853 (vect_slp_analyze_node_dependences): Update calls accordingly.
3854 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3855 instead of DR_VECT_AUX.
3856 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3857 of a vector data references. Use vec_info::lookup_dr instead of
3859 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3860 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3861 instead of DR_VECT_AUX.
3863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3865 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3867 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3869 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3870 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3871 (vect_gen_prolog_loop_niters): Likewise.
3873 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3875 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3876 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3877 (vect_known_alignment_in_bytes, vect_dr_behavior)
3878 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3879 instead of data_references. Update calls to other routines for
3880 which the same change has been made.
3881 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3882 dr_vec_infos instead of stmt_vec_infos.
3883 (vect_analyze_data_ref_dependence): Update call accordingly.
3884 (vect_slp_analyze_data_ref_dependence)
3885 (vect_record_base_alignments): Use DR_VECT_AUX.
3886 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3887 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3888 (vector_alignment_reachable_p, vect_get_data_access_cost)
3889 (vect_peeling_supportable, vect_analyze_group_access_1)
3890 (vect_analyze_group_access, vect_analyze_data_ref_access)
3891 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3892 (vect_compile_time_alias, vect_small_gap_p)
3893 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3894 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3895 instead of data_references. Update calls to other routines for
3896 which the same change has been made.
3897 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3898 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3899 (vect_slp_analyze_and_verify_node_alignment)
3900 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3901 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3902 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3904 (_vect_peel_info::dr): Replace with...
3905 (_vect_peel_info::dr_info): ...this new field.
3906 (vect_peeling_hash_get_most_frequent)
3907 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3908 (vect_peeling_hash_get_lowest_cost):
3909 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3910 routines for which the same change has been made.
3911 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3913 * tree-vect-loop-manip.c (get_misalign_in_elems)
3914 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3916 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3917 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3918 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3919 (get_group_load_store_type, get_negative_load_store_type)
3920 (vect_get_data_ptr_increment, vectorizable_store)
3921 (vectorizable_load): Likewise.
3922 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3923 Update calls to other routines for which the same change has been made.
3925 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3927 * tree-vectorizer.h (vec_info::move_dr): New member function.
3928 (dataref_aux): Rename to...
3929 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3930 (_stmt_vec_info::dr_aux): Update accordingly.
3931 (_stmt_vec_info::data_ref_info): Delete.
3932 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3933 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3934 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3935 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3937 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3938 (STMT_VINFO_DR_INFO): New macro.
3939 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3940 (set_dr_misalignment): Update after rename of dataref_aux.
3941 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3942 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3943 initialization of STMT_VINFO_DATA_REF.
3944 * tree-vectorizer.c (vec_info::move_dr): New function.
3945 * tree-vect-patterns.c (vect_recog_bool_pattern)
3946 (vect_recog_mask_conversion_pattern)
3947 (vect_recog_gather_scatter_pattern): Use it.
3948 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3949 the "dr" and "stmt" fields of dr_vec_info instead of
3950 STMT_VINFO_DATA_REF.
3952 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3954 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3955 (is_pattern_stmt_p): Use it.
3956 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3957 on pattern statements.
3959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3961 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3962 original stmt as a stmt_vec_info rather than a gimple stmt.
3963 (vect_pattern_recog_1): Take the statement directly as a
3964 stmt_vec_info, rather than via a gimple_stmt_iterator.
3965 Update call to vect_mark_pattern_stmts.
3966 (vect_pattern_recog): Update calls accordingly.
3968 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3970 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3971 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3972 a vect_def_type for the first argument.
3973 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3974 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3975 operand if it isn't defined by a vectorized statement.
3976 (vect_build_gather_load_calls): Remove the mask_dt argument and
3977 update calls to vect_get_vec_def_for_stmt_copy.
3978 (vectorizable_bswap): Likewise the dt argument.
3979 (vectorizable_call): Update calls to vectorizable_bswap and
3980 vect_get_vec_def_for_stmt_copy.
3981 (vectorizable_simd_clone_call, vectorizable_assignment)
3982 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3983 (vectorizable_comparison): Update calls to
3984 vect_get_vec_def_for_stmt_copy.
3985 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3987 (vect_get_loop_based_defs): Remove dt argument and update call
3988 to vect_get_vec_def_for_stmt_copy.
3989 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3990 and vect_get_vec_def_for_stmt_copy.
3991 (vectorizable_load): Update calls to vect_build_gather_load_calls
3992 and vect_get_vec_def_for_stmt_copy.
3993 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3994 (vectorizable_reduction, vectorizable_live_operation): Update calls
3995 to vect_get_vec_def_for_stmt_copy.
3997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3999 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4000 and gimple stmt arguments with a stmt_vec_info.
4001 (vect_record_base_alignments): Update calls accordingly.
4002 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4003 and gimple stmt arguments with a stmt_vec_info.
4004 (vect_build_slp_tree_1): Remove vinfo argument and update call
4005 to vect_record_max_nunits.
4006 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4007 and vect_record_max_nunits.
4009 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4011 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4012 file and take a stmt_vec_info instead of a gimple stmt.
4013 (supportable_widening_operation, vect_finish_replace_stmt)
4014 (vect_finish_stmt_generation, vect_get_store_rhs)
4015 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4016 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4017 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4018 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4019 (vect_create_data_ref_ptr, bump_vector_ptr)
4020 (vect_permute_store_chain, vect_setup_realignment)
4021 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4022 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4023 (vectorizable_reduction, vectorizable_induction)
4024 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4025 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4026 than gimple stmts as arguments.
4027 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4028 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4029 (can_group_stmts_p, vect_check_gather_scatter)
4030 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4031 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4032 (vect_permute_load_chain, vect_shift_permute_load_chain)
4033 (vect_transform_grouped_load)
4034 (vect_record_grouped_load_vectors): Likewise.
4035 * tree-vect-loop.c (vect_fixup_reduc_chain)
4036 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4037 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4038 (vectorizable_reduction, vectorizable_induction)
4039 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4040 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4041 (vect_get_load_store_mask): Likewise.
4042 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4043 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4044 * tree-vect-stmts.c (vect_mark_relevant)
4045 (is_simple_and_all_uses_invariant)
4046 (exist_non_indexing_operands_for_use_p, process_use)
4047 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4048 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4049 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4050 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4051 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4052 (get_negative_load_store_type, get_load_store_type)
4053 (vect_check_load_store_mask, vect_check_store_rhs)
4054 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4055 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4056 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4057 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4058 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4059 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4060 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4061 (supportable_widening_operation): Likewise.
4063 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4065 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4066 a stmt_vec_info instead of a gcall.
4067 (vect_check_gather_scatter): Update call accordingly.
4068 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4070 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4071 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4072 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4073 instead of a gimple stmt.
4074 (vect_transform_loop): Update calls accordingly.
4075 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4076 stmt_vec_infos instead of gimple stmts.
4077 (vect_analyze_slp_instance): Update use accordingly.
4078 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4079 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4080 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4081 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4082 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4083 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4084 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4085 down to subroutines.
4087 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4089 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4090 of the worklist from a vector of gimple stmts to a vector of
4092 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4093 (vect_mark_stmts_to_be_vectorized): Likewise
4095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4097 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4098 statement before passing it to vect_analyze_stmt.
4099 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4100 the chain of phi vector definitions. Track the exit phi via its
4102 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4103 STMT_VINFO_REDUC_DEF.
4104 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4105 stmt_vec_infos to handle the statement chains.
4106 (vect_get_slp_defs): Record the first statement in the node
4107 using a stmt_vec_info.
4108 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4109 statements here and pass their stmt_vec_info down to subroutines.
4110 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4111 down to vect_finish_stmt_generation.
4112 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4113 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4114 stmt_vec_infos to subroutines.
4115 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4120 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4121 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4122 (vect_permute_store_chain, vect_setup_realignment)
4123 (vect_permute_load_chain, vect_shift_permute_load_chain)
4124 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4125 stmts internally, and when passing values to other vectorizer routines.
4126 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4127 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4128 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4129 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4130 (vectorizable_reduction, vectorizable_induction)
4131 (vectorizable_live_operation, vect_transform_loop_stmt)
4132 (vect_transform_loop): Likewise.
4133 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4134 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4135 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4136 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4137 (vect_slp_analyze_node_operations_1): Likewise.
4138 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4139 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4140 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4141 (vect_finish_stmt_generation_1, get_group_load_store_type)
4142 (get_load_store_type, vect_build_gather_load_calls)
4143 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4144 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4145 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4146 (vectorizable_store, vectorizable_load, vectorizable_condition)
4147 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4148 (supportable_widening_operation): Likewise.
4149 (vect_get_vector_types_for_stmt): Likewise.
4150 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4154 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4155 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4156 (vect_permute_store_chain, vect_permute_load_chain)
4157 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4158 repeated stmt_vec_info lookups.
4159 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4160 (vect_update_ivs_after_vectorizer): Likewise.
4161 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4162 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4163 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4164 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4165 (vect_bb_slp_scalar_cost): Likewise.
4166 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4168 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4170 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4171 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4172 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4173 to get gassigns and gcalls, rather than operating on generc gimple
4175 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4176 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4177 (vectorizable_load, vect_analyze_stmt): Likewise.
4178 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4180 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4182 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4183 return stmt_vec_infos rather than gimple stmts. Do not accept
4185 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4187 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4188 Update use of get_later_stmt.
4189 (vect_get_constant_vectors): Update call accordingly.
4190 (vect_schedule_slp_instance): Likewise
4191 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4192 (vect_slp_analyze_instance_dependence): Likewise.
4193 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4197 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4198 (stmt_info_for_cost::stmt_info): ...this new field.
4199 (add_stmt_costs): Update accordingly.
4200 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4201 (vect_get_known_peeling_cost): Likewise.
4202 (vect_estimate_min_profitable_iters): Likewise.
4203 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4205 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4207 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4208 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4209 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4211 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4213 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4215 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4216 a gimple stmt to a stmt_vec_info.
4217 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4219 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4221 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4222 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4223 (_loop_vec_info::reduction_chains): Likewise.
4224 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4226 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4230 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4231 a gimple stmt to a stmt_vec_info.
4232 (_stmt_vec_info::next_element): Likewise.
4233 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4234 (vect_slp_analyze_and_verify_node_alignment)
4235 (vect_analyze_group_access_1, vect_analyze_group_access)
4236 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4237 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4238 (vect_supportable_dr_alignment): Update accordingly.
4239 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4240 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4241 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4242 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4243 * tree-vect-slp.c (vect_build_slp_tree_1)
4244 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4245 (vect_split_slp_store_group, vect_analyze_slp_instance)
4246 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4247 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4248 (get_group_load_store_type, get_load_store_type)
4249 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4250 (vect_transform_stmt, vect_remove_stores): Likewise.
4252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4254 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4256 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4257 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4258 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4259 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4260 (vector_alignment_reachable_p, vect_get_data_access_cost)
4261 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4262 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4263 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4264 (vect_analyze_group_access_1, vect_analyze_group_access)
4265 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4266 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4267 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4268 result of vect_dr_stmt and use the stmt_vec_info instead of
4269 the associated gimple stmt.
4270 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4271 (vect_gen_prolog_loop_niters): Likewise.
4272 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4276 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4277 to a vec<stmt_vec_info>.
4278 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4279 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4281 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4282 to a vec<stmt_vec_info>.
4283 (bst_traits::value_type, bst_traits::value_type): Likewise.
4284 (bst_traits::hash): Update accordingly.
4285 (vect_get_and_check_slp_defs): Change the stmts parameter from
4286 a vec<gimple *> to a vec<stmt_vec_info>.
4287 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4288 (vect_build_slp_tree): Likewise.
4289 (vect_build_slp_tree_2): Likewise. Update uses of
4290 SLP_TREE_SCALAR_STMTS.
4291 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4292 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4293 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4294 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4295 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4296 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4297 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4298 (vect_get_constant_vectors, vect_get_slp_defs)
4299 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4300 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4301 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4302 instead of gimple stmts.
4303 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4304 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4305 (vect_slp_analyze_instance_dependence): Update uses of
4306 SLP_TREE_SCALAR_STMTS.
4307 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4308 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4309 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4310 (get_initial_defs_for_reduction): Likewise.
4311 (vect_create_epilog_for_reduction): Likewise.
4312 (vectorize_fold_left_reduction): Likewise.
4313 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4314 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4315 (can_vectorize_live_stmts): Likewise.
4317 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4319 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4320 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4321 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4323 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4325 (gather_scalar_reductions): Update after above interface changes.
4326 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4327 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4329 (vect_force_simple_reduction): Likewise.
4330 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4331 LOOP_VINFO_REDUCTIONS.
4332 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4334 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4336 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4337 a gimple stmt to a stmt_vec_info.
4338 * tree-vect-loop.c (vect_active_double_reduction_p)
4339 (vect_force_simple_reduction, vectorizable_reduction): Update
4342 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4344 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4345 vec<gimple *> to a vec<stmt_vec_info>.
4346 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4347 the reduction_phis argument from a vec<gimple *> to a
4349 (vectorizable_reduction): Likewise the phis local variable that
4350 is passed to vect_create_epilog_for_reduction. Update for new type
4351 of SLP_TREE_VEC_STMTS.
4352 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4353 (vectorizable_live_operation): Likewise.
4354 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4355 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4357 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4359 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4360 a gimple stmt to a stmt_vec_info.
4361 (vectorizable_condition, vectorizable_live_operation)
4362 (vectorizable_reduction, vectorizable_induction): Pass back the
4363 vectorized statement as a stmt_vec_info.
4364 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4365 use of STMT_VINFO_VEC_STMT.
4366 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4367 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4368 as stmt_vec_infos rather than gimple stmts.
4369 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4371 (vectorizable_live_operation): Likewise.
4372 (vectorizable_reduction, vectorizable_induction): Likewise,
4373 updating use of STMT_VINFO_VEC_STMT.
4374 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4375 of STMT_VINFO_VEC_STMT.
4376 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4377 (vectorizable_simd_clone_call, vectorizable_conversion)
4378 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4379 (vectorizable_store, vectorizable_load, vectorizable_condition)
4380 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4381 from a gimple stmt to a stmt_vec_info.
4382 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4383 pointer to a stmt_vec_info to the vectorizable_* routines.
4385 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4387 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4388 a gimple stmt to a stmt_vec_info.
4389 (is_pattern_stmt_p): Update accordingly.
4390 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4391 (vect_record_grouped_load_vectors): Likewise.
4392 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4393 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4394 (vect_model_reduction_cost): Likewise.
4395 (vect_create_epilog_for_reduction): Likewise.
4396 (vectorizable_reduction, vectorizable_induction): Likewise.
4397 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4398 Return the stmt_vec_info for the pattern statement.
4399 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4400 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4401 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4402 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4403 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4404 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4405 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4406 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4410 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4411 (vect_finish_stmt_generation): Likewise.
4412 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4413 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4414 (vect_build_gather_load_calls): Use the return value of the above
4415 functions instead of a separate call to vinfo_for_stmt. Use narrow
4416 scopes for the input gimple stmt and wider scopes for the associated
4417 stmt_vec_info. Use vec_info::lookup_def when setting these
4418 stmt_vec_infos from an SSA_NAME definition.
4419 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4420 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4421 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4422 (vectorizable_store, vectorizable_load, vectorizable_condition)
4423 (vectorizable_comparison): Likewise.
4424 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4425 (vectorizable_reduction): Likewise.
4427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4429 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4430 stmt_vec_info * parameter before the optional gimple **.
4431 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4432 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4433 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4434 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4435 (vectorizable_live_operation): Likewise.
4436 * tree-vect-patterns.c (type_conversion_p): Likewise.
4437 (vect_look_through_possible_promotion): Likewise.
4438 (vect_recog_rotate_pattern): Likewise.
4439 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4441 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4443 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4444 a typedef to a wrapper class.
4445 (NULL_STMT_VEC_INFO): New macro.
4446 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4447 (stmt_vec_info::operator*): New function.
4448 (stmt_vec_info::operator gimple *): Likewise.
4449 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4450 (add_stmt_costs): Likewise.
4451 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4452 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4453 (vect_get_known_peeling_cost): Likewise.
4454 (vect_estimate_min_profitable_iters): Likewise.
4455 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4456 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4457 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4458 (vectorizable_store, free_stmt_vec_infos): Likewise.
4459 (new_stmt_vec_info): Change return type of xcalloc to
4462 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4464 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4465 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4466 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4467 a single_imm_use-based sequence.
4468 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4470 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4472 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4473 * tree-vectorizer.c (vec_info::lookup_def): New function.
4474 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4475 (vect_widened_op_tree): Likewise.
4476 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4477 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4478 (vectorizable_reduction): Likewise.
4479 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4481 (vect_is_slp_reduction): Update calls accordingly. Use
4482 vec_info::lookup_def.
4483 (vect_is_simple_reduction): Likewise
4484 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4486 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4488 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4489 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4490 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4492 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4493 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4494 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4495 (vect_is_slp_reduction, vectorizable_induction)
4496 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4497 * tree-vect-patterns.c (vect_init_pattern_stmt):
4498 (vect_determine_min_output_precision_1, vect_determine_precisions)
4499 (vect_pattern_recog): Likewise.
4500 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4501 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4502 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4503 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4504 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4505 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4506 info field from a loop to a loop_vec_info.
4508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4510 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4511 (vec_info::add_stmt): Declare.
4512 * tree-vectorizer.c (vec_info::add_stmt): New function.
4513 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4514 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4515 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4516 (vectorizable_induction): Likewise.
4517 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4518 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4519 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4520 (vectorizable_load): Likewise.
4521 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4522 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4523 (vect_recog_gather_scatter_pattern): Likewise.
4524 (append_pattern_def_seq): Likewise. Remove a check that is
4525 performed by add_stmt itself.
4527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4529 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4530 which make_ssa_name was called with new_stmt before new_stmt
4533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4535 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4537 (vect_is_slp_reduction): ...here...
4538 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4539 that are already known to be false.
4541 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4543 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4544 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4545 STMT_VINFO_NUM_SLP_USES when it's true.
4546 (vect_free_slp_instance): Add a final_p parameter and pass it to
4548 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4549 (vect_analyze_slp_instance): Likewise.
4550 (vect_slp_analyze_operations): Likewise.
4551 (vect_slp_analyze_bb_1): Likewise.
4552 * tree-vectorizer.c (vec_info): Likewise.
4553 * tree-vect-loop.c (vect_transform_loop): Likewise.
4555 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4557 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4558 function is not called for second and subsequent members of
4561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4563 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4564 cases for nested loops from here to ...
4565 (vect_create_epilog_for_reduction): ...here. Only call
4566 vect_is_simple_use for inner-loop reductions.
4568 2018-07-31 Martin Liska <mliska@suse.cz>
4570 PR gcov-profile/85338
4571 PR gcov-profile/85350
4572 PR gcov-profile/85372
4573 * profile.c (struct location_triplet): New.
4574 (struct location_triplet_hash): Likewise.
4575 (output_location): Do not output a BB that
4576 is already recorded for a line.
4577 (branch_prob): Use streamed_locations.
4579 2018-07-31 Martin Liska <mliska@suse.cz>
4581 PR gcov-profile/85370
4582 * coverage.c (coverage_begin_function): Do not mark target
4583 clones as artificial functions.
4585 2018-07-31 Martin Liska <mliska@suse.cz>
4587 PR gcov-profile/83813
4588 PR gcov-profile/84758
4589 PR gcov-profile/85217
4590 PR gcov-profile/85332
4591 * profile.c (branch_prob): Do not record GOTO expressions
4592 for GIMPLE statements which locations are already streamed.
4594 2018-07-31 Olivier Hainque <hainque@adacore.com>
4596 * gcc.c (handle_spec_function): Accept a soft_matched_part
4597 argument, as do_spec_1. Pass it down to ...
4598 (eval_spec_function): Accept a soft_matched_part argument,
4599 and pass it down to ...
4600 (do_spec_2): Accept a soft_matched_part argument, and pass
4601 it down to do_spec_1.
4602 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4603 (handle_braces): Update call to handle_spec_function.
4604 (driver::set_up_specs): Update calls to do_spec_2.
4605 (compare_debug_dump_opt_spec_function): Likewise.
4606 (compare_debug_self_opt_spec_function): Likewise.
4608 2018-07-31 Olivier Hainque <hainque@adacore.com>
4610 * common.opt (nolibc): New option.
4611 * doc/invoke.texi (Link Options): Document it.
4612 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4613 * config/alpha/linux.h: Likewise.
4614 * config/arc/elf.h: Likewise.
4615 * config/arm/uclinux-elf.h: Likewise.
4616 * config/arm/unknown-elf.h: Likewise.
4617 * config/avr/avrlibc.h: Likewise.
4618 * config/bfin/bfin.h: Likewise.
4619 * config/bfin/linux.h: Likewise.
4620 * config/bfin/uclinux.h: Likewise.
4621 * config/darwin.h: Likewise.
4622 * config/darwin10.h: Likewise.
4623 * config/darwin12.h: Likewise.
4624 * config/gnu-user.h: Likewise.
4625 * config/lm32/uclinux-elf.h: Likewise.
4626 * config/pa/pa-hpux11.h: Likewise.
4627 * config/pa/pa64-hpux.h: Likewise.
4628 * config/sparc/sparc.h: Likewise.
4630 2018-07-31 Olivier Hainque <hainque@adacore.com>
4632 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4633 undefined variables.
4635 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4638 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4641 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4643 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4644 terminated string literal.
4646 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4648 PR rtl-optimization/85160
4649 * combine.c (is_just_move): New function.
4650 (try_combine): Allow combining two instructions into two if neither of
4651 the original instructions was a move.
4653 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4656 * doc/extend.texi (Global Register Variables): Discourage use of type
4658 (Local Register Variables): Likewise.
4660 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4662 PR tree-optimization/86506
4663 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4665 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4668 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4669 hard_regno, make sure no insn between `from` and `to` clobbers it.
4671 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4672 Tom de Vries <tdevries@suse.de>
4674 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4675 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4676 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4677 PTX_DEFAULT_RUNTIME_DIM.
4678 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4680 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4682 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4683 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4684 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4686 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4688 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4690 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4691 predicate to reflect toc fusion has been deleted.
4692 (toc_fusion_mem_raw): Delete, no longer used.
4693 (toc_fusion_mem_wrapped): Likewise.
4694 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4696 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4697 Delete, no longer used.
4698 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4699 meant to be used for toc fusion.
4700 (rs6000_debug_print_mode): Delete toc fusion debugging.
4701 (rs6000_debug_reg_global): Likewise.
4702 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4703 fusion and secondary reload support that were never used.
4704 (rs6000_option_override_internal): Delete TOC fusion, that was only
4705 partially defined, and it did not work unless you also used the
4707 (rs6000_legitimate_address_p): Delete TOC fusion support.
4708 (rs6000_opt_masks): Likewise.
4709 (fusion_wrap_memory_address): Delete function, no longer used.
4710 (fusion_split_address); Delete TOC fusion support.
4711 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4712 longer used with toc fusion being deleted.
4713 (TARGET_TOC_FUSION_FP): Likewise.
4714 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4716 (toc fusion spliter): Delete TOC fusion support.
4717 (toc_fusionload_<mode>): Likewise.
4718 (toc_fusionload_di): Likewise.
4719 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4720 longer needs to be named. Rename predicate to delete TOC fusion.
4721 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4722 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4723 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4724 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4725 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4727 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4729 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4730 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4731 __int128 in built-in function prototypes.
4732 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4733 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4735 2018-07-27 Martin Sebor <msebor@redhat.com>
4737 PR tree-optimization/86696
4738 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4739 types, including enums.
4740 (handle_char_store): Be prepared for the above function to fail.
4742 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4744 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4745 when optimization level is lower than 2 or optimize for size.
4747 2018-07-26 Martin Sebor <msebor@redhat.com>
4749 PR tree-optimization/86043
4750 PR tree-optimization/86042
4751 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4752 (get_string_cst_length): Rename...
4753 (get_min_string_length): ...to this. Add argument.
4754 (handle_char_store): Extend to handle multi-character stores by
4756 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4757 * tree.h (initializer_zerop): Add argument.
4759 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4762 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4763 declare target to variables if they have always,{to,from,tofrom} map
4766 2018-07-26 Martin Liska <mliska@suse.cz>
4769 * lto-wrapper.c: Add linker_output as prefix
4770 for ltrans_output_file.
4772 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4774 PR rtl-optimization/85805
4775 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4776 value for hard registers if that was written in the same mode.
4778 2018-07-26 Martin Liska <mliska@suse.cz>
4780 PR gcov-profile/86536
4781 * gcov.c (format_gcov): Use printf format %.*f directly
4782 and do not handle special values.
4784 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4786 * common/config/arc/arc-common.c (arc_option_optimization_table):
4787 Update default optimizations for size.
4789 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4791 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4792 * config/arc/constraints.md (CfZ): New constraint.
4793 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4794 (subsf3_fpu): Likewise.
4795 (cmpsf_fpu): Likewise.
4796 (cmpsf_fpu_uneq): Likewise.
4798 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4800 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4802 (arc_is_uncached_mem_p): uncached applies to both the variable and
4805 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4807 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4810 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4812 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4813 field "m_scopes" from vec to auto_vec.
4815 2018-07-25 Martin Liska <mliska@suse.cz>
4817 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4820 2018-07-25 Richard Biener <rguenther@suse.de>
4823 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4824 special wrt context_die late.
4825 (gen_subprogram_die): Re-use DIEs in local scope.
4827 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4829 PR tree-optimization/86644
4830 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4832 2018-07-25 Martin Liska <mliska@suse.cz>
4835 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4836 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4838 2018-07-25 Martin Liska <mliska@suse.cz>
4841 * params.def: Explain ASan abbreviation and provide
4842 a documentation link.
4844 2018-07-24 Martin Sebor <msebor@redhat.com>
4846 PR tree-optimization/86622
4847 PR tree-optimization/86532
4848 * builtins.h (string_length): Declare.
4849 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4850 (check_access): Be prepared for non-constant length ranges.
4851 (string_length): Make extern.
4852 * expr.c (string_constant): Only handle the minor non-constant
4853 array index. Use string_constant to compute the length of
4854 a generic string constant.
4856 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4858 PR tree-optimization/86618
4859 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4860 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4862 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4864 PR tree-optimization/86636
4865 * json.cc (json::object::set): Fix comment. Add assertions.
4866 (json::array::append): Move here from json.h. Add comment and an
4868 (json::string::string): Likewise.
4869 * json.h (json::array::append): Move to json.cc.
4870 (json::string::string): Likewise.
4871 * optinfo-emit-json.cc
4872 (optrecord_json_writer::impl_location_to_json): Assert that we
4873 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4874 wrapper around it. Expand the location once, rather than three
4876 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4877 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4879 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4880 places. Fix some overlong lines.
4882 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4884 * config/aarch64/aarch64-simd.md
4885 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4886 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4887 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4888 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4889 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4890 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4891 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4892 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4893 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4895 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4898 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4899 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4900 and abs_d == d, do the power of two handling if profitable.
4902 2018-07-24 Richard Biener <rguenther@suse.de>
4904 * match.pd: Add BIT_FIELD_REF canonicalizations.
4906 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4909 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4911 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4913 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4914 terminated STRING_CST object.
4916 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4918 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4920 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4922 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4923 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4924 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4925 the elements into a register.
4926 (rs6000_split_v4si_init_di_reg): Delete.
4927 (rs6000_split_v4si_init): Delete.
4928 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4929 (vsx_init_v4si): Rewrite as a define_expand.
4931 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4933 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4934 zero_extend argument from memory): New.
4936 2018-07-22 Martin Sebor <msebor@redhat.com>
4939 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4940 diagnosing calls with unknown arguments unless -Walloca-larger-than
4941 is restricted to less than PTRDIFF_MAX bytes.
4943 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4945 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4947 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4949 * pretty-print.c (text_info::set_location): Remove redundant
4950 "line_table" parameter from call to rich_location::set_range.
4952 2018-07-20 Martin Sebor <msebor@redhat.com>
4955 * builtins.c (expand_builtin_alloca): Adjust.
4956 * calls.c (alloc_max_size): Simplify.
4957 * cgraphunit.c (cgraph_node::expand): Adjust.
4958 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4960 (frame_larger_than_size): Same.
4961 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4962 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4964 * doc/invoke.texi (GCC Command Options): Document option arguments.
4965 Explain byte-size arguments and suffixes.
4966 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4967 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4968 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4969 * doc/options.texi (UInteger): Expand.
4970 (Host_Wide_Int, ByteSize): Document new properties.
4971 * final.c (final_start_function_1): Include sizes in an error message.
4972 * function.c (frame_offset_overflow): Same.
4973 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4974 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4975 Diagnose unbounded alloca calls only for limits of less than
4977 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4978 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4980 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4981 only for limits of less than PTRDIFF_MAX.
4982 * langhooks-def.h (lhd_handle_option): Change function argument
4984 * langhooks.c (lhd_handle_option): Same.
4985 * langhooks.h (handle_option): Same.
4986 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4988 (var_type, var_type_struct): Same.
4989 (var_set): Handle ByteSize flag.
4990 * optc-gen.awk: Add comments to output to ease debugging. Make
4991 use of HOST_WIDE_INT where appropriate.
4992 * opts-gen-save.awk: Use %lx to format unsigned long.
4993 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4994 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4995 arguments. Parse bytes-size suffixes.
4996 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4997 (enum_value_to_arg): Same.
4998 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4999 (handle_option): Adjust.
5000 (generate_option): Change function argument to HOST_WIDE_INT.
5001 (cmdline_handle_error): Adjust.
5002 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5003 (set_option): Change function argument to HOST_WIDE_INT.
5004 (option_enabled): Handle cl_host_wide_int.
5005 (get_option_state): Handle CLVC_SIZE.
5006 (control_warning_option): Same.
5007 * opts.c (common_handle_option): Change function argument to
5008 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5009 OPT_Wvla_larger_than_.
5010 * opts.h (enum cl_var_type): Add an enumerator.
5011 * stor-layout.c (layout_decl): Print a more meaningful warning.
5012 * toplev.c (output_stack_usage): Adjust.
5014 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5016 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5017 call to inline_expand_builtin_string_cmp.
5018 (expand_builtin_strcmp): Likewise.
5019 (expand_builtin_strncmp): Likewise.
5020 (inline_string_cmp): Delete the last parameter, change char_type_node
5021 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5023 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5024 the inlining expansion on target where the type of the call has same or
5025 narrower precision than unsigned char.
5027 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5029 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5030 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5031 * common.opt (fsave-optimization-record): New option.
5032 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5033 * doc/invoke.texi (-fsave-optimization-record): New option.
5034 * dumpfile.c: Include "optinfo-emit-json.h".
5035 (struct kv_pair): Move to coretypes.h.
5036 (optgroup_options): Make non-static.
5037 (dump_context::end_scope): Call
5038 optimization_records_maybe_pop_dump_scope.
5039 * dumpfile.h (optgroup_options): New decl.
5040 * json.cc: New file.
5042 * optinfo-emit-json.cc: New file.
5043 * optinfo-emit-json.h: New file.
5044 * optinfo.cc: Include "optinfo-emit-json.h".
5045 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5046 (optinfo_enabled_p): Check optimization_records_enabled_p.
5047 (optinfo_wants_inlining_info_p): Likewise.
5048 * optinfo.h: Update comment.
5049 * profile-count.c (profile_quality_as_string): New function.
5050 * profile-count.h (profile_quality_as_string): New decl.
5051 (profile_count::quality): New accessor.
5052 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5053 and optinfo_emit_json_cc_tests.
5054 * selftest.h (selftest::json_cc_tests): New decl.
5055 (selftest::optinfo_emit_json_cc_tests): New decl.
5056 * toplev.c: Include "optinfo-emit-json.h".
5057 (compile_file): Call optimization_records_finish.
5058 (do_compile): Call optimization_records_start.
5059 * tree-ssa-live.c: Include optinfo.h.
5060 (remove_unused_scope_block_p): Retain inlining information if
5061 optinfo_wants_inlining_info_p returns true.
5063 2018-07-20 Richard Biener <rguenther@suse.de>
5066 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5067 to cover -flto-partition=none.
5069 2018-07-20 Martin Liska <mliska@suse.cz>
5071 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5072 (get_decl_source_range): Remove unused function.
5074 2018-07-20 Richard Biener <rguenther@suse.de>
5076 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5077 (struct vn_phi_s): Likewise.
5078 (struct vn_reference_s): Likewise.
5079 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5080 for searching the slot of an entry known to be in the hash itself.
5081 (vn_phi_hasher::equal): Likewise.
5082 (vn_reference_hasher::equal): Likewise.
5083 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5085 (optimistic_info, current_info): Remove, keeping only valid_info.
5086 (vn_reference_lookup_1): Remove fallback lookup.
5087 (vn_reference_lookup_2): Likewise.
5088 (vn_nary_op_lookup_1): Likewise.
5089 (vn_phi_lookup): Likewise.
5090 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5092 (vn_reference_insert): Adjust, chain the inserted hash element
5093 at last_inserted_ref.
5094 (vn_reference_insert_pieces): Likewise.
5095 (visit_reference_op_call): Likewise.
5096 (vn_nary_op_insert_into): Chain the inserted hash element at
5098 (vn_nary_op_insert_pieces): Adjust.
5099 (vn_nary_op_insert): Likewise.
5100 (vn_nary_op_insert_stmt): Likewise.
5101 (vn_phi_insert): Adjust, chain the inserted hash element at
5103 (process_scc): Remove clearing and copying the optimistic
5104 table. Instead remove elements inserted during an optimistic
5105 iteration from the single table we maintain.
5106 (init_scc_vn): Adjust.
5107 (free_scc_vn): Likewise.
5108 (sccvn_dom_walker::record_cond): Likewise.
5109 (sccvn_dom_walker::after_dom_children): Likewise.
5111 2018-07-19 Martin Sebor <msebor@redhat.com>
5113 PR tree-optimization/84047
5114 PR tree-optimization/83776
5115 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5116 (check_array_bounds): Call it.
5118 2018-07-19 Martin Sebor <msebor@redhat.com>
5120 * align.h (align_flags): Use member initialization.
5122 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5124 * Makefile.in (OBJS): Add optinfo.o.
5125 * coretypes.h (class symtab_node): New forward decl.
5126 (struct cgraph_node): New forward decl.
5127 (class varpool_node): New forward decl.
5128 * dump-context.h: New file.
5129 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5131 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5132 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5133 (set_alt_dump_file): Likewise.
5134 (dump_context::~dump_context): New dtor.
5135 (dump_gimple_stmt): Move implementation to...
5136 (dump_context::dump_gimple_stmt): ...this new member function.
5137 Add the stmt to any pending optinfo, creating one if need be.
5138 (dump_gimple_stmt_loc): Move implementation to...
5139 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5140 Start a new optinfo and add the stmt to it.
5141 (dump_gimple_expr): Move implementation to...
5142 (dump_context::dump_gimple_expr): ...this new member function.
5143 Add the stmt to any pending optinfo, creating one if need be.
5144 (dump_gimple_expr_loc): Move implementation to...
5145 (dump_context::dump_gimple_expr_loc): ...this new member function.
5146 Start a new optinfo and add the stmt to it.
5147 (dump_generic_expr): Move implementation to...
5148 (dump_context::dump_generic_expr): ...this new member function.
5149 Add the tree to any pending optinfo, creating one if need be.
5150 (dump_generic_expr_loc): Move implementation to...
5151 (dump_context::dump_generic_expr_loc): ...this new member
5152 function. Add the tree to any pending optinfo, creating one if
5154 (dump_printf): Move implementation to...
5155 (dump_context::dump_printf_va): ...this new member function. Add
5156 the text to any pending optinfo, creating one if need be.
5157 (dump_printf_loc): Move implementation to...
5158 (dump_context::dump_printf_loc_va): ...this new member function.
5159 Start a new optinfo and add the stmt to it.
5160 (dump_dec): Move implementation to...
5161 (dump_context::dump_dec): ...this new member function. Add the
5162 value to any pending optinfo, creating one if need be.
5163 (dump_context::dump_symtab_node): New member function.
5164 (dump_context::get_scope_depth): New member function.
5165 (dump_context::begin_scope): New member function.
5166 (dump_context::end_scope): New member function.
5167 (dump_context::ensure_pending_optinfo): New member function.
5168 (dump_context::begin_next_optinfo): New member function.
5169 (dump_context::end_any_optinfo): New member function.
5170 (dump_context::s_current): New global.
5171 (dump_context::s_default): New global.
5172 (dump_scope_depth): Delete global.
5173 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5174 (dump_symtab_node): New function.
5175 (get_dump_scope_depth): Reimplement in terms of dump_context.
5176 (dump_begin_scope): Likewise.
5177 (dump_end_scope): Likewise.
5178 (selftest::temp_dump_context::temp_dump_context): New ctor.
5179 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5180 (selftest::verify_item): New function.
5181 (ASSERT_IS_TEXT): New macro.
5182 (ASSERT_IS_TREE): New macro.
5183 (ASSERT_IS_GIMPLE): New macro.
5184 (selftest::test_capture_of_dump_calls): New test.
5185 (selftest::dumpfile_c_tests): Call it.
5186 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5187 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5188 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5189 descriptive comment.
5190 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5191 (dump_node, dump_bb): Move these unrelated decls.
5192 (class dump_manager): Add leading comment.
5193 * optinfo.cc: New file.
5194 * optinfo.h: New file.
5196 2018-07-19 Michael Collison <michael.collison@arm.com>
5197 Richard Henderson <rth@redhat.com>
5199 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5200 (subti): Handle op1 zero.
5201 (subvti4, usub4ti4): New.
5202 (*sub<GPI>3_compare1_imm): New.
5203 (sub<GPI>3_carryinCV): New.
5204 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5205 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5207 2018-07-19 Michael Collison <michael.collison@arm.com>
5208 Richard Henderson <rth@redhat.com>
5210 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5211 (addti3): Create simpler code if low part is already known to be 0.
5212 (addvti4, uaddvti4): New.
5213 (*add<GPI>3_compareC_cconly_imm): New.
5214 (*add<GPI>3_compareC_cconly): New.
5215 (*add<GPI>3_compareC_imm): New.
5216 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5217 handle constants within this pattern..
5218 (*add<GPI>3_compareV_cconly_imm): New.
5219 (*add<GPI>3_compareV_cconly): New.
5220 (*add<GPI>3_compareV_imm): New.
5221 (add<GPI>3_compareV): New.
5222 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5223 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5224 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5225 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5226 with 'comparison' operator.
5227 (*add<GPI>3_compareV_cconly_imm): Ditto.
5228 (*add<GPI>3_compareV_cconly): Ditto.
5229 (*add<GPI>3_compareV_imm): Ditto.
5230 (add<GPI>3_compareV): Ditto.
5231 (add<mode>3_carryinC): Ditto.
5232 (*add<mode>3_carryinC_zero): Ditto.
5233 (*add<mode>3_carryinC): Ditto.
5234 (add<mode>3_carryinV): Ditto.
5235 (*add<mode>3_carryinV_zero): Ditto.
5236 (*add<mode>3_carryinV): Ditto.
5238 2018-07-19 Michael Collison <michael.collison@arm.com>
5239 Richard Henderson <rth@redhat.com>
5241 * config/aarch64/aarch64-modes.def (CC_V): New.
5242 * config/aarch64/aarch64-protos.h
5243 (aarch64_addti_scratch_regs): Declare
5244 (aarch64_subvti_scratch_regs): Declare.
5245 (aarch64_expand_subvti): Declare.
5246 (aarch64_gen_unlikely_cbranch): Declare
5247 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5248 for signed overflow using CC_Vmode.
5249 (aarch64_get_condition_code_1): Handle CC_Vmode.
5250 (aarch64_gen_unlikely_cbranch): New function.
5251 (aarch64_addti_scratch_regs): New function.
5252 (aarch64_subvti_scratch_regs): New function.
5253 (aarch64_expand_subvti): New function.
5255 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5257 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5259 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5260 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5263 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5266 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5267 address check not strict.
5269 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5271 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5273 (store_pair_lanes<mode>): Likewise.
5274 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5275 enum value 'ADDR_QUERY_LDP_STP_N'.
5276 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5277 (aarch64_print_address_internal): Add declaration.
5278 (aarch64_print_ldpstp_address): Remove.
5279 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5280 (aarch64_print_operand): Change printing of 'y'.
5281 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5282 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5283 'true' rather than '1'.
5284 * config/aarch64/constraints.md (Uml): Likewise.
5285 (Uml): Rename to Umn.
5288 2018-07-19 Richard Biener <rguenther@suse.de>
5290 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5292 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5293 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5294 (vn_reference_hasher): Likewise.
5295 (struct vn_tables_s): Remove obstack and alloc-pool members.
5296 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5297 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5298 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5299 (vn_reference_insert_pieces): Likewise.
5300 (alloc_vn_nary_op_noinit): Adjust.
5301 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5302 (vn_phi_eq): Adjust.
5303 (shared_lookup_phiargs): Remove.
5304 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5305 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5306 (visit_reference_op_call): Likewise.
5307 (copy_nary, copy_phi, copy_reference): Remove.
5308 (process_scc): Rewind the obstack when iterating. Do not
5309 copy the elements to valid_info but just move them from one
5310 hashtable to the other.
5311 (allocate_vn_table): Adjust.
5312 (free_vn_table): Likewise.
5313 (init_scc_vn): Likewise.
5314 (free_scc_vn): Likewise.
5316 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5319 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5320 indirect_return as function type attribute.
5321 (ix86_attribute_table): Change indirect_return to function
5323 * doc/extend.texi: Update indirect_return attribute.
5325 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5327 * wide-int.h (widest2_int): New.
5328 * gimple-fold.c (arith_overflowed_p): Use it.
5329 * tree.h (widest2_int_cst): New.
5330 * tree-vrp.c (wide_int_binop_overflow): Rename from
5331 vrp_int_const_binop.
5332 Rewrite to work on trees.
5333 (extract_range_from_multiplicative_op_1): Abstract code to...
5334 (wide_int_range_min_max): ...here.
5335 (wide_int_range_cross_product): ...and here.
5336 (extract_range_from_binary_expr_1): Abstract overflow code to...
5337 (wide_int_range_mult_wrapping): ...here.
5338 * tree-vrp.h (wide_int_range_cross_product): New.
5339 (wide_int_range_mult_wrapping): New.
5341 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5342 Julia Koval <julia.koval@intel.com>
5344 * config/i386/x86-tune-costs.h (skylake_memcpy,
5345 skylake_memset): Replace rep_prefix with unrolling for size 512.
5347 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5350 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5351 comparision with EQ_EXPR in last stmt.
5353 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5355 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5356 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5357 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5358 previously known as "PowerPC AltiVec Built-in Functions". Move
5359 some material to new subsubsections "PowerPC AltiVec Built-in
5360 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5362 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5363 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5364 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5365 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5367 2018-07-18 Richard Biener <rguenther@suse.de>
5369 PR tree-optimization/86557
5370 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5373 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5375 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5377 2018-07-17 Jeff Law <law@redhat.com>
5379 * config/arm/arm.c (get_label_padding): Update for recent
5380 changes to label_to_alignment.
5382 PR tree-optimization/86010
5383 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5385 * config/mips/mips.c (vr4130_align_insns): Update for recent
5386 changes to label_to_alignment.
5388 * config/frv/frv.c (frv_label_align): Update for recent changes
5389 to label_to_alignment.
5391 * config/nios2/nios2.c (nios2_label_align): Update for recent
5392 changes which dropped ALIGN_LABELS_LOG.
5394 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5396 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5397 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5399 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5401 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5402 deprecated align_labels_log.
5404 2018-07-17 Richard Biener <rguenther@suse.de>
5407 * dwarf2out.c (init_sections_and_labels): Always generate
5408 a debug_line_str_section for early LTO debug.
5409 (dwarf2out_finish): Reset debug_line_str_hash output early.
5410 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5412 (dwarf2out_early_finish): Output debug_line_str.
5414 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5416 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5417 index register on z196 or later.
5419 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5421 * config/s390/s390.c (s390_default_align): Set default function
5423 (s390_override_options_after_change): Call s390_default align.
5424 (s390_option_override_internal): Call s390_default_align.
5425 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5427 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5430 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5431 to _looptemp_ clauses, other than the first two.
5433 2018-07-17 Martin Liska <mliska@suse.cz>
5435 * opts.c: Do not enable OPT_falign_* for -Os.
5437 2018-07-17 Martin Liska <mliska@suse.cz>
5439 * align.h (MAX_CODE_ALIGN): New.
5440 (MAX_CODE_ALIGN_VALUE): New.
5441 * common/config/i386/i386-common.c (ix86_handle_option):
5442 (MAX_CODE_ALIGN): Moved to align.h.
5443 * final.c (MAX_CODE_ALIGN): Likewise.
5444 * opts.c (parse_and_check_align_values):
5445 (MAX_CODE_ALIGN): Likewise.
5446 (MAX_CODE_ALIGN_VALUE): Likewise.
5448 2018-07-17 Martin Liska <mliska@suse.cz>
5450 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5451 in order to fulfil coding style.
5452 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5453 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5454 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5455 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5456 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5457 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5458 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5459 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5460 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5462 2018-07-17 Martin Liska <mliska@suse.cz>
5464 * align.h: New file.
5465 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5467 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5468 align_flags of label_to_alignment.
5469 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5471 * config/m68k/m68k.c: Do not use removed align_labels_value and
5473 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5474 (LOOP_ALIGN): Likewise.
5475 (LABEL_ALIGN): Likewise.
5476 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5477 Remove not used macro.
5478 (rs6000_loop_align): Change return type to align_flags.
5479 (rs6000_loop_align_max_skip): Remove.
5480 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5481 Change return type to align_flags.
5482 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5483 Remove not used macro.
5484 (rs6000_loop_align): Change return type to align_flags.
5485 (rs6000_loop_align_max_skip): Remove.
5486 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5487 * config/rx/rx-protos.h (rx_align_for_label): Make it
5489 * config/rx/rx.c (rx_align_for_label): Change return type
5491 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5493 into align_flags class.
5494 (LABEL_ALIGN): Likewise.
5495 (LOOP_ALIGN): Likewise.
5496 * config/s390/s390.c (s390_label_align): Use align_flags
5498 (s390_asm_output_function_label): Likewise.
5499 * config/sh/sh.c (sh_override_options_after_change):
5500 Use align_flags class directly without macros.
5501 (find_barrier): Likewise.
5502 (barrier_align): Likewise.
5503 (sh_loop_align): Likewise.
5504 * config/spu/spu.c (spu_option_override):
5505 Use align_flags_tuple::get_value instead of removed macros.
5506 (spu_sched_init): Likewise.
5507 * config/spu/spu.h (GTY): Likewise.
5508 * config/visium/visium.c (visium_option_override):
5509 Set "8" as default secondary alignment.
5510 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5511 in order to guarantee secondary alignment of 8.
5512 * coretypes.h: Include align.h header file.
5513 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5514 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5515 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5516 * doc/tm.texi.in: Likewise.
5517 * final.c (struct label_alignment): Remove not used structure.
5518 (LABEL_ALIGN): Change type to align_flags.
5519 (LOOP_ALIGN): Likewise.
5520 (JUMP_ALIGN): Likewise.
5521 (default_loop_align_max_skip): Remove.
5522 (default_label_align_max_skip): Likewise.
5523 (default_jump_align_max_skip): Likewise.
5524 (default_label_align_after_barrier_max_skip):
5525 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5526 (LABEL_TO_MAX_SKIP): Remove.
5527 (label_to_alignment): Return align_flags type instead of integer.
5528 (label_to_max_skip): Remove.
5529 (align_fuzz): Use align_flags type.
5530 (compute_alignments): Use align_flags type and use align_flags::max
5531 to combine multiple alignments.
5532 (grow_label_align): Grow vec instead of C array.
5533 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5534 (shorten_branches): Use align_flags type and use align_flags::max
5535 to combine multiple alignments.
5536 (final_scan_insn_1): Remove usage of secondary alignment that comes
5537 from label alignment, but instead use proper secondary alignment
5538 which is computed in grow_label_align.
5539 * flags.h (struct align_flags_tuple): Move to align.h.
5540 (struct align_flags): Likewise.
5541 (state_align_loops): Rename to align_loops.
5542 (state_align_jumps): Rename to align_jumps.
5543 (state_align_labels): Rename to align_labels.
5544 (state_align_functions): Rename to align_functions.
5545 (align_loops_log): Remove.
5546 (align_jumps_log): Remove.
5547 (align_labels_log): Remove.
5548 (align_functions_log): Remove.
5549 (align_loops_max_skip): Remove.
5550 (align_jumps_max_skip): Remove.
5551 (align_labels_max_skip): Remove.
5552 (align_functions_max_skip): Remove.
5553 (align_loops_value): Remove.
5554 (align_jumps_value): Remove.
5555 (align_labels_value): Remove.
5556 (align_functions_value): Remove.
5557 * output.h (label_to_alignment): Change return type to align_flags.
5558 (label_to_max_skip): Remove.
5559 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5560 jump_align_max_skip macros.
5561 * targhooks.h (default_loop_align_max_skip): Remove.
5562 (default_label_align_max_skip): Likewise.
5563 (default_jump_align_max_skip): Likewise.
5564 (default_label_align_after_barrier_max_skip): Remove.
5565 * toplev.c (read_log_maxskip): Use ::normalize function.
5566 (parse_N_M): Remove not used argument and also call ::normalize.
5567 (parse_alignment_opts): Do not pass unused arguments.
5568 * varasm.c (assemble_start_function): Use directly align_functions
5569 instead of removed macros.
5570 * system.h: Do not poison removed macros.
5572 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5575 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5576 and cond temporaries don't have reference type if iterator has
5577 pointer type. For init use &for_pre_body instead of pre_p if
5578 for_pre_body is non-empty.
5580 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5582 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5583 double-double modes to SFmode directly directly.
5584 (trunc<mode>sf2_fprs): Delete.
5586 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5588 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5589 for conversions between IFmode and the decimal floating point modes.
5590 (init_float128_ieee): Use the correct names for conversions between
5591 KFmode and the decimal floating point modes.
5593 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5595 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5596 for the conversions between TDmode and IFmode.
5597 (init_float128_ieee): Use more correct names for the conversions
5598 between TDmode and KFmode.
5600 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5602 PR tree-optimization/86526
5603 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5604 (inline_expand_builtin_string_cmp): Likewise.
5605 (inline_string_cmp): Likewise. Use c_readstr instead of
5606 builtin_memcpy_read_str. Add unit_mode temporary.
5608 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5611 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5612 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5614 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5616 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5617 Alphabetize prototypes of built-in functions, separating out
5618 built-in functions that are listed in this section but should be
5619 described elsewhere.
5621 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5624 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5625 conditional move when trapping comparison was split to a
5626 non-trapping one (and vice versa).
5628 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5630 * config/s390/s390.c (s390_function_profiler): Generate nops
5631 instead of profiler call sequences.
5632 * config/s390/s390.opt: Add the new option.
5634 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5636 * config/s390/s390.c (s390_function_profiler): Generate
5637 __mcount_loc section.
5638 * config/s390/s390.opt: Add the new option.
5640 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5642 * common.opt: Add the new warning.
5643 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5644 %r0,__fentry__" when -mfentry is specified.
5645 (s390_option_override_internal): Disallow -mfentry for 31-bit
5647 * config/s390/s390.opt: Add the new option.
5649 2018-07-16 Richard Biener <rguenther@suse.de>
5652 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5653 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5655 2018-07-16 Martin Liska <mliska@suse.cz>
5658 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5661 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5663 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5665 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5667 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5669 * config/arc/arc-cpus.def (hs4x): New cpu.
5671 * config/arc/arc-tables.opt: Regenerate.
5672 * config/arc/arc.c (arc_sched_issue_rate): New function.
5673 (TARGET_SCHED_ISSUE_RATE): Define.
5674 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5675 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5677 (attr tune): Add ARCHS4x tune values.
5678 (attr tune_dspmpy): Define.
5679 (*tst): Correct instruction type.
5680 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5681 * config/arc/arcHS4x.md: New file.
5682 * config/arc/fpu.md: Update instruction type attributes.
5683 * config/arc/t-multilib: Regenerate.
5685 2018-07-16 Tom de Vries <tdevries@suse.de>
5688 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5690 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5692 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5695 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5697 PR tree-optimization/86514
5698 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5699 conversion to a boolean type from a type with greater precision.
5701 2018-07-16 Tom de Vries <tdevries@suse.de>
5703 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5704 dump_flags request TDF_SLIM.
5706 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5708 * fold-const.c (int_const_binop_1): Abstract...
5709 (wide_int_binop): ...wide int code here.
5710 (poly_int_binop): ...poly int code here.
5711 Abstract the rest of int_const_binop_1 into int_const_binop.
5712 * fold-const.h (wide_int_binop): New.
5713 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5714 Remove useless PLUS/MINUS_EXPR case.
5715 (zero_nonzero_bits_from_vr): Move wide int code...
5716 (zero_nonzero_bits_from_bounds): ...here.
5717 (extract_range_from_binary_expr_1): Move mask optimization code...
5718 (range_easy_mask_min_max): ...here.
5719 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5720 (range_easy_mask_min_max): New.
5722 2018-07-15 Jeff Law <law@redhat.com>
5725 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5728 2018-07-14 Jim Wilson <jimw@sifive.com>
5730 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5732 2018-07-14 Paul Koning <ni1d@arrl.net>
5734 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5736 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5738 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5741 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5742 Steve Munroe <munroesj52@gmail.com>
5744 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5745 (_mm_andnot_si128): Likewise.
5746 (_mm_or_si128): Likewise.
5747 (_mm_xor_si128): Likewise.
5749 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5752 * builtins.c (expand_builtin_memcmp): Inline the calls first
5753 when result_eq is false.
5754 (expand_builtin_strcmp): Inline the calls first.
5755 (expand_builtin_strncmp): Likewise.
5756 (inline_string_cmp): New routine. Expand a string compare
5757 call by using a sequence of char comparison.
5758 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5759 a call to str(n)cmp/memcmp.
5760 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5762 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5764 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5766 * config/arm/driver-arm.c: Include arm-native.h.
5767 (host_detect_local_cpu): Use auto-generated data tables.
5768 (vendors, arm_cpu_table): Delete. Move part information to ...
5769 * config/arm/arm-cpus.in: ... here.
5770 * config/arm/parsecpu.awk (gen_native): New function.
5771 (vendor, part): New CPU fields.
5772 (END): Add support for building the native CPU detection tables.
5773 * config/arm/t-arm (arm-native.h): Add build rule.
5774 (driver-arm.o): Add dependency on arm-native.h.
5776 2018-07-13 Richard Biener <rguenther@suse.de>
5779 * match.pd (addr1 - addr2): Allow either of the operand to
5782 2018-07-13 Tom de Vries <tdevries@suse.de>
5784 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5787 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5789 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5790 arrays instead of numbered variables.
5792 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5794 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5795 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5797 2018-07-13 Richard Biener <rguenther@suse.de>
5800 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5801 instead of get_context_die.
5803 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5804 Richard Biener <rguenther@suse.de>
5807 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5808 that the loop latch destination where phi is defined.
5810 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5812 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5813 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5814 (riscv_set_current_function): Extract getting interrupt type to new
5816 (riscv_get_interrupt_type): New function.
5817 (riscv_merge_decl_attributes): New function, checking interrupt type is
5819 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5821 2018-07-12 Paul Koning <ni1d@arrl.net>
5823 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5826 2018-07-12 Paul Koning <ni1d@arrl.net>
5828 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5829 zero reference, add doloop_end instead.
5830 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5831 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5832 detail for doloop_end.
5834 2018-07-12 Martin Sebor <msebor@redhat.com>
5837 * attribs.c (decl_attributes): Reject conflicting attributes before
5838 calling attribute handlers.
5840 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5842 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5844 (gcc::dump_manager::get_dump_file_name): likewise.
5845 (dump_begin): Likewise.
5846 * dumpfile.h (dump_begin): Update prototype.
5847 (gcc::dump_manager::get_dump_file_name,
5848 gcc::dump_manager::get_dump_file_name): Update prototype.
5850 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5852 * internal-fn.h (vectorizable_internal_fn_p): New function.
5853 * tree-vect-slp.c (compatible_calls_p): Likewise.
5854 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5855 to internal functions.
5856 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5858 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5860 * fold-const.h (inverse_conditions_p): Declare.
5861 * fold-const.c (inverse_conditions_p): New function.
5862 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5863 that test the inverse condition of a conditional internal function.
5864 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5865 * internal-fn.c (internal_fn_mask_index): Handle conditional
5867 (vectorized_internal_fn_supported_p): New function.
5868 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5869 (any_pred_load_store): Replace with...
5870 (need_to_predicate): ...this new variable.
5871 (redundant_ssa_names): New variable.
5872 (ifcvt_can_use_mask_load_store): Move initial checks to...
5873 (ifcvt_can_predicate): ...this new function. Handle tree codes
5874 for which a conditional internal function exists.
5875 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5876 instead of ifcvt_can_use_mask_load_store. Update after variable
5878 (predicate_load_or_store): New function, split out from
5879 predicate_mem_writes.
5880 (check_redundant_cond_expr): New function.
5881 (value_available_p): Likewise.
5882 (predicate_rhs_code): Likewise.
5883 (predicate_mem_writes): Rename to...
5884 (predicate_statements): ...this. Use predicate_load_or_store
5885 and predicate_rhs_code.
5886 (combine_blocks, tree_if_conversion): Update after above name changes.
5887 (ifcvt_local_dce): Handle redundant_ssa_names.
5888 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5889 general conditional functions.
5890 * tree-vect-stmts.c (vectorizable_call): Likewise.
5892 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5893 Alan Hayward <alan.hayward@arm.com>
5894 David Sherwood <david.sherwood@arm.com>
5896 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5897 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5898 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5899 plus and minus and convert them into IFN_COND_FMA-based sequences.
5900 (convert_mult_to_fma): Handle conditional plus and minus.
5902 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5904 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5905 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5906 (cond_fnms_optab): New optabs.
5907 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5909 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5910 * internal-fn.h (get_conditional_internal_fn): Declare.
5911 (get_unconditional_internal_fn): Likewise.
5912 * internal-fn.c (cond_ternary_direct): New macro.
5913 (expand_cond_ternary_optab_fn): Likewise.
5914 (direct_cond_ternary_optab_supported_p): Likewise.
5915 (FOR_EACH_COND_FN_PAIR): Likewise.
5916 (get_conditional_internal_fn): New function.
5917 (get_unconditional_internal_fn): Likewise.
5918 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5919 (gimple_match_op::gimple_match_op): Add a new overload for 5
5921 (gimple_match_op::set_op): Likewise.
5922 (gimple_resimplify5): Declare.
5923 * genmatch.c (decision_tree::gen): Generate simplifications for
5925 * gimple-match-head.c (gimple_simplify): Define an overload for
5926 5 operands. Handle calls with 5 arguments in the top-level overload.
5927 (convert_conditional_op): Handle conversions from unconditional
5928 internal functions to conditional ones.
5929 (gimple_resimplify5): New function.
5930 (build_call_internal): Pass a fifth operand.
5931 (maybe_push_res_to_seq): Likewise.
5932 (try_conditional_simplification): Try converting conditional
5933 internal functions to unconditional internal functions.
5934 Handle 3-operand unconditional forms.
5935 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5936 Define ternary equivalents of the current rules for binary conditional
5938 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5940 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5941 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5942 (optab): Handle them.
5943 (SVE_COND_FP_TERNARY): New int iterator.
5944 (sve_fmla_op, sve_fmad_op): New int attributes.
5945 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5946 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5947 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5949 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5951 * target.def (preferred_else_value): New target hook.
5952 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5953 * doc/tm.texi: Regenerate.
5954 * targhooks.h (default_preferred_else_value): Declare.
5955 * targhooks.c (default_preferred_else_value): New function.
5956 * internal-fn.h (conditional_internal_fn_code): Declare.
5957 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5958 (get_conditional_internal_fn): Use it.
5959 (conditional_internal_fn_code): New function.
5960 * gimple-match.h (gimple_match_cond): New struct.
5961 (gimple_match_op): Add a cond member function.
5962 (gimple_match_op::gimple_match_op): Update all forms to take a
5964 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5965 for the suboperation, but don't specify a particular else_value.
5966 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5967 (visit_nary_op, visit_reference_op_load): Pass
5968 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5969 * gimple-match-head.c: Include tree-eh.h
5970 (convert_conditional_op): New function.
5971 (maybe_resimplify_conditional_op): Likewise.
5972 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5973 (gimple_resimplify2): Likewise.
5974 (gimple_resimplify3): Likewise.
5975 (gimple_resimplify4): Likewise.
5976 (maybe_push_res_to_seq): Return null for conditional operations.
5977 (try_conditional_simplification): New function.
5978 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5980 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5982 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5984 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5986 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5988 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5990 (hash_tree): Do not hash DECL_FCONTEXT
5991 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5992 Do not stream DECL_FCONTEXT.
5993 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5994 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5996 2018-07-12 Richard Biener <rguenther@suse.de>
5999 * dwarf2out.c (gen_block_die): Only output blocks when they have
6000 at least one !DECL_IGNORED_P variable.
6002 2018-07-12 Richard Biener <rguenther@suse.de>
6005 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6006 Remove -mieee-fp handling.
6008 2018-07-12 Richard Biener <rguenther@suse.de>
6010 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6011 left-over from last patch.
6013 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6015 PR tree-optimization/86492
6016 * gimple-ssa-store-merging.c
6017 (imm_store_chain_info::coalesce_immediate_stores): Call
6018 check_no_overlap even for the merge_overlapping case. Formatting fix.
6020 2018-07-12 Richard Biener <rguenther@suse.de>
6023 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6024 move possibly trapping operations into the conditional.
6026 2018-07-12 Richard Biener <rguenther@suse.de>
6028 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6029 (vn_lookup_simplify_result): Remove recursion limit applied
6031 (vn_nary_build_or_lookup_1): Adjust.
6032 (try_to_simplify): Likewise.
6033 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6035 (gimple_resimplify2): Likewise.
6036 (gimple_resimplify3): Likewise.
6037 (gimple_resimplify4): Likewise.
6039 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6041 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6042 Use __mmask64 type instead of __mmask8 for __M argument.
6043 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6044 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6046 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6047 __mmask16 for __M argument.
6048 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6049 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6050 to __mmask16 instead of __mmask8.
6051 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6052 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6053 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6054 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6055 instead of __mmask16 for __U argument.
6056 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6057 __mmask16 instead of __mmask8 for __U argument.
6058 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6060 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6062 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6064 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6066 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6068 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6070 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6072 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6074 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6076 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6078 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6079 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6080 return type as well as __M argument type and all casts from __mmask8
6082 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6083 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6084 return type as well as __M argument type and all casts from __mmask8
6086 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6087 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6088 return type as well as __M argument type and all casts from __mmask8
6090 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6091 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6092 return type as well as __M argument type and all casts from __mmask8
6094 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6095 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6098 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6100 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6101 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6104 2018-07-11 Paul Koning <ni1d@arrl.net>
6106 * doc/md.texi (define_subst): Document how multiple occurrences of
6107 the same argument in the replacement pattern are handled.
6109 2018-07-11 Paul Koning <ni1d@arrl.net>
6111 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6113 (Common Type Attributes): Add "mode" attribute.
6115 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6117 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6118 stream DECL_ORIGINAL_TYPE.
6119 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6120 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6121 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6122 Do not walk original type.
6123 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6125 (write_ts_decl_non_common_tree_pointers): Do not stream
6127 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6128 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6130 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6132 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6133 thread twice from the same starting edge.
6135 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6137 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6138 * gimple.c (gimple_call_nonnull_result_p): ...here...
6139 (gimple_call_nonnull_arg): ...and here.
6140 * gimple.h (gimple_call_nonnull_result_p): New.
6141 (gimple_call_nonnull_arg): New.
6143 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6145 * config/arm/arm-cpus.in: Move information from fpu field of each
6146 cpu definition to the isa field.
6147 * config/arm/parsecpu.awk (fpu): Delete match rule.
6148 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6150 2018-07-11 Richard Biener <rguenther@suse.de>
6153 * dwarf2out.c (init_sections_and_labels): Use
6154 output_asm_line_debug_info consistently.
6155 (dwarf2out_early_finish): Likewise.
6156 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6159 2018-07-11 Richard Biener <rguenther@suse.de>
6161 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6162 Rework father_bb setting in a way to avoid propagating constants
6163 multiple times on a loop body.
6165 2018-07-10 Mark Wielaard <mark@klomp.org>
6168 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6170 2018-07-10 Richard Biener <rguenther@suse.de>
6172 * hash-map.h (hash_map::iterator::operator*): Return
6173 references to key and value.
6175 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6178 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6179 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6180 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6181 (gimplify_omp_for): For composite loops, move outer
6182 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6183 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6184 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6185 TREE_LIST for both the original class iterator and the "last" helper
6186 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6187 loop, remember has_decl_expr from outer composite loops for the
6188 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6190 2018-07-09 Martin Sebor <msebor@redhat.com>
6194 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6195 accessing implicitly initialized array elements.
6196 * expr.c (string_constant): Handle string initializers of
6197 character arrays within aggregates.
6198 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6199 Store element offset. As a special case, handle zero size.
6200 (fold_nonarray_ctor_reference): Same.
6201 (fold_ctor_reference): Add argument. Store subobject offset.
6202 * gimple-fold.h (fold_ctor_reference): Add argument.
6204 2018-07-09 Paul Koning <ni1d@arrl.net>
6206 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6207 (pdp11_insn_cost): New function.
6208 (pdp11_md_asm_adjust): New function.
6209 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6210 (pdp11_rtx_costs): Update to match machine better.
6211 (output_addr_const_pdp11): Correct format mismatch warnings.
6212 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6213 * config/pdp11/pdp11.md: General change to add base_cost and/or
6214 length attributes for use by new pdp11_insn_cost function.
6215 (MIN_BRANCH): Correct definition.
6217 (doloop_end): Use standard pattern name for looping pattern.
6218 (doloop_end_nocc): New.
6219 (movsf): Add another constraint alternative.
6220 (zero_extendqihi2): Add constraint alternatives for not in place
6222 (zero_extendhisi2): Remove.
6223 (shift patterns): Add CC handling variants.
6227 (define_peephole2): New peephole to recognize mov that sets CC for
6230 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6232 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6233 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6236 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6239 * real.c (real_nextafter): Return true if result is denormal.
6241 2018-07-09 Martin Liska <mliska@suse.cz>
6243 * common.opt: Add back wrongly removed attribute.
6245 2018-07-09 Richard Biener <rguenther@suse.de>
6248 * dwarf2out.c (gen_block_die): For an early generated DIE
6249 always output high/low PC attributes.
6251 2018-07-09 Tom de Vries <tdevries@suse.de>
6253 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6254 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6255 onto VAR_DECL with abstract origin.
6257 2018-07-07 Jim Wilson <jimw@sifive.com>
6259 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6261 2018-07-07 Tom de Vries <tdevries@suse.de>
6263 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6265 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6267 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6269 (combine_bound): Use wide-int overflow calculation instead of
6271 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6273 * fold-const.c (int_const_binop_2): Same.
6274 (extract_muldiv_1): Same.
6275 (fold_div_compare): Same.
6276 (fold_abs_const): Same.
6278 * poly-int.h (add): Same.
6282 * predict.c (predict_iv_comparison): Same.
6283 * profile-count.c (slow_safe_scale_64bit): Same.
6284 * simplify-rtx.c (simplify_const_binary_operation): Same.
6285 * tree-chrec.c (tree_fold_binomial): Same.
6286 * tree-data-ref.c (split_constant_offset_1): Same.
6287 * tree-if-conv.c (idx_within_array_bound): Same.
6288 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6289 * tree-ssa-phiopt.c (minmax_replacement): Same.
6290 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6291 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6292 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6293 * wide-int.cc (wi::add_large): Same.
6294 (wi::mul_internal): Same.
6295 (wi::sub_large): Same.
6296 (wi::divmod_internal): Same.
6297 * wide-int.h: Change overflow type to overflow_type for neg, add,
6298 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6299 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6300 mul_internal, divmod_internal.
6301 (overflow_type): New enum.
6302 (accumulate_overflow): New.
6304 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6306 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6307 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6309 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6311 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6312 argument is checked for zero before entering loop, avoid checking again.
6314 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6316 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6317 * gimplify.h (generic_expr_could_trap_p): Likwise.
6318 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6320 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6322 PR tree-optimization/86401
6323 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6324 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6325 (fold_bit_and_mask): ... here. New helper function for match.pd.
6326 * fold-const.h (fold_bit_and_mask): Declare.
6327 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6329 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6332 * target.def (translate_mode_attribute): New hook.
6333 * targhooks.h (default_translate_mode_attribute): Declare.
6334 * targhooks.c (default_translate_mode_attribute): New function.
6335 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6336 * doc/tm.texi: Regenerate.
6337 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6338 (rs6000_translate_mode_attribute): New function.
6340 2018-07-06 Paul Koning <ni1d@arrl.net>
6342 * doc/md.texi (define_split): Document DONE and FAIL.
6343 (define_peephole2): Ditto.
6345 2018-07-05 Jeff Law <law@redhat.com>
6347 PR tree-optimization/86010
6348 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6349 both the head and tail of mem* and str* calls.
6351 2018-07-05 Jim Wilson <jimw@sifive.com>
6353 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6355 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6357 * config/aarch64/aarch64-simd.md: correct flags text for
6358 MIN_EXPR replacement.
6360 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6362 * configure: Regenerated.
6364 2018-07-05 Carl Love <cel@us.ibm.com>
6366 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6367 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6368 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6369 VSX_BUILTIN_DOUBLEL_V4SF.
6371 2018-07-05 Martin Sebor <msebor@redhat.com>
6374 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6375 than its domain to compute its the upper bound of a char array.
6377 2018-07-05 Nathan Sidwell <nathan@acm.org>
6379 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6380 * doc/cpp.texi: Update comment.
6381 * doc/tm.texi: Rebuilt.
6382 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6383 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6384 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6385 headers affected by extern "C".
6386 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6387 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6388 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6389 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6390 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6391 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6392 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6393 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6394 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6395 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6396 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6397 config/sparc/sp64-elf.h, config/spu/spu.h,
6398 config/stormy16/stormy16.h, config/v850/v850.h,
6399 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6400 define NO_IMPLICIT_EXTERN_C.
6401 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6403 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6406 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6407 instead of GET_MODE_SIZE when comparing Units.
6409 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6412 * rtlanal.c (set_noop_p): Constrain on mode change,
6413 include hard-reg-set.h
6415 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6417 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6419 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6422 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6425 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6427 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6429 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6432 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6434 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6436 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6439 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6441 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6443 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6444 neg_*_op* variables.
6446 2018-07-04 Martin Liska <mliska@suse.cz>
6448 * tree-switch-conversion.c: Define
6449 max_ratio_for_speed and max_ratio_for_size constants.
6451 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6452 Martin Liska <mliska@suse.cz>
6457 * common.opt: Rename align options with 'str_' prefix.
6458 * common/config/i386/i386-common.c (set_malign_value): New
6460 (ix86_handle_option): Use it to set -falign-* options/
6461 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6462 type from int to string.
6463 * config/aarch64/aarch64.c: Update default values from int
6465 * config/alpha/alpha.c (alpha_override_options_after_change):
6467 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6468 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6469 max skip conditionally.
6470 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6471 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6472 max skip conditionally.
6473 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6474 max skip conditionally.
6475 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6476 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6477 max skip conditionally.
6478 * config/i386/i386.c (struct ptt): Change type from int to
6480 (ix86_default_align): Set default values.
6481 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6482 max skip conditionally.
6483 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6484 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6485 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6486 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6487 max skip conditionally.
6488 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6489 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6490 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6491 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6492 max skip conditionally.
6493 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6494 * config/ia64/ia64.c (ia64_option_override): Set default values
6495 for alignment options.
6496 * config/m68k/m68k.c: Handle new str_align_* options.
6497 * config/mips/mips.c (mips_set_compression_mode): Change
6499 (mips_option_override): Set default values for options.
6500 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6502 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6504 * config/rx/rx.c (rx_option_override): Likewise.
6505 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6506 (LABEL_ALIGN): Use align_labels_log.
6507 (LOOP_ALIGN): Use align_loops_align.
6508 * config/s390/s390.c (s390_asm_output_function_label): Use new
6510 * config/sh/sh.c (sh_override_options_after_change):
6511 Change type of constants.
6512 * config/spu/spu.c (spu_sched_init): Likewise.
6513 * config/sparc/sparc.c (sparc_option_override): Set default
6515 * config/visium/visium.c (visium_option_override): Likewise.
6516 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6517 emit p2align format with last argument if it's not needed.
6518 * doc/invoke.texi: Document extended format of -falign-*.
6519 * final.c: Use align_labels alignment.
6520 * flags.h (struct target_flag_state): Change type to use
6522 (struct align_flags_tuple): New.
6523 (struct align_flags): Likewise.
6524 (align_loops_log): Redefine macro to use new types.
6525 (align_loops_max_skip): Redefine macro to use new types.
6526 (align_jumps_log): Redefine macro to use new types.
6527 (align_jumps_max_skip): Redefine macro to use new types.
6528 (align_labels_log): Redefine macro to use new types.
6529 (align_labels_max_skip): Redefine macro to use new types.
6530 (align_functions_log): Redefine macro to use new types.
6531 (align_loops): Redefine macro to use new types.
6532 (align_jumps): Redefine macro to use new types.
6533 (align_labels): Redefine macro to use new types.
6534 (align_functions): Redefine macro to use new types.
6535 (align_functions_max_skip): Redefine macro to use new types.
6536 (align_loops_value): New macro.
6537 (align_jumps_value): New macro.
6538 (align_labels_value): New macro.
6539 (align_functions_value): New macro.
6540 * function.c (invoke_set_current_function_hook): Propagate
6541 alignment values from flags to global variables default in
6543 * ipa-icf.c (sem_function::equals_wpa): Use
6544 cl_optimization_option_eq instead of memcmp.
6545 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6547 (cl_optimization_stream_in): Likewise.
6548 * optc-save-gen.awk: Support strings in cl_optimization.
6549 * opth-gen.awk: Likewise.
6550 * opts.c (finish_options): Remove error checking of invalid
6552 (MAX_CODE_ALIGN): Remove.
6553 (MAX_CODE_ALIGN_VALUE): Likewise.
6554 (parse_and_check_align_values): New function.
6555 (check_alignment_argument): Likewise.
6556 (common_handle_option): Use check_alignment_argument.
6557 * opts.h (parse_and_check_align_values): Declare.
6558 * toplev.c (init_alignments): Remove.
6559 (read_log_maxskip): New.
6560 (parse_N_M): Likewise.
6561 (parse_alignment_opts): Likewise.
6562 (backend_init_target): Remove usage of init_alignments.
6563 * toplev.h (parse_alignment_opts): Declare.
6564 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6566 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6567 * tree.c (cl_option_hasher::equal): New.
6568 * varasm.c: Use new global macros.
6570 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6572 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6573 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6574 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6575 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6576 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6577 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6578 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6579 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6580 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6581 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6582 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6583 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6584 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6586 2018-07-04 Martin Liska <mliska@suse.cz>
6587 Jonathan Wakely <jwakely@redhat.com>
6589 * coverage.c: Use correct type.
6590 * doc/invoke.texi: Language correction.
6592 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6595 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6596 ENDBRANCH for non-tail call which may return via indirect branch.
6597 * doc/extend.texi: Document indirect_return attribute.
6599 2018-07-03 Martin Sebor <msebor@redhat.com>
6601 PR tree-optimization/86274
6602 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6604 (format_floating): Correct handling of infinities and NaNs.
6606 2018-07-03 Martin Sebor <msebor@redhat.com>
6608 * print-tree.c (print_real_cst): New function.
6609 (print_node_brief): Call it.
6610 (print_node): Ditto.
6612 2018-07-03 Jeff Law <law@redhat.com>
6614 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6615 into a single pattern.
6617 * config/h8300/h8300.md (ors code_iterator): New.
6618 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6619 a single pattern and single splitter.
6620 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6621 (iorqi3_1, xorqi3_1): Likewise.
6622 (iorqi3, xorqi3 expanders): Similarly.
6624 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6625 (movmd_internal) into a single pattern using the P mode iterator.
6626 (movmd splitters): Similarly.
6627 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6628 (movsd splitters): Similarly.
6630 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6631 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6632 right table based on the size of the operand.
6633 * config/h8300/h8300.md (length_table): Corresponding changes. All
6634 references to "addb", "addw" and "addl" changed to "add".
6635 (btst patterns): Merge two variants into a single pattern.
6636 (tstqi, tsthi): Likewise.
6637 (addhi3_incdec, addsi3_incdec): Likewise.
6638 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6639 (mulhi3, mulsi3): Likewise.
6640 (udivhi3, udivsi3): Likewise.
6641 (divhi3, divsi3): Likewise.
6642 (andorqi3, andorhi3, andorsi3): Likewise.
6644 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6647 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6648 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6650 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6652 PR tree-optimization/85694
6653 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6654 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6656 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6657 (<u>avg<mode>3_ceil): New patterns.
6659 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6661 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6662 scan-tree-dump directive.
6663 * gcc.dg/vect/slp-perm-2.c: Likewise.
6664 * gcc.dg/vect/slp-perm-3.c: Likewise.
6665 * gcc.dg/vect/slp-perm-5.c: Likewise.
6666 * gcc.dg/vect/slp-perm-6.c: Likewise.
6667 * gcc.dg/vect/slp-perm-7.c: Likewise.
6668 * gcc.dg/vect/slp-perm-8.c: Likewise.
6670 2018-07-03 Marek Polacek <polacek@redhat.com>
6673 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6675 2018-07-03 Richard Biener <rguenther@suse.de>
6678 * tree-ssa-structalias.c (find_func_clobbers): Properly
6679 handle indirect calls.
6681 2018-07-03 Jeff Law <law@redhat.com>
6683 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6684 (shifts): New code iterator.
6685 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6686 expander. Fix HImode handling on H8/SX.
6687 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6688 (subqi3, subhi3, subsi3 expanders): Likewise.
6689 (andqi3, andhi3, andsi3 expanders): Likewise.
6690 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6691 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6692 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6693 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6694 (zero_extendqihi2, zero_extendqisi2): Likewise.
6695 (extendqihi2, extendqisi2): Likewise.
6696 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6697 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6698 (rotlqi3_1, rotlhi3_1): Likewise.
6699 (logicalhi3_sn, logicalsi3_sn): Likewise.
6700 (logicalhi3, logicalsi3): Likewise.
6702 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6704 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6705 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6706 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6707 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6708 type to append_pattern_def_seq instead of creating a stmt_vec_info
6710 (build_mask_conversion): Likewise. Remove vinfo argument.
6711 (vect_add_conversion_to_patterm): Likewise, renaming to...
6712 (vect_add_conversion_to_pattern): ...this.
6713 (vect_recog_mask_conversion_pattern): Update call to
6714 build_mask_conversion. Pass the vector type to
6715 append_pattern_def_seq here too.
6716 (vect_recog_gather_scatter_pattern): Update call to
6717 vect_add_conversion_to_pattern.
6719 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6721 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6722 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6723 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6724 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6725 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6726 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6727 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6728 append_pattern_def_seq instead of new_pattern_def_seq.
6729 (vect_recog_divmod_pattern): Do both of the above.
6730 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6733 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6735 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6736 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6737 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6738 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6739 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6740 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6741 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6742 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6743 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6744 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6745 parameter with a single stmt_vec_info.
6746 (vect_recog_func_ptr): Likewise.
6747 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6748 (vect_try_gather_scatter_pattern): ...this.
6749 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6750 the stmt_vec_info of the statement to be matched. Don't clear
6751 STMT_VINFO_RELATED_STMT.
6752 (vect_pattern_recog): Update call accordingly.
6754 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6756 PR tree-optimization/85694
6757 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6758 (uavgM3_ceil): Document new optabs.
6759 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6760 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6762 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6763 (savg_ceil_optab): New optabs.
6764 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6765 (vect_vect_recog_func_ptrs): Add it.
6766 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6767 constant directly from the associated lhs.
6769 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6771 * tree-vect-patterns.c (vect_split_statement): New function.
6772 (vect_convert_input): Use it to try to split an existing cast.
6774 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6776 * poly-int.h (print_hex): New function.
6777 * dumpfile.h (dump_dec, dump_hex): Declare.
6778 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6779 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6780 min_input_precision, operation_precision and operation_sign.
6781 * tree-vect-patterns.c (vect_get_range_info): New function.
6782 (vect_same_loop_or_bb_p, vect_single_imm_use)
6783 (vect_operation_fits_smaller_type): Delete.
6784 (vect_look_through_possible_promotion): Add an optional
6785 single_use_p parameter.
6786 (vect_recog_over_widening_pattern): Rewrite to use new
6787 stmt_vec_info infomration. Handle one operation at a time.
6788 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6789 (vect_truncatable_operation_p, vect_set_operation_type)
6790 (vect_set_min_input_precision): New functions.
6791 (vect_determine_min_output_precision_1): Likewise.
6792 (vect_determine_min_output_precision): Likewise.
6793 (vect_determine_precisions_from_range): Likewise.
6794 (vect_determine_precisions_from_users): Likewise.
6795 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6796 (vect_vect_recog_func_ptrs): Put over_widening first.
6798 (vect_pattern_recog): Call vect_determine_precisions.
6800 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6802 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6803 statements that have been replaced by further pattern statements.
6804 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6806 2018-07-03 Richard Biener <rguenther@suse.de>
6808 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6809 always set *dt. Dump vectype in vectype overload.
6810 * dumpfile.h (dump_gimple_expr): New function.
6811 (dump_gimple_expr_loc): Likewise.
6812 * dumpfile.c (dump_gimple_expr): New function.
6813 (dump_gimple_expr_loc): Likewise.
6815 2018-07-02 Jeff Law <law@redhat.com>
6817 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6818 the H8/300, H8/300H and H8/S variants into a single pattern.
6819 (movhi_h8300, movqi_h8300hs): Similarly.
6820 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6821 (QHI mode iterator): New.
6823 * config/h8300/h8300.md: Remove trailing whitespace.
6825 2018-07-02 Jim Wilson <jimw@sifive.com>
6827 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6828 instead of emit_insn for interrupt returns.
6829 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6830 (riscv_sret, riscv_uret): Likewise.
6832 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6834 * pretty-print.c (selftest::test_pp_format): Move save and restore
6835 of quotes to class auto_fix_quotes, and add an instance.
6836 * selftest.c: Include "intl.h".
6837 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6838 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6839 * selftest.h (selftest::auto_fix_quotes): New class.
6841 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6843 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6844 (aarch64_sve_prepare_conditional_op): Remove.
6845 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6846 Allow aarch64_simd_reg_or_zero as select operand; remove
6847 the aarch64_sve_prepare_conditional_op call.
6848 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6849 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6850 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6851 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6852 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6853 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6854 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6855 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6856 and a splitters to match all of the *_any patterns.
6857 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6859 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6860 (SVE_COND_FP_BINARY_REV): Remove.
6861 (sve_int_op_rev, sve_fp_op_rev): New.
6862 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6863 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6864 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6865 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6866 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6867 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6868 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6869 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6870 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6872 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6873 Remove match_dup 1 from the inner unspec.
6874 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6876 * config/aarch64/aarch64.md (movprfx): New attr.
6877 (length): Default movprfx to 8.
6878 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6879 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6880 (*<su>mul<SVE_I>3_highpart): Likewise.
6881 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6882 (*v<ASHIFT><SVE_I>3): Likewise.
6883 (*<su><MAXMIN><SVE_I>3): Likewise.
6884 (*<su><MAXMIN><SVE_F>3): Likewise.
6885 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6886 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6887 (*div<SVE_F>4): Likewise.
6889 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6891 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6894 2018-07-02 Richard Biener <rguenther@suse.de>
6896 PR tree-optimization/86363
6897 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6898 memset argument refers to a non-variable address.
6900 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6902 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6903 {PLUS,MINUS}_EXPR code to...
6904 (adjust_symbolic_bound): ...here,
6905 (combine_bound): ...here,
6906 (set_value_range_with_overflow): ...and here.
6908 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6910 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6912 (extract_range_from_abs_expr): ...here.
6914 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6916 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6917 -fno-omit-frame-pointer when not optimizing.
6919 2018-07-02 Martin Liska <mliska@suse.cz>
6922 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6923 (propagate_nothrow): Likewise.
6925 2018-07-02 Martin Liska <mliska@suse.cz>
6928 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6930 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6932 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6933 function in r262149, changing "loc" param from source_location to
6934 const dump_location_t &.
6935 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6936 declaration, as above.
6938 2018-07-01 Paul Koning <ni1d@arrl.net>
6940 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6941 -munit-asm, -mgnu-asm, -mdec-asm.
6942 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6943 (pdp11_output_labelref): New.
6944 (pdp11_output_def): New.
6945 (pdp11_output_addr_vec_elt): New.
6946 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6947 %# and %@ format codes.
6948 (pdp11_option_override): New.
6949 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6950 (pdp11_output_ident): New.
6951 (pdp11_asm_named_section): New.
6952 (pdp11_asm_init_sections): New.
6953 (pdp11_file_start): New.
6954 (pdp11_file_end): New.
6955 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6956 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6957 %o, like %c but octal.
6958 (pdp11_option_override): New.
6959 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6961 (DATA_SECTION_ASM_OP): Ditto.
6962 (READONLY_DATA_SECTION_ASM_OP): New.
6963 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6964 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6965 (ASM_OUTPUT_LABELREF): Ditto.
6966 (ASM_OUTPUT_DEF): Ditto.
6967 (ASM_OUTPUT_EXTERNAL): New.
6968 (ASM_OUTPUT_SOURCE_FILENAME): New.
6969 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6970 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6971 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6972 %# and %@ format codes.
6973 * config/pdp11/pdp11.opt (mgnu-asm): New.
6974 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6975 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6976 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6978 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6980 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6981 dereferencing path[] beyond its length.
6983 (debug_all_paths): New.
6984 (rewire_first_differing_edge): New.
6985 (adjust_paths_after_duplication): New.
6986 (duplicate_thread_path): Call adjust_paths_after_duplication.
6988 (thread_through_all_blocks): Add new argument to
6989 duplicate_thread_path.
6991 2018-06-30 Jim Wilson <jimw@sifive.com>
6993 * config/riscv/predicates.md (p2m1_shift_operand): New.
6994 (high_mask_shift_operand): New.
6995 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6996 pattern using p2m1_shift_operand.
6997 (lshsi3_zero_extend_3+2): New combiner pattern using
6998 high_mask_shift_operand.
7000 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7002 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7004 (vect_recog_rotate_pattern): ...here.
7005 (vect_convert_input): Try to insert casts of invariants in the
7007 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7008 preheader to be empty.
7010 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7012 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7013 vector type. If given, install it in the new statement's
7015 (vect_element_precision): New function.
7016 (vect_unpromoted_value): New struct.
7017 (vect_unpromoted_value::vect_unpromoted_value): New function.
7018 (vect_unpromoted_value::set_op): Likewise.
7019 (vect_look_through_possible_promotion): Likewise.
7020 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7021 (vect_widened_op_tree, vect_convert_input): Likewise.
7022 (vect_convert_inputs, vect_convert_output): Likewise.
7023 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7024 to handle the optional cast of the multiplication result and
7025 vect_widened_op_tree to detect the widened multiplication itself.
7026 Do not require the input and output of promotion casts to have
7027 the same sign, but base the signedness of the operation on the
7028 input rather than the result. If the pattern includes two
7029 promotions, check that those promotions have the same sign.
7030 Do not restrict the MULT_EXPR handling to a double-width result;
7031 handle quadruple-width results and wider. Use vect_convert_inputs
7032 to convert the inputs to the common type.
7033 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7034 to handle the optional cast of the ABS result. Also allow a sign
7035 change or a sign extension between the ABS and MINUS.
7036 Use vect_widened_op_tree to detect the widened subtraction and use
7037 vect_convert_inputs to convert the inputs to the common type.
7038 (vect_handle_widen_op_by_const): Delete.
7039 (vect_recog_widen_op_pattern): New function.
7040 (vect_recog_widen_mult_pattern): Use it.
7041 (vect_recog_widen_shift_pattern): Likewise.
7042 (vect_recog_widen_sum_pattern): Use
7043 vect_look_through_possible_promotion to handle the promoted
7046 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7048 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7049 the containing gimple_seq *.
7050 * gimple-iterator.h (gsi_for_stmt): Declare it.
7051 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7052 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7053 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7054 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7055 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7057 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7059 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7060 statement being replaced is part of an existing pattern
7061 definition sequence, inserting the new pattern statements before
7063 (vect_pattern_recog_1): Don't return a bool. If the statement
7064 is already part of a pattern, instead apply pattern matching
7065 to the pattern definition statements. Don't clear the
7066 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7067 (vect_pattern_recog): Don't break after the first match;
7068 continue processing the pattern definition statements instead.
7069 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7071 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7073 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7074 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7075 (vect_recog_widen_sum_pattern): Use it.
7077 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7079 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7080 phi is not a pattern statement and has not been replaced by
7081 a pattern statement.
7082 * tree-vect-patterns.c (type_conversion_p): Don't check
7083 STMT_VINFO_IN_PATTERN_P.
7084 (vect_recog_vector_vector_shift_pattern): Likewise.
7085 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7086 the pattern statement rather than the original statement; check
7087 directly for a WIDEN_MULT_EXPR here.
7088 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7089 vect_is_simple_use to return the pattern statement rather
7090 than the original statement; use is_pattern_stmt_p to check
7091 for such a pattern statement.
7092 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7093 to return the pattern statement rather than the original statement;
7094 don't do the same transformation here.
7095 (vect_is_simple_use): If the defining statement has been replaced
7096 by a pattern statement, return the pattern statement instead.
7097 Remove the corresponding (local) transformation from the vectype
7100 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7102 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7103 end and default to null.
7104 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7105 (vectorizable_reduction): Update calls accordingly, dropping the
7106 gimple ** argument if the passed-back statement isn't needed.
7107 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7108 (vect_recog_rotate_pattern): Likewise.
7109 (vect_recog_mask_conversion_pattern): Likewise.
7110 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7111 (vect_mask_constant_operand_p): Likewise.
7112 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7113 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7114 (get_group_load_store_type, get_load_store_type): Likewise.
7115 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7116 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7117 (vectorizable_conversion, vectorizable_assignment): Likewise.
7118 (vectorizable_shift, vectorizable_operation): Likewise.
7119 (vectorizable_store, vect_is_simple_cond): Likewise.
7120 (vectorizable_condition, vectorizable_comparison): Likewise.
7121 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7122 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7123 and move it to the end. Cope with null def_stmt_outs.
7125 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7127 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7129 2018-06-29 Jeff Law <law@redhat.com>
7131 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7132 displacements for TARGET_V850E2V3 and newer.
7133 (TARGET_LRA_P): Remove. Defaults to LRA now.
7134 * config/v850/v850.md (sign23byte_load): Remove.
7135 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7136 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7138 2018-06-29 Martin Liska <mliska@suse.cz>
7141 * coverage.c (coverage_init): Mangle full path name.
7142 * doc/invoke.texi: Document the change.
7143 * gcov-io.c (mangle_path): New.
7144 * gcov-io.h (mangle_path): Likewise.
7145 * gcov.c (mangle_name): Use mangle_path for path mangling.
7147 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7149 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7150 if starting source register is not even.
7152 2018-06-29 Martin Liska <mliska@suse.cz>
7154 PR tree-optimization/86263
7155 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7156 Make edge redirection.
7158 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7160 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7161 (dump_scope_depth): New variable.
7162 (get_dump_scope_depth): New function.
7163 (dump_begin_scope): New function.
7164 (dump_end_scope): New function.
7165 * dumpfile.h (get_dump_scope_depth): New declaration.
7166 (dump_begin_scope): New declaration.
7167 (dump_end_scope): New declaration.
7168 (class auto_dump_scope): New class.
7169 (AUTO_DUMP_SCOPE): New macro.
7170 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7173 2018-06-29 Richard Biener <rguenther@suse.de>
7175 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7176 compute_all_dependences succeeds.
7177 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7178 exceed --param loop-max-datarefs-for-datadeps.
7180 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7182 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7184 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7187 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7188 alternative 0 in preferred_for_speed attribute.
7190 2018-06-28 Paul Koning <ni1d@arrl.net>
7192 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7193 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7194 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7195 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7196 for shift insn patterns.
7198 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7200 * cgraph.c (cgraph_node::get_body): Replace assignments to
7201 "dump_file" with calls to set_dump_file.
7202 * dumpfile.c (alt_dump_file): Make static, and group with...
7203 (alt_flags): ...this definition.
7204 (dumps_are_enabled): New variable.
7205 (refresh_dumps_are_enabled): New function.
7206 (set_dump_file): New function.
7207 (set_alt_dump_file): New function.
7208 (gcc::dump_manager::dump_start): Replace assignments to
7209 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7211 (gcc::dump_manager::dump_finish): Likewise.
7212 * dumpfile.h (alt_dump_file): Delete decl.
7213 (dumps_are_enabled): New variable decl.
7214 (set_dump_file): New function decl.
7215 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7217 * tree-nested.c (lower_nested_functions): Replace assignments to
7218 "dump_file" with calls to set_dump_file.
7220 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7222 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7223 goto_locus of each outgoing edge of each basic block.
7225 2018-06-28 Richard Biener <rguenther@suse.de>
7227 * dwarf2out.c (decl_scope_table): Remove.
7228 (push_decl_scope): Likewise.
7229 (pop_decl_scope): Likewise.
7230 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7231 (gen_struct_or_union_type_die): Likewise.
7232 (gen_tagged_type_die): Likewise.
7233 (dwarf2out_init): Do not initialize decl_scope_table.
7234 (dwarf2out_c_finalize): Do not free it.
7236 2018-06-28 Richard Biener <rguenther@suse.de>
7238 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7239 deciding whether to not re-use a DIE.
7241 2018-06-28 Richard Biener <rguenther@suse.de>
7243 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7244 DW_AT_abstract_origin attribute.
7246 2018-06-28 Martin Liska <mliska@suse.cz>
7248 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7249 Use newly introduced constants.
7250 * tree-switch-conversion.h (struct jump_table_cluster):
7251 Define max_ratio_for_size and max_ratio_for_speed.
7253 2018-06-28 Martin Liska <mliska@suse.cz>
7255 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7256 Add new checking assert to catch invalid state.
7257 (jump_table_cluster::can_be_handled): Handle single case
7259 (jump_table_cluster::is_beneficial): Bail out for such case.
7260 (bit_test_cluster::find_bit_tests):
7261 Add new checking assert to catch invalid state.
7262 (bit_test_cluster::can_be_handled): Handle single case
7264 (bit_test_cluster::is_beneficial): Bail out for such case.
7265 (switch_decision_tree::analyze_switch_statement):
7268 2018-06-28 Martin Liska <mliska@suse.cz>
7270 * common.opt: Introduce -completion option.
7271 * gcc.c (driver_handle_option): Handle it.
7272 (driver::main): Print completions if completion
7274 * opt-suggestions.c (option_proposer::get_completions):
7276 (option_proposer::suggest_completion): Likewise.
7277 (option_proposer::find_param_completions): Likewise.
7278 (verify_autocompletions): Likewise.
7279 (test_completion_valid_options): Likewise.
7280 (test_completion_valid_params): Likewise.
7281 (in_completion_p): Likewise.
7282 (empty_completion_p): Likewise.
7283 (test_completion_partial_match): Likewise.
7284 (test_completion_garbage): Likewise.
7285 (opt_proposer_c_tests): Likewise.
7286 * opt-suggestions.h: Declare new functions.
7287 * opts.c (common_handle_option): Handle OPT__completion_.
7288 * selftest-run-tests.c (selftest::run_tests): Add
7289 opt_proposer_c_tests.
7290 * selftest.c (assert_str_startswith): New.
7291 * selftest.h (assert_str_startswith): Likewise.
7292 (opt_proposer_c_tests): New.
7293 (ASSERT_STR_STARTSWITH): Likewise.
7295 2018-06-28 Martin Liska <mliska@suse.cz>
7297 * Makefile.in: Add opt-suggestions.o.
7298 * gcc-main.c: Include opt-suggestions.h.
7299 * gcc.c (driver::driver): Likewise.
7300 (driver::~driver): Remove m_option_suggestions.
7301 (driver::build_option_suggestions): Moved to option_proposer.
7302 (driver::suggest_option): Likewise.
7303 (driver::handle_unrecognized_options): Use option_proposer.
7304 * gcc.h (class driver): Add new memver m_option_proposer.
7305 * opt-suggestions.c: New file.
7306 * opt-suggestions.h: New file.
7308 2018-06-28 Martin Liska <mliska@suse.cz>
7310 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7311 (auto_string_vec::~auto_string_vec): Likewise.
7313 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7315 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7316 prevent_decl_creation_for_types fields up and add reset_location field.
7317 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7318 statement if id->reset_location is true.
7319 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7320 id->reset_location is true.
7321 (copy_phis_for_bb): Force input_location on the arguments if
7322 id->reset_location is true.
7323 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7324 is set on the function to be inlined.
7326 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7328 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7330 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7332 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7333 registers for Pmode.
7334 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7335 hard registers for the clobbered pseudo.
7337 2018-06-27 Paul Koning <ni1d@arrl.net>
7339 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7340 mutually exclusive options.
7341 * config/pdp11/constraints.md (h): New constraint.
7342 (O): Update definition to match shift code generation.
7343 (D): New constraint.
7344 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7346 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7348 (output_jump): Change arguments.
7349 (pdp11_fixed_cc_regs): New function.
7350 (pdp11_cc_mode): Ditto.
7351 (pdp11_expand_shift): Ditto.
7352 (pdp11_assemble_shift): Ditto.
7353 (pdp11_small_shift): Ditto.
7354 (pdp11_branch_cost): Remove.
7355 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7357 (pdp11_register_move_cost): Update for CC registers.
7358 (pdp11_rtx_costs): Add case for LSHIFTRT.
7359 (pdp11_output_jump): Add CCNZ mode conditional branches.
7360 (notice_update_cc_on_set): Remove.
7361 (pdp11_cc_mode): New function.
7362 (simple_memory_operand): Correct pre/post decrement case.
7363 (no_side_effect_operand): New function.
7364 (pdp11_regno_reg_class): Add CC_REGS class.
7365 (pdp11_fixed_cc_regs): New function.
7366 (pdp11_small_shift): New function.
7367 (pdp11_expand_shift): New function to expand shift insns.
7368 (pdp11_assemble_shift): New function to output shifts.
7369 (pdp11_branch_cost): Remove.
7370 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7371 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7372 (WCHAR_TYPE): Ditto.
7373 (PTRDIFF_TYPE): Ditto.
7374 (ADJUST_INSN_LENGTH): New macro.
7375 (FIXED_REGISTERS): Add CC registers.
7376 (CALL_USED_REGISTERS): Ditto.
7378 (REG_CLASS_NAMES): Ditto.
7379 (REG_CLASS_CONTENTS): Ditto.
7380 (SELECT_CC_MODE): Use new function.
7381 (TARGET_FLAGS_REGNUM): New macro.
7382 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7383 (cc0_reg_rtx): Remove.
7384 (CC_STATUS_MDEP): Remove.
7385 (CC_STATUS_MDEFP_INIT): Remove.
7386 (CC_IN_FPU): Remove.
7387 (NOTICE_UPDATE_CC): Remove.
7388 (REGISTER_NAMES): Add CC registers.
7389 (BRANCH_COST): Change to constant 1.
7390 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7392 * config/pdp11/pdp11.opt (mbcopy): Remove.
7393 (mbcopy-builtin): Remove.
7394 (mbranch-cheap): Remove.
7395 (mbranch-expensive): Remove.
7396 * config/pdp11/predicates.md (expand_shift_operand): Update to
7397 match shift code generation.
7398 (ccnz_operator): New predicate.
7399 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7400 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7401 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7403 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7404 description of O constraint.
7406 2018-06-27 Jeff Law <law@redhat.com>
7407 Austin Law <austinklaw@gmail.com>
7409 * config/v850/v850.md (addsi3_set_flags): New pattern.
7410 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7411 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7412 (zero_extendhisi2_v850_set_flags): Likewise.
7413 (zero_extendqisi2_v850_set_flags): Likewise.
7414 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7415 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7416 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7418 * config/v850/v850-protos.h (notice_update_cc): Remove.
7419 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7420 (v850_print_operand): Handle 'D' and "d".
7421 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7422 Add handling of arithmetic/logical operations compared against zero.
7423 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7424 Do not look at v850_compare_op, instead get mode from last argument.
7425 (v850_gen_compare): Remove
7426 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7427 after reload for prologue insns.
7428 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7430 (construct_save_jarl): Likewise.
7431 (TARGET_FLAGS_REGNUM): Define.
7432 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7433 (NOTICE_UPDATE_CC): Remove.
7434 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7435 than cc0. Conditionalize on reload_completed.
7436 (cmpsi_insn, setfcc_insn): Likewise.
7437 (tst1 splitter): Turn into define_and_split which sets the flags
7439 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7440 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7441 (cstoresf4, cstoredf4): Clobber the flags.
7442 (cmpsi, cmpsf, cmpdf): Remove expanders.
7443 (setf_insn): Remove pattern.
7444 (addsi3): Turn into define_and_split which clobbers the flags after
7445 reload and a suitable pattern (addsi3_clobber_flags) for use after
7447 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7448 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7449 (ashrsi3, ashrsi3_v850e2): Likewise.
7450 (bins): Clobber the flags.
7451 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7452 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7453 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7454 (call_value_internal_short, call_value_internal_long): Likewise.
7455 (callt_save_interrupt, callt_return_interrupt): Likewise.
7456 (save_interrupt, return_interrupt): Likewise.
7457 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7458 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7459 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7460 (All FP comparisons): Only allow after reload has completed.
7462 (divh, divhu): Tweak output template.
7463 (branch_z_normal, branch_z_invert): Remove
7464 (branch_nz_normal, branch_nz_invert): Likewise.
7465 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7467 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7468 * config/v850/v850.c (notice_update_cc): Remove.
7469 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7470 (CC_NO_CARRY): Likewise.
7471 (NOTICE_UPDATE_CC): Define to nothing.
7472 * config/v850/v850.md: Remove block comment on cc0 handling
7473 Remove "cc" attribute from all patterns. Remove cc_status handling
7474 from all patterns. Minor formatting fixes.
7476 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7478 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7479 (cortex-a76.cortex-a55): Likewise.
7480 * config/aarch64/aarch64-tune.md: Regenerate.
7481 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7482 cortex-a76.cortex-a55.
7484 2018-06-27 Jeff Law <law@redhat.com>
7486 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7487 (MULTILIB_DIRNAMES): Similarly.
7489 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7491 * gimple.h (gimple_return_retbnd): Delete.
7492 (gimple_return_set_retbnd): Likewise.
7493 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7494 gimple_return_set_retbnd.
7495 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7496 gimple_return_retbnd and adjust.
7497 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7498 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7499 Explicitly return NULL in a couple more cases. Move assertion
7500 on debug statements and remove unreachable code.
7501 (reset_debug_binding): Do not test id->retbnd.
7502 (expand_call_inline): Do not set it.
7504 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7506 * configure.ac: Add --disable-gcov option.
7507 * configure: Regenerate.
7508 * Makefile.in: Honour @enable_gcov@.
7509 * doc/install.texi: Document --disable-gcov.
7511 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7513 * config/arm/arm-cpus.in (cortex-a76): New entry.
7514 (cortex-a76.cortex-a55): Likewise.
7515 * config/arm/arm-tables.opt: Regenerate.
7516 * config/arm/arm-tune.md: Likewise.
7517 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7518 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7519 cortex-a76.cortex-a55.
7521 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7524 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7526 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7528 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7530 (EPILOGUE_USES): Likewise.
7532 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7534 * tree-inline.c (remap_location): New function extracted from...
7535 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7536 (copy_phis_for_bb): ...here. Call remap_location.
7537 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7539 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7541 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7542 unaligned vsx for 16B memset.
7544 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7547 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7548 ieee128_float_type_node to long_double_type_node unless
7549 TARGET_LONG_DOUBLE_128 is set.
7551 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7553 * cfgloop.c (get_loop_location): Convert return type from
7554 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7555 by implicit construction from rtx_insn *, and using
7556 dump_user_location_t::from_function_decl for the fallback case.
7557 * cfgloop.h (get_loop_location): Convert return type from
7558 location_t to dump_user_location_t.
7559 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7560 dump_printf_loc to pass in a dump_location_t rather than a
7561 location_t, via the gimple stmt.
7562 * coverage.c (get_coverage_counts): Update calls to
7563 dump_printf_loc to pass in dump_location_t rather than a
7565 * doc/optinfo.texi (Dump types): Convert example of
7566 dump_printf_loc from taking "locus" to taking "insn". Update
7567 description of the "_loc" calls to cover dump_location_t.
7568 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7570 (dump_user_location_t::dump_user_location_t): New constructors,
7571 from gimple *stmt and rtx_insn *.
7572 (dump_user_location_t::from_function_decl): New function.
7573 (dump_loc): Make static.
7574 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7575 const dump_location_t &.
7576 (dump_generic_expr_loc): Delete.
7577 (dump_printf_loc): Convert param "loc" from location_t to
7578 const dump_location_t &.
7579 (selftest::test_impl_location): New function.
7580 (selftest::dumpfile_c_tests): New function.
7581 * dumpfile.h: Include "profile-count.h".
7582 (class dump_user_location_t): New class.
7583 (struct dump_impl_location_t): New struct.
7584 (class dump_location_t): New class.
7585 (dump_printf_loc): Convert 2nd param from source_location to
7586 const dump_location_t &.
7587 (dump_generic_expr_loc): Delete.
7588 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7589 const dump_location_t &.
7590 * gimple-fold.c (fold_gimple_assign): Update call to
7591 dump_printf_loc to pass in a dump_location_t rather than a
7592 location_t, via the gimple stmt.
7593 (gimple_fold_call): Likewise.
7594 * gimple-loop-interchange.cc
7595 (loop_cand::analyze_iloop_reduction_var): Update for change to
7596 check_reduction_path.
7597 (tree_loop_interchange::interchange): Update for change to
7599 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7600 change in return-type of find_loop_location.
7601 (graphite_regenerate_ast_isl): Likewise.
7602 * graphite-optimize-isl.c (optimize_isl): Likewise.
7603 * graphite.c (graphite_transform_loops): Likewise.
7604 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7605 pass in a dump_location_t rather than a location_t, via the
7607 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7608 * ipa.c (walk_polymorphic_call_targets): Likewise.
7609 * loop-unroll.c (report_unroll): Convert "locus" param from
7610 location_t to dump_location_t.
7611 (decide_unrolling): Update for change to get_loop_location's
7613 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7614 location_t to dump_user_location_t.
7615 (grid_find_single_omp_among_assignments_1): Updates calls to
7616 dump_printf_loc to pass in a dump_location_t rather than a
7617 location_t, via the gimple stmt.
7618 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7619 location_t to dump_location_t. Updates calls to dump_printf_loc
7620 to pass in a dump_location_t rather than a location_t, via the
7622 (grid_inner_loop_gridifiable_p): Likewise.
7623 (grid_dist_follows_simple_pattern): Likewise.
7624 (grid_gfor_follows_tiling_pattern): Likewise.
7625 (grid_target_follows_gridifiable_pattern): Likewise.
7626 (grid_attempt_target_gridification): Convert initialization
7627 of local "grid" from memset to zero-initialization; FIXME: does
7628 this require C++11? Update call to dump_printf_loc to pass in a
7629 optinfo_location rather than a location_t, via the gimple stmt.
7630 * profile.c (read_profile_edge_counts): Updates call to
7631 dump_printf_loc to pass in a dump_location_t rather than a
7633 (compute_branch_probabilities): Likewise.
7634 * selftest-run-tests.c (selftest::run_tests): Call
7636 * selftest.h (dumpfile_c_tests): New decl.
7637 * tree-loop-distribution.c (pass_loop_distribution::execute):
7638 Update for change in return type of find_loop_location.
7639 * tree-parloops.c (parallelize_loops): Likewise.
7640 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7641 "locus" from location_t to dump_user_location_t.
7642 (canonicalize_loop_induction_variables): Likewise.
7643 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7644 for change in return type of find_loop_location.
7645 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7646 to dump_printf_loc to pass in a dump_location_t rather than a
7647 location_t, via the stmt.
7648 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7650 * tree-vect-loop-manip.c (find_loop_location): Convert return
7651 type from source_location to dump_user_location_t.
7652 (vect_do_peeling): Update for above change.
7653 (vect_loop_versioning): Update for change in type of
7655 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7656 from location_t to dump_user_location_t.
7657 (vect_estimate_min_profitable_iters): Update for change in type
7659 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7660 location_t to dump_location_t.
7661 (vect_slp_bb): Update for change in type of vect_location.
7662 * tree-vectorizer.c (vect_location): Convert from source_location
7663 to dump_user_location_t.
7664 (try_vectorize_loop_1): Update for change in vect_location's type.
7665 (vectorize_loops): Likewise.
7666 (increase_alignment): Likewise.
7667 * tree-vectorizer.h (vect_location): Convert from source_location
7668 to dump_user_location_t.
7669 (find_loop_location): Convert return type from source_location to
7670 dump_user_location_t.
7671 (check_reduction_path): Convert 1st param from location_t to
7672 dump_user_location_t.
7673 * value-prof.c (check_counter): Update call to dump_printf_loc to
7674 pass in a dump_user_location_t rather than a location_t; update
7675 call to error_at for change in type of "locus".
7676 (check_ic_target): Update call to dump_printf_loc to
7677 pass in a dump_user_location_t rather than a location_t, via the
7680 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7682 * config/s390/s390.h (enum processor_flags): Do not use
7683 default tune parameter when -march was specified.
7685 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7688 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7689 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7692 2018-06-26 Richard Biener <rguenther@suse.de>
7694 PR tree-optimization/86287
7696 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7697 (vect_analyze_loop): Initialize n_stmts.
7699 2018-06-26 Richard Biener <rguenther@suse.de>
7702 * fold-const.c (fold_convertible_p): Pointer extension
7705 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7708 * dwarf2out.c (loc_list_has_views): Adjust comments.
7709 (dw_loc_list): Split single cross-partition range with
7712 2018-06-25 Jeff Law <law@redhat.com>
7714 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7715 on -mbig-switch by default.
7717 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7719 (const_float_0_operand): Remove unused predicate.
7720 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7721 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7722 (recipsf2): New expander. Original pattern now called
7724 (recipdf2, recipdf2_insn): Similarly.
7725 (rsqrtsf2, rsqrtsf2_insn): Similarly
7726 (rsqrtdf2, rsqrtdf2_insn): Similarly
7728 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7730 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7731 Simplify logic for FreeBSD (twice).
7733 2018-06-25 Martin Sebor <msebor@redhat.com>
7735 PR tree-optimization/86204
7736 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7737 a strnlen result if it's less than the length of the string.
7739 2018-06-25 Martin Sebor <msebor@redhat.com>
7741 PR tree-optimization/85700
7742 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7743 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7744 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7746 2018-06-25 Martin Sebor <msebor@redhat.com>
7748 * doc/extend.texi (Zero-length arrays): Update and clarify.
7750 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7752 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7753 added IEEE/IBM long double multilib support on PowerPC little
7754 endian Linux systems.
7755 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7756 (MULTILIB_DEFAULTS): Likewise.
7757 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7759 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7760 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7761 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7763 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7766 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7767 (REORDER_45): Likewise.
7769 2018-06-25 Jeff Law <law@redhat.com>
7771 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7772 dividend to 32 bits. Adjust length.
7773 (udivmodhi4): Cleanup output template. Fix length.
7775 2018-06-25 Carl Love <cel@us.ibm.com>
7777 * config/rs6000/vsx.md: Change word selector to prefered location.
7779 2018-06-25 Richard Biener <rguenther@suse.de>
7781 PR tree-optimization/86304
7782 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7783 epilogue-if-converted loops as well.
7785 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7787 * lto-section-out.c (lto_begin_section): Do not print section
7788 name for noaddr and unnumbered dumps.
7790 2018-06-25 Richard Biener <rguenther@suse.de>
7792 * tree-vectorizer.h (struct vec_info_shared): New structure
7793 with parts split out from struct vec_info and loop_nest from
7794 struct _loop_vec_info.
7795 (struct vec_info): Adjust accordingly.
7796 (struct _loop_vec_info): Likewise.
7797 (LOOP_VINFO_LOOP_NEST): Adjust.
7798 (LOOP_VINFO_DATAREFS): Likewise.
7799 (LOOP_VINFO_DDRS): Likewise.
7800 (struct _bb_vec_info): Likewise.
7801 (BB_VINFO_DATAREFS): Likewise.
7802 (BB_VINFO_DDRS): Likewise.
7803 (struct _stmt_vec_info): Add dr_aux member.
7804 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7805 (DR_MISALIGNMENT_UNINITIALIZED): New.
7806 (set_dr_misalignment): Adjust.
7807 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7808 (vect_analyze_loop): Adjust prototype.
7809 (vect_analyze_loop_form): Likewise.
7810 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7811 Compute dependences lazily.
7812 (vect_record_base_alignments): Use shared datarefs/ddrs.
7813 (vect_verify_datarefs_alignment): Likewise.
7814 (vect_analyze_data_refs_alignment): Likewise.
7815 (vect_analyze_data_ref_accesses): Likewise.
7816 (vect_analyze_data_refs): Likewise.
7817 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7818 constructor parameter for shared part.
7819 (vect_analyze_loop_form): Pass in shared part and adjust.
7820 (vect_analyze_loop_2): Pass in storage for the number of
7821 stmts. Move loop nest finding to the caller. Compute
7823 (vect_analyze_loop): Pass in shared part.
7824 (vect_transform_loop): Verify shared datarefs are unchanged.
7825 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7826 constructor parameter for shared part.
7827 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7828 (vect_slp_bb): Verify shared datarefs are unchanged before
7830 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7832 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7833 DR_MISALIGNMENT_UNINITIALIZED.
7834 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7835 parameter for shared part.
7836 (vec_info::~vec_info): Adjust.
7837 (vec_info_shared::vec_info_shared): New.
7838 (vec_info_shared::~vec_info_shared): Likewise.
7839 (vec_info_shared::save_datarefs): Likewise.
7840 (vec_info_shared::check_datarefs): Likewise.
7841 (try_vectorize_loop_1): Construct shared part live for analyses
7842 of a single loop for multiple vector sizes.
7843 * tree-parloops.c (gather_scalar_reductions): Adjust.
7845 2018-06-25 Richard Biener <rguenther@suse.de>
7847 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7848 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7849 (vect_analyze_data_refs): Remove similar code from here and
7850 simplify accordingly.
7852 2018-06-25 Richard Biener <rguenther@suse.de>
7854 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7855 for reverse storage order accesses rather than asserting
7856 they cannot happen here.
7858 2018-06-25 Tom de Vries <tdevries@suse.de>
7861 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7862 Use data16 instead of .byte for insn prefix.
7864 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7867 * parser.c (make_char_string_pack): Pass this literal chars
7868 through cpp_interpret_string.
7869 (cp_parser_userdef_numeric_literal): Check the result of
7870 make_char_string_pack.
7872 2018-06-24 Maya Rashish <coypu@sdf.org>
7874 * ginclude/stddef.h: Simplify conditions around avoiding
7875 re-definition of __size_t.
7877 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7879 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7880 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7882 2018-06-22 Maya Rashish <coypu@sdf.org>
7884 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7885 made to OpenBSD and NetBSD through the years.
7887 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7889 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7890 behavior of vec_pack (vector double, vector double) to match
7891 behavior of vec_float2 (vector double, vector double).
7893 2018-06-22 Olivier Hainque <hainque@adacore.com>
7895 * gimplify.c (gimplify_function_tree): Prevent creation
7896 of a trampoline for the address of the current function
7897 passed to entry/exit instrumentation hooks.
7899 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7902 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7905 2018-06-22 Martin Liska <mliska@suse.cz>
7907 PR tree-optimization/86263
7908 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7909 Bail out if is_enabled is false.
7910 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7912 (jump_table_cluster::is_enabled): New function.
7914 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7916 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7917 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7918 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7919 (lto_input_ts_binfo_tree_pointers): Likewise.
7920 * tree-streamer-out.c (streamer_write_tree_bitfields,
7921 write_ts_binfo_tree_pointers): Likewise.
7922 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7924 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7926 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7928 2018-06-22 Martin Liska <mliska@suse.cz>
7930 * symbol-summary.h (get): Make it pure and inline move
7931 functionality from ::get function.
7932 (get): Remove and inline into ::get and ::get_create.
7933 (get_create): Move code from ::get function.
7935 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7938 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7939 -x assembler-with-cpp.
7941 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7943 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7944 _FILE_OFFSET_BITS=64 for C++.
7946 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7948 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7949 conversion insn that shows up when pr85657-3.c is compiled using
7950 IEEE 128-bit long double.
7951 (neg<mode>2_internal): Use the correct mode to check whether the
7952 mode is IBM extended.
7953 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7954 multiply and divide external functions from being created more
7957 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7959 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7961 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7962 the edge can be forwarded.
7963 (cfg_layout_merge_blocks): Likewise.
7965 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7967 * except.c (finish_eh_generation): Commit edge insertions only after
7968 the EH edges have been redirected from post-landing to landing pads.
7970 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7972 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7973 create_tmp_var_for to create the FRAME decl.
7974 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7976 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7978 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7979 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7980 debug statement when resetting its value.
7981 (expand_call_inline): Copy the locus of the call onto the assignment
7982 of the return value, if any. Use local variable in more cases.
7984 2018-06-21 Martin Liska <mliska@suse.cz>
7986 * ipa-pure-const.c (propagate_nothrow): Use
7987 funct_state_summaries->get.
7988 (dump_malloc_lattice): Likewise.
7989 (propagate_malloc): Likewise.
7991 2018-06-21 Richard Biener <rguenther@suse.de>
7993 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7994 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7995 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7997 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7998 BLOCK_ABSTRACT_ORIGIN unconditionally.
8000 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8002 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8004 * ipa-reference.c (ipa_reference_c_finalize): Delete
8005 ipa_ref_opt_sum_summaries and set it to NULL.
8007 2018-06-21 Tom de Vries <tdevries@suse.de>
8009 PR tree-optimization/85859
8010 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8011 test with comment from bb_no_side_effects_p.
8013 2018-06-21 Richard Biener <rguenther@suse.de>
8015 PR tree-optimization/86232
8016 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8017 max for constant niter.
8019 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8021 * config/aarch64/aarch64-simd.md
8022 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8024 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8026 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8027 Make opernads of the unspec commutative.
8029 2018-06-21 Richard Biener <rguenther@suse.de>
8031 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8032 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8033 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8034 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8036 (vect_record_base_alignments): Do not record base alignment
8037 for gathers or scatters.
8038 (vect_compute_data_ref_alignment): Drop return value that is always
8039 true. Bail out early for gathers or scatters.
8040 (vect_enhance_data_refs_alignment): Bail out early for gathers
8042 (vect_find_same_alignment_drs): Likewise.
8043 (vect_analyze_data_refs_alignment): Remove dead code.
8044 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8045 (vect_analyze_data_refs): For possible gathers or scatters do
8046 not create an alternate DR, just check their possible validity
8047 and mark them. Adjust DECL_NONALIASED handling to not rely
8049 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8050 update inits of gathers or scatters.
8051 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8052 Also copy gather/scatter flag to pattern vinfo.
8054 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8056 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8057 behavior of vec_packsu (vector unsigned long long, vector unsigned
8058 long long) to match behavior of vec_packs with same signature.
8060 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8061 Thomas Schwinge <thomas@codesourcery.com>
8062 Cesar Philippidis <cesar@codesourcery.com>
8064 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8065 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8066 (gimplify_adjust_omp_clauses): Likewise.
8067 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8068 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8069 (gimplify_omp_target_update): Update handling of acc update and
8071 * omp-low.c (install_var_field): Remove unused parameter
8072 base_pointers_restrict.
8073 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8074 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8076 (omp_target_base_pointers_restrict_p): Delete.
8077 (scan_omp_target): Update call to scan_sharing_clauses.
8078 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8080 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8081 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8082 (convert_local_omp_clauses): Likewise.
8083 * tree-pretty-print.c (dump_omp_clause): Likewise.
8084 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8086 (omp_clause_code_name): Likewise.
8088 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8091 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8094 PR tree-optimization/86231
8095 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8096 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8098 2018-06-20 Tom de Vries <tdevries@suse.de>
8100 PR tree-optimization/86097
8101 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8102 iv type if signedness of iv type is not the same as that of *nit.
8104 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8106 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8107 EDGE_EH edges, verify they are all EDGE_EH.
8109 2018-06-20 Maya Rashish <coypu@sdf.org>
8111 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8113 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8115 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8116 * config/aarch64/aarch64.c (xgene1_tunings): Add
8117 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8118 (aarch64_mode_valid_for_sched_fusion_p):
8119 Allow 16-byte modes.
8120 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8121 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8123 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8125 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8126 * config/aarch64/iterators.md (VQ2): New mode iterator.
8128 2018-06-20 Martin Liska <mliska@suse.cz>
8130 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8131 Change default ratio from 10 to 8.
8133 2018-06-20 Martin Liska <mliska@suse.cz>
8135 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8137 (bit_test_cluster::find_bit_tests): Likewise.
8138 (switch_decision_tree::analyze_switch_statement): Find clusters.
8139 * tree-switch-conversion.h (struct jump_table_cluster): Document
8142 2018-06-20 Martin Liska <mliska@suse.cz>
8144 * tree-switch-conversion.c (switch_conversion::collect):
8145 Record m_uniq property.
8146 (switch_conversion::expand): Bail out for special conditions.
8147 (group_cluster::~group_cluster): New.
8148 (group_cluster::group_cluster): Likewise.
8149 (group_cluster::dump): Likewise.
8150 (jump_table_cluster::emit): New.
8151 (switch_decision_tree::fix_phi_operands_for_edges): New.
8152 (struct case_node): Remove struct.
8153 (jump_table_cluster::can_be_handled): New.
8154 (case_values_threshold): Moved to header.
8155 (reset_out_edges_aux): Likewise.
8156 (jump_table_cluster::is_beneficial): New.
8157 (bit_test_cluster::can_be_handled): Likewise.
8158 (add_case_node): Remove.
8159 (bit_test_cluster::is_beneficial): New.
8160 (case_bit_test::cmp): New.
8161 (bit_test_cluster::emit): New.
8162 (expand_switch_as_decision_tree_p): Remove.
8163 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8164 (fix_phi_operands_for_edge): Likewise.
8165 (switch_decision_tree::analyze_switch_statement): New.
8166 (compute_cases_per_edge): Move ...
8167 (switch_decision_tree::compute_cases_per_edge): ... here.
8168 (try_switch_expansion): Likewise.
8169 (switch_decision_tree::try_switch_expansion): Likewise.
8170 (record_phi_operand_mapping): Likewise.
8171 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8172 (emit_case_decision_tree): Likewise.
8173 (switch_decision_tree::emit): Likewise.
8174 (balance_case_nodes): Likewise.
8175 (switch_decision_tree::balance_case_nodes): Likewise.
8176 (dump_case_nodes): Likewise.
8177 (switch_decision_tree::dump_case_nodes): Likewise.
8178 (emit_jump): Likewise.
8179 (switch_decision_tree::emit_jump): Likewise.
8180 (emit_cmp_and_jump_insns): Likewise.
8181 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8182 (emit_case_nodes): Likewise.
8183 (switch_decision_tree::emit_case_nodes): Likewise.
8184 (conditional_probability): Remove.
8185 * tree-switch-conversion.h (enum cluster_type): New.
8187 (struct cluster): Likewise.
8188 (cluster::cluster): Likewise.
8189 (struct simple_cluster): Likewise.
8190 (simple_cluster::simple_cluster): Likewise.
8191 (struct group_cluster): Likewise.
8192 (struct jump_table_cluster): Likewise.
8193 (struct bit_test_cluster): Likewise.
8194 (struct min_cluster_item): Likewise.
8195 (struct case_tree_node): Likewise.
8196 (case_tree_node::case_tree_node): Likewise.
8197 (jump_table_cluster::case_values_threshold): Likewise.
8198 (struct case_bit_test): Likewise.
8199 (struct switch_decision_tree): Likewise.
8200 (struct switch_conversion): Likewise.
8201 (switch_decision_tree::reset_out_edges_aux): Likewise.
8203 2018-06-20 Martin Liska <mliska@suse.cz>
8205 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8206 (hoist_edge_and_branch_if_true): Likewise.
8207 (expand_switch_using_bit_tests_p): Likewise.
8208 (struct case_bit_test): Likewise.
8209 (case_bit_test_cmp): Likewise.
8210 (emit_case_bit_tests): Likewise.
8211 (switch_conversion::switch_conversion): New class.
8212 (struct switch_conv_info): Remove old struct.
8213 (collect_switch_conv_info): More to ...
8214 (switch_conversion::collect): ... this.
8215 (check_range): Likewise.
8216 (switch_conversion::check_range): Likewise.
8217 (check_all_empty_except_final): Likewise.
8218 (switch_conversion::check_all_empty_except_final): Likewise.
8219 (check_final_bb): Likewise.
8220 (switch_conversion::check_final_bb): Likewise.
8221 (create_temp_arrays): Likewise.
8222 (switch_conversion::create_temp_arrays): Likewise.
8223 (free_temp_arrays): Likewise.
8224 (gather_default_values): Likewise.
8225 (switch_conversion::gather_default_values): Likewise.
8226 (build_constructors): Likewise.
8227 (switch_conversion::build_constructors): Likewise.
8228 (constructor_contains_same_values_p): Likewise.
8229 (switch_conversion::contains_same_values_p): Likewise.
8230 (array_value_type): Likewise.
8231 (switch_conversion::array_value_type): Likewise.
8232 (build_one_array): Likewise.
8233 (switch_conversion::build_one_array): Likewise.
8234 (build_arrays): Likewise.
8235 (switch_conversion::build_arrays): Likewise.
8236 (gen_def_assigns): Likewise.
8237 (switch_conversion::gen_def_assigns): Likewise.
8238 (prune_bbs): Likewise.
8239 (switch_conversion::prune_bbs): Likewise.
8240 (fix_phi_nodes): Likewise.
8241 (switch_conversion::fix_phi_nodes): Likewise.
8242 (gen_inbound_check): Likewise.
8243 (switch_conversion::gen_inbound_check): Likewise.
8244 (process_switch): Use the newly created class.
8245 (switch_conversion::expand): New.
8246 (switch_conversion::~switch_conversion): New.
8247 * tree-switch-conversion.h: New file.
8249 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8251 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8252 tree-vect-patterns.c.
8253 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8254 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8255 (vect_recog_sad_pattern): Likewise.
8256 (vect_recog_widen_sum_pattern): Likewise.
8257 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8258 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8259 (vect_recog_rotate_pattern): Likewise.
8260 (vect_recog_mult_pattern): Likewise.
8261 (vect_recog_vector_vector_shift_pattern): Likewise.
8262 (vect_recog_divmod_pattern): Likewise.
8263 (vect_recog_mixed_size_cond_pattern): Likewise.
8264 (vect_recog_bool_pattern): Likewise.
8265 (vect_recog_mask_conversion_pattern): Likewise.
8266 (vect_try_gather_scatter_pattern): Likewise.
8267 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8268 (vect_recog_over_widening_pattern): Likewise.
8269 (vect_recog_gather_scatter_pattern): Likewise.
8270 (vect_recog_func_ptr): Move from tree-vectorizer.h
8271 (vect_vect_recog_func_ptrs): Move further down the file.
8272 (vect_recog_func): Likewise. Remove the third argument.
8273 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8274 (vect_pattern_recog_1): Expect the pattern function to do any
8275 necessary target tests. Also expect it to provide a vector type.
8276 Remove the type_in handling.
8278 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8280 * tree-vect-patterns.c (vect_pattern_detected): New function.
8281 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8282 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8283 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8284 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8285 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8286 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8287 (vect_recog_mask_conversion_pattern)
8288 (vect_try_gather_scatter_pattern): Likewise.
8290 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8292 * tree-vect-patterns.c (vect_get_internal_def): New function.
8293 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8294 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8295 (search_type_for_mask_1): Use it.
8297 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8299 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8300 redundant WIDEN_SUM_EXPR handling.
8301 (vect_recog_sad_pattern): Likewise.
8303 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8305 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8306 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8307 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8308 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8309 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8311 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8313 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8314 use the stmt_vec_info of the original bb statement for the
8315 new zero assignment, even if the call is part of a pattern.
8317 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8319 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8320 that the sequence is attached to the original statement rather
8321 than the pattern statement.
8322 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8323 PATTERN_DEF_SEQ from the original statement rather than
8324 the main pattern statement.
8325 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8326 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8327 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8329 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8331 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8332 definition statements before the early exit for statements that aren't
8334 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8336 (vect_transform_loop): ...here. Process pattern definition
8337 statements without first checking whether the main pattern
8338 statement is live or relevant.
8340 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8342 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8343 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8345 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8347 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8348 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8349 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8350 (expand_block_compare): Change select_block_compare_mode call.
8351 (expand_strncmp_align_check): Use new functions, fix comment.
8352 (emit_final_str_compare_gpr): New function.
8353 (expand_strn_compare): Refactor and clean up code.
8354 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8356 2018-06-19 Tony Reix <tony.reix@atos.com>
8357 Damien Bergamini <damien.bergamini@atos.com>
8358 David Edelsohn <dje.gcc@gmail.com>
8360 * collect2.c (static_obj): New variable.
8361 (static_libs): New variable.
8362 (is_in_list): Uncomment declaration.
8363 (main): Track AIX libraries linked statically.
8364 (is_in_list): Uncomment definition.
8365 (scan_prog_file): Don't add AIX shared libraries initializer
8366 to constructor list if linking statically.
8368 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8370 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8372 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8374 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8376 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8379 2018-06-19 Martin Liska <mliska@suse.cz>
8381 * config/i386/i386.c (ix86_can_inline_p): Do not use
8382 ipa_fn_summaries::get_create.
8383 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8385 (devirtualization_time_bonus): Likewise.
8386 (ipcp_propagate_stage): Likewise.
8387 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8388 (edge_set_predicate): Likewise.
8389 (evaluate_conditions_for_known_args): Likewise.
8390 (evaluate_properties_for_edge): Likewise.
8391 (ipa_call_summary::reset): Tranform to ...
8392 (ipa_call_summary::~ipa_call_summary): ... this.
8393 (ipa_fn_summary::reset): Transform to ...
8394 (ipa_fn_summary::~ipa_fn_summary): ... this.
8395 (ipa_fn_summary_t::remove): Rename to ...
8396 (ipa_fn_summary_t::remove_callees): ... this.
8397 (ipa_fn_summary_t::duplicate): Use placement new
8398 instead of memory copy.
8399 (ipa_call_summary_t::duplicate): Likewise.
8400 (ipa_call_summary_t::remove): Remove.
8401 (dump_ipa_call_summary): Change get_create to get.
8402 (ipa_dump_fn_summary): Dump only when summary exists.
8403 (analyze_function_body): Use symbol_summary::get instead
8405 (compute_fn_summary): Likewise.
8406 (estimate_edge_devirt_benefit): Likewise.
8407 (estimate_edge_size_and_time): Likewise.
8408 (inline_update_callee_summaries): Likewise.
8409 (remap_edge_change_prob): Likewise.
8410 (remap_edge_summaries): Likewise.
8411 (ipa_merge_fn_summary_after_inlining): Likewise.
8412 (write_ipa_call_summary): Likewise.
8413 (ipa_fn_summary_write): Likewise.
8414 (ipa_free_fn_summary): Likewise.
8415 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8416 (struct ipa_call_summary): Likewise.
8417 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8419 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8420 (estimate_size_after_inlining): Likewise.
8421 (estimate_growth): Likewise.
8422 (growth_likely_positive): Likewise.
8423 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8424 (inline_call): Likewise.
8425 * ipa-inline.c (caller_growth_limits): Likewise.
8426 (can_inline_edge_p): Likewise.
8427 (can_inline_edge_by_limits_p): Likewise.
8428 (compute_uninlined_call_time): Likewise.
8429 (compute_inlined_call_time): Likewise.
8430 (want_inline_small_function_p): Likewise.
8431 (edge_badness): Likewise.
8432 (update_caller_keys): Likewise.
8433 (update_callee_keys): Likewise.
8434 (inline_small_functions): Likewise.
8435 (inline_to_all_callers_1): Likewise.
8436 (dump_overall_stats): Likewise.
8437 (early_inline_small_functions): Likewise.
8438 (early_inliner): Likewise.
8439 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8440 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8441 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8442 * ipa-split.c (execute_split_functions): Likewise.
8443 * symbol-summary.h: Likewise.
8444 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8446 2018-06-19 Richard Biener <rguenther@suse.de>
8448 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8449 (vectorize_loops): ... here. Fix dbgcnt handling.
8450 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8452 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8455 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8456 ieee128 argument takes up only one (vector) register, not two (floating
8459 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8461 * gimplify.c (gimplify_init_constructor): Really never clear for an
8462 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8464 2018-06-19 Richard Biener <rguenther@suse.de>
8466 PR tree-optimization/86179
8467 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8468 after failed recognition.
8470 2018-06-18 Martin Sebor <msebor@redhat.com>
8473 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8474 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8475 Handle integer subtraction.
8476 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8477 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8479 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8481 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8482 param from rtx to rtx_insn *.
8483 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8485 (frv_ifcvt_modify_insn): Likwise.
8486 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8487 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8488 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8489 as_a <rtx_insn *> cast to local "unprotected_region" once
8490 it's been established that it's not NULL or pc_rtx.
8491 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8492 param "sethi" from rtx to rtx_insn *.
8493 (nds32_group_float_insns): Likewise for param "insn".
8494 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8496 (vax_output_int_subtract): Likewise.
8497 * config/vax/vax.c (vax_output_int_add): Likewise for param
8499 (vax_output_int_subtract): Likewise.
8500 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8501 (emit_pattern_after): Likewise for param "after".
8502 (emit_insn_after): Likewise.
8503 (emit_jump_insn_after): Likewise.
8504 (emit_call_insn_after): Likewise.
8505 (emit_debug_insn_after): Likewise.
8506 (emit_pattern_before): Likewise for param "before".
8507 (emit_insn_before): Likewise.
8508 (emit_jump_insn_before): Likewise.
8509 * final.c (get_insn_template): Likewise for param "insn", removing
8511 * output.h (get_insn_template): Likewise for 2nd param.
8512 * rtl.h (emit_insn_before): Likewise.
8513 (emit_jump_insn_before): Likewise.
8514 (emit_debug_insn_before_noloc): Likewise.
8515 (emit_insn_after): Likewise.
8516 (emit_jump_insn_after): Likewise.
8517 (emit_call_insn_after): Likewise.
8518 (emit_debug_insn_after): Likewise.
8519 (set_insn_deleted): Likewise for param.
8521 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8524 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8525 floating point modes, so that IFmode is numerically greater than
8526 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8527 to declare the ordering. This prevents IFmode from being
8528 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8529 machine. Include rs6000-modes.h to share the fractional values
8530 between genmodes* and the rest of the compiler.
8534 * config/rs6000/rs6000-modes.h: New file.
8535 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8536 meaning of rs6000_long_double_size so that 126..128 selects an
8537 appropriate 128-bit floating point type.
8538 (rs6000_option_override_internal): Likewise.
8539 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8540 (TARGET_LONG_DOUBLE_128): Change the meaning of
8541 rs6000_long_double_size so that 126..128 selects an appropriate
8542 128-bit floating point type.
8543 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8544 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8545 source and destination to match the standard usage.
8546 (truncifkf2): Likewise.
8547 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8548 ISA 2.07 to use an explicit clobber, instead of passing in a
8550 (copysign<mode>3_soft): Likewise.
8552 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8554 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8555 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8556 (vect_slp_analyze_instance_dependence): Likewise.
8557 (vect_enhance_data_refs_alignment): Likewise.
8558 (vect_analyze_data_refs_alignment): Likewise.
8559 (vect_slp_analyze_and_verify_instance_alignment
8560 (vect_analyze_data_ref_accesses): Likewise.
8561 (vect_prune_runtime_alias_test_list): Likewise.
8562 (vect_analyze_data_refs): Likewise.
8563 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8564 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8565 (vect_analyze_scalar_cycles_1): Likewise.
8566 (vect_get_loop_niters): Likewise.
8567 (vect_analyze_loop_form_1): Likewise.
8568 (vect_update_vf_for_slp): Likewise.
8569 (vect_analyze_loop_operations): Likewise.
8570 (vect_analyze_loop): Likewise.
8571 (vectorizable_induction): Likewise.
8572 (vect_transform_loop): Likewise.
8573 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8574 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8575 (vect_make_slp_decision): Likewise.
8576 (vect_detect_hybrid_slp): Likewise.
8577 (vect_slp_analyze_operations): Likewise.
8578 (vect_slp_bb): Likewise.
8579 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8580 (vectorizable_bswap): Likewise.
8581 (vectorizable_call): Likewise.
8582 (vectorizable_simd_clone_call): Likewise.
8583 (vectorizable_conversion): Likewise.
8584 (vectorizable_assignment): Likewise.
8585 (vectorizable_shift): Likewise.
8586 (vectorizable_operation): Likewise.
8587 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8589 2018-06-18 Martin Sebor <msebor@redhat.com>
8591 PR tree-optimization/81384
8592 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8593 * builtins.c (expand_builtin_strnlen): New function.
8594 (expand_builtin): Call it.
8595 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8596 * builtins.def (BUILT_IN_STRNLEN): New.
8597 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8598 Warn for bounds in excess of maximum object size.
8599 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8600 single-value ranges. Handle strnlen.
8601 (handle_builtin_strlen): Handle strnlen.
8602 (strlen_check_and_optimize_stmt): Same.
8603 * doc/extend.texi (Other Builtins): Document strnlen.
8605 2018-06-18 Maya Rashish <coypu@sdf.org>
8607 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8608 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8609 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8611 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8613 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8615 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8617 * tree.c (escaped_string::escape): Replace cast to char * by
8618 const_cast<char *> (unescaped).
8620 2018-06-18 Nick Clifton <nickc@redhat.com>
8623 * tree.c (escaped_string): New class. Converts an unescaped
8624 string into its escaped equivalent.
8625 (warn_deprecated_use): Use the new class to convert the
8626 deprecation message, if present.
8627 (test_escaped_strings): New self test.
8628 (test_c_tests): Add test_escaped_strings.
8629 * doc/extend.texi (deprecated): Add a note that the
8630 deprecation message is affected by the -fmessage-length
8631 option, and that control characters will be escaped.
8632 (#pragma GCC error): Document this pragma.
8633 (#pragma GCC warning): Likewise.
8634 * doc/invoke.texi (-fmessage-length): Document this option's
8635 effect on the #warning and #error preprocessor directives and
8636 the deprecated attribute.
8638 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8640 * tree.c (decl_value_expr_lookup): Revert latest change.
8641 (decl_value_expr_insert): Likewise.
8643 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8645 * gimplify.c (nonlocal_vlas): Delete.
8646 (nonlocal_vla_vars): Likewise.
8647 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8649 (gimplify_body): Do not create and destroy nonlocal_vlas.
8650 * tree-nested.c: Include diagnostic.h.
8651 (use_pointer_in_frame): Tweak.
8652 (lookup_field_for_decl): Add assertion and declare the transformation.
8653 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8654 internal error when the reference is in a wrong context. Do not
8655 create a debug decl by default.
8656 (note_nonlocal_block_vlas): Delete.
8657 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8658 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8659 create a debug decl by default.
8660 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8661 call is in a wrong context.
8662 (fixup_vla_decls): New function.
8663 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8664 debug variables were created.
8665 * tree.c (decl_value_expr_lookup): Add checking assertion.
8666 (decl_value_expr_insert): Likewise.
8668 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8671 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8672 * tree-scalar-evolution.c (interpret_expr): Likewise.
8673 (expression_expensive_p): Likewise.
8674 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8675 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8676 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8677 (ssa_defined_by_minus_one_stmt_p): New.
8679 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8682 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8683 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8684 * dojump.c (do_jump): Likewise.
8685 * expr.c (expand_expr_real_2): Check operand type's sign.
8686 * fold-const.c (const_unop): Handle ABSU_EXPR.
8687 (fold_abs_const): Likewise.
8688 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8689 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8690 (strip_sign_op_1): Likesise.
8691 * match.pd: Add new pattern to generate ABSU_EXPR.
8692 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8693 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8694 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8695 * tree-inline.c (estimate_operator_cost): Likewise.
8696 * tree-pretty-print.c (dump_generic_node): Likewise.
8697 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8698 * tree.def (ABSU_EXPR): New.
8700 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8703 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8704 documented as preserved for backward compatibility only.
8705 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8707 PR rtl-optimization/86108
8708 * bb-reorder.c (create_forwarder_block): Renamed to ...
8709 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8710 jump from new landing pad to the second part.
8711 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8714 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8717 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8718 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8719 Only call store_expr for halves if the mode is the same.
8722 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8723 Fix up comment formatting.
8725 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8727 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8728 (typed_splay_tree::closure,
8729 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8730 (typed_splay_tree::typed_splay_tree,
8731 typed_splay_tree::operator =): Declared private.
8732 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8733 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8734 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8735 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8736 typed_splay_tree::splay_tree_splay,
8737 typed_splay_tree::splay_tree_foreach_helper,
8738 typed_splay_tree::splay_tree_insert,
8739 typed_splay_tree::splay_tree_remove,
8740 typed_splay_tree::splay_tree_lookup,
8741 typed_splay_tree::splay_tree_predecessor,
8742 typed_splay_tree::splay_tree_successor,
8743 typed_splay_tree::splay_tree_min,
8744 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8745 (typed_splay_tree::root, typed_splay_tree::comp,
8746 typed_splay_tree::delete_key,
8747 typed_splay_tree::delete_value): New data members.
8748 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8749 typed_splay_tree::remove.
8751 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8753 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8754 -mginv and -mno-ginv to the assembler.
8755 * config/mips/mips.opt (-mcrc): New option.
8757 * doc/invoke.text (-mcrc): Document.
8760 2018-06-15 Nick Clifton <nickc@redhat.com>
8763 * tree.c (escaped_string): New class. Converts an unescaped
8764 string into its escaped equivalent.
8765 (warn_deprecated_use): Use the new class to convert the
8766 deprecation message, if present.
8767 (test_escaped_strings): New self test.
8768 (test_c_tests): Add test_escaped_strings.
8769 * doc/extend.texi (deprecated): Add a note that the
8770 deprecation message is affected by the -fmessage-length
8771 option, and that control characters will be escaped.
8772 (#pragma GCC error): Document this pragma.
8773 (#pragma GCC warning): Likewise.
8774 * doc/invoke.texi (-fmessage-length): Document this option's
8775 effect on the #warning and #error preprocessor directives and
8776 the deprecated attribute.
8778 2018-06-15 Richard Biener <rguenther@suse.de>
8780 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8781 here, also noting vector size used.
8782 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8783 size used in MSG_OPTIMIZED_LOCATIONS dump.
8784 (pass_slp_vectorize::execute): Adjust.
8786 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8789 * config/arc/arc.c (arc_return_address_register): Fix
8792 2018-06-15 Richard Biener <rguenther@suse.de>
8795 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8796 leave useless conversion stripping to force_gimple_operand_gsi.
8797 (gimplify_build2): Likewise.
8798 (gimplify_build1): Likewise.
8800 2018-06-15 Richard Biener <rguenther@suse.de>
8803 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8804 before adjusting their block.
8806 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8808 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8809 multilibs for *-*-rtems*.
8810 * config/riscv/t-rtems: New file.
8812 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8815 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8816 unsigned_type_for returns NULL.
8819 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8820 subregs of multi-word pseudos unless the float mode has word size.
8822 2018-06-14 Richard Biener <rguenther@suse.de>
8825 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8826 duplicate and harmful type_hash_canon.
8827 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8829 2018-06-14 Richard Biener <rguenther@suse.de>
8832 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8835 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8837 * config/rtems.h (STDINT_LONG32): Define.
8839 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8840 Prachi Godbole <prachi.godbole@imgtec.com>
8842 * config/mips/mips-cpus.def: Define P6600.
8843 * config/mips/mips-tables.opt: Regenerate.
8844 * config/mips/mips.c (mips_ucbranch_type): New enum.
8845 (mips_rtx_cost_data): Add support for P6600.
8846 (mips_issue_rate): Likewise.
8847 (mips_multipass_dfa_lookahead): Likewise.
8848 (mips_avoid_hazard): Likewise.
8849 (mips_reorg_process_insns): Likewise.
8850 (mips_classify_branch_p6600): New function.
8851 * config/mips/mips.h (TUNE_P6600): New define.
8852 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8853 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8854 * config/mips/mips.md: Include p6600.md.
8855 (processor): Add p6600.
8856 * config/mips/p6600.md: New file.
8857 * doc/invoke.texi: Add p6600 to supported architectures.
8859 2018-06-13 Martin Sebor <msebor@redhat.com>
8861 PR tree-optimization/86114
8862 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8864 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8866 2018-06-13 Richard Biener <rguenther@suse.de>
8868 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8869 Properly set vector type of the intermediate stmt.
8870 * tree-vect-stmts.c (vectorizable_operation): The destination
8871 var always has vectype_out type.
8873 2018-06-13 Jeff Law <law@redhat.com>
8875 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8876 integer 0 for argument to print_rtl_with_bb.
8877 (rl78_reorg): Likewise.
8879 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8881 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8882 from rtx to rtx_insn *.
8883 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8885 (add_sched_insns_for_speculation): Likewise for local "target",
8886 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8887 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8888 from rtx_insn ** to rtx_code_label **.
8889 (reorg_emit_nops): Likewise.
8890 (c6x_reorg): Likewise for local "call_labels".
8891 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8893 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8894 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8895 the loops over LABEL_REFS.
8896 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8898 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8899 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8900 (split_branches): Strengthen local "olabel" from rtx to
8901 rtx_insn *, adding a safe_as_a cast.
8902 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8904 (add_insn_after): Likewise for first two params.
8905 (add_insn_before): Likewise.
8906 (remove_insn): Likewise for param.
8907 (emit_pattern_before_noloc): Likewise for second and third params.
8908 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8909 (emit_call_insn_before_noloc): Likewise.
8910 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8912 (emit_barrier_before): Likewise.
8913 (emit_label_before): Strengthen "label" param from "rtx" to
8914 "rtx_code_label *". Strengthen "before" param from "rtx" to
8916 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8918 (emit_pattern_after_noloc): Likewise.
8919 (emit_insn_after_noloc): Likewise.
8920 (emit_jump_insn_after_noloc): Likewise.
8921 (emit_call_insn_after_noloc): Likewise.
8922 (emit_debug_insn_after_noloc): Likewise.
8923 (emit_barrier_after): Likewise.
8924 (emit_label_after): Likewise for both params.
8925 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8926 "loc" param from "int" to "location_t".
8927 (emit_insn_after_setloc): Likewise.
8928 (emit_jump_insn_after_setloc): Likewise.
8929 (emit_call_insn_after_setloc): Likewise.
8930 (emit_debug_insn_after_setloc): Likewise.
8931 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8932 "loc" param from "int" to "location_t".
8933 (emit_pattern_before): Convert NULL_RTX to NULL.
8934 (emit_insn_before_setloc): Convert "loc" param from "int" to
8936 (emit_jump_insn_before_setloc): Likewise.
8937 (emit_call_insn_before_setloc): Likewise.
8938 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8939 rtx_insn *. Convert "loc" param from "int" to "location_t".
8940 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8941 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8942 Convert 3rd param from "int" to "location_t".
8943 (emit_barrier_before, emit_barrier_after, next_real_insn):
8944 Strengthen param from rtx to rtx_insn *.
8945 (emit_label_before): Strengthen 1st param from "rtx" to
8946 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8948 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8949 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8950 Strengthen 2nd param from "rtx" to "rtx_insn *".
8951 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8952 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8953 Likewise. Convert 3rd param from "int" to "location_t".
8954 (emit_label_after): Strengthen 1st param from "rtx" to
8956 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8958 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8959 from "rtx" to "rtx_insn *".
8961 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8963 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8964 bodies streamed in with -Q.
8965 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8966 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8967 * gimple-streamer-out.c: Include gimple-pretty-print.h
8968 (output_bb): Dump stmts streamed.
8969 * lto-section-out.c: Include print-tree.h
8970 (lto_begin_section): Dump sections created.
8971 (lto_output_decl_index): Dump decl encoded.
8972 * lto-streamer-out.c: Include print-tree.h
8973 (create_output_block): Dump output block created.
8974 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8975 (output_function): Dump function output.
8976 (output_constructor): Dump constructor streamed.
8977 (write_global_stream): Output indexes encoded.
8978 (produce_asm_for_decls): Dump streams encoded.
8979 * lto-streamer.c (streamer_dump_file): New global var.
8980 * lto-streamer.h (streamer_dump_file): Declare.
8981 * passes.c (ipa_write_summaries): Initialize streamer dump.
8982 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8985 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8988 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8989 offsets for register save directives. Emit a second batch of save
8990 directives, if need be, when the function accesses prior frames.
8992 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8994 * config/arc/fpu.md (fmasf4): Force operand to register.
8995 (fnmasf4): Likewise.
8997 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8999 * config/arc/arc-protos.h (arc_pad_return): Remove.
9000 * config/arc/arc.c (machine_function): Remove force_short_suffix
9002 (arc_print_operand): Adjust printing of '&'.
9003 (arc_verify_short): Remove conditional printing of short suffix.
9004 (arc_final_prescan_insn): Remove reference to size_reason.
9005 (pad_return): New function.
9006 (arc_reorg): Call pad_return.
9007 (arc_pad_return): Remove.
9008 (arc_init_machine_status): Remove reference to force_short_suffix.
9009 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9010 (attr length): When attribute iscompact is true force to 2
9011 regardless; in the case of maybe check if we want to force the
9012 instruction to have 4 bytes length.
9013 (nopv): Change it to generate 4 byte long nop as well.
9014 (blockage): New pattern.
9015 (simple_return): Remove call to arc_pad_return.
9016 (p_return_i): Likewise.
9018 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9020 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9022 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9024 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9027 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9029 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9030 for ARC700 and ARCv2.
9032 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9035 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9036 operands[2] instead of operands[1].
9039 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9041 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9042 case, check whether the outer register overlaps an unallocatable
9043 register, not just whether it fits the required class.
9045 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9047 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9049 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9050 (memrefs_conflict_p): Likewise.
9051 (init_alias_analysis): Likewise.
9052 * cfgexpand.c (expand_debug_expr): Likewise.
9053 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9054 * cse.c (fold_rtx): Likewise.
9055 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9056 * expr.c (emit_block_move_hints): Likewise.
9057 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9058 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9059 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9060 (emit_group_store): Likewise.
9061 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9062 to read the PRE/POST_MODIFY increment.
9063 * calls.c (store_one_arg): Use strip_offset.
9064 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9066 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9068 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9069 (simplify_binary_operation_1): Extend CONST_INT handling to
9071 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9072 than a HOST_WIDE_INT.
9073 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9075 (adjust_mems, add_stores): Update accodingly.
9076 (vt_canonicalize_addr): Track polynomial offsets.
9077 (emit_note_insn_var_location): Likewise.
9078 (vt_add_function_parameter): Likewise.
9079 (vt_initialize): Likewise.
9081 2018-06-12 Jeff Law <law@redhat.com>
9083 * config.gcc (alpha*-*-freebsd*): Remove.
9084 * config/alpha/freebsd.h: Remove.
9086 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9089 * spellcheck-tree.c (levenshtein_distance): Rename to...
9090 (get_edit_distance): ...this, and update for underlying renaming.
9091 * spellcheck-tree.h (levenshtein_distance): Rename to...
9092 (get_edit_distance): ...this.
9093 * spellcheck.c (levenshtein_distance): Rename to...
9094 (get_edit_distance): ...this. Convert from Levenshtein distance
9095 to Damerau-Levenshtein distance by supporting transpositions of
9096 adjacent characters. Rename "v1" to "v_next" and "v0" to
9098 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9099 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9100 update for underlying renaming.
9101 (selftest::levenshtein_distance_unit_test): Rename to...
9102 (selftest::test_get_edit_distance_unit): ...this, and update for
9103 underlying renaming.
9104 (selftest::test_find_closest_string): Add example from PR 69968
9105 where transposition helps
9106 (selftest::test_metric_conditions): Update for renaming.
9107 (selftest::test_metric_conditions): Likewise.
9108 (selftest::spellcheck_c_tests): Likewise.
9109 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9110 (get_edit_distance): ...this.
9111 (best_match::consider): Update for renaming.
9113 2018-06-12 Martin Sebor <msebor@redhat.com>
9115 PR tree-optimization/85259
9116 * builtins.c (compute_objsize): Handle constant offsets.
9117 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9118 true iff a warning has been issued.
9119 * gimple.h (gimple_nonartificial_location): New function.
9120 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9121 gimple_nonartificial_location and handle -Wno-system-headers.
9122 (handle_builtin_stxncpy): Same.
9124 2018-06-12 Martin Sebor <msebor@redhat.com>
9127 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9129 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9131 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9132 BUILTIN_VEC_XST entries for pointer to double and long long.
9134 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9137 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9139 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9142 2018-06-12 Martin Liska <mliska@suse.cz>
9144 * doc/options.texi: Document IntegerRange.
9146 2018-06-12 Martin Liska <mliska@suse.cz>
9148 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9149 * opt-functions.awk: Handle Deprecated flag.
9150 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9152 (read_cmdline_option): Report warning for a deprecated option.
9153 * opts.h (struct cl_option): Add new field cl_deprecated.
9154 (CL_ERR_DEPRECATED): New.
9156 2018-06-12 Martin Liska <mliska@suse.cz>
9158 * doc/options.texi: Document Deprecated option flag.
9160 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9162 * config/arc/arc-arch.h (arc_extras): New enum.
9163 (arc_cpu_t):Add field extra.
9164 (arc_cpu_types): Consider the extras.
9165 * config/arc/arc-cpus.def: Add extras info.
9166 * config/arc/arc-opts.h (processor_type): Consider extra field.
9167 * config/arc/arc.c (arc_override_options): Handle extra field.
9169 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9171 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9172 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9174 * config/arc/arc.c (arc_init): Update pic warning.
9175 (irq_range): Update irq range parsing warnings.
9176 (arc_override_options): Update various warning messages.
9177 (arc_handle_aux_attribute): Likewise.
9179 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9181 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9183 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9185 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9186 compiler messages directives.
9188 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9190 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9191 * config/mips/mips-tables.opt: Regenerate.
9192 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9194 * doc/invoke.texi: Document -march=i6500.
9196 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9198 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9199 (i6400_gpmul): Add cpu_unit.
9200 (i6400_gpdiv): Likewise.
9201 (i6400_msa_add_d): Update reservations.
9202 (i6400_msa_int_add) Likewise.
9203 (i6400_msa_short_logic3) Likewise.
9204 (i6400_msa_short_logic2) Likewise.
9205 (i6400_msa_short_logic) Likewise.
9206 (i6400_msa_move) Likewise.
9207 (i6400_msa_cmp) Likewise.
9208 (i6400_msa_short_float2) Likewise.
9209 (i6400_msa_div_d) Likewise.
9210 (i6400_msa_long_logic1) Likewise.
9211 (i6400_msa_long_logic2) Likewise.
9212 (i6400_msa_mult) Likewise.
9213 (i6400_msa_long_float2) Likewise.
9214 (i6400_msa_long_float4) Likewise.
9215 (i6400_msa_long_float5) Likewise.
9216 (i6400_msa_long_float8) Likewise.
9217 (i6400_fpu_fadd): Include frint type.
9218 (i6400_fpu_store): New define_insn_reservation.
9219 (i6400_fpu_load): Likewise.
9220 (i6400_fpu_move): Likewise.
9221 (i6400_fpu_fcmp): Likewise.
9222 (i6400_fpu_fmadd): Likewise.
9223 (i6400_int_mult): Include imul3nc type and update reservation.
9224 (i6400_int_div): Include idiv3 type and update reservation.
9225 (i6400_int_load): Update to check type not move_type.
9226 (i6400_int_store): Likewise.
9227 (i6400_int_prefetch): Set zero latency.
9229 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9231 * gcc.c: Document new %@{...} sequence.
9232 (LINK_COMMAND_SPEC): Use it for the -L switches.
9233 (cpp_unique_options): Use it for the -I switches.
9234 (at_file_argbuf): New global variable.
9235 (in_at_file): Likewise.
9236 (alloc_args): Create at_file_argbuf.
9237 (clear_args): Truncate at_file_argbuf.
9238 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9239 (open_at_file): New function.
9240 (close_at_file): Likewise.
9241 (create_at_file): Delete.
9242 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9245 (validate_switches_from_spec): Deal with %@{...} sequence.
9246 (validate_switches): Likewise.
9247 (driver::finalize): Call clear_args.
9249 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9251 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9253 2018-06-11 Martin Sebor <msebor@redhat.com>
9255 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9256 (Wno-class-memaccess): Add @opindex.
9257 (Wno-templates, Wno-multiple-inheritance): Same.
9258 (Wno-virtual-inheritance, Wno-namespaces): Same.
9259 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9260 (Wno-format-overflow, Wno-format-truncation): Same.
9261 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9262 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9263 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9264 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9265 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9266 (Wno-misspelled-isr): Same.
9268 2018-06-11 Martin Sebor <msebor@redhat.com>
9270 * PR tree-optimization/86083
9271 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9273 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9275 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9277 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9280 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9281 on the correct operand.
9282 (*movdi_internal64): Ditto.
9284 2018-06-11 Martin Liska <mliska@suse.cz>
9286 PR tree-optimization/86089
9287 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9289 2018-06-11 Julia Koval <julia.koval@intel.com>
9291 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9292 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9293 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9295 2018-06-11 Olivier Hainque <hainque@adacore.com>
9297 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9298 for Ada with strict dwarf2.
9300 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9303 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9306 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9308 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9310 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9312 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9315 2018-06-08 Martin Liska <mliska@suse.cz>
9317 * tree-cfg.h (debug_function): Fix argument type to match
9320 2018-06-08 Martin Liska <mliska@suse.cz>
9322 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9323 Remove usage of MPX-related (and removed) fields.
9324 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9326 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9328 * cfg.c (debug): Use TDF_NONE rather than 0.
9329 * cfghooks.c (debug): Likewise.
9330 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9331 (struct dump_option_value_info): Convert to...
9332 (struct kv_pair): ...this template type.
9333 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9335 (optinfo_verbosity_options): Likewise.
9336 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9338 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9339 than int for "optgroup_flags" param.
9340 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9342 (dump_dec): Likewise.
9343 (dump_finish): Use TDF_NONE rather than 0.
9344 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9345 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9346 than 0. Update for change to option_ptr.
9347 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9348 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9349 0. Update for changes to optinfo_verbosity_options and
9351 (opt_info_switch_p): Convert optgroup_flags from int to
9353 (dump_basic_block): Use dump_flags_t rather than int
9354 for "dump_kind" param.
9355 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9356 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9357 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9358 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9359 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9360 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9361 TDF_NONE): Convert from macros to...
9362 (enum dump_flag): ...this new enum.
9363 (dump_flags_t): Update to use enum.
9364 (operator|, operator&, operator~, operator|=, operator&=):
9365 Implement for dump_flags_t.
9366 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9367 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9368 Convert from macros to...
9369 (enum optgroup_flag): ...this new enum.
9370 (optgroup_flags_t): New typedef.
9371 (operator|, operator|=): Implement for optgroup_flags_t.
9372 (struct dump_file_info): Convert field "alt_flags" to
9373 dump_flags_t. Convert field "optgroup_flags" to
9375 (dump_basic_block): Use dump_flags_t rather than int for param.
9376 (dump_generic_expr_loc): Likewise.
9377 (dump_dec): Likewise.
9378 (dump_register): Convert param "optgroup_flags" to
9380 (opt_info_enable_passes): Likewise.
9381 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9383 * gimple-pretty-print.c (debug): Likewise.
9384 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9385 (merged_store_group::apply_stores): Likewise.
9386 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9387 * gimple.c (verify_gimple_pp): Likewise.
9388 * graphite-poly.c (print_pbb_body): Likewise.
9389 * passes.c (pass_manager::register_one_dump_file): Convert
9390 local "optgroup_flags" to optgroup_flags_t.
9391 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9393 (debug_body): Likewise.
9394 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9395 to optgroup_flags_t.
9396 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9398 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9399 (convert_mult_to_fma): Likewise.
9400 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9401 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9402 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9403 "dump_kind" to dump_flags_t.
9405 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9407 * config/rs6000/rs6000.c (min, max): Delete.
9409 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9411 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9412 -mabi=spe and -mabi=no-spe.
9414 2018-06-08 Martin Liska <mliska@suse.cz>
9416 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9417 where we expect an existing summary.
9419 2018-06-08 Martin Liska <mliska@suse.cz>
9421 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9422 * ipa-inline.h (estimate_edge_growth): Likewise.
9424 2018-06-08 Martin Liska <mliska@suse.cz>
9426 * cgraph.c (function_version_hasher::hash): Use
9427 cgraph_node::get_uid ().
9428 (function_version_hasher::equal):
9429 * cgraph.h (cgraph_node::get_uid): New method.
9430 * ipa-inline.c (update_caller_keys): Use
9431 cgraph_node::get_uid ().
9432 (update_callee_keys): Likewise.
9433 * ipa-utils.c (searchc): Likewise.
9434 (ipa_reduced_postorder): Likewise.
9435 * lto-cgraph.c (input_node): Likewise.
9436 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9437 * symbol-summary.h (symtab_insertion): Likewise.
9438 (symtab_removal): Likewise.
9439 (symtab_duplication): Likewise.
9440 * tree-pretty-print.c (dump_function_header): Likewise.
9441 * tree-sra.c (convert_callers_for_node): Likewise.
9443 2018-06-08 Martin Liska <mliska@suse.cz>
9445 * cgraph.c (symbol_table::create_edge): Always assign a new
9447 (symbol_table::free_edge): Do not recycle numbers.
9448 * cgraph.h (cgraph_edge::get): New method.
9449 * symbol-summary.h (symtab_removal): Use it.
9450 (symtab_duplication): Likewise.
9451 (call_summary::hashable_uid): Remove.
9453 2018-06-08 Martin Liska <mliska@suse.cz>
9455 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9456 (initialize_growth_caches): Remove.
9457 (free_growth_caches): Likewise.
9458 (do_estimate_edge_time): Use edge_growth_cache.
9459 (do_estimate_edge_size): Likewise.
9460 (do_estimate_edge_hints): Likewise.
9461 * ipa-inline.c (reset_edge_caches): Likewise.
9462 (recursive_inlining): Likewise.
9463 (inline_small_functions): Likewise.
9464 * ipa-inline.h (initialize_growth_caches): Remove.
9465 (estimate_edge_size): Likewise.
9466 (estimate_edge_time): Likewise.
9467 (estimate_edge_hints): Likewise.
9468 (reset_edge_growth_cache): Likewise.
9469 * symbol-summary.h (call_summary::remove): New method.
9471 2018-06-08 Martin Liska <mliska@suse.cz>
9473 * ipa-cp.c (class edge_clone_summary): New summary.
9474 (grow_edge_clone_vectors): Remove.
9475 (ipcp_edge_duplication_hook): Remove.
9476 (class edge_clone_summary_t): New call_summary class.
9477 (ipcp_edge_removal_hook): Remove.
9478 (edge_clone_summary_t::duplicate): New function.
9479 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9480 (create_specialized_node): Likewise.
9481 (ipcp_driver): Initialize edge_clone_summaries and do not
9484 2018-06-08 Martin Liska <mliska@suse.cz>
9486 * symbol-summary.h (get): New function.
9487 (call_summary::m_initialize_when_cloning): New class member.
9489 2018-06-08 Martin Liska <mliska@suse.cz>
9491 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9492 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9493 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9494 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9495 (remove_cgraph_node_from_order): Use the removed_nodes set.
9496 (do_per_function_toporder): Likwise.
9497 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9498 instead of summary_uid.
9499 (symtab_removal): Likewise.
9500 (symtab_duplication): Likewise.
9502 2018-06-08 Martin Liska <mliska@suse.cz>
9504 * ipa-cp.c (ipcp_store_bits_results): Use
9505 ipcp_transformation_sum.
9506 (ipcp_store_vr_results): Likewise.
9507 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9509 (ipcp_transformation_initialize): ... this.
9510 (ipa_set_node_agg_value_chain):
9511 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9512 (write_ipcp_transformation_info): Likewise.
9513 (read_ipcp_transformation_info): Likewise.
9514 (ipcp_update_bits): Likewise.
9515 (ipcp_update_vr): Likewise.
9516 (ipcp_transform_function): Likewise.
9517 * ipa-prop.h: Rename ipcp_transformation_summary to
9518 ipcp_transformation.
9519 (class ipcp_transformation_t): New function summary.
9520 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9521 (ipa_get_agg_replacements_for_node): Likewise.
9523 2018-06-08 Martin Liska <mliska@suse.cz>
9525 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9527 (class funct_state_summary_t): New function_summary class.
9528 (has_function_state): Remove.
9529 (get_function_state): Likewise.
9530 (set_function_state): Likewise.
9531 (add_new_function): Likewise.
9532 (funct_state_summary_t::insert): New function.
9533 (duplicate_node_data): Remove.
9534 (remove_node_data): Remove.
9535 (funct_state_summary_t::duplicate): New function.
9536 (register_hooks): Create new funct_state_summaries.
9537 (pure_const_generate_summary): Use it.
9538 (pure_const_write_summary): Likewise.
9539 (pure_const_read_summary): Likewise.
9540 (propagate_pure_const): Likewise.
9541 (propagate_nothrow): Likewise.
9542 (dump_malloc_lattice): Likewise.
9543 (propagate_malloc): Likewise.
9544 (execute): Do not register hooks, just remove summary
9546 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9549 2018-06-08 Martin Liska <mliska@suse.cz>
9551 * ipa-reference.c (remove_node_data): Remove.
9552 (duplicate_node_data): Likewise.
9553 (class ipa_ref_var_info_summary_t): New class.
9554 (class ipa_ref_opt_summary_t): Likewise.
9555 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9556 (get_reference_optimization_summary): Use
9557 ipa_ref_opt_sum_summaries.
9558 (set_reference_vars_info): Remove.
9559 (set_reference_optimization_summary): Likewise.
9560 (ipa_init): Create summaries.
9561 (init_function_info): Use function summary.
9562 (ipa_ref_opt_summary_t::duplicate): New function.
9563 (ipa_ref_opt_summary_t::remove): New function.
9564 (get_read_write_all_from_node): Fix GNU coding style.
9565 (propagate): Use function summary.
9566 (write_node_summary_p): Fix GNU coding style.
9567 (stream_out_bitmap): Likewise.
9568 (ipa_reference_read_optimization_summary): Use function summary.
9569 (ipa_reference_c_finalize): Do not release hooks.
9571 2018-06-08 Martin Liska <mliska@suse.cz>
9573 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9574 (analyze_function_body): Extract multiple calls of get_create.
9575 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9576 * ipa-inline.c (recursive_inlining): Use ::get method.
9577 * ipa-inline.h (estimate_edge_growth): Likewise.
9579 2018-06-08 Martin Liska <mliska@suse.cz>
9581 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9583 (hsa_function_summary::hsa_function_summary): Use the new enum
9585 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9586 * hsa-gen.c (hsa_get_host_function): Likewise.
9587 (get_brig_function_name): Likewise.
9588 * ipa-hsa.c (process_hsa_functions): Likewise.
9589 (ipa_hsa_write_summary): Likewise.
9590 * symbol-summary.h (symtab_duplication): Use ::get function/
9591 (get): New function.
9593 2018-06-08 Martin Liska <mliska@suse.cz>
9595 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9597 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9598 (hsa_register_kernel): Likewise.
9599 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9600 * hsa-gen.c (hsa_get_host_function): Likewise.
9601 (get_brig_function_name): Likewise.
9602 (generate_hsa): Likewise.
9603 (pass_gen_hsail::execute): Likewise.
9604 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9605 (devirtualization_time_bonus): Likewise.
9606 (ipcp_propagate_stage): Likewise.
9607 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9608 (edge_set_predicate): Likewise.
9609 (evaluate_conditions_for_known_args): Likewise.
9610 (evaluate_properties_for_edge): Likewise.
9611 (ipa_fn_summary::reset): Likewise.
9612 (ipa_fn_summary_t::duplicate): Likewise.
9613 (dump_ipa_call_summary): Likewise.
9614 (ipa_dump_fn_summary): Likewise.
9615 (analyze_function_body): Likewise.
9616 (compute_fn_summary): Likewise.
9617 (estimate_edge_devirt_benefit): Likewise.
9618 (estimate_edge_size_and_time): Likewise.
9619 (estimate_calls_size_and_time): Likewise.
9620 (estimate_node_size_and_time): Likewise.
9621 (inline_update_callee_summaries): Likewise.
9622 (remap_edge_change_prob): Likewise.
9623 (remap_edge_summaries): Likewise.
9624 (ipa_merge_fn_summary_after_inlining): Likewise.
9625 (ipa_update_overall_fn_summary): Likewise.
9626 (read_ipa_call_summary): Likewise.
9627 (inline_read_section): Likewise.
9628 (write_ipa_call_summary): Likewise.
9629 (ipa_fn_summary_write): Likewise.
9630 (ipa_free_fn_summary): Likewise.
9631 * ipa-hsa.c (process_hsa_functions): Likewise.
9632 (ipa_hsa_write_summary): Likewise.
9633 (ipa_hsa_read_section): Likewise.
9634 * ipa-icf.c (sem_function::merge): Likewise.
9635 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9636 (do_estimate_edge_time): Likewise.
9637 (estimate_size_after_inlining): Likewise.
9638 (estimate_growth): Likewise.
9639 (growth_likely_positive): Likewise.
9640 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9641 (inline_call): Likewise.
9642 * ipa-inline.c (caller_growth_limits): Likewise.
9643 (can_inline_edge_p): Likewise.
9644 (can_inline_edge_by_limits_p): Likewise.
9645 (compute_uninlined_call_time): Likewise.
9646 (compute_inlined_call_time): Likewise.
9647 (want_inline_small_function_p): Likewise.
9648 (edge_badness): Likewise.
9649 (update_caller_keys): Likewise.
9650 (update_callee_keys): Likewise.
9651 (recursive_inlining): Likewise.
9652 (inline_small_functions): Likewise.
9653 (inline_to_all_callers_1): Likewise.
9654 (dump_overall_stats): Likewise.
9655 (early_inline_small_functions): Likewise.
9656 (early_inliner): Likewise.
9657 * ipa-inline.h (estimate_edge_growth): Likewise.
9658 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9659 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9660 * ipa-prop.h (IPA_NODE_REF): Likewise.
9661 (IPA_EDGE_REF): Likewise.
9662 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9663 (propagate_malloc): Likewise.
9664 * ipa-split.c (execute_split_functions): Likewise.
9665 * symbol-summary.h: Rename get to get_create.
9667 (get_create): Likewise.
9668 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9670 2018-06-08 Martin Liska <mliska@suse.cz>
9672 * symbol-summary.h (release): Move definition out of class
9674 (symtab_removal): Likewise.
9675 (symtab_duplication): Likewise.
9677 2018-06-08 Martin Liska <mliska@suse.cz>
9679 * symbol-summary.h (function_summary): Move constructor
9680 implementation out of class declaration.
9681 (release): Likewise.
9682 (symtab_insertion): Likewise.
9683 (symtab_removal): Likewise.
9684 (symtab_duplication): Likewise.
9687 2018-06-08 Martin Liska <mliska@suse.cz>
9689 * Makefile.in: Remove support for MPX (macros, related functions,
9690 fields in cgraph_node, ...).
9691 * builtin-types.def (BT_BND): Likewise.
9692 (BT_FN_BND_CONST_PTR): Likewise.
9693 (BT_FN_CONST_PTR_BND): Likewise.
9694 (BT_FN_VOID_PTR_BND): Likewise.
9695 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9696 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9697 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9698 (expand_builtin_mempcpy_with_bounds): Likewise.
9699 (expand_builtin_memset_with_bounds): Likewise.
9700 (expand_builtin_memset_args): Likewise.
9701 (std_expand_builtin_va_start): Likewise.
9702 (expand_builtin): Likewise.
9703 (expand_builtin_with_bounds): Likewise.
9704 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9705 (DEF_LIB_BUILTIN_CHKP): Likewise.
9706 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9707 (DEF_CHKP_BUILTIN): Likewise.
9708 (BUILT_IN_MEMCPY): Likewise.
9709 (BUILT_IN_MEMMOVE): Likewise.
9710 (BUILT_IN_MEMPCPY): Likewise.
9711 (BUILT_IN_MEMSET): Likewise.
9712 (BUILT_IN_STPCPY): Likewise.
9713 (BUILT_IN_STRCAT): Likewise.
9714 (BUILT_IN_STRCHR): Likewise.
9715 (BUILT_IN_STRCPY): Likewise.
9716 (BUILT_IN_STRLEN): Likewise.
9717 (BUILT_IN_MEMCPY_CHK): Likewise.
9718 (BUILT_IN_MEMMOVE_CHK): Likewise.
9719 (BUILT_IN_MEMPCPY_CHK): Likewise.
9720 (BUILT_IN_MEMSET_CHK): Likewise.
9721 (BUILT_IN_STPCPY_CHK): Likewise.
9722 (BUILT_IN_STRCAT_CHK): Likewise.
9723 (BUILT_IN_STRCPY_CHK): Likewise.
9724 * calls.c (store_bounds): Likewise.
9725 (emit_call_1): Likewise.
9726 (special_function_p): Likewise.
9727 (maybe_warn_nonstring_arg): Likewise.
9728 (initialize_argument_information): Likewise.
9729 (finalize_must_preallocate): Likewise.
9730 (compute_argument_addresses): Likewise.
9731 (expand_call): Likewise.
9732 * cfgexpand.c (expand_call_stmt): Likewise.
9733 (expand_return): Likewise.
9734 (expand_gimple_stmt_1): Likewise.
9735 (pass_expand::execute): Likewise.
9736 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9737 (cgraph_node::remove): Likewise.
9738 (cgraph_node::dump): Likewise.
9739 (cgraph_node::verify_node): Likewise.
9740 * cgraph.h (chkp_function_instrumented_p): Likewise.
9741 (symtab_node::get_alias_target): Likewise.
9742 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9743 (cgraph_local_p): Likewise.
9744 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9745 (cgraph_edge::rebuild_references): Likewise.
9746 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9747 (walk_polymorphic_call_targets): Likewise.
9748 (cgraph_node::expand_thunk): Likewise.
9749 (symbol_table::output_weakrefs): Likewise.
9750 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9751 (ix86_handle_option): Likewise.
9752 * config/i386/constraints.md: Likewise.
9753 * config/i386/i386-builtin-types.def (BND): Likewise.
9757 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9758 (BDESC_FIRST): Likewise.
9760 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9761 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9762 * config/i386/i386.c (enum reg_class): Likewise.
9763 (ix86_target_string): Likewise.
9764 (ix86_option_override_internal): Likewise.
9765 (ix86_conditional_register_usage): Likewise.
9766 (ix86_valid_target_attribute_inner_p): Likewise.
9767 (ix86_set_indirect_branch_type): Likewise.
9768 (ix86_set_current_function): Likewise.
9769 (ix86_function_arg_regno_p): Likewise.
9770 (init_cumulative_args): Likewise.
9771 (ix86_function_arg_advance): Likewise.
9772 (ix86_function_arg): Likewise.
9773 (ix86_pass_by_reference): Likewise.
9774 (ix86_function_value_regno_p): Likewise.
9775 (ix86_function_value_1): Likewise.
9776 (ix86_function_value_bounds): Likewise.
9777 (ix86_return_in_memory): Likewise.
9778 (ix86_setup_incoming_vararg_bounds): Likewise.
9779 (ix86_va_start): Likewise.
9780 (indirect_thunk_need_prefix): Likewise.
9781 (print_reg): Likewise.
9782 (ix86_print_operand): Likewise.
9783 (ix86_expand_call): Likewise.
9784 (ix86_output_function_return): Likewise.
9785 (reg_encoded_number): Likewise.
9786 (BDESC_VERIFYS): Likewise.
9787 (ix86_init_mpx_builtins): Likewise.
9788 (ix86_init_builtins): Likewise.
9789 (ix86_emit_cmove): Likewise.
9790 (ix86_emit_move_max): Likewise.
9791 (ix86_expand_builtin): Likewise.
9792 (ix86_builtin_mpx_function): Likewise.
9793 (ix86_get_arg_address_for_bt): Likewise.
9794 (ix86_load_bounds): Likewise.
9795 (ix86_store_bounds): Likewise.
9796 (ix86_load_returned_bounds): Likewise.
9797 (ix86_store_returned_bounds): Likewise.
9798 (ix86_class_likely_spilled_p): Likewise.
9799 (ix86_hard_regno_mode_ok): Likewise.
9800 (x86_order_regs_for_local_alloc): Likewise.
9801 (ix86_mitigate_rop): Likewise.
9802 (ix86_bnd_prefixed_insn_p): Likewise.
9803 (ix86_mpx_bound_mode): Likewise.
9804 (ix86_make_bounds_constant): Likewise.
9805 (ix86_initialize_bounds): Likewise.
9806 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9807 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9808 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9809 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9810 (TARGET_CHKP_BOUND_MODE): Likewise.
9811 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9812 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9813 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9814 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9815 * config/i386/i386.h (TARGET_MPX): Likewise.
9816 (TARGET_MPX_P): Likewise.
9817 (VALID_BND_REG_MODE): Likewise.
9818 (FIRST_BND_REG): Likewise.
9819 (LAST_BND_REG): Likewise.
9820 (enum reg_class): Likewise.
9821 (BND_REG_P): Likewise.
9822 (BND_REGNO_P): Likewise.
9823 (BNDmode): Likewise.
9824 (ADJUST_INSN_LENGTH): Likewise.
9825 * config/i386/i386.md: Likewise.
9826 * config/i386/i386.opt: Likewise.
9827 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9828 (defined): Likewise.
9829 (LINK_MPX): Likewise.
9830 (MPX_SPEC): Likewise.
9831 (LIBMPX_SPEC): Likewise.
9832 (LIBMPXWRAPPERS_SPEC): Likewise.
9833 (CHKP_SPEC): Likewise.
9834 * config/i386/predicates.md: Likewise.
9835 * dbxout.c (dbxout_type): Likewise.
9836 * doc/extend.texi: Likewise.
9837 * doc/invoke.texi: Likewise.
9838 * doc/md.texi: Likewise.
9839 * doc/tm.texi: Likewise.
9840 * doc/tm.texi.in: Likewise.
9841 * dwarf2out.c (is_base_type): Likewise.
9842 (gen_formal_types_die): Likewise.
9843 (gen_subprogram_die): Likewise.
9844 (gen_type_die_with_usage): Likewise.
9845 (gen_decl_die): Likewise.
9846 (dwarf2out_late_global_decl): Likewise.
9847 * expr.c (expand_assignment): Likewise.
9848 (emit_storent_insn): Likewise.
9849 (store_expr_with_bounds): Likewise.
9850 (store_expr): Likewise.
9851 (expand_expr_real_1): Likewise.
9852 * expr.h (store_expr_with_bounds): Likewise.
9853 * function.c (use_register_for_decl): Likewise.
9854 (struct bounds_parm_data): Likewise.
9855 (assign_parms_augmented_arg_list): Likewise.
9856 (assign_parm_find_entry_rtl): Likewise.
9857 (assign_parm_is_stack_parm): Likewise.
9858 (assign_parm_load_bounds): Likewise.
9859 (assign_bounds): Likewise.
9860 (assign_parms): Likewise.
9861 (expand_function_start): Likewise.
9862 * gcc.c (CHKP_SPEC): Likewise.
9863 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9864 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9865 (wrestrict_dom_walker::check_call): Likewise.
9866 * gimple.c (gimple_build_call_from_tree): Likewise.
9867 * gimple.h (enum gf_mask): Likewise.
9868 (gimple_call_with_bounds_p): Likewise.
9869 (gimple_call_set_with_bounds): Likewise.
9870 * gimplify.c (gimplify_init_constructor): Likewise.
9871 * ipa-cp.c (initialize_node_lattices): Likewise.
9872 (propagate_constants_across_call): Likewise.
9873 (find_more_scalar_values_for_callers_subset): Likewise.
9874 * ipa-hsa.c (process_hsa_functions): Likewise.
9875 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9876 * ipa-icf.c (sem_function::merge): Likewise.
9877 * ipa-inline.c (early_inliner): Likewise.
9878 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9879 (warn_function_cold): Likewise.
9880 (propagate_pure_const): Likewise.
9881 * ipa-ref.h (enum GTY): Likewise.
9882 * ipa-split.c (find_retbnd): Likewise.
9883 (consider_split): Likewise.
9884 (split_function): Likewise.
9885 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9886 * ipa.c (walk_polymorphic_call_targets): Likewise.
9887 (symbol_table::remove_unreachable_nodes): Likewise.
9888 (process_references): Likewise.
9889 (cgraph_build_static_cdtor_1): Likewise.
9890 * lto-cgraph.c (lto_output_node): Likewise.
9891 (output_refs): Likewise.
9892 (compute_ltrans_boundary): Likewise.
9893 (input_overwrite_node): Likewise.
9894 (input_node): Likewise.
9895 (input_cgraph_1): Likewise.
9896 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9897 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9898 (class pass_chkp_instrumentation_passes): Likewise.
9899 (make_pass_chkp_instrumentation_passes): Likewise.
9900 * passes.def: Likewise.
9901 * rtl.h (struct GTY): Likewise.
9902 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9903 * stor-layout.c (layout_type): Likewise.
9904 * symtab.c: Likewise.
9905 * target.def: Likewise.
9906 * targhooks.c (default_chkp_bound_type): Likewise.
9907 (default_chkp_bound_mode): Likewise.
9908 (default_builtin_chkp_function): Likewise.
9909 (default_chkp_function_value_bounds): Likewise.
9910 (default_chkp_make_bounds_constant): Likewise.
9911 (default_chkp_initialize_bounds): Likewise.
9912 * targhooks.h (default_chkp_bound_type): Likewise.
9913 (default_chkp_bound_mode): Likewise.
9914 (default_builtin_chkp_function): Likewise.
9915 (default_chkp_function_value_bounds): Likewise.
9916 (default_chkp_make_bounds_constant): Likewise.
9917 (default_chkp_initialize_bounds): Likewise.
9918 * toplev.c (compile_file): Likewise.
9919 (process_options): Likewise.
9920 * tree-core.h (DEF_BUILTIN): Likewise.
9921 (DEF_BUILTIN_CHKP): Likewise.
9922 * tree-inline.c (declare_return_variable): Likewise.
9923 (remap_gimple_stmt): Likewise.
9924 (copy_bb): Likewise.
9925 (initialize_inlined_parameters): Likewise.
9926 (expand_call_inline): Likewise.
9927 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9928 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9929 (make_pass_ipa_chkp_produce_thunks): Likewise.
9930 (make_pass_chkp): Likewise.
9931 (make_pass_chkp_opt): Likewise.
9932 (make_pass_chkp_instrumentation_passes): Likewise.
9933 * tree-pretty-print.c (dump_generic_node): Likewise.
9934 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9935 * tree-ssa-dce.c (propagate_necessity): Likewise.
9936 (eliminate_unnecessary_stmts): Likewise.
9937 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9938 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9939 * tree-ssa-sccvn.h: Likewise.
9940 * tree-ssa-strlen.c (get_string_length): Likewise.
9941 (valid_builtin_call): Likewise.
9942 (adjust_last_stmt): Likewise.
9943 (handle_builtin_strchr): Likewise.
9944 (handle_builtin_strcpy): Likewise.
9945 (handle_builtin_stxncpy): Likewise.
9946 (handle_builtin_memcpy): Likewise.
9947 (handle_builtin_strcat): Likewise.
9948 (strlen_check_and_optimize_stmt): Likewise.
9949 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9950 * tree-streamer-in.c: Likewise.
9951 * tree-streamer.c (record_common_node): Likewise.
9952 * tree.c (tree_code_size): Likewise.
9953 (wide_int_to_tree_1): Likewise.
9954 (type_contains_placeholder_1): Likewise.
9955 (build_common_tree_nodes): Likewise.
9956 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9957 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9958 (POINTER_BOUNDS_P): Likewise.
9959 (BOUNDED_TYPE_P): Likewise.
9960 (BOUNDED_P): Likewise.
9961 (CALL_WITH_BOUNDS_P): Likewise.
9962 (pointer_bounds_type_node): Likewise.
9963 * value-prof.c (gimple_ic): Likewise.
9964 * var-tracking.c (vt_add_function_parameters): Likewise.
9965 * varasm.c (make_decl_rtl): Likewise.
9966 (assemble_start_function): Likewise.
9967 (output_constant): Likewise.
9968 (maybe_assemble_visibility): Likewise.
9969 * varpool.c (ctor_for_folding): Likewise.
9970 * chkp-builtins.def: Remove.
9971 * ipa-chkp.c: Remove.
9972 * ipa-chkp.h: Remove.
9973 * rtl-chkp.c: Remove.
9974 * rtl-chkp.h: Remove.
9975 * tree-chkp-opt.c: Remove.
9976 * tree-chkp.c: Remove.
9977 * tree-chkp.h: Remove.
9979 2018-06-07 Carl Love <cel@us.ibm.com>
9981 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9982 vextract_fp_from_shortl): Add BE support.
9984 2018-06-07 Paul Koning <ni1d@arrl.net>
9986 * compare-elim.c (try_merge_compare): Don't merge compare if
9987 address contains a side effect.
9988 (try_eliminate_compare): Likewise.
9990 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9992 * config.gcc: Support "tremont".
9993 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9994 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9996 * config/i386/i386.c (m_TREMONT): Define.
9997 (processor_target_table): Add "tremont".
9998 (PTA_TREMONT): Define.
9999 (ix86_lea_outperforms): Add TARGET_TREMONT.
10000 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10001 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10002 and M_INTEL_GOLDMONT_PLUS.
10003 (fold_builtin_cpu): Add "tremont".
10004 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10005 (ix86_option_override_internal): Add "tremont".
10006 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10007 (processor_type): Add PROCESSOR_TREMONT.
10008 * config/i386/x86-tune.def: Add m_TREMONT.
10009 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10011 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10013 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10014 symbol defined for msp430i* devices to be lower case.
10016 2018-06-07 Richard Biener <rguenther@suse.de>
10018 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10019 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10020 Properly wrap signed arithmetic if overflow wraps.
10022 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10024 PR tree-optimization/69615
10025 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10026 of a cast from a same precision integral SSA_NAME in a bb dominated
10027 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10028 cast to utype if rhs2 has already a compatible type.
10030 2018-06-07 Richard Biener <rguenther@suse.de>
10032 PR tree-optimization/85935
10033 * graphite-scop-detection.c (find_params_in_bb): Analyze
10034 condition operands with respect to the correct loop. Assert
10035 the analysis doesn't fail.
10037 2018-06-04 Carl Love <cel@us.ibm.com>
10039 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10040 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10041 as it is slightly cheaper.
10042 (first_match_or_eos_index_<mode>):
10043 Calculate index using natural element order.
10044 (first_match_index_<mode>):
10045 Calculate index using natural element order.
10046 (first_match_or_eos_index_<mode>):
10047 Calculate index using natural order.
10048 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10049 for BE and LE modes.
10050 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10051 P9V_BUILTIN_VCLZLSBB_V16QI.
10052 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10055 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10057 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10058 indentation and line wrap for many prototypes. Add missing
10059 @smallexample directives around block of prototypes for vec_xl and
10062 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10064 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10065 track if we pass or return IEEE 128-bit floating point.
10066 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10067 C++ mangling that is compatible with GCC 8.1.
10068 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10069 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10070 floating point types.
10071 (rs6000_function_arg_advance_1): Likewise.
10072 (rs6000_mangle_type): Optionally generate mangled names that match
10073 what GCC 8.1 generated for IEEE 128-bit floating point types.
10074 (rs6000_globalize_decl_name): If we have an external function that
10075 passes or returns IEEE 128-bit types, generate a weak reference
10076 from the mangled name used in GCC 8.1 to the current mangled
10078 (rs6000_init_builtins): Make __ibm128 use the long double type if
10079 long double is IBM extended double. Make __float128 use the long
10080 double type if long double is IEEE 128-bit.
10083 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10084 macro for __ibm128 built-in functions.
10085 (PACK_IF): Add __ibm128 pack/unpack functions.
10086 (UNPACK_IF): Likewise.
10087 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10088 enable long double built-in functions if long double is IEEE
10089 128-bit floating point.
10090 (rs6000_invalid_builtin): Update long double built-in function
10092 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10093 functions, adjust the built-in function to use the long double
10094 built-in function if __ibm128 and long double are the same type.
10095 * doc/extend.texi (PowerPC builtins): Update documention for
10096 __builtin_{,un}pack_longdouble. Add documentation for
10097 __builtin_{,un}pack_ibm128.
10099 2018-06-06 Jim Wilson <jimw@sifive.com>
10101 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10102 (struct machine_function): New field interrupt_mode.
10103 (riscv_handle_type_attribute): New function. Add forward declaration.
10104 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10105 (riscv_expand_epilogue): Check interrupt_mode field.
10106 (riscv_set_current_function): Check interrupt attribute args and
10107 set interrupt_mode field.
10108 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10109 (riscv_sret, riscv_uret): New.
10110 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10111 new arguments to interrupt attribute.
10113 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10116 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10117 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10119 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10121 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10122 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10123 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10124 several redundant entries.
10126 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10128 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10129 type from "rtx" to "rtx_insn *".
10130 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10131 for local "call_insn", removing cast.
10132 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10134 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10136 PR tree-optimization/86066
10137 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10138 for BIT_INSERT_EXPR stores.
10140 2018-06-06 Richard Biener <rguenther@suse.de>
10142 PR tree-optimization/86062
10143 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10144 component refs ontop
10145 of to be offsetted base.
10147 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10149 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10150 to be static and remove check on interrupt attribute name.
10152 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10154 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10155 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10157 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10160 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10162 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10163 Remove second argument, change how error is called.
10164 (aarch64_layout_arg): Remove second argument from
10165 aarch64_err_no_fpadvsimd call.
10166 (aarch64_init_cumulative_args): Ditto.
10167 (aarch64_gimplify_va_arg_expr): Ditto.
10168 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10170 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10172 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10173 (*simple_return_indirect_internal<mode>): Rename from
10174 simple_return_indirect_internal. Use W mode iterator.
10175 (rstorssp): New expander.
10176 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10177 (clrssbsy): New expander.
10178 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10180 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10182 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10184 (cmse_check_pointed_object): Likewise.
10186 2018-06-05 Martin Liska <mliska@suse.cz>
10188 PR gcov-profile/47618
10189 * doc/invoke.texi: Document how -fprofile-dir format
10192 2018-06-05 Richard Biener <rguenther@suse.de>
10194 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10195 removal pretend DOM info isn't available so we do not update
10196 it and only remove edges, not dominated blocks. Actually free
10197 DOM info in case we removed something. Remove unreachable blocks.
10198 (mfb_keep_latches): Work with either DOM info or marked backedges.
10199 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10200 first. Mark backedges if DOM info isn't available.
10201 (Re-)compute DOM info after cleanup_control_flow_pre.
10203 2018-06-05 Richard Biener <rguenther@suse.de>
10205 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10206 (locus_discrim_hasher::hash): Adjust.
10207 (locus_discrim_hasher::equal): Likewise.
10208 (next_discriminator_for_locus): Work on line directly.
10209 (same_line_p): Pass in expanded locus1 as well.
10210 (assign_discriminators): Avoid redundant location expansions.
10212 2018-06-05 Richard Biener <rguenther@suse.de>
10214 PR tree-optimization/86046
10215 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10216 if required after clearing TREE_ADDRESSABLE.
10218 2018-06-05 Richard Biener <rguenther@suse.de>
10220 PR tree-optimization/86047
10221 * tree-ssa-loop.c (for_each_index): Glob handling of all
10222 decls and constants and really handle all of them.
10224 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10227 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10228 qualifier_void_pointer and qualifier_const_void_pointer.
10229 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10230 (arm_init_builtins): Handle the above.
10231 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10232 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10233 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10236 2018-06-05 Martin Liska <mliska@suse.cz>
10238 * auto-profile.c (read_autofdo_file): Do not use
10239 gcov_ctr_summary struct.
10240 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10241 * coverage.c (struct counts_entry): Likewise.
10242 (read_counts_file): Read just single summary entry.
10243 (get_coverage_counts): Use gcov_summary struct.
10244 * coverage.h (get_coverage_counts): Likewise.
10245 * gcov-dump.c (dump_working_sets): Likewise.
10246 (tag_summary): Dump just single summary.
10247 * gcov-io.c (gcov_write_summary): Write just histogram
10249 (gcov_read_summary): Read just single summary.
10250 (compute_working_sets): Use gcov_summary struct.
10251 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10252 of GCOV_COUNTERS_SUMMABLE.
10253 (GCOV_COUNTERS_SUMMABLE): Remove.
10254 (GCOV_FIRST_VALUE_COUNTER): Replace with
10255 GCOV_COUNTER_V_INTERVAL.
10256 (struct gcov_ctr_summary): Remove.
10257 (struct gcov_summary): Directly use fields of former
10259 (compute_working_sets): Use gcov_summary struct.
10260 * gcov.c (read_count_file): Do not use ctrs fields.
10261 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10263 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10265 * profile.c: Likewise.
10266 * profile.h: Likewise.
10268 2018-06-05 Martin Liska <mliska@suse.cz>
10270 PR gcov-profile/84846
10271 * gcov.c (output_lines): Print working directory only
10272 in intermediate format.
10274 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10276 * config/s390/s390-builtin-types.def: Add void function type.
10277 * config/s390/s390-builtins.def: Use the function type for the
10280 2018-06-04 Jim Wilson <jimw@sifive.com>
10282 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10284 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10285 and maybe_eh_return. Change regno to unsigned int. Use new args to
10286 handle EH_RETURN_DATA_REGNO registers properly.
10287 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10288 (riscv_expand_epilogue): Update comment. Change argument name and
10289 type. Update code to use new name and type. Pass new args to
10290 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10292 * config/riscv/riscv.md (NORMAL_RETURN): New.
10293 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10294 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10295 (eh_return): Call gen_eh_return_internal and emit barrier.
10296 (eh_return_internal): Call riscv_expand_epilogue.
10298 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10300 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10301 bit_insertion field and declare can_be_merged_into method.
10302 (merged_store_group::can_be_merged_into): New method.
10303 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10304 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10305 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10307 2018-06-04 Richard Biener <rguenther@suse.de>
10309 PR tree-optimization/85955
10310 * builtins.c (fold_builtin_sincos): Convert pointers to
10311 destination to appropriate type before dereferencing.
10313 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10315 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10317 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10319 * expr.c (expand_expr_real_1): Force the operand into memory if
10320 its TYPE_MODE is BLKmode and if there is no integer mode for
10321 the number of bits being extracted.
10323 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10327 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10328 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10330 2018-06-04 Richard Biener <rguenther@suse.de>
10332 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10333 (cleanup_tree_cfg_noloop): ... single caller. Do
10334 start_recording_case_labels later.
10336 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10338 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10339 to _IMMINTRIN_H_INCLUDED.
10340 * config/i386/pconfigintrin.h: Ditto.
10341 * config/i386/waitpkgintrin.h: Ditto.
10342 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10343 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10344 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10345 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10346 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10347 waitpkgintrin.h and cldemoteintrin.h.
10349 2018-06-04 Richard Biener <rguenther@suse.de>
10351 PR tree-optimization/86038
10352 * tracer.c (find_best_successor): Check probability for
10353 being initialized, bail out if not.
10355 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10358 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10359 of bits to ignore when comparing architectures.
10361 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10363 PR tree-optimization/69615
10364 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10365 maximum or minimum of the type, try to merge it also as if
10366 range1 is + [-, x - 1] or + [x + 1, -].
10369 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10371 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10373 PR tree-optimization/86034
10374 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10375 the unsigned bitfield type in a bit insertion sequence if it does not
10376 have a larger precision than the bitfield size.
10377 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10379 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10381 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10383 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10385 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10386 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10387 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10388 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10390 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10392 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10393 Disable -fdelete-null-pointer-checks for ELF toolchain.
10395 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10396 Kito Cheng <kito.cheng@gmail.com>
10398 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10399 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10400 (nds32*-*-*): Add glibc and uclibc conditions.
10401 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10402 (TARGET_EXCEPT_UNWIND_INFO): Define.
10403 * config/nds32/elf.h: New file.
10404 * config/nds32/linux.h: New file.
10405 * config/nds32/nds32-elf.opt: New file.
10406 * config/nds32/nds32-linux.opt: New file.
10407 * config/nds32/nds32-fp-as-gp.c
10408 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10409 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10411 (nds32_asm_file_end): Ditto.
10412 (nds32_print_operand): Ditto.
10413 (nds32_insert_attributes): Ditto.
10414 (nds32_init_libfuncs): New function.
10415 (TARGET_HAVE_TLS): Define.
10416 (TARGET_INIT_LIBFUNCS): Define.
10417 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10419 (TARGET_ELF): Apply different mcmodel setting.
10420 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10421 been migrated into elf.h and linux.h files.
10422 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10423 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10424 (mcmodel): The content has been migrated into nds32-elf.opt and
10425 nds32-linux.opt files.
10426 * config/nds32/t-elf: New file.
10427 * config/nds32/t-linux: New file.
10429 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10430 Shiva Chen <shiva0217@gmail.com>
10432 * config/nds32/constants.md (unspec_volatile_element): Add
10433 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10434 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10436 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10437 (make_pass_nds32_fp_as_gp): Declare.
10438 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10440 (nds32_asm_function_end_prologue): Remove unused asm output.
10441 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10442 (nds32_asm_file_start): Output necessary fp_as_gp information.
10443 (nds32_option_override): Adjust register usage.
10444 (nds32_expand_prologue): Consider fp_as_gp situation.
10445 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10446 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10449 (simple_return): Ditto.
10450 (omit_fp_begin): Output special directive for fp_as_gp.
10451 (omit_fp_end): Output special directive for fp_as_gp.
10452 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10453 mforbid-fp-as-gp): New options.
10455 2018-06-01 Mark Wielaard <mark@klomp.org>
10457 * dwarf2out.c (dwarf2out_finish): Remove generation of
10458 DW_AT_loclists_base.
10460 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10462 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10463 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10464 (struct merged_store_group): Add bit_insertion field.
10465 (dump_char_array): Use standard hexadecimal format.
10466 (merged_store_group::merged_store_group): Set bit_insertion to false.
10467 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10468 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10469 also print the mask in the dump file.
10470 (pass_store_merging::gate): Minor tweak.
10471 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10472 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10473 stores with INTEGER_CST stores.
10474 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10475 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10476 and use it throughout. Generate bit insertion sequences if need be.
10477 (pass_store_merging::process_store): Remove redundant condition.
10478 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10480 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10482 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10483 the 128-bit floating point types. Fix function comment.
10485 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10487 * config/aarch64/aarch64-simd.md
10488 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10490 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10493 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10495 PR tree-optimization/85989
10496 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10498 (backprop::intersect_uses): Check it when deciding whether this
10499 is a backedge reference.
10500 (backprop::process_block): Add each phi to m_visited_phis
10501 after visiting it, then clear it at the end.
10503 2018-06-01 Richard Biener <rguenther@suse.de>
10505 * tree-vectorizer.h (vect_dr_stmt): New function.
10506 (vect_get_load_cost): Adjust.
10507 (vect_get_store_cost): Likewise.
10508 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10509 Use vect_dr_stmt instead of DR_SMTT.
10510 (vect_record_base_alignments): Likewise.
10511 (vect_calculate_target_alignment): Likewise.
10512 (vect_compute_data_ref_alignment): Likewise and make static.
10513 (vect_update_misalignment_for_peel): Likewise.
10514 (vect_verify_datarefs_alignment): Likewise.
10515 (vector_alignment_reachable_p): Likewise.
10516 (vect_get_data_access_cost): Likewise. Pass down
10517 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10518 (vect_get_peeling_costs_all_drs): Likewise.
10519 (vect_peeling_hash_get_lowest_cost): Likewise.
10520 (vect_enhance_data_refs_alignment): Likewise.
10521 (vect_find_same_alignment_drs): Likewise.
10522 (vect_analyze_data_refs_alignment): Likewise.
10523 (vect_analyze_group_access_1): Likewise.
10524 (vect_analyze_group_access): Likewise.
10525 (vect_analyze_data_ref_access): Likewise.
10526 (vect_analyze_data_ref_accesses): Likewise.
10527 (vect_vfa_segment_size): Likewise.
10528 (vect_small_gap_p): Likewise.
10529 (vectorizable_with_step_bound_p): Likewise.
10530 (vect_prune_runtime_alias_test_list): Likewise.
10531 (vect_analyze_data_refs): Likewise.
10532 (vect_supportable_dr_alignment): Likewise.
10533 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10534 (vect_gen_prolog_loop_niters): Likewise.
10535 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10536 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10538 (vect_recog_mask_conversion_pattern): Likewise.
10539 (vect_try_gather_scatter_pattern): Likewise.
10540 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10541 to vect_get_store_cost.
10542 (vect_get_store_cost): Get stmt_info instead of DR.
10543 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10544 (vect_get_load_cost): Get stmt_info instead of DR.
10546 2018-06-01 Richard Biener <rguenther@suse.de>
10548 PR middle-end/86017
10549 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10550 vars wrapped in MEM_REFs.
10552 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10554 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10555 Fix subreg tests so that we only return a choice between
10556 GENERAL_REGS and FP_REGS if the original classes included both.
10558 2018-06-01 Richard Biener <rguenther@suse.de>
10561 * tree-ssa-structalias.c (get_function_part_constraint):
10562 Handle NULL fi->decl.
10563 (find_func_aliases_for_call): Properly handle indirect
10564 fi from direct call.
10565 (find_func_clobbers): Likewise.
10566 (ipa_pta_execute): Likewise.
10567 (create_variable_info_for): For functions that are ifunc_resolver
10568 resolve to a varinfo that contains the result of the resolver call.
10569 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10572 2018-05-31 Michael Collison <michael.collison@arm.com>
10574 * config/aarch64/aarch64.md:
10575 (*fix_to_zero_extenddfdi2): New pattern.
10576 * gcc.target/aarch64/fix_extend1.c: New testcase.
10578 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10580 PR middle-end/78809
10581 PR middle-end/83026
10582 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10583 and BUILT_IN_STRNCMP_EQ.
10584 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10585 BUILT_IN_STRNCMP_EQ.
10586 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10587 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10588 (gimple_fold_builtin): Likewise.
10589 * tree-ssa-strlen.c (compute_string_length): New function.
10590 (determine_min_obsize): New function.
10591 (handle_builtin_string_cmp): New function to handle calls to
10592 string compare functions.
10593 (strlen_optimize_stmt): Add handling to builtin string compare
10595 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10596 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10597 * tree.c (build_common_builtin_nodes): Add new defines of
10598 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10600 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10603 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10604 functions with naked attribute.
10606 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10608 * config/i386/sse.md (avx_vec_concat<mode>):
10609 Substitute concat_tg_mode mode attribute with xtg_mode.
10610 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10611 (concat_tg_mode): Remove mode attribute.
10613 2018-05-31 Martin Sebor <msebor@redhat.com>
10616 * calls.c (alloc_max_size): Correct a logic error/typo.
10617 Treat excessive arguments as infinite. Warn for invalid arguments.
10618 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10620 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10623 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10624 and movx for Haswell.
10626 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10627 Cesar Philippidis <cesar@codesourcery.com>
10629 PR middle-end/85879
10630 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10631 when emitting error on private/firstprivate reductions.
10632 * omp-low.c (lower_omp_target): Avoid reference-type processing
10633 on pointers for firstprivate clause.
10635 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10637 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10640 * config/aarch64/aarch64-simd.md
10641 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10642 (aarch64_ld1_x3_<mode>): Likewise
10643 (aarch64_st1x2<VALLDIF:mode>): Likewise
10644 (aarch64_st1_x2_<mode>): Likewise
10645 (aarch64_st1x3<VALLDIF:mode>): Likewise
10646 (aarch64_st1_x3_<mode>): Likewise
10647 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10648 (vld1_s8_x3): Likewise.
10649 (vld1_u16_x3): Likewise.
10650 (vld1_s16_x3): Likewise.
10651 (vld1_u32_x3): Likewise.
10652 (vld1_s32_x3): Likewise.
10653 (vld1_u64_x3): Likewise.
10654 (vld1_s64_x3): Likewise.
10655 (vld1_f16_x3): Likewise.
10656 (vld1_f32_x3): Likewise.
10657 (vld1_f64_x3): Likewise.
10658 (vld1_p8_x3): Likewise.
10659 (vld1_p16_x3): Likewise.
10660 (vld1_p64_x3): Likewise.
10661 (vld1q_u8_x3): Likewise.
10662 (vld1q_s8_x3): Likewise.
10663 (vld1q_u16_x3): Likewise.
10664 (vld1q_s16_x3): Likewise.
10665 (vld1q_u32_x3): Likewise.
10666 (vld1q_s32_x3): Likewise.
10667 (vld1q_u64_x3): Likewise.
10668 (vld1q_s64_x3): Likewise.
10669 (vld1q_f16_x3): Likewise.
10670 (vld1q_f32_x3): Likewise.
10671 (vld1q_f64_x3): Likewise.
10672 (vld1q_p8_x3): Likewise.
10673 (vld1q_p16_x3): Likewise.
10674 (vld1q_p64_x3): Likewise.
10675 (vst1_s64_x2): Likewise.
10676 (vst1_u64_x2): Likewise.
10677 (vst1_f64_x2): Likewise.
10678 (vst1_s8_x2): Likewise.
10679 (vst1_p8_x2): Likewise.
10680 (vst1_s16_x2): Likewise.
10681 (vst1_p16_x2): Likewise.
10682 (vst1_s32_x2): Likewise.
10683 (vst1_u8_x2): Likewise.
10684 (vst1_u16_x2): Likewise.
10685 (vst1_u32_x2): Likewise.
10686 (vst1_f16_x2): Likewise.
10687 (vst1_f32_x2): Likewise.
10688 (vst1_p64_x2): Likewise.
10689 (vst1q_s8_x2): Likewise.
10690 (vst1q_p8_x2): Likewise.
10691 (vst1q_s16_x2): Likewise.
10692 (vst1q_p16_x2): Likewise.
10693 (vst1q_s32_x2): Likewise.
10694 (vst1q_s64_x2): Likewise.
10695 (vst1q_u8_x2): Likewise.
10696 (vst1q_u16_x2): Likewise.
10697 (vst1q_u32_x2): Likewise.
10698 (vst1q_u64_x2): Likewise.
10699 (vst1q_f16_x2): Likewise.
10700 (vst1q_f32_x2): Likewise.
10701 (vst1q_f64_x2): Likewise.
10702 (vst1q_p64_x2): Likewise.
10703 (vst1_s64_x3): Likewise.
10704 (vst1_u64_x3): Likewise.
10705 (vst1_f64_x3): Likewise.
10706 (vst1_s8_x3): Likewise.
10707 (vst1_p8_x3): Likewise.
10708 (vst1_s16_x3): Likewise.
10709 (vst1_p16_x3): Likewise.
10710 (vst1_s32_x3): Likewise.
10711 (vst1_u8_x3): Likewise.
10712 (vst1_u16_x3): Likewise.
10713 (vst1_u32_x3): Likewise.
10714 (vst1_f16_x3): Likewise.
10715 (vst1_f32_x3): Likewise.
10716 (vst1_p64_x3): Likewise.
10717 (vst1q_s8_x3): Likewise.
10718 (vst1q_p8_x3): Likewise.
10719 (vst1q_s16_x3): Likewise.
10720 (vst1q_p16_x3): Likewise.
10721 (vst1q_s32_x3): Likewise.
10722 (vst1q_s64_x3): Likewise.
10723 (vst1q_u8_x3): Likewise.
10724 (vst1q_u16_x3): Likewise.
10725 (vst1q_u32_x3): Likewise.
10726 (vst1q_u64_x3): Likewise.
10727 (vst1q_f16_x3): Likewise.
10728 (vst1q_f32_x3): Likewise.
10729 (vst1q_f64_x3): Likewise.
10730 (vst1q_p64_x3): Likewise.
10732 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10734 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10735 user_label_prefix to name.
10737 * tree-core.h: Update comment about the format of NAME string
10738 passed to handler in attribute_spec.
10740 * config/msp430/msp430.md: Remove erroneous subreg expression from
10741 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10742 zero_extend{q,h}isi2.
10744 2018-05-30 Borislav Petkov <bp@suse.de>
10746 * doc/extend.texi: Document some architecture specific
10747 constraints and sort entries.
10749 2018-05-30 Martin Sebor <msebor@redhat.com>
10751 PR middle-end/85369
10752 * builtins.c (expand_builtin_stpcpy_1): New function.
10753 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10754 only if the former succeeds.
10756 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10758 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10761 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10763 * doc/invoke.texi (-flinker-output): Document
10765 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10767 * passes.c (ipa_write_summaries): Only modify statements if body
10769 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10770 incrementally linking.
10771 (ipa_passes): Likewise.
10772 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10773 pass down resolution info.
10774 * common.opt (flag_incremental_link): Update info.
10775 * gcc.c (plugin specs): Turn flinker-output=* to
10776 -plugin-opt=-linker-output-known
10777 * toplev.c (compile_file): Also cut compilation when doing incremental
10779 * flag-types. (enum lto_partition_model): Add
10780 LTO_LINKER_OUTPUT_NOLTOREL.
10781 (invoke.texi): Add -flinker-output docs.
10782 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10783 link same way as WPA; do not stream in dead initializers.
10785 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10786 darf2out_register_external_decl): Support incremental link.
10788 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10790 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10792 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10794 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10795 it down to simple_object_copy_lto_debug_sections.
10796 (run_gcc): Determine incremental LTO link time and configure
10797 lto1 into non-wpa mode, disable renaming of debug sections.
10799 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10801 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10802 descriptions of various incorrectly documented functions.
10804 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10807 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10808 address check not strict.
10810 2018-05-30 Richard Biener <rguenther@suse.de>
10812 PR tree-optimization/85964
10813 * tracer.c (better_p): Drop initialized count check, we only
10814 call the function with initialized counts now.
10815 (find_best_successor): Do find a best edge if one
10816 has uninitialized count.
10817 (find_best_predecessor): Likewise. Do BB frequency check only
10818 if count is initialized.
10820 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10822 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10823 (aarch64_ldrstr_offset_compare): New.
10824 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10825 load/store orderings.
10826 (aarch64_gen_adjusted_ldpstp): Likewise.
10828 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10830 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10831 Check for subset of GENERAL_REGS and FP_REGS.
10832 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10835 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10837 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10838 and wi::to_poly_offset. Add the current offset and then check
10839 whether the sum fits, rather than using an unchecked addition of
10840 a checked term. Check for a shwi rather than a uhwi.
10841 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10842 (store_constructor): Use poly_int_tree_p.
10843 (expand_expr_real_1): Likewise.
10844 * function.c (assign_temp): Likewise.
10845 * fold-const.c (const_binop): Use poly_int_tree_p and
10846 wi::to_poly_offset.
10847 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10849 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10850 to_poly_offset for MEM offsets.
10851 * ipa-icf.c (sem_variable::equals): Likewise.
10852 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10853 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10854 wi::to_poly_offset for BIT_FIELD_REF offsets.
10855 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10856 wi::to_poly_offset.
10857 * var-tracking.c (emit_note_insn_var_location): Use
10858 tree_to_poly_uint64.
10860 2018-05-29 Jim Wilson <jimw@sifive.com>
10862 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10864 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10867 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10868 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10870 (sse4_1_round<mode>2): Use nonimmediate_operand
10871 for operand 1 predicate.
10873 2018-05-29 Martin Sebor <msebor@redhat.com>
10874 Richard Biener <rguenther@suse.de>
10877 * calls.c (get_size_range): Call determine_value_range instead
10878 of get_value_range..
10879 * tree-vrp.h (determine_value_range): Declared new function.
10880 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10882 2018-05-29 Richard Biener <rguenther@suse.de>
10884 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10885 sure to use non-pattern stmts for get_earlier_stmt arguments.
10886 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10887 called on pattern stmts.
10888 (get_later_stmt): Likewise.
10890 2018-05-29 Martin Liska <mliska@suse.cz>
10892 PR gcov-profile/85759
10893 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10896 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10898 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10900 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10904 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10905 VEC_PACK_FLOAT_EXPR): New tree codes.
10906 * tree-pretty-print.c (op_code_prio): Handle
10907 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10908 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10909 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10910 * tree-inline.c (estimate_operator_cost): Likewise.
10911 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10912 * fold-const.c (const_binop): Likewise.
10913 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10914 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10915 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10916 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10917 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10918 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10919 * expr.c (expand_expr_real_2): Likewise.
10920 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10921 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10922 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10924 * optabs.c (expand_widen_pattern_expr): For
10925 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10926 sign from result type rather than operand's type.
10927 (expand_binop_directly): For vec_packu_float_optab and
10928 vec_packs_float_optab allow result type to be different from operand's
10930 * optabs-tree.c (optab_for_tree_code): Handle
10931 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10932 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10933 * tree-vect-generic.c (expand_vector_operations_1): Handle
10934 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10935 VEC_PACK_FLOAT_EXPR.
10936 * tree-vect-stmts.c (supportable_widening_operation): Handle
10938 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10939 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10940 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10941 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10942 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10944 (vec_pack<floatprefix>_float_<mode>): New expander.
10945 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10947 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10948 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10949 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10950 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10951 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10953 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10954 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10955 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10956 VEC_PACK_FLOAT_EXPR): Document.
10958 2018-05-29 Richard Biener <rguenther@suse.de>
10960 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10962 (stmt_vec_info_vec): Make pointer.
10963 (init_stmt_vec_info_vec): Remove.
10964 (free_stmt_vec_info_vec): Likewise.
10965 (set_stmt_vec_info_vec): New function.
10966 (free_stmt_vec_infos): Likewise.
10967 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10968 (set_vinfo_for_stmt): Likewise.
10969 (get_earlier_stmt): Likewise.
10970 (get_later_stmt): Likewise.
10971 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10972 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10973 (vec_info::~vec_info): Free stmt_vec_infos.
10974 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10975 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10976 (pass_slp_vectorize::execute): Likewise.
10977 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10978 (free_stmt_vec_info_vec): Likewise.
10979 (set_stmt_vec_info_vec): New function.
10980 (free_stmt_vec_infos): Likewise.
10981 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10982 the global stmt_vec_info_vec.
10983 * tree-parloops.c (gather_scalar_reductions): Use
10984 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10987 2018-05-29 Richard Biener <rguenther@suse.de>
10989 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10991 2018-05-29 Martin Liska <mliska@suse.cz>
10992 David Malcolm <dmalcolm@redhat.com>
10994 * vec.c (test_reverse): New.
10995 (vec_c_tests): Add new test.
10996 * vec.h (vl_ptr>::reverse): New function.
10998 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11000 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11002 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11005 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11007 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11009 2018-05-28 Richard Biener <rguenther@suse.de>
11011 PR tree-optimization/85933
11012 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11013 look at stmts marked as vectorizable.
11015 2018-05-28 Richard Biener <rguenther@suse.de>
11017 PR tree-optimization/85934
11018 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11019 vector boolean check before scalar optimization.
11021 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11023 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11026 2018-05-28 Mark Wielaard <mark@klomp.org>
11028 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11029 if it is an expression containing a minus sign.
11031 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11033 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11035 2018-05-27 Paul Koning <ni1d@arrl.net>
11037 * config/pdp11/pdp11.md (truncsihi2): Remove.
11039 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11040 Chung-Ju Wu <jasonwucj@gmail.com>
11042 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11044 (unaligned_store_dw): Ditto.
11045 * config/nds32/nds32-memory-manipulation.c
11046 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11047 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11048 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11049 (emit_setmem_word_loop): Rename to ...
11050 (emit_setmem_doubleword_loop): ... this.
11051 (nds32_gen_dup_4_byte_to_word_value): New function.
11052 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11053 (nds32_expand_setmem_loop): Refine implementation.
11054 (nds32_expand_setmem_loop_v3m): Ditto.
11055 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11058 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11060 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11062 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11064 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11065 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11066 machine->attr_no_prologue_p.
11067 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11068 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11069 (nds32_expand_epilogue): Consider attr_naked_p.
11070 (nds32_expand_epilogue_v3pop): Likewise.
11071 (nds32_can_use_return_insn): Likewise.
11072 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11073 attr_no_prologue_p fields.
11074 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11076 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11079 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11081 * config/i386/sse.md
11082 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11084 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11086 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11088 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11090 (*<floatsuffix>floatv2div2sf2): Rename to ...
11091 (*float<floatunssuffix>v2div2sf2): ... this.
11092 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11093 (float<floatunssuffix>v2div2sf2_mask): ... this.
11094 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11095 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11096 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11098 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11100 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11102 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11104 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11106 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11108 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11109 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11110 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11111 gen_ufix_truncv8dfv8si2.
11112 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11113 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11114 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11115 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11116 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11117 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11118 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11119 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11121 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11125 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11127 2018-05-25 Jim Wilson <jimw@sifive.com>
11129 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11130 * config/riscv/riscv.c (struct machine_function): Add
11131 interrupt_handler_p and attribute_checked_p fields.
11132 (riscv_attribute_table): Add interrupt.
11133 (riscv_interrupt_type_p): New.
11134 (riscv_save_reg_p): Save extra regs for interrupt handler.
11135 (riscv_use_save_libcall): Return false for interrupt handler.
11136 (riscv_first_stack_step): Add forward declaration.
11137 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11138 for interrupt handler with large frame. Use it for saved reg list.
11139 (riscv_expand_prologue): Move flag_stack_usage_info support to
11140 eliminate duplication.
11141 (riscv_expand_epilogue): Generate mret for interrupt handler.
11142 (riscv_epilogue_uses): New.
11143 (riscv_can_use_return_insn): Return false for interrupt handler.
11144 (riscv_function_ok_for_sibcall): Likewise.
11145 (riscv_set_current_function): Add interrupt handler support.
11146 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11147 * config/riscv/riscv.md (UNSPECV_MRET): New.
11149 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11151 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11153 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11155 PR tree-optimization/85712
11156 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11157 this candidate has already been replaced in-situ by a copy.
11159 2018-05-25 Jason Merrill <jason@redhat.com>
11161 PR c++/80485 - inline function non-zero address.
11162 * symtab.c (nonzero_address): Check DECL_COMDAT.
11164 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11167 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11168 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11169 extension of SImode operation. Use const123_operand predicate.
11170 (*saddsi_1): Remove.
11171 (*saddl_se_1): Ditto.
11172 (*ssubsi_1): Ditto.
11173 (*ssubl_se_1): Ditto.
11174 * config/alpha/predicates.md (const123_operand): New predicate.
11175 * config/alpha/constraints.md (P): Use IN_RANGE.
11177 2018-05-25 Richard Biener <rguenther@suse.de>
11179 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11181 (ref_maybe_used_by_stmt_p): Likewise.
11182 (stmt_may_clobber_ref_p): Likewise.
11183 (stmt_may_clobber_ref_p_1): Likewise.
11184 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11186 (ref_maybe_used_by_stmt_p): Likewise.
11187 (stmt_may_clobber_ref_p): Likewise.
11188 (stmt_may_clobber_ref_p_1): Likewise.
11189 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11190 the alias oracle to disambiguate DRs with stmts DR analysis
11192 (vect_analyze_data_refs): Do not give up on not analyzable
11193 DRs for BB vectorization. Remove code truncating the dataref
11196 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11199 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11200 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11201 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11203 2018-05-25 Richard Biener <rguenther@suse.de>
11205 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11206 function, combining stmt data ref gathering and fatal analysis
11208 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11209 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11210 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11211 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11212 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11214 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11216 PR tree-optimization/85720
11217 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11218 SCC if all partitions are builtins.
11219 (version_loop_by_alias_check): New parameter. Generate cancelable
11220 runtime alias check if all partitions are builtins.
11221 (distribute_loop): Update call to above function.
11223 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11225 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11226 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11227 (parm_default_def_partition_arg): Ditto.
11228 (set_parm_default_def_partition): Ditto.
11229 (get_parm_default_def_partitions): Ditto and make it static.
11230 (get_undefined_value_partitions): Ditto and make it static.
11231 (remove_ssa_form): Refactor call to init_var_map here.
11232 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11233 computation for loop region.
11234 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11235 (register_default_def): Delete.
11236 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11237 (parm_default_def_partition_arg): Ditto.
11238 (set_parm_default_def_partition): Ditto.
11239 (get_parm_default_def_partitions): Ditto and make it static.
11240 (get_undefined_value_partitions): Ditto and make it static.
11241 (coalesce_with_default, coalesce_with_default): Update comment.
11242 (create_coalesce_list_for_region): New func factored out from
11243 create_outofssa_var_map.
11244 (populate_coalesce_list_for_outofssa): New func factored out from
11245 create_outofssa_var_map and coalesce_ssa_name.
11246 (create_outofssa_var_map): Delete.
11247 (coalesce_ssa_name): Refactor to support live range computation.
11248 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11249 (get_parm_default_def_partitions): Delete.
11250 (get_undefined_value_partitions): Ditto.
11251 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11252 computation for loop region.
11253 (new_tree_live_info, loe_visit_block): Ditto.
11254 (live_worklist, set_var_live_on_entry): Ditto.
11255 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11256 * tree-ssa-live.h (struct _var_map): New fields.
11257 (init_var_map): Change decl.
11258 (region_contains_p): New.
11260 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11262 * tree-ssa-live.h (live_merge_and_clear): Delete.
11264 2018-05-25 Richard Biener <rguenther@suse.de>
11267 * tree-dump.c (dequeue_and_dump): Remove access to removed
11268 operand 2 of a SWITCH_EXPR.
11270 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11272 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11273 multiplication and division.
11274 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11275 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11276 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11277 (cond_udiv_optab, cond_umod_optab): New optabs.
11278 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11279 (IFN_COND_RDIV): New internal functions.
11280 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11281 TRUNC_MOD_EXPR and RDIV_EXPR.
11282 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11283 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11285 (SVE_INT_BINARY): Include mult.
11286 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11287 (optab, sve_int_op): Handle mult.
11288 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11290 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11291 for SVE_INT_BINARY_SD.
11293 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11295 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11296 (optab, sve_int_op): Handle div and udiv.
11297 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11298 for SVE_INT_BINARY_SD.
11299 (*<optab><mode>3): New insn for the same.
11301 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11303 * tree-vect-patterns.c: Include predict.h.
11304 (vect_recog_divmod_pattern): Restrict check for division support
11305 to when optimizing for size.
11307 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11309 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11310 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11311 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11312 (gimple_match_op::set_op): Likewise.
11313 (gimple_resimplify4): Declare.
11314 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11315 (expr::gen_transform): Likewise.
11316 (decision_tree::gen): Generate a simplification routine for 4 operands.
11317 * gimple-match-head.c (gimple_simplify): Add an overload for
11318 4 operands. In the top-level function, handle up to 4 call
11319 arguments and call gimple_resimplify4.
11320 (gimple_resimplify4): New function.
11321 (build_call_internal): Pass a fourth operand.
11322 (maybe_push_to_seq): Likewise.
11323 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11324 Fold VEC_COND_EXPRs of an operation and a default value into
11325 an IFN_COND_* function if possible.
11326 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11328 (SVE_COND_FP_BINARY): Include them.
11329 (optab, sve_fp_op): Handle them.
11330 (SVE_INT_BINARY_REV): New code iterator.
11331 (SVE_COND_FP_BINARY_REV): New int iterator.
11332 (commutative): New int attribute.
11333 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11335 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11337 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11338 (*cond_<optab><mode>): New patterns for reversed operands.
11340 2018-05-25 Richard Biener <rguenther@suse.de>
11342 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11343 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11344 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11345 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11346 * tree-vect-data-refs.c (everywhere): Adjust users.
11347 * tree-vect-loop.c (everywhere): Likewise.
11348 * tree-vect-slp.c (everywhere): Likewise.
11349 * tree-vect-stmts.c (everywhere): Likewise.
11350 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11352 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11354 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11356 (gcc_cv_as_section_exclude): ... this.
11357 Try Solaris as #exclude syntax.
11358 * configure: Regenerate.
11359 * config.in: Regenerate.
11360 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11362 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11363 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11365 * varasm.c (default_elf_asm_named_section): Don't check if
11366 HAVE_GAS_SECTION_EXCLUDE is defined.
11368 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11370 * doc/md.texi: Update the documentation of the cond_* optabs
11371 to mention the new final operand. Fix GET_MODE_NUNITS call.
11372 Describe the scalar case too.
11373 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11374 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11376 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11377 (get_conditional_internal_fn): Update comment.
11378 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11379 accumulator value as a final argument to conditional functions.
11380 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11381 a define_expand and add an "else" operand. Assert for now that
11382 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11383 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11384 (*cond_<optab><mode>): New patterns.
11385 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11386 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11387 (UNSPEC_COND_EOR): Delete.
11388 (optab): Remove associated mappings.
11389 (SVE_INT_BINARY): New code iterator.
11390 (sve_int_op): Remove int attribute and add "minus" to the code
11392 (SVE_COND_INT_OP): Delete.
11393 (SVE_COND_FP_OP): Rename to...
11394 (SVE_COND_FP_BINARY): ...this.
11396 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11398 * optabs.c (can_reuse_operands_p): New function.
11399 (maybe_legitimize_operands): Try to reuse the results for
11402 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11404 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11405 Add {q} suffix to insn mnemonic.
11407 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11409 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11410 (msp430_warn_func_return): New.
11412 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11414 * fold-const.c (tree_nonzero_bits): New function.
11415 * fold-const.h (tree_nonzero_bits): Likewise.
11416 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11417 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11419 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11423 * varasm.c (assemble_alias): Check ifunc_resolver only on
11426 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11429 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11430 when memory input operand is handled.
11432 2018-05-24 Luis Machado <luis.machado@linaro.org>
11434 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11436 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11438 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11440 * match.pd: Delay FMA folds until after vectorization.
11442 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11445 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11446 address check not strict.
11448 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11450 * gimple-match.h (gimple_match_op): New class.
11451 (mprts_hook): Replace parameters with a gimple_match_op *.
11452 (maybe_build_generic_op): Likewise.
11453 (gimple_simplified_result_is_gimple_val): Replace parameters with
11454 a const gimple_match_op *.
11455 (gimple_simplify): Replace code_helper * and tree * parameters with
11456 a gimple_match_op * parameter.
11457 (gimple_resimplify1): Replace code_helper *, tree and tree *
11458 parameters with a gimple_match_op * parameter.
11459 (gimple_resimplify2): Likewise.
11460 (gimple_resimplify3): Likewise.
11461 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11462 parameters with a gimple_match_op * parameter.
11463 * gimple-match-head.c (gimple_simplify): Change prototypes of
11464 auto-generated functions to take a gimple_match_op * instead of
11465 separate code_helper * and tree * parameters. Make the same
11466 change in the top-level overload and update calls to the
11467 gimple_resimplify routines. Update calls to the auto-generated
11468 functions and to maybe_push_res_to_seq in the publicly-facing
11469 operation-specific gimple_simplify overloads.
11470 (gimple_match_op::MAX_NUM_OPS): Define.
11471 (gimple_resimplify1): Replace rcode and ops with a single res_op
11472 parameter. Update call to gimple_simplify.
11473 (gimple_resimplify2): Likewise.
11474 (gimple_resimplify3): Likewise.
11475 (mprts_hook): Replace parameters with a gimple_match_op *.
11476 (maybe_build_generic_op): Likewise.
11477 (build_call_internal): Replace type, nargs and ops with
11478 a gimple_match_op *.
11479 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11480 with a single gimple_match_op *. Update calls to mprts_hook,
11481 build_call_internal and gimple_simplified_result_is_gimple_val.
11482 Factor out code that is common to the tree_code and combined_fn cases.
11483 * genmatch.c (expr::gen_transform): Replace tem_code and
11484 tem_ops with a gimple_match_op called tem_op. Update calls
11485 to the gimple_resimplify functions and maybe_push_res_to_seq.
11486 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11487 res_ops. Update call to the gimple_resimplify functions.
11488 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11489 (decision_tree::gen): Make the functions take a gimple_match_op *
11490 called res_op instead of separate res_code and res_ops parameters.
11491 Update call accordingly.
11492 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11493 and ops with a single res_op parameter. Update calls to
11494 maybe_build_generic_op and maybe_push_res_to_seq.
11495 (fold_stmt_1): Update calls to gimple_simplify and
11496 replace_stmt_with_simplification.
11497 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11498 and gimple_simplified_result_is_gimple_val.
11499 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11501 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11502 with a gimple_match_op *.
11503 (vn_nary_build_or_lookup): Likewise. Update call to
11504 vn_nary_build_or_lookup_1.
11505 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11506 gimple_match_op *. Update calls to the gimple_resimplify routines
11507 and to gimple_simplified_result_is_gimple_val.
11508 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11509 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11510 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11511 (visit_nary_op): Likewise.
11512 (visit_reference_op_load): Likewise.
11514 2018-05-23 Luis Machado <luis.machado@linaro.org>
11516 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11517 modifier for printing the step amount.
11519 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11522 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11525 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11527 * doc/sourcebuild.texi (Endianness): New subsubsection.
11529 2018-05-23 Luis Machado <luis.machado@linaro.org>
11531 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11532 <prefetch_dynamic_strides>: New const bool field.
11533 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11534 prefetch_dynamic_strides.
11535 (exynosm1_prefetch_tune): Likewise.
11536 (thunderxt88_prefetch_tune): Likewise.
11537 (thunderx_prefetch_tune): Likewise.
11538 (thunderx2t99_prefetch_tune): Likewise.
11539 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11541 (aarch64_override_options_internal): Update to set
11542 PARAM_PREFETCH_DYNAMIC_STRIDES.
11543 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11544 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11545 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11546 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11547 prefetch-dynamic-strides setting.
11549 2018-05-23 Luis Machado <luis.machado@linaro.org>
11551 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11552 <minimum_stride>: New const int field.
11553 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11554 minimum_stride field defaulting to -1.
11555 (exynosm1_prefetch_tune): Likewise.
11556 (thunderxt88_prefetch_tune): Likewise.
11557 (thunderx_prefetch_tune): Likewise.
11558 (thunderx2t99_prefetch_tune): Likewise.
11559 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11560 <default_opt_level>: Set to 3.
11561 (aarch64_override_options_internal): Update to set
11562 PARAM_PREFETCH_MINIMUM_STRIDE.
11563 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11564 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11565 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11566 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11567 stride is constant and is below the minimum stride threshold.
11569 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11571 * config/arm/arm-cpus.in (mode26): Delete.
11572 (armv4): Delete mode26 reference.
11573 * config/arm/arm.c (arm_configure_build_target): Delete use of
11576 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11578 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11580 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11581 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11583 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11584 (floatunsdidf2): Ditto.
11586 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11588 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11589 (fixuns_trunc<mode>si2_avx512f): Ditto.
11590 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11591 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11592 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11594 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11596 PR rtl-optimization/79985
11597 * df-scan.c (df_insn_refs_collect): Remove special case for
11598 global registers and asm statements.
11600 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11602 * extend.texi (Global Register Variables): Rewrite the bullet list.
11603 Note that the register is available for allocation. Note that access
11604 via inline asm must use constraints. Add note about async-signal
11605 handlers. Remove paragraph about automagic register selection.
11607 2018-05-23 Richard Biener <rguenther@suse.de>
11609 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11610 of fixed offset from memset VN.
11612 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11614 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11615 first_interp field.
11616 (alloc_cand_and_find_basis): Initialize first_interp field.
11617 (slsr_process_mul): Modify first_interp field.
11618 (slsr_process_add): Likewise.
11619 (slsr_process_cast): Modify first_interp field for each new
11621 (slsr_process_copy): Likewise.
11622 (dump_candidate): Dump first_interp field.
11623 (replace_mult_candidate): Process all interpretations, not just
11625 (replace_rhs_if_not_dup): Likewise.
11626 (replace_one_candidate): Likewise.
11628 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11630 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11632 (aarch64_needs_frame_chain): New function.
11633 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11635 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11638 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11639 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11640 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11641 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11642 as true for strict-align.
11643 (aarch64_can_inline_p): Perform checks even when callee has no
11644 attributes to check for strict alignment.
11645 * doc/extend.texi (AArch64 Function Attributes): Document
11647 * doc/invoke.texi: (AArch64 Options): Likewise.
11649 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11651 PR tree-optimization/85853
11652 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11653 the handling of the root of the node to...
11654 (vect_slp_analyze_node_operations_1): ...this new function,
11655 and run the whole thing with the child nodes' def types
11656 set according to their SLP node's def type.
11658 2018-05-23 Richard Biener <rguenther@suse.de>
11660 PR middle-end/85874
11661 * tree-data-ref.c (create_runtime_alias_checks): Defer
11662 and ignore overflow warnings.
11664 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11666 PR tree-optimization/85822
11667 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11670 2018-05-23 Richard Biener <rguenther@suse.de>
11672 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11673 memset constants via native_interpret_expr.
11675 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11678 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11680 (cgraph_node::create_alias): Likewise.
11681 (cgraph_node::get_availability): Check ifunc_resolver instead
11682 of looking up ifunc attribute.
11683 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11684 * varasm.c (do_assemble_alias): Likewise.
11685 (assemble_alias): Likewise.
11686 (default_binds_local_p_3): Likewise.
11687 * cgraph.h (cgraph_node): Add ifunc_resolver.
11688 (cgraph_node::only_called_directly_or_aliased_p): Return false
11689 for IFUNC resolver.
11690 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11692 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11693 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11694 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11695 instead of looking up ifunc attribute.
11697 2018-05-22 Luis Machado <luis.machado@linaro.org>
11699 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11701 2018-05-22 Martin Sebor <msebor@redhat.com>
11703 PR middle-end/85359
11704 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11705 only when expasion succeeds.
11706 (expand_builtin_strcmp): Same.
11707 (expand_builtin_strncmp): Same.
11709 2018-05-22 Martin Sebor <msebor@redhat.com>
11711 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11713 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11714 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11716 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11717 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11719 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11720 Add check for legitimate_address.
11721 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11722 (aarch64_swap_ldrstr_operands): New.
11723 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11726 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11727 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11729 * config/aarch64/aarch64.md: New patterns to generate stp
11731 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11732 single words and double words.
11733 (load_pair_sw, load_pair_dw): Likewise.
11734 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11736 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11738 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11739 for different mode ldpstp and add peephole for merged zero stores.
11740 Likewise for loads.
11741 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11743 (aarch64_gen_store_pair): Rename calls to match new patterns.
11744 (aarch64_gen_load_pair): Rename calls to match new patterns.
11745 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11746 (load_pair<DREG:mode><DREG2:mode>): ... This.
11747 (store_pair<mode>): Rename to...
11748 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11749 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11750 New mode iterators.
11751 (V_INT_EQUIV): Handle SImode.
11752 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11755 2018-05-22 Martin Sebor <msebor@redhat.com>
11758 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11759 or ajust the presumed bound on an operation to avoid unnecessary
11762 2018-05-22 Martin Sebor <msebor@redhat.com>
11764 PR tree-optimization/85826
11765 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11766 assuming that a DECL necesarily has a constant size.
11768 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11770 PR middle-end/85862
11771 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11773 2018-05-22 Richard Biener <rguenther@suse.de>
11775 PR tree-optimization/85834
11776 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11777 non-constant and non-zero memset arguments.
11779 2018-05-22 Martin Liska <mliska@suse.cz>
11782 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11784 2018-05-22 Richard Biener <rguenther@suse.de>
11786 PR tree-optimization/85863
11787 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11788 comparisons when vectype is specified.
11789 (vectorizable_condition): Do not specify vectype for
11790 vect_is_simple_cond when SLP vectorizing.
11792 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11795 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11796 define __ibm128 as long double.
11797 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11798 as a distinct type when IEEE 128-bit support is enabled.
11799 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11800 128-bit types to use the correct functions.
11801 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11802 convert between 128-bit floating point types that have different
11803 modes but the same representation, instead of using gen_lowpart to
11805 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11807 (IFKF_reg): New attributes to give the register constraints for
11809 (extend<mode>tf2_internal): New insns to mark an explicit
11810 conversion between 128-bit floating point types that have a
11811 different mode but share the same representation.
11813 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11815 PR tree-optimization/85814
11816 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11817 a null return from get_strinfo when unsharing the next
11818 strinfo in the chain.
11820 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11823 * varasm.c (weak_finish): Clean up weak_decls.
11825 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11827 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11828 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11829 UNSPEC_UADALP values.
11830 * config/aarch64/iterators.md (ABAL): New int iterator.
11833 (sur): Add mappings for the above.
11834 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11836 (aarch64_<sur>abal<mode>_4): Likewise.
11837 (aarch64_<sur>adalp<mode>_3): Likewise.
11838 (<sur>sadv16qi): New define_expand.
11840 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11842 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11843 (*movdf_internal): Ditto.
11844 (*rcpsf2_sse): Ditto.
11845 (*rsqrtsf2_sse): Ditto.
11846 (*sqrt<mode>2_sse): Ditto.
11848 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11850 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11852 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11853 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11854 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11855 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11857 * config/aarch64/arm_neon.h: Likewise.
11858 * config/aarch64/iterators.md (VQ_I): New.
11860 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11862 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11864 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11867 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11869 * config/nds32/constraints.md (S): New constraint.
11870 * config/nds32/nds32.md (call_internal): Use constraint S.
11871 (call_value_internal): Likewise.
11872 (sibcall_internal): Likewise.
11873 (sibcall_value_internal): Likewise.
11875 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11876 Chung-Ju Wu <jasonwucj@gmail.com>
11878 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11879 into consideration.
11881 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11882 Chung-Ju Wu <jasonwucj@gmail.com>
11884 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11885 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11886 (nds32_rtx_costs_impl): Simplify.
11887 (nds32_address_cost_impl): Simplify.
11888 (nds32_init_rtx_costs): New function.
11889 (nds32_rtx_costs_speed_prefer): Likewise.
11890 (nds32_rtx_costs_size_prefer): Likewise.
11891 (nds32_address_cost_speed_prefer): Likewise.
11892 (nds32_address_cost_speed_fwprop): Likewise.
11893 (nds32_address_cost_size_prefer): Likewise.
11894 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11895 * config/nds32/nds32.c (nds32_option_override): Use
11896 nds32_init_rtx_costs function.
11898 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11900 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11901 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11902 (TARGET_PIPELINE_N8): Likewise.
11903 (TARGET_PIPELINE_N10): Likewise.
11904 (TARGET_PIPELINE_N13): Likewise.
11905 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11907 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11909 * config/nds32/nds32-fpu.md: Update copyright year.
11911 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11913 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11915 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11917 * config/nds32/nds32.c
11918 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11919 * config/nds32/nds32.opt (minline-asm-r15): New option.
11921 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11923 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11925 * config/nds32/nds32.md (abssi2): New pattern.
11927 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11929 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11930 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11931 Merge insn pattern from sse_cvtsi2ss<round_name> and
11932 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11933 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11934 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11935 using SWI48 mode iterator.
11936 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11937 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11938 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11939 pattern from sse_cvttss2si<round_saeonly_name>
11940 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11941 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11942 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11943 using SWI48 mode iterator.
11944 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11945 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11946 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11947 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11948 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11949 using SWI48 mode iterator.
11950 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11951 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11952 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11953 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11954 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11955 SWI48 mode iterator.
11956 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11957 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11958 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11959 pattern from sse_cvttsd2si<round_saeonly_name>
11960 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11962 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11964 * config/nds32/nds32-md-auxiliary.c
11965 (nds32_valid_smw_lwm_base_p): Refine.
11966 (nds32_output_smw_single_word): Refine.
11967 (nds32_output_smw_double_word): New.
11968 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11970 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11972 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11973 (nds32_output_stack_pop): Refine.
11974 (nds32_expand_unaligned_load): Refine.
11975 (nds32_expand_unaligned_store): Refine.
11977 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11978 Chung-Ju Wu <jasonwucj@gmail.com>
11980 * config/nds32/constants.md: Add TP_REGNUM constant.
11981 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11982 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11984 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11985 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11986 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11987 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11988 and PIC code generation.
11989 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11991 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11993 * config/nds32/nds32.md: Support TLS and PIC.
11994 * config/nds32/nds32.c: Support TLS and PIC.
11995 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11996 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11999 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12001 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12002 mode with E_ prefix.
12004 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12005 Chung-Ju Wu <jasonwucj@gmail.com>
12007 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12008 * config/nds32/nds32-md-auxiliary.c
12009 (symbolic_reference_mentioned_p): New.
12010 (nds32_legitimize_ict_address): New.
12011 (nds32_expand_ict_move): New.
12012 (nds32_indirect_call_referenced_p): New.
12013 (nds32_symbol_binds_local_p): Delete.
12014 (nds32_long_call_p): Modify.
12015 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12016 * config/nds32/nds32-protos.h
12017 (symbolic_reference_mentioned_p): Declare.
12018 (nds32_legitimize_ict_address): Declare.
12019 (nds32_expand_ict_move): Declare.
12020 (nds32_indirect_call_referenced_p): Declare.
12021 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12022 (nds32_relax_group): Use nds32_ict_const_p as condition.
12023 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12024 (nds32_asm_file_start): Output ict_model directive in asm code.
12025 (nds32_legitimate_address_p): Consider indirect call.
12026 (nds32_print_operand): Consider indirect call.
12027 (nds32_print_operand_address): Consider indirect call.
12028 (nds32_insert_attributes): Handle "indirect_call" attribute.
12029 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12030 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12031 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12032 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12033 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12034 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12035 (TARGET_ICT_MODEL_SMALL): Define.
12036 (TARGET_ICT_MODEL_LARGE): Define.
12037 * config/nds32/nds32.md (movsi): Consider ict model.
12038 (call, call_value): Consider ict model.
12039 (sibcall, sibcall_value): Consider ict model.
12040 * config/nds32/nds32.opt (mict-model): New option.
12041 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12044 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12045 Monk Chiang <sh.chiang04@gmail.com>
12046 Jim Wilson <jimw@sifive.com>
12048 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12049 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12050 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12051 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12052 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12053 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12054 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12055 compute save_libcall_adjustment properly.
12056 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12057 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12058 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12059 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12060 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12061 (ABI_SPEC): Handle mabi=ilp32e.
12062 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12063 (RVE): Add RVE mask.
12064 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12065 <-march>: Add rv32e as an example.
12067 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12070 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12071 (intra_create_variable_infos): Handle C++ constructors.
12073 2018-05-18 Martin Liska <mliska@suse.cz>
12075 * passes.def: Remove a redundant pass.
12077 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12080 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12082 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12084 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12086 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12088 (armv2, armv2a, armv3, armv3m): Delete architectures.
12089 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12090 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12091 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12093 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12094 (*mulsidi3adddi): Likewise.
12095 (mulsidi3): Likewise.
12096 (*mulsidi3_nov6): Likewise.
12097 (umulsidi3): Likewise.
12098 (umulsidi3_nov6): Likewise.
12099 (umaddsidi4): Likewise.
12100 (*umulsidi3adddi): Likewise.
12101 (smulsi3_highpart): Likewise.
12102 (*smulsi3_highpart_nov6): Likewise.
12103 (umulsi3_highpart): Likewise.
12104 (*umulsi3_highpart_nov6): Likewise.
12105 * config/arm/arm.h (arm_arch3m): Delete.
12106 * config/arm/arm.c (arm_arch3m): Delete.
12107 (arm_option_override_internal): Update armv3-related comment.
12108 (arm_configure_build_target): Delete use of isa_bit_mode32.
12109 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12110 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12111 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12112 (mulsa3): Likewise.
12113 (mulusa3): Likewise.
12114 * config/arm/arm-protos.h (arm_arch3m): Delete.
12115 * config/arm/arm-tables.opt: Regenerate.
12116 * config/arm/arm-tune.md: Likewise.
12117 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12118 deleted architectures.
12120 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12122 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12123 (armv5t, armv5te): New features.
12124 (ARMv5, ARMv5e): Delete fgroups.
12125 (ARMv5t, ARMv5te): Adjust for above changes.
12126 (ARMv6m): Likewise.
12127 (armv5, armv5e): Delete arches.
12128 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12130 (*call_reg_arm): Likewise.
12131 (*call_value_reg_armv5): Likewise.
12132 (*call_value_reg_arm): Likewise.
12133 (*call_symbol): Likewise.
12134 (*call_value_symbol): Likewise.
12135 (*sibcall_insn): Likewise.
12136 (*sibcall_value_insn): Likewise.
12137 (clzsi2): Likewise.
12138 (prefetch): Likewise.
12139 (define_split and define_peephole2 dependent on arm_arch5):
12141 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12143 (TARGET_ARM_QBIT): Likewise.
12144 (TARGET_DSP_MULTIPLY): Likewise.
12145 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12146 (arm_arch5, arm_arch5e): Delete.
12147 (arm_arch5t, arm_arch5te): Declare.
12148 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12149 (arm_arch5t): Declare.
12150 (arm_option_reconfigure_globals): Update for the above.
12151 (arm_options_perform_arch_sanity_checks): Update comment, replace
12152 use of arm_arch5 with arm_arch5t.
12153 (use_return_insn): Likewise.
12154 (arm_emit_call_insn): Likewise.
12155 (output_return_instruction): Likewise.
12156 (arm_final_prescan_insn): Likewise.
12157 (arm_coproc_builtin_available): Likewise.
12158 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12159 arm_arch5e with arm_arch5t and arm_arch5te.
12160 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12161 (arm_arch5t, arm_arch5te): Declare.
12162 * config/arm/arm-tables.opt: Regenerate.
12163 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12164 * config/arm/t-multilib: Likewise.
12165 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12166 instead of arm_arch5.
12167 (*call_reg_thumb1): Likewise.
12168 (*call_value_reg_thumb1_v5): Likewise.
12169 (*call_value_reg_thumb1): Likewise.
12170 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12172 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12174 2018-05-18 Martin Liska <mliska@suse.cz>
12176 PR gcov-profile/84846
12177 * doc/gcov.texi: Document -t option of gcov tool.
12179 2018-05-18 Martin Liska <mliska@suse.cz>
12181 PR gcov-profile/84846
12182 * gcov.c (print_usage): Add new -t option.
12183 (process_args): Handle the option.
12184 (generate_results): Use stdout as output when requested by
12187 2018-05-18 Martin Liska <mliska@suse.cz>
12189 PR gcov-profile/84846
12190 * coverage.c (coverage_init): Write PWD to .gcno file.
12191 * doc/gcov.texi: Document how working directory is printed.
12192 * gcov-dump.c (dump_gcov_file): Print PWD.
12193 * gcov.c (output_intermediate_file): Likewise.
12194 (read_graph_file): Read PWD string.
12195 (output_lines): Print PWD.
12197 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12199 PR middle-end/85817
12200 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12201 for retval and return false if all args to phi are zero.
12203 2018-05-18 Richard Biener <rguenther@suse.de>
12205 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12207 (evrp_dom_walker::before_dom_children): Call it.
12209 2018-05-18 Richard Biener <rguenther@suse.de>
12211 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12212 results when processing array refs with variable index.
12214 2018-05-18 Toon Moene <toon@moene.org>
12216 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12217 directly after that of -floop-interchange. Indicate that both
12218 options are enabled by default when specifying -O3.
12220 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12222 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12223 iterator. Delete separate integer-mode vec_set<mode> expander.
12224 (aarch64_simd_vec_setv2di): Delete.
12225 (vec_setv2di): Delete.
12226 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12227 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12228 the "w, r" alternative.
12230 2018-05-18 Martin Liska <mliska@suse.cz>
12232 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12233 * tree-pass.h (make_pass_lower_switch_O0): New function.
12234 * tree-switch-conversion.c (node_has_low_bound): Remove.
12235 (node_has_high_bound): Likewise.
12236 (node_is_bounded): Likewise.
12237 (class pass_lower_switch): Make it a template type and create
12239 (pass_lower_switch::execute): Add template argument.
12240 (make_pass_lower_switch): New function.
12241 (make_pass_lower_switch_O0): New function.
12242 (do_jump_if_equal): Remove.
12243 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12244 all the hard work to tree optimization passes.
12246 2018-05-18 Martin Liska <mliska@suse.cz>
12248 * dbgcnt.c (limit_low): Renamed from limit.
12249 (limit_high): New variable.
12250 (dbg_cnt_is_enabled): Check for upper limit.
12251 (dbg_cnt): Adjust dumping.
12252 (dbg_cnt_set_limit_by_index): Add new argument for high
12254 (dbg_cnt_set_limit_by_name): Likewise.
12255 (dbg_cnt_process_single_pair): Parse new format.
12256 (dbg_cnt_process_opt): Use strtok.
12257 (dbg_cnt_list_all_counters): Remove 'value' and add
12259 * doc/invoke.texi: Document changes.
12261 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12263 * doc/sourcebuild.texi (scalar_all_fma): Document.
12264 * tree.def (FMA_EXPR): Delete.
12265 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12266 * internal-fn.c (ternary_direct): New macro.
12267 (expand_ternary_optab_fn): Likewise.
12268 (direct_ternary_optab_supported_p): Likewise.
12269 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12270 * builtins.c (fold_builtin_fma): Delete.
12271 (fold_builtin_3): Don't call it.
12272 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12273 * expr.c (expand_expr_real_2): Likewise.
12274 * fold-const.c (operand_equal_p): Likewise.
12275 (fold_ternary_loc): Likewise.
12276 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12277 * gimple.c (DEFTREECODE): Likewise.
12278 * gimplify.c (gimplify_expr): Likewise.
12279 * optabs-tree.c (optab_for_tree_code): Likewise.
12280 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12281 * tree-eh.c (operation_could_trap_p): Likewise.
12282 (stmt_could_throw_1_p): Likewise.
12283 * tree-inline.c (estimate_operator_cost): Likewise.
12284 * tree-pretty-print.c (dump_generic_node): Likewise.
12285 (op_code_prio): Likewise.
12286 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12287 * tree-ssa-operands.c (get_expr_operands): Likewise.
12288 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12289 * fold-const-call.h (fold_fma): Delete.
12290 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12291 CFN_FNMA and CFN_FNMS.
12292 (fold_fma): Delete.
12293 * genmatch.c (combined_fn): New enum.
12294 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12295 (commutative_op): New function.
12296 (commutate): Use it. Handle more than 2 operands.
12297 (dt_operand::gen_gimple_expr): Use commutative_op.
12298 (parser::parse_expr): Allow :c to be used with non-binary
12299 operators if the commutative operand is known.
12300 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12301 CFN_FMS, CFN_FNMA and CFN_FNMS.
12302 (backprop::process_assign_use): Remove FMA_EXPR handling.
12303 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12304 (gen_hsa_fma): New function.
12305 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12306 IFN_FNMA and IFN_FNMS.
12307 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12308 * gimple-fold.h (follow_all_ssa_edges): Declare.
12309 * gimple-fold.c (follow_all_ssa_edges): New function.
12310 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12311 gimple_build interface and use follow_all_ssa_edges to fold the result.
12312 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12313 instead of checking for optabs directly.
12314 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12315 rather than FMA_EXPRs.
12316 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12317 call to IFN_FMA instead of an FMA_EXPR.
12319 2018-05-17 Jim Wilson <jimw@sifive.com>
12321 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12322 sign extended promoted subreg, and the range does not have the sign bit
12323 set, then do a sign extend.
12325 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12326 test, check for sign extended subreg and/or constant operands, and
12327 do a sign extend in that case.
12329 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12331 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12332 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12334 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12335 Change logics_shift_reg to logics_shift_imm.
12336 (thunderx2t99_fp_loadpair_basic): Delete.
12337 (thunderx2t99_fp_storepair_basic): Delete.
12338 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12339 (thunderx2t99_asimd_polynomial): Delete.
12340 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12341 and neon_fp_mul_d_scalar_q.
12342 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12343 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12344 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12345 (thunderx2t99_asimd_lut): Add missing tbl types.
12346 (thunderx2t99_asimd_ext): Delete.
12347 (thunderx2t99_asimd_load1_1_mult): Delete.
12348 (thunderx2t99_asimd_load1_2_mult): Delete.
12349 (thunderx2t99_asimd_load1_ldp): New.
12350 (thunderx2t99_asimd_load1): New.
12351 (thunderx2t99_asimd_load2): Add missing *load2* types.
12352 (thunderx2t99_asimd_load3): New.
12353 (thunderx2t99_asimd_load4): New.
12354 (thunderx2t99_asimd_store1_1_mult): Delete.
12355 (thunderx2t99_asimd_store1_2_mult): Delete.
12356 (thunderx2t99_asimd_store2_mult): Delete.
12357 (thunderx2t99_asimd_store2_onelane): Delete.
12358 (thunderx2t99_asimd_store_stp): New.
12359 (thunderx2t99_asimd_store1): New.
12360 (thunderx2t99_asimd_store2): New.
12361 (thunderx2t99_asimd_store3): New.
12362 (thunderx2t99_asimd_store4): New.
12364 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12366 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12367 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12369 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12370 Segher Boessenkool <segher@kernel.crashing.org>
12373 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12376 2018-05-17 Richard Biener <rguenther@suse.de>
12378 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12379 for pruning loop and prune defs feeding only already visited PHIs.
12381 2018-05-17 Richard Biener <rguenther@suse.de>
12383 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12385 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12386 Richard Biener <rguenther@suse.de>
12388 PR tree-optimization/85793
12389 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12390 for VMAT_ELEMENTWISE.
12392 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12394 * internal-fn.h (lookup_internal_fn): Declare
12395 * internal-fn.c (lookup_internal_fn): New function.
12396 * gimple.c (gimple_build_call_from_tree): Handle calls to
12397 internal functions.
12398 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12399 internal function names.
12400 * tree-pretty-print.c (dump_generic_node): Likewise.
12401 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12403 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12405 * gimple-fold.h (gimple_build): Make the function forms take
12406 combined_fn rather than built_in_function.
12407 (gimple_simplify): Likewise.
12408 * gimple-match-head.c (gimple_simplify): Likewise.
12409 * gimple-fold.c (gimple_build): Likewise.
12410 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12411 rather than gimple_build_call_internal.
12412 (get_initial_defs_for_reduction): Likewise.
12413 (vect_create_epilog_for_reduction): Likewise.
12414 (vectorizable_live_operation): Likewise.
12416 2018-05-17 Martin Liska <mliska@suse.cz>
12418 * gimple-ssa-sprintf.c (format_directive): Do not use
12419 space in between 'G_' and '('.
12421 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12424 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12425 even if the mask is not all ones.
12428 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12430 (ix86_gimple_fold_builtin): Likewise.
12433 * config/i386/i386.c: Include tree-vector-builder.h.
12434 (ix86_vector_shift_count): New function.
12435 (ix86_fold_builtin): Fold shift builtins by scalar count.
12436 (ix86_gimple_fold_builtin): Likewise.
12438 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12439 _mm512_setzero): New intrinsics.
12441 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12442 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12444 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12445 code generation for cases where splatting a value is not useful.
12446 * simplify-rtx.c (simplify_ternary_operation): Simplify
12447 vec_merge across a vec_duplicate and a paradoxical subreg forming
12448 a vector mode to a vec_concat.
12450 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12452 * config.gcc: Support "goldmont-plus".
12453 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12455 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12456 PROCESSOR_GOLDMONT_PLUS.
12457 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12458 (processor_target_table): Add "goldmont-plus".
12459 (PTA_GOLDMONT_PLUS): Define.
12460 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12461 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12462 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12463 (fold_builtin_cpu): Add "goldmont-plus".
12464 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12465 (ix86_option_override_internal): Add "goldmont-plus".
12466 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12467 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12468 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12469 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12471 2018-05-17 Richard Biener <rguenther@suse.de>
12473 PR tree-optimization/85757
12474 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12475 remove defs that only feed that PHI from further processing.
12477 2018-05-16 Jim Wilson <jimw@sifive.com>
12479 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12481 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12483 2018-05-16 Mark Wielaard <mark@klomp.org>
12485 * dwarf2out.c (count_index_strings): New function.
12486 (output_indirect_strings): Call count_index_strings and generate
12487 header for dwarf_version >= 5.
12489 2018-05-16 Mark Wielaard <mark@klomp.org>
12491 * dwarf2out.c (dwarf_FORM): New function.
12492 (set_indirect_string): Use dwarf_FORM.
12493 (reset_indirect_string): Likewise.
12494 (size_of_die): Likewise.
12495 (value_format): Likewise.
12496 (output_die): Likewise.
12497 (add_skeleton_AT_string): Likewise.
12498 (output_macinfo_op): Likewise.
12499 (index_string): Likewise.
12500 (output_index_string_offset): Likewise.
12501 (output_index_string): Likewise.
12502 (count_index_strings): Likewise.
12504 2018-05-16 Carl Love <cel@us.ibm.com>
12506 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12507 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12509 2018-05-16 Martin Jambor <mjambor@suse.cz>
12511 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12512 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12514 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12516 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12517 (fnma<mode>4): Likewise.
12518 (fms<mode>4): Likewise.
12519 (fnms<mode>4): Likewise.
12520 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12521 (aarch64_fnma<mode>4): Likewise.
12522 (aarch64_fms<mode>4): Likewise.
12523 (aarch64_fnms<mode>4): Likewise.
12524 (aarch64_fnmadd<mode>4): Likewise.
12526 2018-05-16 Jason Merrill <jason@redhat.com>
12528 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12530 2018-05-16 Richard Biener <rguenther@suse.de>
12532 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12533 (dump_stmt_cost): Declare.
12534 (add_stmt_cost): Dump cost we add.
12535 (add_stmt_costs): New function.
12536 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12537 No longer exported.
12538 (vect_analyze_stmt): Adjust prototype.
12539 (vectorizable_condition): Likewise.
12540 (vectorizable_live_operation): Likewise.
12541 (vectorizable_reduction): Likewise.
12542 (vectorizable_induction): Likewise.
12543 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12544 cost vector to pass to vectorizable_ and record afterwards.
12545 (vect_model_reduction_cost): Take cost vector argument and adjust.
12546 (vect_model_induction_cost): Likewise.
12547 (vectorizable_reduction): Likewise.
12548 (vectorizable_induction): Likewise.
12549 (vectorizable_live_operation): Likewise.
12550 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12551 SLP_TREE_NUMBER_OF_VEC_STMTS.
12552 (vect_analyze_slp_cost_1): Remove.
12553 (vect_analyze_slp_cost): Likewise.
12554 (vect_slp_analyze_node_operations): Take visited args and
12555 a target cost vector. Avoid processing already visited stmt sets.
12556 (vect_slp_analyze_operations): Use a local cost vector to gather
12557 costs and register those of non-discarded instances.
12558 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12559 (vect_schedule_slp_instance): Remove copying of
12560 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12562 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12563 adding cost. Record cost entry location.
12564 (vect_prologue_cost_for_slp_op): Function to compute cost of
12565 a constant or invariant generated for SLP vect in the prologue,
12566 split out from vect_analyze_slp_cost_1.
12567 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12568 (vect_model_promotion_demotion_cost): Likewise.
12569 (vect_model_store_cost): Likewise, make static.
12570 (vect_model_load_cost): Likewise.
12571 (vectorizable_bswap): Add cost vector arg and adjust.
12572 (vectorizable_call): Likewise.
12573 (vectorizable_simd_clone_call): Likewise.
12574 (vectorizable_conversion): Likewise.
12575 (vectorizable_assignment): Likewise.
12576 (vectorizable_shift): Likewise.
12577 (vectorizable_operation): Likewise.
12578 (vectorizable_store): Likewise.
12579 (vectorizable_load): Likewise.
12580 (vectorizable_condition): Likewise.
12581 (vectorizable_comparison): Likewise.
12582 (can_vectorize_live_stmts): Likewise.
12583 (vect_analyze_stmt): Likewise.
12584 (vect_transform_stmt): Adjust calls to vectorizable_*.
12585 * tree-vectorizer.c: Include gimple-pretty-print.h.
12586 (dump_stmt_cost): New function.
12588 2018-05-16 Richard Biener <rguenther@suse.de>
12590 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12591 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12592 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12593 (check_name): New callback.
12594 (dse_classify_store): Track cycles via a visited bitmap of PHI
12595 defs and simplify handling of in-loop and across loop dead stores
12596 and properly fail for loop-variant refs. Handle byte-tracking with
12597 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12600 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12602 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12603 (vect_get_mask_type_for_stmt): Likewise.
12604 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12606 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12607 to determine the statement's vector type and the vector type that
12608 should be used for calculating nunits. Deal with cases in which
12609 the type has to be deferred.
12610 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12611 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12612 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12613 (vect_determine_vf_for_stmt): New functions, split out from...
12614 (vect_determine_vectorization_factor): ...here.
12615 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12616 (vect_get_mask_type_for_stmt): New functions, split out from
12617 vect_determine_vectorization_factor.
12619 2018-05-16 Richard Biener <rguenther@suse.de>
12621 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12622 verify the [VEC_]COND_EXPR embedded comparison.
12624 2018-05-15 Martin Sebor <msebor@redhat.com>
12626 PR tree-optimization/85753
12627 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12628 RECORD_TYPE in addition to ARRAY_TYPE.
12630 2018-05-15 Martin Sebor <msebor@redhat.com>
12632 PR middle-end/85643
12633 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12635 2018-05-15 Richard Biener <rguenther@suse.de>
12637 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12638 add by_clobber_p one. Change algorithm to collect all defs
12639 representing uses we need to walk and try reducing them to
12640 a single one before failing.
12641 (dse_dom_walker::dse_optimize_stmt): Adjust.
12643 2018-05-13 Mark Wielaard <mark@klomp.org>
12645 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12646 (size_of_loc_descr): Likewise.
12647 (output_loc_operands): Likewise.
12648 (output_loc_operands_raw): Likewise.
12649 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12650 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12651 (hash_loc_operands): Likewise.
12652 (compare_loc_operands): Likewise.
12654 2018-05-14 Mark Wielaard <mark@klomp.org>
12656 * dwarf2out.c (count_index_addrs): New function.
12657 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12659 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12661 PR tree-optimization/83648
12662 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12663 return value as malloc candidate.
12665 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12668 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12669 param as true in call to suggest_attribute.
12671 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12673 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12674 -mreadonly-in-sdata.
12676 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12678 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12680 (aarch64_crypto_aesd_fused): Likewise.
12682 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12684 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12685 (movsi_aarch64): Likewise.
12686 (load_pairsi): Likewise.
12687 (load_pairdi): Likewise.
12688 (store_pairsi): Likewise.
12689 (store_pairdi): Likewise.
12690 (load_pairsf): Likewise.
12691 (load_pairdf): Likewise.
12692 (store_pairsf): Likewise.
12693 (store_pairdf): Likewise.
12694 (zero_extend): Likewise.
12695 (trunc): Swap alternatives.
12696 (fcvt_target): Add '?' to prefer w over r.
12698 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12701 * config/i386/i386.md: Disallow non-commutative arithmetics in
12702 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12703 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12704 in the peephole2 before it.
12706 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12708 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12709 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12710 (ix86_handle_option): Handle -mcldemote.
12711 * config.gcc: New header.
12712 * config/i386/cldemoteintrin.h: New file.
12713 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12714 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12716 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12717 OPTION_MASK_ISA_CLDEMOTE.
12718 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12719 (ix86_valid_target_attribute_inner_p): Ditto.
12720 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12721 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12722 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12723 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12724 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12726 * config/i386/i386.opt: Add -mcldemote.
12727 * config/i386/x86intrin.h: New header.
12728 * doc/invoke.texi: Add -mcldemote.
12730 2018-05-14 Richard Biener <rguenther@suse.de>
12732 * doc/match-and-simplify.texi: Adjust :s documentation.
12734 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12736 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12737 intended memcpy size.
12738 (REORDER_45): Likewise.
12740 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12742 * sort.cc: New file.
12743 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12744 * vec.c (qsort_chk): Use gcc_qsort.
12745 * Makefile.in (OBJS-libcommon): Add sort.o.
12746 (build/sort.o): New target. Use it...
12747 (BUILD_RTL): ... here, and...
12748 (build/gencfn-macros): ... here, and...
12749 (build/genmatch): ... here.
12751 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12752 Chung-Ju Wu <jasonwucj@gmail.com>
12754 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12755 * config/nds32/nds32-graywolf.md: New file.
12756 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12757 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12759 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12760 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12761 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12762 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12763 * config/nds32/pipelines.md: Include n15 settings.
12765 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12766 Chung-Ju Wu <jasonwucj@gmail.com>
12768 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12769 * config/nds32/nds32-n13.md: New file.
12770 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12771 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12773 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12774 * config/nds32/nds32.md (pipeline_model): Add n13.
12775 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12776 * config/nds32/pipelines.md: Include n13 settings.
12778 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12779 Chung-Ju Wu <jasonwucj@gmail.com>
12781 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12782 * config/nds32/nds32-n10.md: New file.
12783 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12784 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12786 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12787 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12788 * config/nds32/nds32.md (pipeline_model): Add n10.
12789 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12790 * config/nds32/pipelines.md: Include n10 settings.
12792 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12793 Kito Cheng <kito.cheng@gmail.com>
12794 Chung-Ju Wu <jasonwucj@gmail.com>
12796 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12797 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12798 Add enum values for DSP extension instructions.
12799 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12801 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12802 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12803 New code iterators.
12804 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12805 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12806 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12807 * config/nds32/nds32-intrinsic.md: Likewise.
12808 * config/nds32/nds32_intrinsic.h: Likewise.
12809 * config/nds32/nds32-md-auxiliary.c: Likewise.
12810 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12811 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12812 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12813 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12814 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12815 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12816 TYPE_DMAC in switch statement.
12817 * config/nds32/nds32.c: New checking and implementation for DSP
12818 extension instructions.
12819 * config/nds32/nds32.h: Likewise.
12820 * config/nds32/nds32.md: Likewise.
12821 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12822 * config/nds32/predicates.md: Implement new predicates for DSP
12825 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12827 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12828 Reformat alternatives and attributes so it is easier to identify
12829 which constraints/attributes go with which instruction.
12830 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12831 (mov<mode>_softfloat32, FMOVE64): Likewise.
12832 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12833 (mov<mode>_softfloat64, FMOVE64): Likewise.
12835 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12837 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12839 (Basic PowerPC Built-in Functions): The new name of the
12840 subsection previously known as "PowerPC Built-in Functions".
12841 (Basic PowerPC Built-in Functions Available on all Configurations):
12843 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12844 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12845 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12846 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12848 2018-05-11 Martin Jambor <mjambor@suse.cz>
12851 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12854 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12857 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12859 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12861 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12862 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12863 (ix86_handle_option): Handle -mwaitpkg.
12864 * config.gcc: New header.
12865 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12866 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12867 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12869 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12870 OPTION_MASK_ISA_WAITPKG.
12871 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12872 (ix86_option_override_internal): Add PTA_WAITPKG.
12873 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12874 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12875 IX86_BUILTIN_TPAUSE.
12876 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12877 __builtin_ia32_umwait and __builtin_ia32_tpause.
12878 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12879 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12880 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12881 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12882 UNSPECV_TPAUSE): New.
12883 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12884 * config/i386/i386.opt: Add -mwaitpkg.
12885 * config/i386/waitpkgintrin.h: New file.
12886 * config/i386/x86intrin.h: New header.
12887 * doc/invoke.texi: Add -mwaitpkg.
12889 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12892 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12894 (cortex-m0): Use armv6s-m isa.
12895 (cortex-m0plus): Likewise.
12896 (cortex-m1): Likewise.
12897 (cortex-m0.small-multiply): Likewise.
12898 (cortex-m0plus.small-multiply): Likewise.
12899 (cortex-m1.small-multiply): Likewise.
12901 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12902 Jakub Jelinek <jakub@redhat.com>
12904 PR tree-optimization/85692
12905 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12906 source permute as well.
12908 2018-05-11 Martin Liska <mliska@suse.cz>
12911 * doc/extend.texi: Document LLVM style format for no_sanitize
12914 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12916 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12917 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12918 (mode_supports_vsx_dform_quad): Likewise.
12919 (mode_supports_vmx_dform): Move these functions to be next to the
12920 other mode_supports functions.
12921 (mode_supports_dq_form): Likewise.
12922 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12923 mode_supports_dq_form.
12924 (reg_offset_addressing_ok_p): Likewise.
12925 (offsettable_ok_by_alignment): Likewise.
12926 (rs6000_legitimate_offset_address_p): Likewise.
12927 (legitimate_lo_sum_address_p): Likewise.
12928 (rs6000_legitimize_address): Likewise.
12929 (rs6000_legitimize_reload_address): Likewise.
12930 (rs6000_secondary_reload_inner): Likewise.
12931 (rs6000_preferred_reload_class): Likewise.
12932 (rs6000_output_move_128bit): Likewise.
12934 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12936 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12937 Generate SImode target register for null target.
12938 <case IX86_BUILTIN_XGETBV>: Ditto.
12939 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12940 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12942 2018-05-10 Carl Love <cel@us.ibm.com>
12944 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12945 dcbtt and dcbtstt if operands[2] is 0.
12947 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12950 * config/i386/sse.md (usadv64qi): New expander.
12952 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12954 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12955 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12956 -maltivec=be support.
12957 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12958 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12959 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12960 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12961 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12962 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12963 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12964 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12965 altivec_vsumsws): Adjust.
12966 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12967 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12968 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12970 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12971 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12972 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12973 (altivec_lve<VI_char>x): Delete expand.
12974 (*altivec_lve<VI_char>x_internal): Rename to...
12975 (altivec_lve<VI_char>x): ... this.
12976 (altivec_lvxl_<mode>): Delete expand.
12977 (*altivec_lvxl_<mode>_internal): Rename to ...
12978 (altivec_lvxl_<mode>): ... this.
12979 (altivec_stvxl_<mode>): Delete expand.
12980 (*altivec_stvxl_<mode>_internal): Rename to ...
12981 (altivec_stvxl_<mode>): ... this.
12982 (altivec_stve<VI_char>x): Delete expand.
12983 (*altivec_stve<VI_char>x_internal): Rename to ...
12984 (altivec_stve<VI_char>x): ... this.
12985 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12986 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12987 reduc_plus_scal_<mode>): Adjust.
12988 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12990 (rs6000_cpu_cpp_builtins): Adjust.
12991 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12992 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12993 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12994 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12995 -maltivec=be support.
12996 (rs6000_split_vec_extract_var): Adjust.
12997 (rs6000_split_v4si_init): Adjust.
12998 (swap_selector_for_mode): Delete.
12999 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13000 altivec_expand_stvex_be): Delete.
13001 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13002 -maltivec=be support.
13003 (rs6000_gimple_fold_builtin): Ditto.
13004 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13006 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13007 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13008 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13009 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13010 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13011 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13012 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13013 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13014 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13015 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13016 anonymous split): Adjust.
13017 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13018 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13020 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13022 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13023 when --with-gxx-include-dir is also specified.
13024 * configure: Regenerate.
13026 2018-05-09 Jim Wilson <jimw@sifive.com>
13029 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13030 * config/riscv/t-withmultilib: New.
13031 * config/riscv/withmultilib.h: New.
13032 * doc/install.texi: Document RISC-V --with-multilib-list support.
13034 2018-05-09 Richard Biener <rguenther@suse.de>
13036 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13038 (vect_bb_vectorization_profitable_p): Adjust. Compute
13039 actual scalar cost using the cost vector and the add_stmt_cost
13042 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13044 PR rtl-optimization/85645
13045 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13046 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13048 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13050 PR rtl-optimization/85645
13051 * shrink-wrap.c (spread_components): Return a boolean saying if
13052 anything was changed.
13053 (try_shrink_wrapping_separate): Iterate spread_components until
13054 nothing changes anymore.
13056 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13058 PR rtl-optimization/85645
13059 * regrename.c (build_def_use): Also kill the chains that include the
13060 destination of a REG_CFA_REGISTER note.
13062 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13064 PR rtl-optimization/85645
13065 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13066 insn that has a REG_CFA_REGISTER note.
13068 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13070 * cfgexpand.c (expand_clobber): New function.
13071 (expand_gimple_stmt_1): Use it.
13072 * tree-vect-stmts.c (vect_clobber_variable): New function,
13074 (vectorizable_simd_clone_call): ...here.
13075 (vectorizable_store): Emit a clobber either side of an
13076 IFN_STORE_LANES sequence.
13077 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13079 2018-05-09 Tom de Vries <tom@codesourcery.com>
13082 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13083 (define_insn "trap_if_false"): Add exit after trap.
13085 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13087 PR rtl-optimization/85638
13088 * bb-reorder.c: Include common/common-target.h.
13089 (create_forwarder_block): New function extracted from...
13090 (fix_up_crossing_landing_pad): ...here. Rename into...
13091 (dw2_fix_up_crossing_landing_pad): ...this.
13092 (sjlj_fix_up_crossing_landing_pad): New function.
13093 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13094 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13095 from both partitions and exit the loop after one iteration.
13097 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13100 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13102 (Basic PowerPC Built-in Functions): The new name of the
13103 subsection previously known as "PowerPC Built-in Functions".
13104 (Basic PowerPC Built-in Functions Available on all Configurations):
13106 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13108 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13110 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13112 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13115 2018-05-08 Jim Wilson <jimw@sifive.com>
13117 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13118 (LD_EMUL_SUFFIX): New.
13119 (LINK_SPEC): Use it.
13121 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13123 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13125 (Basic PowerPC Built-in Functions): The new name of the
13126 subsection previously known as "PowerPC Built-in Functions".
13127 (Basic PowerPC Built-in Functions Available on all Configurations):
13129 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13131 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13133 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13135 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13138 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13141 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13142 after cmpelim optimization.
13144 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13146 * config.gcc: Support "goldmont".
13147 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13148 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13149 PROCESSOR_GOLDMONT.
13150 * config/i386/i386.c (m_GOLDMONT): Define.
13151 (processor_target_table): Add "goldmont".
13152 (PTA_GOLDMONT): Define.
13153 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13154 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13155 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13156 (fold_builtin_cpu): Add "goldmont".
13157 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13158 (ix86_option_override_internal): Add "goldmont".
13159 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13160 (processor_type): Add PROCESSOR_GOLDMONT.
13161 * config/i386/i386.md: Add CPU "glm".
13162 * config/i386/glm.md: New file.
13163 * config/i386/x86-tune.def: Add m_GOLDMONT.
13164 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13166 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13169 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13171 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13172 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13173 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13176 * config/i386/i386.c (ix86_fold_builtin): Handle
13177 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13180 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13181 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13183 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13186 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13187 (check_arch): Likewise.
13188 (check_fpu): Return the result rather than printing it.
13189 (end arch): Fix operator precedence.
13190 (end cpu): Likewise.
13191 (END): Print the result from check_fpu.
13193 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13194 Alan Hayward <alan.hayward@arm.com>
13195 David Sherwood <david.sherwood@arm.com>
13197 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13198 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13199 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13200 (*fcmuo<mode>_and): New patterns.
13202 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13204 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13205 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13206 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13207 (cmp_op, sve_imm_con): New code attributes.
13208 (SVE_COND_INT_CMP, imm_con): Delete.
13209 (cmp_op): Remove above unspecs from int attribute.
13210 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13212 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13213 comparison-specific unspecs.
13214 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13215 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13216 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13217 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13218 (*vec_fcm<cmp_op><mode>): Rename to...
13219 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13220 (*vec_fcmuo<mode>): Rename to...
13221 (*fcmuo<mode>): ...this and adjust likewise.
13222 (*pred_fcm<cmp_op><mode>): New pattern.
13223 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13224 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13226 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13228 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13229 (aarch64_emit_sve_predicated_cond): New function.
13230 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13231 (aarch64_emit_unspec_cond_or): Replace with...
13232 (aarch64_emit_sve_or_conds): ...this new function. Use
13233 aarch64_emit_sve_ptrue_op for the individual comparisons and
13234 aarch64_emit_binop to OR them together.
13235 (aarch64_emit_inverted_unspec_cond): Replace with...
13236 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13237 aarch64_emit_sve_ptrue_op for the comparison and
13238 aarch64_emit_unop to invert the result.
13239 (aarch64_expand_sve_vec_cmp_float): Update after the above
13240 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13242 2018-05-07 Nathan Sidwell <nathan@acm.org>
13244 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13245 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13246 (Backwards Compatibility): Likewise.
13248 2018-05-07 Luis Machado <luis.machado@linaro.org>
13252 2018-05-07 Luis Machado <luis.machado@linaro.org>
13254 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13255 <prefetch_dynamic_strides>: New const bool field.
13256 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13257 prefetch_dynamic_strides.
13258 (exynosm1_prefetch_tune): Likewise.
13259 (thunderxt88_prefetch_tune): Likewise.
13260 (thunderx_prefetch_tune): Likewise.
13261 (thunderx2t99_prefetch_tune): Likewise.
13262 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13264 (aarch64_override_options_internal): Update to set
13265 PARAM_PREFETCH_DYNAMIC_STRIDES.
13266 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13267 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13268 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13269 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13270 prefetch-dynamic-strides setting.
13272 2018-05-07 Luis Machado <luis.machado@linaro.org>
13274 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13275 <minimum_stride>: New const int field.
13276 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13277 minimum_stride field.
13278 (exynosm1_prefetch_tune): Likewise.
13279 (thunderxt88_prefetch_tune): Likewise.
13280 (thunderx_prefetch_tune): Likewise.
13281 (thunderx2t99_prefetch_tune): Likewise.
13282 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13283 (aarch64_override_options_internal): Update to set
13284 PARAM_PREFETCH_MINIMUM_STRIDE.
13285 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13286 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13287 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13288 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13289 stride is constant and is below the minimum stride threshold.
13291 2018-05-07 Luis Machado <luis.machado@linaro.org>
13293 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13296 2018-05-07 Luis Machado <luis.machado@linaro.org>
13298 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13299 <prefetch_dynamic_strides>: New const bool field.
13300 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13301 prefetch_dynamic_strides.
13302 (exynosm1_prefetch_tune): Likewise.
13303 (thunderxt88_prefetch_tune): Likewise.
13304 (thunderx_prefetch_tune): Likewise.
13305 (thunderx2t99_prefetch_tune): Likewise.
13306 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13308 (aarch64_override_options_internal): Update to set
13309 PARAM_PREFETCH_DYNAMIC_STRIDES.
13310 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13311 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13312 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13313 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13314 prefetch-dynamic-strides setting.
13316 2018-05-07 Luis Machado <luis.machado@linaro.org>
13318 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13319 <minimum_stride>: New const int field.
13320 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13321 minimum_stride field.
13322 (exynosm1_prefetch_tune): Likewise.
13323 (thunderxt88_prefetch_tune): Likewise.
13324 (thunderx_prefetch_tune): Likewise.
13325 (thunderx2t99_prefetch_tune): Likewise.
13326 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13327 (aarch64_override_options_internal): Update to set
13328 PARAM_PREFETCH_MINIMUM_STRIDE.
13329 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13330 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13331 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13332 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13333 stride is constant and is below the minimum stride threshold.
13335 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13338 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13339 the type is addressable. Don't force op into register if it has
13342 2018-05-05 Roland McGrath <mcgrathr@google.com>
13345 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13346 any section for which we don't know a specific type it should have,
13347 regardless of name. Previously this was done only for the exact
13348 names ".init_array", ".fini_array", and ".preinit_array".
13349 (default_elf_asm_named_section): Add comment about
13350 relationship with default_section_type_flags and SECTION_NOTYPE.
13351 (get_section): Don't consider it a type conflict if one side has
13352 SECTION_NOTYPE and the other doesn't, as long as neither has the
13353 SECTION_BSS et al used in the default_section_type_flags logic.
13355 2018-05-05 Tom de Vries <tom@codesourcery.com>
13358 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13359 (workaround_barsyncs): New function.
13360 (nvptx_reorg): Use workaround_barsyncs.
13361 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13362 (define_expand "nvptx_membar_cta"): New define_expand.
13363 (define_insn "*nvptx_membar_cta"): New insn.
13365 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13367 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13368 To improve optimization opportunities.
13369 * builtin-types.def: The new needed builtin types for the above.
13371 2018-05-04 Richard Biener <rguenther@suse.de>
13373 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13374 * gimple-ssa-store-merging.c
13375 (imm_store_chain_info::output_merged_store): Remove redundant create,
13376 release split_store vector contents on failure.
13377 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13378 scalar stmt vector on cache hit.
13380 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13382 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13384 * config.gcc (powerpc-xilinx-eabi*): Remove.
13385 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13387 (fusion_addis_mem_combo_load): Ditto.
13388 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13390 (rs6000_cpu_cpp_builtins): Ditto.
13391 * config/rs6000/rs6000-linux.c
13392 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13393 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13394 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13396 (rs6000_setup_reg_addr_masks): Ditto.
13397 (rs6000_init_hard_regno_mode_ok): Ditto.
13398 (rs6000_option_override_internal): Ditto.
13399 (legitimate_lo_sum_address_p): Ditto.
13400 (rs6000_legitimize_address): Ditto.
13401 (rs6000_legitimize_reload_address): Ditto.
13402 (rs6000_legitimate_address_p): Ditto.
13403 (abi_v4_pass_in_fpr): Ditto.
13404 (setup_incoming_varargs): Ditto.
13405 (rs6000_gimplify_va_arg): Ditto.
13406 (rs6000_split_multireg_move): Ditto.
13407 (rs6000_savres_strategy): Ditto.
13408 (rs6000_emit_prologue_components): Ditto.
13409 (rs6000_emit_epilogue_components): Ditto.
13410 (rs6000_emit_prologue): Ditto.
13411 (rs6000_emit_epilogue): Ditto.
13412 (rs6000_elf_file_end): Ditto.
13413 (rs6000_function_value): Ditto.
13414 (rs6000_libcall_value): Ditto.
13415 * config/rs6000/rs6000.h: Ditto.
13416 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13417 (TARGET_MINMAX): ... this. New.
13418 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13419 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13420 (*movsi_internal1_single): Delete.
13421 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13422 mfpu=, mxilinx-fpu): Delete.
13423 * config/rs6000/singlefp.h: Delete.
13424 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13425 * config/rs6000/t-rs6000: Ditto.
13426 * config/rs6000/t-xilinx: Delete.
13427 * config/rs6000/titan.md: Adjust for fp_type removal.
13428 * config/rs6000/vsx.md: Remove Xilinx FP support.
13429 (VStype_simple): Delete.
13430 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13431 * config/rs6000/xfpu.h: Delete.
13432 * config/rs6000/xfpu.md: Delete.
13433 * config/rs6000/xilinx.h: Delete.
13434 * config/rs6000/xilinx.opt: Delete.
13435 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13436 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13438 2018-05-04 Tom de Vries <tom@codesourcery.com>
13441 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13444 2018-05-04 Richard Biener <rguenther@suse.de>
13446 PR middle-end/85627
13447 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13448 (expand_complex_div_wide): Likewise.
13449 (expand_complex_operations_1): Likewise.
13450 (expand_complex_libcall): Preserve EH info of the original stmt.
13451 (tree_lower_complex): Handle removed blocks.
13452 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13453 on complex multiplication and division libcall builtins.
13455 2018-05-04 Richard Biener <rguenther@suse.de>
13457 PR middle-end/85574
13458 * fold-const.c (negate_expr_p): Restrict negation of operand
13459 zero of a division to when we know that can happen without
13461 (fold_negate_expr_1): Likewise.
13463 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13466 * real.h (real_nextafter): Declare.
13467 * real.c (real_nextafter): New function.
13468 * fold-const-call.c (fold_const_nextafter): New function.
13469 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13470 CASE_CFN_NEXTTOWARD.
13471 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13472 even when arg1_mode is different from arg0_mode.
13474 2018-05-03 Nathan Sidwell <nathan@acm.org>
13476 * doc/extend.texi (Deprecated Features): Remove
13477 -ffriend-injection.
13478 (Backwards Compatibility): Likewise.
13479 * doc/invoke.texi (C++ Language Options): Likewise.
13480 (C++ Dialect Options): Likewise.
13482 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13485 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13486 _mm512_mask_mullox_epi64): New intrinsics.
13488 2018-05-03 Tom de Vries <tom@codesourcery.com>
13491 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13492 dump files): Add offload-tree.
13494 2018-05-03 Richard Biener <rguenther@suse.de>
13496 PR tree-optimization/85615
13497 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13498 to loops not nested in BBs loop father to avoid creating multi-entry
13501 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13503 PR tree-optimization/70291
13504 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13505 arguments. Change return type to tree. Emit libcall as a new
13506 statement rather than replacing existing one when inplace_p is true.
13507 (expand_complex_multiplication_components): New function.
13508 (expand_complex_multiplication): Expand floating-point complex
13509 multiplication using the above.
13510 (expand_complex_division): Rename inner_type parameter to type.
13511 Update expand_complex_libcall call-site.
13512 (expand_complex_operations_1): Update expand_complex_multiplication
13513 and expand_complex_division call-sites.
13515 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13518 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13519 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13520 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13521 the highest significant bit of the shift count mask is clear. In
13522 check whether and[sq]i3 is needed verify that all significant bits
13523 of the shift count other than the highest are set.
13525 2018-05-02 Tom de Vries <tom@codesourcery.com>
13528 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13529 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13530 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13531 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13532 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13533 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13534 __builtin_goacc_parlevel_size.
13536 2018-05-02 Richard Biener <rguenther@suse.de>
13538 PR tree-optimization/85597
13539 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13540 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13543 2018-05-02 Tom de Vries <tom@codesourcery.com>
13546 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13547 dump files): Add ltrans-tree.
13549 2018-05-02 Tom de Vries <tom@codesourcery.com>
13552 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13553 dump files): Add wpa-ipa.
13555 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13557 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13558 powerpc*-*-linux*paired* target.
13559 * config/rs6000/750cl.h: Delete.
13560 * config/rs6000/paired.h: Delete.
13561 * config/rs6000/paired.md: Delete.
13562 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13564 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13565 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13566 comment. Remove paired float support.
13567 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13568 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13570 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13571 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13573 * config/rs6000/rs6000.c: Remove paired float support.
13574 (paired_expand_vector_init, paired_expand_vector_move,
13575 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13576 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13577 paired_expand_builtin, paired_expand_predicate_builtin,
13578 paired_init_builtins): Delete.
13579 * config/rs6000/rs6000.h: Remove paired float support.
13580 * config/rs6000/rs6000.md: Remove paired float support.
13581 (move_from_CR_ov_bit): Delete.
13582 * config/rs6000/rs6000.opt (mpaired): Delete.
13583 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13584 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13586 2018-05-02 Richard Biener <rguenther@suse.de>
13588 PR middle-end/85567
13589 * gimplify.c (gimplify_save_expr): When in SSA form allow
13590 SAVE_EXPRs to compute to SSA vars.
13592 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13595 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13596 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13597 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13598 clobber operands[2], instead use a new pseudo. Formatting fixes.
13600 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13602 PR tree-optimization/85586
13603 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13604 exit early for statements in the same group if the accesses are
13607 2018-05-02 Tom de Vries <tom@codesourcery.com>
13610 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13613 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13615 PR tree-optimization/85143
13616 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13618 2018-05-01 Tom de Vries <tom@codesourcery.com>
13621 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13622 not found" error message.
13624 2018-05-01 Tom de Vries <tom@codesourcery.com>
13627 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13628 * vec.c (test_ordered_remove_if): New function.
13629 (vec_c_tests): Call test_ordered_remove_if.
13630 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13631 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13632 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13633 VEC_ORDERED_REMOVE_IF.
13635 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13637 PR tree-optimization/82665
13638 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13639 pointer subtraction where arguments come from a memchr call.
13641 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13643 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13644 --push-state --as-needed and --pop-state instead of --as-needed and
13645 --no-as-needed if ld supports it.
13646 * configure: Regenerated.
13649 * doc/install.texi2html: Replace _002d with - and _002a with * in
13650 generated html files using sed.
13652 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13655 * gcc-rich-location.c (blank_line_before_p): New function.
13656 (use_new_line): New function.
13657 (gcc_rich_location::add_fixit_insert_formatted): New function.
13658 * gcc-rich-location.h
13659 (gcc_rich_location::add_fixit_insert_formatted): New function.
13661 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13663 * selftest.c (assert_streq): Rename "expected" and "actual" to
13664 "val1" and "val2". Extend NULL-handling to cover both inputs
13665 symmetrically, while still requiring both to be non-NULL for a pass.
13666 * selftest.h (assert_streq): Rename "expected" and "actual" to
13668 (ASSERT_EQ): Likewise.
13669 (ASSERT_EQ_AT): Likewise.
13670 (ASSERT_KNOWN_EQ): Likewise.
13671 (ASSERT_KNOWN_EQ_AT): Likewise.
13672 (ASSERT_NE): Likewise.
13673 (ASSERT_MAYBE_NE): Likewise.
13674 (ASSERT_MAYBE_NE_AT): Likewise.
13675 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13676 the assertion to pass.
13677 (ASSERT_STREQ_AT): Likewise.
13679 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13681 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13682 interaction with -pie.
13684 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13686 * selftest.h: Fix alphabetization of per-source-file selftest
13689 2018-04-30 Jason Merrill <jason@redhat.com>
13691 PR c++/61982 - dead stores to destroyed objects.
13692 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13695 2018-04-30 Jason Merrill <jason@redhat.com>
13697 * tree.c (build_clobber): New.
13698 * tree.h: Declare it.
13699 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13701 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13703 * diagnostic-show-locus.c (layout::layout): Update for
13704 location_get_source_line returning a char_span.
13705 (struct char_span): Move to input.h.
13706 (struct correction): Update for fields in char_span becoming
13708 (struct source_line): Update for location_get_source_line
13709 returning a char_span.
13710 (layout::print_line): Likewise.
13711 * edit-context.c (edited_file::print_content): Likewise.
13712 (edited_file::print_diff_hunk): Likewise.
13713 (edited_file::print_run_of_changed_lines): Likewise.
13714 (edited_file::get_num_lines): Likewise.
13715 (edited_line::edited_line): Likewise.
13716 * final.c (asm_show_source): Likewise.
13717 * input.c (location_get_source_line): Convert return type
13718 from const char * to char_span, losing the final "line_len"
13720 (dump_location_info): Update for the above.
13721 (get_substring_ranges_for_loc): Likewise. Use a char_span
13722 when handling the literal within the line.
13723 (test_reading_source_line): Update for location_get_source_line
13724 returning a char_span.
13725 * input.h (class char_span): Move here from
13726 diagnostic-show-locus.c, converting from a struct to a class.
13727 Make data members private.
13728 (char_span::operator bool): New.
13729 (char_span::length): New.
13730 (char_span::get_buffer): New.
13731 (char_span::operator[]): New.
13732 (char_span::subspan): Make const.
13733 (char_span::xstrdup): New.
13734 (location_get_source_line): Convert return type from const char *
13735 to char_span, losing the final "line_size" param.
13737 2018-04-30 Jan Hubicka <jh@suse.cz>
13739 * lto-wrapper.c (ltrans_priorities): New static var.
13740 (cmp_priority): New.
13741 (run_gcc): Read priorities and if doing parallel build order
13742 the Makefile by them.
13744 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13746 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13748 2018-04-30 Richard Biener <rguenther@suse.de>
13750 * tree-cfg.c (verify_address): Remove base argument, add
13751 flag whether to check TREE_ADDRESSABLE and do that.
13752 (verify_expr): Remove.
13753 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13754 (verify_gimple_assign_single): Likewise.
13755 (verify_gimple_switch): Likewise.
13756 (verify_expr_location_1): Dereference tp once. Add (disabled)
13757 piece from verify_expr.
13758 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13760 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13762 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13764 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13766 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13767 (small_data_pattern): Likewise.
13768 (arc_rewrite_small_data): Likewise.
13769 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13770 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13771 (get_symbol_alignment): New function.
13772 (legitimate_small_data_address_p): Likewise.
13773 (legitimate_scaled_address): Update, call
13774 legitimate_small_data_address_p.
13775 (output_sdata): New static variable.
13776 (arc_print_operand): Update how we handle small data operands.
13777 (arc_print_operand_address): Likewise.
13778 (arc_legitimate_address_p): Update, use
13779 legitimate_small_data_address_p.
13780 (arc_rewrite_small_data_p): Remove.
13781 (arc_rewrite_small_data_1): Likewise.
13782 (arc_rewrite_small_data): Likewise.
13783 (small_data_pattern): Likewise.
13784 (compact_sda_memory_operand): Update to use
13785 legitimate_small_data_address_p and get_symbol_alignment.
13786 (prepare_move_operands): Don't rewite sdata pattern.
13787 (prepare_extend_operands): Remove.
13788 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13790 (zero_extendqisi2): Likewise.
13791 (zero_extendhisi2): Likewise.
13792 (extendqihi2): Likewise.
13793 (extendqisi2): Likewise.
13794 (extendhisi2): Likewise.
13795 (addsi3): Likewise.
13796 (subsi3): Likewise.
13797 (andsi3): Likewise.
13798 * config/arc/constraints.md (Usd): Change it to memory constraint.
13800 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13802 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13803 as source of std instructions.
13804 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13805 allow 6-bit constants as source for store instructions.
13806 (movdi_insn): Update instruction pattern to allow 6-bit constants
13807 as source for store instructions.
13809 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13811 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13813 2018-04-30 Nathan Sidwell <nathan@acm.org>
13814 Sandra Loosemore <sandra@codesourcery.com>
13816 * dumpfile.c (dump_open): Allow '-' for stdout.
13817 * doc/invoke.texi (Developer Options): Document dump filename
13818 determination early. Document stdin/stdout selection.
13820 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13822 Microblaze Target: PIC data text relative
13824 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13825 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13827 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13828 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13829 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13830 New addressing mode for data-text relative position indepenedent code.
13831 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13832 'ADDRESS_SYMBOLIC_TXT_REL'.
13833 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13834 (microblaze_legitimate_pic_operand): Exclude function calls from
13835 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13836 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13838 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13839 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13840 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13841 for 'address + offset'.
13842 (microblaze_expand_prologue): Add new function prologue call for
13844 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13845 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13846 table in case of TARGET_PIC_DATA_TEXT_REL.
13847 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13848 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13849 Add new macros 'UNSPEC_TEXT',
13850 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13851 + exclude function calls from 'UNSPEC_PLT' in case of data text
13853 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13854 new target hook for generating address diff vector tables in case of
13856 * doc/tm.texi : Regenerate.
13857 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13858 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13859 of addr diff vector generation.
13860 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13861 target hook definition.
13862 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13863 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13864 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13865 option for data text relative.
13867 2018-04-30 Richard Biener <rguenther@suse.de>
13869 * tree-chrec.h (evolution_function_is_constant_p): Remove
13871 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13873 2018-04-30 Richard Biener <rguenther@suse.de>
13876 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13878 2018-04-30 Richard Biener <rguenther@suse.de>
13880 PR tree-optimization/28364
13881 PR tree-optimization/85275
13882 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13883 copying first exit test.
13885 2018-04-28 Mark Wielaard <mark@klomp.org>
13887 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13888 dwarf_version >= 5.
13889 (dwarf_AT): Handle DW_AT_addr_base.
13890 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13892 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13895 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13896 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13897 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13898 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13900 2018-04-28 Richard Biener <rguenther@suse.de>
13902 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13903 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13904 to reflect use. Only add interesting stmts.
13906 2018-04-27 Martin Jambor <mjambor@suse.cz>
13909 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13910 the jump function allows for passing through aggregate values.
13912 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13914 * input.h (in_system_header_at): Convert from macro to inline
13916 (from_macro_expansion_at): Likewise.
13917 (from_macro_definition_at): Likewise.
13919 2018-04-27 Jeff Law <law@redhat.com>
13921 * config.gcc: Mark tile* targets as deprecated/obsolete.
13923 2018-04-27 Richard Biener <rguenther@suse.de>
13925 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13928 2018-04-27 Richard Biener <rguenther@suse.de>
13930 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13932 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13934 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13935 with Yd constraint. Set "preferred_for_speed" attribute from
13936 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13937 with Yd constraint.
13938 (*movdi_internal): Ditto.
13939 (movti_interunit splitters): Remove
13940 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13941 (movdi_interunit splitters): Ditto.
13942 * config/i386/constraints.md (Ye): Remove.
13943 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13945 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13948 * config/aarch64/constraints.md (Usg): Limit to 31.
13949 (Usj): Limit to 63.
13951 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13953 PR tree-optimization/85529
13954 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13955 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13956 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13957 zero extension or masking of the MSB bit.
13958 (optimize_range_tests): Add FIRST_BB argument, pass it through
13959 to optimize_range_tests_var_bound.
13960 (maybe_optimize_range_tests, reassociate_bb): Adjust
13961 optimize_range_tests callers.
13963 2018-04-26 Richard Biener <rguenther@suse.de>
13964 Jakub Jelinek <jakub@redhat.com>
13966 * cgraph.h (symbol_table): Just declare debug method here.
13967 * symtab.c (symbol_table::debug): Define.
13969 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13971 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13973 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13975 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13976 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13977 (*movdi_internal): Substitute Yi and Yj constraint with x
13978 and Ym and Yn constraint with y constraint. Update "isa"
13979 attribute and set "preferred_for_speed" attribute from
13980 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13981 (*movsi_internal): Ditto.
13982 (*movdf_internal): Ditto.
13983 (*movsf_internal): Ditto.
13984 (*zero_extendsidi2): Ditto.
13985 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13986 (sse2_loadld): Ditto.
13987 (*vec_extract<ssevecmodelower>_0): Ditto.
13988 (*vec_extractv4si_0_zext_sse4): Ditto.
13989 (vec_concatv2di): Ditto.
13990 (*vec_dup<mode>): Ditto.
13991 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13992 * config/i386/constraints.md (Yi): Remove.
13997 2018-04-26 Nathan Sidwell <nathan@acm.org>
13999 * dumpfile.c (dump_open): New.
14000 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14001 (dump_finish): Detect stdio/stderr by value not name.
14003 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14005 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14007 2018-04-26 Tom de Vries <tom@codesourcery.com>
14010 * config/nvptx/nvptx.c (verify_neutering_jumps)
14011 (verify_neutering_labels): New function
14012 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14014 2018-04-26 Tom de Vries <tom@codesourcery.com>
14017 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14018 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14021 2018-04-26 Richard Biener <rguenther@suse.de>
14022 Tom de Vries <tom@codesourcery.com>
14025 * lto-streamer-out.c (output_function): Fixup loops if required to match
14026 discovery done in the reader.
14028 2018-04-26 Richard Biener <rguenther@suse.de>
14030 PR tree-optimization/85116
14031 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14032 have a loop exit from the single latch predecessor. Remove
14033 case of header with just condition.
14034 (ch_base::copy_headers): Exclude infinite loops from any
14036 (pass_ch::execute): Record exits.
14038 2018-04-26 Richard Biener <rguenther@suse.de>
14040 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14041 prologue cost vector and pass it to vect_get_load_cost.
14042 (vect_get_peeling_costs_all_drs): Likewise.
14043 (vect_peeling_hash_get_lowest_cost): Likewise.
14044 (vect_enhance_data_refs_alignment): Likewise.
14046 2018-04-26 Richard Biener <rguenther@suse.de>
14048 PR middle-end/85450
14049 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14050 checking of integer<->pointer conversions.
14051 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14052 sign-/zero-extending pointer types.
14053 (expand_omp_for_static_chunk): Likewise.
14055 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14056 Jean Lee <xiaoyur347@gmail.com>
14058 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14059 (TARGET_ASAN_SHADOW_OFFSET): Define.
14060 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14061 true for -fsanitize=address.
14063 2018-04-25 Mark Wielaard <mark@klomp.org>
14065 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14068 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14070 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14071 than "alu", remove explicit "memory" and "imm_disp" attributes.
14072 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14074 PR middle-end/85414
14075 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14076 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14077 gen_lowpart_no_emit.
14079 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14082 * config/i386/i386.c (ix86_expand_builtin): Change memory
14083 operand to XI, extend p0 to Pmode.
14084 * config/i386/i386.md: Change unspec volatile and operand
14085 1 mode to XI, change operand 0 mode to P.
14087 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14089 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14090 GET_MODE_MASK before any checking.
14091 (nds32_can_use_bset_p): Likewise.
14092 (nds32_can_use_btgl_p): Likewise.
14094 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14096 * config/nds32/nds32-doubleword.md: New define_split pattern for
14097 illegal register number.
14099 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14101 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14103 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14105 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14107 2018-04-25 Richard Biener <rguenther@suse.de>
14109 * lto-streamer.h (LTO_major_version): Bump to 8.
14111 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14113 * BASE-VER: Set to 9.0.0.
14115 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14117 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14118 in __abskf2 and __powikf2.
14120 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14123 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14124 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14125 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14126 Use the above on operand 2. Reindent.
14127 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14129 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14132 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14134 * config/i386/i386.opt (mcet): Removed.
14135 * doc/install.texi: Remove -mcet documentation.
14136 * doc/invoke.texi: Likewise.
14138 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14141 * doc/install.texi: Remove -mcet from bootstrap-cet.
14143 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14146 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14147 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14151 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14152 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14153 containing a CONST_VECTOR.
14155 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14157 * doc/install.texi: Update newlib dependency for nvptx.
14159 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14162 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14163 instead of INTVAL when shifting x left.
14165 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14167 PR tree-optimization/85478
14168 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14169 vect_grouped_store_supported for single element vectors.
14171 2018-04-24 Richard Biener <rguenther@suse.de>
14174 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14175 load cost increase to the case of non-constant step.
14177 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14180 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14181 destination if any_malformed_asm.
14183 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14185 PR middle-end/85496
14186 * expr.c (store_field): In the bitfield case, if the value comes from
14187 a function call and is returned in registers by means of a PARALLEL,
14188 do not change the mode of the temporary unless BLKmode and VOIDmode.
14190 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14192 PR rtl-optimization/85423
14193 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14194 dependencies to debug insns when the previous insn is non-debug.
14196 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14198 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14199 enums into a single definition.
14200 (fls): Fix predicates and printing.
14203 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14205 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14206 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14207 and short u6 immediate.
14208 (check_if_valid_sleep_operand): Remove.
14209 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14211 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14213 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14214 flag_always_save_lp condition.
14215 * config/nds32/nds32.opt (malways-save-lp): New option.
14217 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14219 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14220 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14221 * config/nds32/nds32.h
14222 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14223 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14225 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14227 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14228 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14230 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14231 Chung-Ju Wu <jasonwucj@gmail.com>
14233 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14235 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14236 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14238 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14240 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14242 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14244 * config/nds32/nds32-protos.h (nds32_data_alignment,
14245 nds32_local_alignment): Declare.
14246 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14247 nds32_local_alignment): New functions.
14248 (TARGET_CONSTANT_ALIGNMENT): Define.
14249 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14251 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14253 * config/nds32/nds32.c
14254 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14255 (TARGET_MODES_TIEABLE_P): Likewise.
14257 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14259 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14260 level Ofast and Og.
14262 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14263 Chung-Ju Wu <jasonwucj@gmail.com>
14265 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14266 for unaligned access.
14267 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14269 * config/nds32/nds32-intrinsic.md: Likewise.
14270 * config/nds32/nds32_intrinsic.h: Likewise.
14271 * config/nds32/nds32.h (nds32_builtins): Likewise.
14272 * config/nds32/nds32.opt (munaligned-access): New option.
14273 * config/nds32/nds32.c (nds32_asm_file_start): Display
14274 flag_unaligned_access status.
14276 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14278 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14279 -mno-relax is present.
14280 * config/riscv/linux.h (LINK_SPEC): Ditto.
14282 2018-04-20 Martin Sebor <msebor@redhat.com>
14285 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14287 (gimple_fold_builtin_stxcpy_chk): Same.
14288 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14290 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14293 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14294 __powikf2 when long double is IEEE 128-bit.
14296 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14298 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14299 step to make sure stack always aligned.
14301 2018-04-20 Carl Love <cel@us.ibm.com>
14304 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14305 size check for arg0.
14307 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14308 Tom de Vries <tom@codesourcery.com>
14311 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14312 Emit insns for calls too.
14313 (nvptx_find_par): Always look for worker-level predecessor insn.
14314 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14316 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14317 (nvptx_process_pars): Propagate frames for calls.
14319 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14322 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14324 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14325 (ix86_handle_option): Don't handle OPT_mibt.
14326 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14328 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14330 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14331 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14332 (ix86_target_macros): Define __CET__ with flag_cf_protection
14333 for -fcf-protection.
14334 * config/i386/i386.c (isa2_opts): Remove -mibt.
14335 * config/i386/i386.h (TARGET_IBT): Removed.
14336 (TARGET_IBT_P): Likewise.
14337 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14338 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14339 * config/i386/i386.opt (mcet): Update help message.
14340 (mshstk): Likewise.
14342 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14343 -mcet as an alias for -mshstk.
14345 2018-04-20 Richard Biener <rguenther@suse.de>
14347 PR middle-end/85475
14348 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14349 complexity by forcing a single use of the multiply operand.
14351 2018-04-20 Martin Jambor <mjambor@suse.cz>
14354 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14355 recursion dependency to only apply to non-clones.
14357 2018-04-20 Martin Jambor <mjambor@suse.cz>
14360 * ipa-cp.c (create_specialized_node): Check that clones of
14361 self-recursive edges exist during IPA-CP.
14363 2018-04-19 Toon Moene <toon@moene.org>
14365 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14368 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14370 PR tree-optimization/85467
14371 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14372 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14373 VECTOR_CST element to type.
14375 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14378 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14379 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14380 (builtin_longjmp): Likewise.
14381 (save_stack_nonlocal): New pattern.
14382 (restore_stack_nonlocal): Likewise.
14384 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14387 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14388 Replace ASM_OUTPUT_LABEL with fprintf.
14390 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14393 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14394 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14395 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14396 define __IBT__ and __SHSTK__ for -fcf-protection.
14397 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14399 (ix86_trampoline_init): Likewise.
14400 (x86_output_mi_thunk): Likewise.
14401 (ix86_notrack_prefixed_insn_p): Likewise.
14402 (ix86_option_override_internal): Don't disallow -fcf-protection.
14403 * config/i386/i386.md (rdssp<mode>): Also enable for
14405 (incssp<mode>): Likewise.
14406 (nop_endbr): Likewise.
14407 * config/i386/i386.opt (mcet): Change help message to built-in
14410 (mshstk): Likewise.
14411 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14412 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14413 enable CET built-in functions.
14415 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14417 * common/config/i386/i386-common.c
14418 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14419 OPTION_MASK_ISA_MOVDIRI_UNSET,
14420 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14421 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14422 * config.gcc (movdirintrin.h): New header.
14423 * config/i386/cpuid.h (bit_MOVDIRI,
14424 bit_MOVDIR64B): New bits.
14425 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14427 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14428 (VOID, PVOID, PCVOID)): New function types.
14429 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14430 __builtin_ia32_directstoreu_u64,
14431 __builtin_ia32_movdir64b): New builtins.
14432 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14433 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14435 (ix86_valid_target_attribute_inner_p): Ditto.
14436 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14437 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14438 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14439 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14440 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14441 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14442 (movdiri<mode>, movdir64b_<mode>): New.
14443 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14444 * config/i386/immintrin.h: Include movdirintrin.h.
14445 * config/i386/movdirintrin.h: New file.
14446 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14448 2018-04-19 Richard Biener <rguenther@suse.de>
14450 PR middle-end/85455
14451 * cfg.c (clear_bb_flags): When loop state says we have
14452 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14454 2018-04-19 Richard Biener <rguenther@suse.de>
14456 PR tree-optimization/84737
14457 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14458 copying restrict info.
14459 (vect_setup_realignment): Use it.
14460 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14461 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14462 the first DR to all generated stores.
14463 (vectorizable_load): Likewise for loads.
14465 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14467 PR tree-optimization/85446
14468 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14469 the integral and pointer types to have the same precision.
14471 * doc/install.texi: Document --disable-cet being the default and
14474 2018-04-18 Martin Liska <mliska@suse.cz>
14476 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14479 2018-04-18 Martin Liska <mliska@suse.cz>
14482 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14485 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14486 arguments if they are comparable.
14488 2018-04-18 Martin Liska <mliska@suse.cz>
14491 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14494 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14497 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14500 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14501 ENDBR after calling __morestack.
14503 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14506 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14507 by using gcc_base_ver to generate a gcc_driver_version, and use
14508 it when generating GCC_DRIVER_NAME.
14509 * configure: Regenerate.
14511 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14514 * config.gcc: Obsolete powerpc*-*-*spe*.
14516 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14519 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14520 (stabstr_D): Change type of unum from unsigned int to
14521 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14524 2018-04-17 Jim Wilson <jimw@sifive.com>
14527 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14528 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14529 Set arg_pointer_offset after using pretend_args_size.
14531 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14533 PR rtl-optimization/85431
14534 * dse.c (record_store): Ignore zero width stores.
14537 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14538 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14539 __builtin_stack_restore rather than after it.
14540 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14541 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14542 argument instead of virtual_dynamic_stack_rtx.
14544 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14546 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14548 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14549 Add note to error message to explain internal mapping of overloaded
14550 built-in function name to non-overloaded built-in function name.
14551 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14554 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14557 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14558 where the inputs overlap with the output.
14560 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14562 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14563 (=v, v) alternative and explicit "memory" attribute.
14564 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14565 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14567 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14568 "sselog1" type instead of "sselog".
14569 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14570 "sselog". Remove explicit "memory" attribute.
14571 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14572 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14574 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14575 "sselog1" type instead of "sselog". Remove explicit "memory"
14577 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14578 use "sselog1" type instead of "sselog". Remove explicit "memory"
14580 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14581 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14583 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14584 "sselog1" type instead of "sselog". Remove explicit "memory"
14586 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14587 use "sselog1" type instead of "sselog". Remove explicit "memory"
14591 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14593 PR middle-end/85414
14594 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14597 2018-04-17 Martin Jambor <mjambor@suse.cz>
14600 * ipa-cp.c (create_specialized_node): Call
14601 expand_all_artificial_thunks if necessary.
14603 2018-04-17 Martin Liska <mliska@suse.cz>
14606 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14607 in message, remote space in between '_G' and '('.
14609 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14612 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14613 avx512f_vmcmp<mode>3<round_saeonly_name>,
14614 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14615 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14616 avx512f_rndscale<mode><round_saeonly_name>,
14617 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14618 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14619 Use %<iptr>2 instead of %2 for -masm=intel.
14620 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14621 avx512f_vcvttss2usi<round_saeonly_name>,
14622 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14624 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14625 avx512f_vcvttsd2usi<round_saeonly_name>,
14626 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14627 Use %q1 instead of %1 for -masm=intel.
14628 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14629 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14630 of %3 for -masm=intel.
14631 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14633 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14635 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14637 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14638 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14640 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14642 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14643 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14644 %g1 and one with %0 and %1.
14645 (avx512er_vmrcp28<mode><round_saeonly_name>,
14646 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14647 %1 for -masm=intel.
14648 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14649 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14650 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14651 of %0 and %{%4%} for -masm=intel.
14652 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14653 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14654 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14655 order of %0 and %{%5%}%{z%} for -masm=intel.
14657 2018-04-17 Jan Hubicka <jh@suse.cz>
14660 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14662 2018-04-17 Martin Liska <mliska@suse.cz>
14665 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14666 for target_clone error message. Make default implementation
14667 clone to be a local declaration.
14668 (separate_attrs): Add new argument and check for an empty
14670 (expand_target_clones): Handle it.
14671 (ipa_target_clone): Make redirection just for target_clones
14674 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14675 Tom de Vries <tom@codesourcery.com>
14677 PR middle-end/84955
14678 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14679 tiled basic blocks without omp continue statements.
14681 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14684 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14685 vec_extract expression as having side effects to make sure it gets
14688 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14691 * config/i386/i386.c (get_builtin_code_for_version): Check
14694 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14697 * config.gcc: Support "skylake".
14698 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14700 * config/i386/i386.c (m_SKYLAKE): Define.
14701 (processor_target_table): Add "skylake".
14702 (ix86_option_override_internal): Add "skylake".
14703 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14704 PROCESSOR_CANNONLAKE.
14705 (get_builtin_code_for_version): Fix priority for
14706 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14707 PROCESSOR_SKYLAKE-AVX512.
14708 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14709 (processor_type): Add PROCESSOR_SKYLAKE.
14711 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14712 Jason Merrill <jason@redhat.com>
14715 * convert.c (convert_to_integer_1): Use direct recursion for
14716 enumeral types and types with a precision less than the number
14717 of bits in their mode.
14719 2018-04-16 Julia Koval <julia.koval@intel.com>
14722 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14723 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14725 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14728 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14729 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14730 and -mno-direct-move.
14732 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14735 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14736 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14737 Ensure negative shifts result in {0}.
14739 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14741 PR rtl-optimization/79916
14742 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14743 regs (if any) to define how to gnerate SD moves when LRA is in
14746 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14748 PR rtl-optimization/85393
14749 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14750 * except.c (expand_dw2_landing_pad_for_region): Make static.
14751 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14752 a label and unconditional jump to old_bb, rather than
14753 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14756 PR rtl-optimization/85376
14757 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14758 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14759 instead of a specific value.
14761 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14762 Bin Cheng <bin.cheng@arm.com>
14764 PR tree-optimization/82965
14765 PR tree-optimization/83991
14766 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14767 by_profile_only parameter.
14768 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14769 information if the loop was predicted to iterate too many times.
14770 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14772 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14775 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14778 2018-04-13 Martin Liska <mliska@suse.cz>
14779 Jakub Jelinek <jakub@redhat.com>
14781 PR middle-end/81657
14782 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14783 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14784 * builtins.c (expand_builtin_memory_copy_args): Use
14785 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14786 handle dest_addr == pc_rtx.
14788 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14791 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14792 asked to not generate direct moves.
14793 (fix_trunc<mode>si2_stfiwx): Similar.
14794 (fix_trunc<mode>si2_internal): Similar.
14796 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14799 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14800 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14801 lookup if dest in some wider mode is known to be const0_rtx and
14802 if so, record permanent equivalence for it to be ZERO_EXTEND of
14803 the narrower mode destination.
14805 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14807 * lto-streamer-out.c (output_function): Revert 259346.
14808 * omp-expand.c (expand_oacc_for): Likewise.
14810 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14812 PR rtl-optimization/85354
14813 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14814 * sel-sched.c (sel_global_init): ... here.
14816 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14819 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14820 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14821 mode for PE-COFF targets.
14822 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14823 (i386_pe_asm_lto_end): Likewise.
14824 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14825 (TARGET_ASM_LTO_END): Likewise.
14826 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14827 (i386_pe_asm_lto_start): New function.
14828 (i386_pe_asm_lto_end): Likewise.
14830 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14831 Richard Biener <rguenther@suse.de>
14833 PR middle-end/84955
14834 * lto-streamer-out.c (output_function): Fix CFG loop state before
14836 * omp-expand.c (expand_oacc_for): Handle calls to internal
14837 functions like regular functions.
14839 2018-04-12 Richard Biener <rguenther@suse.de>
14842 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14843 for the early LTO debug to properly generate references to it
14844 during DIE emission. Do not re-use that for the skeleton for
14846 (dwarf2out_early_finish): Likewise.
14848 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14851 * config/i386/sse.md
14852 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14853 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14854 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14855 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14856 and output is a reg, avoid creating invalid lowpart subreg, but
14857 instead split into a 512-bit move. Don't split if not AVX512VL,
14858 input is xmm16+ reg and output is a mem.
14859 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14860 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14861 xmm16+ reg and output is a mem.
14863 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14865 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14866 also for flag_dwarf2_cfi_asm.
14868 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14870 PR rtl-optimization/85342
14871 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14872 a bool scalar var inside of the loop instead. Don't try to update
14873 recog_data.operand after failed apply_change_group.
14875 2018-04-12 Tom de Vries <tom@codesourcery.com>
14878 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14879 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14880 array with flexible array member as array without given dimension.
14881 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14882 argument for undefined param to true.
14884 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14887 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14888 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14889 from PowerPC section.
14890 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14891 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14892 help text that is too long.
14893 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14894 help text that is too long.
14895 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14896 help text that is too long.
14898 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14900 * config/alpha/alpha.md (stack_probe_internal): Rename
14901 from "probe_stack". Update all callers.
14903 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14905 PR rtl-optimization/84566
14906 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14907 sched_macro_fuse_insns.
14909 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14912 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14913 (compute_block_dependences): ... from here.
14915 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14917 PR tree-optimization/85331
14918 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14919 from int to HOST_WIDE_INT.
14921 2018-04-11 Martin Jambor <mjambor@suse.cz>
14924 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14925 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14926 not the same as the source val.
14927 (cgraph_edge_brings_value_p): New parameter.
14928 (gather_edges_for_value): Pass destination value to
14929 cgraph_edge_brings_value_p.
14930 (perhaps_add_new_callers): Likewise.
14931 (get_info_about_necessary_edges): Likewise and exclude values brought
14932 only by self-recursive edges.
14933 (create_specialized_node): Redirect only clones of self-calling edges.
14934 (+self_recursive_pass_through_p): New function.
14935 (find_more_scalar_values_for_callers_subset): Use it.
14936 (find_aggregate_values_for_callers_subset): Likewise.
14937 (known_aggs_to_agg_replacement_list): Removed.
14938 (decide_whether_version_node): Re-calculate known constants for all
14939 remaining context clones.
14941 2018-04-11 Richard Biener <rguenther@suse.de>
14944 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14945 from early DWARF output.
14946 (dwarf2out_early_finish): Output line info unconditionally into
14947 early DWARF and add reference to it.
14949 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14952 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14953 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14954 other than V2DFmode using iptr mode attribute.
14955 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14957 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14959 PR rtl-optimization/84659
14960 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14962 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14965 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14967 (output_loc_list): Pass address of a dummy size variable even in the
14968 locview handling loop.
14969 (index_location_lists): Add comment on why skip_loc_list_entry can't
14972 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14975 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14978 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14981 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14982 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14983 and -mstring-compare-inline-limit.
14985 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14988 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14989 for stack clash protection in a register whenever we need it to be in
14992 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14994 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14995 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14997 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15000 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15002 (mlong-double-): Ditto.
15003 * config/rs6000/sysv4.opt (msdata=): Ditto.
15004 (mtls-size=): Ditto.
15006 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15008 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15009 erroneous entries for
15010 "vector int vec_ldl (int, long int *)", and
15011 "vector unsigned int vec_ldl (int, unsigned long int *)".
15012 Add comments and entries for
15013 "vector bool char vec_ldl (int, bool char *)",
15014 "vector bool short vec_ldl (int, bool short *)",
15015 "vector bool int vec_ldl (int, bool int *)",
15016 "vector bool long long vec_ldl (int, bool long long *)",
15017 "vector pixel vec_ldl (int, pixel *)",
15018 "vector long long vec_ldl (int, long long *)",
15019 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15020 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15021 type tree bool_long_long_type_node and correct definition of
15022 bool_V2DI_type_node to make reference to this new type tree.
15023 (rs6000_mangle_type): Replace erroneous reference to
15024 bool_long_type_node with bool_long_long_type_node.
15025 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15026 comments to emphasize sign distinctions for char and int types and
15027 replace RS6000_BTI_bool_long constant with
15028 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15029 use of RS6000_BTI_pixel.
15030 (bool_long_type_node): Remove this macro definition.
15031 (bool_long_long_type_node): New macro definition
15033 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15035 PR rtl-optimization/85300
15036 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15037 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15038 simplify_unary_operation fails.
15040 2018-04-10 Martin Liska <mliska@suse.cz>
15042 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15043 cgraph_edge and ipa_ref.
15045 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15049 * config/i386/sse.md
15050 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15051 computation of the VEC_MERGE selector from mask.
15052 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15053 Fix decoding of the VEC_MERGE selector into mask.
15055 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15057 PR tree-optimization/85286
15058 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15060 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15062 * final.c (final_1): Set insn_last_address as well as
15063 insn_current_address.
15065 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15068 * explow.c (emit_stack_probe): Call validize_mem on memory location
15069 before passing it to gen_probe_stack. Create address operand and
15070 legitimize it for the probe_stack_address case.
15072 2018-04-09 Jan Hubicka <jh@suse.cz>
15075 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15076 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15077 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15079 (free_lang_data): Rebuild type inheritance graph.
15081 2018-04-09 Martin Sebor <msebor@redhat.com>
15083 * invoke.texi (-finline-small-functions): Mention other optimization
15085 (-findirect-inlining, -fpartial-inlining): Same.
15086 (-finline-functions-called-once): Same.
15087 (-freorder-blocks-and-partition): Same.
15089 2018-04-09 Jan Hubicka <jh@suse.cz>
15092 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15093 jumps; choose last target that matches the criteria (i.e.
15094 no partition changes for non-crossing jumps).
15095 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15096 support for redirecting crossing jumps to non-crossing.
15098 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15100 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15101 also for naked functions.
15103 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15105 * config/arc/arc.md (add_shift): New pattern.
15106 (add_shift2): Likewise.
15107 (sub_shift): Likewise.
15108 (sub_shift_cmp0_noout): Likewise.
15109 (compare_si_ashiftsi): Likewise.
15110 (xbfu_cmp0_noout): New combine pattern.
15111 (xbfu_cmp0"): Likewise.
15112 (movsi_set_cc_insn): Place the predicable variant first.
15113 (commutative_binary_cmp0_noout): Remove clobber.
15114 (commutative_binary_cmp0): New pattern.
15115 (noncommutative_binary_cmp0): Likewise.
15116 (noncommutative_binary_cmp0_noout): Likewise.
15117 (noncommutative_binary_comparison_result_used): Removed.
15118 (rsub_cmp0): New pattern.
15119 (rsub_cmp0_noout): Likewise.
15120 (extzvsi): Changed, keep only meaningful variants.
15121 (SQH, SEZ): New iterators.
15122 (SQH_postfix): New mode attribute.
15123 (SEZ_prefix): New code attribute.
15124 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15125 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15126 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15127 of numerical value.
15128 (noncommutative_operator): Check the availability of barrel
15131 2018-04-09 Richard Biener <rguenther@suse.de>
15133 PR tree-optimization/85284
15134 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15135 Only use the niter constraining form of simple_iv when the exit
15136 is always executed.
15138 2018-04-09 Tom de Vries <tom@codesourcery.com>
15141 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15142 (define_expand "*memory_barrier"): New define_expand.
15143 (define_insn "memory_barrier"): New insn.
15145 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15147 PR rtl-optimization/80463
15148 PR rtl-optimization/83972
15149 PR rtl-optimization/83480
15151 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15152 correct producer for the insn.
15153 (tidy_control_flow): Fixup seqnos in case of debug insns.
15155 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15157 PR rtl-optimization/83913
15159 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15160 different sched-times when merging exprs.
15162 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15164 PR rtl-optimization/83962
15166 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15167 tidy_fallthru_edge and tidy_control_flow.
15169 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15171 PR rtl-optimization/83530
15173 * sel-sched.c (force_next_insn): New global variable.
15174 (remove_insn_for_debug): When force_next_insn is true, also leave only
15175 next insn in the ready list.
15176 (sel_sched_region): When the region wasn't scheduled, make another pass
15177 over it with force_next_insn set to 1.
15179 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15181 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15183 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15184 for interrupt control.
15185 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15186 functions for interrupt control.
15187 * config/nds32/nds32-intrinsic.md: Likewise.
15188 * config/nds32/nds32_intrinsic.h: Likewise.
15189 * config/nds32/nds32.h (nds32_builtins): Likewise.
15191 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15193 * config/nds32/nds32.c (nds32_init_machine_status,
15194 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15195 strict_aligned_p field.
15196 (nds32_expand_to_rtl_hook): New function.
15197 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15198 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15200 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15201 Chung-Ju Wu <jasonwucj@gmail.com>
15203 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15204 * config/nds32/nds32-n7.md: New file.
15205 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15206 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15208 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15209 * config/nds32/nds32.md (pipeline_model): Add n7.
15210 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15211 * config/nds32/pipelines.md: Include n7 settings.
15213 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15214 Chung-Ju Wu <jasonwucj@gmail.com>
15216 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15217 * config/nds32/nds32-e8.md: New file.
15218 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15219 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15221 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15222 * config/nds32/nds32.md (pipeline_model): Add e8.
15223 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15224 * config/nds32/pipelines.md: Include e8 settings.
15226 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15227 Chung-Ju Wu <jasonwucj@gmail.com>
15229 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15230 * config/nds32/nds32-n8.md: New file.
15231 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15232 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15234 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15235 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15236 * config/nds32/nds32.md (pipeline_model): Add n8.
15237 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15238 * config/nds32/pipelines.md: Include n8 settings.
15240 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15241 Chung-Ju Wu <jasonwucj@gmail.com>
15243 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15244 * config/nds32/nds32-n9-2r1w.md: New file.
15245 * config/nds32/nds32-n9-3r2w.md: New file.
15246 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15247 nds32_register_ports): New or modify for cpu n9.
15248 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15250 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15251 * config/nds32/nds32-utils.c: New file.
15252 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15253 TARGET_MUL_SLOW): Define.
15254 * config/nds32/nds32.md (pipeline_model): New attribute.
15255 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15256 New options that support cpu n9.
15257 * config/nds32/pipelines.md: Include n9 settings.
15258 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15260 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15262 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15263 information if necessary.
15264 (output_cond_branch_compare_zero): Likewise.
15265 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15266 (nds32_target_alignment): Refine for alignment.
15267 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15268 (FUNCTION_BOUNDARY): Modify.
15269 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15271 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15273 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15275 * config/nds32/constants.md (unspec_volatile_element): Add values for
15276 TLB operation and data prefetch.
15277 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15278 functions for TLB operation and data prefetch.
15279 * config/nds32/nds32-intrinsic.md: Likewise.
15280 * config/nds32/nds32_intrinsic.h: Likewise.
15281 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15282 (nds32_print_operand): Likewise.
15283 * config/nds32/nds32.h (nds32_builtins): Likewise.
15285 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15286 Andrew Pinski <pinsika@gcc.gnu.org>
15288 PR middle-end/82976
15289 * match.pd: Use constant_boolean_node of correct type instead of
15290 boolean_true_node or boolean_false_node for simplifying
15291 pointer comparisons to zero.
15293 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15295 PR tree-optimization/80021
15296 * tree.c (verify_type_variant): Make error call in verify_variant_match
15297 translatable and remove final full stop.
15299 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15301 * config/nds32/constants.md (unspec_volatile_element): Add
15302 UNSPEC_VOLATILE_EH_RETURN.
15303 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15304 nds32_output_stack_pop): Support dwarf exception handling process.
15305 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15306 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15307 exception handling process.
15308 (nds32_compute_stack_frame): Likewise.
15309 (nds32_return_addr_rtx): Likewise.
15310 (nds32_initial_elimination_offset): Likewise.
15311 (nds32_expand_prologue): Likewise.
15312 (nds32_expand_epilogue): Likewise.
15313 (nds32_dynamic_chain_address): New function.
15314 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15315 exception handling.
15316 (DYNAMIC_CHAIN_ADDRESS): Define.
15317 (EH_RETURN_DATA_REGNO): Define.
15318 (EH_RETURN_STACKADJ_RTX): Define.
15319 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15320 patterns for dwarf exception handling.
15322 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15324 * config/nds32/nds32.h: Clean up obsolete macros.
15326 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15328 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15329 Add enum values for particular instructions.
15330 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15331 particular intrinsic functions.
15332 * config/nds32/nds32-intrinsic.md: Likewise.
15333 * config/nds32/nds32_intrinsic.h: Likewise.
15334 * config/nds32/nds32.h (nds32_builtins): Likewise.
15335 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15336 (btst, ave): New patterns for particular instructions.
15338 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15340 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15341 Add enum values for atomic load/store and memory sync.
15342 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15344 * config/nds32/nds32-intrinsic.md: Likewise.
15345 * config/nds32/nds32_intrinsic.h: Likewise.
15346 * config/nds32/nds32.h (nds32_builtins): Likewise.
15348 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15350 PR tree-optimization/85257
15351 * fold-const.c (native_encode_vector): If not all elts could fit
15352 and off is -1, return 0 rather than offset.
15353 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15354 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15355 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15356 adjust buffer in native_interpret_expr call.
15358 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15360 * config/nds32/constants.md (unspec_volatile_element): Add cache
15361 control enum values.
15362 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15363 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15364 * config/nds32/nds32.c (nds32_cctl_names): New.
15365 (nds32_print_operand): Handle cache control register names.
15366 * config/nds32/nds32.h (nds32_builtins): New enum values.
15367 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15369 * config/nds32/nds32.md (type): Add mmu.
15370 * config/nds32/pipelines.md (simple_insn): Add mmu.
15372 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15374 * config/nds32/nds32.md (type): Remove call.
15375 * config/nds32/pipelines.md (simple_insn): Likewise.
15377 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15379 * config/nds32/constants.md (unspec_volatile_element): Add
15380 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15381 UNSPEC_VOLATILE_FMFCFG.
15382 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15383 description for fmfcfg and fmfcsr.
15384 (bdesc_1arg): Add fmtcsr.
15385 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15386 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15387 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15388 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15389 unspec_fmfcfg): New patterns.
15390 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15391 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15392 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15393 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15394 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15395 __nds32__fmfcfg): Define.
15397 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15399 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15400 intrinsic register names.
15401 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15402 intrinsic register enum values and macros.
15404 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15406 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15407 for load/store addressing form.
15408 (nds32_print_operand_address): Likewise.
15410 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15413 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15414 based on LABEL_REF. Remove useless assertion.
15415 (pic_address_needs_scratch): Fix formatting.
15416 (sparc_legitimize_pic_address): Minor tweaks.
15417 (sparc_delegitimize_address): Adjust assertion accordingly.
15418 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15419 into symbolic_operand.
15420 (movsi_high_pic_label_ref): Likewise.
15421 (movsi_lo_sum_pic_label_ref): Likewise.
15422 (movdi_pic_label_ref): Likewise.
15423 (movdi_high_pic_label_ref): Likewise.
15424 (movdi_lo_sum_pic_label_ref): Likewise.
15426 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15428 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15429 custom LIB_SPEC setup.
15431 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15432 Kito Cheng <kito.cheng@gmail.com>
15434 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15435 * config/riscv/freebsd.h: New.
15437 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15439 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15440 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15443 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15444 Kito Cheng <kito.cheng@gmail.com>
15446 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15447 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15448 * config/nds32/nds32-protos.h (nds32_output_call,
15449 nds32_output_return): Declare.
15450 * config/nds32/nds32.md: Refine all the call and return patterns.
15452 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15455 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15456 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15458 PR rtl-optimization/84872
15459 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15460 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15461 EDGE_CROSSING edge.
15463 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15465 * expr.c (copy_blkmode_to_reg): Revert 254862.
15466 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15468 2018-04-06 Richard Biener <rguenther@suse.de>
15470 PR middle-end/85244
15471 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15472 after seeing a component reference with an adjacent field. Treat
15473 refs to arrays at struct end of external decls similar to
15474 refs to unconstrained commons.
15476 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15479 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15480 look through SAVE_EXPRs with non-side-effects argument. Adjust
15482 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15485 2018-04-06 Richard Biener <rguenther@suse.de>
15487 PR middle-end/85180
15488 * alias.c (find_base_term): New wrapper around find_base_term
15489 unwinding CSELIB_VAL_PTR changes.
15490 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15493 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15495 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15497 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15498 constant definitions.
15499 ("nop"): lr 0,0 -> nopr r0
15500 ("nop_lr0", "nop_lr1"): New insn definitions.
15502 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15504 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15505 NDS32_V3PUSH_AVAILABLE_P macro.
15507 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15508 Chung-Ju Wu <jasonwucj@gmail.com>
15510 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15511 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15512 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15513 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15514 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15515 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15516 * config/nds32/constraints.md: New constraints and checking for hard
15517 float configuration.
15518 * config/nds32/iterators.md: New mode iterator and attribute for hard
15519 float configuration.
15520 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15522 * config/nds32/nds32-fpu.md: New file.
15523 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15524 deal with hard float code generation.
15525 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15527 (abi_type, float_reg_number): New enum type.
15528 * config/nds32/nds32-predicates.c: New predicates for hard float.
15529 * config/nds32/nds32-protos.h: Declare functions for hard float.
15530 * config/nds32/nds32.c: Implementation for hard float configuration.
15531 * config/nds32/nds32.h: Definitions for hard float configuration.
15532 * config/nds32/nds32.md: Include hard float machine description and
15533 modify patterns for hard float configuration.
15534 * config/nds32/nds32.opt: New options for hard float configuration.
15535 * config/nds32/predicates.md: New predicates for hard float
15538 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15540 * common/config/nds32/nds32-common.c
15541 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15543 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15545 PR middle-end/85195
15546 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15547 CONSTRUCTOR_ELT (ctor, ...)->value.
15549 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15552 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15554 2018-04-05 Tom de Vries <tom@codesourcery.com>
15557 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15560 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15561 Kito Cheng <kito.cheng@gmail.com>
15563 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15564 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15565 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15566 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15568 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15569 Kito Cheng <kito.cheng@gmail.com>
15571 * config/nds32/constraints.md (Ufe): New memory constraint.
15572 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15573 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15574 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15576 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15577 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15579 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15581 * config/nds32/nds32.md: Use optimize_size in the condition for
15582 alu-shift instructions.
15584 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15586 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15588 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15590 * config/nds32/nds32.md (negsi2): Refine pattern.
15592 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15593 Chung-Ju Wu <jasonwucj@gmail.com>
15595 * config/nds32/iterators.md (shift_rotate): New code iterator.
15596 (shift): New code attribute.
15597 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15598 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15599 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15600 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15601 bit-wise operations.
15602 (andsi3, *andsi3): Ditto.
15603 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15604 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15605 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15606 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15607 nds32_ior_operand, nds32_xor_operand): New predicates.
15609 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15611 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15612 (addsi3, subsi3): ... this.
15614 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15616 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15618 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15620 * config/nds32/nds32.md: Adjust indention.
15622 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15624 * config/nds32/nds32.md (feature): New attribute.
15626 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15628 * config/nds32/nds32.md (subtype): New attribute.
15630 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15633 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15634 expansion to perform a bitwise AND of the argument followed by a
15635 boolean negation of the result.
15637 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15639 PR rtl-optimization/84878
15640 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15641 the basic block. Assert the use reference is not artificial and that
15642 it has an associated insn.
15644 2018-04-04 Michael Matz <matz@suse.de>
15646 * builtins.c (compute_objsize): Pass correct operand
15647 to array_at_struct_end_p.
15649 2018-04-04 Richard Biener <rguenther@suse.de>
15652 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15653 from contexts for DINFO_LEVEL_TERSE and below.
15655 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15657 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15658 resiter_operand condition.
15659 * config/nds32/nds32.md (*move<mode>): Ditto.
15661 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15662 Monk Chiang <sh.chiang04@gmail.com>
15664 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15666 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15668 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15670 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15671 Kito Cheng <kito.cheng@gmail.com>
15673 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15674 nds32_cond_code_str, output_cond_branch,
15675 output_cond_branch_compare_zero, nds32_expand_cbranch,
15676 nds32_expand_cstore, nds32_expand_movcc,
15677 nds32_output_cbranchsi4_equality_zero,
15678 nds32_output_cbranchsi4_equality_reg,
15679 nds32_output_cbranchsi4_equality_reg_or_const_int,
15680 nds32_output_cbranchsi4_greater_less_zero: New functions.
15681 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15682 nds32_expand_cstore, nds32_expand_movcc,
15683 nds32_output_cbranchsi4_equality_zero,
15684 nds32_output_cbranchsi4_equality_reg,
15685 nds32_output_cbranchsi4_equality_reg_or_const_int,
15686 nds32_output_cbranchsi4_greater_less_zero): Declare.
15687 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15688 nds32_rimm11s_operand): New predicates.
15689 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15690 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15693 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15695 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15696 * config/nds32/nds32.md: Ditto.
15697 * config/nds32/pipelines.md: Ditto.
15699 2018-04-04 Richard Biener <rguenther@suse.de>
15701 PR tree-optimization/85168
15702 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15703 propagating abnormals.
15705 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15707 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15709 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15710 Kito Cheng <kito.cheng@gmail.com>
15712 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15713 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15714 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15715 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15716 * config/nds32/nds32.md (sibcall_internal): New.
15717 (sibcall_register): Remove.
15718 (sibcall_immediate): Remove.
15719 (sibcall_value_internal): New.
15720 (sibcall_value_register): Remove.
15721 (sibcall_value_immediate): Remove.
15722 * config/nds32/predicates.md (nds32_general_register_operand): New.
15723 (nds32_call_address_operand): New.
15725 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15727 PR rtl-optimization/85167
15728 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15729 bb_defs if *split_p, instead preinitialize it to NULL.
15731 PR tree-optimization/85156
15732 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15733 evaluating the argument multiple times.
15735 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15737 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15739 (_mm_cvtpd_ps): Likewise.
15740 (_mm_cvttpd_epi32): Likewise.
15741 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15742 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15743 vector, pixel, and bool following altivec.h include.
15745 2018-04-03 Martin Sebor <msebor@redhat.com>
15747 * doc/extend.texi (Common Function Attributes): Clarify.
15748 (const attribute): Likewise.
15749 (pure attribute): Likewise.
15751 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15754 * config/i386/i386.c (ix86_expand_vector_set): Use
15755 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15757 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15759 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15760 instructions when changing rounding bits to preserve precision bits
15761 in the x87 control word.
15763 2018-04-03 Martin Liska <mliska@suse.cz>
15765 PR tree-optimization/82491
15766 * rtl.h (strip_offset_and_add): Replace += suboffset with
15767 poly_uint64 () + suboffset.
15769 2018-03-29 Martin Liska <mliska@suse.cz>
15770 Martin Jambor <mjambor@suse.cz>
15773 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15774 param_type is not an integral or pointer type.
15776 2018-04-03 Richard Biener <rguenther@suse.de>
15778 * sese.h (recompute_all_dominators): Remove.
15780 2018-04-02 Martin Sebor <msebor@redhat.com>
15782 * doc/invoke.texi (-Wrestrict): Fix typos.
15784 2018-04-02 Jim Wilson <jimw@sifive.com>
15786 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15787 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15788 (<optab>di3, <optab>si3_extend): Likewise.
15789 (<optab>si3_mask, <optab>si3_mask_1): New.
15790 (<optab>di3_mask, <optab>di3_mask_1): New.
15791 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15792 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15793 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15795 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15797 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15800 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15802 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15803 (nds32_canonicalize_comparison): New function.
15805 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15806 Kito Cheng <kito.cheng@gmail.com>
15807 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15809 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15810 * config/nds32/constants.md (unspec_volatile_element): Add
15811 UNSPEC_VOLATILE_RELAX_GROUP.
15812 * config/nds32/nds32-relax-opt.c: New file.
15813 * config/nds32/nds32-predicates.c
15814 (nds32_symbol_load_store_p): New function.
15815 * config/nds32/nds32-protos.h
15816 (nds32_symbol_load_store_p): Declare function.
15817 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15818 * config/nds32/nds32.c
15819 (nds32_register_pass): New function to register pass.
15820 (nds32_register_passes): New function to register passes.
15821 * config/nds32/nds32.md (relax_group): New pattern.
15822 * config/nds32/nds32.opt (mrelax-hint): New option.
15823 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15825 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15827 * config/nds32/t-nds32: Modify files dependency.
15829 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15831 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15832 (PROFILE_HOOK): Define its implementation.
15834 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15836 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15837 type and 32-bit size.
15839 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15841 PR middle-end/85090
15842 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15843 (V_128_256): New mode iterator.
15844 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15845 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15846 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15848 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15849 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15851 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15854 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15855 NaN inputs correctly.
15857 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15860 * config/rs6000/vsx.md (??r): New mode attribute.
15861 (*vsx_mov<mode>_64bit): Use it.
15862 (*vsx_mov<mode>_32bit): Likewise.
15864 2018-03-30 Martin Sebor <msebor@redhat.com>
15866 PR tree-optimization/84818
15867 * builtins.c (check_access): Use warning_n.
15869 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15872 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15874 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15877 2018-03-30 Julia Koval <julia.koval@intel.com>
15880 * x86-tune.def (movx, partial_reg_dependency): Enable for
15883 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15885 PR inline-asm/84985
15886 * lra-constraints.c (process_alt_operands): Move setting
15887 this_alternative_matches below.
15889 2018-03-29 Martin Liska <mliska@suse.cz>
15892 * doc/invoke.texi: Document how LTO works with debug info.
15893 Describe auto-load support of binutils. Mention 'x86-64'
15894 as valid option value of -march option.
15896 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15898 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15901 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15902 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15903 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15906 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15909 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15910 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15911 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15912 for RS6000_BTM_POWERPC64.
15913 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15914 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15915 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15918 (DIVDEU): Likewise.
15920 2018-03-28 Carl Love <cel@us.ibm.com>
15923 2017-09-27 Carl Love <cel@us.ibm.com>
15925 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15926 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15927 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15930 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15932 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15933 instead of __vector bool.
15934 (_mm_max_pu8): Likewise.
15935 (_mm_min_pi16): Likewise.
15937 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15940 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15941 (DIVWEUO): Likewise.
15942 (DIVDEO): Likewise.
15943 (DIVDEUO): Likewise.
15944 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15945 DIVWEUO and DIVDEUO.
15946 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15947 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15948 (div_extend): Likewise.
15949 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15951 (__builtin_divweuo): Likewise.
15952 (__builtin_divdeo): Likewise.
15953 (__builtin_divdeuo): Likewise.
15955 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15958 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15959 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15961 PR tree-optimization/82004
15962 * gimple-match-head.c (optimize_pow_to_exp): New function.
15963 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15964 Don't fold to exp if optimize_pow_to_exp is false.
15966 2018-03-28 Martin Liska <mliska@suse.cz>
15969 * calls.c (initialize_argument_information): Fix trailing space.
15970 * common.opt: Fix typo and provide better explanation for
15971 -fsanitize-coverage option.
15972 * config/i386/i386.opt: Fix typo.
15974 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15975 Martin Liska <mliska@suse.cz>
15978 * gimplify.c (asan_poison_variable): Don't do the check for
15979 gimplify_omp_ctxp here.
15980 (gimplify_decl_expr): Do it here.
15981 (gimplify_target_expr): Likewise.
15983 2018-03-28 Martin Liska <mliska@suse.cz>
15986 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15987 chkp_type_bounds_count if MPX is not enabled.
15989 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15991 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15993 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15996 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15997 function to create the function decl for complex long double
15998 multiply and divide for -mabi=ieeelongdouble.
15999 (init_float128_ieee): Call it.
16001 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16004 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16005 -fcf-protection=branch -mibt.
16006 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16008 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16011 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16012 arm_word_relocations.
16014 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16017 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16018 extern array declarations.
16020 2018-03-27 Richard Biener <rguenther@suse.de>
16022 PR middle-end/84067
16023 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16024 explicit single_use checks.
16026 2018-03-27 Richard Biener <rguenther@suse.de>
16028 PR tree-optimization/85082
16029 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16032 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16034 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16035 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16036 Turn on fasynchronous-unwind-tables and funwind-tables.
16038 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16041 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16042 (*bmi_blsr_<mode>_ccz): Ditto.
16044 2018-03-26 Tom de Vries <tom@codesourcery.com>
16046 PR tree-optimization/85063
16047 * omp-general.c (offloading_function_p): New function. Factor out
16049 * omp-offload.c (pass_omp_target_link::gate): ... here.
16050 * omp-general.h (offloading_function_p): Declare.
16051 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16052 with attribute omp declare target for offloading functions.
16054 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16056 PR tree-optimization/84005
16057 * tree-data-ref.h (get_base_for_alignment): Declare.
16058 * tree-data-ref.c (get_base_for_alignment_1): New function.
16059 (get_base_for_alignment): Likewise.
16060 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16061 get_base_for_alignment to find a suitable base object, instead
16062 of always using drb->base_address.
16064 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16066 PR inline-asm/85022
16067 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16068 known size by default.
16070 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16072 PR inline-asm/85030
16073 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16074 and non BLKmode operands.
16076 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16079 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16080 Clean up attributes.
16082 2018-03-23 Richard Biener <rguenther@suse.de>
16085 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16086 we are going to emit early debug for LTO.
16088 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16090 PR inline-asm/85034
16091 * function.c (match_asm_constraints_1): Don't optimize if input
16092 doesn't satisfy general_operand predicate for output's mode.
16094 PR inline-asm/85022
16095 * alias.c (write_dependence_p): Don't require for x_canonicalized
16096 non-VOIDmode if x has VOIDmode.
16099 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16100 just don't try to optimize it rather than assert it never happens.
16102 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16104 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16105 macro expansions for definition of ST_INTERNAL_<mode> and
16106 LD_INTERNAL_<mode> builtins.
16107 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16109 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16111 (altivec_expand_st_builtin): Likewise.
16112 (altivec_expand_builtin): Remove calls to deleted functions.
16113 (rs6000_address_for_altivec): Delete this function.
16114 * config/rs6000/vector.md: Remove expands for
16115 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16117 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16120 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16121 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16122 re-computing once computed.
16123 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16124 (arm_init_machine_status): Initialize
16125 machine->static_chain_stack_bytes.
16127 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16130 * doc/extend.texi: Add four new prototypes for vec_ld.
16131 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16132 definitions for more logical presentation.
16133 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16134 entries for V1TI variants of __builtin_altivec_ld builtin.
16135 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16136 handling of V1TI variant of LVX icode pattern.
16137 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16138 (rs6000_gimple_fold_builtin): Likewise.
16139 (altivec_init_builtins): Add code to define
16140 __builtin_altivec_lvx_v1ti function.
16142 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16144 PR inline-asm/84941
16145 * function.c (match_asm_constraints_1): Don't do the optimization
16146 if input isn't a REG, SUBREG, MEM or constant.
16148 2018-03-22 Tom de Vries <tom@codesourcery.com>
16150 PR tree-optimization/84956
16151 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16152 bb_has_abnormal_pred.
16154 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16157 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16158 DECL_INITIAL (decl) to decl at the end.
16159 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16160 adjust the comment.
16162 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16164 * doc/extend.texi (__builtin_tgmath): Document when complex
16165 integer types are treated as _Complex _Float64.
16167 2018-03-21 Tom de Vries <tom@codesourcery.com>
16169 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16171 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16173 PR tree-optimization/84960
16174 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16175 if it is ENTRY block, move them into single succ of ENTRY in that case.
16177 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16179 PR tree-optimization/84811
16180 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16181 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16182 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16183 (known_subrange_p): Update accordingly. Cast each value involved
16184 in the size comparison, rather than casting the result of the
16187 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16189 PR tree-optimization/84982
16190 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16191 by flipping the least significant bit rather than all bits from
16192 bitpos to bitpos + bitsize - 1.
16194 2018-03-21 Nathan Sidwell <nathan@acm.org>
16196 * doc/extend.texi (Deprecated Features): Remove mention of
16197 long-deleted deprecations.
16199 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16202 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16203 * configure: Regenerate.
16205 2018-03-21 Tom de Vries <tom@codesourcery.com>
16207 PR tree-optimization/83126
16208 * tree-parloops.c (num_phis): New function.
16209 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16211 2018-03-21 Nathan Sidwell <nathan@acm.org>
16213 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16214 mention anon-struct/union members and trailing attributes.
16216 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16218 PR tree-optimization/84969
16219 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16220 builtin memset partitions if they set different rhs values.
16222 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16224 PR rtl-optimization/84989
16225 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16226 VEC_DUPLICATE with scalar result mode.
16228 2018-03-21 Martin Liska <mliska@suse.cz>
16231 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16232 not intended return statement.
16234 2018-03-21 Martin Liska <mliska@suse.cz>
16237 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16238 (chkp_find_bound_slots_1): Limit number of iterations.
16240 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16243 * Minor grammar fixes for x86 options.
16245 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16248 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16249 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16251 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16254 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16255 (altivec_lvx_<mode>_1op): Likewise.
16256 (altivec_stvx_<mode>_2op): Likewise.
16257 (altivec_stvx_<mode>_1op): Likewise.
16258 (altivec_lvx_<VM2:mode>): New define_expand.
16259 (altivec_stvx_<VM2:mode>): Likewise.
16260 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16261 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16262 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16263 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16264 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16265 (rs6000_gen_lvx): Likewise.
16266 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16267 (altivec_expand_stv_builtin): Likewise.
16268 (altivec_expand_builtin): Likewise.
16269 * config/rs6000/vector.md: Likewise.
16271 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16274 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16277 2018-03-20 Richard Biener <rguenther@suse.de>
16280 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16281 sign-conversions as zero, fall back to standard scalar_stmt
16284 2018-03-20 Martin Liska <mliska@suse.cz>
16287 * predict.c (rebuild_frequencies): Handle case when we have
16288 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16290 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16293 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16294 flag_section_anchors.
16295 * varasm.c (use_blocks_for_decl_p): Remove hack for
16296 dw2_force_const_mem.
16299 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16301 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16302 be created, use lowpart_subreg of operands[0] rather than operands[0]
16304 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16305 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16306 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16307 and n constraint instead of aarch64_shift_imm_di and Usd.
16308 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16309 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16311 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16314 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16315 to favor GPR over NEON registers.
16316 (<shift>di3_neon): Likewise.
16318 2018-03-20 Tom de Vries <tom@codesourcery.com>
16321 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16322 (nvptx_process_pars): Emit bar.sync asap and alap.
16324 2018-03-20 Tom de Vries <tom@codesourcery.com>
16327 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16328 seen_label if seen_label is already set.
16330 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16333 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16334 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16335 Use 1U instead of 1. Formatting fixes.
16338 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16339 instead of TREE_TYPE (s1) for the return value.
16341 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16343 PR tree-optimization/84946
16344 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16345 bitsize + bitsize in poly_uint64 rather than poly_int64.
16348 * dwarf2asm.c: Include fold-const.c.
16349 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16350 of decl rather than decl itself.
16352 PR rtl-optimization/84643
16353 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16355 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16358 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16359 calling assemble_variable.
16361 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16364 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16365 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16367 2018-03-19 Jim Wilson <jimw@sifive.com>
16370 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16371 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16372 (riscv_first_stack_step): Likewise.
16373 (riscv_option_override): Use STACK_BOUNDARY instead of
16374 MIN_STACK_BOUNDARY.
16375 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16376 MIN_STACK_BOUNDARY.
16377 (BIGGEST_ALIGNMENT): Set to 128.
16378 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16379 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16382 2018-03-19 Richard Biener <rguenther@suse.de>
16384 PR tree-optimization/84933
16385 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16386 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16388 2018-03-19 Richard Biener <rguenther@suse.de>
16390 PR tree-optimization/84859
16391 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16392 (cond_if_else_store_replacement): Perform sinking operation on
16393 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16394 Generalize what a BB with a single eligible store is.
16396 2018-03-19 Richard Biener <rguenther@suse.de>
16398 PR tree-optimization/84929
16399 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16400 chrec_is_positive against non-chrec arg.
16402 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16405 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16407 2018-03-18 Martin Liska <mliska@suse.cz>
16409 PR rtl-optimization/84635
16410 * regrename.c (build_def_use): Use matches_mode only when
16413 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16415 PR tree-optimization/84913
16416 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16417 vectorize chains of COND_EXPRs.
16419 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16421 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16423 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16425 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16427 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16429 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16431 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16432 Kito Cheng <kito.cheng@gmail.com>
16434 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16435 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16436 (nds32_adjust_reg_alloc_order): New function.
16437 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16439 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16441 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16442 nds32_print_operand, nds32_print_operand_address): Use
16443 HOST_WIDE_INT_PRINT_DEC instead.
16445 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16447 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16449 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16452 * config/i386/i386.c (initial_ix86_tune_features,
16453 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16454 unsigned long long.
16455 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16456 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16457 rather than 1u << ix86_tune. Formatting fix.
16458 (ix86_option_override_internal): Change ix86_arch_mask from
16459 unsigned int to unsigned HOST_WIDE_INT, initialize to
16460 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16461 (ix86_function_specific_restore): Likewise.
16463 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16466 * postreload.c (reload_combine_recognize_pattern): Perform
16467 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16468 truncate_int_for_mode the result for the destination's mode.
16471 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16472 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16474 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16477 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16480 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16481 regno_allocno_class_array and sorted_pseudos.
16482 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16483 insns where regno is used.
16485 2018-03-16 Martin Liska <mliska@suse.cz>
16488 * multiple_target.c (create_dispatcher_calls): Redirect
16489 reference in the symbol table.
16491 2018-03-16 Martin Liska <mliska@suse.cz>
16494 * multiple_target.c (create_dispatcher_calls): Redirect also
16497 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16501 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16502 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16503 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16505 2018-03-16 Julia Koval <julia.koval@intel.com>
16507 * doc/invoke.texi (Skylake Server): Add CLWB.
16508 Cannonlake): Remove CLWB.
16510 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16512 PR tree-optimization/84841
16513 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16515 (FLOAT_ONE_CONST_TYPE): Define.
16516 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16517 (sort_by_operand_rank): Put entries with higher constant_type last
16518 rather than first to match comments.
16520 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16522 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16525 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16528 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16529 check and use address of target always.
16531 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16534 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16535 (indirect_thunk_bnd_needed): Likewise.
16536 (indirect_thunks_used): Likewise.
16537 (indirect_thunks_bnd_used): Likewise.
16538 (indirect_return_needed): New.
16539 (indirect_return_bnd_needed): Likewise.
16540 (output_indirect_thunk_function): Add a bool argument for
16542 (output_indirect_thunk_function): Don't generate alias for
16543 function return thunk.
16544 (ix86_code_end): Call output_indirect_thunk_function to generate
16545 function return thunks.
16546 (ix86_output_function_return): Set indirect_return_bnd_needed
16547 and indirect_return_needed instead of indirect_thunk_bnd_needed
16548 and indirect_thunk_needed.
16550 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16552 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16553 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16554 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16556 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16557 Paul Hua <paul.hua.gm@gmail.com>
16560 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16562 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16564 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16565 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16566 resp. SFmode cases.
16568 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16571 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16572 instead of GET_MODE_SIZE when comparing Units.
16574 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16577 * varasm.c (hash_section): Return an unchangeble hash value
16578 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16579 Return !aarch64_can_use_per_function_literal_pools_p ().
16581 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16584 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16585 rather than address of cmode as last argument to prepare_cmp_insn.
16587 2018-03-15 Julia Koval <julia.koval@intel.com>
16589 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16590 F_AVX512VNNI, F_AVX512BITALG): New.
16592 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16595 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16596 insn for floating-point loads and stores.
16598 2018-03-14 Carl Love <cel@us.ibm.com>
16600 * config/rs6000/rs6000-c.c: Add macro definitions for
16601 ALTIVEC_BUILTIN_VEC_PERMXOR.
16602 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16603 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16604 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16605 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16607 * config/doc/extend.texi: Add prototypes for vec_permxor.
16609 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16612 * diagnostic-show-locus.c (class layout_point): Convert m_line
16613 from int to linenum_type.
16614 (line_span::comparator): Use linenum "compare" function when
16615 comparing line numbers.
16616 (test_line_span): New function.
16617 (layout_range::contains_point): Convert param "row" from int to
16619 (layout_range::intersects_line_p): Likewise.
16620 (layout::will_show_line_p): Likewise.
16621 (layout::print_source_line): Likewise.
16622 (layout::should_print_annotation_line_p): Likewise.
16623 (layout::print_annotation_line): Likewise.
16624 (layout::print_leading_fixits): Likewise.
16625 (layout::annotation_line_showed_range_p): Likewise.
16626 (struct line_corrections): Likewise for field m_row.
16627 (line_corrections::line_corrections): Likewise for param "row".
16628 (layout::print_trailing_fixits): Likewise.
16629 (layout::get_state_at_point): Likewise.
16630 (layout::get_x_bound_for_row): Likewise.
16631 (layout::print_line): Likewise.
16632 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16633 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16634 * input.c (selftest::test_linenum_comparisons): New function.
16635 (selftest::input_c_tests): Call it.
16636 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16637 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16638 * selftest.h (ASSERT_GT): New macro.
16639 (ASSERT_GT_AT): New macro.
16640 (ASSERT_LT): New macro.
16641 (ASSERT_LT_AT): New macro.
16643 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16645 PR rtl-optimization/84780
16646 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16648 2018-03-14 Martin Liska <mliska@suse.cz>
16650 * tree.c (record_node_allocation_statistics): Use
16651 get_stats_node_kind.
16652 (get_stats_node_kind): New function extracted from
16653 record_node_allocation_statistics.
16654 (free_node): Use get_stats_node_kind.
16656 2018-03-14 Richard Biener <rguenther@suse.de>
16658 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16659 that the value-set of ANTIC_IN doesn't grow.
16662 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16664 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16665 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16667 2018-03-14 Julia Koval <julia.koval@intel.com>
16669 * config.gcc (icelake-client, icelake-server): New.
16671 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16672 (initial_ix86_arch_features): Ditto.
16673 (PTA_SKYLAKE): Add SGX.
16674 (PTA_ICELAKE): Remove.
16675 (PTA_ICELAKE_CLIENT): New.
16676 (PTA_ICELAKE_SERVER): New.
16677 (ix86_option_override_internal): Split up icelake on icelake client and
16679 (get_builtin_code_for_version): Ditto.
16680 (fold_builtin_cpu): Ditto.
16681 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16682 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16683 * config/i386/i386.h (processor_type): Ditto.
16684 * doc/invoke.texi: Ditto.
16686 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16689 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16690 INTEGER_CST offset, add it together with bitpos / 8 and
16691 sign extend based on POINTER_SIZE.
16695 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16698 * config/i386/constraints.md (Yc): New register constraint.
16699 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16700 Use Yc constraint for alternative 2 of operand 0. Remove
16701 preferred_for_speed attribute.
16703 2018-03-14 Richard Biener <rguenther@suse.de>
16705 PR tree-optimization/84830
16706 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16707 with the old one to avoid oscillations.
16709 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16712 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16714 (assign_by_spills): Return a flag of reload assignment failure.
16715 Do not process the reload assignment failures. Do not spill other
16716 reload pseudos if they has the same reg class. Update n if
16718 (lra_assign): Add a return arg. Set up from the result of
16719 assign_by_spills call.
16720 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16721 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16722 usage_insns if it is not NULL.
16723 (spill_hard_reg_in_range): New function.
16724 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16725 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16726 function prototypes.
16727 (lra_assign): Change prototype.
16728 * lra.c (lra): Add code to deal with fails by splitting hard reg
16731 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16733 * config/riscv/riscv.opt (mrelax): New option.
16734 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16735 "norelax" when riscv_mrelax is disabled.
16736 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16738 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16741 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16742 reassociation for int modes.
16744 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16746 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16747 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16749 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16750 * config/aarch64/aarch64-sve.md
16751 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16752 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16753 (*extend<mode><Vwide>2): Rename to...
16754 (aarch64_sve_extend<mode><Vwide>2): ...this.
16755 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16756 renaming the old pattern to...
16757 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16759 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16760 define_expand, renaming the old pattern to...
16761 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16762 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16763 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16764 account when deciding which SVE instruction the optab should use.
16765 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16767 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16769 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16770 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16771 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16772 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16773 (tlsdesc_small_<mode>): Turn a define_expand and use
16774 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16775 (tlsdesc_small_advsimd_<mode>): ...this.
16776 (tlsdesc_small_sve_<mode>): New pattern.
16778 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16780 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16781 (UNSPEC_UMUL_HIGHPART): New constants.
16782 (MUL_HIGHPART): New int iteraor.
16783 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16784 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16786 (*<su>mul<mode>3_highpart): New define_insn.
16788 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16791 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16794 2018-03-13 Martin Liska <mliska@suse.cz>
16797 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16799 (sem_item_optimizer::~sem_item_optimizer): Release it.
16800 (sem_item_optimizer::merge_classes): Register variable aliases.
16801 (sem_item_optimizer::fixup_pt_set): New function.
16802 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16803 * ipa-icf.h: Declare new variables and functions.
16805 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16807 PR middle-end/84834
16808 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16809 integer_pow2p@2 and test integer_pow2p in condition.
16810 (A < 0 ? C : 0): Similarly for @1.
16812 PR middle-end/84831
16813 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16814 characters starting at p contain '\0' character, don't look beyond
16818 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16819 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16822 * reg-stack.c (change_stack): Change update_end var from int to
16823 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16824 also call set_block_for_insn on the newly added insns and rescan.
16827 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16828 on the last operand.
16831 * tree.c (stabilize_reference_1): Return save_expr (e) for
16832 STATEMENT_LIST even if it doesn't have side-effects.
16834 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16836 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16838 2018-03-12 Renlin Li <renlin.li@arm.com>
16840 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16841 aarch64_output_scalar_simd_mov_immediate.
16843 2018-03-12 Martin Sebor <msebor@redhat.com>
16845 PR tree-optimization/83456
16846 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16847 for perfectly overlapping calls to memcpy.
16848 (gimple_fold_builtin_memory_chk): Same.
16849 (gimple_fold_builtin_strcpy): Handle no-warning.
16850 (gimple_fold_builtin_stxcpy_chk): Same.
16851 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16853 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16855 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16856 parameter. Use it for SFmode.
16857 (rs6000_function_arg_advance_1): Adjust.
16858 (rs6000_function_arg): Adjust.
16859 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16861 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16863 PR rtl-optimization/84169
16864 PR rtl-optimization/84780
16865 * combine.c (can_combine_p): Check for a 2-insn combination whether
16866 the destination register is used between the two insns, too.
16868 2018-03-12 Richard Biener <rguenther@suse.de>
16870 PR tree-optimization/84803
16871 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16872 for refs DR analysis didn't process.
16874 2018-03-12 Richard Biener <rguenther@suse.de>
16876 PR tree-optimization/84777
16877 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16878 force-vectorize loops ignore whether we are optimizing for size.
16880 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16882 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16883 (TARGET_MD_ASM_ADJUST): Define.
16885 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16886 Kito Cheng <kito.cheng@gmail.com>
16887 Chung-Ju Wu <jasonwucj@gmail.com>
16889 * config/nds32/nds32.c (nds32_compute_stack_frame,
16890 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16891 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16892 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16893 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16894 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16895 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16896 * config/nds32/nds32.md (prologue, epilogue): Use macro
16897 NDS32_V3PUSH_AVAILABLE_P to do checking.
16899 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16902 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16903 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16904 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16905 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16906 addition of most attributes on !orig_type_die or the attribute not
16907 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16909 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16910 Chung-Ju Wu <jasonwucj@gmail.com>
16912 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16913 __NDS32_VH__ macro.
16914 * config/nds32/nds32.opt (mvh): New option.
16916 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16917 Chung-Ju Wu <jasonwucj@gmail.com>
16919 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16921 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16922 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16925 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16926 Chung-Ju Wu <jasonwucj@gmail.com>
16928 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16930 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16931 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16933 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16934 Kito Cheng <kito.cheng@gmail.com>
16935 Chung-Ju Wu <jasonwucj@gmail.com>
16937 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16938 UNSPEC_FFMISM and UNSPEC_FLMISM.
16939 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16940 for ffb, ffmism and flmism.
16941 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16942 (unspec_ffmism): Ditto.
16943 (unspec_flmism): Ditto.
16944 (nds32_expand_builtin_impl): Check if string extension is available.
16945 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16946 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16948 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16951 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16954 * lra-assigns.c (assign_by_spills): Return a flag of reload
16955 assignment failure. Do not process the reload assignment
16956 failures. Do not spill other reload pseudos if they has the same
16958 (lra_assign): Add a return arg. Set up from the result of
16959 assign_by_spills call.
16960 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16961 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16962 usage_insns if it is not NULL.
16963 (spill_hard_reg_in_range): New function.
16964 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16965 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16966 function prototypes.
16967 (lra_assign): Change prototype.
16968 * lra.c (lra): Add code to deal with fails by splitting hard reg
16971 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16974 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16976 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16979 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16980 (dw_val_node): Add val_symbolic_view.
16981 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16982 (symview_upper_bound): New.
16983 (new_line_info_table): Initialize symviews_since_reset.
16984 (dwarf2out_source_line): Count symviews_since_reset and set
16985 symview_upper_bound.
16986 (dw_val_equal_p): Handle symview.
16987 (add_AT_symview): New.
16988 (print_dw_val): Handle symview.
16989 (attr_checksum, attr_checksum_ordered): Likewise.
16990 (same_dw_val_p, size_of_die): Likewise.
16991 (value_format, output_die): Likewise.
16992 (add_high_low_attributes): Use add_AT_symview for entry_view.
16993 (dwarf2out_finish): Reset symview_upper_bound, clear
16996 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16999 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17000 Add strict argument and use it.
17001 (rs6000_split_multireg_move): Update for new strict argument.
17002 (mem_operand_gpr): Disallow all non-offsettable addresses.
17003 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17005 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17008 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17009 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17010 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17013 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17014 decl, use remap_type if we want to use the type.
17016 2018-03-09 Martin Sebor <msebor@redhat.com>
17018 PR tree-optimization/84526
17019 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17021 (builtin_access::generic_overlap): Be prepared to handle non-array
17024 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17026 PR rtl-optimization/84682
17027 * lra-constraints.c (process_address_1): Check is_address flag
17028 for address constraints.
17029 (process_alt_operands): Likewise.
17030 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17031 preprocess_constraints.
17032 * recog.h (preprocess_constraints): Add oploc parameter.
17034 * recog.c (preprocess_constraints): Test address_operand for
17035 CT_ADDRESS constraints.
17037 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17040 * lra-assigns.c (assign_by_spills): Return a flag of reload
17041 assignment failure. Do not process the reload assignment
17042 failures. Do not spill other reload pseudos if they has the same
17044 (lra_assign): Add a return arg. Set up from the result of
17045 assign_by_spills call.
17046 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17047 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17048 usage_insns if it is not NULL.
17049 (spill_hard_reg_in_range): New function.
17050 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17051 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17052 function prototypes.
17053 (lra_assign): Change prototype.
17054 * lra.c (lra): Add code to deal with fails by splitting hard reg
17057 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17060 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17061 Accept complain bool parameter. Only emit errors if it is true.
17062 (arm_parse_cpu_option_name): Likewise.
17063 (arm_target_thumb_only): Adjust callers of the above.
17064 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17065 prototype to take a default true bool parameter.
17066 (arm_parse_arch_option_name): Likewise.
17068 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17069 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17073 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17074 * configure: Regenerate.
17075 * configure.ac ("linker --version-script option"): New.
17076 ("linker soname option"): New.
17078 2018-03-09 Richard Biener <rguenther@suse.de>
17080 PR tree-optimization/84775
17081 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17082 immediate uses of predicate stmts and mark them modified.
17085 PR tree-optimization/84178
17086 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17088 (version_loop_for_if_conversion): Delay update_ssa call.
17089 (tree_if_conversion): Delay update_ssa until after predicate
17092 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17095 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17096 when the function accesses prior frames.
17098 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17101 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17102 gen_llsym, otherwise call maybe_gen_llsym.
17104 PR inline-asm/84742
17105 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17106 has ',' character inside of it.
17108 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17111 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17112 as clobbering CC_REGNUM.
17114 2018-03-08 Richard Biener <rguenther@suse.de>
17116 PR middle-end/84552
17117 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17118 (follow_copies_to_constant): Do not follow SSA names registered
17121 2018-03-08 Richard Biener <rguenther@suse.de>
17123 PR tree-optimization/84178
17124 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17126 (version_loop_for_if_conversion): Delay update_ssa call.
17127 (tree_if_conversion): Delay update_ssa until after predicate
17130 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17132 PR tree-optimization/84178
17133 * tree-if-conv.c (release_bb_predicate): Remove the
17134 the assertion that the stmts have NULL use_ops.
17135 Discard the statements, asserting that they haven't
17136 yet been added to a BB.
17138 2018-03-08 Richard Biener <rguenther@suse.de>
17140 PR tree-optimization/84746
17141 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17142 (phi_translate): Pass in destination ANTIC_OUT set.
17143 (phi_translate_1): Likewise. For a simplified result lookup
17144 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17145 (phi_translate_set): Adjust.
17146 (do_pre_regular_insertion): Likewise.
17147 (do_pre_partial_partial_insertion): Likewise.
17149 2018-03-08 Martin Liska <mliska@suse.cz>
17151 PR gcov-profile/84735
17152 * doc/gcov.texi: Document usage of profile files.
17153 * gcov-io.h: Document changes in the format.
17155 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17159 * dwarf2out.c (struct dw_line_info_table): Update comments for
17161 (FORCE_RESET_NEXT_VIEW): New.
17162 (FORCE_RESETTING_VIEW_P): New.
17163 (RESETTING_VIEW_P): Check for -1 too.
17164 (ZERO_VIEW_P): Likewise.
17165 (new_line_info_table): Force-reset next view.
17166 (dwarf2out_begin_function): Likewise.
17167 (dwarf2out_source_line): Simplify zero_view_p initialization.
17168 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17169 view directly. Omit view when omitting .loc at line 0.
17171 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17173 PR tree-optimization/84740
17174 * tree-switch-conversion.c (process_switch): Call build_constructors
17175 only if info.phi_count is non-zero.
17177 PR tree-optimization/84739
17178 * tree-tailcall.c (find_tail_calls): Check call arguments against
17179 DECL_ARGUMENTS (current_function_decl) rather than
17180 DECL_ARGUMENTS (func) when checking for tail recursion.
17182 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17184 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17185 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17186 Volker Reichelt's entry and add entries for people that perform
17187 GCC fuzzy testing and report numerous bugs.
17189 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17192 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17193 readonly data in sdata, if that is disabled.
17194 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17195 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17196 -mreadonly-in-sdata option.
17198 2018-03-07 Martin Sebor <msebor@redhat.com>
17200 PR tree-optimization/84468
17201 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17202 basic block when looking for nul assignment.
17204 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17207 * except.h (output_function_exception_table): Adjust prototype.
17208 * except.c (output_function_exception_table): Remove FNNAME parameter
17209 and add SECTION parameter. Ouput one part of the table at a time.
17210 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17211 the first part of the exception table and emit unwind directives.
17212 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17213 (i386_pe_seh_cold_init): Likewise.
17214 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17215 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17216 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17217 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17218 * config/i386/winnt.c: Include except.h.
17219 (struct seh_frame_state): Add reg_offset, after_prologue and
17220 in_cold_section fields.
17221 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17222 (i386_pe_seh_cold_init): New function.
17223 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17224 to seh->in_cold_section.
17225 (seh_emit_push): Record the offset of the push.
17226 (seh_emit_save): Record the offet of the save.
17227 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17228 Test seh->after_prologue to disregard the epilogue.
17229 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17230 (i386_pe_end_cold_function): New function.
17232 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17235 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17236 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17239 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17241 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17242 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17244 PR middle-end/84723
17245 * multiple_target.c: Include tree-inline.h and intl.h.
17246 (expand_target_clones): Diagnose and fail if node->definition and
17247 !tree_versionable_function_p (node->decl).
17249 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17251 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17253 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17254 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17255 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17257 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17260 * combine.c (try_combine): Use reg_or_subregno instead of handling
17261 just paradoxical SUBREGs and REGs.
17263 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17265 * config/arc/arc.c (arc_finalize_pic): Remove function.
17266 (arc_must_save_register): We use single base PIC register, remove
17267 checks to save/restore the PIC register.
17268 (arc_expand_prologue): Likewise.
17269 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17271 (arc_verify_short): Likewise.
17272 (arc_attr_type): Likewise.
17273 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17274 (walk_stores): Likewise.
17275 (arc_address_cost): Make it static.
17276 (arc_verify_short): Likewise.
17277 (branch_dest): Likewise.
17278 (arc_attr_type): Likewise.
17279 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17280 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17281 (arc_final_prescan_insn): Remove inserting the nops due to
17282 hardware hazards. It is done in reorg step.
17283 (insn_length_variant_t): Remove.
17284 (insn_length_parameters_t): Likewise.
17285 (arc_insn_length_parameters): Likewise.
17286 (arc_get_insn_variants): Likewise.
17287 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17289 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17291 PR inline-asm/84683
17292 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17295 PR tree-optimization/84687
17296 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17298 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17300 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17302 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17303 Rename to ppc_speculation_barrier.
17304 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17305 __builtin_ppc_speculation_barrier.
17307 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17310 * combine.c (combine_simplify_rtx): Don't try to simplify if
17311 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17314 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17316 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17317 to 32 bytes when compiling for POWER9.
17319 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17322 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17323 regparm >= 3 with no arg reg available also for calls with
17324 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17327 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17329 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17331 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17334 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17336 2018-03-05 Richard Biener <rguenther@suse.de>
17338 PR tree-optimization/84486
17339 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17340 When inserting a __builtin_assume_aligned call set the LHS
17341 SSA name alignment info accordingly.
17343 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17345 PR tree-optimization/84114
17346 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17347 Avoid reassociation of FLOAT_MODE addition.
17349 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17351 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17352 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17353 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17354 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17355 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17356 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17357 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17359 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17360 __builtin_ia32_wbinvd): New builtins.
17361 (SPECIAL_ARGS2): New.
17362 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17363 (SPECIAL_ARGS2): New.
17364 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17365 (ix86_valid_target_attribute_inner_p): Ditto.
17366 (ix86_init_mmx_sse_builtins): Add special_args2.
17367 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17368 TARGET_WBNOINVD_P): New.
17369 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17370 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17371 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17372 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17373 * config/i386/pconfigintrin.h: New file.
17374 * config/i386/wbnoinvdintrin.h: Ditto.
17375 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17377 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17379 2018-03-05 Richard Biener <rguenther@suse.de>
17381 PR tree-optimization/84670
17382 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17384 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17385 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17386 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17387 doesn't grow if all successors (recursively) were visited at least
17390 2018-03-05 Richard Biener <rguenther@suse.de>
17392 PR tree-optimization/84650
17393 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17394 if executed in the loop pipeline.
17396 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17398 * doc/configfiles.texi (Configuration Files): Move info about
17399 conditionalizing $target-protos.h to...
17400 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17401 differs from $target-protos.h.
17403 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17404 Chung-Ju Wu <jasonwucj@gmail.com>
17406 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17407 * config/nds32/nds32-multiple.md (setmemsi): Define.
17408 * config/nds32/nds32-memory-manipulation.c
17409 (nds32_gen_dup_4_byte_to_word_value): New.
17410 (emit_setmem_word_loop): New.
17411 (emit_setmem_byte_loop): New.
17412 (nds32_expand_setmem_loop): New.
17413 (nds32_expand_setmem_loop_v3m): New.
17414 (nds32_expand_setmem_unroll): New.
17415 (nds32_expand_setmem): New.
17417 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17418 Chung-Ju Wu <jasonwucj@gmail.com>
17420 * config/nds32/nds32-memory-manipulation.c
17421 (nds32_emit_load_store): New.
17422 (nds32_emit_post_inc_load_store): New.
17423 (nds32_emit_mem_move): New.
17424 (nds32_emit_mem_move_block): New.
17425 (nds32_expand_movmemsi_loop_unknown_size): New.
17426 (nds32_expand_movmemsi_loop_known_size): New.
17427 (nds32_expand_movmemsi_loop): New.
17428 (nds32_expand_movmemsi_unroll): New.
17429 (nds32_expand_movmemqi): Rename ...
17430 (nds32_expand_movmemsi): ... to this.
17431 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17432 (movmemsi): ... to this.
17433 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17434 (nds32_expand_movmemsi): ... to this.
17436 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17437 Monk Chiang <sh.chiang04@gmail.com>
17438 Chung-Ju Wu <jasonwucj@gmail.com>
17440 * config/nds32/nds32-protos.h
17441 (nds32_expand_load_multiple): New arguments.
17442 (nds32_expand_store_multiple): Ditto.
17443 (nds32_valid_multiple_load_store): Rename ...
17444 (nds32_valid_multiple_load_store_p): ... to this.
17445 * config/nds32/nds32-memory-manipulation.c
17446 (nds32_expand_load_multiple): Refine implementation.
17447 (nds32_expand_store_multiple): Ditto.
17448 * config/nds32/nds32-multiple.md
17449 (load_multiple): Update nds32_expand_load_multiple interface.
17450 (store_multiple): Update nds32_expand_store_multiple interface.
17451 * config/nds32/nds32-predicates.c
17452 (nds32_valid_multiple_load_store): Rename ...
17453 (nds32_valid_multiple_load_store_p): ... to this and refine
17455 * config/nds32/predicates.md
17456 (nds32_load_multiple_and_update_address_operation): New predicate.
17457 (nds32_store_multiple_and_update_address_operation): New predicate.
17459 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17460 Chung-Ju Wu <jasonwucj@gmail.com>
17462 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17463 (combo): New attribute.
17464 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17466 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17468 * config/nds32/nds32.opt: Change -mcmodel= default value.
17470 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17471 Monk Chiang <sh.chiang04@gmail.com>
17472 Chung-Ju Wu <jasonwucj@gmail.com>
17474 * config/nds32/constants.md (unspec_element): New enum.
17475 * config/nds32/constraints.md (Umw): New constraint.
17476 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17477 * config/nds32/nds32-intrinsic.md: Likewise.
17478 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17479 (nds32_valid_smw_lwm_base_p): New.
17480 (nds32_output_smw_single_word): New.
17481 (nds32_output_lmw_single_word): New.
17482 (nds32_expand_unaligned_load): New.
17483 (nds32_expand_unaligned_store): New.
17484 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17485 (nds32_output_smw_single_word): Declare.
17486 (nds32_output_lmw_single_word): Declare.
17487 (nds32_expand_unaligned_load): Declare.
17488 (nds32_expand_unaligned_store): Declare.
17489 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17490 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17491 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17492 NDS32_BUILTIN_UASTORE_DW.
17493 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17496 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17497 Kito Cheng <kito.cheng@gmail.com>
17498 Chung-Ju Wu <jasonwucj@gmail.com>
17500 * config/nds32/nds32-intrinsic.c
17501 (nds32_expand_builtin_null_ftype_reg): Delete.
17502 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17503 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17504 (nds32_read_argument): New.
17505 (nds32_legitimize_target): Ditto.
17506 (nds32_legitimize_argument): Ditto.
17507 (nds32_check_constant_argument): Ditto.
17508 (nds32_expand_unop_builtin): Ditto.
17509 (nds32_expand_unopimm_builtin): Ditto.
17510 (nds32_expand_binop_builtin): Ditto.
17511 (nds32_builtin_decl_impl): Ditto.
17512 (builtin_description): Ditto.
17513 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17514 (nds32_init_builtins_impl): Ditto.
17515 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17516 (nds32_builtin_decl): New.
17517 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17518 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17520 2018-03-02 Jeff Law <law@redhat.com>
17522 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17523 (redundant_insn, fill_simple_delay_slots): Likewise.
17524 (fill_slots_from_thread): Likewise.
17525 * resource.c (mark_referenced_resources): Likewise.
17526 (mark_set_resources, find_dead_or_set_registers): Likewise.
17528 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17530 * substring-locations.h (format_warning_va): Formatting fix for
17531 ATTRIBUTE_GCC_DIAG.
17532 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17534 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17535 * substring-locations.c: Include intl.h.
17536 (format_warning_va): Turned into small wrapper around
17537 format_warning_n_va, renamed to ...
17538 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17539 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17541 (format_warning_at_substring_n): New function.
17542 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17543 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17544 format_warning_at_substring with just a shorter name instead of
17545 const function pointer.
17546 (fmtwarn_n): New function.
17547 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17548 appropriate, get rid of all the fmtstr temporaries, move conditionals
17549 with G_() wrapped string literals directly into fmtwarn arguments,
17550 cast dir.len to (int), formatting fixes.
17552 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17554 * doc/invoke.texi: Remove "Cilk Plus" references.
17556 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17557 Richard Biener <rguenther@suse.de>
17560 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17561 for error or warning attributes if CALL_FROM_THUNK_P is set.
17564 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17567 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17568 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17571 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17572 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17574 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17575 instead of -1U in last predictors element's probability member.
17577 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17580 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17581 arguments if they are comparable.
17583 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17585 PR tree-optimization/84634
17586 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17587 masks and masked_loop_p with a single loop_masks, making sure it's
17588 null for bb vectorization.
17590 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17592 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17593 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17594 loop->force_vectorize to check whether there is no alias.
17596 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17599 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17601 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17603 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17604 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17605 instead of a loop around prev_real_insn.
17606 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17609 PR inline-asm/84625
17610 * config/i386/i386.c (ix86_print_operand): Use conditional
17611 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17614 2018-03-02 Richard Biener <rguenther@suse.de>
17616 PR tree-optimization/84427
17617 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17618 (bitmap_set_subtract_values): Rewrite to handle multiple
17621 (prune_clobbered_mems): Likewise.
17622 (phi_translate): Take edge instead of pred/phiblock.
17623 (phi_translate_1): Likewise.
17624 (phi_translate_set): Likewise. Insert all translated
17625 exprs for a value into the set, keeping possibly multiple
17626 expressions per value.
17627 (compute_antic_aux): Adjust for phi_translate changes.
17628 When intersecting union the expressions and prune those
17629 not in the final value set, keeping possibly multiple
17630 expressions per value. Do not use value-insertion
17631 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17632 all expressions. Add verification that the value-sets
17633 only shrink during iteration.
17634 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17635 (do_pre_regular_insertion): Likewise.
17636 (do_pre_partial_partial_insertion): Likewise.
17638 2018-03-02 Richard Biener <rguenther@suse.de>
17641 * config/darwin.c (saved_debug_info_level): New static global.
17642 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17643 (darwin_asm_lto_end): Restore debug info generation settings.
17645 2018-03-01 Martin Liska <mliska@suse.cz>
17648 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17649 volatile arguments.
17651 2018-03-01 Richard Biener <rguenther@suse.de>
17654 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17655 type annotation with LTO when debug was disabled at compile-time.
17657 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17659 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17661 (mips_final_postscan_insn): Likewise.
17663 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17665 PR rtl-optimization/84528
17666 * alias.c (init_alias_target): Add commentary.
17667 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17668 a unique base value if the frame pointer is not eliminated
17669 to the stack pointer.
17671 2018-03-01 Tom de Vries <tom@codesourcery.com>
17673 PR rtl-optimization/83327
17674 * lra-int.h (hard_regs_spilled_into): Declare.
17675 * lra.c (hard_regs_spilled_into): Define.
17676 (init_reg_info): Init hard_regs_spilled_into.
17677 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17678 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17679 (process_bb_lives): Handle hard_regs_spilled_into.
17680 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17681 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17683 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17685 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17686 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17687 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17688 * config/rs6000/aix72.h: New file.
17690 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17692 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17693 instead of warning_at with conditional singular and plural messages
17697 * stor-layout.c (update_alignment_for_field): For
17698 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17699 && !DECL_PACKED (field), do the alignment update, just use
17700 only desired_align instead of MAX (type_align, desired_align)
17702 (place_field): Don't do known_align < desired_align handling
17703 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17704 is non-NULL, instead do it after rli->prev_field handling and
17705 only if not within a bitfield word. For DECL_PACKED (field)
17706 use type_align of BITS_PER_UNIT.
17708 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17710 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17711 superfluous parentheses and trailing spaces.
17713 2018-02-28 Richard Biener <rguenther@suse.de>
17715 PR tree-optimization/84584
17716 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17717 SCoPs with fake exit edge.
17719 2018-02-28 Martin Liska <mliska@suse.cz>
17722 * timevar.c (timer::print): Fix format to properly print 100%
17725 2018-02-28 Richard Biener <rguenther@suse.de>
17727 PR middle-end/84607
17728 * genmatch.c (capture_info::walk_match): Do not mark
17729 captured expressions without operands as expr_p given
17730 they act more like predicates and should be subject to
17731 "lost tail" side-effect preserving.
17733 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17735 PR rtl-optimization/81611
17736 * auto-inc-dec.c (attempt_change): Move dead note from
17737 mem_insn if it's the next use of regno
17738 (find_address): Take address use of reg holding
17739 non-incremented value. Add parm to limit search to the named
17741 (merge_in_block): Attempt to use a mem insn that is the next
17742 use of the original regno.
17744 2018-02-27 Martin Sebor <msebor@redhat.com>
17747 * doc/invoke.texi (-Wmissing-attributes): New option.
17748 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17750 2018-02-27 Martin Sebor <msebor@redhat.com>
17752 PR translation/84207
17753 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17754 n argument to unsigned HOST_WIDE_INT.
17755 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17756 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17757 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17758 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17760 2018-02-27 Richard Biener <rguenther@suse.de>
17762 PR tree-optimization/84512
17763 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17764 Do not use the estimate returned from record_stmt_cost for
17765 the scalar iteration cost but sum properly using add_stmt_cost.
17767 2018-02-27 Richard Biener <rguenther@suse.de>
17769 PR tree-optimization/84466
17770 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17771 Adjust last change to less strictly validate use operands.
17773 2018-02-27 Martin Liska <mliska@suse.cz>
17775 PR gcov-profile/84548
17776 * gcov.c (process_file): Allow partial overlap and consider it
17777 also as group functions.
17778 (output_lines): Properly calculate range of lines for a group.
17780 2018-02-27 Martin Liska <mliska@suse.cz>
17782 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17783 'ggc' suffixes. Change first column width.
17784 (timer::print): Fix formatting of the column.
17786 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17788 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17789 preserve inline entry blocks for the sake of debug inline
17790 entry point markers alone.
17791 (remove_unused_locals): Suggest in comments a better place to
17792 force the preservation of inline entry blocks that are
17793 otherwise unused, but do not preserve them.
17795 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17797 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17799 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17802 * config/i386/constraints.md (Bs): Replace
17803 ix86_indirect_branch_register with
17804 TARGET_INDIRECT_BRANCH_REGISTER.
17806 * config/i386/i386.md (indirect_jump): Likewise.
17807 (tablejump): Likewise.
17808 (*sibcall_memory): Likewise.
17809 (*sibcall_value_memory): Likewise.
17810 Peepholes of indirect call and jump via memory: Likewise.
17811 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17812 (*sibcall_value_GOT_32): Likewise.
17813 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17814 (GOT_memory_operand): Likewise.
17815 (call_insn_operand): Likewise.
17816 (sibcall_insn_operand): Likewise.
17817 (GOT32_symbol_operand): Likewise.
17818 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17820 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17822 PR rtl-optimization/83496
17823 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17824 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17825 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17826 redundant insn, if any.
17827 (relax_delay_slots): Likewise.
17828 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17830 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17832 PR tree-optimization/83965
17833 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17834 that grouped statements are part of a reduction chain. Return
17835 true if the statement is not marked as a reduction itself but
17836 is part of a group.
17837 (vect_recog_dot_prod_pattern): Don't check whether the statement
17838 is part of a group here.
17839 (vect_recog_sad_pattern): Likewise.
17840 (vect_recog_widen_sum_pattern): Likewise.
17842 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17845 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17847 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17850 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17852 (ix86_output_indirect_function_return): New prototype.
17853 (ix86_split_simple_return_pop_internal): Likewise.
17854 * config/i386/i386.c (indirect_return_via_cx): New.
17855 (indirect_return_via_cx_bnd): Likewise.
17856 (indirect_thunk_name): Handle return va CX_REG.
17857 (output_indirect_thunk_function): Create alias for
17858 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17859 (ix86_output_indirect_jmp): Remove the bool argument.
17860 (ix86_output_indirect_function_return): New function.
17861 (ix86_split_simple_return_pop_internal): Likewise.
17862 * config/i386/i386.md (*indirect_jump): Don't pass false
17863 to ix86_output_indirect_jmp.
17864 (*tablejump_1): Likewise.
17865 (simple_return_pop_internal): Change it to define_insn_and_split.
17866 Call ix86_split_simple_return_pop_internal to split it for
17867 -mfunction-return=.
17868 (simple_return_indirect_internal): Call
17869 ix86_output_indirect_function_return instead of
17870 ix86_output_indirect_jmp.
17872 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17875 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17876 memset and value initialization afterwards.
17878 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17880 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17882 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17885 * common/config/aarch64/aarch64-common.c
17886 (aarch_option_optimization_table[]): Switch
17887 off fomit-frame-pointer
17889 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17890 Chung-Ju Wu <jasonwucj@gmail.com>
17892 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17894 (store_multiple): Ditto.
17896 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17898 * config.gcc: Add --with-cpu support for nds32 target.
17899 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17900 * config/nds32/nds32.opt: Add -mcpu= option.
17902 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17904 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17905 isel=yes): Warn for these deprecated options.
17907 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17909 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17910 ISA_2_5_MASKS_EMBEDDED.
17912 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17914 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17915 p->max as pointers rather than using iterative_hash_expr.
17917 2018-02-23 Carl Love <cel@us.ibm.com>
17919 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17920 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17922 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17923 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17924 P8V_BUILTIN_VEC_VUNSIGNED2.
17926 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17929 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17930 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17932 * lra-constraints.c (curr_insn_transform): Set up
17933 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17935 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17936 * lra-eliminations.c (spill_pseudos): Ditto.
17937 (process_insn_for_elimination): Ditto.
17938 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17939 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17940 LRA_NON_CLOBBERED_ALT.
17942 2018-02-22 Martin Sebor <msebor@redhat.com>
17944 PR tree-optimization/84480
17945 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17946 to maybe_diag_stxncpy_trunc. Call it.
17947 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17948 from gimple_fold_builtin_strcpy. Print inlining stack.
17949 (handle_builtin_stxncpy): Print inlining stack.
17950 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17952 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17955 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17956 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17957 and -fcheck-pointer-bounds are used together.
17958 (indirect_thunk_prefix): New enum.
17959 (indirect_thunk_need_prefix): New function.
17960 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17961 "_nt" instead of "_bnd" for NOTRACK prefix.
17962 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17963 (output_indirect_thunk_function): Likewise.
17965 (ix86_code_end): Update output_indirect_thunk_function calls.
17966 (ix86_output_indirect_branch_via_reg): Replace
17967 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17968 (ix86_output_indirect_branch_via_push): Likewise.
17969 (ix86_output_function_return): Likewise.
17970 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17971 incompatible with -fcf-protection=branch and
17972 -fcheck-pointer-bounds.
17974 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17977 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17978 Change gcc_assert call to output_operand_lossage.
17980 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17982 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17984 2018-02-22 DJ Delorie <dj@redhat.com>
17985 Sebastian Perta <sebastian.perta@renesas.com>
17986 Oleg Endo <olegendo@gcc.gnu.org>
17988 * config/rx/rx.c (rx_rtx_costs): New function.
17989 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17991 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17993 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17995 2018-02-22 Martin Liska <mliska@suse.cz>
17998 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17999 Add "native" as a possible value.
18001 2018-02-22 Martin Liska <mliska@suse.cz>
18004 * config/i386/i386.c (ix86_option_override_internal):
18005 Add "native" as a possible value for -march and -mtune.
18007 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18010 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18011 to all type variants.
18013 PR tree-optimization/84503
18014 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18015 width as info->bitpos + info->bitsize - start.
18016 (merged_store_group::merge_overlapping): Simplify width computation.
18017 (check_no_overlap): New function.
18018 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18019 start + width and last_order of the group, fail if check_no_overlap
18021 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18022 to group if check_no_overlap fails.
18024 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18026 * config/rs6000/altivec.md: Delete contraint arguments to
18027 define_expand, define_split, and define_peephole2, and in
18028 define_insn_and_split if always unused.
18029 * config/rs6000/darwin.md: Ditto.
18030 * config/rs6000/dfp.md: Ditto.
18031 * config/rs6000/rs6000.md: Ditto.
18032 * config/rs6000/sync.md: Ditto.
18033 * config/rs6000/vector.md: Ditto.
18034 * config/rs6000/vsx.md: Ditto.
18036 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18038 * config/rs6000/altivec.md: Write output control strings as braced
18039 blocks instead of double-quoted strings.
18040 * config/rs6000/darwin.md: Ditto.
18041 * config/rs6000/rs6000.md: Ditto.
18042 * config/rs6000/vector.md: Ditto.
18043 * config/rs6000/vsx.md: Ditto.
18045 2018-02-21 Jason Merrill <jason@redhat.com>
18047 PR c++/84314 - ICE with templates and fastcall attribute.
18048 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18050 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18052 * ipa-cp.c (determine_versionability): Fix comment typos.
18054 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18057 * ipa-cp.c (determine_versionability): Do not version functions caling
18060 2018-02-21 Martin Liska <mliska@suse.cz>
18063 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18064 Add "native" as a possible value.
18065 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18066 the macro when native cpu detection is available.
18068 2018-02-21 Martin Liska <mliska@suse.cz>
18071 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18072 Add "native" as a possible value.
18073 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18074 when native cpu detection is available.
18076 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18077 Martin Sebor <msebor@redhat.com>
18079 PR tree-optimization/84478
18080 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18082 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18083 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18084 support which is conservatively correct, for 2 only stay conservative
18085 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18086 argument to the 2 argument get_range_strlen, adjust 6 arg
18087 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18089 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18090 (gimple_fold_builtin_strlen): Pass true as last argument to
18093 2018-02-20 Martin Sebor <msebor@redhat.com>
18095 PR middle-end/84095
18096 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18097 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18098 (builtin_memref::builtin_memref): Factor out parts into
18099 set_base_and_offset and call it.
18101 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18103 PR middle-end/84406
18104 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18105 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18106 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18107 search at the associated MODE_INT.
18109 2018-02-20 Jeff Law <law@redhat.com>
18111 PR middle-end/82123
18112 PR tree-optimization/81592
18113 PR middle-end/79257
18114 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18115 for range data rather than using global data.
18116 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18117 range data rather than using global data.
18118 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18119 pass it to children as needed.
18120 (struct directive::fmtresult): Similarly.
18121 (struct directive::set_width): Similarly.
18122 (struct directive::set_precision): Similarly.
18123 (format_integer, format_directive, parse_directive): Similarly.
18124 (format_none): Accept unnamed vr_values parameter.
18125 (format_percent, format_floating, format_character): Similarly.
18126 (format_string, format_plain): Similarly.
18127 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18128 the EVRP range analyzer for range data rather than using global data.
18129 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18130 gimple-ssa-evrp-analyze.h
18131 (class sprintf_dom_walker): Add after_dom_children member function.
18132 Add evrp_range_analyzer member.
18133 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18134 range analyzer as needed.
18135 (sprintf_dom_walker::after_dom_children): New member function.
18136 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18138 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18139 (evrp_range_analyzer::pop_to_marker): Likewise.
18141 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18143 PR tree-optimization/84419
18144 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18145 with the required type if its current type is compatible but
18148 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18150 PR middle-end/82004
18151 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18152 after vectorization.
18154 2018-02-20 Martin Liska <mliska@suse.cz>
18157 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18158 possible values if we don't have a hint.
18160 2018-02-20 Martin Liska <mliska@suse.cz>
18164 * final.c (shorten_branches): Build align_tab array with one
18166 * opts.c (finish_options): Add alignment option limit check.
18167 (MAX_CODE_ALIGN): Likewise.
18168 (MAX_CODE_ALIGN_VALUE): Likewise.
18169 * doc/invoke.texi: Document maximum allowed option value for
18170 all -falign-* options.
18172 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18175 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18176 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18177 * var-tracking.c (emit_note_insn_var_location): Remove all references
18178 to NOTE_INSN_CALL_ARG_LOCATION.
18179 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18180 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18181 Use copy_rtx_if_shared.
18182 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18183 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18184 (dwarf2out_var_location): Remove handling of
18185 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18187 * final.c (final_scan_insn): Remove all references to
18188 NOTE_INSN_CALL_ARG_LOCATION.
18189 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18190 before dumping final insns.
18191 * except.c (emit_note_eh_region_end): Remove all references to
18192 NOTE_INSN_CALL_ARG_LOCATION.
18193 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18194 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18195 * config/arc/arc.c (hwloop_optimize): Likewise.
18196 * config/arm/arm.c (create_fix_barrier): Likewise.
18197 * config/s390/s390.c (s390_chunkify_start): Likewise.
18198 * config/sh/sh.c (find_barrier): Likewise.
18199 * config/i386/i386.c (rest_of_insert_endbranch,
18200 ix86_seh_fixup_eh_fallthru): Likewise.
18201 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18202 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18203 * config/frv/frv.c (frv_function_prologue): Likewise.
18204 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18206 (note_outside_basic_block_p): Remove all references to
18207 NOTE_INSN_CALL_ARG_LOCATION.
18208 * gengtype.c (adjust_field_rtx_def): Likewise.
18209 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18211 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18212 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18215 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18218 PR tree-optimization/84452
18219 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18220 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18223 2018-02-19 Martin Liska <mliska@suse.cz>
18226 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18228 2018-02-19 Martin Liska <mliska@suse.cz>
18229 Richard Sandiford <richard.sandiford@linaro.org>
18231 PR tree-optimization/82491
18232 * gimple-fold.c (get_base_constructor): Make earlier bail out
18235 2018-02-19 Carl Love <cel@us.ibm.com>
18237 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18238 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18240 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18241 P8V_BUILTIN_VEC_NEG.
18243 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18245 * config/rl78/rl78.md (movdf): New define expand.
18247 2018-02-19 Martin Liska <mliska@suse.cz>
18250 * doc/invoke.texi: Fix typo.
18251 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18253 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18255 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18256 handle rs6000_single_float and rs6000_double_float specially for
18259 2018-02-16 Jeff Law <law@redhat.com>
18261 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18262 (pop_regs): Use it.
18264 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18267 * ipa-inline.c (inline_small_functions): Fix a typo.
18269 2018-02-16 Nathan Sidwell <nathan@acm.org>
18271 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18273 2018-02-16 Carl Love <cel@us.ibm.com>
18275 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18276 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18277 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18278 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18279 expansion to P8V_BUILTIN_VEC_FLOAT2.
18281 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18283 PR rtl-optimization/70023
18284 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18285 src_regno into account.
18287 2018-02-16 Carl Love <cel@us.ibm.com>
18289 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18290 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18291 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18292 * config/rs6000/rs6000.c: Remove case statements for
18293 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18294 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18295 and P9V_BUILTIN_VEC_VINSERT4B.
18296 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18297 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18298 * config/rs6000/vsx.md:
18299 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18302 2018-02-16 Carl Love <cel@us.ibm.com>
18304 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18306 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18308 * config/rs6000/rs6000-c.c: Add the definitions for
18309 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18310 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18311 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18312 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18313 definition for insert4b and define insn *insert3b_internal.
18314 * doc/extend.texi: Add documentation for vec_extract4b.
18316 2018-02-16 Nathan Sidwell <nathan@acm.org>
18318 * doc/extend.texi (Backwards Compatibility): Mention friend
18319 injection. Note for-scope is deprecated.
18320 * doc/invoke.texi (-ffriend-injection): Deprecate.
18322 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18324 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18325 that moved to I2, also allow destinations that are a paradoxical
18326 subreg (instead of a normal reg).
18328 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18331 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18334 2018-02-16 Richard Biener <rguenther@suse.de>
18336 PR tree-optimization/84037
18337 PR tree-optimization/84016
18339 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18340 Adjust vec_construct for the fact we need additional higher latency
18341 128bit inserts for AVX256 and AVX512 vector builds.
18342 (ix86_add_stmt_cost): Scale vector construction cost for
18345 2018-02-16 Richard Biener <rguenther@suse.de>
18347 PR tree-optimization/84417
18348 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18349 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18350 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18352 2018-02-16 Martin Liska <mliska@suse.cz>
18355 * internal-fn.def (ASAN_CHECK): Set proper flags.
18356 (ASAN_MARK): Likewise.
18358 2018-02-16 Julia Koval <julia.koval@intel.com>
18360 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18361 from PTA_CANNONLAKE.
18363 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18366 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18367 Use ++iter rather than iter++ for std::list iterators.
18368 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18369 defer deleting them until all nodes in the forest are processed. Do
18370 free even leaf nodes. Change to_process into auto_vec.
18373 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18374 * vec.h (vec_default_construct): Use memset instead of placement new
18375 if BROKEN_VALUE_INITIALIZATION is defined.
18376 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18377 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18380 PR rtl-optimization/83723
18381 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18382 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18383 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18385 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18387 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18389 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18391 PR rtl-optimization/81443
18392 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18393 from inner REGs to paradoxical SUBREGs.
18395 2018-02-16 Richard Biener <rguenther@suse.de>
18397 PR tree-optimization/84399
18398 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18399 For operands we can analyze at their definition make sure we can
18400 analyze them at each use as well.
18402 2018-02-16 Richard Biener <rguenther@suse.de>
18404 PR tree-optimization/84190
18405 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18406 volatile accesses if the decl isn't volatile.
18408 2018-02-15 Jason Merrill <jason@redhat.com>
18410 PR c++/84314 - ICE with templates and fastcall attribute.
18411 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18412 TYPE_CANONICAL on an existing type.
18414 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18416 PR tree-optimization/84383
18417 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18418 dstoff nor call operand_equal_p if dstbase is NULL.
18420 PR tree-optimization/84334
18421 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18422 also a CONSTANT_CLASS_P, punt.
18424 2018-02-14 Jim Wilson <jimw@sifive.com>
18426 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18427 first SMALL_OPERAND check. New local min_second_step. Move assert
18428 to where locals are set. Add TARGET_RVC support.
18429 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18431 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18433 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18435 2018-02-14 Martin Sebor <msebor@redhat.com>
18437 PR tree-optimization/83698
18438 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18439 arrays constrain the offset range to their bounds.
18440 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18441 (builtin_access::overlap): Avoid setting the size of overlap if it's
18443 (maybe_diag_overlap): Also consider arrays when deciding what values
18444 of offsets to include in diagnostics.
18446 2018-02-14 Martin Sebor <msebor@redhat.com>
18449 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18450 that correspond to the kind of a declaration.
18452 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18455 * config/pa/pa.md: Load address of PIC label using the linkage table
18456 if the label is nonlocal.
18458 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18460 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18461 warning message if user requests -maltivec=be.
18462 * doc/invoke.texi: Document deprecation of -maltivec=be.
18464 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18467 * config/rs6000/rs6000-c.c: Update definitions for
18468 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18469 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18471 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18474 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18475 add _get_ssp intrinsics. Remove argument from
18476 __builtin_ia32_rdssp[d|q].
18477 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18478 * config/i386/i386-builtin.def: Remove argument from
18479 __builtin_ia32_rdssp[d|q].
18480 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18481 ix86_expand_special_args_builtin for _rdssp[d|q].
18482 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18483 Clear register before usage.
18484 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18485 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18487 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18489 PR tree-optimization/84357
18490 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18491 operand 1 of an ARRAY_REF too.
18493 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18496 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18497 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18499 (set_of_reg): New struct.
18500 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18501 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18502 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18504 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18505 Split into bitclr, bitset, bitinvert patterns if appropriate.
18506 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18507 use rx_fuse_in_memory_bitop.
18508 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18509 to named insn, correct maximum insn length.
18511 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18514 * machmode.def: Define a complex mode for PARTIAL_INT.
18515 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18517 * doc/rtl.texi: Document CSPImode.
18518 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18520 (msp430_hard_regno_nregs_with_padding): Likewise.
18522 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18525 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18527 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18529 PR rtl-optimization/84169
18530 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18531 we generated a parallel as new i3 and we split that to new i2 and i3
18532 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18533 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18534 those to i2, not i1. Partially rewrite this scan code.
18536 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18539 * stor-layout.c (place_field): For variable length fields, adjust
18540 offset_align afterwards not just based on the field's alignment,
18541 but also on the size.
18543 PR middle-end/84309
18544 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18545 of exps and logs in the use_exp2 case.
18547 2018-02-13 Jeff Law <law@redhat.com>
18549 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18550 entry for "vector".
18552 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18555 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18559 * common.opt (gas-loc-support, gas-locview-support): New.
18560 (ginline-points, ginternal-reset-location-views): New.
18561 * doc/invoke.texi: Document them. Use @itemx where intended.
18562 (gvariable-location-views): Adjust.
18563 * target.def (reset_location_view): New.
18564 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18565 (TARGET_RESET_LOCATION_VIEW): New.
18566 * doc/tm.texi: Rebuilt.
18567 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18568 (dwarf2out_default_as_locview_support): New.
18569 (output_asm_line_debug_info): Use option variables.
18570 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18571 (output_loc_list): Likewise.
18572 (add_high_low_attributes): Check option variables.
18573 Don't output entry view attribute in strict mode.
18574 (gen_inlined_subroutine_die): Check option variables.
18575 (dwarf2out_inline_entry): Likewise.
18576 (init_sections_and_labels): Likewise.
18577 (dwarf2out_early_finish): Likewise.
18578 (maybe_reset_location_view): New, from...
18579 (dwarf2out_var_location): ... here. Call it.
18580 * debug.h (dwarf2out_default_as_loc_support): Declare.
18581 (dwarf2out_default_as_locview_support): Declare.
18582 * hooks.c (hook_int_rtx_insn_0): New.
18583 * hooks.h (hook_int_rtx_insn_0): Declare.
18584 * toplev.c (process_options): Take -gas-loc-support and
18585 -gas-locview-support from dwarf2out. Enable
18586 -gvariable-location-views by default only with locview
18587 assembler support. Enable -ginternal-reset-location-views by
18588 default only if the target defines the corresponding hook.
18589 Enable -ginline-points by default if location views are
18590 enabled; force it disabled if statement frontiers are
18592 * tree-inline.c (expand_call_inline): Check option variables.
18593 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18595 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18597 PR tree-optimization/84321
18598 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18599 handling. Also check whether the anti-range contains any values
18600 that satisfy the mask; switch to a VR_RANGE if not.
18602 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18605 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18607 2018-02-13 Martin Jambor <mjambor@suse.cz>
18610 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18611 of call statements, also set location of a load to a temporary.
18613 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18615 * config/rl78/rl78.c (add_vector_labels): New function.
18616 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18617 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18618 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18619 which checks that no arguments are passed.
18620 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18621 * doc/extend.texi: Documentation for the new attribute.
18623 2018-02-13 Andreas Schwab <schwab@suse.de>
18625 * config/riscv/linux.h (CPP_SPEC): Define.
18627 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18630 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18631 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18632 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18633 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18634 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18635 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18636 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18637 temporarily for AES and PCLMUL builtins.
18639 PR tree-optimization/84339
18640 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18641 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18644 PR middle-end/84309
18645 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18646 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18647 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18649 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18651 * omp-simd-clone.h: New file.
18652 * omp-simd-clone.c: Include omp-simd-clone.h.
18653 (expand_simd_clones): No longer static.
18654 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18655 cgraph.h and omp-simd-clone.h.
18656 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18657 (vect_recog_widen_shift_pattern): Formatting fix.
18658 (vect_pattern_recog_1): Don't check optab for calls.
18661 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18662 operands[2] into a REG before using gen_lowpart on it.
18664 2018-02-12 Jeff Law <law@redhat.com>
18667 * config/sh/sh.c (find_barrier): Consider a sibling call
18670 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18671 successfully back substituting a reg.
18673 2018-02-12 Richard Biener <rguenther@suse.de>
18675 PR tree-optimization/84037
18676 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18677 parameter, move visited init to caller.
18678 (vect_slp_analyze_operations): Separate cost from validity
18679 check, initialize visited once for all instances.
18680 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18682 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18684 (vect_model_promotion_demotion_cost): Likewise.
18685 (vectorizable_bswap): Guard cost modeling with !slp_node
18686 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18688 (vectorizable_call): Likewise.
18689 (vectorizable_conversion): Likewise.
18690 (vectorizable_assignment): Likewise.
18691 (vectorizable_shift): Likewise.
18692 (vectorizable_operation): Likewise.
18693 (vectorizable_store): Likewise.
18694 (vectorizable_load): Likewise.
18695 (vectorizable_condition): Likewise.
18696 (vectorizable_comparison): Likewise.
18698 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18701 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18702 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18703 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18705 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18707 PR middle-end/83665
18708 * params.def (inline-min-speedup): Increase from 8 to 15.
18709 (max-inline-insns-auto): Decrease from 40 to 30.
18710 * ipa-split.c (consider_split): Add some buffer for function to
18711 be considered inlining candidate.
18712 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18715 2018-02-12 Richard Biener <rguenther@suse.de>
18717 PR tree-optimization/84037
18718 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18719 matched stmts if we cannot swap the non-matched ones.
18721 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18723 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18724 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18725 _mm_maskz_scalef_round_ss): New intrinsics.
18726 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18727 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18728 __builtin_ia32_scalefss_round): Remove.
18729 (__builtin_ia32_scalefsd_mask_round,
18730 __builtin_ia32_scalefss_mask_round): New intrinsics.
18731 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18732 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18733 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18734 "<round_constraint>")): Changed to ...
18735 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18736 "<round_scalar_constraint>")): ... this.
18737 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18738 %0, %1, %2<round_op3>}"): Changed to ...
18739 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18740 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18741 %2<round_scalar_mask_op3>}"): ... this.
18742 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18744 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18746 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18747 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18748 (_mm_maskz_sqrt_round_ss): New intrinsics.
18749 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18750 (__builtin_ia32_sqrtsd_mask_round)
18751 (__builtin_ia32_sqrtss_mask_round): New builtins.
18752 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18753 (__builtin_ia32_sqrtss_round): Remove.
18754 (__builtin_ia32_sqrtsd_mask_round)
18755 (__builtin_ia32_sqrtss_mask_round): New builtins.
18756 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18757 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18758 ((match_operand:VF_128 1 "vector_operand"
18759 "xBm,<round_constraint>")): Changed to ...
18760 ((match_operand:VF_128 1 "vector_operand"
18761 "xBm,<round_scalar_constraint>")): ... this.
18762 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18763 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18764 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18765 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18766 %<iptr>1<round_scalar_mask_op3>}): ... this.
18767 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18768 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18770 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18773 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18774 Cast vec_cmpeq result to correct type.
18775 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18776 Cast vec_cmpgt result to correct type.
18778 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18780 * final.c (final_scan_insn_1): Renamed from...
18781 (final_scan_insn): ... this. New wrapper, to recover
18782 seen from the outermost call in recursive ones.
18783 * config/sparc/sparc.c (output_return): Drop seen from call.
18784 (output_sibcall): Likewise.
18785 * config/visium/visium.c (output_branch): Likewise.
18787 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18789 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18792 2018-02-10 Alan Modra <amodra@gmail.com>
18795 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18796 Specify LR as an input.
18798 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18801 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18802 remove_member_access_dummy_vars): New functions.
18803 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18804 lower_omp_1, execute_lower_omp): Use them.
18806 PR rtl-optimization/84308
18807 * shrink-wrap.c (spread_components): Release todo vector.
18809 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18811 PR rtl-optimization/57193
18812 * ira-color.c (struct allocno_color_data): Add member
18813 conflict_allocno_hard_prefs.
18814 (update_conflict_allocno_hard_prefs): New.
18815 (bucket_allocno_compare_func): Add a preference based on
18816 conflict_allocno_hard_prefs.
18817 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18818 (color_allocnos): Remove a dead code. Initiate
18819 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18821 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18824 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18825 constraint from =wa to wa. Avoid a subreg on the output operand,
18826 instead use a pseudo and subreg it in a move.
18827 (p9_xxbrd_<mode>): Changed to ...
18828 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18829 (p9_xxbrd_v2df): New expander.
18830 (p9_xxbrw_<mode>): Changed to ...
18831 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18832 (p9_xxbrw_v4sf): New expander.
18834 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18836 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18838 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18841 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18842 multiply in 32-bit mode.
18843 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18844 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18847 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18849 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18850 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18851 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18852 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18854 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18857 * dwarf2out.c (is_trivial_indirect_ref): New function.
18858 (dwarf2out_late_global_decl): Do not generate a location
18859 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18860 and that are not defined in the current unit.
18862 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18864 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18865 instead of a libcall for UNORDERED.
18867 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18870 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18871 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18873 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18876 * config/s390/s390.c (s390_set_current_function): Invoke
18877 s390_indirect_branch_settings also if fndecl didn't change.
18879 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18881 * config/rs6000/rs6000.md (blockage): Set length to zero.
18883 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18885 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18887 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18890 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18891 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18895 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18896 PARALLEL incoming that failed vt_get_decl_and_offset check.
18898 PR middle-end/84237
18899 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18900 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18902 (get_variable_section): For decls in named .bss* sections pass true as
18903 second argument to bss_initializer_p.
18905 2018-02-09 Marek Polacek <polacek@redhat.com>
18906 Jakub Jelinek <jakub@redhat.com>
18909 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18910 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18911 Sync some changes from cxx_fold_indirect_ref.
18913 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18915 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18917 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18918 (BLOCK_INLINE_ENTRY_LABEL): New.
18919 (dwarf2out_var_location): Disregard inline entry markers.
18920 (inline_entry_data): New struct.
18921 (inline_entry_data_hasher): New hashtable type.
18922 (inline_entry_data_hasher::hash): New.
18923 (inline_entry_data_hasher::equal): New.
18924 (inline_entry_data_table): New variable.
18925 (add_high_low_attributes): Add DW_AT_entry_pc and
18926 DW_AT_GNU_entry_view attributes if a pending entry is found
18927 in inline_entry_data_table. Add old entry_pc attribute only
18928 if debug nonbinding markers are disabled.
18929 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18930 markers are enabled.
18931 (block_within_block_p, dwarf2out_inline_entry): New.
18932 (dwarf2out_finish): Check that no entries remained in
18933 inline_entry_data_table.
18934 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18935 (final_scan_insn, notice_source_line): Likewise.
18936 (rest_of_clean_state): Skip inline entry markers.
18937 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18939 * gimple.c (gimple_build_debug_inline_entry): New.
18940 * gimple.h (enum gimple_debug_subcode): Add
18941 GIMPLE_DEBUG_INLINE_ENTRY.
18942 (gimple_build_debug_inline_entry): Declare.
18943 (gimple_debug_inline_entry_p): New.
18944 (gimple_debug_nonbind_marker_p): Adjust.
18945 * insn-notes.def (INLINE_ENTRY): New.
18946 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18947 inline entry marker notes.
18948 (print_insn): Likewise.
18949 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18950 (INSN_DEBUG_MARKER_KIND): Likewise.
18951 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18952 * tree-inline.c (expand_call_inline): Build and insert
18953 debug_inline_entry stmt.
18954 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18955 inline entry blocks early, if nonbind markers are enabled.
18956 (dump_scope_block): Dump fragment info.
18957 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18958 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18959 (gimple_build_debug_inline_entry): New.
18960 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18961 Enable/disable inline entry points too.
18962 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18963 (DEBUG_INSN): Describe inline entry markers.
18965 * common.opt (gvariable-location-views): New.
18966 (gvariable-location-views=incompat5): New.
18967 * config.in: Rebuilt.
18968 * configure: Rebuilt.
18969 * configure.ac: Test assembler for view support.
18970 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18971 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18972 * dwarf2out.c (var_loc_view): New typedef.
18973 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18974 (dwarf2out_locviews_in_attribute): New.
18975 (dwarf2out_locviews_in_loclist): New.
18976 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18977 (enum dw_line_info_opcode): Add LI_adv_address.
18978 (struct dw_line_info_table): Add view.
18979 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18980 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18981 (zero_view_p): New variable.
18982 (ZERO_VIEW_P): New macro.
18983 (output_asm_line_debug_info): New.
18984 (struct var_loc_node): Add view.
18985 (add_AT_view_list, AT_loc_list): New.
18986 (add_var_loc_to_decl): Add view param. Test it against last.
18987 (new_loc_list): Add view params. Record them.
18988 (AT_loc_list_ptr): Handle loc and view lists.
18989 (view_list_to_loc_list_val_node): New.
18990 (print_dw_val): Handle dw_val_class_view_list.
18991 (size_of_die): Likewise.
18992 (value_format): Likewise.
18993 (loc_list_has_views): New.
18994 (gen_llsym): Set vl_symbol too.
18995 (maybe_gen_llsym, skip_loc_list_entry): New.
18996 (dwarf2out_maybe_output_loclist_view_pair): New.
18997 (output_loc_list): Output view list or entries too.
18998 (output_view_list_offset): New.
18999 (output_die): Handle dw_val_class_view_list.
19000 (output_dwarf_version): New.
19001 (output_compilation_unit_header): Use it.
19002 (output_skeleton_debug_sections): Likewise.
19003 (output_rnglists, output_line_info): Likewise.
19004 (output_pubnames, output_aranges): Update version comments.
19005 (output_one_line_info_table): Output view numbers in asm comments.
19006 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19007 Call maybe_gen_llsym.
19008 (loc_list_from_tree_1): Adjust.
19009 (add_AT_location_description): Create view list attribute if
19010 needed, check it's absent otherwise.
19011 (convert_cfa_to_fb_loc_list): Adjust.
19012 (maybe_emit_file): Call output_asm_line_debug_info for test.
19013 (dwarf2out_var_location): Reset views as needed. Precompute
19014 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19015 attribute. Set view.
19016 (new_line_info_table): Reset next view.
19017 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19018 (dwarf2out_source_line): Likewise. Output view resets and labels to
19019 the assembler, or select appropriate line info opcodes.
19020 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19021 (optimize_string_length): Catch it. Adjust.
19022 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19023 dw_val_class_view_list, and remove it if no longer needed.
19024 (hash_loc_list): Hash view numbers.
19025 (loc_list_hasher::equal): Compare them.
19026 (optimize_location_lists): Check whether a view list symbol is
19027 needed, and whether the locview attribute is present, and
19028 whether they match. Remove the locview attribute if no longer
19030 (index_location_lists): Call skip_loc_list_entry for test.
19031 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19032 Use output_dwarf_version.
19033 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19034 (struct dw_val_node): Add val_view_list.
19035 * final.c (SEEN_NEXT_VIEW): New.
19036 (set_next_view_needed): New.
19037 (clear_next_view_needed): New.
19038 (maybe_output_next_view): New.
19039 (final_start_function): Rename to...
19040 (final_start_function_1): ... this. Take pointer to FIRST,
19041 add SEEN parameter. Emit param bindings in the initial view.
19042 (final_start_function): Reintroduce SEEN-less interface.
19043 (final): Rename to...
19044 (final_1): ... this. Take SEEN parameter. Output final pending
19045 next view at the end.
19046 (final): Reintroduce seen-less interface.
19047 (final_scan_insn): Output pending next view before switching
19048 sections or ending a block. Mark the next view as needed when
19049 outputting variable locations. Notify debug backend of section
19050 changes, and of location view changes.
19051 (rest_of_handle_final): Adjust.
19052 * toplev.c (process_options): Autodetect value for debug variable
19053 location views option. Warn on incompat5 without -gdwarf-5.
19054 * doc/invoke.texi (gvariable-location-views): New.
19055 (gvariable-location-views=incompat5): New.
19056 (gno-variable-location-views): New.
19058 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19060 PR tree-optimization/84136
19061 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19062 that the result of find_edge is non-NULL.
19064 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19067 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19068 storing integer register in SImode. Fix cost of 256 and 512
19069 byte aligned SSE register store.
19071 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19073 * config/i386/i386.c (ix86_multiplication_cost): Fix
19074 multiplication cost for TARGET_AVX512DQ.
19076 2018-02-08 Marek Polacek <polacek@redhat.com>
19078 PR tree-optimization/84238
19079 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19082 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19084 PR tree-optimization/84265
19085 * tree-vect-stmts.c (vectorizable_store): Don't treat
19086 VMAT_CONTIGUOUS accesses as grouped.
19087 (vectorizable_load): Likewise.
19089 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19091 PR tree-optimization/81635
19092 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19093 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19094 (test_round_for_mask): New functions.
19095 (wide_int_cc_tests): Call test_round_for_mask.
19096 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19097 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19098 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19099 range returned by get_range_info.
19101 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19104 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19105 * symtab.c: Include builtins.h
19106 (symtab_node::output_to_lto_symbol_table_p): Move here
19107 from lto-streamer-out.c:output_symbol_p.
19108 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19109 (output_symbol_p): Move all logic to symtab.c
19110 (produce_symtab): Update.
19112 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19114 * config/s390/s390-opts.h (enum indirect_branch): Define.
19115 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19116 (s390_indirect_branch_via_thunk)
19117 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19118 (enum s390_indirect_branch_type): Define.
19119 * config/s390/s390.c (struct s390_frame_layout, struct
19120 machine_function): Remove.
19121 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19122 (indirect_branch_table_label_no, indirect_branch_table_name):
19124 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19125 (enum s390_indirect_branch_option): Define.
19126 (s390_return_addr_from_memory): New function.
19127 (s390_handle_string_attribute): New function.
19128 (s390_attribute_table): Add new attribute handler.
19129 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19130 (s390_indirect_branch_via_thunk): New function.
19131 (s390_indirect_branch_via_inline_thunk): New function.
19132 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19133 sibling call optimization for non z10 compiles.
19134 (s390_emit_call): Force indirect branch target to be a single
19135 register. Add r1 clobber for non-z10 compiles.
19136 (s390_emit_epilogue): Emit return jump via return_use expander.
19137 (s390_reorg): Handle JUMP_INSNs as execute targets.
19138 (s390_option_override_internal): Perform validity checks for the
19139 new command line options.
19140 (s390_indirect_branch_attrvalue): New function.
19141 (s390_indirect_branch_settings): New function.
19142 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19143 (s390_output_indirect_thunk_function): New function.
19144 (s390_code_end): Implement target hook.
19145 (s390_case_values_threshold): Implement target hook.
19146 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19148 * config/s390/s390.h (struct s390_frame_layout)
19149 (struct machine_function): Move here from s390.c.
19150 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19151 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19152 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19153 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19154 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19155 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19156 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19157 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19158 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19159 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19160 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19161 (mnemonic attribute): Add values which aren't recognized
19163 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19164 pattern for branch conversion. Fix mnemonic attribute.
19165 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19166 indirect branch via thunk if requested.
19167 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19168 ("*indirect_jump"): Disable for branch conversion using out of
19170 ("indirect_jump_via_thunk<mode>_z10")
19171 ("indirect_jump_via_thunk<mode>")
19172 ("indirect_jump_via_inlinethunk<mode>_z10")
19173 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19174 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19175 ("casesi_jump_via_inlinethunk<mode>_z10")
19176 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19177 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19178 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19179 ("*indirect2_jump"): Disable for branch conversion.
19180 ("casesi_jump"): Turn into expander and expand patterns for branch
19182 ("return_use"): New expander.
19183 ("*return"): Emit return via thunk and rename it to ...
19184 ("*return<mode>"): ... this one.
19185 * config/s390/s390.opt: Add new options and and enum for the
19188 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19190 * lra-constraints.c (match_reload): Unconditionally use
19191 gen_lowpart_SUBREG, rather than selecting between that
19192 and equivalent gen_rtx_SUBREG code.
19194 2018-02-08 Richard Biener <rguenther@suse.de>
19196 PR tree-optimization/84233
19197 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19198 changed flag instead of boguously re-using phi_inserted.
19200 2018-02-08 Martin Jambor <mjambor@suse.cz>
19202 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19203 static local variables.
19205 2018-02-08 Richard Biener <rguenther@suse.de>
19207 PR tree-optimization/84278
19208 * tree-vect-stmts.c (vectorizable_store): When looking for
19209 smaller vector types to perform grouped strided loads/stores
19210 make sure the mode is supported by the target.
19211 (vectorizable_load): Likewise.
19213 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19215 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19216 Increase LDP/STP opportunities by adding adjacent callee-saves.
19218 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19220 PR rtl-optimization/84068
19221 PR rtl-optimization/83459
19222 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19224 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19226 PR tree-optimization/84224
19227 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19228 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19229 non-zero arguments.
19231 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19234 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19235 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19236 count, remove one USE.
19238 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19240 * doc/install.texi (Configuration): Document the
19241 --with-long-double-format={ibm,ieee} PowerPC configuration
19245 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19246 Convert from define_expand to be define_insn_and_split. Rework
19247 float/double/_Float128 conversions to QI/HI/SImode to work with
19248 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19249 conversions to QI/HImode types did a store and then a load to
19250 truncate the value. For conversions to VSX registers, don't split
19251 the insn, instead emit the code directly. Use the code iterator
19252 any_fix to combine signed and unsigned conversions.
19253 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19254 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19255 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19256 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19257 (fix_<mode>di2_hw): Likewise.
19258 (fixuns_<mode>di2_hw): Likewise.
19259 (fix_<mode>si2_hw): Likewise.
19260 (fixuns_<mode>si2_hw): Likewise.
19261 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19262 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19263 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19264 fix<uns>_trunc<SFDF:mode>si2_p8.
19265 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19266 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19267 (fix<uns>_<mode>_mem): Likewise.
19268 (fctiw<u>z_<mode>_mem): Likewise.
19269 (fix<uns>_<mode>_mem): Likewise.
19270 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19271 the register allocator from doing a direct move to the GPRs to do
19272 a store, and instead use the ISA 3.0 store byte/half-word from
19273 vector register instruction. For IEEE 128-bit floating point,
19274 also optimize stores of 32-bit ints.
19275 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19277 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19279 * genextract.c (push_pathstr_operand): New function to support
19281 (walk_rtx): Call push_pathstr_operand.
19282 (print_path): Support [a-zA-Z].
19284 2018-02-07 Richard Biener <rguenther@suse.de>
19286 PR tree-optimization/84037
19287 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19288 (cse_and_gimplify_to_preheader): Declare.
19289 (vect_get_place_in_interleaving_chain): Likewise.
19290 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19292 (_loop_vec_info::~_loop_vec_info): Delete it.
19293 (cse_and_gimplify_to_preheader): New function.
19294 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19295 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19296 (vectorizable_load): Likewise. For grouped stores always base
19297 the IV on the first element.
19298 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19299 condition before gimplifying.
19301 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19303 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19304 *DIV_EXPR and *MOD_EXPR.
19306 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19309 * config/i386/i386.c (ix86_option_override_internal): Mask out
19310 the CF_SET bit when checking -fcf-protection.
19312 2018-02-07 Tom de Vries <tom@codesourcery.com>
19315 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19318 2018-02-07 Richard Biener <rguenther@suse.de>
19320 PR tree-optimization/84204
19321 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19324 PR tree-optimization/84205
19325 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19326 special-case isl_ast_op_zdiv_r.
19328 PR tree-optimization/84223
19329 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19330 Only add conditions from within the region.
19331 (gather_bbs::after_dom_children): Adjust.
19333 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19336 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19337 * config/avr/avr.md: Only post-reload split REG-REG moves if
19338 either register is GENERAL_REG_P.
19340 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19342 PR tree-optimization/84235
19343 * tree-ssa-scopedtables.c
19344 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19345 if the subtraction is performed in floating point type where NaNs are
19346 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19347 build 1. Formatting fix.
19349 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19352 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19353 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19354 and skip it regardless of bb boundaries. Use CALL_P macro,
19355 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19356 unnecessarily, formatting fix.
19358 2018-02-06 Michael Collison <michael.collison@arm.com>
19360 * config/arm/thumb2.md:
19361 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19362 (*thumb_mov_notscc): Ditto.
19364 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19367 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19368 unsigned_fix, not "s".
19370 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19372 * configure.ac (gcc_fn_eh_frame_ro): New function.
19373 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19374 correct .eh_frame permissions.
19375 * configure: Regenerate.
19377 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19379 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19380 irrelevant options.
19382 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19384 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19385 Display warning message for -mno-speculate-indirect-jumps.
19387 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19389 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19391 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19393 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19395 PR tree-optimization/84225
19396 * tree-eh.c (find_trapping_overflow): Only call
19397 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19399 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19402 * config/i386/i386.c: Reimplement the check of possible options
19403 -mibt/-mshstk conbination. Change error messages.
19404 * doc/invoke.texi: Fix a typo: remove extra '='.
19406 2018-02-06 Marek Polacek <polacek@redhat.com>
19408 PR tree-optimization/84228
19409 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19411 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19414 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19415 emitted arch directives.
19416 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19417 __ARM_FEATURE_COPROC before changing architectures.
19419 2018-02-06 Richard Biener <rguenther@suse.de>
19421 * config/i386/i386.c (print_reg): Fix typo.
19422 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19424 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19426 * configure: Regenerate.
19428 2018-02-05 Martin Sebor <msebor@redhat.com>
19430 PR tree-optimization/83369
19431 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19434 2018-02-05 Martin Liska <mliska@suse.cz>
19436 * doc/invoke.texi: Cherry-pick upstream r323995.
19438 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19440 * ira.c (ira_init_register_move_cost): Adjust comment.
19442 2018-02-05 Martin Liska <mliska@suse.cz>
19444 PR gcov-profile/84137
19445 * doc/gcov.texi: Fix typo in documentation.
19447 2018-02-05 Martin Liska <mliska@suse.cz>
19449 PR gcov-profile/83879
19450 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19451 using dlopen functionality.
19453 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19455 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19456 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19457 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19458 _mm_maskz_range_round_ss): New intrinsics.
19459 (__builtin_ia32_rangesd128_round)
19460 (__builtin_ia32_rangess128_round): Remove.
19461 (__builtin_ia32_rangesd128_mask_round,
19462 __builtin_ia32_rangess128_mask_round): New builtins.
19463 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19464 __builtin_ia32_rangess128_round): Remove.
19465 (__builtin_ia32_rangesd128_mask_round,
19466 __builtin_ia32_rangess128_mask_round): New builtins.
19467 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19468 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19469 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19470 "<round_saeonly_constraint>")): Changed to ...
19471 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19472 "<round_saeonly_scalar_constraint>")): ... this.
19473 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19474 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19475 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19476 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19477 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19479 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19481 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19483 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19484 Remove all values except native, 8540 and 8548.
19486 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19488 * config/i386/i386.c (ix86_output_function_return): Pass
19489 INVALID_REGNUM, instead of -1, as invalid register number to
19490 indirect_thunk_name and output_indirect_thunk.
19492 2018-02-02 Julia Koval <julia.koval@intel.com>
19494 * config.gcc: Add -march=icelake.
19495 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19496 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19497 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19498 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19499 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19500 (processor_target_table): Add icelake.
19501 (ix86_option_override_internal): Handle new PTAs.
19502 (get_builtin_code_for_version): Handle icelake.
19503 (M_INTEL_COREI7_ICELAKE): New.
19504 (fold_builtin_cpu): Handle icelake.
19505 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19506 * doc/invoke.texi: Add -march=icelake.
19508 2018-02-02 Julia Koval <julia.koval@intel.com>
19510 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19511 to wide_int_bitmask.
19512 * wide-int-bitmask.h: New.
19514 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19517 * config/i386/i386.md: Replace Pmode with word_mode in
19518 builtin_setjmp_setup and builtin_longjmp to support x32.
19520 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19524 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19526 (rs6000_supported_cpu_names): New static variable.
19527 (linux_cpu_translation_table): Likewise.
19528 (elf_platform) <cpu>: Define new static variable and use it.
19529 Translate kernel AT_PLATFORM name to canonical name if needed.
19530 Error if platform name is unknown.
19532 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19535 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19537 2018-02-01 Jeff Law <law@redhat.com>
19540 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19541 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19542 the scratch if RELEASE_VIA_POP is false.
19543 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19544 If we have to save a temporary register, decrement SIZE appropriately.
19545 Pass new arguments to release_scratch_register_on_entry.
19546 (ix86_adjust_stack_and_probe): Likewise.
19547 (ix86_emit_probe_stack_range): Pass new arguments to
19548 release_scratch_register_on_entry.
19550 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19552 PR rtl-optimization/84157
19553 * combine.c (change_zero_ext): Use REG_P predicate in
19554 front of HARD_REGISTER_P predicate.
19556 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19558 * config/avr/avr.c (avr_option_override): Move disabling of
19559 -fdelete-null-pointer-checks to...
19560 * common/config/avr/avr-common.c (avr_option_optimization_table):
19563 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19565 PR tree-optimization/81635
19566 * tree-data-ref.c (split_constant_offset_1): For types that
19567 wrap on overflow, try to use range info to prove that wrapping
19570 2018-02-01 Renlin Li <renlin.li@arm.com>
19573 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19574 TAILCALL_ADDR_REGS.
19575 (aarch64_register_move_cost): Likewise.
19576 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19577 TAILCALL_ADDR_REGS.
19578 (REG_CLASS_NAMES): Likewise.
19579 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19580 TAILCALL_ADDR_REGS. Remove IP registers.
19581 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19583 2018-02-01 Richard Biener <rguenther@suse.de>
19585 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19586 for specifying RPO order and allow NULL for that.
19587 * domwalk.c (dom_walker::dom_walker): Likewise.
19588 (dom_walker::walk): Handle NULL RPO order.
19589 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19591 (rewrite_update_dom_walker): Likewise.
19592 (mark_def_dom_walker): Likewise.
19594 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19596 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19597 (aarch64_maybe_expand_sve_subreg_move): Declare.
19598 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19599 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19601 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19602 that are semantically a reverse operation.
19603 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19604 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19605 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19607 (aarch64_can_change_mode_class): For big-endian, forbid changes
19608 between two SVE modes if they have different element sizes.
19610 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19612 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19613 the TImode handling for big-endian targets.
19615 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19617 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19618 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19620 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19621 Remove BSWAP handing for big-endian targets and use the form of
19622 LD1RQ appropariate for the mode.
19624 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19626 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19627 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19628 duplicated element.
19630 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19633 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19634 check for operands that need to go through aarch64_sve_reload_be.
19636 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19638 PR tree-optimization/81661
19639 PR tree-optimization/84117
19640 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19641 * tree-eh.c: Include gimplify.h.
19642 (find_trapping_overflow, replace_trapping_overflow,
19643 rewrite_to_non_trapping_overflow): New functions.
19644 * tree-vect-loop.c: Include tree-eh.h.
19645 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19646 * tree-data-ref.c: Include tree-eh.h.
19647 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19649 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19651 PR rtl-optimization/84123
19652 * combine.c (change_zero_ext): Check if hard register satisfies
19653 can_change_dest_mode before calling gen_lowpart_SUBREG.
19655 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19658 * ira.c (ira_init_register_move_cost): Remove assert.
19660 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19662 PR rtl-optimization/84071
19663 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19664 * doc/tm.texi: Regenerate.
19666 2018-01-31 Richard Biener <rguenther@suse.de>
19668 PR tree-optimization/84132
19669 * tree-data-ref.c (analyze_miv_subscript): Properly
19670 check whether evolution_function_is_affine_multivariate_p
19671 before calling gcd_of_steps_may_divide_p.
19673 2018-01-31 Julia Koval <julia.koval@intel.com>
19676 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19677 * config/i386/i386.md (rdpid_rex64) New.
19678 (rdpid): Make 32bit only.
19680 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19683 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19684 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19686 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19689 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19691 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19693 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19695 PR rtl-optimization/84071
19696 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19697 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19699 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19701 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19702 (arc_attribute_table): Add 'aux' attribute.
19703 (arc_in_small_data_p): Consider aux like variables.
19704 (arc_is_aux_reg_p): New function.
19705 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19706 (arc_get_aux_arg): New function.
19707 (prepare_move_operands): Handle aux-register access.
19708 (arc_handle_aux_attribute): New function.
19709 * doc/extend.texi (ARC Variable attributes): Add subsection.
19711 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19713 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19714 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19715 (arc_attribute_table): Add 'uncached' attribute.
19716 (arc_print_operand): Print '.di' flag for uncached memory
19718 (arc_in_small_data_p): Do not consider for small data the uncached
19720 (arc_is_uncached_mem_p): New function.
19721 * config/arc/predicates.md (compact_store_memory_operand): Check
19722 for uncached memory accesses.
19723 (nonvol_nonimm_operand): Likewise.
19724 * doc/extend.texi (ARC Type Attribute): New subsection.
19726 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19729 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19730 falign-loops=): Add Optimization flag.
19732 2018-01-30 Jeff Law <law@redhat.com>
19735 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19736 INT_REGISTERS_SAVED. Check it prior to calling
19737 get_scratch_register_on_entry.
19738 (ix86_adjust_stack_and_probe): Similarly.
19739 (ix86_emit_probe_stack_range): Similarly.
19740 (ix86_expand_prologue): Corresponding changes.
19742 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19745 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19746 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19748 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19751 * lra-constraints.c (curr_insn_transform): Process AND in the
19754 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19756 PR rtl-optimization/83986
19757 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19758 dependence against last_pending_memory_flush in addition to
19759 pending_jump_insns.
19761 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19763 PR tree-optimization/81611
19764 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19767 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19770 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19773 2018-01-30 Richard Biener <rguenther@suse.de>
19774 Jakub Jelinek <jakub@redhat.com>
19776 PR tree-optimization/84111
19777 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19778 inner loops added during recursion, as they don't have up-to-date
19781 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19784 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19785 (can_inline_edge_by_limits_p): ... here.
19786 (can_early_inline_edge_p, check_callers,
19787 update_caller_keys, update_callee_keys, recursive_inlining,
19788 add_new_edges_to_heap, speculation_useful_p,
19789 inline_small_functions,
19790 inline_small_functions, flatten_function,
19791 inline_to_all_callers_1): Update.
19793 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19795 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19798 2018-01-30 Richard Biener <rguenther@suse.de>
19800 PR tree-optimization/83008
19801 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19802 invariant and constant vector uses in stmts when they need
19803 more than one stmt.
19805 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19808 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19809 * configure: Regenerate.
19811 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19813 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19815 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19816 Use gen_rtx_REG rather than gen_lowpart.
19818 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19820 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19821 rather than 0 when creating partial subregs.
19823 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19825 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19828 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19831 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19832 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19833 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19834 flags. This restores the settings used before the 2017-07-24.
19835 Turning off pre increment/decrement/modify allows IVOPTS to
19836 optimize DF/SF loops where the index is an int.
19838 2018-01-29 Richard Biener <rguenther@suse.de>
19839 Kelvin Nilsen <kelvin@gcc.gnu.org>
19842 * tree-vect-stmts.c (vectorizable_call): Don't call
19843 targetm.vectorize_builtin_md_vectorized_function if callee is
19846 2018-01-22 Carl Love <cel@us.ibm.com>
19848 * doc/extend.tex: Fix typo in second arg in
19849 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19851 2018-01-29 Richard Biener <rguenther@suse.de>
19853 PR tree-optimization/84086
19854 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19855 (flush_ssaname_freelist): When SSA names were released reset
19856 the SCEV hash table.
19858 2018-01-29 Richard Biener <rguenther@suse.de>
19860 PR tree-optimization/84057
19861 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19862 removed paths when removing edges.
19864 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19866 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19867 -mfunction-return=@var{choice}.
19869 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19871 PR diagnostic/84034
19872 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19873 Handle CR like TAB.
19874 (layout::print_source_line): Likewise.
19875 (test_get_line_width_without_trailing_whitespace): Add test cases.
19877 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19879 PR middle-end/84040
19880 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19883 2018-01-26 Jim Wilson <jimw@sifive.com>
19885 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19887 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19890 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19892 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19893 and CMP + SUB-immediate -> SUBS.
19895 2018-01-26 Martin Sebor <msebor@redhat.com>
19897 PR tree-optimization/83896
19898 * tree-ssa-strlen.c (get_string_len): Rename...
19899 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19900 Avoid assuming length is constant.
19901 (handle_char_store): Use HOST_WIDE_INT for string length.
19903 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19906 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19907 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19909 2018-01-26 Richard Biener <rguenther@suse.de>
19911 PR rtl-optimization/84003
19912 * dse.c (record_store): Only record redundant stores when
19913 the earlier store aliases at least all accesses the later one does.
19915 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19917 PR rtl-optimization/83985
19918 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19919 REG_CFA_RESTORE insns.
19920 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19921 REG_CFA_RESTORE insns here.
19924 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19925 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19927 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19929 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19930 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19931 (arc_init): Likewise.
19932 (arc_override_options): Likewise.
19933 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19935 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19937 * config/arc/arc.h (TARGET_DBNZ): Define.
19938 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19939 properly set the tune attribute.
19940 (dbnz): Use TARGET_DBNZ guard.
19941 * config/arc/arc.opt (mtune): Add core3 option.
19943 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19945 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19946 recognize new pic like addresses.
19947 (arc_delegitimize_address): Clean up.
19949 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19951 * config/arc/arc-arches.def: Option mrf16 valid for all
19953 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19954 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19955 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19956 * config/arc/arc-tables.opt: Regenerate.
19957 * config/arc/arc.c (arc_conditional_register_usage): Handle
19958 reduced register file case.
19959 (arc_file_start): Set must have build attributes.
19960 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19961 mrf16 option value.
19962 * config/arc/arc.opt (mrf16): Add new option.
19963 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19964 * config/arc/genmultilib.awk: Handle new mrf16 option.
19965 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19966 * config/arc/t-multilib: Regenerate.
19967 * doc/invoke.texi (ARC Options): Document mrf16 option.
19969 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19971 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19972 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19973 (arc_attribute_table): Add 'secure_call' attribute.
19974 (arc_print_operand): Print secure call operand.
19975 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19977 (arc_is_secure_call_p): New function. * config/arc/arc.md
19978 (call_i): Add support for sjli instruction.
19979 (call_value_i): Likewise.
19980 * config/arc/constraints.md (Csc): New constraint.
19982 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19983 John Eric Martin <John.Martin@emmicro-us.com>
19985 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19986 * config/arc/arc.c (_arc_jli_section): New struct.
19987 (arc_jli_section): New type.
19988 (rc_jli_sections): New static variable.
19989 (arc_handle_jli_attribute): New function.
19990 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19991 (arc_file_end): New function.
19992 (TARGET_ASM_FILE_END): Define.
19993 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19994 (arc_add_jli_section): New function.
19995 (jli_call_scan): Likewise.
19996 (arc_reorg): Call jli_call_scan.
19997 (arc_output_addsi): Remove 'S' from printing asm operand.
19998 (arc_is_jli_call_p): New function.
19999 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20001 (movhi_insn): Likewise.
20002 (movsi_insn): Likewise.
20003 (movsi_set_cc_insn): Likewise.
20004 (loadqi_update): Likewise.
20005 (load_zeroextendqisi_update): Likewise.
20006 (load_signextendqisi_update): Likewise.
20007 (loadhi_update): Likewise.
20008 (load_zeroextendhisi_update): Likewise.
20009 (load_signextendhisi_update): Likewise.
20010 (loadsi_update): Likewise.
20011 (loadsf_update): Likewise.
20012 (movsicc_insn): Likewise.
20013 (bset_insn): Likewise.
20014 (bxor_insn): Likewise.
20015 (bclr_insn): Likewise.
20016 (bmsk_insn): Likewise.
20017 (bicsi3_insn): Likewise.
20018 (cmpsi_cc_c_insn): Likewise.
20019 (movsi_ne): Likewise.
20020 (movsi_cond_exec): Likewise.
20021 (clrsbsi2): Likewise.
20022 (norm_f): Likewise.
20032 (call_i): Remove 'S' asm letter, add jli instruction.
20033 (call_value_i): Likewise.
20034 * config/arc/arc.op (mjli-always): New option.
20035 * config/arc/constraints.md (Cji): New constraint.
20036 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20038 (subsf3_fpx): Likewise.
20039 (mulsf3_fpx): Likewise.
20040 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20042 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20043 function attrbutes.
20044 * doc/invoke.texi (ARC): Document mjli-always option.
20046 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20048 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20049 avoid addition with 0 and use incw and decw where possible.
20051 2018-01-26 Richard Biener <rguenther@suse.de>
20053 PR tree-optimization/81082
20054 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20055 association if it requires casting to unsigned.
20056 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20057 from fold_plusminus_mult_expr to catch important cases late when
20058 range info is available.
20060 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20062 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20063 * configure.ac (hidden_linkonce): New test.
20064 * configure: Regenerate.
20065 * config.in: Regenerate.
20067 2018-01-26 Julia Koval <julia.koval@intel.com>
20069 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20070 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20071 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20072 _mm_mask_bitshuffle_epi64_mask): Fix type.
20073 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20074 USI_FTYPE_V4DI_V4DI_USI): Remove.
20075 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20076 __builtin_ia32_vpshufbitqmb256_mask,
20077 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20078 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20079 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20081 2018-01-26 Alan Modra <amodra@gmail.com>
20084 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20085 UNSPEC_VBPERMQ. Sort other unspecs.
20087 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20089 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20091 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20093 PR middle-end/83055
20094 * predict.c (drop_profile): Do not push/pop cfun; update also
20096 (handle_missing_profiles): Fix logic looking for zero profiles.
20098 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20100 PR middle-end/83977
20101 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20102 on functions with #pragma omp declare simd or functions with simd
20104 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20105 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20106 Remove trailing \n from warning_at calls.
20108 2018-01-25 Tom de Vries <tom@codesourcery.com>
20111 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20112 for neutered workers.
20114 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20117 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20118 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20120 2018-01-24 Jeff Law <law@redhat.com>
20123 * i386.c (get_probe_interval): Move to earlier point.
20124 (ix86_compute_frame_layout): If -fstack-clash-protection and
20125 the frame is larger than the probe interval, then use pushes
20126 to save registers rather than reg->mem moves.
20127 (ix86_expand_prologue): Remove conditional for int_registers_saved
20130 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20133 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20134 min/max for never referenced object.
20136 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20138 PR middle-end/83977
20139 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20141 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20142 attributes from DECL_ATTRIBUTES (decl) without affecting
20143 DECL_ATTRIBUTES (current_function_decl).
20144 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20145 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20147 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20149 PR tree-optimization/83979
20150 * fold-const.c (fold_comparison): Use constant_boolean_node
20151 instead of boolean_{true,false}_node.
20153 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20155 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20158 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20160 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20161 Simplify the clause that sets the length attribute.
20162 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20163 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20164 clause that sets the length attribute.
20165 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20167 2018-01-24 Tom de Vries <tom@codesourcery.com>
20170 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20171 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20172 Add strict parameter.
20173 (prevent_branch_around_nothing): Insert dummy insn between branch to
20174 label and label with no ptx insn inbetween.
20175 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20177 2018-01-24 Tom de Vries <tom@codesourcery.com>
20180 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20181 for neutered threads in warp.
20182 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20184 2018-01-24 Richard Biener <rguenther@suse.de>
20186 PR tree-optimization/83176
20187 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20190 2018-01-24 Richard Biener <rguenther@suse.de>
20192 PR tree-optimization/82819
20193 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20194 code generating pluses that are no-ops in the target precision.
20196 2018-01-24 Richard Biener <rguenther@suse.de>
20198 PR middle-end/84000
20199 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20201 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20203 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20204 to merge probabilities.
20205 * predict.c (probably_never_executed): Also mark as cold functions
20206 with global 0 profile and guessed local profile.
20207 * profile-count.c (profile_probability::combine_with_count): New
20209 * profile-count.h (profile_probability::operator*,
20210 profile_probability::operator*=, profile_probability::operator/,
20211 profile_probability::operator/=): Reduce precision to adjusted
20212 and set value to guessed on contradictory divisions.
20213 (profile_probability::combine_with_freq): Remove.
20214 (profile_probability::combine_wiht_count): Declare.
20215 (profile_count::force_nonzero):: Set to adjusted.
20216 (profile_count::probability_in):: Set quality to adjusted.
20217 * tree-ssa-tail-merge.c (replace_block_by): Use
20218 combine_with_count.
20220 2018-01-23 Andrew Waterman <andrew@sifive.com>
20221 Jim Wilson <jimw@sifive.com>
20223 * config/riscv/riscv.c (riscv_stack_boundary): New.
20224 (riscv_option_override): Set riscv_stack_boundary. Handle
20225 riscv_preferred_stack_boundary_arg.
20226 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20227 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20228 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20229 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20230 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20231 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20233 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20236 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20237 of struct ix86_frame.
20238 (ix86_expand_epilogue): Likewise. Add a local variable for
20239 the reg_save_offset field in struct ix86_frame.
20241 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20243 PR tree-optimization/82604
20244 * tree-loop-distribution.c (enum partition_kind): New enum item
20245 PKIND_PARTIAL_MEMSET.
20246 (partition_builtin_p): Support above new enum item.
20247 (generate_code_for_partition): Ditto.
20248 (compute_access_range): Differentiate cases that equality can be
20249 proven at all loops, the innermost loops or no loops.
20250 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20251 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20252 (finalize_partitions, distribute_loop): Don't fuse partition of
20253 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20254 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20255 parloop is enabled.
20257 2018-01-23 Martin Liska <mliska@suse.cz>
20259 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20260 order to ignore the predictor.
20261 (PRED_POLYMORPHIC_CALL): Likewise.
20262 (PRED_RECURSIVE_CALL): Likewise.
20264 2018-01-23 Martin Liska <mliska@suse.cz>
20266 * tree-profile.c (tree_profiling): Print function header to
20267 aware reader which function we are working on.
20268 * value-prof.c (gimple_find_values_to_profile): Do not print
20269 not interesting value histograms.
20271 2018-01-23 Martin Liska <mliska@suse.cz>
20273 * profile-count.h (enum profile_quality): Add
20274 profile_uninitialized as the first value. Do not number values
20275 as they are zero based.
20276 (profile_count::verify): Update sanity check.
20277 (profile_probability::verify): Likewise.
20279 2018-01-23 Nathan Sidwell <nathan@acm.org>
20281 * doc/invoke.texi (ffor-scope): Deprecate.
20283 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20285 PR tree-optimization/83510
20286 * domwalk.c (set_all_edges_as_executable): New function.
20287 (dom_walker::dom_walker): Convert bool param
20288 "skip_unreachable_blocks" to enum reachability. Move setup of
20289 edge flags to set_all_edges_as_executable and only do it when
20290 reachability is REACHABLE_BLOCKS.
20291 * domwalk.h (enum dom_walker::reachability): New enum.
20292 (dom_walker::dom_walker): Convert bool param
20293 "skip_unreachable_blocks" to enum reachability.
20294 (set_all_edges_as_executable): New decl.
20295 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20296 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20298 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20299 but converting true to REACHABLE_BLOCKS.
20300 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20302 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20303 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20304 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20306 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20307 if check_all_array_refs will be called.
20309 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20311 * tree.c (selftest::test_location_wrappers): Add more test
20314 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20316 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20317 (selftest::test_bit_in_range): Likewise.
20319 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20322 * doc/sourcebuild.texi (vect_float): Say that the selector
20323 only describes the situation when -funsafe-math-optimizations is on.
20324 (vect_float_strict): Document.
20326 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20328 PR tree-optimization/83965
20329 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20330 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20331 instead of checking only for a reduction.
20332 (vect_recog_widen_sum_pattern): Likewise.
20334 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20336 * predict.c (probably_never_executed): Only use precise profile info.
20337 (compute_function_frequency): Skip after inlining hack since we now
20338 have quality checking.
20340 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20342 * profile-count.h (profile_probability::very_unlikely,
20343 profile_probability::unlikely, profile_probability::even): Set
20344 precision to guessed.
20346 2018-01-23 Richard Biener <rguenther@suse.de>
20348 PR tree-optimization/83963
20349 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20350 Properly terminate dominator walk when crossing the exit edge not
20351 when visiting its source block.
20353 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20356 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20357 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20359 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20361 PR tree-optimization/83957
20362 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20363 semicolon after for body surrounded by braces.
20365 PR tree-optimization/83081
20366 * profile-count.h (profile_probability::split): New method.
20367 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20368 Use profile_probability::split.
20369 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20370 when splitting a single conditional jump into 2.
20372 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20374 PR tree-optimization/69452
20375 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20378 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20380 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20381 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20382 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20384 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20386 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20388 * config/rl78/rl78.md (movdi): New define_expand.
20389 * config/rl78/rl78.c (rl78_split_movdi): New function.
20391 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20394 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20396 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20397 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20398 128-bit to produce an UNSPEC move to get the double word with the
20399 signbit and then a shift directly to do signbit.
20400 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20401 implementation with a new version that just does either a direct
20402 move or a regular move. Move memory interface to separate insns.
20403 Move insns so they are next to the expander.
20404 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20405 with signbit move. Split big and little endian case.
20406 (signbit<mode>2_dm_mem_le): Likewise.
20407 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20408 (signbit<mode>2_dm2): Likewise.
20410 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20412 * config/rl78/rl78.md (anddi3): New define_expand.
20414 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20416 * config/rl78/rl78.md (umindi3): New define_expand.
20418 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20420 * config/rl78/rl78.md (smindi3): New define_expand.
20422 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20424 * config/rl78/rl78.md (smaxdi3): New define_expand.
20426 2018-01-22 Carl Love <cel@us.ibm.com>
20428 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20429 LVX_V1TI): Add macro expansion.
20430 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20431 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20432 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20433 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20434 Change check to determine if the instruction is a byte reversing
20435 entry. Fix typo in comment.
20436 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20437 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20438 Add def_builtin calls for new builtins.
20439 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20440 Add define_insn expansion.
20442 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20444 * config/rl78/rl78.md (umaxdi3): New define_expand.
20446 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20448 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20449 for non-QImode registers.
20451 2018-01-22 Richard Biener <rguenther@suse.de>
20453 PR tree-optimization/83963
20454 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20455 including the loop exit block.
20456 (scop_detection::merge_sese): Likewise.
20457 (scop_detection::add_scop): Do it here instead.
20459 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20461 * doc/sourcebuild.texi (arm_softfloat): Document.
20463 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20466 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20467 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20468 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20470 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20471 David Edelsohn <dje.gcc@gmail.com>
20474 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20475 Change "crset eq" to "crset 2".
20476 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20477 (*call_indirect_aix<mode>_nospec): Likewise.
20478 (*call_value_indirect_aix<mode>_nospec): Likewise.
20479 (*call_indirect_elfv2<mode>_nospec): Likewise.
20480 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20481 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20482 change assembly output from . to $.
20483 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20484 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20485 (*tablejump<mode>_internal1_nospec): Likewise.
20487 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20490 * config/sh/sh_optimize_sett_clrt.cc:
20491 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20493 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20495 PR tree-optimization/83940
20496 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20497 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20498 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20499 use it to pass back the definition type.
20500 (vect_check_store_rhs): Likewise rhs_dt_out.
20501 (vect_build_gather_load_calls): Add a mask_dt argument and use
20502 it instead of a call to vect_is_simple_use.
20503 (vectorizable_store): Update calls to vect_check_load_store_mask
20504 and vect_check_store_rhs. Use the dt returned by the latter instead
20505 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20506 instead of calls to vect_is_simple_use. Pass the scalar rather
20507 than the vector operand to vect_is_simple_use when handling
20508 second and subsequent copies of an rhs value.
20509 (vectorizable_load): Update calls to vect_check_load_store_mask
20510 and vect_build_gather_load_calls. Use the cached mask_dt and
20511 gs_info.offset_dt instead of calls to vect_is_simple_use.
20513 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20515 PR middle-end/83945
20516 * tree-emutls.c: Include gimplify.h.
20517 (lower_emutls_2): New function.
20518 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20519 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20520 it before further processing.
20523 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20524 UINTVAL (trueop1) instead of INTVAL (op1).
20526 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20530 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20531 INCOMING_FRAME_SP_OFFSET if not defined.
20532 (scan_trace): Add ENTRY argument. If true and
20533 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20534 emit a note to adjust the CFA offset.
20535 (create_cfi_notes): Adjust scan_trace callers.
20536 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20537 INCOMING_FRAME_SP_OFFSET in the CIE.
20538 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20539 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20541 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20542 * doc/tm.texi: Regenerated.
20544 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20546 PR rtl-optimization/83147
20547 * lra-constraints.c (remove_inheritance_pseudos): Use
20548 lra_substitute_pseudo_within_insn.
20550 2018-01-19 Tom de Vries <tom@codesourcery.com>
20551 Cesar Philippidis <cesar@codesourcery.com>
20554 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20556 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20559 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20560 spaces for function labels.
20562 2018-01-19 Martin Liska <mliska@suse.cz>
20564 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20565 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20566 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20567 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20568 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20569 (PRED_CONST_RETURN): Change from 69 to 65.
20570 (PRED_NULL_RETURN): Change from 91 to 71.
20571 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20572 (PRED_LOOP_GUARD): Change from 66 to 73.
20574 2018-01-19 Martin Liska <mliska@suse.cz>
20576 * predict.c (predict_insn_def): Add new assert.
20577 (struct branch_predictor): Change type to signed integer.
20578 (test_prediction_value_range): Amend test to cover
20579 PROB_UNINITIALIZED.
20580 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20581 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20582 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20583 (PRED_LOOP_IV_COMPARE): Likewise.
20584 * predict.h (PROB_UNINITIALIZED): Define new constant.
20586 2018-01-19 Martin Liska <mliska@suse.cz>
20588 * predict.c (dump_prediction): Add new format for
20589 analyze_brprob.py script which is enabled with -details
20591 * profile-count.h (precise_p): New function.
20593 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20595 PR tree-optimization/83922
20596 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20597 there are no statements that need masking.
20598 (vect_active_double_reduction_p): New function.
20599 (vect_analyze_loop_operations): Use it when handling phis that
20600 are not in the loop header.
20602 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20604 PR tree-optimization/83914
20605 * tree-vect-loop.c (vectorizable_induction): Don't convert
20606 init_expr or apply the peeling adjustment for inductions
20607 that are nested within the vectorized loop.
20609 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20611 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20614 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20618 * function.h (gimplify_parameters): Add gimple_seq * argument.
20619 * function.c: Include gimple.h and options.h.
20620 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20621 for the added local temporaries if needed.
20622 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20623 if there are any parameter cleanups, wrap whole body into a
20624 try/finally with the cleanups.
20626 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20629 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20630 Use GET_MODE_CLASS for scalar floating point.
20632 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20636 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20637 Fix call of call_cgraph_insertion_hooks.
20639 2018-01-18 Martin Sebor <msebor@redhat.com>
20641 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20643 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20646 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20649 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20652 * common.opt: (-ffile-prefix-map): New option.
20653 * opts.c (common_handle_option): Defer it.
20654 * opts-global.c (handle_common_deferred_options): Handle it.
20655 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20656 * file-prefix-map.h: New file.
20657 (remap_debug_filename, add_debug_prefix_map): ...here.
20658 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20659 * final.c (debug_prefix_map, add_debug_prefix_map
20660 remap_debug_filename): Move to...
20661 * file-prefix-map.c: New file.
20662 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20663 generalize, get rid of alloca(), use strrchr() instead of strchr().
20664 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20665 Implement in terms of add_prefix_map().
20666 (remap_macro_filename, remap_debug_filename): Implement in term of
20668 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20669 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20670 * dbxout.c: Include file-prefix-map.h.
20671 * varasm.c: Likewise.
20672 * vmsdbgout.c: Likewise.
20673 * xcoffout.c: Likewise.
20674 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20675 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20676 * doc/invoke.texi (-ffile-prefix-map): Document.
20677 (-fdebug-prefix-map): Update description.
20679 2018-01-18 Martin Liska <mliska@suse.cz>
20681 * config/i386/i386.c (indirect_thunk_name): Document that also
20683 (output_indirect_thunk): Document why both instructions
20684 (pause and lfence) are generated.
20686 2018-01-18 Richard Biener <rguenther@suse.de>
20688 PR tree-optimization/83887
20689 * graphite-scop-detection.c
20690 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20691 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20692 (scop_detection::merge_sese): Re-implement with a flood-fill
20693 algorithm that properly finds a SESE region if it exists.
20695 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20698 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20699 pointer_diff optimizations use view_convert instead of convert.
20701 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20703 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20704 Generate different code for -mno-speculate-indirect-jumps.
20705 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20706 (*call_indirect_aix<mode>): Disable for
20707 -mno-speculate-indirect-jumps.
20708 (*call_indirect_aix<mode>_nospec): New define_insn.
20709 (*call_value_indirect_aix<mode>): Disable for
20710 -mno-speculate-indirect-jumps.
20711 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20712 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20713 -mno-speculate-indirect-jumps.
20714 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20716 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20718 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20719 long double type, set the flags for noting the default long double
20720 type, even if we don't pass or return a long double type.
20722 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20725 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20728 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20730 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20731 support for merge[hl].
20732 (fold_mergehl_helper): New helper function.
20733 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20734 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20735 (altivec_vmrglw_direct): Add xxmrglw insn.
20737 2018-01-17 Andrew Waterman <andrew@sifive.com>
20739 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20740 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20742 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20745 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20746 call the lto_location_cache before reading the
20747 DECL_SOURCE_LOCATION of the types.
20749 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20750 Richard Sandiford <richard.sandiford@linaro.org>
20752 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20753 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20754 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20755 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20756 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20758 * config/aarch64/constraints.md (aarch64_movti_operand):
20760 * config/aarch64/predicates.md (Uti): Add new constraint.
20762 2018-01-17 Carl Love <cel@us.ibm.com>
20764 * config/rs6000/vsx.md (define_expand xl_len_r,
20765 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20766 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20768 (define_expand, define_insn): Move the shift left from the
20769 define_insn to the define_expand for lxvl and stxvl instructions.
20770 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20771 and XL_LEN_R definitions to PURE.
20773 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20775 * config/i386/i386.c (indirect_thunk_name): Declare regno
20776 as unsigned int. Compare regno with INVALID_REGNUM.
20777 (output_indirect_thunk): Ditto.
20778 (output_indirect_thunk_function): Ditto.
20779 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20780 in the call to output_indirect_thunk_function.
20782 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20784 PR middle-end/83884
20785 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20786 rather than the size of inner_type to determine the stack slot size
20787 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20789 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20792 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20795 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20797 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20798 endian Linux systems to optionally enable multilibs for selecting
20799 the long double type if the user configured an explicit type.
20800 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20801 have no long double multilibs if not defined.
20802 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20803 warn if the user used -mabi={ieee,ibm}longdouble and we built
20804 multilibs for long double.
20805 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20806 appropriate multilib option.
20807 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20809 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20810 for building long double multilibs.
20811 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20813 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20815 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20818 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20820 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20823 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20826 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20829 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20831 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20832 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20834 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20836 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20837 different rtl trees depending on TARGET_64BIT.
20838 (rs6000_gen_lvx): Likewise.
20840 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20842 * config/visium/visium.md (nop): Tweak comment.
20843 (hazard_nop): Likewise.
20845 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20847 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20848 -mspeculate-indirect-jumps.
20849 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20850 for -mno-speculate-indirect-jumps.
20851 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20852 (*call_value_indirect_elfv2<mode>): Disable for
20853 -mno-speculate-indirect-jumps.
20854 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20855 (indirect_jump): Emit different RTL for
20856 -mno-speculate-indirect-jumps.
20857 (*indirect_jump<mode>): Disable for
20858 -mno-speculate-indirect-jumps.
20859 (*indirect_jump<mode>_nospec): New define_insn.
20860 (tablejump): Emit different RTL for
20861 -mno-speculate-indirect-jumps.
20862 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20863 (tablejumpsi_nospec): New define_expand.
20864 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20865 (tablejumpdi_nospec): New define_expand.
20866 (*tablejump<mode>_internal1): Disable for
20867 -mno-speculate-indirect-jumps.
20868 (*tablejump<mode>_internal1_nospec): New define_insn.
20869 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20872 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20874 * caller-save.c (insert_save): Drop unnecessary parameter. All
20877 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20878 Richard Biener <rguenth@suse.de>
20881 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20882 return early, inline manually is_gimple_sizepos. Make sure if we
20883 call gimplify_expr we don't end up with a gimple constant.
20884 * tree.c (variably_modified_type_p): Don't return true for
20885 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20886 * gimplify.h (is_gimple_sizepos): Remove.
20888 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20890 PR tree-optimization/83857
20891 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20892 vectorizable_live_operation for pure SLP statements.
20893 (vectorizable_live_operation): Handle PHIs.
20895 2018-01-16 Richard Biener <rguenther@suse.de>
20897 PR tree-optimization/83867
20898 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20899 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20901 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20904 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20905 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20906 If off is not INTEGER_CST, issue a may not be aligned warning
20907 rather than isn't aligned. Use isn%'t rather than isn't.
20908 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20910 <case MULT_EXPR>: Improve the case when bottom and one of the
20911 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20912 operand, in that case check if the other operand is multiple of
20913 bottom divided by the INTEGER_CST operand.
20915 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20918 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20919 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20920 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20921 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20922 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20923 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20924 (pa_function_arg_size): New function.
20926 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20928 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20929 in a separate statement.
20931 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20933 PR tree-optimization/83847
20934 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20935 group gathers and scatters.
20937 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20939 PR rtl-optimization/86620
20940 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20942 PR rtl-optimization/83213
20943 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20944 to last if both are JUMP_INSNs.
20946 PR tree-optimization/83843
20947 * gimple-ssa-store-merging.c
20948 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20949 store_immediate_info for bswap/nop orig_stores.
20951 2018-01-15 Andrew Waterman <andrew@sifive.com>
20953 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20955 <UDIV>: Increase cost if !TARGET_DIV.
20957 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20959 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20960 (define_attr "cr_logical_3op"): New.
20961 (cceq_ior_compare): Adjust.
20962 (cceq_ior_compare_complement): Adjust.
20963 (*cceq_rev_compare): Adjust.
20964 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20965 (is_cracked_insn): Adjust.
20966 (insn_must_be_first_in_group): Adjust.
20967 * config/rs6000/40x.md: Adjust.
20968 * config/rs6000/440.md: Adjust.
20969 * config/rs6000/476.md: Adjust.
20970 * config/rs6000/601.md: Adjust.
20971 * config/rs6000/603.md: Adjust.
20972 * config/rs6000/6xx.md: Adjust.
20973 * config/rs6000/7450.md: Adjust.
20974 * config/rs6000/7xx.md: Adjust.
20975 * config/rs6000/8540.md: Adjust.
20976 * config/rs6000/cell.md: Adjust.
20977 * config/rs6000/e300c2c3.md: Adjust.
20978 * config/rs6000/e500mc.md: Adjust.
20979 * config/rs6000/e500mc64.md: Adjust.
20980 * config/rs6000/e5500.md: Adjust.
20981 * config/rs6000/e6500.md: Adjust.
20982 * config/rs6000/mpc.md: Adjust.
20983 * config/rs6000/power4.md: Adjust.
20984 * config/rs6000/power5.md: Adjust.
20985 * config/rs6000/power6.md: Adjust.
20986 * config/rs6000/power7.md: Adjust.
20987 * config/rs6000/power8.md: Adjust.
20988 * config/rs6000/power9.md: Adjust.
20989 * config/rs6000/rs64.md: Adjust.
20990 * config/rs6000/titan.md: Adjust.
20992 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20994 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20995 ix86_indirect_branch_register logic.
20997 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20999 * config/i386/constraints.md (Bs): Update
21000 ix86_indirect_branch_register check. Don't check
21001 ix86_indirect_branch_register with GOT_memory_operand.
21003 * config/i386/predicates.md (GOT_memory_operand): Don't check
21004 ix86_indirect_branch_register here.
21005 (GOT32_symbol_operand): Likewise.
21007 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21009 * config/i386/predicates.md (constant_call_address_operand):
21010 Rewrite ix86_indirect_branch_register logic.
21011 (sibcall_insn_operand): Likewise.
21013 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21015 * config/i386/constraints.md (Bs): Replace
21016 ix86_indirect_branch_thunk_register with
21017 ix86_indirect_branch_register.
21019 * config/i386/i386.md (indirect_jump): Likewise.
21020 (tablejump): Likewise.
21021 (*sibcall_memory): Likewise.
21022 (*sibcall_value_memory): Likewise.
21023 Peepholes of indirect call and jump via memory: Likewise.
21024 * config/i386/i386.opt: Likewise.
21025 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21026 (GOT_memory_operand): Likewise.
21027 (call_insn_operand): Likewise.
21028 (sibcall_insn_operand): Likewise.
21029 (GOT32_symbol_operand): Likewise.
21031 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21033 PR middle-end/83837
21034 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21035 type rather than type addr's type points to.
21036 (expand_omp_atomic_mutex): Likewise.
21037 (expand_omp_atomic): Likewise.
21039 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21042 * config/i386/i386.c (output_indirect_thunk_function): Use
21043 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21044 for __x86_return_thunk.
21046 2018-01-15 Richard Biener <rguenther@suse.de>
21048 PR middle-end/83850
21049 * expmed.c (extract_bit_field_1): Fix typo.
21051 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21054 * config/arm/iterators.md (VF): New mode iterator.
21055 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21056 Remove integer-related logic from pattern.
21057 (neon_vabd<mode>_3): Likewise.
21059 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21061 PR middle-end/82694
21062 * common.opt (fstrict-overflow): No longer an alias.
21063 (fwrapv-pointer): New option.
21064 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21065 also for pointer types based on flag_wrapv_pointer.
21066 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21067 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21068 opts->x_flag_wrapv got set.
21069 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21070 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21071 POINTER_TYPE_OVERFLOW_UNDEFINED.
21072 * match.pd: Likewise in address comparison pattern.
21073 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21075 2018-01-15 Richard Biener <rguenther@suse.de>
21078 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21079 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21080 Reset type names to their identifier if their TYPE_DECL doesn't
21081 have linkage (and thus is used for ODR and devirt).
21082 (save_debug_info_for_decl): Remove.
21083 (save_debug_info_for_type): Likewise.
21084 (add_tree_to_fld_list): Adjust.
21085 * tree-pretty-print.c (dump_generic_node): Make dumping of
21086 type names more robust.
21088 2018-01-15 Richard Biener <rguenther@suse.de>
21090 * BASE-VER: Bump to 8.0.1.
21092 2018-01-14 Martin Sebor <msebor@redhat.com>
21095 * builtins.c (check_access): Avoid warning when the no-warning bit
21098 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21100 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21101 * ira-color (allocno_hard_regs_compare): Likewise.
21103 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21106 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21107 Use .pushsection/.popsection.
21109 2018-01-14 Martin Sebor <msebor@redhat.com>
21112 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21114 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21116 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21117 entry from extra_headers.
21118 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21119 extra_headers, make the list bitwise identical to the i?86-*-* one.
21121 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21123 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21124 -mcmodel=large with -mindirect-branch=thunk,
21125 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21126 -mfunction-return=thunk-extern.
21127 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21128 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21129 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21131 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21133 * config/i386/i386.c (print_reg): Print the name of the full
21134 integer register without '%'.
21135 (ix86_print_operand): Handle 'V'.
21136 * doc/extend.texi: Document 'V' modifier.
21138 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21140 * config/i386/constraints.md (Bs): Disallow memory operand for
21141 -mindirect-branch-register.
21143 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21144 (GOT_memory_operand): Likewise.
21145 (call_insn_operand): Likewise.
21146 (sibcall_insn_operand): Likewise.
21147 (GOT32_symbol_operand): Likewise.
21148 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21149 for -mindirect-branch-register.
21150 (tablejump): Likewise.
21151 (*sibcall_memory): Likewise.
21152 (*sibcall_value_memory): Likewise.
21153 Disallow peepholes of indirect call and jump via memory for
21154 -mindirect-branch-register.
21155 (*call_pop): Replace m with Bw.
21156 (*call_value_pop): Likewise.
21157 (*sibcall_pop_memory): Replace m with Bs.
21158 * config/i386/i386.opt (mindirect-branch-register): New option.
21159 * doc/invoke.texi: Document -mindirect-branch-register option.
21161 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21163 * config/i386/i386-protos.h (ix86_output_function_return): New.
21164 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21165 set function_return_type.
21166 (indirect_thunk_name): Add ret_p to indicate thunk for function
21168 (output_indirect_thunk_function): Pass false to
21169 indirect_thunk_name.
21170 (ix86_output_indirect_branch_via_reg): Likewise.
21171 (ix86_output_indirect_branch_via_push): Likewise.
21172 (output_indirect_thunk_function): Create alias for function
21173 return thunk if regno < 0.
21174 (ix86_output_function_return): New function.
21175 (ix86_handle_fndecl_attribute): Handle function_return.
21176 (ix86_attribute_table): Add function_return.
21177 * config/i386/i386.h (machine_function): Add
21178 function_return_type.
21179 * config/i386/i386.md (simple_return_internal): Use
21180 ix86_output_function_return.
21181 (simple_return_internal_long): Likewise.
21182 * config/i386/i386.opt (mfunction-return=): New option.
21183 (indirect_branch): Mention -mfunction-return=.
21184 * doc/extend.texi: Document function_return function attribute.
21185 * doc/invoke.texi: Document -mfunction-return= option.
21187 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21189 * config/i386/i386-opts.h (indirect_branch): New.
21190 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21191 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21192 with local indirect jump when converting indirect call and jump.
21193 (ix86_set_indirect_branch_type): New.
21194 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21195 (indirectlabelno): New.
21196 (indirect_thunk_needed): Likewise.
21197 (indirect_thunk_bnd_needed): Likewise.
21198 (indirect_thunks_used): Likewise.
21199 (indirect_thunks_bnd_used): Likewise.
21200 (INDIRECT_LABEL): Likewise.
21201 (indirect_thunk_name): Likewise.
21202 (output_indirect_thunk): Likewise.
21203 (output_indirect_thunk_function): Likewise.
21204 (ix86_output_indirect_branch_via_reg): Likewise.
21205 (ix86_output_indirect_branch_via_push): Likewise.
21206 (ix86_output_indirect_branch): Likewise.
21207 (ix86_output_indirect_jmp): Likewise.
21208 (ix86_code_end): Call output_indirect_thunk_function if needed.
21209 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21211 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21212 (ix86_attribute_table): Add indirect_branch.
21213 * config/i386/i386.h (machine_function): Add indirect_branch_type
21214 and has_local_indirect_jump.
21215 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21217 (tablejump): Likewise.
21218 (*indirect_jump): Use ix86_output_indirect_jmp.
21219 (*tablejump_1): Likewise.
21220 (simple_return_indirect_internal): Likewise.
21221 * config/i386/i386.opt (mindirect-branch=): New option.
21222 (indirect_branch): New.
21225 (thunk-inline): Likewise.
21226 (thunk-extern): Likewise.
21227 * doc/extend.texi: Document indirect_branch function attribute.
21228 * doc/invoke.texi: Document -mindirect-branch= option.
21230 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21233 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21235 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21237 * ipa-inline.c (want_inline_small_function_p): Return false if
21238 inlining has already failed with CIF_FINAL_ERROR.
21239 (update_caller_keys): Call want_inline_small_function_p before
21241 (update_callee_keys): Likewise.
21243 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21245 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21247 (rs6000_quadword_masked_address_p): Likewise.
21248 (quad_aligned_load_p): Likewise.
21249 (quad_aligned_store_p): Likewise.
21250 (const_load_sequence_p): Add comment to describe the outer-most loop.
21251 (mimic_memory_attributes_and_flags): New function.
21252 (rs6000_gen_stvx): Likewise.
21253 (replace_swapped_aligned_store): Likewise.
21254 (rs6000_gen_lvx): Likewise.
21255 (replace_swapped_aligned_load): Likewise.
21256 (replace_swapped_load_constant): Capitalize argument name in
21257 comment describing this function.
21258 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21259 and stores that access quad-word aligned addresses and replace
21260 with stvx or lvx instructions when appropriate.
21261 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21262 New function prototype.
21263 (rs6000_quadword_masked_address_p): Likewise.
21264 (rs6000_gen_lvx): Likewise.
21265 (rs6000_gen_stvx): Likewise.
21266 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21267 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21268 when memory address is aligned.
21269 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21270 this split to select lvx instruction when memory address is aligned.
21271 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21272 instruction when memory address is aligned.
21273 (*vsx_le_perm_load_v16qi): Likewise.
21274 (four unnamed splitters): Modify to select the stvx instruction
21275 when memory is aligned.
21277 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21279 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21280 which appears in the queue multiple times.
21282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21283 Alan Hayward <alan.hayward@arm.com>
21284 David Sherwood <david.sherwood@arm.com>
21286 * tree-vectorizer.h (vec_lower_bound): New structure.
21287 (_loop_vec_info): Add check_nonzero and lower_bounds.
21288 (LOOP_VINFO_CHECK_NONZERO): New macro.
21289 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21290 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21291 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21292 fields. Make seg_len the distance travelled, not including the
21294 (dr_direction_indicator): Declare.
21295 (dr_zero_step_indicator): Likewise.
21296 (dr_known_forward_stride_p): Likewise.
21297 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21299 (runtime_alias_check_p): Allow runtime alias checks with
21301 (operator ==): Compare access_size and align.
21302 (prune_runtime_alias_test_list): Rework for new distinction between
21303 the access_size and seg_len.
21304 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21306 (get_segment_min_max): New function.
21307 (create_intersect_range_checks): Use it.
21308 (dr_step_indicator): New function.
21309 (dr_direction_indicator): Likewise.
21310 (dr_zero_step_indicator): Likewise.
21311 (dr_known_forward_stride_p): Likewise.
21312 * tree-loop-distribution.c (data_ref_segment_size): Return
21313 DR_STEP * (niters - 1).
21314 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21316 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21317 (vect_preserves_scalar_order_p): New function, split out from...
21318 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21319 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21320 (vect_vfa_access_size): New function.
21321 (vect_vfa_align): Likewise.
21322 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21323 (dump_lower_bound): New function.
21324 (vect_check_lower_bound): Likewise.
21325 (vect_small_gap_p): Likewise.
21326 (vectorizable_with_step_bound_p): Likewise.
21327 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21328 depencies if the vectorization factor is 1. Convert the checks
21329 for nonzero steps into checks on the bounds of DR_STEP. Try using
21330 a bunds check for variable steps if the minimum required step is
21331 relatively small. Update calls to the dr_with_seg_len
21332 constructor and to vect_compile_time_alias.
21333 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21335 (vect_loop_versioning): Call it.
21336 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21338 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21340 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21341 Alan Hayward <alan.hayward@arm.com>
21342 David Sherwood <david.sherwood@arm.com>
21344 * doc/sourcebuild.texi (vect_scatter_store): Document.
21345 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21347 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21349 * genopinit.c (main): Add supports_vec_scatter_store and
21350 supports_vec_scatter_store_cached to target_optabs.
21351 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21352 IFN_MASK_SCATTER_STORE.
21353 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21355 * internal-fn.h (internal_store_fn_p): Declare.
21356 (internal_fn_stored_value_index): Likewise.
21357 * internal-fn.c (scatter_store_direct): New macro.
21358 (expand_scatter_store_optab_fn): New function.
21359 (direct_scatter_store_optab_supported_p): New macro.
21360 (internal_store_fn_p): New function.
21361 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21362 IFN_MASK_SCATTER_STORE.
21363 (internal_fn_mask_index): Likewise.
21364 (internal_fn_stored_value_index): New function.
21365 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21366 for scatter stores.
21367 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21368 * optabs-query.c (supports_vec_scatter_store_p): New function.
21369 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21370 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21371 true for scatter stores.
21372 (vect_gather_scatter_fn_p): Handle scatter stores too.
21373 (vect_check_gather_scatter): Consider using scatter stores if
21374 supports_vec_scatter_store_p.
21375 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21376 scatter stores too.
21377 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21378 internal_fn_stored_value_index.
21379 (check_load_store_masking): Handle scatter stores too.
21380 (vect_get_store_rhs): Make public.
21381 (vectorizable_call): Use internal_store_fn_p.
21382 (vectorizable_store): Handle scatter store internal functions.
21383 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21384 when deciding whether the end of the group has been reached.
21385 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21386 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21387 (mask_scatter_store<mode>): New insns.
21389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21390 Alan Hayward <alan.hayward@arm.com>
21391 David Sherwood <david.sherwood@arm.com>
21393 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21394 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21395 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21397 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21398 Use vect_truncate_gather_scatter_offset if we can't treat the
21399 operation as a normal gather load or scatter store.
21400 (get_group_load_store_type): Take the gather_scatter_info
21401 as argument. Try using a gather load or scatter store for
21402 single-element groups.
21403 (get_load_store_type): Update calls to get_group_load_store_type
21404 and vect_use_strided_gather_scatters_p.
21406 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21407 Alan Hayward <alan.hayward@arm.com>
21408 David Sherwood <david.sherwood@arm.com>
21410 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21411 optional tree argument.
21412 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21414 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21415 but continue to use the current value as a fallback.
21416 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21417 to compare the updates.
21418 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21419 (get_load_store_type): Use it when handling a strided access.
21420 (vect_get_strided_load_store_ops): New function.
21421 (vect_get_data_ptr_increment): Likewise.
21422 (vectorizable_load): Handle strided gather loads. Always pass
21423 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21425 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21426 Alan Hayward <alan.hayward@arm.com>
21427 David Sherwood <david.sherwood@arm.com>
21429 * doc/md.texi (gather_load@var{m}): Document.
21430 (mask_gather_load@var{m}): Likewise.
21431 * genopinit.c (main): Add supports_vec_gather_load and
21432 supports_vec_gather_load_cached to target_optabs.
21433 * optabs-tree.c (init_tree_optimization_optabs): Use
21434 ggc_cleared_alloc to allocate target_optabs.
21435 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21436 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21438 * internal-fn.h (internal_load_fn_p): Declare.
21439 (internal_gather_scatter_fn_p): Likewise.
21440 (internal_fn_mask_index): Likewise.
21441 (internal_gather_scatter_fn_supported_p): Likewise.
21442 * internal-fn.c (gather_load_direct): New macro.
21443 (expand_gather_load_optab_fn): New function.
21444 (direct_gather_load_optab_supported_p): New macro.
21445 (direct_internal_fn_optab): New function.
21446 (internal_load_fn_p): Likewise.
21447 (internal_gather_scatter_fn_p): Likewise.
21448 (internal_fn_mask_index): Likewise.
21449 (internal_gather_scatter_fn_supported_p): Likewise.
21450 * optabs-query.c (supports_at_least_one_mode_p): New function.
21451 (supports_vec_gather_load_p): Likewise.
21452 * optabs-query.h (supports_vec_gather_load_p): Declare.
21453 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21454 and memory_type field.
21455 (NUM_PATTERNS): Bump to 15.
21456 * tree-vect-data-refs.c: Include internal-fn.h.
21457 (vect_gather_scatter_fn_p): New function.
21458 (vect_describe_gather_scatter_call): Likewise.
21459 (vect_check_gather_scatter): Try using internal functions for
21460 gather loads. Recognize existing calls to a gather load function.
21461 (vect_analyze_data_refs): Consider using gather loads if
21462 supports_vec_gather_load_p.
21463 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21464 (vect_get_gather_scatter_offset_type): Likewise.
21465 (vect_convert_mask_for_vectype): Likewise.
21466 (vect_add_conversion_to_patterm): Likewise.
21467 (vect_try_gather_scatter_pattern): Likewise.
21468 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21469 (vect_vect_recog_func_ptrs): Add it.
21470 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21471 internal_fn_mask_index and internal_gather_scatter_fn_p.
21472 (check_load_store_masking): Take the gather_scatter_info as an
21473 argument and handle gather loads.
21474 (vect_get_gather_scatter_ops): New function.
21475 (vectorizable_call): Check internal_load_fn_p.
21476 (vectorizable_load): Likewise. Handle gather load internal
21478 (vectorizable_store): Update call to check_load_store_masking.
21479 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21480 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21481 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21482 (aarch64_gather_scale_operand_d): New predicates.
21483 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21484 (mask_gather_load<mode>): New insns.
21486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21487 Alan Hayward <alan.hayward@arm.com>
21488 David Sherwood <david.sherwood@arm.com>
21490 * optabs.def (fold_left_plus_optab): New optab.
21491 * doc/md.texi (fold_left_plus_@var{m}): Document.
21492 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21493 * internal-fn.c (fold_left_direct): Define.
21494 (expand_fold_left_optab_fn): Likewise.
21495 (direct_fold_left_optab_supported_p): Likewise.
21496 * fold-const-call.c (fold_const_fold_left): New function.
21497 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21498 * tree-parloops.c (valid_reduction_p): New function.
21499 (gather_scalar_reductions): Use it.
21500 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21501 (vect_finish_replace_stmt): Declare.
21502 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21503 (needs_fold_left_reduction_p): New function, split out from...
21504 (vect_is_simple_reduction): ...here. Accept reductions that
21505 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21506 (vect_force_simple_reduction): Also store the reduction type in
21507 the assignment's STMT_VINFO_REDUC_TYPE.
21508 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21509 (merge_with_identity): New function.
21510 (vect_expand_fold_left): Likewise.
21511 (vectorize_fold_left_reduction): Likewise.
21512 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21513 scalar phi in place for it. Check for target support and reject
21514 cases that would reassociate the operation. Defer the transform
21515 phase to vectorize_fold_left_reduction.
21516 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21517 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21518 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21522 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21523 call to ifc_temp_var.
21525 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21526 Alan Hayward <alan.hayward@arm.com>
21527 David Sherwood <david.sherwood@arm.com>
21529 * target.def (legitimize_address_displacement): Take the original
21530 offset as a poly_int.
21531 * targhooks.h (default_legitimize_address_displacement): Update
21533 * targhooks.c (default_legitimize_address_displacement): Likewise.
21534 * doc/tm.texi: Regenerate.
21535 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21536 as an argument, moving assert of ad->disp == ad->disp_term to...
21537 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21538 Try calling targetm.legitimize_address_displacement before expanding
21539 the address rather than afterwards, and adjust for the new interface.
21540 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21541 Match the new hook interface. Handle SVE addresses.
21542 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21543 new hook interface.
21545 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21547 * Makefile.in (OBJS): Add early-remat.o.
21548 * target.def (select_early_remat_modes): New hook.
21549 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21550 * doc/tm.texi: Regenerate.
21551 * targhooks.h (default_select_early_remat_modes): Declare.
21552 * targhooks.c (default_select_early_remat_modes): New function.
21553 * timevar.def (TV_EARLY_REMAT): New timevar.
21554 * passes.def (pass_early_remat): New pass.
21555 * tree-pass.h (make_pass_early_remat): Declare.
21556 * early-remat.c: New file.
21557 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21559 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21561 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21562 Alan Hayward <alan.hayward@arm.com>
21563 David Sherwood <david.sherwood@arm.com>
21565 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21566 vfm1 with a bound_epilog parameter.
21567 (vect_do_peeling): Update calls accordingly, and move the prologue
21568 call earlier in the function. Treat the base bound_epilog as 0 for
21569 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21570 this base when peeling for gaps.
21571 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21572 with fully-masked loops.
21573 (vect_estimate_min_profitable_iters): Handle the single peeled
21574 iteration in that case.
21576 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21577 Alan Hayward <alan.hayward@arm.com>
21578 David Sherwood <david.sherwood@arm.com>
21580 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21581 single-element interleaving even if the size is not a power of 2.
21582 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21583 accesses for single-element interleaving if the group size is
21586 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21587 Alan Hayward <alan.hayward@arm.com>
21588 David Sherwood <david.sherwood@arm.com>
21590 * doc/md.texi (fold_extract_last_@var{m}): Document.
21591 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21592 * optabs.def (fold_extract_last_optab): New optab.
21593 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21594 * internal-fn.c (fold_extract_direct): New macro.
21595 (expand_fold_extract_optab_fn): Likewise.
21596 (direct_fold_extract_optab_supported_p): Likewise.
21597 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21598 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21599 EXTRACT_LAST_REDUCTION.
21600 (get_initial_def_for_reduction): Do not create an initial vector
21601 for EXTRACT_LAST_REDUCTION reductions.
21602 (vectorizable_reduction): Leave the scalar phi in place for
21603 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21604 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21605 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21606 transform phase to vectorizable_condition.
21607 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21609 (vect_finish_stmt_generation): ...here.
21610 (vect_finish_replace_stmt): New function.
21611 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21612 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21614 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21616 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21617 Alan Hayward <alan.hayward@arm.com>
21618 David Sherwood <david.sherwood@arm.com>
21620 * doc/md.texi (extract_last_@var{m}): Document.
21621 * optabs.def (extract_last_optab): New optab.
21622 * internal-fn.def (EXTRACT_LAST): New internal function.
21623 * internal-fn.c (cond_unary_direct): New macro.
21624 (expand_cond_unary_optab_fn): Likewise.
21625 (direct_cond_unary_optab_supported_p): Likewise.
21626 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21627 loops using EXTRACT_LAST.
21628 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21629 (extract_last_<mode>): ...this optab.
21630 (vec_extract<mode><Vel>): Update accordingly.
21632 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21633 Alan Hayward <alan.hayward@arm.com>
21634 David Sherwood <david.sherwood@arm.com>
21636 * target.def (empty_mask_is_expensive): New hook.
21637 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21638 * doc/tm.texi: Regenerate.
21639 * targhooks.h (default_empty_mask_is_expensive): Declare.
21640 * targhooks.c (default_empty_mask_is_expensive): New function.
21641 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21642 if the target says that empty masks are expensive.
21643 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21645 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21648 Alan Hayward <alan.hayward@arm.com>
21649 David Sherwood <david.sherwood@arm.com>
21651 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21652 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21653 (vect_use_loop_mask_for_alignment_p): New function.
21654 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21655 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21656 niters_skip argument. Make sure that the first niters_skip elements
21657 of the first iteration are inactive.
21658 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21659 Update call to vect_set_loop_masks_directly.
21660 (get_misalign_in_elems): New function, split out from...
21661 (vect_gen_prolog_loop_niters): ...here.
21662 (vect_update_init_of_dr): Take a code argument that specifies whether
21663 the adjustment should be added or subtracted.
21664 (vect_update_init_of_drs): Likewise.
21665 (vect_prepare_for_masked_peels): New function.
21666 (vect_do_peeling): Skip prologue peeling if we're using a mask
21667 instead. Update call to vect_update_inits_of_drs.
21668 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21670 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21671 alignment. Do not include the number of peeled iterations in
21672 the minimum threshold in that case.
21673 (vectorizable_induction): Adjust the start value down by
21674 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21675 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21676 Take the number of skipped iterations into account when calculating
21678 * tree-vect-stmts.c (vect_gen_while_not): New function.
21680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21681 Alan Hayward <alan.hayward@arm.com>
21682 David Sherwood <david.sherwood@arm.com>
21684 * doc/sourcebuild.texi (vect_fully_masked): Document.
21685 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21686 default value to 0.
21687 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21689 (vect_analyze_loop_2): ...here. Don't check the vectorization
21690 factor against the number of loop iterations if the loop is
21693 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21694 Alan Hayward <alan.hayward@arm.com>
21695 David Sherwood <david.sherwood@arm.com>
21697 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21698 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21699 (dump_groups): Update accordingly.
21700 (iv_use::mem_type): New member variable.
21701 (address_p): New function.
21702 (record_use): Add a mem_type argument and initialize the new
21704 (record_group_use): Add a mem_type argument. Use address_p.
21705 Remove obsolete null checks of base_object. Update call to record_use.
21706 (find_interesting_uses_op): Update call to record_group_use.
21707 (find_interesting_uses_cond): Likewise.
21708 (find_interesting_uses_address): Likewise.
21709 (get_mem_type_for_internal_fn): New function.
21710 (find_address_like_use): Likewise.
21711 (find_interesting_uses_stmt): Try find_address_like_use before
21712 calling find_interesting_uses_op.
21713 (addr_offset_valid_p): Use the iv mem_type field as the type
21714 of the addressed memory.
21715 (add_autoinc_candidates): Likewise.
21716 (get_address_cost): Likewise.
21717 (split_small_address_groups_p): Use address_p.
21718 (split_address_groups): Likewise.
21719 (add_iv_candidate_for_use): Likewise.
21720 (autoinc_possible_for_pair): Likewise.
21721 (rewrite_groups): Likewise.
21722 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21723 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21724 (get_alias_ptr_type_for_ptr_address): New function.
21725 (rewrite_use_address): Rewrite address uses in calls that were
21726 identified by find_address_like_use.
21728 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21729 Alan Hayward <alan.hayward@arm.com>
21730 David Sherwood <david.sherwood@arm.com>
21732 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21734 * gimple-expr.h (is_gimple_addressable: Likewise.
21735 * gimple-expr.c (is_gimple_address): Likewise.
21736 * internal-fn.c (expand_call_mem_ref): New function.
21737 (expand_mask_load_optab_fn): Use it.
21738 (expand_mask_store_optab_fn): Likewise.
21740 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21741 Alan Hayward <alan.hayward@arm.com>
21742 David Sherwood <david.sherwood@arm.com>
21744 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21745 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21746 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21747 (cond_umax@var{mode}): Document.
21748 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21749 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21750 (cond_umin_optab, cond_umax_optab): New optabs.
21751 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21752 (COND_IOR, COND_XOR): New internal functions.
21753 * internal-fn.h (get_conditional_internal_fn): Declare.
21754 * internal-fn.c (cond_binary_direct): New macro.
21755 (expand_cond_binary_optab_fn): Likewise.
21756 (direct_cond_binary_optab_supported_p): Likewise.
21757 (get_conditional_internal_fn): New function.
21758 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21759 Cope with reduction statements that are vectorized as calls rather
21761 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21762 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21763 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21764 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21765 (UNSPEC_COND_EOR): New unspecs.
21766 (optab): Add mappings for them.
21767 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21768 (sve_int_op, sve_fp_op): New int attributes.
21770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21771 Alan Hayward <alan.hayward@arm.com>
21772 David Sherwood <david.sherwood@arm.com>
21774 * optabs.def (while_ult_optab): New optab.
21775 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21776 * internal-fn.def (WHILE_ULT): New internal function.
21777 * internal-fn.h (direct_internal_fn_supported_p): New override
21778 that takes two types as argument.
21779 * internal-fn.c (while_direct): New macro.
21780 (expand_while_optab_fn): New function.
21781 (convert_optab_supported_p): Likewise.
21782 (direct_while_optab_supported_p): New macro.
21783 * wide-int.h (wi::udiv_ceil): New function.
21784 * tree-vectorizer.h (rgroup_masks): New structure.
21785 (vec_loop_masks): New typedef.
21786 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21787 and fully_masked_p.
21788 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21789 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21790 (vect_max_vf): New function.
21791 (slpeel_make_loop_iterate_ntimes): Delete.
21792 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21793 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21794 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21795 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21796 internal-fn.h, stor-layout.h and optabs-query.h.
21797 (vect_set_loop_mask): New function.
21798 (add_preheader_seq): Likewise.
21799 (add_header_seq): Likewise.
21800 (interleave_supported_p): Likewise.
21801 (vect_maybe_permute_loop_masks): Likewise.
21802 (vect_set_loop_masks_directly): Likewise.
21803 (vect_set_loop_condition_masked): Likewise.
21804 (vect_set_loop_condition_unmasked): New function, split out from
21805 slpeel_make_loop_iterate_ntimes.
21806 (slpeel_make_loop_iterate_ntimes): Rename to..
21807 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21808 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21809 (vect_do_peeling): Update call accordingly.
21810 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21812 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21813 mask_compare_type, can_fully_mask_p and fully_masked_p.
21814 (release_vec_loop_masks): New function.
21815 (_loop_vec_info): Use it to free the loop masks.
21816 (can_produce_all_loop_masks_p): New function.
21817 (vect_get_max_nscalars_per_iter): Likewise.
21818 (vect_verify_full_masking): Likewise.
21819 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21820 retries, and free the mask rgroups before retrying. Check loop-wide
21821 reasons for disallowing fully-masked loops. Make the final decision
21822 about whether use a fully-masked loop or not.
21823 (vect_estimate_min_profitable_iters): Do not assume that peeling
21824 for the number of iterations will be needed for fully-masked loops.
21825 (vectorizable_reduction): Disable fully-masked loops.
21826 (vectorizable_live_operation): Likewise.
21827 (vect_halve_mask_nunits): New function.
21828 (vect_double_mask_nunits): Likewise.
21829 (vect_record_loop_mask): Likewise.
21830 (vect_get_loop_mask): Likewise.
21831 (vect_transform_loop): Handle the case in which the final loop
21832 iteration might handle a partial vector. Call vect_set_loop_condition
21833 instead of slpeel_make_loop_iterate_ntimes.
21834 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21835 (check_load_store_masking): New function.
21836 (prepare_load_store_mask): Likewise.
21837 (vectorizable_store): Handle fully-masked loops.
21838 (vectorizable_load): Likewise.
21839 (supportable_widening_operation): Use vect_halve_mask_nunits for
21841 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21842 (vect_gen_while): New function.
21843 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21844 (aarch64_uqdec<mode>): New insn.
21846 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21847 Alan Hayward <alan.hayward@arm.com>
21848 David Sherwood <david.sherwood@arm.com>
21850 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21851 (reduc_xor_scal_optab): New optabs.
21852 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21853 (reduc_xor_scal_@var{m}): Document.
21854 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21855 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21856 internal functions.
21857 * fold-const-call.c (fold_const_call): Handle them.
21858 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21859 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21860 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21861 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21862 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21863 (UNSPEC_XORV): New unspecs.
21864 (optab): Add entries for them.
21865 (BITWISEV): New int iterator.
21866 (bit_reduc_op): New int attributes.
21868 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21869 Alan Hayward <alan.hayward@arm.com>
21870 David Sherwood <david.sherwood@arm.com>
21872 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21873 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21874 * optabs.def (vec_shl_insert_optab): New optab.
21875 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21876 (duplicate_and_interleave): Likewise.
21877 * tree-vect-loop.c: Include internal-fn.h.
21878 (neutral_op_for_slp_reduction): New function, split out from
21879 get_initial_defs_for_reduction.
21880 (get_initial_def_for_reduction): Handle option 2 for variable-length
21881 vectors by loading the neutral value into a vector and then shifting
21882 the initial value into element 0.
21883 (get_initial_defs_for_reduction): Replace the code argument with
21884 the neutral value calculated by neutral_op_for_slp_reduction.
21885 Use gimple_build_vector for constant-length vectors.
21886 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21887 but the first group_size elements have a neutral value.
21888 Use duplicate_and_interleave otherwise.
21889 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21890 Update call to get_initial_defs_for_reduction. Handle SLP
21891 reductions for variable-length vectors by creating one vector
21892 result for each scalar result, with the elements associated
21893 with other scalar results stubbed out with the neutral value.
21894 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21895 Require IFN_VEC_SHL_INSERT for double reductions on
21896 variable-length vectors, or SLP reductions that have
21897 a neutral value. Require can_duplicate_and_interleave_p
21898 support for variable-length unchained SLP reductions if there
21899 is no neutral value, such as for MIN/MAX reductions. Also require
21900 the number of vector elements to be a multiple of the number of
21901 SLP statements when doing variable-length unchained SLP reductions.
21902 Update call to vect_create_epilog_for_reduction.
21903 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21904 and remove initial values.
21905 (duplicate_and_interleave): Make public.
21906 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21907 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21910 Alan Hayward <alan.hayward@arm.com>
21911 David Sherwood <david.sherwood@arm.com>
21913 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21914 (can_duplicate_and_interleave_p): New function.
21915 (vect_get_and_check_slp_defs): Take the vector of statements
21916 rather than just the current one. Remove excess parentheses.
21917 Restriction rejectinon of vect_constant_def and vect_external_def
21918 for variable-length vectors to boolean types, or types for which
21919 can_duplicate_and_interleave_p is false.
21920 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21921 (duplicate_and_interleave): New function.
21922 (vect_get_constant_vectors): Use gimple_build_vector for
21923 constant-length vectors and suitable variable-length constant
21924 vectors. Use duplicate_and_interleave for other variable-length
21925 vectors. Don't defer the update when inserting new statements.
21927 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21928 Alan Hayward <alan.hayward@arm.com>
21929 David Sherwood <david.sherwood@arm.com>
21931 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21932 min_profitable_iters doesn't go negative.
21934 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21935 Alan Hayward <alan.hayward@arm.com>
21936 David Sherwood <david.sherwood@arm.com>
21938 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21939 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21940 * optabs.def (vec_mask_load_lanes_optab): New optab.
21941 (vec_mask_store_lanes_optab): Likewise.
21942 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21943 (MASK_STORE_LANES): Likewise.
21944 * internal-fn.c (mask_load_lanes_direct): New macro.
21945 (mask_store_lanes_direct): Likewise.
21946 (expand_mask_load_optab_fn): Handle masked operations.
21947 (expand_mask_load_lanes_optab_fn): New macro.
21948 (expand_mask_store_optab_fn): Handle masked operations.
21949 (expand_mask_store_lanes_optab_fn): New macro.
21950 (direct_mask_load_lanes_optab_supported_p): Likewise.
21951 (direct_mask_store_lanes_optab_supported_p): Likewise.
21952 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21954 (vect_load_lanes_supported): Likewise.
21955 * tree-vect-data-refs.c (strip_conversion): New function.
21956 (can_group_stmts_p): Likewise.
21957 (vect_analyze_data_ref_accesses): Use it instead of checking
21958 for a pair of assignments.
21959 (vect_store_lanes_supported): Take a masked_p parameter.
21960 (vect_load_lanes_supported): Likewise.
21961 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21962 vect_store_lanes_supported and vect_load_lanes_supported.
21963 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21964 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21965 parameter. Don't allow gaps for masked accesses.
21966 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21967 and vect_load_lanes_supported.
21968 (get_load_store_type): Take a masked_p parameter and update
21969 call to get_group_load_store_type.
21970 (vectorizable_store): Update call to get_load_store_type.
21971 Handle IFN_MASK_STORE_LANES.
21972 (vectorizable_load): Update call to get_load_store_type.
21973 Handle IFN_MASK_LOAD_LANES.
21975 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21976 Alan Hayward <alan.hayward@arm.com>
21977 David Sherwood <david.sherwood@arm.com>
21979 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21981 * config/aarch64/aarch64-protos.h
21982 (aarch64_sve_struct_memory_operand_p): Declare.
21983 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21984 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21985 (VPRED, vpred): Handle SVE structure modes.
21986 * config/aarch64/constraints.md (Utx): New constraint.
21987 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21988 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21989 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21990 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21991 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21992 structure modes. Split into pieces after RA.
21993 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21994 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21996 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21997 SVE structure modes.
21998 (aarch64_classify_address): Likewise.
21999 (sizetochar): Move earlier in file.
22000 (aarch64_print_operand): Handle SVE register lists.
22001 (aarch64_array_mode): New function.
22002 (aarch64_sve_struct_memory_operand_p): Likewise.
22003 (TARGET_ARRAY_MODE): Redefine.
22005 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22006 Alan Hayward <alan.hayward@arm.com>
22007 David Sherwood <david.sherwood@arm.com>
22009 * target.def (array_mode): New target hook.
22010 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22011 * doc/tm.texi: Regenerate.
22012 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22013 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22014 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22015 targetm.array_mode.
22016 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22019 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22020 Alan Hayward <alan.hayward@arm.com>
22021 David Sherwood <david.sherwood@arm.com>
22023 * fold-const.c (fold_binary_loc): Check the argument types
22024 rather than the result type when testing for a vector operation.
22026 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22028 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22029 * doc/tm.texi: Regenerate.
22031 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22032 Alan Hayward <alan.hayward@arm.com>
22033 David Sherwood <david.sherwood@arm.com>
22035 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22036 (sve): Document new AArch64 extension.
22037 * doc/md.texi (w): Extend the description of the AArch64
22038 constraint to include SVE vectors.
22039 (Upl, Upa): Document new AArch64 predicate constraints.
22040 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22042 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22043 (msve-vector-bits=): New option.
22044 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22045 SVE when these are disabled.
22046 (sve): New extension.
22047 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22048 modes. Adjust their number of units based on aarch64_sve_vg.
22049 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22050 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22051 aarch64_addr_query_type.
22052 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22053 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22054 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22055 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22056 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22057 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22058 (aarch64_simd_imm_zero_p): Delete.
22059 (aarch64_check_zero_based_sve_index_immediate): Declare.
22060 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22061 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22062 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22063 (aarch64_sve_float_mul_immediate_p): Likewise.
22064 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22065 rather than an rtx.
22066 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22067 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22068 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22069 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22070 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22071 (aarch64_regmode_natural_size): Likewise.
22072 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22073 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22075 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22076 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22077 for VG and the SVE predicate registers.
22078 (V_ALIASES): Add a "z"-prefixed alias.
22079 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22080 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22081 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22082 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22083 (REG_CLASS_NAMES): Add entries for them.
22084 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22085 and the predicate registers.
22086 (aarch64_sve_vg): Declare.
22087 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22088 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22089 (REGMODE_NATURAL_SIZE): Define.
22090 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22092 * config/aarch64/aarch64.c: Include cfgrtl.h.
22093 (simd_immediate_info): Add a constructor for series vectors,
22094 and an associated step field.
22095 (aarch64_sve_vg): New variable.
22096 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22097 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22098 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22099 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22100 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22101 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22102 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22103 (aarch64_get_mask_mode): New functions.
22104 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22105 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22106 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22107 predicate modes and predicate registers. Explicitly restrict
22108 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22109 to store a vector mode if it is recognized by
22110 aarch64_classify_vector_mode.
22111 (aarch64_regmode_natural_size): New function.
22112 (aarch64_hard_regno_caller_save_mode): Return the original mode
22114 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22115 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22116 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22117 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22119 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22120 does not overlap dest if the function is frame-related. Handle
22122 (aarch64_split_add_offset): New function.
22123 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22124 them aarch64_add_offset.
22125 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22126 and update call to aarch64_sub_sp.
22127 (aarch64_add_cfa_expression): New function.
22128 (aarch64_expand_prologue): Pass extra temporary registers to the
22129 functions above. Handle the case in which we need to emit new
22130 DW_CFA_expressions for registers that were originally saved
22131 relative to the stack pointer, but now have to be expressed
22132 relative to the frame pointer.
22133 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22135 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22136 IP0 and IP1 values for SVE frames.
22137 (aarch64_expand_vec_series): New function.
22138 (aarch64_expand_sve_widened_duplicate): Likewise.
22139 (aarch64_expand_sve_const_vector): Likewise.
22140 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22141 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22142 into the register, rather than emitting a SET directly.
22143 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22144 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22145 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22146 (offset_9bit_signed_scaled_p): New functions.
22147 (aarch64_replicate_bitmask_imm): New function.
22148 (aarch64_bitmask_imm): Use it.
22149 (aarch64_cannot_force_const_mem): Reject expressions involving
22150 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22151 (aarch64_classify_index): Handle SVE indices, by requiring
22152 a plain register index with a scale that matches the element size.
22153 (aarch64_classify_address): Handle SVE addresses. Assert that
22154 the mode of the address is VOIDmode or an integer mode.
22155 Update call to aarch64_classify_symbol.
22156 (aarch64_classify_symbolic_expression): Update call to
22157 aarch64_classify_symbol.
22158 (aarch64_const_vec_all_in_range_p): New function.
22159 (aarch64_print_vector_float_operand): Likewise.
22160 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22161 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22162 and the FP immediates 1.0 and 0.5.
22163 (aarch64_print_address_internal): Handle SVE addresses.
22164 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22165 (aarch64_regno_regclass): Handle predicate registers.
22166 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22168 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22169 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22170 (aarch64_convert_sve_vector_bits): New function.
22171 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22172 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22173 rather than an rtx.
22174 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22175 Handle SVE vector and predicate modes. Accept VL-based constants
22176 that need only one temporary register, and VL offsets that require
22177 no temporary registers.
22178 (aarch64_conditional_register_usage): Mark the predicate registers
22179 as fixed if SVE isn't available.
22180 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22181 Return true for SVE vector and predicate modes.
22182 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22183 rather than an unsigned int. Handle SVE modes.
22184 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22186 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22188 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22189 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22190 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22191 (aarch64_sve_float_mul_immediate_p): New functions.
22192 (aarch64_sve_valid_immediate): New function.
22193 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22194 Explicitly reject structure modes. Check for INDEX constants.
22195 Handle PTRUE and PFALSE constants.
22196 (aarch64_check_zero_based_sve_index_immediate): New function.
22197 (aarch64_simd_imm_zero_p): Delete.
22198 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22199 vector modes. Accept constants in the range of CNT[BHWD].
22200 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22201 ask for an Advanced SIMD mode.
22202 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22203 (aarch64_simd_vector_alignment): Handle SVE predicates.
22204 (aarch64_vectorize_preferred_vector_alignment): New function.
22205 (aarch64_simd_vector_alignment_reachable): Use it instead of
22207 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22208 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22210 (MAX_VECT_LEN): Delete.
22211 (expand_vec_perm_d): Add a vec_flags field.
22212 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22213 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22214 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22216 (aarch64_evpc_rev): Rename to...
22217 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22218 (aarch64_evpc_rev_global): New function.
22219 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22220 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22222 (aarch64_evpc_sve_tbl): New function.
22223 (aarch64_expand_vec_perm_const_1): Update after rename of
22224 aarch64_evpc_rev. Handle SVE permutes too, trying
22225 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22226 than aarch64_evpc_tbl.
22227 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22228 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22229 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22230 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22231 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22232 (aarch64_expand_sve_vcond): New functions.
22233 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22234 of aarch64_vector_mode_p.
22235 (aarch64_dwarf_poly_indeterminate_value): New function.
22236 (aarch64_compute_pressure_classes): Likewise.
22237 (aarch64_can_change_mode_class): Likewise.
22238 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22239 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22240 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22241 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22242 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22243 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22244 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22245 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22247 (Dn, Dl, Dr): Accept const as well as const_vector.
22248 (Dz): Likewise. Compare against CONST0_RTX.
22249 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22250 of "vector" where appropriate.
22251 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22252 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22253 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22254 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22255 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22256 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22257 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22258 (v_int_equiv): Extend to SVE modes.
22259 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22261 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22262 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22263 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22264 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22265 (SVE_COND_FP_CMP): New int iterators.
22266 (perm_hilo): Handle the new unpack unspecs.
22267 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22269 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22270 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22271 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22272 (aarch64_equality_operator, aarch64_constant_vector_operand)
22273 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22274 (aarch64_sve_nonimmediate_operand): Likewise.
22275 (aarch64_sve_general_operand): Likewise.
22276 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22277 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22278 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22279 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22280 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22281 (aarch64_sve_float_arith_immediate): Likewise.
22282 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22283 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22284 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22285 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22286 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22287 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22288 (aarch64_sve_float_arith_operand): Likewise.
22289 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22290 (aarch64_sve_float_mul_operand): Likewise.
22291 (aarch64_sve_vec_perm_operand): Likewise.
22292 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22293 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22294 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22295 as well as const_vector.
22296 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22297 in file. Use CONST0_RTX and CONSTM1_RTX.
22298 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22299 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22300 Use aarch64_simd_imm_zero.
22301 * config/aarch64/aarch64-sve.md: New file.
22302 * config/aarch64/aarch64.md: Include it.
22303 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22304 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22305 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22306 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22307 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22308 (sve): New attribute.
22309 (enabled): Disable instructions with the sve attribute unless
22311 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22312 aarch64_expand_mov_immediate.
22313 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22314 CNT[BHSD] immediates.
22315 (movti): Split CONST_POLY_INT moves into two halves.
22316 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22317 Split additions that need a temporary here if the destination
22318 is the stack pointer.
22319 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22320 (*add<mode>3_poly_1): New instruction.
22321 (set_clobber_cc): New expander.
22323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22325 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22326 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22327 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22328 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22329 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22330 Change innermode from fixed_mode_size to machine_mode.
22331 (simplify_subreg): Update call accordingly. Handle a constant-sized
22332 subreg of a variable-length CONST_VECTOR.
22334 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22335 Alan Hayward <alan.hayward@arm.com>
22336 David Sherwood <david.sherwood@arm.com>
22338 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22339 (add_offset_to_base): New function, split out from...
22340 (create_mem_ref): ...here. When handling a scale other than 1,
22341 check first whether the address is valid without the offset.
22342 Add it into the base if so, leaving the index and scale as-is.
22344 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22347 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22348 fold_for_warn before checking if arg2 is INTEGER_CST.
22350 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22352 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22353 (store_multiple_operation): Delete.
22354 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22355 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22356 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22357 guarded by TARGET_STRING.
22358 (rs6000_output_load_multiple): Delete.
22359 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22360 OPTION_MASK_STRING / TARGET_STRING handling.
22361 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22362 (const rs6000_opt_masks) <"string">: Change mask to 0.
22363 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22364 (MASK_STRING): Delete.
22365 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22367 (load_multiple): Delete.
22374 (store_multiple): Delete.
22381 (movmemsi_8reg): Delete.
22382 (corresponding unnamed define_insn): Delete.
22383 (movmemsi_6reg): Delete.
22384 (corresponding unnamed define_insn): Delete.
22385 (movmemsi_4reg): Delete.
22386 (corresponding unnamed define_insn): Delete.
22387 (movmemsi_2reg): Delete.
22388 (corresponding unnamed define_insn): Delete.
22389 (movmemsi_1reg): Delete.
22390 (corresponding unnamed define_insn): Delete.
22391 * config/rs6000/rs6000.opt (mno-string): New.
22392 (mstring): Replace by deprecation warning stub.
22393 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22395 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22397 * regrename.c (regrename_do_replace): If replacing the same
22398 reg multiple times, try to reuse last created gen_raw_REG.
22401 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22402 main to workaround a bug in GDB.
22404 2018-01-12 Tom de Vries <tom@codesourcery.com>
22407 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22409 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22411 PR rtl-optimization/80481
22412 * ira-color.c (get_cap_member): New function.
22413 (allocnos_conflict_by_live_ranges_p): Use it.
22414 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22415 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22417 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22420 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22421 (*saddl_se_1): Ditto.
22422 (*ssubsi_1): Ditto.
22423 (*ssubl_se_1): Ditto.
22425 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22427 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22428 rather than wi::to_widest for DR_INITs.
22429 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22430 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22431 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22433 (vect_analyze_group_access_1): Note that here.
22435 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22437 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22438 polynomial type sizes.
22440 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22442 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22443 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22444 (gimple_add_tmp_var): Likewise.
22446 2018-01-12 Martin Liska <mliska@suse.cz>
22448 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22449 (gimple_alloc_sizes): Likewise.
22450 (dump_gimple_statistics): Use PRIu64 in printf format.
22451 * gimple.h: Change uint64_t to int.
22453 2018-01-12 Martin Liska <mliska@suse.cz>
22455 * tree-core.h: Use uint64_t instead of int.
22456 * tree.c (tree_node_counts): Likewise.
22457 (tree_node_sizes): Likewise.
22458 (dump_tree_statistics): Use PRIu64 in printf format.
22460 2018-01-12 Martin Liska <mliska@suse.cz>
22462 * Makefile.in: As qsort_chk is implemented in vec.c, add
22463 vec.o to linkage of gencfn-macros.
22464 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22465 passing the info to record_node_allocation_statistics.
22466 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22468 * ggc-common.c (struct ggc_usage): Add operator== and use
22469 it in operator< and compare function.
22470 * mem-stats.h (struct mem_usage): Likewise.
22471 * vec.c (struct vec_usage): Remove operator< and compare
22472 function. Can be simply inherited.
22474 2018-01-12 Martin Jambor <mjambor@suse.cz>
22477 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22478 * tree-ssa-math-opts.c: Include domwalk.h.
22479 (convert_mult_to_fma_1): New function.
22480 (fma_transformation_info): New type.
22481 (fma_deferring_state): Likewise.
22482 (cancel_fma_deferring): New function.
22483 (result_of_phi): Likewise.
22484 (last_fma_candidate_feeds_initial_phi): Likewise.
22485 (convert_mult_to_fma): Added deferring logic, split actual
22486 transformation to convert_mult_to_fma_1.
22487 (math_opts_dom_walker): New type.
22488 (math_opts_dom_walker::after_dom_children): New method, body moved
22489 here from pass_optimize_widening_mul::execute, added deferring logic
22491 (pass_optimize_widening_mul::execute): Moved most of code to
22492 math_opts_dom_walker::after_dom_children.
22493 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22494 * config/i386/i386.c (ix86_option_override_internal): Added
22495 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22497 2018-01-12 Richard Biener <rguenther@suse.de>
22500 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22501 inline instance vars.
22503 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22506 * config/rx/rx.c (rx_is_restricted_memory_address):
22507 Handle SUBREG case.
22509 2018-01-12 Richard Biener <rguenther@suse.de>
22511 PR tree-optimization/80846
22512 * target.def (split_reduction): New target hook.
22513 * targhooks.c (default_split_reduction): New function.
22514 * targhooks.h (default_split_reduction): Declare.
22515 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22516 target requests first reduce vectors by combining low and high
22518 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22519 (get_vectype_for_scalar_type_and_size): Export.
22520 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22521 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22522 * doc/tm.texi: Regenerate.
22523 * config/i386/i386.c (ix86_split_reduction): Implement
22524 TARGET_VECTORIZE_SPLIT_REDUCTION.
22526 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22529 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22530 in PIC mode except for TARGET_VXWORKS_RTP.
22531 * config/sparc/sparc.c: Include cfgrtl.h.
22532 (TARGET_INIT_PIC_REG): Define.
22533 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22534 (sparc_pic_register_p): New predicate.
22535 (sparc_legitimate_address_p): Use it.
22536 (sparc_legitimize_pic_address): Likewise.
22537 (sparc_delegitimize_address): Likewise.
22538 (sparc_mode_dependent_address_p): Likewise.
22539 (gen_load_pcrel_sym): Remove 4th parameter.
22540 (load_got_register): Adjust call to above. Remove obsolete stuff.
22541 (sparc_expand_prologue): Do not call load_got_register here.
22542 (sparc_flat_expand_prologue): Likewise.
22543 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22544 (sparc_use_pseudo_pic_reg): New function.
22545 (sparc_init_pic_reg): Likewise.
22546 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22547 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22549 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22551 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22552 Add item for branch_cost.
22554 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22556 PR rtl-optimization/83565
22557 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22558 not extend the result to a larger mode for rotate operations.
22559 (num_sign_bit_copies1): Likewise.
22561 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22564 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22566 Use values-Xc.o for -pedantic.
22567 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22569 2018-01-12 Martin Liska <mliska@suse.cz>
22572 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22574 (possible_polymorphic_call_targets): Use it.
22575 (ipa_devirt): Likewise.
22577 2018-01-12 Martin Liska <mliska@suse.cz>
22579 * profile-count.h (enum profile_quality): Use 0 as invalid
22580 enum value of profile_quality.
22582 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22584 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22585 -mext-string options.
22587 2018-01-12 Richard Biener <rguenther@suse.de>
22589 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22590 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22591 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22593 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22595 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22597 * configure.ac (--with-long-double-format): Add support for the
22598 configuration option to change the default long double format on
22600 * config.gcc (powerpc*-linux*-*): Likewise.
22601 * configure: Regenerate.
22602 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22603 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22604 used without modification.
22606 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22608 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22609 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22610 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22611 MISC_BUILTIN_SPEC_BARRIER.
22612 (rs6000_init_builtins): Likewise.
22613 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22615 (speculation_barrier): New define_insn.
22616 * doc/extend.texi: Document __builtin_speculation_barrier.
22618 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22621 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22622 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22623 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22625 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22626 integral modes instead of "ss" and "sd".
22627 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22628 vectors with 32-bit and 64-bit elements.
22629 (vecdupssescalarmodesuffix): New mode attribute.
22630 (vec_dup<mode>): Use it.
22632 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22635 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22636 frame if argument is passed on stack.
22638 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22641 * ree.c (combine_reaching_defs): Optimize also
22642 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22643 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22645 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22647 PR middle-end/83189
22648 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22650 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22652 PR middle-end/83718
22653 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22654 after they are computed.
22656 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22658 PR tree-optimization/83695
22659 * gimple-loop-linterchange.cc
22660 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22661 reset cached scev information after interchange.
22662 (pass_linterchange::execute): Remove call to scev_reset_htab.
22664 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22666 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22667 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22668 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22669 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22670 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22671 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22672 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22673 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22674 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22675 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22676 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22677 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22678 (V_lane_reg): Likewise.
22679 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22681 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22682 (vfmal_lane_low<mode>_intrinsic,
22683 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22684 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22685 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22686 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22687 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22688 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22690 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22692 * config/arm/arm-cpus.in (fp16fml): New feature.
22693 (ALL_SIMD): Add fp16fml.
22694 (armv8.2-a): Add fp16fml as an option.
22695 (armv8.3-a): Likewise.
22696 (armv8.4-a): Add fp16fml as part of fp16.
22697 * config/arm/arm.h (TARGET_FP16FML): Define.
22698 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22700 * config/arm/arm-modes.def (V2HF): Define.
22701 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22702 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22703 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22704 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22705 vfmsl_low, vfmsl_high): New set of builtins.
22706 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22707 (vfml_op): New code attribute.
22708 (VFMLHALVES): New int iterator.
22709 (VFML, VFMLSEL): New mode attributes.
22710 (V_reg): Define mapping for V2HF.
22711 (V_hi, V_lo): New mode attributes.
22712 (VF_constraint): Likewise.
22713 (vfml_half, vfml_half_selector): New int attributes.
22714 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22716 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22717 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22719 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22720 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22721 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22722 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22724 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22725 Document new effective target and option set.
22727 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22729 * config/arm/arm-cpus.in (armv8_4): New feature.
22730 (ARMv8_4a): New fgroup.
22731 (armv8.4-a): New arch.
22732 * config/arm/arm-tables.opt: Regenerate.
22733 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22734 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22735 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22736 Add matching rules for -march=armv8.4-a and extensions.
22737 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22739 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22742 * config/rx/rx.md (BW): New mode attribute.
22743 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22745 2018-01-11 Richard Biener <rguenther@suse.de>
22747 PR tree-optimization/83435
22748 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22749 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22750 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22752 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22753 Alan Hayward <alan.hayward@arm.com>
22754 David Sherwood <david.sherwood@arm.com>
22756 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22758 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22759 (aarch64_print_address_internal): Use it to check for a zero offset.
22761 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22762 Alan Hayward <alan.hayward@arm.com>
22763 David Sherwood <david.sherwood@arm.com>
22765 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22766 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22767 Return a poly_int64 rather than a HOST_WIDE_INT.
22768 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22769 rather than a HOST_WIDE_INT.
22770 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22771 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22772 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22773 final_offset from HOST_WIDE_INT to poly_int64.
22774 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22775 to_constant when getting the number of units in an Advanced SIMD
22777 (aarch64_builtin_vectorized_function): Check for a constant number
22779 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22781 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22782 attribute instead of GET_MODE_NUNITS.
22783 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22784 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22785 GET_MODE_SIZE for fixed-size registers.
22786 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22787 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22788 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22789 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22790 (aarch64_print_operand, aarch64_print_address_internal)
22791 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22792 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22793 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22794 Handle polynomial GET_MODE_SIZE.
22795 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22796 wider than SImode without modification.
22797 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22798 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22799 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22800 passing and returning SVE modes.
22801 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22802 rather than GEN_INT.
22803 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22804 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22805 (aarch64_allocate_and_probe_stack_space): Likewise.
22806 (aarch64_layout_frame): Cope with polynomial offsets.
22807 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22808 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22809 polynomial offsets.
22810 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22811 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22812 poly_int64 rather than a HOST_WIDE_INT.
22813 (aarch64_get_separate_components, aarch64_process_components)
22814 (aarch64_expand_prologue, aarch64_expand_epilogue)
22815 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22816 (aarch64_anchor_offset): New function, split out from...
22817 (aarch64_legitimize_address): ...here.
22818 (aarch64_builtin_vectorization_cost): Handle polynomial
22819 TYPE_VECTOR_SUBPARTS.
22820 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22822 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22823 number of elements from the PARALLEL rather than the mode.
22824 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22825 rather than GET_MODE_BITSIZE.
22826 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22827 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22828 (aarch64_expand_vec_perm_const_1): Handle polynomial
22829 d->perm.length () and d->perm elements.
22830 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22831 Apply to_constant to d->perm elements.
22832 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22833 polynomial CONST_VECTOR_NUNITS.
22834 (aarch64_move_pointer): Take amount as a poly_int64 rather
22836 (aarch64_progress_pointer): Avoid temporary variable.
22837 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22838 the mode attribute instead of GET_MODE.
22840 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22841 Alan Hayward <alan.hayward@arm.com>
22842 David Sherwood <david.sherwood@arm.com>
22844 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22845 x exists before using it.
22846 (aarch64_add_constant_internal): Rename to...
22847 (aarch64_add_offset_1): ...this. Replace regnum with separate
22848 src and dest rtxes. Handle the case in which they're different,
22849 including when the offset is zero. Replace scratchreg with an rtx.
22850 Use 2 additions if there is no spare register into which we can
22851 move a 16-bit constant.
22852 (aarch64_add_constant): Delete.
22853 (aarch64_add_offset): Replace reg with separate src and dest
22854 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22855 Use aarch64_add_offset_1.
22856 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22857 an rtx rather than an int. Take the delta as a poly_int64
22858 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22859 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22860 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22861 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22862 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22863 and aarch64_add_sp.
22864 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22865 aarch64_add_constant.
22867 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22869 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22870 Use scalar_float_mode.
22872 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22874 * config/aarch64/aarch64-simd.md
22875 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22876 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22877 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22878 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22879 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22880 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22881 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22882 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22883 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22884 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22886 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22889 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22890 targ_options->x_arm_arch_string is non NULL.
22892 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22894 * config/aarch64/aarch64.h
22895 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22897 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22900 * expmed.c (emit_store_flag_force): Swap if const op0
22901 and change VOIDmode to mode of op0.
22903 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22905 PR rtl-optimization/83761
22906 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22907 than bytes to mode_for_size.
22909 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22911 PR middle-end/83189
22912 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22913 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22916 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22918 PR middle-end/83575
22919 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22920 when in layout mode.
22921 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22922 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22925 2018-01-10 Michael Collison <michael.collison@arm.com>
22927 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22928 * config/aarch64/aarch64-option-extension.def: Add
22929 AARCH64_OPT_EXTENSION of 'fp16fml'.
22930 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22931 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22932 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22933 * config/aarch64/constraints.md (Ui7): New constraint.
22934 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22935 (VFMLA_SEL_W): Ditto.
22938 (VFMLA16_LOW): New int iterator.
22939 (VFMLA16_HIGH): Ditto.
22940 (UNSPEC_FMLAL): New unspec.
22941 (UNSPEC_FMLSL): Ditto.
22942 (UNSPEC_FMLAL2): Ditto.
22943 (UNSPEC_FMLSL2): Ditto.
22944 (f16mac): New code attribute.
22945 * config/aarch64/aarch64-simd-builtins.def
22946 (aarch64_fmlal_lowv2sf): Ditto.
22947 (aarch64_fmlsl_lowv2sf): Ditto.
22948 (aarch64_fmlalq_lowv4sf): Ditto.
22949 (aarch64_fmlslq_lowv4sf): Ditto.
22950 (aarch64_fmlal_highv2sf): Ditto.
22951 (aarch64_fmlsl_highv2sf): Ditto.
22952 (aarch64_fmlalq_highv4sf): Ditto.
22953 (aarch64_fmlslq_highv4sf): Ditto.
22954 (aarch64_fmlal_lane_lowv2sf): Ditto.
22955 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22956 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22957 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22958 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22959 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22960 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22961 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22962 (aarch64_fmlal_lane_highv2sf): Ditto.
22963 (aarch64_fmlsl_lane_highv2sf): Ditto.
22964 (aarch64_fmlal_laneq_highv2sf): Ditto.
22965 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22966 (aarch64_fmlalq_lane_highv4sf): Ditto.
22967 (aarch64_fmlsl_lane_highv4sf): Ditto.
22968 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22969 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22970 * config/aarch64/aarch64-simd.md:
22971 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22972 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22973 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22974 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22975 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22976 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22977 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22978 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22979 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22980 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22981 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22982 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22983 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22984 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22985 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22986 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22987 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22988 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22989 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22990 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22991 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22992 (vfmlsl_low_u32): Ditto.
22993 (vfmlalq_low_u32): Ditto.
22994 (vfmlslq_low_u32): Ditto.
22995 (vfmlal_high_u32): Ditto.
22996 (vfmlsl_high_u32): Ditto.
22997 (vfmlalq_high_u32): Ditto.
22998 (vfmlslq_high_u32): Ditto.
22999 (vfmlal_lane_low_u32): Ditto.
23000 (vfmlsl_lane_low_u32): Ditto.
23001 (vfmlal_laneq_low_u32): Ditto.
23002 (vfmlsl_laneq_low_u32): Ditto.
23003 (vfmlalq_lane_low_u32): Ditto.
23004 (vfmlslq_lane_low_u32): Ditto.
23005 (vfmlalq_laneq_low_u32): Ditto.
23006 (vfmlslq_laneq_low_u32): Ditto.
23007 (vfmlal_lane_high_u32): Ditto.
23008 (vfmlsl_lane_high_u32): Ditto.
23009 (vfmlal_laneq_high_u32): Ditto.
23010 (vfmlsl_laneq_high_u32): Ditto.
23011 (vfmlalq_lane_high_u32): Ditto.
23012 (vfmlslq_lane_high_u32): Ditto.
23013 (vfmlalq_laneq_high_u32): Ditto.
23014 (vfmlslq_laneq_high_u32): Ditto.
23015 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23016 (AARCH64_FL_FOR_ARCH8_4): New.
23017 (AARCH64_ISA_F16FML): New ISA flag.
23018 (TARGET_F16FML): New feature flag for fp16fml.
23019 (doc/invoke.texi): Document new fp16fml option.
23021 2018-01-10 Michael Collison <michael.collison@arm.com>
23023 * config/aarch64/aarch64-builtins.c:
23024 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23025 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23026 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23027 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23028 (AARCH64_ISA_SHA3): New ISA flag.
23029 (TARGET_SHA3): New feature flag for sha3.
23030 * config/aarch64/iterators.md (sha512_op): New int attribute.
23031 (CRYPTO_SHA512): New int iterator.
23032 (UNSPEC_SHA512H): New unspec.
23033 (UNSPEC_SHA512H2): Ditto.
23034 (UNSPEC_SHA512SU0): Ditto.
23035 (UNSPEC_SHA512SU1): Ditto.
23036 * config/aarch64/aarch64-simd-builtins.def
23037 (aarch64_crypto_sha512hqv2di): New builtin.
23038 (aarch64_crypto_sha512h2qv2di): Ditto.
23039 (aarch64_crypto_sha512su0qv2di): Ditto.
23040 (aarch64_crypto_sha512su1qv2di): Ditto.
23041 (aarch64_eor3qv8hi): Ditto.
23042 (aarch64_rax1qv2di): Ditto.
23043 (aarch64_xarqv2di): Ditto.
23044 (aarch64_bcaxqv8hi): Ditto.
23045 * config/aarch64/aarch64-simd.md:
23046 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23047 (aarch64_crypto_sha512su0qv2di): Ditto.
23048 (aarch64_crypto_sha512su1qv2di): Ditto.
23049 (aarch64_eor3qv8hi): Ditto.
23050 (aarch64_rax1qv2di): Ditto.
23051 (aarch64_xarqv2di): Ditto.
23052 (aarch64_bcaxqv8hi): Ditto.
23053 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23054 (vsha512h2q_u64): Ditto.
23055 (vsha512su0q_u64): Ditto.
23056 (vsha512su1q_u64): Ditto.
23057 (veor3q_u16): Ditto.
23058 (vrax1q_u64): Ditto.
23059 (vxarq_u64): Ditto.
23060 (vbcaxq_u16): Ditto.
23061 * config/arm/types.md (crypto_sha512): New type attribute.
23062 (crypto_sha3): Ditto.
23063 (doc/invoke.texi): Document new sha3 option.
23065 2018-01-10 Michael Collison <michael.collison@arm.com>
23067 * config/aarch64/aarch64-builtins.c:
23068 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23069 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23070 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23071 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23072 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23073 (AARCH64_ISA_SM4): New ISA flag.
23074 (TARGET_SM4): New feature flag for sm4.
23075 * config/aarch64/aarch64-simd-builtins.def
23076 (aarch64_sm3ss1qv4si): Ditto.
23077 (aarch64_sm3tt1aq4si): Ditto.
23078 (aarch64_sm3tt1bq4si): Ditto.
23079 (aarch64_sm3tt2aq4si): Ditto.
23080 (aarch64_sm3tt2bq4si): Ditto.
23081 (aarch64_sm3partw1qv4si): Ditto.
23082 (aarch64_sm3partw2qv4si): Ditto.
23083 (aarch64_sm4eqv4si): Ditto.
23084 (aarch64_sm4ekeyqv4si): Ditto.
23085 * config/aarch64/aarch64-simd.md:
23086 (aarch64_sm3ss1qv4si): Ditto.
23087 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23088 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23089 (aarch64_sm4eqv4si): Ditto.
23090 (aarch64_sm4ekeyqv4si): Ditto.
23091 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23092 (sm3part_op): Ditto.
23093 (CRYPTO_SM3TT): Ditto.
23094 (CRYPTO_SM3PART): Ditto.
23095 (UNSPEC_SM3SS1): New unspec.
23096 (UNSPEC_SM3TT1A): Ditto.
23097 (UNSPEC_SM3TT1B): Ditto.
23098 (UNSPEC_SM3TT2A): Ditto.
23099 (UNSPEC_SM3TT2B): Ditto.
23100 (UNSPEC_SM3PARTW1): Ditto.
23101 (UNSPEC_SM3PARTW2): Ditto.
23102 (UNSPEC_SM4E): Ditto.
23103 (UNSPEC_SM4EKEY): Ditto.
23104 * config/aarch64/constraints.md (Ui2): New constraint.
23105 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23106 * config/arm/types.md (crypto_sm3): New type attribute.
23107 (crypto_sm4): Ditto.
23108 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23109 (vsm3tt1aq_u32): Ditto.
23110 (vsm3tt1bq_u32): Ditto.
23111 (vsm3tt2aq_u32): Ditto.
23112 (vsm3tt2bq_u32): Ditto.
23113 (vsm3partw1q_u32): Ditto.
23114 (vsm3partw2q_u32): Ditto.
23115 (vsm4eq_u32): Ditto.
23116 (vsm4ekeyq_u32): Ditto.
23117 (doc/invoke.texi): Document new sm4 option.
23119 2018-01-10 Michael Collison <michael.collison@arm.com>
23121 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23122 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23123 (AARCH64_FL_FOR_ARCH8_4): New.
23124 (AARCH64_FL_V8_4): New flag.
23125 (doc/invoke.texi): Document new armv8.4-a option.
23127 2018-01-10 Michael Collison <michael.collison@arm.com>
23129 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23130 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23131 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23132 * config/aarch64/aarch64-option-extension.def: Add
23133 AARCH64_OPT_EXTENSION of 'sha2'.
23134 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23135 (crypto): Disable sha2 and aes if crypto disabled.
23136 (crypto): Enable aes and sha2 if enabled.
23137 (simd): Disable sha2 and aes if simd disabled.
23138 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23140 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23141 (TARGET_SHA2): New feature flag for sha2.
23142 (TARGET_AES): New feature flag for aes.
23143 * config/aarch64/aarch64-simd.md:
23144 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23145 conditional on TARGET_AES.
23146 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23147 (aarch64_crypto_sha1hsi): Make pattern conditional
23149 (aarch64_crypto_sha1hv4si): Ditto.
23150 (aarch64_be_crypto_sha1hv4si): Ditto.
23151 (aarch64_crypto_sha1su1v4si): Ditto.
23152 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23153 (aarch64_crypto_sha1su0v4si): Ditto.
23154 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23155 (aarch64_crypto_sha256su0v4si): Ditto.
23156 (aarch64_crypto_sha256su1v4si): Ditto.
23157 (doc/invoke.texi): Document new aes and sha2 options.
23159 2018-01-10 Martin Sebor <msebor@redhat.com>
23161 PR tree-optimization/83781
23162 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23165 2018-01-11 Martin Sebor <msebor@gmail.com>
23166 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23168 PR tree-optimization/83501
23169 PR tree-optimization/81703
23171 * tree-ssa-strlen.c (get_string_cst): Rename...
23172 (get_string_len): ...to this. Handle global constants.
23173 (handle_char_store): Adjust.
23175 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23176 Jim Wilson <jimw@sifive.com>
23178 * config/riscv/riscv-protos.h (riscv_output_return): New.
23179 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23180 (riscv_attribute_table, riscv_output_return),
23181 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23182 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23183 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23185 (riscv_expand_prologue): Add early return for naked function.
23186 (riscv_expand_epilogue): Likewise.
23187 (riscv_function_ok_for_sibcall): Return false for naked function.
23188 (riscv_set_current_function): New.
23189 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23190 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23191 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23192 * doc/extend.texi (RISC-V Function Attributes): New.
23194 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23196 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23197 check for 128-bit long double before checking TCmode.
23198 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23199 128-bit long doubles before checking TFmode or TCmode.
23200 (FLOAT128_IBM_P): Likewise.
23202 2018-01-10 Martin Sebor <msebor@redhat.com>
23204 PR tree-optimization/83671
23205 * builtins.c (c_strlen): Unconditionally return zero for the empty
23207 Use -Warray-bounds for warnings.
23208 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23209 for non-constant array indices with COMPONENT_REF, arrays of
23210 arrays, and pointers to arrays.
23211 (gimple_fold_builtin_strlen): Determine and set length range for
23212 non-constant character arrays.
23214 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23216 PR middle-end/81897
23217 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23220 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23222 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23224 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23227 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23228 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23229 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23230 indexed_or_indirect_operand predicate.
23231 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23232 (*vsx_le_perm_load_v8hi): Likewise.
23233 (*vsx_le_perm_load_v16qi): Likewise.
23234 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23235 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23236 (*vsx_le_perm_store_v8hi): Likewise.
23237 (*vsx_le_perm_store_v16qi): Likewise.
23238 (eight unnamed splitters): Likewise.
23240 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23242 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23243 * config/rs6000/emmintrin.h: Likewise.
23244 * config/rs6000/mmintrin.h: Likewise.
23245 * config/rs6000/xmmintrin.h: Likewise.
23247 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23250 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23252 * tree.c (tree_nop_conversion): Return true for location wrapper
23254 (maybe_wrap_with_location): New function.
23255 (selftest::check_strip_nops): New function.
23256 (selftest::test_location_wrappers): New function.
23257 (selftest::tree_c_tests): Call it.
23258 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23259 (maybe_wrap_with_location): New decl.
23260 (EXPR_LOCATION_WRAPPER_P): New macro.
23261 (location_wrapper_p): New inline function.
23262 (tree_strip_any_location_wrapper): New inline function.
23264 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23267 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23268 stack_realign_offset for the largest alignment of stack slot
23270 (ix86_find_max_used_stack_alignment): New function.
23271 (ix86_finalize_stack_frame_flags): Use it. Set
23272 max_used_stack_alignment if we don't realign stack.
23273 * config/i386/i386.h (machine_function): Add
23274 max_used_stack_alignment.
23276 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23278 * config/arm/arm.opt (-mbranch-cost): New option.
23279 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23282 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23285 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23286 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23288 2018-01-10 Richard Biener <rguenther@suse.de>
23291 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23292 early out so it also covers the case where we have a non-NULL
23295 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23297 PR tree-optimization/83753
23298 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23299 for non-strided grouped accesses if the number of elements is 1.
23301 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23304 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23305 * i386.h (TARGET_USE_GATHER): Define.
23306 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23308 2018-01-10 Martin Liska <mliska@suse.cz>
23311 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23312 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23314 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23315 CLEANUP_NO_PARTITIONING is not set.
23317 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23319 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23320 for vectors, as a partial revert of r254296.
23321 * rtl.h (const_vec_p): Delete.
23322 (const_vec_duplicate_p): Don't test for vector CONSTs.
23323 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23324 * expmed.c (make_tree): Likewise.
23327 * common.md (E, F): Use CONSTANT_P instead of checking for
23329 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23330 checking for CONST_VECTOR.
23332 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23334 PR middle-end/83575
23335 * predict.c (force_edge_cold): Handle in more sane way edges
23336 with no prediction.
23338 2018-01-09 Carl Love <cel@us.ibm.com>
23340 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23342 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23343 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23344 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23345 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23346 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23347 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23348 * config/rs6000/rs6000-protos.h: Add extern defition for
23349 rs6000_generate_float2_double_code.
23350 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23352 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23353 (float2_v2df): Add define_expand.
23355 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23358 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23359 op_mode in the force_to_mode call.
23361 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23363 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23364 instead of checking each element individually.
23365 (aarch64_evpc_uzp): Likewise.
23366 (aarch64_evpc_zip): Likewise.
23367 (aarch64_evpc_ext): Likewise.
23368 (aarch64_evpc_rev): Likewise.
23369 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23370 instead of checking each element individually. Return true without
23372 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23373 whether all selected elements come from the same input, instead of
23374 checking each element individually. Remove calls to gen_rtx_REG,
23375 start_sequence and end_sequence and instead assert that no rtl is
23378 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23380 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23381 order of HIGH and CONST checks.
23383 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23385 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23386 if the destination isn't an SSA_NAME.
23388 2018-01-09 Richard Biener <rguenther@suse.de>
23390 PR tree-optimization/83668
23391 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23393 (canonicalize_loop_form): ... here, renamed from ...
23394 (canonicalize_loop_closed_ssa_form): ... this and amended to
23395 swap successor edges for loop exit blocks to make us use
23396 the RPO order we need for initial schedule generation.
23398 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23400 PR tree-optimization/64811
23401 * match.pd: When optimizing comparisons with Inf, avoid
23402 introducing or losing exceptions from comparisons with NaN.
23404 2018-01-09 Martin Liska <mliska@suse.cz>
23407 * asan.c (shadow_mem_size): Add gcc_assert.
23409 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23411 Don't save registers in main().
23414 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23415 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23416 * config/avr/avr.c (avr_set_current_function): Don't error if
23417 naked, OS_task or OS_main are specified at the same time.
23418 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23420 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23422 * common/config/avr/avr-common.c (avr_option_optimization_table):
23423 Switch on -mmain-is-OS_task for optimizing compilations.
23425 2018-01-09 Richard Biener <rguenther@suse.de>
23427 PR tree-optimization/83572
23428 * graphite.c: Include cfganal.h.
23429 (graphite_transform_loops): Connect infinite loops to exit
23430 and remove fake edges at the end.
23432 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23434 * ipa-inline.c (edge_badness): Revert accidental checkin.
23436 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23439 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23440 symbols; not inline clones.
23442 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23445 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23446 hard registers. Formatting fixes.
23448 PR preprocessor/83722
23449 * gcc.c (try_generate_repro): Pass
23450 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23451 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23454 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23455 Kito Cheng <kito.cheng@gmail.com>
23457 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23458 (riscv_leaf_function_p): Delete.
23459 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23461 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23463 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23465 (do_ifelse): New function.
23466 (do_isel): New function.
23467 (do_sub3): New function.
23468 (do_add3): New function.
23469 (do_load_mask_compare): New function.
23470 (do_overlap_load_compare): New function.
23471 (expand_compare_loop): New function.
23472 (expand_block_compare): Call expand_compare_loop() when appropriate.
23473 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23474 option description.
23475 (-mblock-compare-inline-loop-limit): New option.
23477 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23480 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23481 Reverse order of second and third operands in first alternative.
23482 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23483 of first and second elements in UNSPEC_VPERMR vector.
23484 (altivec_expand_vec_perm_le): Likewise.
23486 2018-01-08 Jeff Law <law@redhat.com>
23488 PR rtl-optimizatin/81308
23489 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23490 (process_switch): If group_case_labels makes a change, then set
23492 (pass_convert_switch::execute): If a switch is converted, then
23493 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23495 PR rtl-optimization/81308
23496 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23499 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23501 PR target/83663 - Revert r255946
23502 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23503 generation for cases where splatting a value is not useful.
23504 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23505 across a vec_duplicate and a paradoxical subreg forming a vector
23506 mode to a vec_concat.
23508 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23510 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23511 -march=armv8.3-a variants.
23512 * config/arm/t-multilib: Likewise.
23513 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23515 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23517 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23519 (cceq_ior_compare_complement): Give it a name so I can use it, and
23520 change boolean_or_operator predicate to boolean_operator so it can
23521 be used to generate a crand.
23522 (eqne): New code iterator.
23523 (bd/bd_neg): New code_attrs.
23524 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23525 a single define_insn.
23526 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23527 decrement (bdnzt/bdnzf/bdzt/bdzf).
23528 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23529 with the new names of the branch decrement patterns, and added the
23530 names of the branch decrement conditional patterns.
23532 2018-01-08 Richard Biener <rguenther@suse.de>
23534 PR tree-optimization/83563
23535 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23538 2018-01-08 Richard Biener <rguenther@suse.de>
23540 PR middle-end/83713
23541 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23543 2018-01-08 Richard Biener <rguenther@suse.de>
23545 PR tree-optimization/83685
23546 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23547 references to abnormals.
23549 2018-01-08 Richard Biener <rguenther@suse.de>
23552 * dwarf2out.c (output_indirect_strings): Handle empty
23553 skeleton_debug_str_hash.
23554 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23556 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23558 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23559 (emit_store_direct): Likewise.
23560 (arc_trampoline_adjust_address): Likewise.
23561 (arc_asm_trampoline_template): New function.
23562 (arc_initialize_trampoline): Use asm_trampoline_template.
23563 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23564 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23565 * config/arc/arc.md (flush_icache): Delete pattern.
23567 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23569 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23570 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23573 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23576 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23577 by not USED_FOR_TARGET.
23578 (make_pass_resolve_sw_modes): Likewise.
23580 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23582 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23585 2018-01-08 Richard Biener <rguenther@suse.de>
23587 PR middle-end/83580
23588 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23590 2018-01-08 Richard Biener <rguenther@suse.de>
23592 PR middle-end/83517
23593 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23595 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23597 PR middle-end/81897
23598 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23599 basic blocks with a small number of successors.
23600 (convert_control_dep_chain_into_preds): Improve handling of
23602 (dump_predicates): Split apart into...
23603 (dump_pred_chain): ...here...
23604 (dump_pred_info): ...and here.
23605 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23606 (can_chain_union_be_invalidated_p): Improve check for invalidation
23608 (uninit_uses_cannot_happen): Avoid unnecessary if
23609 convert_control_dep_chain_into_preds yielded nothing.
23611 2018-01-06 Martin Sebor <msebor@redhat.com>
23613 PR tree-optimization/83640
23614 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23615 subtracting negative offset from size.
23616 (builtin_access::overlap): Adjust offset bounds of the access to fall
23617 within the size of the object if possible.
23619 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23621 PR rtl-optimization/83699
23622 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23623 extract_bit_field_as_subreg to cases in which the extracted
23624 value is also a vector.
23626 * lra-constraints.c (process_alt_operands): Test for the equivalence
23627 substitutions when detecting a possible reload cycle.
23629 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23632 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23633 by default if flag_selective_schedling{,2}. Formatting fixes.
23635 PR rtl-optimization/83682
23636 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23637 if it has non-VECTOR_MODE element mode.
23638 (vec_duplicate_p): Likewise.
23640 PR middle-end/83694
23641 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23642 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23644 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23647 * config/i386/i386-builtin.def
23648 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23649 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23650 Require also OPTION_MASK_ISA_AVX512F in addition to
23651 OPTION_MASK_ISA_GFNI.
23652 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23653 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23654 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23655 to OPTION_MASK_ISA_GFNI.
23656 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23657 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23658 OPTION_MASK_ISA_AVX512BW.
23659 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23660 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23661 addition to OPTION_MASK_ISA_GFNI.
23662 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23663 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23664 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23665 to OPTION_MASK_ISA_GFNI.
23666 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23667 a requirement for all ISAs rather than any of them with a few
23669 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23671 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23672 bitmasks to be enabled with 3 exceptions, instead of requiring any
23673 enabled ISA with lots of exceptions.
23674 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23675 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23676 Change avx512bw in isa attribute to avx512f.
23677 * config/i386/sgxintrin.h: Add license boilerplate.
23678 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23679 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23680 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23681 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23683 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23684 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23685 temporarily sse2 rather than sse if not enabled already.
23688 * config/i386/sse.md (VI248_VLBW): Rename to ...
23689 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23690 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23691 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23692 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23693 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23694 mode iterator instead of VI248_VLBW.
23696 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23698 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23699 (record_modified): Skip clobbers; add debug output.
23700 (param_change_prob): Use sreal frequencies.
23702 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23704 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23705 punt for user-aligned variables.
23707 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23709 * tree-chrec.c (chrec_contains_symbols): Return true for
23712 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23715 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23716 of (x|y) == x for BICS pattern.
23718 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23720 PR tree-optimization/83605
23721 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23722 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23725 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23727 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23728 * config/epiphany/rtems.h: New file.
23730 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23731 Uros Bizjak <ubizjak@gmail.com>
23734 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23735 QIreg_operand instead of register_operand predicate.
23736 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23737 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23738 comments instead of -fmitigate[-_]rop.
23740 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23743 * cgraphunit.c (symbol_table::compile): Switch to text_section
23744 before calling assembly_start debug hook.
23745 * run-rtl-passes.c (run_rtl_passes): Likewise.
23748 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23750 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23751 range_int_cst_p rather than !symbolic_range_p before calling
23752 extract_range_from_multiplicative_op_1.
23754 2018-01-04 Jeff Law <law@redhat.com>
23756 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23757 redundant test in assertion.
23759 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23761 * doc/rtl.texi: Document machine_mode wrapper classes.
23763 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23765 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23766 using tree_to_uhwi.
23768 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23770 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23771 the VEC_PERM_EXPR fold to fail.
23773 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23776 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23777 to switched_sections.
23779 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23782 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23783 test for d.testing.
23785 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23788 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23789 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23791 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23794 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23795 is BLKmode and bitpos not zero or mode change is needed.
23797 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23800 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23803 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23806 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23807 instead of MULT rtx. Update all corresponding splitters.
23808 (*saddl_se): Ditto.
23809 (*ssub<modesuffix>): Ditto.
23810 (*ssubl_se): Ditto.
23811 (*cmp_sadd_di): Update split patterns.
23812 (*cmp_sadd_si): Ditto.
23813 (*cmp_sadd_sidi): Ditto.
23814 (*cmp_ssub_di): Ditto.
23815 (*cmp_ssub_si): Ditto.
23816 (*cmp_ssub_sidi): Ditto.
23817 * config/alpha/predicates.md (const23_operand): New predicate.
23818 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23819 Look for ASHIFT, not MULT inner operand.
23820 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23822 2018-01-04 Martin Liska <mliska@suse.cz>
23824 PR gcov-profile/83669
23825 * gcov.c (output_intermediate_file): Add version to intermediate
23827 * doc/gcov.texi: Document new field 'version' in intermediate
23828 file format. Fix location of '-k' option of gcov command.
23830 2018-01-04 Martin Liska <mliska@suse.cz>
23833 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23835 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23837 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23839 2018-01-03 Martin Sebor <msebor@redhat.com>
23841 PR tree-optimization/83655
23842 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23843 checking calls with invalid arguments.
23845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23847 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23848 (vectorizable_mask_load_store): Delete.
23849 (vectorizable_call): Return false for masked loads and stores.
23850 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23851 instead of gimple_assign_rhs1.
23852 (vectorizable_load): Handle IFN_MASK_LOAD.
23853 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23855 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23857 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23859 (vectorizable_mask_load_store): ...here.
23860 (vectorizable_load): ...and here.
23862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23864 * tree-vect-stmts.c (vect_build_all_ones_mask)
23865 (vect_build_zero_merge_argument): New functions, split out from...
23866 (vectorizable_load): ...here.
23868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23870 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23872 (vectorizable_mask_load_store): ...here.
23873 (vectorizable_store): ...and here.
23875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23877 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23879 (vectorizable_mask_load_store): ...here.
23881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23883 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23884 (vect_model_store_cost): Take a vec_load_store_type instead of a
23886 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23887 (vect_model_store_cost): Take a vec_load_store_type instead of a
23889 (vectorizable_mask_load_store): Update accordingly.
23890 (vectorizable_store): Likewise.
23891 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23895 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23896 IFN_MASK_LOAD calls here rather than...
23897 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23900 Alan Hayward <alan.hayward@arm.com>
23901 David Sherwood <david.sherwood@arm.com>
23903 * expmed.c (extract_bit_field_1): For vector extracts,
23904 fall back to extract_bit_field_as_subreg if vec_extract
23907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23908 Alan Hayward <alan.hayward@arm.com>
23909 David Sherwood <david.sherwood@arm.com>
23911 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23912 they are variable or constant sized.
23913 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23914 slots for constant-sized data.
23916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23917 Alan Hayward <alan.hayward@arm.com>
23918 David Sherwood <david.sherwood@arm.com>
23920 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23921 handling COND_EXPRs with boolean comparisons, try to find a better
23922 basis for the mask type than the boolean itself.
23924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23926 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23927 is calculated and how it can be overridden.
23928 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23929 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23931 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23935 Alan Hayward <alan.hayward@arm.com>
23936 David Sherwood <david.sherwood@arm.com>
23938 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23939 Remove the mode argument.
23940 (aarch64_simd_valid_immediate): Remove the mode and inverse
23942 * config/aarch64/iterators.md (bitsize): New iterator.
23943 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23944 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23945 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23946 aarch64_simd_valid_immediate.
23947 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23948 (aarch64_reg_or_bic_imm): Likewise.
23949 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23950 with an insn_type enum and msl with a modifier_type enum.
23951 Replace element_width with a scalar_mode. Change the shift
23952 to unsigned int. Add constructors for scalar_float_mode and
23953 scalar_int_mode elements.
23954 (aarch64_vect_float_const_representable_p): Delete.
23955 (aarch64_can_const_movi_rtx_p)
23956 (aarch64_simd_scalar_immediate_valid_for_move)
23957 (aarch64_simd_make_constant): Update call to
23958 aarch64_simd_valid_immediate.
23959 (aarch64_advsimd_valid_immediate_hs): New function.
23960 (aarch64_advsimd_valid_immediate): Likewise.
23961 (aarch64_simd_valid_immediate): Remove mode and inverse
23962 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23963 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23964 and aarch64_float_const_representable_p on the result.
23965 (aarch64_output_simd_mov_immediate): Remove mode argument.
23966 Update call to aarch64_simd_valid_immediate and use of
23967 simd_immediate_info.
23968 (aarch64_output_scalar_simd_mov_immediate): Update call
23971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23972 Alan Hayward <alan.hayward@arm.com>
23973 David Sherwood <david.sherwood@arm.com>
23975 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23976 (mode_nunits): Likewise CONST_MODE_NUNITS.
23977 * machmode.def (ADJUST_NUNITS): Document.
23978 * genmodes.c (mode_data::need_nunits_adj): New field.
23979 (blank_mode): Update accordingly.
23980 (adj_nunits): New variable.
23981 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23983 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23984 listed in adj_nunits.
23985 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23986 listed in adj_nunits. Don't emit case statements for such modes.
23987 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23988 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23989 nothing if adj_nunits is nonnull.
23990 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23991 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23992 (emit_mode_fbit): Update use of print_maybe_const_decl.
23993 (emit_move_size): Likewise. Treat the array as non-const
23995 (emit_mode_adjustments): Handle adj_nunits.
23997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23999 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24000 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24001 (VECTOR_MODES): Use it.
24002 (make_vector_modes): Take the prefix as an argument.
24004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24005 Alan Hayward <alan.hayward@arm.com>
24006 David Sherwood <david.sherwood@arm.com>
24008 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24009 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24010 for MODE_VECTOR_BOOL.
24011 * machmode.def (VECTOR_BOOL_MODE): Document.
24012 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24013 (make_vector_bool_mode): New function.
24014 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24016 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24017 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24019 * stor-layout.c (int_mode_for_mode): Likewise.
24020 * tree.c (build_vector_type_for_mode): Likewise.
24021 * varasm.c (output_constant_pool_2): Likewise.
24022 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24023 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24024 for MODE_VECTOR_BOOL.
24025 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24026 of mode class checks.
24027 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24028 instead of a list of mode class checks.
24029 (expand_vector_scalar_condition): Likewise.
24030 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24033 Alan Hayward <alan.hayward@arm.com>
24034 David Sherwood <david.sherwood@arm.com>
24036 * machmode.h (mode_size): Change from unsigned short to
24038 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24039 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24040 or if measurement_type is not polynomial.
24041 (fixed_size_mode::includes_p): Check for constant-sized modes.
24042 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24043 return a poly_uint16 rather than an unsigned short.
24044 (emit_mode_size): Change the type of mode_size from unsigned short
24045 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24046 (emit_mode_adjustments): Cope with polynomial vector sizes.
24047 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24049 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24051 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24052 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24053 * caller-save.c (setup_save_areas): Likewise.
24054 (replace_reg_with_saved_mem): Likewise.
24055 * calls.c (emit_library_call_value_1): Likewise.
24056 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24057 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24058 (gen_lowpart_for_combine): Likewise.
24059 * convert.c (convert_to_integer_1): Likewise.
24060 * cse.c (equiv_constant, cse_insn): Likewise.
24061 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24062 (cselib_subst_to_values): Likewise.
24063 * dce.c (word_dce_process_block): Likewise.
24064 * df-problems.c (df_word_lr_mark_ref): Likewise.
24065 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24066 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24067 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24068 (rtl_for_decl_location): Likewise.
24069 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24070 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24071 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24072 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24073 (expand_expr_real_1): Likewise.
24074 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24075 (pad_below): Likewise.
24076 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24077 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24078 * ira.c (get_subreg_tracking_sizes): Likewise.
24079 * ira-build.c (ira_create_allocno_objects): Likewise.
24080 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24081 (ira_sort_regnos_for_alter_reg): Likewise.
24082 * ira-costs.c (record_operand_costs): Likewise.
24083 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24084 (resolve_simple_move): Likewise.
24085 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24086 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24087 (lra_constraints): Likewise.
24088 (CONST_POOL_OK_P): Reject variable-sized modes.
24089 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24090 (add_pseudo_to_slot, lra_spill): Likewise.
24091 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24092 * optabs-query.c (get_best_extraction_insn): Likewise.
24093 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24094 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24095 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24096 * recog.c (offsettable_address_addr_space_p): Likewise.
24097 * regcprop.c (maybe_mode_change): Likewise.
24098 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24099 * regrename.c (build_def_use): Likewise.
24100 * regstat.c (dump_reg_info): Likewise.
24101 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24102 (find_reloads, find_reloads_subreg_address): Likewise.
24103 * reload1.c (eliminate_regs_1): Likewise.
24104 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24105 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24106 (simplify_binary_operation_1, simplify_subreg): Likewise.
24107 * targhooks.c (default_function_arg_padding): Likewise.
24108 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24109 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24110 (verify_gimple_assign_ternary): Likewise.
24111 * tree-inline.c (estimate_move_cost): Likewise.
24112 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24113 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24114 (get_address_cost_ainc): Likewise.
24115 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24116 (vect_supportable_dr_alignment): Likewise.
24117 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24118 (vectorizable_reduction): Likewise.
24119 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24120 (vectorizable_operation, vectorizable_load): Likewise.
24121 * tree.c (build_same_sized_truth_vector_type): Likewise.
24122 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24123 * var-tracking.c (emit_note_insn_var_location): Likewise.
24124 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24125 (ADDR_VEC_ALIGN): Likewise.
24127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24128 Alan Hayward <alan.hayward@arm.com>
24129 David Sherwood <david.sherwood@arm.com>
24131 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24133 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24134 or if measurement_type is polynomial.
24135 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24136 * combine.c (make_extraction): Likewise.
24137 * dse.c (find_shift_sequence): Likewise.
24138 * dwarf2out.c (mem_loc_descriptor): Likewise.
24139 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24140 (extract_bit_field, extract_low_bits): Likewise.
24141 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24142 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24143 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24144 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24145 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24146 * reload.c (find_reloads): Likewise.
24147 * reload1.c (alter_reg): Likewise.
24148 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24149 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24150 * tree-if-conv.c (predicate_mem_writes): Likewise.
24151 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24152 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24153 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24154 * valtrack.c (dead_debug_insert_temp): Likewise.
24155 * varasm.c (mergeable_constant_section): Likewise.
24156 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24159 Alan Hayward <alan.hayward@arm.com>
24160 David Sherwood <david.sherwood@arm.com>
24162 * expr.c (expand_assignment): Cope with polynomial mode sizes
24163 when assigning to a CONCAT.
24165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24166 Alan Hayward <alan.hayward@arm.com>
24167 David Sherwood <david.sherwood@arm.com>
24169 * machmode.h (mode_precision): Change from unsigned short to
24171 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24173 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24174 or if measurement_type is not polynomial.
24175 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24176 in which the mode is already known to be a scalar_int_mode.
24177 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24178 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24180 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24181 for GET_MODE_PRECISION.
24182 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24183 for GET_MODE_PRECISION.
24184 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24186 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24187 (expand_field_assignment, make_extraction): Likewise.
24188 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24189 (get_last_value): Likewise.
24190 * convert.c (convert_to_integer_1): Likewise.
24191 * cse.c (cse_insn): Likewise.
24192 * expr.c (expand_expr_real_1): Likewise.
24193 * lra-constraints.c (simplify_operand_subreg): Likewise.
24194 * optabs-query.c (can_atomic_load_p): Likewise.
24195 * optabs.c (expand_atomic_load): Likewise.
24196 (expand_atomic_store): Likewise.
24197 * ree.c (combine_reaching_defs): Likewise.
24198 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24199 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24200 * tree.h (type_has_mode_precision_p): Likewise.
24201 * ubsan.c (instrument_si_overflow): Likewise.
24203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24204 Alan Hayward <alan.hayward@arm.com>
24205 David Sherwood <david.sherwood@arm.com>
24207 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24208 polynomial numbers of units.
24209 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24210 (valid_vector_subparts_p): New function.
24211 (build_vector_type): Remove temporary shim and take the number
24212 of units as a poly_uint64 rather than an int.
24213 (build_opaque_vector_type): Take the number of units as a
24214 poly_uint64 rather than an int.
24215 * tree.c (build_vector_from_ctor): Handle polynomial
24216 TYPE_VECTOR_SUBPARTS.
24217 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24218 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24219 (build_vector_from_val): If the number of units is variable,
24220 use build_vec_duplicate_cst for constant operands and
24221 VEC_DUPLICATE_EXPR otherwise.
24222 (make_vector_type): Remove temporary is_constant ().
24223 (build_vector_type, build_opaque_vector_type): Take the number of
24224 units as a poly_uint64 rather than an int.
24225 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24227 * cfgexpand.c (expand_debug_expr): Likewise.
24228 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24229 (store_constructor, expand_expr_real_1): Likewise.
24230 (const_scalar_mask_from_tree): Likewise.
24231 * fold-const-call.c (fold_const_reduction): Likewise.
24232 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24233 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24234 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24235 (fold_relational_const): Likewise.
24236 (native_interpret_vector): Likewise. Change the size from an
24237 int to an unsigned int.
24238 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24239 TYPE_VECTOR_SUBPARTS.
24240 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24241 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24242 duplicating a non-constant operand into a variable-length vector.
24243 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24244 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24245 * ipa-icf.c (sem_variable::equals): Likewise.
24246 * match.pd: Likewise.
24247 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24248 * print-tree.c (print_node): Likewise.
24249 * stor-layout.c (layout_type): Likewise.
24250 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24251 * tree-cfg.c (verify_gimple_comparison): Likewise.
24252 (verify_gimple_assign_binary): Likewise.
24253 (verify_gimple_assign_ternary): Likewise.
24254 (verify_gimple_assign_single): Likewise.
24255 * tree-pretty-print.c (dump_generic_node): Likewise.
24256 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24257 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24258 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24259 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24260 (vect_shift_permute_load_chain): Likewise.
24261 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24262 (expand_vector_condition, optimize_vector_constructor): Likewise.
24263 (lower_vec_perm, get_compute_type): Likewise.
24264 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24265 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24266 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24267 (vect_recog_mask_conversion_pattern): Likewise.
24268 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24269 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24270 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24271 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24272 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24273 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24274 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24275 (supportable_widening_operation): Likewise.
24276 (supportable_narrowing_operation): Likewise.
24277 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24279 * varasm.c (output_constant): Likewise.
24281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24282 Alan Hayward <alan.hayward@arm.com>
24283 David Sherwood <david.sherwood@arm.com>
24285 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24286 so that both the length == 3 and length != 3 cases set up their
24287 own permute vectors. Add comments explaining why we know the
24288 number of elements is constant.
24289 (vect_permute_load_chain): Likewise.
24291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24295 * machmode.h (mode_nunits): Change from unsigned char to
24297 (ONLY_FIXED_SIZE_MODES): New macro.
24298 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24299 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24300 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24302 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24303 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24304 or if measurement_type is not polynomial.
24305 * genmodes.c (ZERO_COEFFS): New macro.
24306 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24308 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24309 Use ZERO_COEFFS when emitting initializers.
24310 * data-streamer.h (bp_pack_poly_value): New function.
24311 (bp_unpack_poly_value): Likewise.
24312 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24313 for GET_MODE_NUNITS.
24314 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24315 for GET_MODE_NUNITS.
24316 * tree.c (make_vector_type): Remove temporary shim and make
24317 the real function take the number of units as a poly_uint64
24318 rather than an int.
24319 (build_vector_type_for_mode): Handle polynomial nunits.
24320 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24321 * emit-rtl.c (const_vec_series_p_1): Likewise.
24322 (gen_rtx_CONST_VECTOR): Likewise.
24323 * fold-const.c (test_vec_duplicate_folding): Likewise.
24324 * genrecog.c (validate_pattern): Likewise.
24325 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24326 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24327 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24328 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24329 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24330 * rtlanal.c (subreg_get_info): Likewise.
24331 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24332 (vect_grouped_load_supported): Likewise.
24333 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24334 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24335 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24336 (simplify_const_unary_operation, simplify_binary_operation_1)
24337 (simplify_const_binary_operation, simplify_ternary_operation)
24338 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24339 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24340 instead of CONST_VECTOR_NUNITS.
24341 * varasm.c (output_constant_pool_2): Likewise.
24342 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24343 explicit-encoded elements in the XVEC for variable-length vectors.
24345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24347 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24350 Alan Hayward <alan.hayward@arm.com>
24351 David Sherwood <david.sherwood@arm.com>
24353 * coretypes.h (fixed_size_mode): Declare.
24354 (fixed_size_mode_pod): New typedef.
24355 * builtins.h (target_builtins::x_apply_args_mode)
24356 (target_builtins::x_apply_result_mode): Change type to
24357 fixed_size_mode_pod.
24358 * builtins.c (apply_args_size, apply_result_size, result_vector)
24359 (expand_builtin_apply_args_1, expand_builtin_apply)
24360 (expand_builtin_return): Update accordingly.
24362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24364 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24365 * cselib.c (cselib_hash_rtx): Likewise.
24366 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24367 CONST_VECTOR encoding.
24369 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24370 Jeff Law <law@redhat.com>
24373 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24374 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24375 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24376 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24379 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24380 explicitly probe *sp in a noreturn function if there were any callee
24381 register saves or frame pointer is needed.
24383 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24386 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24387 BLKmode for ternary, binary or unary expressions.
24390 * var-tracking.c (delete_vta_debug_insn): New inline function.
24391 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24392 insns from get_insns () to NULL instead of each bb separately.
24393 Use delete_vta_debug_insn. No longer static.
24394 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24395 delete_vta_debug_insns callers.
24396 * rtl.h (delete_vta_debug_insns): Declare.
24397 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24398 instead of variable_tracking_main.
24400 2018-01-03 Martin Sebor <msebor@redhat.com>
24402 PR tree-optimization/83603
24403 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24404 arguments past the endof the argument list in functions declared
24405 without a prototype.
24406 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24407 Avoid checking when arguments are null.
24409 2018-01-03 Martin Sebor <msebor@redhat.com>
24412 * doc/extend.texi (attribute const): Fix a typo.
24413 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24414 issuing -Wsuggest-attribute for void functions.
24416 2018-01-03 Martin Sebor <msebor@redhat.com>
24418 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24419 offset_int::from instead of wide_int::to_shwi.
24420 (maybe_diag_overlap): Remove assertion.
24421 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24422 * gimple-ssa-sprintf.c (format_directive): Same.
24423 (parse_directive): Same.
24424 (sprintf_dom_walker::compute_format_length): Same.
24425 (try_substitute_return_value): Same.
24427 2018-01-03 Jeff Law <law@redhat.com>
24429 PR middle-end/83654
24430 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24431 non-constant residual for zero at runtime and avoid probing in
24432 that case. Reorganize code for trailing problem to mirror handling
24435 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24437 PR tree-optimization/83501
24438 * tree-ssa-strlen.c (get_string_cst): New.
24439 (handle_char_store): Call get_string_cst.
24441 2018-01-03 Martin Liska <mliska@suse.cz>
24443 PR tree-optimization/83593
24444 * tree-ssa-strlen.c: Include tree-cfg.h.
24445 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24446 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24447 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24449 (strlen_dom_walker::before_dom_children): Call
24450 gimple_purge_dead_eh_edges. Dump tranformation with details
24452 (strlen_dom_walker::before_dom_children): Update call by adding
24453 new argument cleanup_eh.
24454 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24456 2018-01-03 Martin Liska <mliska@suse.cz>
24459 * cif-code.def (VARIADIC_THUNK): New enum value.
24460 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24463 2018-01-03 Jan Beulich <jbeulich@suse.com>
24465 * sse.md (mov<mode>_internal): Tighten condition for when to use
24466 vmovdqu<ssescalarsize> for TI and OI modes.
24468 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24470 Update copyright years.
24472 2018-01-03 Martin Liska <mliska@suse.cz>
24475 * ipa-visibility.c (function_and_variable_visibility): Skip
24476 functions with noipa attribure.
24478 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24480 * gcc.c (process_command): Update copyright notice dates.
24481 * gcov-dump.c (print_version): Ditto.
24482 * gcov.c (print_version): Ditto.
24483 * gcov-tool.c (print_version): Ditto.
24484 * gengtype.c (create_file): Ditto.
24485 * doc/cpp.texi: Bump @copying's copyright year.
24486 * doc/cppinternals.texi: Ditto.
24487 * doc/gcc.texi: Ditto.
24488 * doc/gccint.texi: Ditto.
24489 * doc/gcov.texi: Ditto.
24490 * doc/install.texi: Ditto.
24491 * doc/invoke.texi: Ditto.
24493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24495 * vector-builder.h (vector_builder::m_full_nelts): Change from
24496 unsigned int to poly_uint64.
24497 (vector_builder::full_nelts): Update prototype accordingly.
24498 (vector_builder::new_vector): Likewise.
24499 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24500 (vector_builder::operator ==): Likewise.
24501 (vector_builder::finalize): Likewise.
24502 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24503 Take the number of elements as a poly_uint64 rather than an
24505 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24506 from unsigned int to poly_uint64.
24507 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24508 (vec_perm_indices::new_vector): Likewise.
24509 (vec_perm_indices::length): Likewise.
24510 (vec_perm_indices::nelts_per_input): Likewise.
24511 (vec_perm_indices::input_nelts): Likewise.
24512 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24513 number of elements per input as a poly_uint64 rather than an
24514 unsigned int. Use the original encoding for variable-length
24515 vectors, rather than clamping each individual element.
24516 For the second and subsequent elements in each pattern,
24517 clamp the step and base before clamping their sum.
24518 (vec_perm_indices::series_p): Handle polynomial element counts.
24519 (vec_perm_indices::all_in_range_p): Likewise.
24520 (vec_perm_indices_to_tree): Likewise.
24521 (vec_perm_indices_to_rtx): Likewise.
24522 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24523 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24524 (tree_vector_builder::new_binary_operation): Handle polynomial
24525 element counts. Return false if we need to know the number
24526 of elements at compile time.
24527 * fold-const.c (fold_vec_perm): Punt if the number of elements
24528 isn't known at compile time.
24530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24532 * vec-perm-indices.h (vec_perm_builder): Change element type
24533 from HOST_WIDE_INT to poly_int64.
24534 (vec_perm_indices::element_type): Update accordingly.
24535 (vec_perm_indices::clamp): Handle polynomial element_types.
24536 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24537 (vec_perm_indices::all_in_range_p): Likewise.
24538 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24540 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24541 polynomial vec_perm_indices element types.
24542 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24543 * fold-const.c (fold_vec_perm): Likewise.
24544 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24545 * tree-vect-generic.c (lower_vec_perm): Likewise.
24546 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24547 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24548 element type to HOST_WIDE_INT.
24550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24551 Alan Hayward <alan.hayward@arm.com>
24552 David Sherwood <david.sherwood@arm.com>
24554 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24555 rather than an int. Use plus_constant.
24556 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24557 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24560 Alan Hayward <alan.hayward@arm.com>
24561 David Sherwood <david.sherwood@arm.com>
24563 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24564 a HOST_WIDE_INT to a poly_int64.
24566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24567 Alan Hayward <alan.hayward@arm.com>
24568 David Sherwood <david.sherwood@arm.com>
24570 * calls.c (load_register_parameters): Cope with polynomial
24571 mode sizes. Require a constant size for BLKmode parameters
24572 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24573 forces a parameter to be padded at the lsb end in order to
24574 fill a complete number of words, require the parameter size
24575 to be ordered wrt UNITS_PER_WORD.
24577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24578 Alan Hayward <alan.hayward@arm.com>
24579 David Sherwood <david.sherwood@arm.com>
24581 * reload1.c (spill_stack_slot_width): Change element type
24582 from unsigned int to poly_uint64_pod.
24583 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
24590 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
24597 operands whose sizes aren't ordered.
24598 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24605 that the mode size is in the set {1, 2, 4, 8, 16}.
24607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24608 Alan Hayward <alan.hayward@arm.com>
24609 David Sherwood <david.sherwood@arm.com>
24611 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24612 Use plus_constant instead of gen_rtx_PLUS.
24614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24615 Alan Hayward <alan.hayward@arm.com>
24616 David Sherwood <david.sherwood@arm.com>
24618 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24619 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24620 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24621 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24622 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24623 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24624 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24625 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24626 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24627 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24629 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24630 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24631 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24632 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24633 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24634 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24635 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24636 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24637 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24638 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24640 * expr.c (emit_move_resolve_push): Treat the input and result
24641 of PUSH_ROUNDING as a poly_int64.
24642 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24643 (emit_push_insn): Likewise.
24644 * lra-eliminations.c (mark_not_eliminable): Likewise.
24645 * recog.c (push_operand): Likewise.
24646 * reload1.c (elimination_effects): Likewise.
24647 * rtlanal.c (nonzero_bits1): Likewise.
24648 * calls.c (store_one_arg): Likewise. Require the padding to be
24649 known at compile time.
24651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24652 Alan Hayward <alan.hayward@arm.com>
24653 David Sherwood <david.sherwood@arm.com>
24655 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24656 Use plus_constant instead of gen_rtx_PLUS.
24658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24659 Alan Hayward <alan.hayward@arm.com>
24660 David Sherwood <david.sherwood@arm.com>
24662 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24663 rather than an int.
24665 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24666 Alan Hayward <alan.hayward@arm.com>
24667 David Sherwood <david.sherwood@arm.com>
24669 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24670 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24671 via stack temporaries. Treat the mode size as polynomial too.
24673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24674 Alan Hayward <alan.hayward@arm.com>
24675 David Sherwood <david.sherwood@arm.com>
24677 * expr.c (expand_expr_real_2): When handling conversions involving
24678 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24679 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24680 as a poly_uint64 too.
24682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24683 Alan Hayward <alan.hayward@arm.com>
24684 David Sherwood <david.sherwood@arm.com>
24686 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
24693 REGMODE_NATURAL_SIZE.
24694 * expmed.c (store_bit_field_1): Likewise.
24695 * expr.c (store_constructor): Likewise.
24696 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24697 and polynomial REGMODE_NATURAL_SIZE.
24698 (gen_lowpart_common): Likewise.
24699 * reginfo.c (record_subregs_of_mode): Likewise.
24700 * rtlanal.c (read_modify_subreg_p): Likewise.
24702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24703 Alan Hayward <alan.hayward@arm.com>
24704 David Sherwood <david.sherwood@arm.com>
24706 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24707 numbers of elements.
24709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24710 Alan Hayward <alan.hayward@arm.com>
24711 David Sherwood <david.sherwood@arm.com>
24713 * match.pd: Cope with polynomial numbers of vector elements.
24715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24716 Alan Hayward <alan.hayward@arm.com>
24717 David Sherwood <david.sherwood@arm.com>
24719 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24720 in a POINTER_PLUS_EXPR.
24722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24723 Alan Hayward <alan.hayward@arm.com>
24724 David Sherwood <david.sherwood@arm.com>
24726 * omp-simd-clone.c (simd_clone_subparts): New function.
24727 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24728 (ipa_simd_modify_function_body): Likewise.
24730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24731 Alan Hayward <alan.hayward@arm.com>
24732 David Sherwood <david.sherwood@arm.com>
24734 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24735 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24736 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24737 (expand_vector_condition, vector_element): Likewise.
24738 (subparts_gt): New function.
24739 (get_compute_type): Use subparts_gt.
24740 (count_type_subparts): Delete.
24741 (expand_vector_operations_1): Use subparts_gt instead of
24742 count_type_subparts.
24744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24745 Alan Hayward <alan.hayward@arm.com>
24746 David Sherwood <david.sherwood@arm.com>
24748 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24749 (vect_compile_time_alias): ...this new function. Do the calculation
24750 on poly_ints rather than trees.
24751 (vect_prune_runtime_alias_test_list): Update call accordingly.
24753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24754 Alan Hayward <alan.hayward@arm.com>
24755 David Sherwood <david.sherwood@arm.com>
24757 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24759 (vect_schedule_slp_instance): Likewise.
24761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24762 Alan Hayward <alan.hayward@arm.com>
24763 David Sherwood <david.sherwood@arm.com>
24765 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24766 constant and extern definitions for variable-length vectors.
24767 (vect_get_constant_vectors): Note that the number of units
24768 is known to be constant.
24770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24771 Alan Hayward <alan.hayward@arm.com>
24772 David Sherwood <david.sherwood@arm.com>
24774 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24775 of units as polynomial. Choose between WIDE and NARROW based
24778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24779 Alan Hayward <alan.hayward@arm.com>
24780 David Sherwood <david.sherwood@arm.com>
24782 * tree-vect-stmts.c (simd_clone_subparts): New function.
24783 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24786 Alan Hayward <alan.hayward@arm.com>
24787 David Sherwood <david.sherwood@arm.com>
24789 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24790 vectors as polynomial. Use build_index_vector for
24791 IFN_GOMP_SIMD_LANE.
24793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24794 Alan Hayward <alan.hayward@arm.com>
24795 David Sherwood <david.sherwood@arm.com>
24797 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24798 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24799 for variable-length vectors.
24800 (vectorizable_mask_load_store): Treat the number of units as
24801 polynomial, asserting that it is constant if the condition has
24802 already been enforced.
24803 (vectorizable_store, vectorizable_load): Likewise.
24805 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24806 Alan Hayward <alan.hayward@arm.com>
24807 David Sherwood <david.sherwood@arm.com>
24809 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24810 of units as polynomial. Punt if we can't tell at compile time
24811 which vector contains the final result.
24813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24814 Alan Hayward <alan.hayward@arm.com>
24815 David Sherwood <david.sherwood@arm.com>
24817 * tree-vect-loop.c (vectorizable_induction): Treat the number
24818 of units as polynomial. Punt on SLP inductions. Use an integer
24819 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24820 cast of such a series for variable-length floating-point
24823 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24824 Alan Hayward <alan.hayward@arm.com>
24825 David Sherwood <david.sherwood@arm.com>
24827 * tree.h (build_index_vector): Declare.
24828 * tree.c (build_index_vector): New function.
24829 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24830 of units as polynomial, forcibly converting it to a constant if
24831 vectorizable_reduction has already enforced the condition.
24832 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24833 to create a {1,2,3,...} vector.
24834 (vectorizable_reduction): Treat the number of units as polynomial.
24835 Choose vectype_in based on the largest scalar element size rather
24836 than the smallest number of units. Enforce the restrictions
24839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24840 Alan Hayward <alan.hayward@arm.com>
24841 David Sherwood <david.sherwood@arm.com>
24843 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24844 number of units as polynomial.
24846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24847 Alan Hayward <alan.hayward@arm.com>
24848 David Sherwood <david.sherwood@arm.com>
24850 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24851 * target.def (autovectorize_vector_sizes): Return the vector sizes
24852 by pointer, using vector_sizes rather than a bitmask.
24853 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24854 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24855 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24857 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24858 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24859 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24860 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24861 * omp-general.c (omp_max_vf): Likewise.
24862 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24863 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24864 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24865 * tree-vect-slp.c (vect_slp_bb): Likewise.
24866 * doc/tm.texi: Regenerate.
24867 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24869 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24870 the vector size as a poly_uint64 rather than an unsigned int.
24871 (current_vector_size): Change from an unsigned int to a poly_uint64.
24872 (get_vectype_for_scalar_type): Update accordingly.
24873 * tree.h (build_truth_vector_type): Take the size and number of
24874 units as a poly_uint64 rather than an unsigned int.
24875 (build_vector_type): Add a temporary overload that takes
24876 the number of units as a poly_uint64 rather than an unsigned int.
24877 * tree.c (make_vector_type): Likewise.
24878 (build_truth_vector_type): Take the number of units as a poly_uint64
24879 rather than an unsigned int.
24881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24882 Alan Hayward <alan.hayward@arm.com>
24883 David Sherwood <david.sherwood@arm.com>
24885 * target.def (get_mask_mode): Take the number of units and length
24886 as poly_uint64s rather than unsigned ints.
24887 * targhooks.h (default_get_mask_mode): Update accordingly.
24888 * targhooks.c (default_get_mask_mode): Likewise.
24889 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24890 * doc/tm.texi: Regenerate.
24892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24893 Alan Hayward <alan.hayward@arm.com>
24894 David Sherwood <david.sherwood@arm.com>
24896 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24897 * omp-general.c (omp_max_vf): Likewise.
24898 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24899 (expand_omp_simd): Handle polynomial safelen.
24900 * omp-low.c (omplow_simd_context): Add a default constructor.
24901 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24902 (lower_rec_simd_input_clauses): Update accordingly.
24903 (lower_rec_input_clauses): Likewise.
24905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24906 Alan Hayward <alan.hayward@arm.com>
24907 David Sherwood <david.sherwood@arm.com>
24909 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24910 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24911 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24912 (vect_analyze_slp_cost): Likewise.
24913 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24914 (vect_model_load_cost): Likewise.
24916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24917 Alan Hayward <alan.hayward@arm.com>
24918 David Sherwood <david.sherwood@arm.com>
24920 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24921 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24922 from an unsigned int * to a poly_uint64_pod *.
24923 (calculate_unrolling_factor): New function.
24924 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24927 Alan Hayward <alan.hayward@arm.com>
24928 David Sherwood <david.sherwood@arm.com>
24930 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24931 from an unsigned int to a poly_uint64.
24932 (_loop_vec_info::slp_unrolling_factor): Likewise.
24933 (_loop_vec_info::vectorization_factor): Change from an int
24935 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24936 (vect_get_num_vectors): New function.
24937 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24938 (vect_get_num_copies): Use vect_get_num_vectors.
24939 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24940 to an unsigned int *.
24941 (vect_analyze_data_refs): Change min_vf from an int * to a
24943 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24944 than an unsigned HOST_WIDE_INT.
24945 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24946 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24947 to an unsigned int *.
24948 (vect_analyze_data_ref_dependences): Likewise.
24949 (vect_compute_data_ref_alignment): Handle polynomial vf.
24950 (vect_enhance_data_refs_alignment): Likewise.
24951 (vect_prune_runtime_alias_test_list): Likewise.
24952 (vect_shift_permute_load_chain): Likewise.
24953 (vect_supportable_dr_alignment): Likewise.
24954 (dependence_distance_ge_vf): Take the vectorization factor as a
24955 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24956 (vect_analyze_data_refs): Change min_vf from an int * to a
24958 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24959 vfm1 as a poly_uint64 rather than an int. Make the same change
24960 for the returned bound_scalar.
24961 (vect_gen_vector_loop_niters): Handle polynomial vf.
24962 (vect_do_peeling): Likewise. Update call to
24963 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24964 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24966 * tree-vect-loop.c (vect_determine_vectorization_factor)
24967 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24968 (vect_get_known_peeling_cost): Likewise.
24969 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24970 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24971 (vect_transform_loop): Likewise. Use the lowest possible VF when
24972 updating the upper bounds of the loop.
24973 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24974 rather than an int.
24975 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24976 polynomial unroll factors.
24977 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24978 (vect_make_slp_decision): Likewise.
24979 (vect_supported_load_permutation_p): Likewise, and polynomial
24981 (vect_analyze_slp_cost): Handle polynomial vf.
24982 (vect_slp_analyze_node_operations): Likewise.
24983 (vect_slp_analyze_bb_1): Likewise.
24984 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24985 than an unsigned HOST_WIDE_INT.
24986 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24987 (vectorizable_load): Handle polynomial vf.
24988 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24990 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24992 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24993 Alan Hayward <alan.hayward@arm.com>
24994 David Sherwood <david.sherwood@arm.com>
24996 * match.pd: Handle bit operations involving three constants
24997 and try to fold one pair.
24999 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25001 * tree-vect-loop-manip.c: Include gimple-fold.h.
25002 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25003 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25004 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25005 Add a path that uses a step of VF instead of 1, but disable it
25007 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25008 and niters_no_overflow parameters. Update calls to
25009 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25010 Create a new SSA name if the latter choses to use a ste other
25011 than zero, and return it via niters_vector_mult_vf_var.
25012 * tree-vect-loop.c (vect_transform_loop): Update calls to
25013 vect_do_peeling, vect_gen_vector_loop_niters and
25014 slpeel_make_loop_iterate_ntimes.
25015 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25016 (vect_gen_vector_loop_niters): Update declarations after above changes.
25018 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25020 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25021 128-bit round to integer instructions.
25022 (ceil<mode>2): Likewise.
25023 (btrunc<mode>2): Likewise.
25024 (round<mode>2): Likewise.
25026 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25028 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25029 unaligned VSX load/store on P8/P9.
25030 (expand_block_clear): Allow the use of unaligned VSX
25031 load/store on P8/P9.
25033 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25035 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25037 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25038 swap associated with both a load and a store.
25040 2018-01-02 Andrew Waterman <andrew@sifive.com>
25042 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25043 * config/riscv/riscv.md (clear_cache): Use it.
25045 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25047 * web.c: Remove out-of-date comment.
25049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25051 * expr.c (fixup_args_size_notes): Check that any existing
25052 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25053 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25054 (emit_single_push_insn): ...here.
25056 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25058 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25059 (const_vector_encoded_nelts): New function.
25060 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25061 (const_vector_int_elt, const_vector_elt): Declare.
25062 * emit-rtl.c (const_vector_int_elt_1): New function.
25063 (const_vector_elt): Likewise.
25064 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25065 of CONST_VECTOR_ELT.
25067 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25069 * expr.c: Include rtx-vector-builder.h.
25070 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25071 directly on the tree encoding.
25072 (const_vector_from_tree): Likewise.
25073 * optabs.c: Include rtx-vector-builder.h.
25074 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25075 sequence of "u" values.
25076 * vec-perm-indices.c: Include rtx-vector-builder.h.
25077 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25078 directly on the vec_perm_indices encoding.
25080 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25082 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25083 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25084 * rtx-vector-builder.h: New file.
25085 * rtx-vector-builder.c: Likewise.
25086 * rtl.h (rtx_def::u2): Add a const_vector field.
25087 (CONST_VECTOR_NPATTERNS): New macro.
25088 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25089 (CONST_VECTOR_DUPLICATE_P): Likewise.
25090 (CONST_VECTOR_STEPPED_P): Likewise.
25091 (CONST_VECTOR_ENCODED_ELT): Likewise.
25092 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25093 (unwrap_const_vec_duplicate): Likewise.
25094 (const_vec_series_p): Check for a non-duplicated vector encoding.
25095 Say that the function only returns true for integer vectors.
25096 * emit-rtl.c: Include rtx-vector-builder.h.
25097 (gen_const_vec_duplicate_1): Delete.
25098 (gen_const_vector): Call gen_const_vec_duplicate instead of
25099 gen_const_vec_duplicate_1.
25100 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25101 (gen_const_vec_duplicate): Use rtx_vector_builder.
25102 (gen_const_vec_series): Likewise.
25103 (gen_rtx_CONST_VECTOR): Likewise.
25104 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25105 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25106 Build a new vector rather than modifying a CONST_VECTOR in-place.
25107 (handle_special_swappables): Update call accordingly.
25108 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25109 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25110 Build a new vector rather than modifying a CONST_VECTOR in-place.
25111 (handle_special_swappables): Update call accordingly.
25113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25115 * simplify-rtx.c (simplify_const_binary_operation): Use
25116 CONST_VECTOR_ELT instead of XVECEXP.
25118 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25120 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25121 the selector elements to be different from the data elements
25122 if the selector is a VECTOR_CST.
25123 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25124 ssizetype for the selector.
25126 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25128 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25129 before testing each element individually.
25130 * tree-vect-generic.c (lower_vec_perm): Likewise.
25132 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25134 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25135 * selftest-run-tests.c (selftest::run_tests): Call it.
25136 * vector-builder.h (vector_builder::operator ==): New function.
25137 (vector_builder::operator !=): Likewise.
25138 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25139 (vec_perm_indices::all_from_input_p): New function.
25140 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25141 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25142 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25143 instead of reading the VECTOR_CST directly. Detect whether both
25144 vector inputs are the same before constructing the vec_perm_indices,
25145 and update the number of inputs argument accordingly. Use the
25146 utility functions added above. Only construct sel2 if we need to.
25148 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25150 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25151 the broadcast of the low byte.
25152 (expand_mult_highpart): Use an explicit encoding for the permutes.
25153 * optabs-query.c (can_mult_highpart_p): Likewise.
25154 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25155 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25156 (vectorizable_bswap): Likewise.
25157 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25158 explicit encoding for the power-of-2 permutes.
25159 (vect_permute_store_chain): Likewise.
25160 (vect_grouped_load_supported): Likewise.
25161 (vect_permute_load_chain): Likewise.
25163 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25165 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25166 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25167 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25168 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25169 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25170 (vect_gen_perm_mask_any): Likewise.
25172 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25174 * int-vector-builder.h: New file.
25175 * vec-perm-indices.h: Include int-vector-builder.h.
25176 (vec_perm_indices): Redefine as an int_vector_builder.
25177 (auto_vec_perm_indices): Delete.
25178 (vec_perm_builder): Redefine as a stand-alone class.
25179 (vec_perm_indices::vec_perm_indices): New function.
25180 (vec_perm_indices::clamp): Likewise.
25181 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25182 (vec_perm_indices::new_vector): New function.
25183 (vec_perm_indices::new_expanded_vector): Update for new
25184 vec_perm_indices class.
25185 (vec_perm_indices::rotate_inputs): New function.
25186 (vec_perm_indices::all_in_range_p): Operate directly on the
25187 encoded form, without computing elided elements.
25188 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25189 encoding. Update for new vec_perm_indices class.
25190 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25191 the given vec_perm_builder.
25192 (expand_vec_perm_var): Update vec_perm_builder constructor.
25193 (expand_mult_highpart): Use vec_perm_builder instead of
25194 auto_vec_perm_indices.
25195 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25196 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25197 or double series encoding as appropriate.
25198 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25199 vec_perm_indices instead of auto_vec_perm_indices.
25200 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25201 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25202 (vect_permute_store_chain): Likewise.
25203 (vect_grouped_load_supported): Likewise.
25204 (vect_permute_load_chain): Likewise.
25205 (vect_shift_permute_load_chain): Likewise.
25206 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25207 (vect_transform_slp_perm_load): Likewise.
25208 (vect_schedule_slp_instance): Likewise.
25209 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25210 (vectorizable_mask_load_store): Likewise.
25211 (vectorizable_bswap): Likewise.
25212 (vectorizable_store): Likewise.
25213 (vectorizable_load): Likewise.
25214 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25215 vec_perm_indices instead of auto_vec_perm_indices. Use
25216 tree_to_vec_perm_builder to read the vector from a tree.
25217 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25218 vec_perm_builder instead of a vec_perm_indices.
25219 (have_whole_vector_shift): Use vec_perm_builder and
25220 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25221 truncation to calc_vec_perm_mask_for_shift.
25222 (vect_create_epilog_for_reduction): Likewise.
25223 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25224 from auto_vec_perm_indices to vec_perm_indices.
25225 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25226 instead of changing individual elements.
25227 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25228 the vector in d.perm.
25229 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25230 from auto_vec_perm_indices to vec_perm_indices.
25231 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25232 instead of changing individual elements.
25233 (arm_vectorize_vec_perm_const): Use new_vector to install
25234 the vector in d.perm.
25235 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25236 Update vec_perm_builder constructor.
25237 (rs6000_expand_interleave): Likewise.
25238 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25239 (rs6000_expand_interleave): Likewise.
25241 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25243 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25244 to qimode could truncate the indices.
25245 * optabs.c (expand_vec_perm_var): Likewise.
25247 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25249 * Makefile.in (OBJS): Add vec-perm-indices.o.
25250 * vec-perm-indices.h: New file.
25251 * vec-perm-indices.c: Likewise.
25252 * target.h (vec_perm_indices): Replace with a forward class
25254 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25255 * optabs.h: Include vec-perm-indices.h.
25256 (expand_vec_perm): Delete.
25257 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25258 (expand_vec_perm_const): Declare.
25259 * target.def (vec_perm_const_ok): Replace with...
25260 (vec_perm_const): ...this new hook.
25261 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25262 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25263 * doc/tm.texi: Regenerate.
25264 * optabs.def (vec_perm_const): Delete.
25265 * doc/md.texi (vec_perm_const): Likewise.
25266 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25267 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25268 expand_vec_perm for constant permutation vectors. Assert that
25269 the mode of variable permutation vectors is the integer equivalent
25270 of the mode that is being permuted.
25271 * optabs-query.h (selector_fits_mode_p): Declare.
25272 * optabs-query.c: Include vec-perm-indices.h.
25273 (selector_fits_mode_p): New function.
25274 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25275 is defined, instead of checking whether the vec_perm_const_optab
25276 exists. Use targetm.vectorize.vec_perm_const instead of
25277 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25278 fit in the vector mode before using a variable permute.
25279 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25280 vec_perm_indices instead of an rtx.
25281 (expand_vec_perm): Replace with...
25282 (expand_vec_perm_const): ...this new function. Take the selector
25283 as a vec_perm_indices rather than an rtx. Also take the mode of
25284 the selector. Update call to shift_amt_for_vec_perm_mask.
25285 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25286 Use vec_perm_indices::new_expanded_vector to expand the original
25287 selector into bytes. Check whether the indices fit in the vector
25288 mode before using a variable permute.
25289 (expand_vec_perm_var): Make global.
25290 (expand_mult_highpart): Use expand_vec_perm_const.
25291 * fold-const.c: Includes vec-perm-indices.h.
25292 * tree-ssa-forwprop.c: Likewise.
25293 * tree-vect-data-refs.c: Likewise.
25294 * tree-vect-generic.c: Likewise.
25295 * tree-vect-loop.c: Likewise.
25296 * tree-vect-slp.c: Likewise.
25297 * tree-vect-stmts.c: Likewise.
25298 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25300 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25301 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25302 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25303 (aarch64_vectorize_vec_perm_const): ...this new function.
25304 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25305 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25306 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25307 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25308 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25309 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25310 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25312 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25313 check for NEON modes.
25314 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25315 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25316 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25317 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25319 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25320 the old VEC_PERM_CONST conditions.
25321 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25322 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25323 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25324 (ia64_vectorize_vec_perm_const_ok): Merge into...
25325 (ia64_vectorize_vec_perm_const): ...this new function.
25326 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25327 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25328 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25329 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25330 * config/mips/mips.c (mips_expand_vec_perm_const)
25331 (mips_vectorize_vec_perm_const_ok): Merge into...
25332 (mips_vectorize_vec_perm_const): ...this new function.
25333 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25334 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25335 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25336 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25337 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25338 (rs6000_expand_vec_perm_const): Delete.
25339 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25341 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25342 (altivec_expand_vec_perm_const_le): Take each operand individually.
25343 Operate on constant selectors rather than rtxes.
25344 (altivec_expand_vec_perm_const): Likewise. Update call to
25345 altivec_expand_vec_perm_const_le.
25346 (rs6000_expand_vec_perm_const): Delete.
25347 (rs6000_vectorize_vec_perm_const_ok): Delete.
25348 (rs6000_vectorize_vec_perm_const): New function.
25349 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25350 an element count and rtx array.
25351 (rs6000_expand_extract_even): Update call accordingly.
25352 (rs6000_expand_interleave): Likewise.
25353 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25354 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25355 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25356 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25357 (rs6000_expand_vec_perm_const): Delete.
25358 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25359 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25360 (altivec_expand_vec_perm_const_le): Take each operand individually.
25361 Operate on constant selectors rather than rtxes.
25362 (altivec_expand_vec_perm_const): Likewise. Update call to
25363 altivec_expand_vec_perm_const_le.
25364 (rs6000_expand_vec_perm_const): Delete.
25365 (rs6000_vectorize_vec_perm_const_ok): Delete.
25366 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25367 reference to the SPE evmerge intructions.
25368 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25369 an element count and rtx array.
25370 (rs6000_expand_extract_even): Update call accordingly.
25371 (rs6000_expand_interleave): Likewise.
25372 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25373 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25375 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25377 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25379 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25380 vector mode and that that mode matches the mode of the data
25382 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25383 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25384 directly using expand_vec_perm_1 when forcing selectors into
25386 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25388 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25390 * optabs-query.h (can_vec_perm_p): Delete.
25391 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25392 * optabs-query.c (can_vec_perm_p): Split into...
25393 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25394 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25395 particular selector is valid.
25396 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25397 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25398 (vect_grouped_load_supported): Likewise.
25399 (vect_shift_permute_load_chain): Likewise.
25400 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25401 (vect_transform_slp_perm_load): Likewise.
25402 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25403 (vectorizable_bswap): Likewise.
25404 (vect_gen_perm_mask_checked): Likewise.
25405 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25406 implementations of variable permutation vectors into account
25407 when deciding which selector to use.
25408 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25409 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25410 with a false third argument.
25411 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25412 to test whether the constant selector is valid and can_vec_perm_var_p
25413 to test whether a variable selector is valid.
25415 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25417 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25418 * optabs-query.c (can_vec_perm_p): Likewise.
25419 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25420 instead of vec_perm_indices.
25421 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25422 (vect_gen_perm_mask_checked): Likewise,
25423 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25424 (vect_gen_perm_mask_checked): Likewise,
25426 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25428 * optabs-query.h (qimode_for_vec_perm): Declare.
25429 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25430 (qimode_for_vec_perm): ...this new function.
25431 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25433 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25435 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25436 does not have a conditional at the top.
25438 2018-01-02 Richard Biener <rguenther@suse.de>
25440 * ipa-inline.c (big_speedup_p): Fix expression.
25442 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25445 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25448 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25452 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25453 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25454 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25455 cond_taken_branch_cost 3->4.
25457 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25459 PR tree-optimization/83581
25460 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25461 TODO_cleanup_cfg if any changes have been made.
25463 PR middle-end/83608
25464 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25465 convert_modes if target mode has the right side, but different mode
25468 PR middle-end/83609
25469 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25470 last argument when extracting from CONCAT. If either from_real or
25471 from_imag is NULL, use expansion through memory. If result is not
25472 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25473 the parts directly to inner mode, if even that fails, use expansion
25476 PR middle-end/83623
25477 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25478 check for bswap in mode rather than HImode and use that in expand_unop
25481 Copyright (C) 2018 Free Software Foundation, Inc.
25483 Copying and distribution of this file, with or without modification,
25484 are permitted in any medium without royalty provided the copyright
25485 notice and this notice are preserved.