1 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4 (extract_range_from_binary_expr_1: Call
5 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
11 * gimple-ssa-warn-alloca.c
12 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
13 field for ALLOCA_BOUND_*_LARGE.
15 2018-09-11 Nathan Sidwell <nathan@acm.org>
17 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
19 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
21 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
22 for clobbers. Remove obsolete comment.
24 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
26 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
27 mpxchk, mpxld and mpxst types.
28 (define_attr length_immediate): Remove all processing of mpx types.
29 (define_attr prefix_0f): Ditto.
30 (define_attr memory): Ditto.
32 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
34 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
35 (log<mode>2): Change operand 1 predicate to general_operand.
36 Extend operand 1 to XFmode and generate logxf3 insn.
37 (log10<mode>2): Change operand 1 predicate to general_operand.
38 Extend operand 1 to XFmode and generate log10xf3 insn.
39 (log2<mode>2): Change operand 1 predicate to general_operand.
40 Extend operand 1 to XFmode and generate log2xf3 insn.
41 (fyl2xp1_extend<mode>xf3_i387): Remove.
42 (log1p<mode>2): Change operand 1 predicate to general_operand.
43 Extend operand 1 to XFmode and generate log1pxf3 insn.
44 (fxtract_extend<mode>xf3_i387): Remove.
45 (logb<mode>2): Change operand 1 predicate to general_operand.
46 Extend operand 1 to XFmode and generate logbxf3 insn.
47 (ilogb<mode>2): Change operand 1 predicate to general_operand.
48 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
49 (significand<mode>2): Change operand 1 predicate to general_operand.
50 Extend operand 1 to XFmode and generate significandxf3 insn.
52 2018-09-11 Nathan Sidwell <nathan@acm.org>
54 * gcc.c (perror_with_name, pfatal_with_name): Delete.
55 (load_specs): Use fatal_error.
56 (DELETE_IF_ORDINARY, process_command): Use error.
57 (execute, run_attempt): Use fatal_error.
59 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
61 * diagnostic-core.h (sorry_at): New prototype.
62 * diagnostic.c (sorry_at): New function.
64 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
66 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
67 by zero as VR_UNDEFINED.
69 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
71 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
72 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
73 (<sincos>mode2): New expander.
74 (sincos_extend<mode>xf3_i387): Remove insn pattern.
75 (sincos -> sin, cos splitters): Remove splitter patterns.
76 (sincos<mode>3): Change operand 2 predicate to general_operand.
77 Extend operand 2 to XFmode and generate sincosxf3 insn.
78 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
79 Change operand 3 predicate to const1_operand.
80 (fptan_extend<mode>xf4_i387): Remove insn pattern.
81 (tanxf2): Update operands in the call to fptanxf4_i387.
82 (tan<mode>2): Change operand 1 predicate to general_operand.
83 Extend operand 1 to XFmode and generate tanxf3 insn.
84 (atan2xf3): Rename from *fpatanxf3_i387.
85 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
86 (atan2xf3): Remove expander.
87 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
88 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
89 (atan<mode>2): Change operand 1 predicate to general_operand.
90 Extend operand 1 to XFmode and generate atanxf3 insn.
92 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
94 * config/i386/i386.md (x87/SSE constant load splitter): Use
95 memory_operand instead of nonimmediate_operand for input operand
98 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
100 * config/i386/i386.md (float partial SSE register stall splitter): Move
101 splitter near its instruction pattern.
102 (float_extend partial SSE register stall splitter): Ditto.
103 (float_truncate partial SSE register stall splitter): Ditto.
105 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
108 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
109 to speculation_safe_value_not_needed.
112 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
113 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
114 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
115 leaf_function_p, instead use has_hard_reg_initial_val.
117 2018-09-09 Nathan Sidwell <nathan@acm.org>
119 * gcc.h (pfatal_with_name): Don't declare here.
120 * gcc.c (pfatal_with_name): Make static.
122 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
124 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
127 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
129 PR rtl-optimization/85458
130 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
131 priority hook to reduce the priority of EXPR.
133 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
135 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
136 DImode for x87 on 32bit targets. Conditionally disable x87 modes
137 with X87_ENABLE_FLOAT. Remove preparation code.
138 (*float<SWI48:mode><MODEF:mode>2): Rename from
139 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
140 math using "enabled" attribute.
141 (*floatdi<MODEF:mode>2_i387): Rename from
142 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
143 enable for 32bit targets only.
144 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
146 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
147 as operand 1 predicate. Rewrite as define_insn_and_split.
148 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
150 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
152 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
153 to fallthru to FLOAT case.
155 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
158 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
159 around folding of vec_sl to handle out of range shift values.
161 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
163 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
164 Update callers to gen_fix_trunc<mode>_i387_fisttp
165 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
166 nonimmediate_operand.
167 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
168 and corresponding splitters.
169 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
170 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
171 (fix_truncdi_i387_with_temp): Remove insn pattern
172 and corresponding splitters.
173 (fix_trunc<mode>_i387): Change operand 0 predicate to
174 nonimmediate_operand.
175 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
176 and corresponding splitters.
177 (*fistdi2_1): Remove.
179 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
180 (lrintxfdi2): Remove expander. Reimplement as define_insn.
181 (*fist<mode>2_1): Remove.
182 (fist<mode>2): Ditto.
183 (fist<mode>2_with_temp): Remove insn pattern and corresponding
185 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
186 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
187 (fistdi2_<rounding>): Change operand 0 predicate to
188 nonimmediate_operand.
189 (fistdi2_<rounding>_with_temp): Remove insn pattern
190 and corresponding splitters.
191 (fist<mode>2_<rounding>): Change operand 0 predicate to
192 nonimmediate_operand.
193 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
194 and corresponding splitters.
196 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
198 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
200 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
203 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
205 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
206 early gimple folding of vec_splat().
207 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
208 * gimple-fold.h: Add an extern define for tree_vec_extract().
210 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
212 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
213 wrappers around TREE_TYPE comparisons.
215 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
218 * config/s390/predicates.md: Add nonsym_memory_operand.
219 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
220 contains a SYMBOL_REF, load it into an intermediate pseudo.
221 (s390_emit_compare_and_swap): Legitimize operand.
222 * config/s390/s390.md: Use the new nonsym_memory_operand
223 with UNSPECV_CAS patterns.
225 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
228 * config/s390/s390-passes.def: New file.
229 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
231 (make_pass_s390_early_mach): Add declaration.
232 * config/s390/s390.c (make_pass_s390_early_mach):
233 (s390_option_override): Remove dynamic registration.
234 * config/s390/t-s390: Add s390-passes.def.
236 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
238 * config/s390/s390.c (s390_decompose_constant_pool_ref):
239 Remove UNSPEC_LTREL_BASE check.
240 (annotate_constant_pool_refs): Likewise.
241 (find_constant_pool_ref): Likewise.
242 (find_ltrel_base): Removed.
243 (replace_ltrel_base): Removed.
244 (s390_mainpool_finish): Remove replace_ltrel_base call.
245 (s390_chunkify_start): Remove pending LTREL_BASE logic.
246 (s390_chunkify_finish): Remove replace_ltrel_base call.
247 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
249 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
252 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
253 to speculation_safe_value_not_needed.
255 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
256 Bernd Schmidt <bernds_cb1@t-online.de>
258 * config/nvptx/nvptx-opts.h: New file.
259 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
260 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
262 (TARGET_SM35): New macro.
263 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
265 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
268 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
270 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
272 * config/i386/i386.md (truncdfsf2): Remove expander.
273 (truncdfsf2_with_temp): Ditto.
274 (truncxf<mode>2): Ditto.
275 (*truncdfsf_fast_mixed): Remove insn pattern.
276 (*truncdfsf_fast_i387): Ditto.
277 (*truncdfsf_mixed): Ditto.
278 (*truncdfsf_i387): Ditto.
279 (*truncdfsf2_i387_1): Ditto.
280 (*truncxfsf2_mixed): Ditto.
281 (*truncxfdf2_mixed): Ditto.
282 (*truncxf<mode>2_i387_noop): Ditto. Update callers
283 to call gen_truncxf<mode>2 instead.
284 (*truncxf<mode>2_i387): Remove.
285 (reg->reg splitters): Remove splitter pattern.
286 (reg->mem splitters): Ditto.
288 (truncdfsf2): New insn pattern.
289 (truncxf<mode>2): Ditto.
291 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
293 * tree-ssa-math-opts.c (is_mult_by): New function.
294 (is_square_of): Use the above.
295 (optimize_recip_sqrt): New function.
296 (pass_cse_reciprocals::execute): Use the above.
298 2018-09-05 Richard Biener <rguenther@suse.de>
301 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
302 to zero-init the emplaced vec.
304 2018-09-05 Martin Liska <mliska@suse.cz>
306 PR tree-optimization/87205
307 * tree-switch-conversion.c (pass_lower_switch::execute):
308 Group cases for switch statements.
310 2018-09-05 Richard Biener <rguenther@suse.de>
312 PR tree-optimization/87217
313 * tree-ssa-sccvn.c (vuse_valueize): New.
314 (vn_reference_lookup_pieces): Use it.
315 (vn_reference_lookup): Likewise.
317 2018-09-05 Nathan Sidwell <nathan@acm.org>
320 * stor-layout.c (place_field): Scan forwards to check last
321 bitfield when ms_bitfield_placement is in effect.
323 2018-09-05 Richard Biener <rguenther@suse.de>
326 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
329 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
330 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
332 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
333 * config.gcc (extra_objs): Build it.
334 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
336 * config/aarch64/aarch64-passes.def
337 (pass_tag_collision_avoidance): New pass.
338 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
339 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
340 (aarch64_classify_address): Remove static qualifier.
341 (aarch64_address_info, aarch64_address_type): Move to...
342 * config/aarch64/aarch64-protos.h: ... here.
343 (make_pass_tag_collision_avoidance): New function.
344 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
347 2018-09-05 Martin Liska <mliska@suse.cz>
349 * doc/gcov.texi: Update documentation of humar
351 * gcov.c (format_count): Print one decimal place, it provides
352 more fine number of situations like '1G' vs. '1.4G'.
354 2018-09-05 Martin Liska <mliska@suse.cz>
357 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
358 * optc-gen.awk: Allow 'Var' for Deprecated options in order
359 to generate a MASK value.
361 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
364 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
365 if frame pointer isn't used.
366 (compute_frame_pointer_to_fb_displacement): Likewise.
368 2018-09-04 Jakub Jelinek <jakub@redhat.com>
371 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
372 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
373 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
374 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
375 and OPTION_MASK_ISA_XSAVEC_UNSET.
377 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
379 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
380 XOR operations in NAND case.
382 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
384 * wide-int-range.cc (wide_int_range_convert): New.
385 * wide-int-range.h (wide_int_range_convert): New.
386 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
387 code into wide_int_range_convert.
388 (extract_range_into_wide_ints): Do not munge anti range constants
389 into the entire domain. Just return the range back.
391 2018-09-04 Martin Liska <mliska@suse.cz>
393 * genmatch.c (output_line_directive): Add new argument
395 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
397 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
399 * doc/invoke.texi (Option Summary): Add whitespace.
401 * doc/invoke.texi (Option Summary): Add -Waligned-new.
403 2018-09-04 Richard Biener <rguenther@suse.de>
405 PR tree-optimization/87211
406 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
407 backedge value we're supposed to treat as VARYING also number
408 the PHI to VARYING in case it got a different value-number already.
410 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
412 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
413 (extract_range_from_binary_expr_1): Do not call
414 vrp_can_optimize_bit_op.
415 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
417 (wide_int_range_get_mask_and_bounds): New.
418 (wide_int_range_optimize_bit_op): New.
419 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
420 (wide_int_range_bit_and): Same.
421 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
422 (wide_int_range_optimize_bit_op): New.
423 (wide_int_range_get_mask_and_bounds): New.
425 2018-09-04 Richard Biener <rguenther@suse.de>
427 PR tree-optimization/87176
428 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
429 variable. When value-numbering a virtual PHI node make sure
430 to not value-number to the backedge value.
432 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
434 * doc/extend.texi (Long Long, Hex Floats): Document support for
435 long long and hex floats in more recent versions of ISO C++.
437 2018-09-03 Richard Biener <rguenther@suse.de>
439 PR tree-optimization/87177
440 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
443 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
445 * bb-reorder.c (edge_order): Convert to C-qsort-style
446 tri-state comparator.
447 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
449 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
451 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
452 tri-state comparator.
453 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
455 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
457 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
458 (mergesort): ... here as maximum count for using netsort.
459 (gcc_qsort): Set nlim to 3 if stable sort is requested.
460 (gcc_stablesort): New.
461 * system.h (gcc_stablesort): Declare.
463 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
465 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
466 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
467 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
469 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
471 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
472 lxsdx and stxsdx alternatives.
473 (*mov<mode>_hardfloat64): Ditto.
474 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
476 2018-09-03 Richard Biener <rguenther@suse.de>
478 PR tree-optimization/87200
479 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
482 2018-09-03 Martin Liska <mliska@suse.cz>
484 PR tree-optimization/87201
485 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
486 Fix parenthesis in an expression.
488 2018-09-03 Richard Biener <rguenther@suse.de>
490 PR tree-optimization/87197
491 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
492 visited. CSE the VN_INFO hashtable lookup.
494 PR tree-optimization/87169
495 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
496 iterating make sure there's no extra backedges from irreducible
497 regions feeding the header. Mark the destination block
500 2018-09-03 Martin Liska <mliska@suse.cz>
503 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
504 * common/common-targhooks.c (default_get_valid_option_values):
506 * common/common-targhooks.h (default_get_valid_option_values):
508 * common/config/i386/i386-common.c: Move processor_target_table
510 (ix86_get_valid_option_values): New function.
511 (TARGET_GET_VALID_OPTION_VALUES): New macro.
512 * config/i386/i386.c (struct ptt): Move to i386-common.c.
513 (PTA_*): Move all defined masks into i386-common.c.
514 (ix86_function_specific_restore): Use new processor_cost_table.
515 * config/i386/i386.h (struct ptt): Moved from i386.c.
516 (struct pta): Likewise.
517 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
518 * doc/tm.texi.in: Likewise.
519 * opt-suggestions.c (option_proposer::suggest_option):
520 Pass prefix to build_option_suggestions.
521 (option_proposer::get_completions): Likewise.
522 (option_proposer::build_option_suggestions): Use the new target
524 * opts.c (struct option_help_tuple): New struct.
525 (print_filtered_help): Use the new target hook.
527 2018-09-03 Martin Liska <mliska@suse.cz>
530 * predict.c (set_even_probabilities): Add likely_edges
531 argument and handle cases where we have precisely one
533 (combine_predictions_for_bb): Catch also likely_edges.
534 (tree_predict_by_opcode): Handle gswitch statements.
535 * tree-cfg.h (find_case_label_for_value): New declaration.
536 (find_taken_edge_switch_expr): Likewise.
537 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
538 Find pivot in decision tree based on probabily, not by number of
541 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
543 * doc/standards.texi (Standards): Update Objective-C reference.
545 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
547 * doc/install.texi (Prerequisites): Update link for MPC.
549 2018-09-01 Michael Matz <matz@suse.de>
551 PR tree-optimization/87074
552 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
553 PHIs for outer-loop uses.
555 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
557 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
558 * doc/invoke.texi (C Dialect Options): Ditto.
560 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
562 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
564 2018-08-31 Richard Biener <rguenther@suse.de>
566 PR tree-optimization/87168
567 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
568 (rpo_elim::eliminate_avail): When OP was not visited it must
571 2018-08-31 David Malcolm <dmalcolm@redhat.com>
573 * tree-vrp.c (copy_value_range): Convert param "from" from
574 "value_range *" to "const value_range *".
575 (range_is_null): Likewise for param "vr".
576 (range_int_cst_p): Likewise.
577 (range_int_cst_singleton_p): Likewise.
578 (symbolic_range_p): Likewise.
579 (value_ranges_intersect_p): Likewise for both params.
580 (value_range_nonnegative_p): Likewise for param "vr".
581 (value_range_constant_singleton): Likewise.
582 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
583 (extract_range_into_wide_ints): Likewise for param "vr".
584 (extract_range_from_multiplicative_op): Likewise for params "vr0"
586 (vrp_can_optimize_bit_op): Likewise.
587 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
589 (extract_range_from_unary_expr): Likewise.
590 (debug_value_range): Likewise for param "vr".
591 (value_range::dump): Add "const" qualifier.
592 (vrp_prop::check_array_ref): Convert local "vr" from
593 "value_range *" to "const value_range *".
594 (vrp_prop::check_mem_ref): Likewise.
595 (vrp_prop::visit_stmt): Likewise for local "old_vr".
596 (vrp_intersect_ranges_1): Likewise for param "vr_1".
597 (vrp_intersect_ranges): Likewise.
598 (simplify_stmt_for_jump_threading): Likewise for local "vr".
599 (vrp_prop::vrp_finalize): Likewise.
600 * tree-vrp.h (value_range::dump): Add "const" qualifier.
601 (vrp_intersect_ranges): Add "const" qualifier to params as above.
602 (extract_range_from_unary_expr): Likewise.
603 (value_range_constant_singleton): Likewise.
604 (symbolic_range_p): Likewise.
605 (copy_value_range): Likewise.
606 (extract_range_from_binary_expr_1): Likewise.
607 (range_int_cst_p): Likewise.
608 (vrp_set_zero_nonzero_bits): Likewise.
609 (range_int_cst_singleton_p): Likewise.
611 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
613 * config/aarch64/arm_neon.h (vabsd_s64): New.
614 (vnegd_s64): Likewise.
616 2018-08-31 Martin Jambor <mjambor@suse.cz>
618 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
620 2018-08-31 Martin Liska <mliska@suse.cz>
622 * ipa-icf.c (sem_item::add_type): Use
623 sem_item::m_type_hash_cache.
624 * ipa-icf.h: Move the cache from sem_item_optimizer
627 2018-08-31 Nathan Sidwell <nathan@acm.org>
629 * doc/extend.texi (Backwards Compatibility): Remove implicit
630 extern C leeway of () being (...).
632 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
634 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
636 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
640 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
642 2018-08-31 Jakub Jelinek <jakub@redhat.com>
645 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
646 gen_int_mode. Formatting fixes.
648 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
650 * target.def (custom_function_descriptors): Improve documentation.
651 * doc/tm.texi.in (Trampolines): Expand discussion of function
652 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
653 beginning of the section.
654 * doc/tm.texi: Regenerated.
656 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
658 * cfg.h (class auto_edge_flag): Spell out the template-id of the
659 base class in the initializer list. This is a workaround for
660 building with older GCC.
661 (class auto_bb_flag): Likewise.
663 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
665 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
666 (altivec_vcmpequ<VI_char>_p): Remove star.
667 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
669 (expand_strncmp_vec_sequence): New function.
670 (emit_final_str_compare_vec): New function.
671 (expand_strn_compare): Add support for vector strncmp.
672 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
673 length specification to bytes.
674 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
675 (vcmpnezb_p): New pattern.
676 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
677 for option -mstring-compare-inline-limit.
679 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
681 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
682 (PTA_SKYLAKE): Add PTA_AES.
683 (PTA_GOLDMONT): Likewise.
685 2018-08-29 Jan Hubicka <jh@suse.cz>
688 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
689 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
691 2018-08-29 Jan Hubicka <jh@suse.cz>
693 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
695 (hash_tree): Do not visit TYPE_STUB_DECL.
696 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
697 stream TYPE_STUB_DECL.
698 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
699 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
700 after free_lang_data.
701 (type_in_anonymous_namespace_p): Likewise.
703 2018-08-29 Jan Hubicka <jh@suse.cz>
705 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
706 comment that it has to be even number.
707 (class sreal): Change m_sig type to int32_t.
708 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
709 int64_t for temporary calculations.
710 (sreal_verify_basics): Drop one bit from minimum and maximum.
712 2018-08-30 Richard Biener <rguenther@suse.de>
714 PR tree-optimization/87147
715 * tree-ssa-sccvn.c (SSA_VISITED): New function.
716 (visit_phi): When the degenerate result is from the backedge and
717 we didn't visit its definition yet drop to VARYING.
718 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
720 2018-08-29 Jan Hubicka <jh@suse.cz>
722 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
724 (hash_tree): Likewise.
726 2018-08-29 Jan Hubicka <jh@suse.cz>
728 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
729 and TYPE_NEXT_REF_TO.
731 2018-08-29 Jan Hubicka <jh@suse.cz>
733 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
734 comment that it has to be even number.
735 (class sreal): Change m_sig type to int32_t.
736 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
737 int64_t for temporary calculations.
738 (sreal_verify_basics): Drop one bit from minimum and maximum.
740 2018-08-30 Tamar Christina <tamar.christina@arm.com>
742 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
744 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
747 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
748 if to_add is negative.
750 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
753 * builtins.c (c_strlen): Improve range checks.
755 2018-08-29 Martin Sebor <msebor@redhat.com>
756 Jeff Law <law@redhat.com>
758 PR tree-optimization/86714
759 PR tree-optimization/86711
760 * builtins.c (c_strlen): Add arguments to call to string_constant.
761 * expr.c (string_constant): Add argument. Detect missing nul
762 terminator and outermost declaration it's missing in.
763 * expr.h (string_constant): Add argument.
764 * fold-const.c (read_from_constant_string): Add arguments to call to
766 (c_getstr): Likewise.
767 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
769 * tree-ssa-strlen.c (get_stridx): Likewise.
771 2018-08-29 Jan Hubicka <jh@suse.cz>
773 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
774 Do not stream DECL_VINDEX.
775 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
776 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
777 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
779 2018-08-29 Richard Biener <rguenther@suse.de>
781 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
782 virtual operands that are not default defs to honor region
784 (rpo_vn_valueize): Remove ineffective code here.
786 2018-08-29 Richard Biener <rguenther@suse.de>
788 PR tree-optimization/87132
789 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
790 when skipping defs reachable over backedges.
792 2018-08-29 Richard Biener <rguenther@suse.de>
794 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
795 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
796 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
797 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
798 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
799 (vn_reference_lookup_3): Remove use of const_parms.
800 (free_rpo_vn): Do not free const_parms.
801 (do_rpo_vn): Do not call init_const_parms.
802 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
803 SSA_NAME_POINTS_TO_READONLY_MEMORY.
804 (call_may_clobber_ref_p_1): Likewise.
806 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
809 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
811 (-ftree-scev-cprop): Document.
813 2018-08-29 Jan Hubicka <jh@suse.cz>
815 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
817 (sreal constructor): Update.
818 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
819 sreal:operator/): Update.
821 2018-08-29 Martin Liska <mliska@suse.cz>
823 * tree-switch-conversion.c (switch_conversion::expand):
824 Strenghten assumption about gswitch statements.
826 2018-08-29 Richard Biener <rguenther@suse.de>
828 PR tree-optimization/87117
829 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
830 re-value-number released SSA VDEFs.
832 2018-08-29 Richard Biener <rguenther@suse.de>
834 PR tree-optimization/87126
835 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
837 2018-08-28 Jim Wilson <jimw@sifive.com>
839 * config/riscv/pic.md: Rewrite.
840 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
842 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
843 (SOFTF, default_load, softload, softstore): New.
845 2018-08-28 Jeff Law <law@redhat.com>
847 * fold-const.c (fold_binary_loc): Remove recently added assert.
849 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
851 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
852 to OP parmeter of generated function.
854 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
856 PR tree-optimization/87009
857 * match.pd: Add boolean optimizations.
859 2018-08-28 Martin Sebor <msebor@redhat.com>
862 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
863 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
864 (pass_walloca::gate): Use it.
865 (alloca_call_type): Same.
866 (pass_walloca::execute): Same.
867 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
869 2018-08-28 David Malcolm <dmalcolm@redhat.com>
871 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
872 GCC_VERSION for usage of "__gcc_dump_printf__" format from
875 2018-08-28 Richard Biener <rguenther@suse.de>
877 PR tree-optimization/87124
878 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
879 constants before looking up avail.
881 2018-08-28 Jakub Jelinek <jakub@redhat.com>
884 * calls.c (maybe_warn_nonstring_arg): Punt early if
885 warn_stringop_overflow is zero. Don't call get_range_strlen
886 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
887 Swap comparison operands to have constants on rhs. Only use
888 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
891 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
893 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
894 use of tree_to_shwi. Remove duplicated test for the size being
895 a whole number of bytes.
897 2018-08-28 Richard Biener <rguenther@suse.de>
899 PR tree-optimization/87117
900 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
901 Handle removed stmt without LHS (GIMPLE_NOP).
903 2018-08-28 Richard Biener <rguenther@suse.de>
905 PR tree-optimization/87117
906 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
907 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
909 2018-08-28 Richard Biener <rguenther@suse.de>
911 PR tree-optimization/87117
912 * tree-ssa-pre.c (compute_avail): Do not make expressions
913 with predicated values available.
914 (get_expr_value_id): Assert we do not run into predicated value
917 2018-08-28 Richard Biener <rguenther@suse.de>
919 PR tree-optimization/87117
920 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
921 get virtual operands.
922 (get_expr_operands): Handle STRING_CST like other decls.
924 2018-08-28 Martin Liska <mliska@suse.cz>
926 * tree.h: Update documentation of fndecl_built_in_p
930 2018-08-27 Jeff Law <law@redhat.com>
931 PR tree-optimization/87110
932 * tree-ssa-dse.c (compute_trims): Handle non-constant
935 2018-08-27 Martin Sebor <msebor@redhat.com>
937 PR tree-optimization/86914
938 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
940 2018-08-27 Martin Sebor <msebor@redhat.com>
942 PR tree-optimization/87112
943 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
944 the type of the bound argument.
946 2018-08-27 Jeff Law <law@redhat.com>
948 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
949 type does not have a TYPE_SIZE_UNIT.
951 2018-08-27 Steve Ellcey <sellcey@cavium.com>
953 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
954 with include of backend.h.
956 2018-08-27 Richard Biener <rguenther@suse.de>
958 PR tree-optimization/86927
959 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
960 use const cond reduction code.
962 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
964 PR tree-optimization/85758
965 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
967 2018-08-27 David Malcolm <dmalcolm@redhat.com>
970 * diagnostic-show-locus.c (class layout_range): Update for
971 conversion of show_caret_p to a tri-state.
972 (layout_range::layout_range): Likewise.
973 (make_range): Likewise.
974 (layout::maybe_add_location_range): Likewise.
975 (layout::should_print_annotation_line_p): Don't show annotation
976 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
977 (layout::get_state_at_point): Update for conversion of
978 show_caret_p to a tri-state. Bail out early for
979 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
980 underlining or source colorization.
981 (gcc_rich_location::add_location_if_nearby): Update for conversion
982 of show_caret_p to a tri-state.
983 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
984 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
986 (selftest::test_one_liner_labels): Likewise.
987 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
988 conversion of show_caret_p to a tri-state.
989 * pretty-print.c (text_info::set_location): Likewise.
990 * pretty-print.h (text_info::set_location): Likewise.
991 * substring-locations.c (format_warning_n_va): Likewise.
992 * tree-diagnostic.c (default_tree_printer): Likewise.
993 * tree-pretty-print.c (newline_and_indent): Likewise.
995 2018-08-27 David Malcolm <dmalcolm@redhat.com>
998 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
999 line above for line-insertion fix-it hints.
1000 (selftest::test_fixit_insert_containing_newline): Update the
1001 expected results, and add a test with line-numbering enabled.
1003 2018-08-27 Martin Liska <mliska@suse.cz>
1006 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1007 params with DECL_HAS_VALUE_EXPR_P.
1009 2018-08-27 Martin Liska <mliska@suse.cz>
1011 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1012 selected expansion strategy.
1014 2018-08-27 Martin Liska <mliska@suse.cz>
1016 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1017 * builtins.c (is_builtin_fn): Likewise.
1018 * attribs.c (diag_attr_exclusions): Use new function
1019 fndecl_built_in_p and remove check for FUNCTION_DECL if
1021 (builtin_mathfn_code): Likewise.
1022 (fold_builtin_expect): Likewise.
1023 (fold_call_expr): Likewise.
1024 (fold_builtin_call_array): Likewise.
1025 (fold_call_stmt): Likewise.
1026 (set_builtin_user_assembler_name): Likewise.
1027 (is_simple_builtin): Likewise.
1028 * calls.c (gimple_alloca_call_p): Likewise.
1029 (maybe_warn_nonstring_arg): Likewise.
1030 * cfgexpand.c (expand_call_stmt): Likewise.
1031 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1032 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1033 (cgraph_node::verify_node): Likewise.
1034 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1035 (cgraph_node::create_clone): Likewise.
1036 * config/arm/arm.c (arm_insert_attributes): Likewise.
1037 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1038 * dse.c (scan_insn): Likewise.
1039 * expr.c (expand_expr_real_1): Likewise.
1040 * fold-const.c (operand_equal_p): Likewise.
1041 (fold_binary_loc): Likewise.
1042 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1043 * gimple-low.c (lower_stmt): Likewise.
1044 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1045 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1046 * gimple.c (gimple_build_call_from_tree): Likewise.
1047 (gimple_call_builtin_p): Likewise.
1048 (gimple_call_combined_fn): Likewise.
1049 * gimplify.c (gimplify_call_expr): Likewise.
1050 (gimple_boolify): Likewise.
1051 (gimplify_modify_expr): Likewise.
1052 (gimplify_addr_expr): Likewise.
1053 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1054 * ipa-cp.c (determine_versionability): Likewise.
1055 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1056 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1057 * ipa-split.c (visit_bb): Likewise.
1058 (split_function): Likewise.
1059 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1060 * lto-cgraph.c (input_node): Likewise.
1061 * lto-streamer-out.c (write_symbol): Likewise.
1062 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1063 (lower_omp_1): Likewise.
1064 * predict.c (strip_predict_hints): Likewise.
1065 * print-tree.c (print_node): Likewise.
1066 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1067 * trans-mem.c (is_tm_irrevocable): Likewise.
1068 (is_tm_load): Likewise.
1069 (is_tm_simple_load): Likewise.
1070 (is_tm_store): Likewise.
1071 (is_tm_simple_store): Likewise.
1072 (is_tm_abort): Likewise.
1073 (tm_region_init_1): Likewise.
1074 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1075 * tree-cfg.c (verify_gimple_call): Likewise.
1076 (move_stmt_r): Likewise.
1077 (stmt_can_terminate_bb_p): Likewise.
1078 * tree-eh.c (lower_eh_constructs_2): Likewise.
1079 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1080 * tree-inline.c (remap_gimple_stmt): Likewise.
1081 (copy_bb): Likewise.
1082 (estimate_num_insns): Likewise.
1083 (fold_marked_statements): Likewise.
1084 * tree-sra.c (scan_function): Likewise.
1085 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1086 (optimize_stack_restore): Likewise.
1087 (pass_fold_builtins::execute): Likewise.
1088 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1089 (mark_all_reaching_defs_necessary_1): Likewise.
1090 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1091 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1092 (pass_forwprop::execute): Likewise.
1093 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1094 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1095 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1096 * tree-ssa-strlen.c (get_string_length): Likewise.
1097 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1098 (find_func_aliases_for_call): Likewise.
1099 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1100 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1101 * tree-tailcall.c (find_tail_calls): Likewise.
1102 * tree.c (need_assembler_name_p): Likewise.
1103 (free_lang_data_in_decl): Likewise.
1104 (get_call_combined_fn): Likewise.
1105 * ubsan.c (is_ubsan_builtin_p): Likewise.
1106 * varasm.c (incorporeal_function_p): Likewise.
1107 * tree.h (DECL_BUILT_IN): Remove and replace with
1109 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1110 (fndecl_built_in_p): New.
1112 2018-08-27 Martin Liska <mliska@suse.cz>
1114 PR tree-optimization/86847
1115 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1116 Dump also subtree probability.
1117 (switch_decision_tree::do_jump_if_equal): New function.
1118 (switch_decision_tree::emit_case_nodes): Handle special
1119 situations in balanced tree that can be emitted much simpler.
1120 Fix calculation of probabilities that happen in tree expansion.
1121 * tree-switch-conversion.h (struct cluster): Add
1123 (struct simple_cluster): Likewise.
1124 (struct case_tree_node): Add new function has_child.
1125 (do_jump_if_equal): New.
1127 2018-08-27 Martin Liska <mliska@suse.cz>
1129 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1130 Add new argument to bit_test_cluster constructor.
1131 (bit_test_cluster::emit): Set bits really number of values
1133 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1134 probability argument.
1135 * tree-switch-conversion.h (struct bit_test_cluster):
1136 Add m_handles_entire_switch.
1138 2018-08-27 Martin Liska <mliska@suse.cz>
1140 PR tree-optimization/86702
1141 * tree-switch-conversion.c (jump_table_cluster::emit):
1142 Make probabilities even for values in jump table
1143 according to number of cases handled.
1144 (switch_decision_tree::compute_cases_per_edge): Pass
1145 argument to reset_out_edges_aux function.
1146 (switch_decision_tree::analyze_switch_statement): Likewise.
1147 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1150 2018-08-27 Martin Liska <mliska@suse.cz>
1152 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1153 cfun argument explicitly.
1154 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1155 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1156 function gimple_switch_default_bb.
1157 (convert_switch_statements):
1159 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1160 * stmt.c (label_to_block_fn): Use label_to_block and pass
1161 cfun argument explicitly and use gimple_switch_label_bb.
1162 (expand_case): Likewise.
1163 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1164 cfun argument explicitly. Likewise.
1165 (make_edges_bb): Likewise.
1166 (make_cond_expr_edges): Likewise.
1167 (get_cases_for_edge): Likewise.
1168 (make_gimple_switch_edges): Likewise.
1169 (label_to_block_fn): Likewise.
1170 (label_to_block): Likewise.
1171 (make_goto_expr_edges): Likewise.
1172 (make_gimple_asm_edges): Likewise.
1173 (main_block_label): Likewise.
1174 (group_case_labels_stmt): Likewise.
1175 (find_taken_edge_computed_goto): Likewise.
1176 (find_taken_edge_switch_expr): Likewise.
1177 (gimple_verify_flow_info): Likewise.
1178 (gimple_redirect_edge_and_branch): Likewise.
1179 (gimple_switch_label_bb): New function.
1180 (gimple_switch_default_bb): Likewise.
1181 (gimple_switch_edge): Likewise.
1182 (gimple_switch_default_edge): Likewise.
1183 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1184 (label_to_block): ... with this.
1185 (gimple_switch_label_bb): New.
1186 (gimple_switch_default_bb): Likewise.
1187 (gimple_switch_edge): Likewise.
1188 (gimple_switch_default_edge): Likewise.
1189 * tree-cfgcleanup.c (convert_single_case_switch): Use
1190 new gimple functions and pass new argument to label_to_block.
1191 (cleanup_control_flow_bb):
1192 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1193 cfun argument explicitly.
1194 (make_eh_edges): Likewise.
1195 (redirect_eh_dispatch_edge): Likewise.
1196 (lower_resx): Likewise.
1197 (lower_eh_dispatch): Likewise.
1198 (maybe_remove_unreachable_handlers): Likewise.
1199 (unsplit_eh): Likewise.
1200 (cleanup_empty_eh): Likewise.
1201 (verify_eh_edges): Likewise.
1202 (verify_eh_dispatch_edge): Likewise.
1203 * tree-ssa-dom.c (record_edge_info): Likewise.
1204 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1205 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1206 (thread_through_normal_block): Likewise.
1207 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1208 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1209 * tree-switch-conversion.c (switch_conversion::collect): Use new
1211 (switch_conversion::check_final_bb): Likewise.
1212 (switch_conversion::gather_default_values): Pass new argument
1214 (switch_conversion::build_constructors): Likewise.
1215 (switch_decision_tree::compute_cases_per_edge): Use new
1216 gimple_switch_edge function.
1217 (switch_decision_tree::analyze_switch_statement): Pass new argument
1219 (switch_decision_tree::try_switch_expansion): Use
1220 gimple_switch_default_edge.
1221 * tree-vrp.c (find_switch_asserts): Pass new argument
1223 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1224 (vr_values::simplify_switch_using_ranges): Likewise.
1226 2018-08-27 Richard Biener <rguenther@suse.de>
1228 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1229 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1231 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1232 (struct vn_nary_op_s): Add unwind_to member. Add
1233 predicated_values flag and put result into a union together
1234 with a linked list of vn_pval.
1235 (struct vn_ssa_aux): Add name member to make maintaining
1236 a map of SSA name to vn_ssa_aux possible. Remove no longer
1237 needed info, dfsnum, low, visited, on_sccstack, use_processed
1238 and range_info_anti_range_p members.
1239 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1240 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1242 (vn_valueize): New global.
1243 (vn_context_bb): Likewise.
1244 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1245 VN_INFO_PTR_INFO): Remove.
1246 * tree-ssa-sccvn.c: ... (rewrite)
1247 (pass_fre::execute): For -O2+ initialize loops and run
1248 RPO VN in optimistic mode (iterating). For -O1 and -Og
1249 run RPO VN in non-optimistic mode.
1250 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1251 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1252 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1253 (rpo-vn-max-loop-depth): Document.
1254 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1255 when valuezing the VUSE signals we walked out of the region.
1256 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1257 (phi_translate): Set VN context block to use for availability
1259 (compute_avail): Likewise.
1260 (pre_valueize): New function.
1261 (pass_pre::execute): Adjust to the RPO VN API.
1263 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1264 (propagate_constants_for_unrolling): Remove.
1265 (tree_unroll_loops_completely): Perform value-numbering
1266 on the unrolled bodies loop parent.
1268 2018-08-27 Richard Biener <rguenther@suse.de>
1270 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1271 for partial antic compute.
1273 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1275 PR rtl-optimization/87065
1276 * combine.c (simplify_if_then_else): Formatting fix.
1277 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1279 (known_cond): Don't return const_true_rtx for vector modes. Use
1280 CONST0_RTX instead of const0_rtx. Formatting fixes.
1282 2018-08-27 Martin Liska <mliska@suse.cz>
1284 PR gcov-profile/87069
1285 * gcov.c (process_file): Record files already processed
1286 and warn about a file being processed multiple times.
1288 2018-08-27 Martin Liska <mliska@suse.cz>
1291 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1292 Set default values for x_aarch64_*_string strings.
1293 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1294 prefix. For -mabi do not print '=ABI' in help and use
1295 <option_value> format for -msve-vector-bits and -moverride
1298 2018-08-26 Jeff Law <law@redhat.com>
1300 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1303 2018-08-26 Marek Polacek <polacek@redhat.com>
1305 PR c++/87029, Implement -Wredundant-move.
1306 * doc/invoke.texi: Document -Wredundant-move.
1308 2018-08-25 Martin Sebor <msebor@redhat.com>
1310 PR tree-optimization/87059
1311 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1312 to the same type as the other.
1313 * fold-const.c (fold_binary_loc): Assert expectation.
1315 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1317 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1318 extraneous parentheses, dead code section and formatting.
1320 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1323 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1324 wide enough for jumps in the line-numbering to be visible.
1325 (layout::print_gap_in_line_numbering): New member function.
1326 (layout::calculate_line_spans): When using line numbering, merge
1327 line spans that are only 1 line apart.
1328 (diagnostic_show_locus): When printing line numbers, show gaps in
1329 line numbering directly, rather than printing headers.
1330 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1331 line-numbering with multiple line spans.
1332 (selftest::test_fixit_insert_containing_newline_2): Add test of
1333 line-numbering, in which the spans are close enough to be merged.
1335 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1337 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1338 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1339 * tree-vrp.c (range_is_nonnull): Remove.
1340 (range_includes_zero_p): Accept value_range instead of min/max.
1341 (extract_range_from_binary_expr_1): Do not early bail on
1343 Use range_includes_zero_p instead of range_is_nonnull.
1344 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1345 of range_is_nonnull.
1346 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1347 special case VR_ANTI_RANGE.
1348 (vrp_finalize): Same.
1349 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1351 (range_is_nonnull): Remove.
1352 * vr-values.c (vrp_stmt_computes_nonzero): Use
1353 range_includes_zero_p instead of range_is_nonnull.
1354 (extract_range_basic): Pass value_range to range_includes_zero_p
1355 instead of range_is_nonnull.
1357 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1359 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1360 * emit-rtl.h (rtl_data): Remove return_bnd.
1361 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1362 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1363 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1364 (POINTER_BOUNDS_MODE): Remove definition.
1365 (make_pointer_bounds_mode): Remove.
1366 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1367 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1368 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1369 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1370 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1371 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1372 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1374 * config/i386/i386-modes.def (BND32, BND64): Remove.
1375 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1376 (dbx64_register_map): Ditto.
1377 (svr4_dbx_register_map): Ditto.
1378 (indirect_thunk_bnd_needed): Remove.
1379 (indirect_thunks_bnd_used): Ditto.
1380 (indirect_return_bnd_needed): Ditto.
1381 (indirect_return_via_cx_bnd): Ditto.
1382 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1383 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1384 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1385 (output_indirect_thunk_function): Remove handling of
1386 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1387 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1388 (ix86_save_reg): Remove handling of crtl->return_bnd.
1389 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1390 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1391 and UNSPEC_BNDLX_ADDR.
1392 (ix86_output_indirect_branch_via_reg): Remove handling of
1393 indirect_thunk_prefix_bnd.
1394 (ix86_output_indirect_branch_via_push): Ditto.
1395 (ix86_output_function_return): Ditto.
1396 (ix86_output_indirect_function_return): Ditto.
1397 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1398 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1399 (CALL_USED_REGISTERS): Ditto.
1400 (REG_ALLOC_ORDER): Update for removal of bound registers.
1401 (HI_REGISTER_NAMES): Ditto.
1402 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1403 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1404 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1405 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1406 (FIRST_PSEUDO_REG): Update.
1407 (BND): Remove mode iterator.
1408 * config/i386/predicates.md (bnd_mem_operator): Remove.
1410 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1412 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1415 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1417 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1418 the case in which the permute needs only a single element and
1419 repeats for every vector of the result. Extend that case to
1420 handle variable-length vectors.
1421 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1423 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1426 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1427 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1429 2018-08-24 Richard Biener <rguenther@suse.de>
1431 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1432 bb_flags_allocated members.
1433 (auto_flag): New RAII class for allocating flags.
1434 (auto_edge_flag): New RAII class for allocating edge flags.
1435 (auto_bb_flag): New RAII class for allocating bb flags.
1436 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1438 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1439 in favor of temporarily allocated BB flag.
1440 * hsa-brig.c: Re-order includes.
1441 * hsa-dump.c: Likewise.
1442 * hsa-regalloc.c: Likewise.
1443 * print-rtl.c: Likewise.
1444 * profile-count.c: Likewise.
1446 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1449 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1452 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1455 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1456 from wide_int_range_multiplicative_op.
1458 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1460 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1463 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1465 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1468 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1470 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1471 full GENERIC expression used for replacement.
1473 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1475 * tree-vrp.c (abs_extent_range): Remove.
1476 (extract_range_into_wide_ints): Pass wide ints by reference.
1477 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1478 Pass wide ints by reference in all calls to
1479 extract_range_into_wide_ints.
1480 * wide-int-range.cc (wide_int_range_div): New.
1481 * wide-int-range.h (wide_int_range_div): New.
1482 (wide_int_range_includes_zero_p): New.
1483 (wide_int_range_zero_p): New.
1485 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1487 * config/aarch64/aarch64.md (arches): New enum.
1488 (arch): New enum attr.
1489 (arch_enabled): New attr.
1490 (enabled): Now uses arch_enabled only.
1491 (simd, sve, fp16): Removed attribute.
1492 (fp): Attr now defined in terms of 'arch'.
1493 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1494 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1495 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1496 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1497 attributes into 'arch'.
1498 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1499 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1500 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1501 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1502 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1503 'simd' attribute into 'arch'.
1504 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1505 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1506 Convert use of 'fp' attribute to 'arch'.
1507 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1508 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1510 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1511 (different modes) Merge 'fp' and 'simd' into 'arch'.
1512 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1515 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1517 PR rtl-optimization/87026
1518 * expmed.c (canonicalize_comparison): If we can no longer create
1519 pseudoregisters, don't.
1521 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1524 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1526 * config/arm/arm.c (speculation_barrier_libfunc): New static
1528 (arm_init_libfuncs): Initialize it.
1529 (arm_emit_speculation_barrier): New function.
1530 * config/arm/arm.md (speculation_barrier): Call
1531 arm_emit_speculation_barrier for architectures that do not have
1533 (speculation_barrier_insn): Only match on Armv7 or later.
1535 2018-08-23 Richard Biener <rguenther@suse.de>
1538 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1541 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1543 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1544 of single-vector TBLs.
1545 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1548 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1551 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1552 aarch64_evpc_tbl guard.
1554 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1556 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1559 2018-08-22 Martin Sebor <msebor@redhat.com>
1562 * tree-pretty-print.c (pretty_print_string): Add argument.
1563 (dump_generic_node): Call to pretty_print_string with string size.
1565 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1567 PR rtl-optimization/86771
1568 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1569 of two SETs into those two SETs, one to be placed at i2, if that SETs
1570 destination is modified between i2 and i3.
1572 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1574 PR tree-optimization/86725
1575 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1577 (vect_analyze_scalar_cycles_1): Check it.
1579 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1581 PR tree-optimization/86725
1582 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1583 an outer loop phi as a double reduction, make sure that the
1584 single user of the phi result is an inner loop phi.
1586 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1588 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1589 grouped stores with gaps to a strided group.
1591 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1593 * tree-vect-stmts.c (get_group_load_store_type)
1594 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1595 first statement in a group.
1597 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1599 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1600 the sequence used in gcc/gcc.c.
1602 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1605 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1608 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1610 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1611 Darwin10-specific unwinder-shim.
1612 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1613 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1614 New to cater for Darwin10 Rosetta.
1616 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1618 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1619 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1621 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1626 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1627 (dwarf2out_switch_text_section): Generate a local label for the
1628 second function sub-section and apply it as the second FDE start
1630 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1631 second sub-section start.
1633 2018-08-22 Richard Biener <rguenther@suse.de>
1635 PR tree-optimization/86988
1636 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1638 2018-08-22 Richard Biener <rguenther@suse.de>
1640 PR tree-optimization/86945
1641 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1643 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1645 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1646 a comment about how uses of r2 for .sdata2 come about.
1648 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1650 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1652 2018-08-21 Marek Polacek <polacek@redhat.com>
1654 PR c++/86981, Implement -Wpessimizing-move.
1655 * doc/invoke.texi: Document -Wpessimizing-move.
1657 2018-08-21 Jan Hubicka <jh@suse.cz>
1659 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1660 * tree.h (is_redundant_typedef): Remove.
1661 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1663 2018-08-21 Jan Hubicka <jh@suse.cz>
1665 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1668 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1670 * expmed.c (extract_low_bits): Reject invalid subregs early.
1672 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1675 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1678 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1680 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1681 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1682 * config/vxworks.c: Likewise.
1684 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1686 * config/vxworks.c: Set targetm.have_ctors_dtors
1687 if HAVE_INITFINI_ARRAY_SUPPORT.
1688 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1689 if HAVE_INITFINI_ARRAY_SUPPORT.
1691 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1693 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1694 default search path for VxWorks < 7.
1696 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1698 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1699 (get_format_string): Refer to c_getstr.
1701 2018-08-21 Tom de Vries <tdevries@suse.de>
1703 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1704 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1705 (debuginfo_early_stop): Declare.
1706 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1707 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1708 (debuginfo_early_stop): New function.
1709 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1710 and debuginfo_early_stop.
1711 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1712 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1713 (general_init): Call debuginfo_early_init.
1714 (finalize): Call debuginfo_fini.
1715 (do_compile): Call debuginfo_init.
1716 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1718 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1720 2018-08-21 Tom de Vries <tdevries@suse.de>
1722 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1723 flag_dump_noaddr and flag_dump_unnumbered.
1725 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1727 * wide-int-range.cc (wide_int_range_abs): New.
1728 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1729 * wide-int-range.h (wide_int_range_abs): New.
1730 (wide_int_range_min_max): New.
1731 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1732 case to call wide_int_range_abs.
1733 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1734 (extract_range_from_abs_expr): Delete.
1736 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1739 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1740 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1743 2018-08-20 Nathan Sidwell <nathan@acm.org>
1744 Jeff Law <law@redhat.com>
1746 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1747 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1749 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1752 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1753 (decl_attributes): Likewise.
1754 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1756 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1757 * diagnostic-core.h (class auto_diagnostic_group): New class.
1758 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1759 (diagnostic_report_diagnostic): Handle the first diagnostics within
1761 (emit_diagnostic): Add auto_diagnostic_group instance.
1763 (inform_n): Likewise.
1764 (warning): Likewise.
1765 (warning_at): Likewise.
1766 (warning_n): Likewise.
1767 (pedwarn): Likewise.
1768 (permerror): Likewise.
1770 (error_n): Likewise.
1771 (error_at): Likewise.
1773 (fatal_error): Likewise.
1774 (internal_error): Likewise.
1775 (internal_error_no_backtrace): Likewise.
1776 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1777 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1778 * diagnostic.h (struct diagnostic_context): Add fields
1779 "diagnostic_group_nesting_depth",
1780 "diagnostic_group_emission_count", "begin_group_cb",
1782 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1783 Add auto_diagnostic_group instance(s).
1784 (find_explicit_erroneous_behavior): Likewise.
1785 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1786 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1787 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1788 (gimplify_va_arg_expr): Likewise.
1789 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1790 (HSA_SORRY_AT): Likewise.
1791 * ipa-devirt.c (compare_virtual_tables): Likewise.
1792 (warn_odr): Likewise.
1793 * multiple_target.c (expand_target_clones): Likewise.
1794 * opts-common.c (cmdline_handle_error): Likewise.
1795 * reginfo.c (globalize_reg): Likewise.
1796 * substring-locations.c (format_warning_n_va): Likewise.
1797 * tree-inline.c (expand_call_inline): Likewise.
1798 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1799 * tree-ssa-loop-niter.c
1800 (do_warn_aggressive_loop_optimizations): Likewise.
1801 * tree-ssa-uninit.c (warn_uninit): Likewise.
1802 * tree.c (warn_deprecated_use): Likewise.
1804 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1807 * config/i386/i386.md (eh_return): Always update EH return
1808 address in word_mode.
1810 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1812 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1813 TARGET_SPLIT_COMPLEX_ARG is defined.
1815 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1817 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1819 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1822 * expr.c (expand_assignment): Assert that bitpos is positive.
1823 (store_field): Likewise
1824 (expand_expr_real_1): Make sure that bitpos is positive.
1825 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1828 2018-08-20 Nathan Sidwell <nathan@acm.org>
1830 * Makefile.in (CPP_ID_DATA_H): Delete.
1831 (CPP_INTERNAL_H): Don't add it.
1832 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1833 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1835 2018-08-20 Richard Biener <rguenther@suse.de>
1837 PR tree-optimization/78655
1838 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1839 pointer + offset nonnull if either operand is nonnull work.
1841 2018-08-20 Tom de Vries <tdevries@suse.de>
1843 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1844 unless the referenced die describes the added property using
1845 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1846 Otherwise, add a DW_AT_location to the referenced die.
1848 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1851 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1852 register_operand when calling ix86_set_reg_reg_cost.
1853 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1854 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1855 predicate and to 1 otherwise.
1857 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1859 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1860 emit a diagnostic that it is not supported and reset the option.
1861 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1862 supported and consume the option. (ASM_FINAL_SPEC): New.
1864 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1866 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1869 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1871 C-SKY port: Documentation
1873 * doc/extend.texi (C-SKY Function Attributes): New section.
1874 * doc/invoke.texi (Option Summary): Add C-SKY options.
1875 (C-SKY Options): New section.
1876 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1878 2018-08-17 Jojo <jijie_rong@c-sky.com>
1879 Huibin Wang <huibin_wang@c-sky.com>
1880 Sandra Loosemore <sandra@codesourcery.com>
1881 Chung-Lin Tang <cltang@codesourcery.com>
1883 C-SKY port: Backend implementation
1885 * config/csky/*: New.
1886 * common/config/csky/*: New.
1888 2018-08-17 Jojo <jijie_rong@c-sky.com>
1889 Huibin Wang <huibin_wang@c-sky.com>
1890 Sandra Loosemore <sandra@codesourcery.com>
1891 Chung-Lin Tang <cltang@codesourcery.com>
1892 Andrew Jenner <andrew@codesourcery.com>
1894 C-SKY port: Configury
1896 * config.gcc (csky-*-*): New.
1897 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1898 * configure: Regenerated.
1900 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1902 * dump-context.h: Include "dumpfile.h".
1903 (dump_context::dump_printf_va): Convert final param from va_list
1904 to va_list *. Convert from ATTRIBUTE_PRINTF to
1905 ATTRIBUTE_GCC_DUMP_PRINTF.
1906 (dump_context::dump_printf_loc_va): Likewise.
1907 * dumpfile.c: Include "stringpool.h".
1908 (make_item_for_dump_printf_va): Delete.
1909 (make_item_for_dump_printf): Delete.
1910 (class dump_pretty_printer): New class.
1911 (dump_pretty_printer::dump_pretty_printer): New ctor.
1912 (dump_pretty_printer::emit_items): New member function.
1913 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1915 (dump_pretty_printer::emit_item): New member function.
1916 (dump_pretty_printer::stash_item): New member function.
1917 (dump_pretty_printer::format_decoder_cb): New member function.
1918 (dump_pretty_printer::decode_format): New member function.
1919 (dump_context::dump_printf_va): Reimplement in terms of
1920 dump_pretty_printer.
1921 (dump_context::dump_printf_loc_va): Convert final param from va_list
1923 (dump_context::begin_scope): Reimplement call to
1924 make_item_for_dump_printf.
1925 (dump_printf): Update for change to dump_printf_va.
1926 (dump_printf_loc): Likewise.
1927 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1928 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1929 with %T, %E, and %G.
1930 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1931 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1932 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1933 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1934 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1935 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1936 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1937 within a dump_printf_loc call to "%wu".
1938 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1939 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1940 missing space after "=".
1941 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1942 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1943 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1944 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1945 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1946 duplicate "vectorized" from message.
1948 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1950 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1951 polyNxK_t element's TYPE_STRING_FLAG.
1953 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1955 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1956 (they were unnamed before). Fix comments.
1958 2018-08-17 Nathan Sidwell <nathan@acm.org>
1960 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1962 2018-08-17 Richard Biener <rguenther@suse.de>
1964 PR tree-optimization/86841
1965 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1967 2018-08-17 Martin Liska <mliska@suse.cz>
1969 * common.opt: Remove Warn, Init and Report for options with
1970 Ignore/Deprecated flag. Warning is done automatically for
1972 * config/i386/i386.opt: Likewise.
1973 * config/ia64/ia64.opt: Likewise.
1974 * config/rs6000/rs6000.opt: Likewise.
1975 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1976 Remove usage of flag_check_pointer_bounds.
1977 * lto-wrapper.c (merge_and_complain): Do not handle
1978 OPT_fcheck_pointer_bounds.
1979 (append_compiler_options): Likewise.
1980 * opt-functions.awk: Do not handle Deprecated.
1981 * optc-gen.awk: Check that Var, Report and Init are not
1982 used for an option with Ignore/Deprecated flag.
1983 * opts-common.c (decode_cmdline_option): Do not report
1985 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1987 * opts.h (struct cl_option): Remove cl_deprecated flag.
1988 (CL_ERR_DEPRECATED): Remove error enum value.
1990 2018-08-17 Richard Biener <rguenther@suse.de>
1993 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1994 across a va-arg-pack using call adjust its return value accordingly.
1996 2018-08-16 Martin Sebor <msebor@redhat.com>
1998 PR tree-optimization/86853
1999 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2000 (struct fmtresult): Add member and initialize it in ctors.
2001 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2002 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2003 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2004 (parse_directive): Handle %C same as %c.
2005 (sprintf_dom_walker::compute_format_length): Adjust.
2006 (is_call_safe): Adjust.
2008 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2010 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2011 for determining how to count the elements.
2012 * builtins.h (c_strlen): Adjust prototype.
2013 * expr.c (string_constant): Add new parameter mem_size.
2014 Set *mem_size appropriately.
2015 * expr.h (string_constant): Adjust protoype.
2016 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2017 * gimple-fold.h (get_range_strlen): Adjust prototype.
2018 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2019 (format_string): Call get_string_length with eltsize.
2021 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2023 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2024 to emit the span, rather than setting it as the prefix.
2026 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2028 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2029 "margin_char" parameter, defaulting to space. Use it in place
2030 of pp_space for the initial part of the margin.
2031 (layout::print_leading_fixits): Use '+' when filling the margin
2032 of line-insertion fix-it hints.
2034 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2036 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2039 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2041 * config/rs6000/altivec.md: Don't set length attribute to the default
2043 * config/rs6000/darwin.md: Ditto.
2044 * config/rs6000/dfp.md: Ditto.
2045 * config/rs6000/htm.md: Ditto.
2046 * config/rs6000/rs6000.md: Ditto.
2047 * config/rs6000/sync.md: Ditto.
2048 * config/rs6000/vsx.md: Ditto.
2050 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2052 * config/rs6000/altivec.md: Don't set length attribute to the default
2053 value, for branch instructions.
2054 * config/rs6000/darwin.md: Ditto.
2055 * config/rs6000/rs6000.md: Ditto.
2057 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2059 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2060 (unnamed conditional branch define_insn): Set length to 4 or 8
2061 depending on offset.
2062 (<bd>_<mode>): Similar, for alternative 0.
2063 (<bd>tf_<mode>): Ditto.
2065 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2067 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2069 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2071 * doc/rtl.texi: Replace old RTX class names with new names.
2074 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2076 * expmed.h (canonicalize_comparison): New declaration.
2077 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2078 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2079 * optabs.c (prepare_cmp_insn): Likewise.
2080 * rtl.h (unsigned_condition_p): New function which checks if a
2081 comparison operator is unsigned.
2083 2018-08-16 Nathan Sidwell <nathan@acm.org>
2085 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2086 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2088 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2091 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2092 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2093 (mov<mov>): ..this and enable unconditionally.
2095 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2097 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2099 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2101 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2102 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2103 "Common" with "Target".
2105 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2107 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2108 * doc/invoke.texi (mmitigate-rop): Remove.
2109 * config/i386/i386.c: Do not include "regrename.h".
2110 (ix86_rop_should_change_byte_p, reg_encoded_number)
2111 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2113 (ix86_reorg): Remove call to ix86_mitigate_rop.
2114 * config/i386/i386.md (attr "modrm_class"): Remove.
2115 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2116 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2117 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2119 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2121 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2122 allow folding of mergeh() and mergel() for the float and double types.
2123 (fold_mergehl_helper): Rework to handle building a permute tree
2126 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2128 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2131 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2133 * common.opt (fdiagnostics-show-labels): New option.
2134 * diagnostic-show-locus.c (class layout_range): Add field
2136 (class layout): Add field "m_show_labels_p".
2137 (layout_range::layout_range): Add param "label" and use it to
2139 (make_range): Pass in NULL for new "label" param of layout_range's
2141 (layout::layout): Initialize m_show_labels_p.
2142 (layout::maybe_add_location_range): Pass in loc_range->m_label
2143 when constructing layout_range instances.
2144 (struct line_label): New struct.
2145 (layout::print_any_labels): New member function.
2146 (layout::print_line): Call it if label-printing is enabled.
2147 (selftest::test_one_liner_labels): New test.
2148 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2149 * diagnostic.c (diagnostic_initialize): Initialize
2150 context->show_labels_p.
2151 * diagnostic.h (struct diagnostic_context): Add field
2153 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2154 -fno-diagnostics-show-labels.
2155 * dwarf2out.c (gen_producer_string): Add
2156 OPT_fdiagnostics_show_labels to the ignored options.
2157 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2159 (gcc_rich_location::maybe_add_expr): Likewise.
2160 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2161 label" param, defaulting to NULL.
2162 (gcc_rich_location::add_expr): Add "label" param.
2163 (gcc_rich_location::maybe_add_expr): Likewise.
2164 (class text_range_label): New class.
2165 (class range_label_for_type_mismatch): New class.
2166 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2167 of format_warning_va.
2168 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2169 * lto-wrapper.c (merge_and_complain): Add
2170 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2171 (append_compiler_options): Likewise to the dropped options.
2172 (append_diag_options): Likewise to the passed-on options.
2173 * opts.c (common_handle_option): Handle the new option.
2174 * selftest-diagnostic.c
2175 (test_diagnostic_context::test_diagnostic_context): Enable
2177 * substring-locations.c: Include "gcc-rich-location.h".
2178 (format_warning_n_va): Add "fmt_label" and "param_label" params
2179 and use them as appropriate.
2180 (format_warning_va): Add "fmt_label" and "param_label" params,
2181 passing them on to format_warning_n_va.
2182 (format_warning_at_substring): Likewise.
2183 (format_warning_at_substring_n): Likewise.
2184 * substring-locations.h (format_warning_va): Add "fmt_label" and
2185 "param_label" params.
2186 (format_warning_n_va): Likewise.
2187 (format_warning_at_substring): Likewise.
2188 (format_warning_at_substring_n): Likewise.
2189 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2191 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2194 * builtins.c (expand_builtin_memcmp): Do not expand the call
2195 when overflow is detected.
2197 2018-08-15 Martin Sebor <msebor@redhat.com>
2199 PR tree-optimization/71625
2200 * config/aarch64/aarch64-builtins.c
2201 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2203 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2205 * config/s390/s390.c (s390_reorg): Remove loop.
2207 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2210 (darwin_function_switched_text_sections): Delete.
2211 * gcc/config/darwin.h
2212 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2214 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2217 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2218 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2219 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2221 2018-08-15 Martin Liska <mliska@suse.cz>
2223 PR tree-optimization/86925
2224 * predict.c (expr_expected_value_1): When taking
2225 later predictor, assign also probability.
2226 Use fold_build2_initializer_loc in order to fold
2227 the expression in -frounding-math.
2229 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2231 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2233 (expand_vec_perm_1): Try the new method.
2235 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2238 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2239 Check whether lra_live_max_point is 0 before dividing.
2241 2018-08-14 Martin Sebor <msebor@redhat.com>
2243 PR tree-optimization/86650
2244 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2245 (vrp_prop::check_mem_ref): Same.
2247 2018-08-13 Liu Hao <lh_mouse@126.com>
2249 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2250 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2251 and clear it thereafter, as it only works for DBCS.
2253 2018-08-13 Liu Hao <lh_mouse@126.com>
2255 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2256 handle returned by _get_osf_handle().
2258 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2260 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2261 for folding vec_perm.
2263 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2265 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2266 Add support for gimple-folding of vec_pack() and vec_unpack()
2269 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2271 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2272 vec_xst variants to the list.
2273 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2274 vector loads and stores.
2276 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2278 * config.gcc (rs6000-ibm-aix4.x): Delete.
2279 (rs6000-ibm-aix5.1): Delete.
2280 (rs6000-ibm-aix5.2): Delete.
2281 (rs6000-ibm-aix5.3): Delete.
2282 * config/rs6000/aix43.h: Delete.
2283 * config/rs6000/aix51.h: Delete.
2284 * config/rs6000/aix52.h: Delete.
2285 * config/rs6000/t-aix43: Delete.
2287 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2289 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2291 (s390_decompose_address): Factor out constant pool ref
2294 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2296 * config/nds32/nds32-predicates.c
2297 (nds32_can_use_bclr_p): Change return type as bool.
2298 (nds32_can_use_bset_p): Ditto.
2299 (nds32_can_use_btgl_p): Ditto.
2300 (nds32_can_use_bitci_p): Ditto.
2301 * config/nds32/nds32-protos.h
2302 (nds32_can_use_bclr_p): Change declaration.
2303 (nds32_can_use_bset_p): Ditto.
2304 (nds32_can_use_btgl_p): Ditto.
2305 (nds32_can_use_bitci_p): Ditto.
2307 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2309 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2310 Support -msched-prolog-epilog option.
2311 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2313 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2315 * common/config/nds32/nds32-common.c
2316 (nds32_option_optimization_table): Enalbe -malways-align.
2318 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2320 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2322 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2323 OPT_misr_secure_ case.
2324 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2325 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2326 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2328 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2329 (nds32_isr_info): New field security_level.
2330 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2331 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2332 * config/nds32/nds32.opt (misr-secure): New option.
2333 * config/nds32/nds32_init.inc: New file.
2334 * config/nds32/nds32_isr.h: New file.
2336 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2338 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2339 Update comment for atomic instructions.
2340 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2341 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2343 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2344 load for __ATOMIC_SEQ_CST model.
2345 (atomic_loaddi_1): Remove float register target.
2346 (atomic_storedi): Handle CONST_INT values.
2347 (atomic_storedi_1): Remove float register source. Add special case
2349 (memory_barrier): New expander and insn.
2351 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2353 PR tree-optimization/86835
2354 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2355 new_stmt after def_gsi, make sure to insert new_square_stmt after
2356 that stmt, not 2 stmts before it.
2358 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2361 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2364 2018-08-10 Martin Liska <mliska@suse.cz>
2367 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2369 * builtins.c (expand_builtin_expect_with_probability):
2371 (expand_builtin_expect_with_probability): New function.
2372 (build_builtin_expect_predicate): Add new argumnet probability
2373 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2374 (fold_builtin_expect):
2377 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2378 * builtins.h (fold_builtin_expect): Set new argument.
2379 * doc/extend.texi: Document __builtin_expect_with_probability.
2380 * doc/invoke.texi: Likewise.
2381 * gimple-fold.c (gimple_fold_call): Pass new argument.
2382 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2383 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2384 * predict.c (get_predictor_value): New function.
2385 (expr_expected_value): Add new argument probability. Assume
2386 that predictor and probability are always non-null.
2387 (expr_expected_value_1): Likewise. For __builtin_expect and
2388 __builtin_expect_with_probability set probability. Handle
2389 combination in binary expressions.
2390 (tree_predict_by_opcode): Simplify code by simply calling
2391 get_predictor_value.
2392 (pass_strip_predict_hints::execute): Add handling of
2393 BUILT_IN_EXPECT_WITH_PROBABILITY.
2394 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2396 * tree.h (DECL_BUILT_IN_P): New function.
2398 2018-08-10 Martin Liska <mliska@suse.cz>
2400 PR tree-optimization/85799
2401 * passes.def: Add argument for pass_strip_predict_hints.
2402 * predict.c (class pass_strip_predict_hints): Add new argument
2404 (strip_predictor_early): New function.
2405 (pass_strip_predict_hints::execute): Call the function to
2407 (strip_predict_hints): New function.
2408 * predict.def: Fix comment.
2410 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2412 * Makefile.in: Clarify which tm.texi to copy over to assert the
2413 right to grant a GFDL license for all.
2415 2018-08-09 Jeff Law <law@redhat.com>
2417 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2420 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2422 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2425 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2427 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2428 reductions for variable-length vectors.
2430 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2433 * common.opt (fdiagnostics-show-line-numbers): New option.
2434 * diagnostic-show-locus.c (class layout): Add fields
2435 "m_show_line_numbers_p" and "m_linenum_width";
2436 (num_digits): New function.
2437 (test_num_digits): New function.
2438 (layout::layout): Initialize new fields. Update m_x_offset
2439 logic to handle any left margin.
2440 (layout::print_source_line): Print line number when requested.
2441 (layout::start_annotation_line): New member function.
2442 (layout::print_annotation_line): Call it.
2443 (layout::print_leading_fixits): Likewise.
2444 (layout::print_trailing_fixits): Likewise. Update calls to
2445 move_to_column for new parameter.
2446 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2447 it to potentially call start_annotation_line.
2448 (layout::show_ruler): Call start_annotation_line.
2449 (selftest::test_line_numbers_multiline_range): New selftest.
2450 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2451 and selftest::test_line_numbers_multiline_range.
2452 * diagnostic.c (diagnostic_initialize): Initialize
2453 show_line_numbers_p.
2454 * diagnostic.h (struct diagnostic_context): Add field
2455 "show_line_numbers_p".
2456 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2457 -fno-diagnostics-show-line-numbers.
2458 * dwarf2out.c (gen_producer_string): Add
2459 OPT_fdiagnostics_show_line_numbers to the ignored options.
2460 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2461 one setting" options.
2462 (append_compiler_options): Likewise to the dropped options.
2463 (append_diag_options): Likewise to the passed-on options.
2464 * opts.c (common_handle_option): Handle the new option.
2465 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2467 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2469 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2470 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2471 third argument of type "const signed char" to descriptions of
2472 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2473 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2474 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2475 __builtin_bcdsub_ov functions.
2477 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2479 PR tree-optimization/86858
2480 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2481 flow_bb_inside_loop_p calls.
2483 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2485 PR tree-optimization/86871
2486 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2487 instead of gimple_assign_lhs.
2489 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2492 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2493 register constraint to operand 0.
2494 (add<mode>3_carryinC): Likewise.
2495 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2497 2018-08-09 Martin Liska <mliska@suse.cz>
2500 * common.opt: Remove extra line.
2502 2018-08-09 Martin Liska <mliska@suse.cz>
2504 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2505 at the end of a line, make first letter capital and end up
2506 a sentence with a dot.
2507 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2508 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2509 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2510 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2511 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2512 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2513 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2514 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2515 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2516 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2517 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2518 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2519 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2520 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2521 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2522 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2523 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2524 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2526 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2529 * config/s390/s390.c (s390_option_override_internal): Reduce the
2530 stack-clash-protection-probe-interval param if it would be too big
2533 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2536 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2537 * config/m68k/m68k.c (handle_move_double): Don't call
2538 m68k_final_prescan_insn.
2539 (m68k_adjust_decorated_operand): Renamed from
2540 m68k_final_prescan_insn, remove first and third operand and
2542 (print_operand): Call it.
2543 (print_operand_address): Call it.
2545 2018-08-08 Nathan Sidwell <nathan@acm.org>
2547 * diagnostic.c (diagnostic_report_current_module): Use
2548 linemap_included_from & linemap_included_from_linemap.
2550 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2552 * config/aarch64/aarch64-cores.def: Add phecda core.
2553 * config/aarch64/aarch64-tune.md: Regenerate.
2554 * doc/invoke.texi: Add phecda core.
2556 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2559 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2561 * config/s390/s390.md ("movti"): Add more alternatives for
2562 constant to GPR copies.
2564 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2566 * config/s390/s390.c: Fix whitespace damage throughout the file.
2567 * config/s390/s390.h: Likewise.
2568 * config/s390/tpf.h: Likewise.
2570 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2572 * config/s390/s390.c (s390_loadrelative_operand_p):
2573 Remove TARGET_CPU_ZARCH usages.
2574 (s390_rtx_costs): Likewise.
2575 (s390_legitimate_constant_p): Likewise.
2576 (s390_cannot_force_const_mem): Likewise.
2577 (legitimate_reload_constant_p): Likewise.
2578 (s390_preferred_reload_class): Likewise.
2579 (legitimize_pic_address): Likewise.
2580 (legitimize_tls_address): Likewise.
2581 (s390_split_branches): Removed.
2582 (s390_add_execute): Removed.
2583 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2584 (s390_mainpool_start): Likewise.
2585 (s390_mainpool_finish): Likewise.
2586 (s390_mainpool_cancel): Removed.
2587 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2588 (s390_chunkify_cancel): Likewise.
2589 (s390_return_addr_rtx): Likewise.
2590 (s390_register_info): Remove split_branches_pending_p uages.
2591 (s390_optimize_register_info): Likewise.
2592 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2593 split_branches_pending_p usages.
2594 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2595 (s390_load_got): Likewise.
2596 (s390_expand_split_stack_prologue): Likewise.
2597 (output_asm_nops): Likewise.
2598 (s390_function_profiler): Likewise.
2599 (s390_emit_call): Likewise.
2600 (s390_conditional_register_usage): Likewise.
2601 (s390_optimize_prologue): Likewise.
2602 (s390_reorg): Remove TARGET_CPU_ZARCH and
2603 split_branches_pending_p usages.
2604 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2606 (s390_output_indirect_thunk_function): Likewise.
2607 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2608 (TARGET_CPU_ZARCH_P): Removed.
2609 (struct machine_function): Remove split_branches_pending_p.
2610 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2612 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2614 * common/config/s390/s390-common.c (processor_flags_table):
2616 * config.gcc: Remove with_arch/with_tune support.
2617 * config/s390/2064.md: Remove cpu attribute comparisons.
2618 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2620 * config/s390/linux.h (ASM_SPEC):
2621 Remove -march support.
2622 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2623 Use a table to get an arch level.
2624 * config/s390/s390-opts.h (enum processor_type):
2626 * config/s390/s390.c
2627 (processor_table): Remove entries, add arch_level values.
2628 (s390_issue_rate): Remove cases.
2629 (s390_option_override): Adjust
2630 s390_option_override_internal() call.
2631 (s390_option_override_internal): Remove deprecation warning.
2632 (s390_valid_target_attribute_tree): Adjust
2633 s390_option_override_internal() call.
2634 * config/s390/s390.h (struct s390_processor):
2635 Share with s390-c.c, add arch_level field.
2636 * config/s390/s390.md:
2637 Remove occurrences in cpu attribute.
2638 * config/s390/s390.opt: Remove -march/-mtune support.
2639 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2640 * doc/invoke.texi: Remove deprecation warning.
2642 2018-08-08 Luis Machado <luis.machado@linaro.org>
2644 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2646 (qdf24xx_tunings): Set vector cost structure to
2647 qdf24xx_vector_cost.
2649 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2650 <register_sextend>: Set to 3.
2652 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2655 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2656 * config/aarch64/aarch64-simd.md
2657 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2658 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2659 (aarch64_frecpx<mode>): ...this new pattern.
2660 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2661 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2663 2018-08-07 Martin Liska <mliska@suse.cz>
2666 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2667 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2668 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2669 * doc/extend.texi: Document that malloc attribute adds
2672 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2675 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2676 Define to speculation_safe_value_not_needed.
2678 2018-08-06 Jeff Law <law@redhat.com>
2680 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2681 the vr_values instance to cprop_into_stmt.
2682 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2683 (cprop_operand): Also query EVRP to determine if OP is a constant.
2685 2018-08-06 Nathan Sidwell <nathan@acm.org>
2687 * diagnostic.c (diagnostic_report_current_module): Reroll
2688 included-at loop. Translate text.
2690 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2692 * function-tests.c (selftest::test_expansion_to_rtl): Call
2693 free_after_compilation.
2695 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2697 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2699 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2701 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2702 loops with memory block operations from getting unrolled.
2704 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2707 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2708 Define to speculation_safe_value_not_needed.
2710 2018-08-06 Jeff Law <law@redhat.com>
2712 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2715 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2718 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2719 with all enabled __intN types.
2721 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2723 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2725 * alias.c (record_set): Check for clobber high.
2726 * cfgexpand.c (expand_gimple_stmt): Likewise.
2727 * combine-stack-adj.c (single_set_for_csa): Likewise.
2728 * combine.c (find_single_use_1): Likewise.
2729 (set_nonzero_bits_and_sign_copies): Likewise.
2730 (get_combine_src_dest): Likewise.
2731 (is_parallel_of_n_reg_sets): Likewise.
2732 (try_combine): Likewise.
2733 (record_dead_and_set_regs_1): Likewise.
2734 (reg_dead_at_p_1): Likewise.
2735 (reg_dead_at_p): Likewise.
2736 * dce.c (deletable_insn_p): Likewise.
2737 (mark_nonreg_stores_1): Likewise.
2738 (mark_nonreg_stores_2): Likewise.
2739 * df-scan.c (df_find_hard_reg_defs): Likewise.
2740 (df_uses_record): Likewise.
2741 (df_get_call_refs): Likewise.
2742 * dwarf2out.c (mem_loc_descriptor): Likewise.
2743 * haifa-sched.c (haifa_classify_rtx): Likewise.
2744 * ira-build.c (create_insn_allocnos): Likewise.
2745 * ira-costs.c (scan_one_insn): Likewise.
2746 * ira.c (equiv_init_movable_p): Likewise.
2747 (rtx_moveable_p): Likewise.
2748 (interesting_dest_for_shprep): Likewise.
2749 * jump.c (mark_jump_label_1): Likewise.
2750 * postreload-gcse.c (record_opr_changes): Likewise.
2751 * postreload.c (reload_cse_simplify): Likewise.
2752 (struct reg_use): Add source expr.
2753 (reload_combine): Check for clobber high.
2754 (reload_combine_note_use): Likewise.
2755 (reload_cse_move2add): Likewise.
2756 (move2add_note_store): Likewise.
2757 * print-rtl.c (print_pattern): Likewise.
2758 * recog.c (decode_asm_operands): Likewise.
2759 (store_data_bypass_p): Likewise.
2760 (if_test_bypass_p): Likewise.
2761 * regcprop.c (kill_clobbered_value): Likewise.
2762 (kill_set_value): Likewise.
2763 * reginfo.c (reg_scan_mark_refs): Likewise.
2764 * reload1.c (maybe_fix_stack_asms): Likewise.
2765 (eliminate_regs_1): Likewise.
2766 (elimination_effects): Likewise.
2767 (mark_not_eliminable): Likewise.
2768 (scan_paradoxical_subregs): Likewise.
2769 (forget_old_reloads_1): Likewise.
2770 * reorg.c (find_end_label): Likewise.
2771 (try_merge_delay_insns): Likewise.
2772 (redundant_insn): Likewise.
2773 (own_thread_p): Likewise.
2774 (fill_simple_delay_slots): Likewise.
2775 (fill_slots_from_thread): Likewise.
2776 (dbr_schedule): Likewise.
2777 * resource.c (update_live_status): Likewise.
2778 (mark_referenced_resources): Likewise.
2779 (mark_set_resources): Likewise.
2780 * rtl.c (copy_rtx): Likewise.
2781 * rtlanal.c (reg_referenced_p): Likewise.
2782 (single_set_2): Likewise.
2783 (noop_move_p): Likewise.
2784 (note_stores): Likewise.
2785 * sched-deps.c (sched_analyze_reg): Likewise.
2786 (sched_analyze_insn): Likewise.
2788 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2790 * cse.c (invalidate_reg): New function extracted from...
2791 (invalidate): ...here.
2792 (canonicalize_insn): Check for clobber high.
2793 (invalidate_from_clobbers): invalidate clobber highs.
2794 (invalidate_from_sets_and_clobbers): Likewise.
2795 (count_reg_usage): Check for clobber high.
2796 (insn_live_p): Likewise.
2797 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2798 (cselib_invalidate_regno): Check for clobber in setter.
2799 (cselib_invalidate_rtx): Pass through setter.
2800 (cselib_invalidate_rtx_note_stores):
2801 (cselib_process_insn): Check for clobber high.
2802 * cselib.h (cselib_invalidate_rtx): Add operand.
2804 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2806 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2807 (mark_not_eliminable): Likewise.
2808 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2809 * lra-lives.c (process_bb_lives): Check for clobber high.
2810 * lra.c (new_insn_reg): Remember clobber highs.
2811 (collect_non_operand_hard_regs): Check for clobber high.
2812 (lra_set_insn_recog_data): Likewise.
2813 (add_regs_to_insn_regno_info): Likewise.
2814 (lra_update_insn_regno_info): Likewise.
2816 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2818 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2819 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2821 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2823 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2824 (copy_insn_1): Likewise.
2825 (gen_hard_reg_clobber_high): New gen function.
2826 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2827 * genemit.c (gen_exp): Likewise.
2828 (gen_emit_seq): Pass through info.
2829 (gen_insn): Check for CLOBBER_HIGH.
2830 (gen_expand): Pass through info.
2831 (gen_split): Likewise.
2832 (output_add_clobbers): Likewise.
2833 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2834 (remove_clobbers): Likewise.
2835 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2837 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2839 * doc/rtl.texi (clobber_high): Add.
2840 (parallel): Add in clobber high
2841 * rtl.c (rtl_check_failed_code3): Add function.
2842 * rtl.def (CLOBBER_HIGH): Add expression.
2843 * rtl.h (RTL_CHECKC3): Add macro.
2844 (rtl_check_failed_code3): Add declaration.
2845 (XC3EXP): Add macro.
2847 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2850 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2851 cfun->machine->max_used_stack_alignment if needed.
2853 2018-08-04 Martin Sebor <msebor@redhat.com>
2855 PR tree-optimization/86571
2856 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2859 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2862 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2865 2018-08-03 Jeff Law <law@redhat.com>
2868 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2869 Define to speculation_safe_value_not_needed.
2871 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2873 * doc/gcov.texi (-x): Remove duplicate "to".
2874 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2875 (-Wif-not-aligned): Remove duplicate "is".
2876 (-flto): Remove duplicate "the".
2877 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2878 duplicate "v5.00.b".
2879 (MSP430 Options): Remove duplicate "and" from the description
2880 of "-mgprel-sec=regexp".
2881 (x86 Options): Remove duplicate copies of "vmldLog102" and
2882 vmlsLog104 from description of "-mveclibabi=type".
2884 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2886 * internal-fn.h (first_commutative_argument): Declare.
2887 * internal-fn.c (first_commutative_argument): New function.
2888 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2889 restrictions for pattern statements. Use first_commutative_argument
2890 to look for commutative operands in calls to internal functions.
2892 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2894 * Makefile.in (wide-int-range.o): New.
2895 * tree-vrp.c: Move all the wide_int_* functions to...
2896 * wide-int-range.cc: ...here.
2897 * tree-vrp.h: Move all the wide_int_* prototypes to...
2898 * wide-int-range.h: ...here.
2900 2018-08-03 Tom de Vries <tdevries@suse.de>
2902 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2904 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2905 * except.c (output_function_exception_table): Do early exit if
2906 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2908 2018-08-03 Martin Liska <mliska@suse.cz>
2910 * predict.c (dump_prediction): Change to 2 digits
2913 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2915 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2917 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2919 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2921 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2922 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2923 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2924 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2925 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2927 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2929 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2930 pp_take_prefix when saving the existing prefix.
2931 * diagnostic.c (diagnostic_append_note): Likewise.
2932 * langhooks.c (lhd_print_error_function): Likewise.
2933 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2934 param's type. Free the existing prefix.
2935 (pp_take_prefix): New function.
2936 (pretty_printer::pretty_printer): Drop the prefix parameter.
2937 Rename the length parameter to match the comment.
2938 (pretty_printer::~pretty_printer): Free the prefix.
2939 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2941 (struct pretty_printer): Drop the "const" from "prefix" field's
2942 type and clarify memory management.
2943 (pp_set_prefix): Drop the "const" from the 2nd param.
2944 (pp_take_prefix): New decl.
2946 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2948 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2949 for word_mode_ok here instead of passing as argument.
2950 (expand_block_compare): Change select_block_compare_mode() call.
2951 (expand_strncmp_gpr_sequence): New function.
2952 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2954 2018-08-02 Jeff Law <law@redhat.com>
2957 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2958 Define to speculation_safe_value_not_needed.
2961 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2962 Define to speculation_safe_value_not_needed.
2964 2018-08-02 Tom de Vries <tdevries@suse.de>
2967 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2968 function. Return UI_TARGET unconditionally.
2969 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2970 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2972 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2974 * genemit.c (print_overload_test): Fix typo.
2976 2018-08-02 Richard Biener <rguenther@suse.de>
2978 PR tree-optimization/86816
2979 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2980 which checks for value availability before querying it.
2981 (gvn_uses_equal): Use it.
2982 (same_succ_hash): Likewise.
2983 (gimple_equal_p): Likewise.
2985 2018-08-02 Nick Clifton <nickc@redhat.com>
2988 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2989 Define to speculation_safe_value_not_needed.
2992 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2993 Define to speculation_safe_value_not_needed.
2996 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2997 Define to speculation_safe_value_not_needed.
3000 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3001 Define to speculation_safe_value_not_needed.
3004 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3005 Define to speculation_safe_value_not_needed.
3008 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3009 Define to speculation_safe_value_not_needed.
3012 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3013 Define to speculation_safe_value_not_needed.
3016 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3017 Define to speculation_safe_value_not_needed.
3020 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3021 speculation_safe_value_not_needed.
3024 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3025 to speculation_safe_value_not_needed.
3027 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3029 * doc/md.texi: Expand the documentation of instruction names
3030 to mention port-local uses. Document '@' in pattern names.
3031 * read-md.h (overloaded_instance, overloaded_name): New structs.
3033 (md_reader::handle_overloaded_name): New member function.
3034 (md_reader::get_overloads): Likewise.
3035 (md_reader::m_first_overload): New member variable.
3036 (md_reader::m_next_overload_ptr): Likewise.
3037 (md_reader::m_overloads_htab): Likewise.
3038 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3039 m_next_overload_ptr and m_overloads_htab.
3040 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3041 (get_mode_token, get_code_token, get_int_token): New functions.
3042 (map_attr_string): Add an optional argument that passes back
3043 the associated iterator.
3044 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3045 (md_reader::handle_overloaded_name, add_overload_instance): New
3047 (apply_iterators): Handle '@' names. Report an error if '@'
3048 is used without iterators.
3049 (initialize_iterators): Initialize the new iterator_group fields.
3050 * genopinit.c (handle_overloaded_code_for)
3051 (handle_overloaded_gen): New functions.
3052 (main): Use them to print declarations of maybe_code_for_* and
3053 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3054 * genemit.c (print_overload_arguments, print_overload_test)
3055 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3056 (main): Use it to print definitions of maybe_code_for_* and
3057 maybe_gen_* functions.
3058 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3059 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3060 instead of explicit mode checks.
3061 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3062 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3063 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3064 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3065 (aarch64_expand_compare_and_swap): Likewise
3066 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3067 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3068 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3069 (aarch64_constant_pool_reload_icode): Delete.
3070 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3071 instead of aarch64_constant_pool_reload_icode. Use
3072 code_for_aarch64_reload_mov instead of explicit mode checks.
3073 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3074 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3075 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3076 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3077 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3078 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3079 (aarch64_atomic_load_op_code): Delete.
3080 (aarch64_emit_atomic_load_op): Likewise.
3081 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3082 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3083 instead of aarch64_emit_atomic_load_op.
3084 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3085 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3086 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3087 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3088 character before the pattern name.
3089 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3090 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3091 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3092 (aarch64_frecps<mode>): Likewise.
3093 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3094 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3095 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3096 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3097 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3099 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3101 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3102 Allow HFmode constants if TARGET_FP_F16INST.
3104 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3107 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3108 No longer check last store for clobber of address register.
3110 2018-08-02 Martin Liska <mliska@suse.cz>
3112 PR gcov-profile/86817
3113 * gcov.c (process_all_functions): New function.
3115 (process_file): Move functions processing to
3116 process_all_functions.
3118 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3120 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3121 "const" to the "gimple *" and "rtx_insn *" parameters.
3122 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3124 (dump_location_t::dump_location_t): Likewise.
3126 2018-08-01 Martin Sebor <msebor@redhat.com>
3128 PR tree-optimization/86650
3129 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3130 rather than a "gcall *". Directly pass the data of interest
3131 to percent_K_format, rather than building a temporary CALL_EXPR
3133 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3134 (gimple_fold_builtin_strncat): Adjust.
3135 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3136 gcall* argument with gimple*.
3137 * gimple-ssa-warn-restrict.c (check_call): Same.
3138 (wrestrict_dom_walker::before_dom_children): Same.
3139 (builtin_access::builtin_access): Same.
3140 (check_bounds_or_overlap): Same
3141 (maybe_diag_overlap): Same.
3142 (maybe_diag_offset_bounds): Same.
3143 * tree-diagnostic.c (default_tree_printer): Move usage of
3144 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3146 * tree-pretty-print.c (percent_K_format): Add argument.
3147 * tree-pretty-print.h: Add argument.
3148 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3149 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3150 (maybe_diag_stxncpy_trunc): Same.
3151 (handle_builtin_stxncpy): Same.
3152 (handle_builtin_strcat): Same.
3154 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3156 * match.pd: Optimise pointer range checks.
3158 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3160 PR tree-optimization/86758
3161 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3162 to remove pattern statements.
3164 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3166 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3167 result of dfs_enumerate_from when constructing stmt_vec_infos,
3168 instead of additionally calling get_loop_body.
3170 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3172 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3174 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3175 When creating an iv, assert that the step is not known to be zero.
3176 (vect_setup_realignment): Update call accordingly.
3177 * tree-vect-stmts.c (vectorizable_store): Likewise.
3178 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3180 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3182 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3183 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3184 (vectorizable_reduction): Likewise.
3185 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3186 (vect_detect_hybrid_slp_stmts): Likewise.
3187 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3189 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3191 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3192 (wide_int_set_zero_nonzero_bits): ...this.
3193 (zero_nonzero_bits_from_vr): Rename to...
3194 (vrp_set_zero_nonzero_bits): ...this.
3195 (extract_range_from_multiplicative_op_1): Abstract wide int
3197 (wide_int_range_multiplicative_op): ...here.
3198 (extract_range_from_binary_expr_1): Extract wide int binary
3199 operations into their own functions.
3200 (wide_int_range_lshift): New.
3201 (wide_int_range_can_optimize_bit_op): New.
3202 (wide_int_range_shift_undefined_p): New.
3203 (wide_int_range_bit_xor): New.
3204 (wide_int_range_bit_ior): New.
3205 (wide_int_range_bit_and): New.
3206 (wide_int_range_trunc_mod): New.
3207 (extract_range_into_wide_ints): New.
3208 (vrp_shift_undefined_p): New.
3209 (extract_range_from_multiplicative_op): New.
3210 (vrp_can_optimize_bit_op): New.
3211 * tree-vrp.h (value_range::dump): New.
3212 (wide_int_range_multiplicative_op): New.
3213 (wide_int_range_lshift):New.
3214 (wide_int_range_shift_undefined_p): New.
3215 (wide_int_range_bit_xor): New.
3216 (wide_int_range_bit_ior): New.
3217 (wide_int_range_bit_and): New.
3218 (wide_int_range_trunc_mod): New.
3219 (zero_nonzero_bits_from_bounds): Rename to...
3220 (wide_int_set_zero_nonzero_bits): ...this.
3221 (zero_nonzero_bits_from_vr): Rename to...
3222 (vrp_set_zero_nonzero_bits): ...this.
3223 (range_easy_mask_min_max): Rename to...
3224 (wide_int_range_can_optimize_bit_op): this.
3225 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3226 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3228 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3230 * tree-vectorizer.h (vect_orig_stmt): New function.
3231 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3232 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3233 (vect_create_epilog_for_reduction): Likewise.
3234 (vectorizable_live_operation): Likewise.
3235 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3236 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3237 * tree-vect-stmts.c (vectorizable_call): Likewise.
3238 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3240 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3242 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3244 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3245 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3246 (vect_transform_loop): Likewise.
3247 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3249 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3251 * tree-vectorizer.h (vect_schedule_slp): Return void.
3252 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3253 (vect_schedule_slp): Likewise.
3255 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3257 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3259 (vect_transform_loop): Update calls accordingly. Schedule SLP
3260 instances before the main loop, if any exist.
3262 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3264 PR tree-optimization/86749
3265 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3266 If the lhs is used in a COND_EXPR, check that it is being used
3267 as the "then" or "else" value.
3269 2018-08-01 Tom de Vries <tdevries@suse.de>
3272 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3273 speculation_safe_value_not_needed.
3275 2018-08-01 Richard Biener <rguenther@suse.de>
3277 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3280 2018-08-01 Martin Liska <mliska@suse.cz>
3282 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3283 format how successful transformation is dumped.
3284 (gimple_mod_pow2_value_transform): Likewise.
3285 (gimple_mod_subtract_transform): Likewise.
3286 (gimple_stringops_transform): Likewise.
3288 2018-08-01 Martin Liska <mliska@suse.cz>
3291 * value-prof.c (interesting_stringop_to_profile_p):
3292 Simplify the code and add BUILT_IN_MEMMOVE.
3293 (gimple_stringops_transform): Likewise.
3295 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3297 * config/aarch64/aarch64-simd.md
3298 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3299 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3300 use GPI iterator instead of SI mode.
3302 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3304 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3305 rs6000_speculation_barrier.
3306 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3307 new barrier pattern name.
3309 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3311 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3312 (speculation_barrier): New insn.
3314 2018-08-01 Richard Biener <rguenther@suse.de>
3317 * graphite.h: Include isl/id.h and isl/space.h to allow build
3320 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3323 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3324 mode for COFF targets.
3325 * defaults.h (TARGET_COFF): Define.
3326 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3327 TARGET_COFF): Define.
3328 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3329 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3330 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3332 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3334 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3335 * gimple-streamer-out.c (output_bb): Save it.
3336 * lto-streamer-in.c (input_struct_function_base): Restore
3337 instance discriminator if available. Create map on demand.
3338 * lto-streamer-out.c (output_struct_function_base): Save it if
3340 * final.c (decl_to_instance_map): Document LTO strategy.
3342 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3343 Olivier Hainque <hainque@adacore.com>
3345 * debug.h (decl_to_instance_map_t): New type.
3346 (decl_to_instance_map): Declare.
3347 (maybe_create_decl_to_instance_map): New inline function.
3348 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3349 to track basic block discriminators.
3350 (final_start_function_1): Initialize them.
3351 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3353 (decl_to_instance_map): New variable.
3354 (map_decl_to_instance, maybe_set_discriminator): New functions.
3355 (notice_source_line): Set discriminator.
3357 2018-07-31 Ian Lance Taylor <iant@golang.org>
3359 * targhooks.c (default_have_speculation_safe_value): Add
3362 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3364 * dump-context.h: Include "pretty-print.h".
3365 (dump_context::refresh_dumps_are_enabled): New decl.
3366 (dump_context::emit_item): New decl.
3367 (class dump_context): Add fields "m_test_pp" and
3369 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3370 (temp_dump_context::get_dumped_text): New decl.
3371 (class temp_dump_context): Add field "m_pp".
3372 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3373 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3375 (set_dump_file): Update for above change.
3376 (set_alt_dump_file): Likewise.
3377 (dump_loc): New overload, taking a pretty_printer *.
3378 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3379 to any test pretty-printer.
3380 (make_item_for_dump_gimple_stmt): New function, adapted from
3381 optinfo::add_gimple_stmt.
3382 (dump_context::dump_gimple_stmt): Call it, and use the result,
3383 eliminating the direct usage of dump_file and alt_dump_file in
3384 favor of indirectly using them via emit_item.
3385 (make_item_for_dump_gimple_expr): New function, adapted from
3386 optinfo::add_gimple_expr.
3387 (dump_context::dump_gimple_expr): Call it, and use the result,
3388 eliminating the direct usage of dump_file and alt_dump_file in
3389 favor of indirectly using them via emit_item.
3390 (make_item_for_dump_generic_expr): New function, adapted from
3392 (dump_context::dump_generic_expr): Call it, and use the result,
3393 eliminating the direct usage of dump_file and alt_dump_file in
3394 favor of indirectly using them via emit_item.
3395 (make_item_for_dump_printf_va): New function, adapted from
3396 optinfo::add_printf_va.
3397 (make_item_for_dump_printf): New function.
3398 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3399 and use the result, eliminating the direct usage of dump_file and
3400 alt_dump_file in favor of indirectly using them via emit_item.
3401 (make_item_for_dump_dec): New function.
3402 (dump_context::dump_dec): Call it, and use the result,
3403 eliminating the direct usage of dump_file and alt_dump_file in
3404 favor of indirectly using them via emit_item.
3405 (make_item_for_dump_symtab_node): New function, adapted from
3406 optinfo::add_symtab_node.
3407 (dump_context::dump_symtab_node): Call it, and use the result,
3408 eliminating the direct usage of dump_file and alt_dump_file in
3409 favor of indirectly using them via emit_item.
3410 (dump_context::begin_scope): Reimplement, avoiding direct usage
3411 of dump_file and alt_dump_file in favor of indirectly using them
3413 (dump_context::emit_item): New member function.
3414 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3415 Set up test pretty-printer on the underlying context. Call
3416 refresh_dumps_are_enabled.
3417 (temp_dump_context::~temp_dump_context): Call
3418 refresh_dumps_are_enabled.
3419 (temp_dump_context::get_dumped_text): New member function.
3420 (selftest::verify_dumped_text): New function.
3421 (ASSERT_DUMPED_TEXT_EQ): New macro.
3422 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3423 and then without optinfo enabled. Add uses of
3424 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3425 * dumpfile.h: Update comment for the dump_* API.
3426 * optinfo-emit-json.cc
3427 (selftest::test_building_json_from_dump_calls): Update for new
3428 param for temp_dump_context ctor.
3429 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3430 and "m_owned" field.
3431 (optinfo_item::~optinfo_item): Likewise.
3432 (optinfo::add_item): New member function.
3433 (optinfo::emit): Update comment.
3434 (optinfo::add_string): Delete.
3435 (optinfo::add_printf): Delete.
3436 (optinfo::add_printf_va): Delete.
3437 (optinfo::add_gimple_stmt): Delete.
3438 (optinfo::add_gimple_expr): Delete.
3439 (optinfo::add_tree): Delete.
3440 (optinfo::add_symtab_node): Delete.
3441 (optinfo::add_dec): Delete.
3442 * optinfo.h (class dump_context): New forward decl.
3443 (optinfo::add_item): New decl.
3444 (optinfo::add_string): Delete.
3445 (optinfo::add_printf): Delete.
3446 (optinfo::add_printf_va): Delete.
3447 (optinfo::add_gimple_stmt): Delete.
3448 (optinfo::add_gimple_expr): Delete.
3449 (optinfo::add_tree): Delete.
3450 (optinfo::add_symtab_node): Delete.
3451 (optinfo::add_dec): Delete.
3452 (optinfo::add_poly_int): Delete.
3453 (optinfo_item::optinfo_item): Remove "owned" param.
3454 (class optinfo_item): Remove field "m_owned".
3456 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3459 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3460 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3461 requested variable alignment.
3462 (expand_one_ssa_partition): Likewise.
3463 (expand_one_var): Likewise.
3465 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3467 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3468 to speculation_safe_value_not_needed.
3470 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3472 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3473 * targhooks.c (speculation_safe_value_not_needed): New function.
3474 * target.def (have_speculation_safe_value): Update documentation.
3475 * doc/tm.texi: Regenerated.
3477 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3479 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3480 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3482 (despeculate_copy<ALLI:mode>_insn): New insn.
3483 (despeculate_copyti_insn): New insn.
3484 (despeculate_simple<ALLI:mode>): New insn
3485 (despeculate_simpleti): New insn.
3486 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3488 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3489 aarch64_speculation_safe_value.
3490 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3492 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3494 * config/aarch64/aarch64-speculation.cc: New file.
3495 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3496 before pass_reorder_blocks.
3497 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3499 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3500 X14 and X15 when tracking speculation.
3501 * config/aarch64/aarch64.md (register name constants): Add
3502 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3503 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3504 (speculation_barrier): New insn attribute.
3505 (cmp<mode>): Allow SP in comparisons.
3506 (speculation_tracker): New insn.
3507 (speculation_barrier): Add speculation_barrier attribute.
3508 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3509 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3510 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3512 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3514 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3515 aarch64_track_speculation is true.
3516 (tb<optab><mode>1): Likewise.
3517 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3518 generate CB[N]Z when tracking speculation.
3519 (aarch64_split_compare_and_swap): Likewise.
3520 (aarch64_split_atomic_op): Likewise.
3522 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3524 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3526 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3528 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3529 (speculation_barrier): New insn.
3531 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3533 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3534 * config/arm/arm.md (speculation_barrier): New expand.
3535 (speculation_barrier_insn): New pattern.
3537 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3539 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3540 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3541 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3542 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3544 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3545 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3546 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3547 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3548 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3549 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3550 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3551 * builtins.c (expand_speculation_safe_value): New function.
3552 (expand_builtin): Call it.
3553 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3554 * doc/extend.texi: Document __builtin_speculation_safe_value.
3555 * doc/md.texi: Document "speculation_barrier" pattern.
3556 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3557 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3558 * doc/tm.texi: Regenerated.
3559 * target.def (have_speculation_safe_value, speculation_safe_value): New
3561 * targhooks.c (default_have_speculation_safe_value): New function.
3562 (default_speculation_safe_value): New function.
3563 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3564 (default_speculation_safe_value): Add prototype.
3566 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3568 * dump-context.h (dump_context::dump_loc): New decl.
3569 * dumpfile.c (dump_context::dump_loc): New member function.
3570 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3571 and dump_gimple_stmt.
3572 (dump_context::dump_gimple_expr_loc): Likewise, using
3574 (dump_context::dump_generic_expr_loc): Likewise, using
3576 (dump_context::dump_printf_loc_va): Likewise, using
3578 (dump_context::begin_scope): Explicitly using the global function
3579 "dump_loc", rather than the member function.
3581 2018-07-31 Martin Sebor <msebor@redhat.com>
3583 PR tree-optimization/86741
3584 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3586 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3588 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3589 depend on whether prefetch instructions will be emitted or not.
3590 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3591 will be emitted or not.
3592 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3593 (TARGET_SETMEM_PFD): New macros.
3595 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3597 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3598 (NULL_STMT_VEC_INFO): Delete.
3599 (stmt_vec_info::operator*): Likewise.
3600 (stmt_vec_info::operator gimple *): Likewise.
3601 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3602 of NULL_STMT_VEC_INFO.
3603 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3604 (vect_reassociating_reduction_p): Likewise.
3605 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3606 (vectorizable_store): Likewise.
3607 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3608 (vec_info::free_stmt_vec_infos): Likewise.
3610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3612 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3613 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3615 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3617 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3618 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3619 (vec_info::free_stmt_vec_info): New private member functions.
3620 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3621 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3622 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3623 set_stmt_vec_info_vec and free_stmt_vec_infos.
3624 * tree-vect-loop.c (_loop_vec_info): Remove call to
3625 set_stmt_vec_info_vec.
3626 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3627 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3628 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3629 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3630 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3631 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3632 with the clearing in the xcalloc.
3633 (stmt_vec_info_vec): Delete.
3634 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3635 (vectorize_loops): Likewise.
3636 (vec_info::~vec_info): Remove argument from call to
3637 free_stmt_vec_infos.
3638 (vec_info::add_stmt): Remove vinfo argument from call to
3641 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3643 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3644 rather than a gimple stmt.
3645 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3646 information for pattern statements when passed the original
3647 statement; instead wait to be passed the pattern statement itself.
3648 Don't call set_vinfo_for_stmt here.
3649 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3650 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3651 stmt_vec_infos here.
3652 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3653 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3654 stmt_vec_infos entry.
3656 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3658 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3659 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3660 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3661 * tree-vect-stmts.c (vectorizable_call): Likewise.
3662 (vectorizable_simd_clone_call): Likewise.
3664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3666 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3667 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3668 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3669 * tree-vect-loop.c (vect_transform_loop): Likewise.
3670 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3671 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3673 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3675 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3676 (vect_dr_stmt): Delete.
3677 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3678 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3680 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3681 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3682 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3683 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3684 (vect_analyze_data_refs): Likewise.
3685 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3687 (vect_find_same_alignment_drs): Likewise.
3688 (vect_slp_analyze_node_dependences): Update calls accordingly.
3689 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3690 instead of DR_VECT_AUX.
3691 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3692 of a vector data references. Use vec_info::lookup_dr instead of
3694 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3695 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3696 instead of DR_VECT_AUX.
3698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3700 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3702 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3704 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3705 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3706 (vect_gen_prolog_loop_niters): Likewise.
3708 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3710 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3711 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3712 (vect_known_alignment_in_bytes, vect_dr_behavior)
3713 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3714 instead of data_references. Update calls to other routines for
3715 which the same change has been made.
3716 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3717 dr_vec_infos instead of stmt_vec_infos.
3718 (vect_analyze_data_ref_dependence): Update call accordingly.
3719 (vect_slp_analyze_data_ref_dependence)
3720 (vect_record_base_alignments): Use DR_VECT_AUX.
3721 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3722 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3723 (vector_alignment_reachable_p, vect_get_data_access_cost)
3724 (vect_peeling_supportable, vect_analyze_group_access_1)
3725 (vect_analyze_group_access, vect_analyze_data_ref_access)
3726 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3727 (vect_compile_time_alias, vect_small_gap_p)
3728 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3729 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3730 instead of data_references. Update calls to other routines for
3731 which the same change has been made.
3732 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3733 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3734 (vect_slp_analyze_and_verify_node_alignment)
3735 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3736 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3737 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3739 (_vect_peel_info::dr): Replace with...
3740 (_vect_peel_info::dr_info): ...this new field.
3741 (vect_peeling_hash_get_most_frequent)
3742 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3743 (vect_peeling_hash_get_lowest_cost):
3744 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3745 routines for which the same change has been made.
3746 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3748 * tree-vect-loop-manip.c (get_misalign_in_elems)
3749 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3751 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3752 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3753 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3754 (get_group_load_store_type, get_negative_load_store_type)
3755 (vect_get_data_ptr_increment, vectorizable_store)
3756 (vectorizable_load): Likewise.
3757 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3758 Update calls to other routines for which the same change has been made.
3760 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3762 * tree-vectorizer.h (vec_info::move_dr): New member function.
3763 (dataref_aux): Rename to...
3764 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3765 (_stmt_vec_info::dr_aux): Update accordingly.
3766 (_stmt_vec_info::data_ref_info): Delete.
3767 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3768 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3769 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3770 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3772 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3773 (STMT_VINFO_DR_INFO): New macro.
3774 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3775 (set_dr_misalignment): Update after rename of dataref_aux.
3776 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3777 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3778 initialization of STMT_VINFO_DATA_REF.
3779 * tree-vectorizer.c (vec_info::move_dr): New function.
3780 * tree-vect-patterns.c (vect_recog_bool_pattern)
3781 (vect_recog_mask_conversion_pattern)
3782 (vect_recog_gather_scatter_pattern): Use it.
3783 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3784 the "dr" and "stmt" fields of dr_vec_info instead of
3785 STMT_VINFO_DATA_REF.
3787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3789 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3790 (is_pattern_stmt_p): Use it.
3791 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3792 on pattern statements.
3794 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3796 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3797 original stmt as a stmt_vec_info rather than a gimple stmt.
3798 (vect_pattern_recog_1): Take the statement directly as a
3799 stmt_vec_info, rather than via a gimple_stmt_iterator.
3800 Update call to vect_mark_pattern_stmts.
3801 (vect_pattern_recog): Update calls accordingly.
3803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3805 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3806 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3807 a vect_def_type for the first argument.
3808 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3809 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3810 operand if it isn't defined by a vectorized statement.
3811 (vect_build_gather_load_calls): Remove the mask_dt argument and
3812 update calls to vect_get_vec_def_for_stmt_copy.
3813 (vectorizable_bswap): Likewise the dt argument.
3814 (vectorizable_call): Update calls to vectorizable_bswap and
3815 vect_get_vec_def_for_stmt_copy.
3816 (vectorizable_simd_clone_call, vectorizable_assignment)
3817 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3818 (vectorizable_comparison): Update calls to
3819 vect_get_vec_def_for_stmt_copy.
3820 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3822 (vect_get_loop_based_defs): Remove dt argument and update call
3823 to vect_get_vec_def_for_stmt_copy.
3824 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3825 and vect_get_vec_def_for_stmt_copy.
3826 (vectorizable_load): Update calls to vect_build_gather_load_calls
3827 and vect_get_vec_def_for_stmt_copy.
3828 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3829 (vectorizable_reduction, vectorizable_live_operation): Update calls
3830 to vect_get_vec_def_for_stmt_copy.
3832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3834 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3835 and gimple stmt arguments with a stmt_vec_info.
3836 (vect_record_base_alignments): Update calls accordingly.
3837 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3838 and gimple stmt arguments with a stmt_vec_info.
3839 (vect_build_slp_tree_1): Remove vinfo argument and update call
3840 to vect_record_max_nunits.
3841 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3842 and vect_record_max_nunits.
3844 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3846 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3847 file and take a stmt_vec_info instead of a gimple stmt.
3848 (supportable_widening_operation, vect_finish_replace_stmt)
3849 (vect_finish_stmt_generation, vect_get_store_rhs)
3850 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3851 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3852 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3853 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3854 (vect_create_data_ref_ptr, bump_vector_ptr)
3855 (vect_permute_store_chain, vect_setup_realignment)
3856 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3857 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3858 (vectorizable_reduction, vectorizable_induction)
3859 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3860 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3861 than gimple stmts as arguments.
3862 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3863 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3864 (can_group_stmts_p, vect_check_gather_scatter)
3865 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3866 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3867 (vect_permute_load_chain, vect_shift_permute_load_chain)
3868 (vect_transform_grouped_load)
3869 (vect_record_grouped_load_vectors): Likewise.
3870 * tree-vect-loop.c (vect_fixup_reduc_chain)
3871 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3872 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3873 (vectorizable_reduction, vectorizable_induction)
3874 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3875 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3876 (vect_get_load_store_mask): Likewise.
3877 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3878 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3879 * tree-vect-stmts.c (vect_mark_relevant)
3880 (is_simple_and_all_uses_invariant)
3881 (exist_non_indexing_operands_for_use_p, process_use)
3882 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3883 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3884 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3885 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3886 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3887 (get_negative_load_store_type, get_load_store_type)
3888 (vect_check_load_store_mask, vect_check_store_rhs)
3889 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3890 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3891 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3892 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3893 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3894 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3895 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3896 (supportable_widening_operation): Likewise.
3898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3900 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3901 a stmt_vec_info instead of a gcall.
3902 (vect_check_gather_scatter): Update call accordingly.
3903 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3905 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3906 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3907 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3908 instead of a gimple stmt.
3909 (vect_transform_loop): Update calls accordingly.
3910 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3911 stmt_vec_infos instead of gimple stmts.
3912 (vect_analyze_slp_instance): Update use accordingly.
3913 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3914 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3915 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3916 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3917 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3918 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3919 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3920 down to subroutines.
3922 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3924 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3925 of the worklist from a vector of gimple stmts to a vector of
3927 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3928 (vect_mark_stmts_to_be_vectorized): Likewise
3930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3932 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3933 statement before passing it to vect_analyze_stmt.
3934 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3935 the chain of phi vector definitions. Track the exit phi via its
3937 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3938 STMT_VINFO_REDUC_DEF.
3939 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3940 stmt_vec_infos to handle the statement chains.
3941 (vect_get_slp_defs): Record the first statement in the node
3942 using a stmt_vec_info.
3943 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3944 statements here and pass their stmt_vec_info down to subroutines.
3945 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3946 down to vect_finish_stmt_generation.
3947 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3948 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3949 stmt_vec_infos to subroutines.
3950 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3955 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3956 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3957 (vect_permute_store_chain, vect_setup_realignment)
3958 (vect_permute_load_chain, vect_shift_permute_load_chain)
3959 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3960 stmts internally, and when passing values to other vectorizer routines.
3961 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3962 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3963 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3964 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3965 (vectorizable_reduction, vectorizable_induction)
3966 (vectorizable_live_operation, vect_transform_loop_stmt)
3967 (vect_transform_loop): Likewise.
3968 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3969 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3970 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3971 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3972 (vect_slp_analyze_node_operations_1): Likewise.
3973 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3974 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3975 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3976 (vect_finish_stmt_generation_1, get_group_load_store_type)
3977 (get_load_store_type, vect_build_gather_load_calls)
3978 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3979 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3980 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3981 (vectorizable_store, vectorizable_load, vectorizable_condition)
3982 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3983 (supportable_widening_operation): Likewise.
3984 (vect_get_vector_types_for_stmt): Likewise.
3985 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3987 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3989 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3990 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3991 (vect_permute_store_chain, vect_permute_load_chain)
3992 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3993 repeated stmt_vec_info lookups.
3994 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3995 (vect_update_ivs_after_vectorizer): Likewise.
3996 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3997 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3998 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3999 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4000 (vect_bb_slp_scalar_cost): Likewise.
4001 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4003 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4005 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4006 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4007 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4008 to get gassigns and gcalls, rather than operating on generc gimple
4010 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4011 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4012 (vectorizable_load, vect_analyze_stmt): Likewise.
4013 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4017 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4018 return stmt_vec_infos rather than gimple stmts. Do not accept
4020 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4022 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4023 Update use of get_later_stmt.
4024 (vect_get_constant_vectors): Update call accordingly.
4025 (vect_schedule_slp_instance): Likewise
4026 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4027 (vect_slp_analyze_instance_dependence): Likewise.
4028 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4030 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4032 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4033 (stmt_info_for_cost::stmt_info): ...this new field.
4034 (add_stmt_costs): Update accordingly.
4035 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4036 (vect_get_known_peeling_cost): Likewise.
4037 (vect_estimate_min_profitable_iters): Likewise.
4038 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4042 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4043 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4044 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4046 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4050 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4051 a gimple stmt to a stmt_vec_info.
4052 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4056 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4057 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4058 (_loop_vec_info::reduction_chains): Likewise.
4059 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4061 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4063 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4065 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4066 a gimple stmt to a stmt_vec_info.
4067 (_stmt_vec_info::next_element): Likewise.
4068 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4069 (vect_slp_analyze_and_verify_node_alignment)
4070 (vect_analyze_group_access_1, vect_analyze_group_access)
4071 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4072 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4073 (vect_supportable_dr_alignment): Update accordingly.
4074 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4075 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4076 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4077 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4078 * tree-vect-slp.c (vect_build_slp_tree_1)
4079 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4080 (vect_split_slp_store_group, vect_analyze_slp_instance)
4081 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4082 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4083 (get_group_load_store_type, get_load_store_type)
4084 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4085 (vect_transform_stmt, vect_remove_stores): Likewise.
4087 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4089 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4091 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4092 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4093 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4094 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4095 (vector_alignment_reachable_p, vect_get_data_access_cost)
4096 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4097 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4098 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4099 (vect_analyze_group_access_1, vect_analyze_group_access)
4100 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4101 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4102 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4103 result of vect_dr_stmt and use the stmt_vec_info instead of
4104 the associated gimple stmt.
4105 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4106 (vect_gen_prolog_loop_niters): Likewise.
4107 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4111 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4112 to a vec<stmt_vec_info>.
4113 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4114 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4116 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4117 to a vec<stmt_vec_info>.
4118 (bst_traits::value_type, bst_traits::value_type): Likewise.
4119 (bst_traits::hash): Update accordingly.
4120 (vect_get_and_check_slp_defs): Change the stmts parameter from
4121 a vec<gimple *> to a vec<stmt_vec_info>.
4122 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4123 (vect_build_slp_tree): Likewise.
4124 (vect_build_slp_tree_2): Likewise. Update uses of
4125 SLP_TREE_SCALAR_STMTS.
4126 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4127 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4128 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4129 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4130 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4131 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4132 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4133 (vect_get_constant_vectors, vect_get_slp_defs)
4134 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4135 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4136 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4137 instead of gimple stmts.
4138 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4139 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4140 (vect_slp_analyze_instance_dependence): Update uses of
4141 SLP_TREE_SCALAR_STMTS.
4142 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4143 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4144 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4145 (get_initial_defs_for_reduction): Likewise.
4146 (vect_create_epilog_for_reduction): Likewise.
4147 (vectorize_fold_left_reduction): Likewise.
4148 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4149 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4150 (can_vectorize_live_stmts): Likewise.
4152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4154 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4155 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4156 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4158 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4160 (gather_scalar_reductions): Update after above interface changes.
4161 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4162 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4164 (vect_force_simple_reduction): Likewise.
4165 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4166 LOOP_VINFO_REDUCTIONS.
4167 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4169 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4171 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4172 a gimple stmt to a stmt_vec_info.
4173 * tree-vect-loop.c (vect_active_double_reduction_p)
4174 (vect_force_simple_reduction, vectorizable_reduction): Update
4177 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4179 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4180 vec<gimple *> to a vec<stmt_vec_info>.
4181 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4182 the reduction_phis argument from a vec<gimple *> to a
4184 (vectorizable_reduction): Likewise the phis local variable that
4185 is passed to vect_create_epilog_for_reduction. Update for new type
4186 of SLP_TREE_VEC_STMTS.
4187 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4188 (vectorizable_live_operation): Likewise.
4189 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4190 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4194 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4195 a gimple stmt to a stmt_vec_info.
4196 (vectorizable_condition, vectorizable_live_operation)
4197 (vectorizable_reduction, vectorizable_induction): Pass back the
4198 vectorized statement as a stmt_vec_info.
4199 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4200 use of STMT_VINFO_VEC_STMT.
4201 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4202 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4203 as stmt_vec_infos rather than gimple stmts.
4204 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4206 (vectorizable_live_operation): Likewise.
4207 (vectorizable_reduction, vectorizable_induction): Likewise,
4208 updating use of STMT_VINFO_VEC_STMT.
4209 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4210 of STMT_VINFO_VEC_STMT.
4211 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4212 (vectorizable_simd_clone_call, vectorizable_conversion)
4213 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4214 (vectorizable_store, vectorizable_load, vectorizable_condition)
4215 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4216 from a gimple stmt to a stmt_vec_info.
4217 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4218 pointer to a stmt_vec_info to the vectorizable_* routines.
4220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4222 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4223 a gimple stmt to a stmt_vec_info.
4224 (is_pattern_stmt_p): Update accordingly.
4225 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4226 (vect_record_grouped_load_vectors): Likewise.
4227 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4228 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4229 (vect_model_reduction_cost): Likewise.
4230 (vect_create_epilog_for_reduction): Likewise.
4231 (vectorizable_reduction, vectorizable_induction): Likewise.
4232 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4233 Return the stmt_vec_info for the pattern statement.
4234 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4235 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4236 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4237 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4238 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4239 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4240 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4241 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4245 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4246 (vect_finish_stmt_generation): Likewise.
4247 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4248 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4249 (vect_build_gather_load_calls): Use the return value of the above
4250 functions instead of a separate call to vinfo_for_stmt. Use narrow
4251 scopes for the input gimple stmt and wider scopes for the associated
4252 stmt_vec_info. Use vec_info::lookup_def when setting these
4253 stmt_vec_infos from an SSA_NAME definition.
4254 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4255 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4256 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4257 (vectorizable_store, vectorizable_load, vectorizable_condition)
4258 (vectorizable_comparison): Likewise.
4259 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4260 (vectorizable_reduction): Likewise.
4262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4264 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4265 stmt_vec_info * parameter before the optional gimple **.
4266 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4267 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4268 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4269 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4270 (vectorizable_live_operation): Likewise.
4271 * tree-vect-patterns.c (type_conversion_p): Likewise.
4272 (vect_look_through_possible_promotion): Likewise.
4273 (vect_recog_rotate_pattern): Likewise.
4274 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4276 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4278 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4279 a typedef to a wrapper class.
4280 (NULL_STMT_VEC_INFO): New macro.
4281 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4282 (stmt_vec_info::operator*): New function.
4283 (stmt_vec_info::operator gimple *): Likewise.
4284 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4285 (add_stmt_costs): Likewise.
4286 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4287 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4288 (vect_get_known_peeling_cost): Likewise.
4289 (vect_estimate_min_profitable_iters): Likewise.
4290 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4291 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4292 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4293 (vectorizable_store, free_stmt_vec_infos): Likewise.
4294 (new_stmt_vec_info): Change return type of xcalloc to
4297 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4299 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4300 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4301 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4302 a single_imm_use-based sequence.
4303 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4307 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4308 * tree-vectorizer.c (vec_info::lookup_def): New function.
4309 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4310 (vect_widened_op_tree): Likewise.
4311 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4312 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4313 (vectorizable_reduction): Likewise.
4314 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4316 (vect_is_slp_reduction): Update calls accordingly. Use
4317 vec_info::lookup_def.
4318 (vect_is_simple_reduction): Likewise
4319 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4321 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4323 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4324 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4325 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4327 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4328 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4329 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4330 (vect_is_slp_reduction, vectorizable_induction)
4331 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4332 * tree-vect-patterns.c (vect_init_pattern_stmt):
4333 (vect_determine_min_output_precision_1, vect_determine_precisions)
4334 (vect_pattern_recog): Likewise.
4335 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4336 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4337 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4338 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4339 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4340 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4341 info field from a loop to a loop_vec_info.
4343 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4345 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4346 (vec_info::add_stmt): Declare.
4347 * tree-vectorizer.c (vec_info::add_stmt): New function.
4348 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4349 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4350 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4351 (vectorizable_induction): Likewise.
4352 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4353 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4354 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4355 (vectorizable_load): Likewise.
4356 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4357 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4358 (vect_recog_gather_scatter_pattern): Likewise.
4359 (append_pattern_def_seq): Likewise. Remove a check that is
4360 performed by add_stmt itself.
4362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4364 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4365 which make_ssa_name was called with new_stmt before new_stmt
4368 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4370 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4372 (vect_is_slp_reduction): ...here...
4373 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4374 that are already known to be false.
4376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4378 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4379 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4380 STMT_VINFO_NUM_SLP_USES when it's true.
4381 (vect_free_slp_instance): Add a final_p parameter and pass it to
4383 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4384 (vect_analyze_slp_instance): Likewise.
4385 (vect_slp_analyze_operations): Likewise.
4386 (vect_slp_analyze_bb_1): Likewise.
4387 * tree-vectorizer.c (vec_info): Likewise.
4388 * tree-vect-loop.c (vect_transform_loop): Likewise.
4390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4392 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4393 function is not called for second and subsequent members of
4396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4398 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4399 cases for nested loops from here to ...
4400 (vect_create_epilog_for_reduction): ...here. Only call
4401 vect_is_simple_use for inner-loop reductions.
4403 2018-07-31 Martin Liska <mliska@suse.cz>
4405 PR gcov-profile/85338
4406 PR gcov-profile/85350
4407 PR gcov-profile/85372
4408 * profile.c (struct location_triplet): New.
4409 (struct location_triplet_hash): Likewise.
4410 (output_location): Do not output a BB that
4411 is already recorded for a line.
4412 (branch_prob): Use streamed_locations.
4414 2018-07-31 Martin Liska <mliska@suse.cz>
4416 PR gcov-profile/85370
4417 * coverage.c (coverage_begin_function): Do not mark target
4418 clones as artificial functions.
4420 2018-07-31 Martin Liska <mliska@suse.cz>
4422 PR gcov-profile/83813
4423 PR gcov-profile/84758
4424 PR gcov-profile/85217
4425 PR gcov-profile/85332
4426 * profile.c (branch_prob): Do not record GOTO expressions
4427 for GIMPLE statements which locations are already streamed.
4429 2018-07-31 Olivier Hainque <hainque@adacore.com>
4431 * gcc.c (handle_spec_function): Accept a soft_matched_part
4432 argument, as do_spec_1. Pass it down to ...
4433 (eval_spec_function): Accept a soft_matched_part argument,
4434 and pass it down to ...
4435 (do_spec_2): Accept a soft_matched_part argument, and pass
4436 it down to do_spec_1.
4437 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4438 (handle_braces): Update call to handle_spec_function.
4439 (driver::set_up_specs): Update calls to do_spec_2.
4440 (compare_debug_dump_opt_spec_function): Likewise.
4441 (compare_debug_self_opt_spec_function): Likewise.
4443 2018-07-31 Olivier Hainque <hainque@adacore.com>
4445 * common.opt (nolibc): New option.
4446 * doc/invoke.texi (Link Options): Document it.
4447 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4448 * config/alpha/linux.h: Likewise.
4449 * config/arc/elf.h: Likewise.
4450 * config/arm/uclinux-elf.h: Likewise.
4451 * config/arm/unknown-elf.h: Likewise.
4452 * config/avr/avrlibc.h: Likewise.
4453 * config/bfin/bfin.h: Likewise.
4454 * config/bfin/linux.h: Likewise.
4455 * config/bfin/uclinux.h: Likewise.
4456 * config/darwin.h: Likewise.
4457 * config/darwin10.h: Likewise.
4458 * config/darwin12.h: Likewise.
4459 * config/gnu-user.h: Likewise.
4460 * config/lm32/uclinux-elf.h: Likewise.
4461 * config/pa/pa-hpux11.h: Likewise.
4462 * config/pa/pa64-hpux.h: Likewise.
4463 * config/sparc/sparc.h: Likewise.
4465 2018-07-31 Olivier Hainque <hainque@adacore.com>
4467 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4468 undefined variables.
4470 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4473 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4476 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4478 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4479 terminated string literal.
4481 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4483 PR rtl-optimization/85160
4484 * combine.c (is_just_move): New function.
4485 (try_combine): Allow combining two instructions into two if neither of
4486 the original instructions was a move.
4488 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4491 * doc/extend.texi (Global Register Variables): Discourage use of type
4493 (Local Register Variables): Likewise.
4495 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4497 PR tree-optimization/86506
4498 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4500 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4503 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4504 hard_regno, make sure no insn between `from` and `to` clobbers it.
4506 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4507 Tom de Vries <tdevries@suse.de>
4509 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4510 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4511 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4512 PTX_DEFAULT_RUNTIME_DIM.
4513 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4515 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4517 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4518 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4519 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4521 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4523 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4525 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4526 predicate to reflect toc fusion has been deleted.
4527 (toc_fusion_mem_raw): Delete, no longer used.
4528 (toc_fusion_mem_wrapped): Likewise.
4529 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4531 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4532 Delete, no longer used.
4533 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4534 meant to be used for toc fusion.
4535 (rs6000_debug_print_mode): Delete toc fusion debugging.
4536 (rs6000_debug_reg_global): Likewise.
4537 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4538 fusion and secondary reload support that were never used.
4539 (rs6000_option_override_internal): Delete TOC fusion, that was only
4540 partially defined, and it did not work unless you also used the
4542 (rs6000_legitimate_address_p): Delete TOC fusion support.
4543 (rs6000_opt_masks): Likewise.
4544 (fusion_wrap_memory_address): Delete function, no longer used.
4545 (fusion_split_address); Delete TOC fusion support.
4546 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4547 longer used with toc fusion being deleted.
4548 (TARGET_TOC_FUSION_FP): Likewise.
4549 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4551 (toc fusion spliter): Delete TOC fusion support.
4552 (toc_fusionload_<mode>): Likewise.
4553 (toc_fusionload_di): Likewise.
4554 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4555 longer needs to be named. Rename predicate to delete TOC fusion.
4556 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4557 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4558 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4559 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4560 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4562 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4564 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4565 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4566 __int128 in built-in function prototypes.
4567 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4568 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4570 2018-07-27 Martin Sebor <msebor@redhat.com>
4572 PR tree-optimization/86696
4573 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4574 types, including enums.
4575 (handle_char_store): Be prepared for the above function to fail.
4577 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4579 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4580 when optimization level is lower than 2 or optimize for size.
4582 2018-07-26 Martin Sebor <msebor@redhat.com>
4584 PR tree-optimization/86043
4585 PR tree-optimization/86042
4586 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4587 (get_string_cst_length): Rename...
4588 (get_min_string_length): ...to this. Add argument.
4589 (handle_char_store): Extend to handle multi-character stores by
4591 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4592 * tree.h (initializer_zerop): Add argument.
4594 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4597 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4598 declare target to variables if they have always,{to,from,tofrom} map
4601 2018-07-26 Martin Liska <mliska@suse.cz>
4604 * lto-wrapper.c: Add linker_output as prefix
4605 for ltrans_output_file.
4607 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4609 PR rtl-optimization/85805
4610 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4611 value for hard registers if that was written in the same mode.
4613 2018-07-26 Martin Liska <mliska@suse.cz>
4615 PR gcov-profile/86536
4616 * gcov.c (format_gcov): Use printf format %.*f directly
4617 and do not handle special values.
4619 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4621 * common/config/arc/arc-common.c (arc_option_optimization_table):
4622 Update default optimizations for size.
4624 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4626 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4627 * config/arc/constraints.md (CfZ): New constraint.
4628 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4629 (subsf3_fpu): Likewise.
4630 (cmpsf_fpu): Likewise.
4631 (cmpsf_fpu_uneq): Likewise.
4633 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4635 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4637 (arc_is_uncached_mem_p): uncached applies to both the variable and
4640 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4642 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4645 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4647 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4648 field "m_scopes" from vec to auto_vec.
4650 2018-07-25 Martin Liska <mliska@suse.cz>
4652 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4655 2018-07-25 Richard Biener <rguenther@suse.de>
4658 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4659 special wrt context_die late.
4660 (gen_subprogram_die): Re-use DIEs in local scope.
4662 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4664 PR tree-optimization/86644
4665 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4667 2018-07-25 Martin Liska <mliska@suse.cz>
4670 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4671 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4673 2018-07-25 Martin Liska <mliska@suse.cz>
4676 * params.def: Explain ASan abbreviation and provide
4677 a documentation link.
4679 2018-07-24 Martin Sebor <msebor@redhat.com>
4681 PR tree-optimization/86622
4682 PR tree-optimization/86532
4683 * builtins.h (string_length): Declare.
4684 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4685 (check_access): Be prepared for non-constant length ranges.
4686 (string_length): Make extern.
4687 * expr.c (string_constant): Only handle the minor non-constant
4688 array index. Use string_constant to compute the length of
4689 a generic string constant.
4691 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4693 PR tree-optimization/86618
4694 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4695 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4697 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4699 PR tree-optimization/86636
4700 * json.cc (json::object::set): Fix comment. Add assertions.
4701 (json::array::append): Move here from json.h. Add comment and an
4703 (json::string::string): Likewise.
4704 * json.h (json::array::append): Move to json.cc.
4705 (json::string::string): Likewise.
4706 * optinfo-emit-json.cc
4707 (optrecord_json_writer::impl_location_to_json): Assert that we
4708 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4709 wrapper around it. Expand the location once, rather than three
4711 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4712 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4714 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4715 places. Fix some overlong lines.
4717 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4719 * config/aarch64/aarch64-simd.md
4720 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4721 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4722 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4723 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4724 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4725 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4726 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4727 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4728 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4730 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4733 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4734 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4735 and abs_d == d, do the power of two handling if profitable.
4737 2018-07-24 Richard Biener <rguenther@suse.de>
4739 * match.pd: Add BIT_FIELD_REF canonicalizations.
4741 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4744 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4746 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4748 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4749 terminated STRING_CST object.
4751 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4753 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4755 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4757 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4758 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4759 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4760 the elements into a register.
4761 (rs6000_split_v4si_init_di_reg): Delete.
4762 (rs6000_split_v4si_init): Delete.
4763 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4764 (vsx_init_v4si): Rewrite as a define_expand.
4766 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4768 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4769 zero_extend argument from memory): New.
4771 2018-07-22 Martin Sebor <msebor@redhat.com>
4774 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4775 diagnosing calls with unknown arguments unless -Walloca-larger-than
4776 is restricted to less than PTRDIFF_MAX bytes.
4778 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4780 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4782 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4784 * pretty-print.c (text_info::set_location): Remove redundant
4785 "line_table" parameter from call to rich_location::set_range.
4787 2018-07-20 Martin Sebor <msebor@redhat.com>
4790 * builtins.c (expand_builtin_alloca): Adjust.
4791 * calls.c (alloc_max_size): Simplify.
4792 * cgraphunit.c (cgraph_node::expand): Adjust.
4793 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4795 (frame_larger_than_size): Same.
4796 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4797 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4799 * doc/invoke.texi (GCC Command Options): Document option arguments.
4800 Explain byte-size arguments and suffixes.
4801 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4802 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4803 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4804 * doc/options.texi (UInteger): Expand.
4805 (Host_Wide_Int, ByteSize): Document new properties.
4806 * final.c (final_start_function_1): Include sizes in an error message.
4807 * function.c (frame_offset_overflow): Same.
4808 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4809 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4810 Diagnose unbounded alloca calls only for limits of less than
4812 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4813 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4815 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4816 only for limits of less than PTRDIFF_MAX.
4817 * langhooks-def.h (lhd_handle_option): Change function argument
4819 * langhooks.c (lhd_handle_option): Same.
4820 * langhooks.h (handle_option): Same.
4821 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4823 (var_type, var_type_struct): Same.
4824 (var_set): Handle ByteSize flag.
4825 * optc-gen.awk: Add comments to output to ease debugging. Make
4826 use of HOST_WIDE_INT where appropriate.
4827 * opts-gen-save.awk: Use %lx to format unsigned long.
4828 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4829 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4830 arguments. Parse bytes-size suffixes.
4831 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4832 (enum_value_to_arg): Same.
4833 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4834 (handle_option): Adjust.
4835 (generate_option): Change function argument to HOST_WIDE_INT.
4836 (cmdline_handle_error): Adjust.
4837 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4838 (set_option): Change function argument to HOST_WIDE_INT.
4839 (option_enabled): Handle cl_host_wide_int.
4840 (get_option_state): Handle CLVC_SIZE.
4841 (control_warning_option): Same.
4842 * opts.c (common_handle_option): Change function argument to
4843 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4844 OPT_Wvla_larger_than_.
4845 * opts.h (enum cl_var_type): Add an enumerator.
4846 * stor-layout.c (layout_decl): Print a more meaningful warning.
4847 * toplev.c (output_stack_usage): Adjust.
4849 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4851 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4852 call to inline_expand_builtin_string_cmp.
4853 (expand_builtin_strcmp): Likewise.
4854 (expand_builtin_strncmp): Likewise.
4855 (inline_string_cmp): Delete the last parameter, change char_type_node
4856 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4858 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4859 the inlining expansion on target where the type of the call has same or
4860 narrower precision than unsigned char.
4862 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4864 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4865 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4866 * common.opt (fsave-optimization-record): New option.
4867 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4868 * doc/invoke.texi (-fsave-optimization-record): New option.
4869 * dumpfile.c: Include "optinfo-emit-json.h".
4870 (struct kv_pair): Move to coretypes.h.
4871 (optgroup_options): Make non-static.
4872 (dump_context::end_scope): Call
4873 optimization_records_maybe_pop_dump_scope.
4874 * dumpfile.h (optgroup_options): New decl.
4875 * json.cc: New file.
4877 * optinfo-emit-json.cc: New file.
4878 * optinfo-emit-json.h: New file.
4879 * optinfo.cc: Include "optinfo-emit-json.h".
4880 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4881 (optinfo_enabled_p): Check optimization_records_enabled_p.
4882 (optinfo_wants_inlining_info_p): Likewise.
4883 * optinfo.h: Update comment.
4884 * profile-count.c (profile_quality_as_string): New function.
4885 * profile-count.h (profile_quality_as_string): New decl.
4886 (profile_count::quality): New accessor.
4887 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4888 and optinfo_emit_json_cc_tests.
4889 * selftest.h (selftest::json_cc_tests): New decl.
4890 (selftest::optinfo_emit_json_cc_tests): New decl.
4891 * toplev.c: Include "optinfo-emit-json.h".
4892 (compile_file): Call optimization_records_finish.
4893 (do_compile): Call optimization_records_start.
4894 * tree-ssa-live.c: Include optinfo.h.
4895 (remove_unused_scope_block_p): Retain inlining information if
4896 optinfo_wants_inlining_info_p returns true.
4898 2018-07-20 Richard Biener <rguenther@suse.de>
4901 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4902 to cover -flto-partition=none.
4904 2018-07-20 Martin Liska <mliska@suse.cz>
4906 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4907 (get_decl_source_range): Remove unused function.
4909 2018-07-20 Richard Biener <rguenther@suse.de>
4911 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4912 (struct vn_phi_s): Likewise.
4913 (struct vn_reference_s): Likewise.
4914 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4915 for searching the slot of an entry known to be in the hash itself.
4916 (vn_phi_hasher::equal): Likewise.
4917 (vn_reference_hasher::equal): Likewise.
4918 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4920 (optimistic_info, current_info): Remove, keeping only valid_info.
4921 (vn_reference_lookup_1): Remove fallback lookup.
4922 (vn_reference_lookup_2): Likewise.
4923 (vn_nary_op_lookup_1): Likewise.
4924 (vn_phi_lookup): Likewise.
4925 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4927 (vn_reference_insert): Adjust, chain the inserted hash element
4928 at last_inserted_ref.
4929 (vn_reference_insert_pieces): Likewise.
4930 (visit_reference_op_call): Likewise.
4931 (vn_nary_op_insert_into): Chain the inserted hash element at
4933 (vn_nary_op_insert_pieces): Adjust.
4934 (vn_nary_op_insert): Likewise.
4935 (vn_nary_op_insert_stmt): Likewise.
4936 (vn_phi_insert): Adjust, chain the inserted hash element at
4938 (process_scc): Remove clearing and copying the optimistic
4939 table. Instead remove elements inserted during an optimistic
4940 iteration from the single table we maintain.
4941 (init_scc_vn): Adjust.
4942 (free_scc_vn): Likewise.
4943 (sccvn_dom_walker::record_cond): Likewise.
4944 (sccvn_dom_walker::after_dom_children): Likewise.
4946 2018-07-19 Martin Sebor <msebor@redhat.com>
4948 PR tree-optimization/84047
4949 PR tree-optimization/83776
4950 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4951 (check_array_bounds): Call it.
4953 2018-07-19 Martin Sebor <msebor@redhat.com>
4955 * align.h (align_flags): Use member initialization.
4957 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4959 * Makefile.in (OBJS): Add optinfo.o.
4960 * coretypes.h (class symtab_node): New forward decl.
4961 (struct cgraph_node): New forward decl.
4962 (class varpool_node): New forward decl.
4963 * dump-context.h: New file.
4964 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4966 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4967 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4968 (set_alt_dump_file): Likewise.
4969 (dump_context::~dump_context): New dtor.
4970 (dump_gimple_stmt): Move implementation to...
4971 (dump_context::dump_gimple_stmt): ...this new member function.
4972 Add the stmt to any pending optinfo, creating one if need be.
4973 (dump_gimple_stmt_loc): Move implementation to...
4974 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4975 Start a new optinfo and add the stmt to it.
4976 (dump_gimple_expr): Move implementation to...
4977 (dump_context::dump_gimple_expr): ...this new member function.
4978 Add the stmt to any pending optinfo, creating one if need be.
4979 (dump_gimple_expr_loc): Move implementation to...
4980 (dump_context::dump_gimple_expr_loc): ...this new member function.
4981 Start a new optinfo and add the stmt to it.
4982 (dump_generic_expr): Move implementation to...
4983 (dump_context::dump_generic_expr): ...this new member function.
4984 Add the tree to any pending optinfo, creating one if need be.
4985 (dump_generic_expr_loc): Move implementation to...
4986 (dump_context::dump_generic_expr_loc): ...this new member
4987 function. Add the tree to any pending optinfo, creating one if
4989 (dump_printf): Move implementation to...
4990 (dump_context::dump_printf_va): ...this new member function. Add
4991 the text to any pending optinfo, creating one if need be.
4992 (dump_printf_loc): Move implementation to...
4993 (dump_context::dump_printf_loc_va): ...this new member function.
4994 Start a new optinfo and add the stmt to it.
4995 (dump_dec): Move implementation to...
4996 (dump_context::dump_dec): ...this new member function. Add the
4997 value to any pending optinfo, creating one if need be.
4998 (dump_context::dump_symtab_node): New member function.
4999 (dump_context::get_scope_depth): New member function.
5000 (dump_context::begin_scope): New member function.
5001 (dump_context::end_scope): New member function.
5002 (dump_context::ensure_pending_optinfo): New member function.
5003 (dump_context::begin_next_optinfo): New member function.
5004 (dump_context::end_any_optinfo): New member function.
5005 (dump_context::s_current): New global.
5006 (dump_context::s_default): New global.
5007 (dump_scope_depth): Delete global.
5008 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5009 (dump_symtab_node): New function.
5010 (get_dump_scope_depth): Reimplement in terms of dump_context.
5011 (dump_begin_scope): Likewise.
5012 (dump_end_scope): Likewise.
5013 (selftest::temp_dump_context::temp_dump_context): New ctor.
5014 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5015 (selftest::verify_item): New function.
5016 (ASSERT_IS_TEXT): New macro.
5017 (ASSERT_IS_TREE): New macro.
5018 (ASSERT_IS_GIMPLE): New macro.
5019 (selftest::test_capture_of_dump_calls): New test.
5020 (selftest::dumpfile_c_tests): Call it.
5021 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5022 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5023 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5024 descriptive comment.
5025 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5026 (dump_node, dump_bb): Move these unrelated decls.
5027 (class dump_manager): Add leading comment.
5028 * optinfo.cc: New file.
5029 * optinfo.h: New file.
5031 2018-07-19 Michael Collison <michael.collison@arm.com>
5032 Richard Henderson <rth@redhat.com>
5034 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5035 (subti): Handle op1 zero.
5036 (subvti4, usub4ti4): New.
5037 (*sub<GPI>3_compare1_imm): New.
5038 (sub<GPI>3_carryinCV): New.
5039 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5040 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5042 2018-07-19 Michael Collison <michael.collison@arm.com>
5043 Richard Henderson <rth@redhat.com>
5045 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5046 (addti3): Create simpler code if low part is already known to be 0.
5047 (addvti4, uaddvti4): New.
5048 (*add<GPI>3_compareC_cconly_imm): New.
5049 (*add<GPI>3_compareC_cconly): New.
5050 (*add<GPI>3_compareC_imm): New.
5051 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5052 handle constants within this pattern..
5053 (*add<GPI>3_compareV_cconly_imm): New.
5054 (*add<GPI>3_compareV_cconly): New.
5055 (*add<GPI>3_compareV_imm): New.
5056 (add<GPI>3_compareV): New.
5057 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5058 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5059 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5060 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5061 with 'comparison' operator.
5062 (*add<GPI>3_compareV_cconly_imm): Ditto.
5063 (*add<GPI>3_compareV_cconly): Ditto.
5064 (*add<GPI>3_compareV_imm): Ditto.
5065 (add<GPI>3_compareV): Ditto.
5066 (add<mode>3_carryinC): Ditto.
5067 (*add<mode>3_carryinC_zero): Ditto.
5068 (*add<mode>3_carryinC): Ditto.
5069 (add<mode>3_carryinV): Ditto.
5070 (*add<mode>3_carryinV_zero): Ditto.
5071 (*add<mode>3_carryinV): Ditto.
5073 2018-07-19 Michael Collison <michael.collison@arm.com>
5074 Richard Henderson <rth@redhat.com>
5076 * config/aarch64/aarch64-modes.def (CC_V): New.
5077 * config/aarch64/aarch64-protos.h
5078 (aarch64_addti_scratch_regs): Declare
5079 (aarch64_subvti_scratch_regs): Declare.
5080 (aarch64_expand_subvti): Declare.
5081 (aarch64_gen_unlikely_cbranch): Declare
5082 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5083 for signed overflow using CC_Vmode.
5084 (aarch64_get_condition_code_1): Handle CC_Vmode.
5085 (aarch64_gen_unlikely_cbranch): New function.
5086 (aarch64_addti_scratch_regs): New function.
5087 (aarch64_subvti_scratch_regs): New function.
5088 (aarch64_expand_subvti): New function.
5090 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5092 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5094 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5095 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5098 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5101 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5102 address check not strict.
5104 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5106 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5108 (store_pair_lanes<mode>): Likewise.
5109 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5110 enum value 'ADDR_QUERY_LDP_STP_N'.
5111 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5112 (aarch64_print_address_internal): Add declaration.
5113 (aarch64_print_ldpstp_address): Remove.
5114 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5115 (aarch64_print_operand): Change printing of 'y'.
5116 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5117 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5118 'true' rather than '1'.
5119 * config/aarch64/constraints.md (Uml): Likewise.
5120 (Uml): Rename to Umn.
5123 2018-07-19 Richard Biener <rguenther@suse.de>
5125 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5127 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5128 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5129 (vn_reference_hasher): Likewise.
5130 (struct vn_tables_s): Remove obstack and alloc-pool members.
5131 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5132 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5133 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5134 (vn_reference_insert_pieces): Likewise.
5135 (alloc_vn_nary_op_noinit): Adjust.
5136 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5137 (vn_phi_eq): Adjust.
5138 (shared_lookup_phiargs): Remove.
5139 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5140 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5141 (visit_reference_op_call): Likewise.
5142 (copy_nary, copy_phi, copy_reference): Remove.
5143 (process_scc): Rewind the obstack when iterating. Do not
5144 copy the elements to valid_info but just move them from one
5145 hashtable to the other.
5146 (allocate_vn_table): Adjust.
5147 (free_vn_table): Likewise.
5148 (init_scc_vn): Likewise.
5149 (free_scc_vn): Likewise.
5151 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5154 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5155 indirect_return as function type attribute.
5156 (ix86_attribute_table): Change indirect_return to function
5158 * doc/extend.texi: Update indirect_return attribute.
5160 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5162 * wide-int.h (widest2_int): New.
5163 * gimple-fold.c (arith_overflowed_p): Use it.
5164 * tree.h (widest2_int_cst): New.
5165 * tree-vrp.c (wide_int_binop_overflow): Rename from
5166 vrp_int_const_binop.
5167 Rewrite to work on trees.
5168 (extract_range_from_multiplicative_op_1): Abstract code to...
5169 (wide_int_range_min_max): ...here.
5170 (wide_int_range_cross_product): ...and here.
5171 (extract_range_from_binary_expr_1): Abstract overflow code to...
5172 (wide_int_range_mult_wrapping): ...here.
5173 * tree-vrp.h (wide_int_range_cross_product): New.
5174 (wide_int_range_mult_wrapping): New.
5176 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5177 Julia Koval <julia.koval@intel.com>
5179 * config/i386/x86-tune-costs.h (skylake_memcpy,
5180 skylake_memset): Replace rep_prefix with unrolling for size 512.
5182 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5185 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5186 comparision with EQ_EXPR in last stmt.
5188 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5190 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5191 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5192 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5193 previously known as "PowerPC AltiVec Built-in Functions". Move
5194 some material to new subsubsections "PowerPC AltiVec Built-in
5195 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5197 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5198 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5199 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5200 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5202 2018-07-18 Richard Biener <rguenther@suse.de>
5204 PR tree-optimization/86557
5205 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5208 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5210 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5212 2018-07-17 Jeff Law <law@redhat.com>
5214 * config/arm/arm.c (get_label_padding): Update for recent
5215 changes to label_to_alignment.
5217 PR tree-optimization/86010
5218 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5220 * config/mips/mips.c (vr4130_align_insns): Update for recent
5221 changes to label_to_alignment.
5223 * config/frv/frv.c (frv_label_align): Update for recent changes
5224 to label_to_alignment.
5226 * config/nios2/nios2.c (nios2_label_align): Update for recent
5227 changes which dropped ALIGN_LABELS_LOG.
5229 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5231 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5232 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5234 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5236 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5237 deprecated align_labels_log.
5239 2018-07-17 Richard Biener <rguenther@suse.de>
5242 * dwarf2out.c (init_sections_and_labels): Always generate
5243 a debug_line_str_section for early LTO debug.
5244 (dwarf2out_finish): Reset debug_line_str_hash output early.
5245 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5247 (dwarf2out_early_finish): Output debug_line_str.
5249 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5251 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5252 index register on z196 or later.
5254 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5256 * config/s390/s390.c (s390_default_align): Set default function
5258 (s390_override_options_after_change): Call s390_default align.
5259 (s390_option_override_internal): Call s390_default_align.
5260 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5262 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5265 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5266 to _looptemp_ clauses, other than the first two.
5268 2018-07-17 Martin Liska <mliska@suse.cz>
5270 * opts.c: Do not enable OPT_falign_* for -Os.
5272 2018-07-17 Martin Liska <mliska@suse.cz>
5274 * align.h (MAX_CODE_ALIGN): New.
5275 (MAX_CODE_ALIGN_VALUE): New.
5276 * common/config/i386/i386-common.c (ix86_handle_option):
5277 (MAX_CODE_ALIGN): Moved to align.h.
5278 * final.c (MAX_CODE_ALIGN): Likewise.
5279 * opts.c (parse_and_check_align_values):
5280 (MAX_CODE_ALIGN): Likewise.
5281 (MAX_CODE_ALIGN_VALUE): Likewise.
5283 2018-07-17 Martin Liska <mliska@suse.cz>
5285 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5286 in order to fulfil coding style.
5287 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5288 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5289 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5290 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5291 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5292 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5293 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5294 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5295 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5297 2018-07-17 Martin Liska <mliska@suse.cz>
5299 * align.h: New file.
5300 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5302 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5303 align_flags of label_to_alignment.
5304 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5306 * config/m68k/m68k.c: Do not use removed align_labels_value and
5308 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5309 (LOOP_ALIGN): Likewise.
5310 (LABEL_ALIGN): Likewise.
5311 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5312 Remove not used macro.
5313 (rs6000_loop_align): Change return type to align_flags.
5314 (rs6000_loop_align_max_skip): Remove.
5315 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5316 Change return type to align_flags.
5317 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5318 Remove not used macro.
5319 (rs6000_loop_align): Change return type to align_flags.
5320 (rs6000_loop_align_max_skip): Remove.
5321 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5322 * config/rx/rx-protos.h (rx_align_for_label): Make it
5324 * config/rx/rx.c (rx_align_for_label): Change return type
5326 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5328 into align_flags class.
5329 (LABEL_ALIGN): Likewise.
5330 (LOOP_ALIGN): Likewise.
5331 * config/s390/s390.c (s390_label_align): Use align_flags
5333 (s390_asm_output_function_label): Likewise.
5334 * config/sh/sh.c (sh_override_options_after_change):
5335 Use align_flags class directly without macros.
5336 (find_barrier): Likewise.
5337 (barrier_align): Likewise.
5338 (sh_loop_align): Likewise.
5339 * config/spu/spu.c (spu_option_override):
5340 Use align_flags_tuple::get_value instead of removed macros.
5341 (spu_sched_init): Likewise.
5342 * config/spu/spu.h (GTY): Likewise.
5343 * config/visium/visium.c (visium_option_override):
5344 Set "8" as default secondary alignment.
5345 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5346 in order to guarantee secondary alignment of 8.
5347 * coretypes.h: Include align.h header file.
5348 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5349 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5350 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5351 * doc/tm.texi.in: Likewise.
5352 * final.c (struct label_alignment): Remove not used structure.
5353 (LABEL_ALIGN): Change type to align_flags.
5354 (LOOP_ALIGN): Likewise.
5355 (JUMP_ALIGN): Likewise.
5356 (default_loop_align_max_skip): Remove.
5357 (default_label_align_max_skip): Likewise.
5358 (default_jump_align_max_skip): Likewise.
5359 (default_label_align_after_barrier_max_skip):
5360 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5361 (LABEL_TO_MAX_SKIP): Remove.
5362 (label_to_alignment): Return align_flags type instead of integer.
5363 (label_to_max_skip): Remove.
5364 (align_fuzz): Use align_flags type.
5365 (compute_alignments): Use align_flags type and use align_flags::max
5366 to combine multiple alignments.
5367 (grow_label_align): Grow vec instead of C array.
5368 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5369 (shorten_branches): Use align_flags type and use align_flags::max
5370 to combine multiple alignments.
5371 (final_scan_insn_1): Remove usage of secondary alignment that comes
5372 from label alignment, but instead use proper secondary alignment
5373 which is computed in grow_label_align.
5374 * flags.h (struct align_flags_tuple): Move to align.h.
5375 (struct align_flags): Likewise.
5376 (state_align_loops): Rename to align_loops.
5377 (state_align_jumps): Rename to align_jumps.
5378 (state_align_labels): Rename to align_labels.
5379 (state_align_functions): Rename to align_functions.
5380 (align_loops_log): Remove.
5381 (align_jumps_log): Remove.
5382 (align_labels_log): Remove.
5383 (align_functions_log): Remove.
5384 (align_loops_max_skip): Remove.
5385 (align_jumps_max_skip): Remove.
5386 (align_labels_max_skip): Remove.
5387 (align_functions_max_skip): Remove.
5388 (align_loops_value): Remove.
5389 (align_jumps_value): Remove.
5390 (align_labels_value): Remove.
5391 (align_functions_value): Remove.
5392 * output.h (label_to_alignment): Change return type to align_flags.
5393 (label_to_max_skip): Remove.
5394 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5395 jump_align_max_skip macros.
5396 * targhooks.h (default_loop_align_max_skip): Remove.
5397 (default_label_align_max_skip): Likewise.
5398 (default_jump_align_max_skip): Likewise.
5399 (default_label_align_after_barrier_max_skip): Remove.
5400 * toplev.c (read_log_maxskip): Use ::normalize function.
5401 (parse_N_M): Remove not used argument and also call ::normalize.
5402 (parse_alignment_opts): Do not pass unused arguments.
5403 * varasm.c (assemble_start_function): Use directly align_functions
5404 instead of removed macros.
5405 * system.h: Do not poison removed macros.
5407 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5410 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5411 and cond temporaries don't have reference type if iterator has
5412 pointer type. For init use &for_pre_body instead of pre_p if
5413 for_pre_body is non-empty.
5415 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5417 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5418 double-double modes to SFmode directly directly.
5419 (trunc<mode>sf2_fprs): Delete.
5421 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5423 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5424 for conversions between IFmode and the decimal floating point modes.
5425 (init_float128_ieee): Use the correct names for conversions between
5426 KFmode and the decimal floating point modes.
5428 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5430 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5431 for the conversions between TDmode and IFmode.
5432 (init_float128_ieee): Use more correct names for the conversions
5433 between TDmode and KFmode.
5435 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5437 PR tree-optimization/86526
5438 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5439 (inline_expand_builtin_string_cmp): Likewise.
5440 (inline_string_cmp): Likewise. Use c_readstr instead of
5441 builtin_memcpy_read_str. Add unit_mode temporary.
5443 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5446 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5447 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5449 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5451 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5452 Alphabetize prototypes of built-in functions, separating out
5453 built-in functions that are listed in this section but should be
5454 described elsewhere.
5456 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5459 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5460 conditional move when trapping comparison was split to a
5461 non-trapping one (and vice versa).
5463 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5465 * config/s390/s390.c (s390_function_profiler): Generate nops
5466 instead of profiler call sequences.
5467 * config/s390/s390.opt: Add the new option.
5469 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5471 * config/s390/s390.c (s390_function_profiler): Generate
5472 __mcount_loc section.
5473 * config/s390/s390.opt: Add the new option.
5475 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5477 * common.opt: Add the new warning.
5478 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5479 %r0,__fentry__" when -mfentry is specified.
5480 (s390_option_override_internal): Disallow -mfentry for 31-bit
5482 * config/s390/s390.opt: Add the new option.
5484 2018-07-16 Richard Biener <rguenther@suse.de>
5487 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5488 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5490 2018-07-16 Martin Liska <mliska@suse.cz>
5493 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5496 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5498 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5500 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5502 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5504 * config/arc/arc-cpus.def (hs4x): New cpu.
5506 * config/arc/arc-tables.opt: Regenerate.
5507 * config/arc/arc.c (arc_sched_issue_rate): New function.
5508 (TARGET_SCHED_ISSUE_RATE): Define.
5509 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5510 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5512 (attr tune): Add ARCHS4x tune values.
5513 (attr tune_dspmpy): Define.
5514 (*tst): Correct instruction type.
5515 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5516 * config/arc/arcHS4x.md: New file.
5517 * config/arc/fpu.md: Update instruction type attributes.
5518 * config/arc/t-multilib: Regenerate.
5520 2018-07-16 Tom de Vries <tdevries@suse.de>
5523 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5525 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5527 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5530 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5532 PR tree-optimization/86514
5533 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5534 conversion to a boolean type from a type with greater precision.
5536 2018-07-16 Tom de Vries <tdevries@suse.de>
5538 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5539 dump_flags request TDF_SLIM.
5541 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5543 * fold-const.c (int_const_binop_1): Abstract...
5544 (wide_int_binop): ...wide int code here.
5545 (poly_int_binop): ...poly int code here.
5546 Abstract the rest of int_const_binop_1 into int_const_binop.
5547 * fold-const.h (wide_int_binop): New.
5548 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5549 Remove useless PLUS/MINUS_EXPR case.
5550 (zero_nonzero_bits_from_vr): Move wide int code...
5551 (zero_nonzero_bits_from_bounds): ...here.
5552 (extract_range_from_binary_expr_1): Move mask optimization code...
5553 (range_easy_mask_min_max): ...here.
5554 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5555 (range_easy_mask_min_max): New.
5557 2018-07-15 Jeff Law <law@redhat.com>
5560 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5563 2018-07-14 Jim Wilson <jimw@sifive.com>
5565 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5567 2018-07-14 Paul Koning <ni1d@arrl.net>
5569 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5571 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5573 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5576 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5577 Steve Munroe <munroesj52@gmail.com>
5579 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5580 (_mm_andnot_si128): Likewise.
5581 (_mm_or_si128): Likewise.
5582 (_mm_xor_si128): Likewise.
5584 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5587 * builtins.c (expand_builtin_memcmp): Inline the calls first
5588 when result_eq is false.
5589 (expand_builtin_strcmp): Inline the calls first.
5590 (expand_builtin_strncmp): Likewise.
5591 (inline_string_cmp): New routine. Expand a string compare
5592 call by using a sequence of char comparison.
5593 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5594 a call to str(n)cmp/memcmp.
5595 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5597 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5599 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5601 * config/arm/driver-arm.c: Include arm-native.h.
5602 (host_detect_local_cpu): Use auto-generated data tables.
5603 (vendors, arm_cpu_table): Delete. Move part information to ...
5604 * config/arm/arm-cpus.in: ... here.
5605 * config/arm/parsecpu.awk (gen_native): New function.
5606 (vendor, part): New CPU fields.
5607 (END): Add support for building the native CPU detection tables.
5608 * config/arm/t-arm (arm-native.h): Add build rule.
5609 (driver-arm.o): Add dependency on arm-native.h.
5611 2018-07-13 Richard Biener <rguenther@suse.de>
5614 * match.pd (addr1 - addr2): Allow either of the operand to
5617 2018-07-13 Tom de Vries <tdevries@suse.de>
5619 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5622 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5624 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5625 arrays instead of numbered variables.
5627 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5629 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5630 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5632 2018-07-13 Richard Biener <rguenther@suse.de>
5635 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5636 instead of get_context_die.
5638 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5639 Richard Biener <rguenther@suse.de>
5642 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5643 that the loop latch destination where phi is defined.
5645 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5647 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5648 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5649 (riscv_set_current_function): Extract getting interrupt type to new
5651 (riscv_get_interrupt_type): New function.
5652 (riscv_merge_decl_attributes): New function, checking interrupt type is
5654 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5656 2018-07-12 Paul Koning <ni1d@arrl.net>
5658 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5661 2018-07-12 Paul Koning <ni1d@arrl.net>
5663 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5664 zero reference, add doloop_end instead.
5665 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5666 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5667 detail for doloop_end.
5669 2018-07-12 Martin Sebor <msebor@redhat.com>
5672 * attribs.c (decl_attributes): Reject conflicting attributes before
5673 calling attribute handlers.
5675 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5677 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5679 (gcc::dump_manager::get_dump_file_name): likewise.
5680 (dump_begin): Likewise.
5681 * dumpfile.h (dump_begin): Update prototype.
5682 (gcc::dump_manager::get_dump_file_name,
5683 gcc::dump_manager::get_dump_file_name): Update prototype.
5685 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5687 * internal-fn.h (vectorizable_internal_fn_p): New function.
5688 * tree-vect-slp.c (compatible_calls_p): Likewise.
5689 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5690 to internal functions.
5691 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5693 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5695 * fold-const.h (inverse_conditions_p): Declare.
5696 * fold-const.c (inverse_conditions_p): New function.
5697 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5698 that test the inverse condition of a conditional internal function.
5699 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5700 * internal-fn.c (internal_fn_mask_index): Handle conditional
5702 (vectorized_internal_fn_supported_p): New function.
5703 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5704 (any_pred_load_store): Replace with...
5705 (need_to_predicate): ...this new variable.
5706 (redundant_ssa_names): New variable.
5707 (ifcvt_can_use_mask_load_store): Move initial checks to...
5708 (ifcvt_can_predicate): ...this new function. Handle tree codes
5709 for which a conditional internal function exists.
5710 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5711 instead of ifcvt_can_use_mask_load_store. Update after variable
5713 (predicate_load_or_store): New function, split out from
5714 predicate_mem_writes.
5715 (check_redundant_cond_expr): New function.
5716 (value_available_p): Likewise.
5717 (predicate_rhs_code): Likewise.
5718 (predicate_mem_writes): Rename to...
5719 (predicate_statements): ...this. Use predicate_load_or_store
5720 and predicate_rhs_code.
5721 (combine_blocks, tree_if_conversion): Update after above name changes.
5722 (ifcvt_local_dce): Handle redundant_ssa_names.
5723 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5724 general conditional functions.
5725 * tree-vect-stmts.c (vectorizable_call): Likewise.
5727 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5728 Alan Hayward <alan.hayward@arm.com>
5729 David Sherwood <david.sherwood@arm.com>
5731 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5732 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5733 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5734 plus and minus and convert them into IFN_COND_FMA-based sequences.
5735 (convert_mult_to_fma): Handle conditional plus and minus.
5737 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5739 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5740 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5741 (cond_fnms_optab): New optabs.
5742 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5744 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5745 * internal-fn.h (get_conditional_internal_fn): Declare.
5746 (get_unconditional_internal_fn): Likewise.
5747 * internal-fn.c (cond_ternary_direct): New macro.
5748 (expand_cond_ternary_optab_fn): Likewise.
5749 (direct_cond_ternary_optab_supported_p): Likewise.
5750 (FOR_EACH_COND_FN_PAIR): Likewise.
5751 (get_conditional_internal_fn): New function.
5752 (get_unconditional_internal_fn): Likewise.
5753 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5754 (gimple_match_op::gimple_match_op): Add a new overload for 5
5756 (gimple_match_op::set_op): Likewise.
5757 (gimple_resimplify5): Declare.
5758 * genmatch.c (decision_tree::gen): Generate simplifications for
5760 * gimple-match-head.c (gimple_simplify): Define an overload for
5761 5 operands. Handle calls with 5 arguments in the top-level overload.
5762 (convert_conditional_op): Handle conversions from unconditional
5763 internal functions to conditional ones.
5764 (gimple_resimplify5): New function.
5765 (build_call_internal): Pass a fifth operand.
5766 (maybe_push_res_to_seq): Likewise.
5767 (try_conditional_simplification): Try converting conditional
5768 internal functions to unconditional internal functions.
5769 Handle 3-operand unconditional forms.
5770 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5771 Define ternary equivalents of the current rules for binary conditional
5773 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5775 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5776 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5777 (optab): Handle them.
5778 (SVE_COND_FP_TERNARY): New int iterator.
5779 (sve_fmla_op, sve_fmad_op): New int attributes.
5780 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5781 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5782 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5784 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5786 * target.def (preferred_else_value): New target hook.
5787 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5788 * doc/tm.texi: Regenerate.
5789 * targhooks.h (default_preferred_else_value): Declare.
5790 * targhooks.c (default_preferred_else_value): New function.
5791 * internal-fn.h (conditional_internal_fn_code): Declare.
5792 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5793 (get_conditional_internal_fn): Use it.
5794 (conditional_internal_fn_code): New function.
5795 * gimple-match.h (gimple_match_cond): New struct.
5796 (gimple_match_op): Add a cond member function.
5797 (gimple_match_op::gimple_match_op): Update all forms to take a
5799 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5800 for the suboperation, but don't specify a particular else_value.
5801 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5802 (visit_nary_op, visit_reference_op_load): Pass
5803 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5804 * gimple-match-head.c: Include tree-eh.h
5805 (convert_conditional_op): New function.
5806 (maybe_resimplify_conditional_op): Likewise.
5807 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5808 (gimple_resimplify2): Likewise.
5809 (gimple_resimplify3): Likewise.
5810 (gimple_resimplify4): Likewise.
5811 (maybe_push_res_to_seq): Return null for conditional operations.
5812 (try_conditional_simplification): New function.
5813 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5815 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5817 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5819 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5821 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5823 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5825 (hash_tree): Do not hash DECL_FCONTEXT
5826 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5827 Do not stream DECL_FCONTEXT.
5828 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5829 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5831 2018-07-12 Richard Biener <rguenther@suse.de>
5834 * dwarf2out.c (gen_block_die): Only output blocks when they have
5835 at least one !DECL_IGNORED_P variable.
5837 2018-07-12 Richard Biener <rguenther@suse.de>
5840 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5841 Remove -mieee-fp handling.
5843 2018-07-12 Richard Biener <rguenther@suse.de>
5845 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5846 left-over from last patch.
5848 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5850 PR tree-optimization/86492
5851 * gimple-ssa-store-merging.c
5852 (imm_store_chain_info::coalesce_immediate_stores): Call
5853 check_no_overlap even for the merge_overlapping case. Formatting fix.
5855 2018-07-12 Richard Biener <rguenther@suse.de>
5858 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5859 move possibly trapping operations into the conditional.
5861 2018-07-12 Richard Biener <rguenther@suse.de>
5863 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5864 (vn_lookup_simplify_result): Remove recursion limit applied
5866 (vn_nary_build_or_lookup_1): Adjust.
5867 (try_to_simplify): Likewise.
5868 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5870 (gimple_resimplify2): Likewise.
5871 (gimple_resimplify3): Likewise.
5872 (gimple_resimplify4): Likewise.
5874 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5876 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5877 Use __mmask64 type instead of __mmask8 for __M argument.
5878 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5879 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5881 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5882 __mmask16 for __M argument.
5883 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5884 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5885 to __mmask16 instead of __mmask8.
5886 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5887 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5888 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5889 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5890 instead of __mmask16 for __U argument.
5891 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5892 __mmask16 instead of __mmask8 for __U argument.
5893 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5895 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5897 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5899 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5901 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5903 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5905 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5907 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5909 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5911 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5913 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5914 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5915 return type as well as __M argument type and all casts from __mmask8
5917 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5918 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5919 return type as well as __M argument type and all casts from __mmask8
5921 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5922 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5923 return type as well as __M argument type and all casts from __mmask8
5925 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5926 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5927 return type as well as __M argument type and all casts from __mmask8
5929 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5930 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5933 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5935 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5936 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5939 2018-07-11 Paul Koning <ni1d@arrl.net>
5941 * doc/md.texi (define_subst): Document how multiple occurrences of
5942 the same argument in the replacement pattern are handled.
5944 2018-07-11 Paul Koning <ni1d@arrl.net>
5946 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5948 (Common Type Attributes): Add "mode" attribute.
5950 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5952 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5953 stream DECL_ORIGINAL_TYPE.
5954 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5955 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5956 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5957 Do not walk original type.
5958 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5960 (write_ts_decl_non_common_tree_pointers): Do not stream
5962 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5963 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5965 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5967 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5968 thread twice from the same starting edge.
5970 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5972 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5973 * gimple.c (gimple_call_nonnull_result_p): ...here...
5974 (gimple_call_nonnull_arg): ...and here.
5975 * gimple.h (gimple_call_nonnull_result_p): New.
5976 (gimple_call_nonnull_arg): New.
5978 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5980 * config/arm/arm-cpus.in: Move information from fpu field of each
5981 cpu definition to the isa field.
5982 * config/arm/parsecpu.awk (fpu): Delete match rule.
5983 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5985 2018-07-11 Richard Biener <rguenther@suse.de>
5988 * dwarf2out.c (init_sections_and_labels): Use
5989 output_asm_line_debug_info consistently.
5990 (dwarf2out_early_finish): Likewise.
5991 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5994 2018-07-11 Richard Biener <rguenther@suse.de>
5996 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5997 Rework father_bb setting in a way to avoid propagating constants
5998 multiple times on a loop body.
6000 2018-07-10 Mark Wielaard <mark@klomp.org>
6003 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6005 2018-07-10 Richard Biener <rguenther@suse.de>
6007 * hash-map.h (hash_map::iterator::operator*): Return
6008 references to key and value.
6010 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6013 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6014 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6015 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6016 (gimplify_omp_for): For composite loops, move outer
6017 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6018 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6019 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6020 TREE_LIST for both the original class iterator and the "last" helper
6021 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6022 loop, remember has_decl_expr from outer composite loops for the
6023 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6025 2018-07-09 Martin Sebor <msebor@redhat.com>
6029 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6030 accessing implicitly initialized array elements.
6031 * expr.c (string_constant): Handle string initializers of
6032 character arrays within aggregates.
6033 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6034 Store element offset. As a special case, handle zero size.
6035 (fold_nonarray_ctor_reference): Same.
6036 (fold_ctor_reference): Add argument. Store subobject offset.
6037 * gimple-fold.h (fold_ctor_reference): Add argument.
6039 2018-07-09 Paul Koning <ni1d@arrl.net>
6041 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6042 (pdp11_insn_cost): New function.
6043 (pdp11_md_asm_adjust): New function.
6044 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6045 (pdp11_rtx_costs): Update to match machine better.
6046 (output_addr_const_pdp11): Correct format mismatch warnings.
6047 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6048 * config/pdp11/pdp11.md: General change to add base_cost and/or
6049 length attributes for use by new pdp11_insn_cost function.
6050 (MIN_BRANCH): Correct definition.
6052 (doloop_end): Use standard pattern name for looping pattern.
6053 (doloop_end_nocc): New.
6054 (movsf): Add another constraint alternative.
6055 (zero_extendqihi2): Add constraint alternatives for not in place
6057 (zero_extendhisi2): Remove.
6058 (shift patterns): Add CC handling variants.
6062 (define_peephole2): New peephole to recognize mov that sets CC for
6065 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6067 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6068 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6071 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6074 * real.c (real_nextafter): Return true if result is denormal.
6076 2018-07-09 Martin Liska <mliska@suse.cz>
6078 * common.opt: Add back wrongly removed attribute.
6080 2018-07-09 Richard Biener <rguenther@suse.de>
6083 * dwarf2out.c (gen_block_die): For an early generated DIE
6084 always output high/low PC attributes.
6086 2018-07-09 Tom de Vries <tdevries@suse.de>
6088 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6089 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6090 onto VAR_DECL with abstract origin.
6092 2018-07-07 Jim Wilson <jimw@sifive.com>
6094 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6096 2018-07-07 Tom de Vries <tdevries@suse.de>
6098 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6100 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6102 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6104 (combine_bound): Use wide-int overflow calculation instead of
6106 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6108 * fold-const.c (int_const_binop_2): Same.
6109 (extract_muldiv_1): Same.
6110 (fold_div_compare): Same.
6111 (fold_abs_const): Same.
6113 * poly-int.h (add): Same.
6117 * predict.c (predict_iv_comparison): Same.
6118 * profile-count.c (slow_safe_scale_64bit): Same.
6119 * simplify-rtx.c (simplify_const_binary_operation): Same.
6120 * tree-chrec.c (tree_fold_binomial): Same.
6121 * tree-data-ref.c (split_constant_offset_1): Same.
6122 * tree-if-conv.c (idx_within_array_bound): Same.
6123 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6124 * tree-ssa-phiopt.c (minmax_replacement): Same.
6125 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6126 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6127 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6128 * wide-int.cc (wi::add_large): Same.
6129 (wi::mul_internal): Same.
6130 (wi::sub_large): Same.
6131 (wi::divmod_internal): Same.
6132 * wide-int.h: Change overflow type to overflow_type for neg, add,
6133 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6134 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6135 mul_internal, divmod_internal.
6136 (overflow_type): New enum.
6137 (accumulate_overflow): New.
6139 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6141 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6142 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6144 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6146 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6147 argument is checked for zero before entering loop, avoid checking again.
6149 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6151 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6152 * gimplify.h (generic_expr_could_trap_p): Likwise.
6153 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6155 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6157 PR tree-optimization/86401
6158 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6159 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6160 (fold_bit_and_mask): ... here. New helper function for match.pd.
6161 * fold-const.h (fold_bit_and_mask): Declare.
6162 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6164 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6167 * target.def (translate_mode_attribute): New hook.
6168 * targhooks.h (default_translate_mode_attribute): Declare.
6169 * targhooks.c (default_translate_mode_attribute): New function.
6170 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6171 * doc/tm.texi: Regenerate.
6172 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6173 (rs6000_translate_mode_attribute): New function.
6175 2018-07-06 Paul Koning <ni1d@arrl.net>
6177 * doc/md.texi (define_split): Document DONE and FAIL.
6178 (define_peephole2): Ditto.
6180 2018-07-05 Jeff Law <law@redhat.com>
6182 PR tree-optimization/86010
6183 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6184 both the head and tail of mem* and str* calls.
6186 2018-07-05 Jim Wilson <jimw@sifive.com>
6188 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6190 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6192 * config/aarch64/aarch64-simd.md: correct flags text for
6193 MIN_EXPR replacement.
6195 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6197 * configure: Regenerated.
6199 2018-07-05 Carl Love <cel@us.ibm.com>
6201 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6202 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6203 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6204 VSX_BUILTIN_DOUBLEL_V4SF.
6206 2018-07-05 Martin Sebor <msebor@redhat.com>
6209 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6210 than its domain to compute its the upper bound of a char array.
6212 2018-07-05 Nathan Sidwell <nathan@acm.org>
6214 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6215 * doc/cpp.texi: Update comment.
6216 * doc/tm.texi: Rebuilt.
6217 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6218 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6219 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6220 headers affected by extern "C".
6221 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6222 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6223 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6224 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6225 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6226 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6227 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6228 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6229 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6230 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6231 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6232 config/sparc/sp64-elf.h, config/spu/spu.h,
6233 config/stormy16/stormy16.h, config/v850/v850.h,
6234 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6235 define NO_IMPLICIT_EXTERN_C.
6236 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6238 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6241 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6242 instead of GET_MODE_SIZE when comparing Units.
6244 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6247 * rtlanal.c (set_noop_p): Constrain on mode change,
6248 include hard-reg-set.h
6250 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6252 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6254 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6257 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6260 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6262 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6264 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6267 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6269 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6271 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6274 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6276 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6278 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6279 neg_*_op* variables.
6281 2018-07-04 Martin Liska <mliska@suse.cz>
6283 * tree-switch-conversion.c: Define
6284 max_ratio_for_speed and max_ratio_for_size constants.
6286 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6287 Martin Liska <mliska@suse.cz>
6292 * common.opt: Rename align options with 'str_' prefix.
6293 * common/config/i386/i386-common.c (set_malign_value): New
6295 (ix86_handle_option): Use it to set -falign-* options/
6296 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6297 type from int to string.
6298 * config/aarch64/aarch64.c: Update default values from int
6300 * config/alpha/alpha.c (alpha_override_options_after_change):
6302 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6303 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6304 max skip conditionally.
6305 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6306 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6307 max skip conditionally.
6308 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6309 max skip conditionally.
6310 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6311 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6312 max skip conditionally.
6313 * config/i386/i386.c (struct ptt): Change type from int to
6315 (ix86_default_align): Set default values.
6316 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6317 max skip conditionally.
6318 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6319 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6320 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6321 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6322 max skip conditionally.
6323 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6324 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6325 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6326 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6327 max skip conditionally.
6328 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6329 * config/ia64/ia64.c (ia64_option_override): Set default values
6330 for alignment options.
6331 * config/m68k/m68k.c: Handle new str_align_* options.
6332 * config/mips/mips.c (mips_set_compression_mode): Change
6334 (mips_option_override): Set default values for options.
6335 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6337 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6339 * config/rx/rx.c (rx_option_override): Likewise.
6340 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6341 (LABEL_ALIGN): Use align_labels_log.
6342 (LOOP_ALIGN): Use align_loops_align.
6343 * config/s390/s390.c (s390_asm_output_function_label): Use new
6345 * config/sh/sh.c (sh_override_options_after_change):
6346 Change type of constants.
6347 * config/spu/spu.c (spu_sched_init): Likewise.
6348 * config/sparc/sparc.c (sparc_option_override): Set default
6350 * config/visium/visium.c (visium_option_override): Likewise.
6351 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6352 emit p2align format with last argument if it's not needed.
6353 * doc/invoke.texi: Document extended format of -falign-*.
6354 * final.c: Use align_labels alignment.
6355 * flags.h (struct target_flag_state): Change type to use
6357 (struct align_flags_tuple): New.
6358 (struct align_flags): Likewise.
6359 (align_loops_log): Redefine macro to use new types.
6360 (align_loops_max_skip): Redefine macro to use new types.
6361 (align_jumps_log): Redefine macro to use new types.
6362 (align_jumps_max_skip): Redefine macro to use new types.
6363 (align_labels_log): Redefine macro to use new types.
6364 (align_labels_max_skip): Redefine macro to use new types.
6365 (align_functions_log): Redefine macro to use new types.
6366 (align_loops): Redefine macro to use new types.
6367 (align_jumps): Redefine macro to use new types.
6368 (align_labels): Redefine macro to use new types.
6369 (align_functions): Redefine macro to use new types.
6370 (align_functions_max_skip): Redefine macro to use new types.
6371 (align_loops_value): New macro.
6372 (align_jumps_value): New macro.
6373 (align_labels_value): New macro.
6374 (align_functions_value): New macro.
6375 * function.c (invoke_set_current_function_hook): Propagate
6376 alignment values from flags to global variables default in
6378 * ipa-icf.c (sem_function::equals_wpa): Use
6379 cl_optimization_option_eq instead of memcmp.
6380 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6382 (cl_optimization_stream_in): Likewise.
6383 * optc-save-gen.awk: Support strings in cl_optimization.
6384 * opth-gen.awk: Likewise.
6385 * opts.c (finish_options): Remove error checking of invalid
6387 (MAX_CODE_ALIGN): Remove.
6388 (MAX_CODE_ALIGN_VALUE): Likewise.
6389 (parse_and_check_align_values): New function.
6390 (check_alignment_argument): Likewise.
6391 (common_handle_option): Use check_alignment_argument.
6392 * opts.h (parse_and_check_align_values): Declare.
6393 * toplev.c (init_alignments): Remove.
6394 (read_log_maxskip): New.
6395 (parse_N_M): Likewise.
6396 (parse_alignment_opts): Likewise.
6397 (backend_init_target): Remove usage of init_alignments.
6398 * toplev.h (parse_alignment_opts): Declare.
6399 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6401 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6402 * tree.c (cl_option_hasher::equal): New.
6403 * varasm.c: Use new global macros.
6405 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6407 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6408 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6409 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6410 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6411 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6412 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6413 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6414 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6415 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6416 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6417 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6418 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6419 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6421 2018-07-04 Martin Liska <mliska@suse.cz>
6422 Jonathan Wakely <jwakely@redhat.com>
6424 * coverage.c: Use correct type.
6425 * doc/invoke.texi: Language correction.
6427 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6430 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6431 ENDBRANCH for non-tail call which may return via indirect branch.
6432 * doc/extend.texi: Document indirect_return attribute.
6434 2018-07-03 Martin Sebor <msebor@redhat.com>
6436 PR tree-optimization/86274
6437 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6439 (format_floating): Correct handling of infinities and NaNs.
6441 2018-07-03 Martin Sebor <msebor@redhat.com>
6443 * print-tree.c (print_real_cst): New function.
6444 (print_node_brief): Call it.
6445 (print_node): Ditto.
6447 2018-07-03 Jeff Law <law@redhat.com>
6449 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6450 into a single pattern.
6452 * config/h8300/h8300.md (ors code_iterator): New.
6453 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6454 a single pattern and single splitter.
6455 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6456 (iorqi3_1, xorqi3_1): Likewise.
6457 (iorqi3, xorqi3 expanders): Similarly.
6459 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6460 (movmd_internal) into a single pattern using the P mode iterator.
6461 (movmd splitters): Similarly.
6462 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6463 (movsd splitters): Similarly.
6465 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6466 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6467 right table based on the size of the operand.
6468 * config/h8300/h8300.md (length_table): Corresponding changes. All
6469 references to "addb", "addw" and "addl" changed to "add".
6470 (btst patterns): Merge two variants into a single pattern.
6471 (tstqi, tsthi): Likewise.
6472 (addhi3_incdec, addsi3_incdec): Likewise.
6473 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6474 (mulhi3, mulsi3): Likewise.
6475 (udivhi3, udivsi3): Likewise.
6476 (divhi3, divsi3): Likewise.
6477 (andorqi3, andorhi3, andorsi3): Likewise.
6479 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6482 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6483 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6485 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6487 PR tree-optimization/85694
6488 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6489 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6491 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6492 (<u>avg<mode>3_ceil): New patterns.
6494 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6496 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6497 scan-tree-dump directive.
6498 * gcc.dg/vect/slp-perm-2.c: Likewise.
6499 * gcc.dg/vect/slp-perm-3.c: Likewise.
6500 * gcc.dg/vect/slp-perm-5.c: Likewise.
6501 * gcc.dg/vect/slp-perm-6.c: Likewise.
6502 * gcc.dg/vect/slp-perm-7.c: Likewise.
6503 * gcc.dg/vect/slp-perm-8.c: Likewise.
6505 2018-07-03 Marek Polacek <polacek@redhat.com>
6508 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6510 2018-07-03 Richard Biener <rguenther@suse.de>
6513 * tree-ssa-structalias.c (find_func_clobbers): Properly
6514 handle indirect calls.
6516 2018-07-03 Jeff Law <law@redhat.com>
6518 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6519 (shifts): New code iterator.
6520 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6521 expander. Fix HImode handling on H8/SX.
6522 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6523 (subqi3, subhi3, subsi3 expanders): Likewise.
6524 (andqi3, andhi3, andsi3 expanders): Likewise.
6525 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6526 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6527 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6528 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6529 (zero_extendqihi2, zero_extendqisi2): Likewise.
6530 (extendqihi2, extendqisi2): Likewise.
6531 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6532 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6533 (rotlqi3_1, rotlhi3_1): Likewise.
6534 (logicalhi3_sn, logicalsi3_sn): Likewise.
6535 (logicalhi3, logicalsi3): Likewise.
6537 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6539 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6540 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6541 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6542 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6543 type to append_pattern_def_seq instead of creating a stmt_vec_info
6545 (build_mask_conversion): Likewise. Remove vinfo argument.
6546 (vect_add_conversion_to_patterm): Likewise, renaming to...
6547 (vect_add_conversion_to_pattern): ...this.
6548 (vect_recog_mask_conversion_pattern): Update call to
6549 build_mask_conversion. Pass the vector type to
6550 append_pattern_def_seq here too.
6551 (vect_recog_gather_scatter_pattern): Update call to
6552 vect_add_conversion_to_pattern.
6554 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6556 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6557 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6558 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6559 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6560 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6561 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6562 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6563 append_pattern_def_seq instead of new_pattern_def_seq.
6564 (vect_recog_divmod_pattern): Do both of the above.
6565 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6568 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6570 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6571 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6572 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6573 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6574 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6575 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6576 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6577 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6578 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6579 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6580 parameter with a single stmt_vec_info.
6581 (vect_recog_func_ptr): Likewise.
6582 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6583 (vect_try_gather_scatter_pattern): ...this.
6584 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6585 the stmt_vec_info of the statement to be matched. Don't clear
6586 STMT_VINFO_RELATED_STMT.
6587 (vect_pattern_recog): Update call accordingly.
6589 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6591 PR tree-optimization/85694
6592 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6593 (uavgM3_ceil): Document new optabs.
6594 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6595 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6597 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6598 (savg_ceil_optab): New optabs.
6599 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6600 (vect_vect_recog_func_ptrs): Add it.
6601 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6602 constant directly from the associated lhs.
6604 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6606 * tree-vect-patterns.c (vect_split_statement): New function.
6607 (vect_convert_input): Use it to try to split an existing cast.
6609 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6611 * poly-int.h (print_hex): New function.
6612 * dumpfile.h (dump_dec, dump_hex): Declare.
6613 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6614 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6615 min_input_precision, operation_precision and operation_sign.
6616 * tree-vect-patterns.c (vect_get_range_info): New function.
6617 (vect_same_loop_or_bb_p, vect_single_imm_use)
6618 (vect_operation_fits_smaller_type): Delete.
6619 (vect_look_through_possible_promotion): Add an optional
6620 single_use_p parameter.
6621 (vect_recog_over_widening_pattern): Rewrite to use new
6622 stmt_vec_info infomration. Handle one operation at a time.
6623 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6624 (vect_truncatable_operation_p, vect_set_operation_type)
6625 (vect_set_min_input_precision): New functions.
6626 (vect_determine_min_output_precision_1): Likewise.
6627 (vect_determine_min_output_precision): Likewise.
6628 (vect_determine_precisions_from_range): Likewise.
6629 (vect_determine_precisions_from_users): Likewise.
6630 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6631 (vect_vect_recog_func_ptrs): Put over_widening first.
6633 (vect_pattern_recog): Call vect_determine_precisions.
6635 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6637 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6638 statements that have been replaced by further pattern statements.
6639 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6641 2018-07-03 Richard Biener <rguenther@suse.de>
6643 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6644 always set *dt. Dump vectype in vectype overload.
6645 * dumpfile.h (dump_gimple_expr): New function.
6646 (dump_gimple_expr_loc): Likewise.
6647 * dumpfile.c (dump_gimple_expr): New function.
6648 (dump_gimple_expr_loc): Likewise.
6650 2018-07-02 Jeff Law <law@redhat.com>
6652 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6653 the H8/300, H8/300H and H8/S variants into a single pattern.
6654 (movhi_h8300, movqi_h8300hs): Similarly.
6655 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6656 (QHI mode iterator): New.
6658 * config/h8300/h8300.md: Remove trailing whitespace.
6660 2018-07-02 Jim Wilson <jimw@sifive.com>
6662 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6663 instead of emit_insn for interrupt returns.
6664 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6665 (riscv_sret, riscv_uret): Likewise.
6667 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6669 * pretty-print.c (selftest::test_pp_format): Move save and restore
6670 of quotes to class auto_fix_quotes, and add an instance.
6671 * selftest.c: Include "intl.h".
6672 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6673 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6674 * selftest.h (selftest::auto_fix_quotes): New class.
6676 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6678 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6679 (aarch64_sve_prepare_conditional_op): Remove.
6680 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6681 Allow aarch64_simd_reg_or_zero as select operand; remove
6682 the aarch64_sve_prepare_conditional_op call.
6683 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6684 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6685 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6686 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6687 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6688 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6689 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6690 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6691 and a splitters to match all of the *_any patterns.
6692 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6694 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6695 (SVE_COND_FP_BINARY_REV): Remove.
6696 (sve_int_op_rev, sve_fp_op_rev): New.
6697 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6698 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6699 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6700 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6701 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6702 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6703 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6704 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6705 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6707 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6708 Remove match_dup 1 from the inner unspec.
6709 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6711 * config/aarch64/aarch64.md (movprfx): New attr.
6712 (length): Default movprfx to 8.
6713 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6714 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6715 (*<su>mul<SVE_I>3_highpart): Likewise.
6716 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6717 (*v<ASHIFT><SVE_I>3): Likewise.
6718 (*<su><MAXMIN><SVE_I>3): Likewise.
6719 (*<su><MAXMIN><SVE_F>3): Likewise.
6720 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6721 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6722 (*div<SVE_F>4): Likewise.
6724 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6726 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6729 2018-07-02 Richard Biener <rguenther@suse.de>
6731 PR tree-optimization/86363
6732 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6733 memset argument refers to a non-variable address.
6735 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6737 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6738 {PLUS,MINUS}_EXPR code to...
6739 (adjust_symbolic_bound): ...here,
6740 (combine_bound): ...here,
6741 (set_value_range_with_overflow): ...and here.
6743 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6745 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6747 (extract_range_from_abs_expr): ...here.
6749 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6751 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6752 -fno-omit-frame-pointer when not optimizing.
6754 2018-07-02 Martin Liska <mliska@suse.cz>
6757 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6758 (propagate_nothrow): Likewise.
6760 2018-07-02 Martin Liska <mliska@suse.cz>
6763 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6765 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6767 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6768 function in r262149, changing "loc" param from source_location to
6769 const dump_location_t &.
6770 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6771 declaration, as above.
6773 2018-07-01 Paul Koning <ni1d@arrl.net>
6775 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6776 -munit-asm, -mgnu-asm, -mdec-asm.
6777 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6778 (pdp11_output_labelref): New.
6779 (pdp11_output_def): New.
6780 (pdp11_output_addr_vec_elt): New.
6781 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6782 %# and %@ format codes.
6783 (pdp11_option_override): New.
6784 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6785 (pdp11_output_ident): New.
6786 (pdp11_asm_named_section): New.
6787 (pdp11_asm_init_sections): New.
6788 (pdp11_file_start): New.
6789 (pdp11_file_end): New.
6790 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6791 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6792 %o, like %c but octal.
6793 (pdp11_option_override): New.
6794 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6796 (DATA_SECTION_ASM_OP): Ditto.
6797 (READONLY_DATA_SECTION_ASM_OP): New.
6798 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6799 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6800 (ASM_OUTPUT_LABELREF): Ditto.
6801 (ASM_OUTPUT_DEF): Ditto.
6802 (ASM_OUTPUT_EXTERNAL): New.
6803 (ASM_OUTPUT_SOURCE_FILENAME): New.
6804 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6805 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6806 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6807 %# and %@ format codes.
6808 * config/pdp11/pdp11.opt (mgnu-asm): New.
6809 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6810 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6811 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6813 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6815 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6816 dereferencing path[] beyond its length.
6818 (debug_all_paths): New.
6819 (rewire_first_differing_edge): New.
6820 (adjust_paths_after_duplication): New.
6821 (duplicate_thread_path): Call adjust_paths_after_duplication.
6823 (thread_through_all_blocks): Add new argument to
6824 duplicate_thread_path.
6826 2018-06-30 Jim Wilson <jimw@sifive.com>
6828 * config/riscv/predicates.md (p2m1_shift_operand): New.
6829 (high_mask_shift_operand): New.
6830 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6831 pattern using p2m1_shift_operand.
6832 (lshsi3_zero_extend_3+2): New combiner pattern using
6833 high_mask_shift_operand.
6835 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6837 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6839 (vect_recog_rotate_pattern): ...here.
6840 (vect_convert_input): Try to insert casts of invariants in the
6842 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6843 preheader to be empty.
6845 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6847 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6848 vector type. If given, install it in the new statement's
6850 (vect_element_precision): New function.
6851 (vect_unpromoted_value): New struct.
6852 (vect_unpromoted_value::vect_unpromoted_value): New function.
6853 (vect_unpromoted_value::set_op): Likewise.
6854 (vect_look_through_possible_promotion): Likewise.
6855 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6856 (vect_widened_op_tree, vect_convert_input): Likewise.
6857 (vect_convert_inputs, vect_convert_output): Likewise.
6858 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6859 to handle the optional cast of the multiplication result and
6860 vect_widened_op_tree to detect the widened multiplication itself.
6861 Do not require the input and output of promotion casts to have
6862 the same sign, but base the signedness of the operation on the
6863 input rather than the result. If the pattern includes two
6864 promotions, check that those promotions have the same sign.
6865 Do not restrict the MULT_EXPR handling to a double-width result;
6866 handle quadruple-width results and wider. Use vect_convert_inputs
6867 to convert the inputs to the common type.
6868 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6869 to handle the optional cast of the ABS result. Also allow a sign
6870 change or a sign extension between the ABS and MINUS.
6871 Use vect_widened_op_tree to detect the widened subtraction and use
6872 vect_convert_inputs to convert the inputs to the common type.
6873 (vect_handle_widen_op_by_const): Delete.
6874 (vect_recog_widen_op_pattern): New function.
6875 (vect_recog_widen_mult_pattern): Use it.
6876 (vect_recog_widen_shift_pattern): Likewise.
6877 (vect_recog_widen_sum_pattern): Use
6878 vect_look_through_possible_promotion to handle the promoted
6881 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6883 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6884 the containing gimple_seq *.
6885 * gimple-iterator.h (gsi_for_stmt): Declare it.
6886 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6887 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6888 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6889 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6890 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6892 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6894 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6895 statement being replaced is part of an existing pattern
6896 definition sequence, inserting the new pattern statements before
6898 (vect_pattern_recog_1): Don't return a bool. If the statement
6899 is already part of a pattern, instead apply pattern matching
6900 to the pattern definition statements. Don't clear the
6901 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6902 (vect_pattern_recog): Don't break after the first match;
6903 continue processing the pattern definition statements instead.
6904 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6906 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6908 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6909 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6910 (vect_recog_widen_sum_pattern): Use it.
6912 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6914 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6915 phi is not a pattern statement and has not been replaced by
6916 a pattern statement.
6917 * tree-vect-patterns.c (type_conversion_p): Don't check
6918 STMT_VINFO_IN_PATTERN_P.
6919 (vect_recog_vector_vector_shift_pattern): Likewise.
6920 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6921 the pattern statement rather than the original statement; check
6922 directly for a WIDEN_MULT_EXPR here.
6923 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6924 vect_is_simple_use to return the pattern statement rather
6925 than the original statement; use is_pattern_stmt_p to check
6926 for such a pattern statement.
6927 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6928 to return the pattern statement rather than the original statement;
6929 don't do the same transformation here.
6930 (vect_is_simple_use): If the defining statement has been replaced
6931 by a pattern statement, return the pattern statement instead.
6932 Remove the corresponding (local) transformation from the vectype
6935 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6937 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6938 end and default to null.
6939 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6940 (vectorizable_reduction): Update calls accordingly, dropping the
6941 gimple ** argument if the passed-back statement isn't needed.
6942 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6943 (vect_recog_rotate_pattern): Likewise.
6944 (vect_recog_mask_conversion_pattern): Likewise.
6945 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6946 (vect_mask_constant_operand_p): Likewise.
6947 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6948 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6949 (get_group_load_store_type, get_load_store_type): Likewise.
6950 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6951 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6952 (vectorizable_conversion, vectorizable_assignment): Likewise.
6953 (vectorizable_shift, vectorizable_operation): Likewise.
6954 (vectorizable_store, vect_is_simple_cond): Likewise.
6955 (vectorizable_condition, vectorizable_comparison): Likewise.
6956 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6957 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6958 and move it to the end. Cope with null def_stmt_outs.
6960 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6962 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6964 2018-06-29 Jeff Law <law@redhat.com>
6966 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6967 displacements for TARGET_V850E2V3 and newer.
6968 (TARGET_LRA_P): Remove. Defaults to LRA now.
6969 * config/v850/v850.md (sign23byte_load): Remove.
6970 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6971 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6973 2018-06-29 Martin Liska <mliska@suse.cz>
6976 * coverage.c (coverage_init): Mangle full path name.
6977 * doc/invoke.texi: Document the change.
6978 * gcov-io.c (mangle_path): New.
6979 * gcov-io.h (mangle_path): Likewise.
6980 * gcov.c (mangle_name): Use mangle_path for path mangling.
6982 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6984 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6985 if starting source register is not even.
6987 2018-06-29 Martin Liska <mliska@suse.cz>
6989 PR tree-optimization/86263
6990 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6991 Make edge redirection.
6993 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6995 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6996 (dump_scope_depth): New variable.
6997 (get_dump_scope_depth): New function.
6998 (dump_begin_scope): New function.
6999 (dump_end_scope): New function.
7000 * dumpfile.h (get_dump_scope_depth): New declaration.
7001 (dump_begin_scope): New declaration.
7002 (dump_end_scope): New declaration.
7003 (class auto_dump_scope): New class.
7004 (AUTO_DUMP_SCOPE): New macro.
7005 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7008 2018-06-29 Richard Biener <rguenther@suse.de>
7010 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7011 compute_all_dependences succeeds.
7012 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7013 exceed --param loop-max-datarefs-for-datadeps.
7015 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7017 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7019 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7022 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7023 alternative 0 in preferred_for_speed attribute.
7025 2018-06-28 Paul Koning <ni1d@arrl.net>
7027 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7028 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7029 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7030 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7031 for shift insn patterns.
7033 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7035 * cgraph.c (cgraph_node::get_body): Replace assignments to
7036 "dump_file" with calls to set_dump_file.
7037 * dumpfile.c (alt_dump_file): Make static, and group with...
7038 (alt_flags): ...this definition.
7039 (dumps_are_enabled): New variable.
7040 (refresh_dumps_are_enabled): New function.
7041 (set_dump_file): New function.
7042 (set_alt_dump_file): New function.
7043 (gcc::dump_manager::dump_start): Replace assignments to
7044 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7046 (gcc::dump_manager::dump_finish): Likewise.
7047 * dumpfile.h (alt_dump_file): Delete decl.
7048 (dumps_are_enabled): New variable decl.
7049 (set_dump_file): New function decl.
7050 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7052 * tree-nested.c (lower_nested_functions): Replace assignments to
7053 "dump_file" with calls to set_dump_file.
7055 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7057 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7058 goto_locus of each outgoing edge of each basic block.
7060 2018-06-28 Richard Biener <rguenther@suse.de>
7062 * dwarf2out.c (decl_scope_table): Remove.
7063 (push_decl_scope): Likewise.
7064 (pop_decl_scope): Likewise.
7065 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7066 (gen_struct_or_union_type_die): Likewise.
7067 (gen_tagged_type_die): Likewise.
7068 (dwarf2out_init): Do not initialize decl_scope_table.
7069 (dwarf2out_c_finalize): Do not free it.
7071 2018-06-28 Richard Biener <rguenther@suse.de>
7073 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7074 deciding whether to not re-use a DIE.
7076 2018-06-28 Richard Biener <rguenther@suse.de>
7078 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7079 DW_AT_abstract_origin attribute.
7081 2018-06-28 Martin Liska <mliska@suse.cz>
7083 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7084 Use newly introduced constants.
7085 * tree-switch-conversion.h (struct jump_table_cluster):
7086 Define max_ratio_for_size and max_ratio_for_speed.
7088 2018-06-28 Martin Liska <mliska@suse.cz>
7090 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7091 Add new checking assert to catch invalid state.
7092 (jump_table_cluster::can_be_handled): Handle single case
7094 (jump_table_cluster::is_beneficial): Bail out for such case.
7095 (bit_test_cluster::find_bit_tests):
7096 Add new checking assert to catch invalid state.
7097 (bit_test_cluster::can_be_handled): Handle single case
7099 (bit_test_cluster::is_beneficial): Bail out for such case.
7100 (switch_decision_tree::analyze_switch_statement):
7103 2018-06-28 Martin Liska <mliska@suse.cz>
7105 * common.opt: Introduce -completion option.
7106 * gcc.c (driver_handle_option): Handle it.
7107 (driver::main): Print completions if completion
7109 * opt-suggestions.c (option_proposer::get_completions):
7111 (option_proposer::suggest_completion): Likewise.
7112 (option_proposer::find_param_completions): Likewise.
7113 (verify_autocompletions): Likewise.
7114 (test_completion_valid_options): Likewise.
7115 (test_completion_valid_params): Likewise.
7116 (in_completion_p): Likewise.
7117 (empty_completion_p): Likewise.
7118 (test_completion_partial_match): Likewise.
7119 (test_completion_garbage): Likewise.
7120 (opt_proposer_c_tests): Likewise.
7121 * opt-suggestions.h: Declare new functions.
7122 * opts.c (common_handle_option): Handle OPT__completion_.
7123 * selftest-run-tests.c (selftest::run_tests): Add
7124 opt_proposer_c_tests.
7125 * selftest.c (assert_str_startswith): New.
7126 * selftest.h (assert_str_startswith): Likewise.
7127 (opt_proposer_c_tests): New.
7128 (ASSERT_STR_STARTSWITH): Likewise.
7130 2018-06-28 Martin Liska <mliska@suse.cz>
7132 * Makefile.in: Add opt-suggestions.o.
7133 * gcc-main.c: Include opt-suggestions.h.
7134 * gcc.c (driver::driver): Likewise.
7135 (driver::~driver): Remove m_option_suggestions.
7136 (driver::build_option_suggestions): Moved to option_proposer.
7137 (driver::suggest_option): Likewise.
7138 (driver::handle_unrecognized_options): Use option_proposer.
7139 * gcc.h (class driver): Add new memver m_option_proposer.
7140 * opt-suggestions.c: New file.
7141 * opt-suggestions.h: New file.
7143 2018-06-28 Martin Liska <mliska@suse.cz>
7145 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7146 (auto_string_vec::~auto_string_vec): Likewise.
7148 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7150 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7151 prevent_decl_creation_for_types fields up and add reset_location field.
7152 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7153 statement if id->reset_location is true.
7154 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7155 id->reset_location is true.
7156 (copy_phis_for_bb): Force input_location on the arguments if
7157 id->reset_location is true.
7158 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7159 is set on the function to be inlined.
7161 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7163 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7165 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7167 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7168 registers for Pmode.
7169 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7170 hard registers for the clobbered pseudo.
7172 2018-06-27 Paul Koning <ni1d@arrl.net>
7174 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7175 mutually exclusive options.
7176 * config/pdp11/constraints.md (h): New constraint.
7177 (O): Update definition to match shift code generation.
7178 (D): New constraint.
7179 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7181 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7183 (output_jump): Change arguments.
7184 (pdp11_fixed_cc_regs): New function.
7185 (pdp11_cc_mode): Ditto.
7186 (pdp11_expand_shift): Ditto.
7187 (pdp11_assemble_shift): Ditto.
7188 (pdp11_small_shift): Ditto.
7189 (pdp11_branch_cost): Remove.
7190 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7192 (pdp11_register_move_cost): Update for CC registers.
7193 (pdp11_rtx_costs): Add case for LSHIFTRT.
7194 (pdp11_output_jump): Add CCNZ mode conditional branches.
7195 (notice_update_cc_on_set): Remove.
7196 (pdp11_cc_mode): New function.
7197 (simple_memory_operand): Correct pre/post decrement case.
7198 (no_side_effect_operand): New function.
7199 (pdp11_regno_reg_class): Add CC_REGS class.
7200 (pdp11_fixed_cc_regs): New function.
7201 (pdp11_small_shift): New function.
7202 (pdp11_expand_shift): New function to expand shift insns.
7203 (pdp11_assemble_shift): New function to output shifts.
7204 (pdp11_branch_cost): Remove.
7205 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7206 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7207 (WCHAR_TYPE): Ditto.
7208 (PTRDIFF_TYPE): Ditto.
7209 (ADJUST_INSN_LENGTH): New macro.
7210 (FIXED_REGISTERS): Add CC registers.
7211 (CALL_USED_REGISTERS): Ditto.
7213 (REG_CLASS_NAMES): Ditto.
7214 (REG_CLASS_CONTENTS): Ditto.
7215 (SELECT_CC_MODE): Use new function.
7216 (TARGET_FLAGS_REGNUM): New macro.
7217 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7218 (cc0_reg_rtx): Remove.
7219 (CC_STATUS_MDEP): Remove.
7220 (CC_STATUS_MDEFP_INIT): Remove.
7221 (CC_IN_FPU): Remove.
7222 (NOTICE_UPDATE_CC): Remove.
7223 (REGISTER_NAMES): Add CC registers.
7224 (BRANCH_COST): Change to constant 1.
7225 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7227 * config/pdp11/pdp11.opt (mbcopy): Remove.
7228 (mbcopy-builtin): Remove.
7229 (mbranch-cheap): Remove.
7230 (mbranch-expensive): Remove.
7231 * config/pdp11/predicates.md (expand_shift_operand): Update to
7232 match shift code generation.
7233 (ccnz_operator): New predicate.
7234 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7235 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7236 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7238 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7239 description of O constraint.
7241 2018-06-27 Jeff Law <law@redhat.com>
7242 Austin Law <austinklaw@gmail.com>
7244 * config/v850/v850.md (addsi3_set_flags): New pattern.
7245 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7246 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7247 (zero_extendhisi2_v850_set_flags): Likewise.
7248 (zero_extendqisi2_v850_set_flags): Likewise.
7249 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7250 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7251 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7253 * config/v850/v850-protos.h (notice_update_cc): Remove.
7254 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7255 (v850_print_operand): Handle 'D' and "d".
7256 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7257 Add handling of arithmetic/logical operations compared against zero.
7258 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7259 Do not look at v850_compare_op, instead get mode from last argument.
7260 (v850_gen_compare): Remove
7261 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7262 after reload for prologue insns.
7263 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7265 (construct_save_jarl): Likewise.
7266 (TARGET_FLAGS_REGNUM): Define.
7267 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7268 (NOTICE_UPDATE_CC): Remove.
7269 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7270 than cc0. Conditionalize on reload_completed.
7271 (cmpsi_insn, setfcc_insn): Likewise.
7272 (tst1 splitter): Turn into define_and_split which sets the flags
7274 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7275 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7276 (cstoresf4, cstoredf4): Clobber the flags.
7277 (cmpsi, cmpsf, cmpdf): Remove expanders.
7278 (setf_insn): Remove pattern.
7279 (addsi3): Turn into define_and_split which clobbers the flags after
7280 reload and a suitable pattern (addsi3_clobber_flags) for use after
7282 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7283 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7284 (ashrsi3, ashrsi3_v850e2): Likewise.
7285 (bins): Clobber the flags.
7286 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7287 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7288 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7289 (call_value_internal_short, call_value_internal_long): Likewise.
7290 (callt_save_interrupt, callt_return_interrupt): Likewise.
7291 (save_interrupt, return_interrupt): Likewise.
7292 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7293 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7294 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7295 (All FP comparisons): Only allow after reload has completed.
7297 (divh, divhu): Tweak output template.
7298 (branch_z_normal, branch_z_invert): Remove
7299 (branch_nz_normal, branch_nz_invert): Likewise.
7300 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7302 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7303 * config/v850/v850.c (notice_update_cc): Remove.
7304 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7305 (CC_NO_CARRY): Likewise.
7306 (NOTICE_UPDATE_CC): Define to nothing.
7307 * config/v850/v850.md: Remove block comment on cc0 handling
7308 Remove "cc" attribute from all patterns. Remove cc_status handling
7309 from all patterns. Minor formatting fixes.
7311 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7313 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7314 (cortex-a76.cortex-a55): Likewise.
7315 * config/aarch64/aarch64-tune.md: Regenerate.
7316 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7317 cortex-a76.cortex-a55.
7319 2018-06-27 Jeff Law <law@redhat.com>
7321 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7322 (MULTILIB_DIRNAMES): Similarly.
7324 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7326 * gimple.h (gimple_return_retbnd): Delete.
7327 (gimple_return_set_retbnd): Likewise.
7328 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7329 gimple_return_set_retbnd.
7330 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7331 gimple_return_retbnd and adjust.
7332 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7333 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7334 Explicitly return NULL in a couple more cases. Move assertion
7335 on debug statements and remove unreachable code.
7336 (reset_debug_binding): Do not test id->retbnd.
7337 (expand_call_inline): Do not set it.
7339 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7341 * configure.ac: Add --disable-gcov option.
7342 * configure: Regenerate.
7343 * Makefile.in: Honour @enable_gcov@.
7344 * doc/install.texi: Document --disable-gcov.
7346 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7348 * config/arm/arm-cpus.in (cortex-a76): New entry.
7349 (cortex-a76.cortex-a55): Likewise.
7350 * config/arm/arm-tables.opt: Regenerate.
7351 * config/arm/arm-tune.md: Likewise.
7352 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7353 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7354 cortex-a76.cortex-a55.
7356 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7359 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7361 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7363 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7365 (EPILOGUE_USES): Likewise.
7367 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7369 * tree-inline.c (remap_location): New function extracted from...
7370 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7371 (copy_phis_for_bb): ...here. Call remap_location.
7372 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7374 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7376 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7377 unaligned vsx for 16B memset.
7379 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7382 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7383 ieee128_float_type_node to long_double_type_node unless
7384 TARGET_LONG_DOUBLE_128 is set.
7386 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7388 * cfgloop.c (get_loop_location): Convert return type from
7389 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7390 by implicit construction from rtx_insn *, and using
7391 dump_user_location_t::from_function_decl for the fallback case.
7392 * cfgloop.h (get_loop_location): Convert return type from
7393 location_t to dump_user_location_t.
7394 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7395 dump_printf_loc to pass in a dump_location_t rather than a
7396 location_t, via the gimple stmt.
7397 * coverage.c (get_coverage_counts): Update calls to
7398 dump_printf_loc to pass in dump_location_t rather than a
7400 * doc/optinfo.texi (Dump types): Convert example of
7401 dump_printf_loc from taking "locus" to taking "insn". Update
7402 description of the "_loc" calls to cover dump_location_t.
7403 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7405 (dump_user_location_t::dump_user_location_t): New constructors,
7406 from gimple *stmt and rtx_insn *.
7407 (dump_user_location_t::from_function_decl): New function.
7408 (dump_loc): Make static.
7409 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7410 const dump_location_t &.
7411 (dump_generic_expr_loc): Delete.
7412 (dump_printf_loc): Convert param "loc" from location_t to
7413 const dump_location_t &.
7414 (selftest::test_impl_location): New function.
7415 (selftest::dumpfile_c_tests): New function.
7416 * dumpfile.h: Include "profile-count.h".
7417 (class dump_user_location_t): New class.
7418 (struct dump_impl_location_t): New struct.
7419 (class dump_location_t): New class.
7420 (dump_printf_loc): Convert 2nd param from source_location to
7421 const dump_location_t &.
7422 (dump_generic_expr_loc): Delete.
7423 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7424 const dump_location_t &.
7425 * gimple-fold.c (fold_gimple_assign): Update call to
7426 dump_printf_loc to pass in a dump_location_t rather than a
7427 location_t, via the gimple stmt.
7428 (gimple_fold_call): Likewise.
7429 * gimple-loop-interchange.cc
7430 (loop_cand::analyze_iloop_reduction_var): Update for change to
7431 check_reduction_path.
7432 (tree_loop_interchange::interchange): Update for change to
7434 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7435 change in return-type of find_loop_location.
7436 (graphite_regenerate_ast_isl): Likewise.
7437 * graphite-optimize-isl.c (optimize_isl): Likewise.
7438 * graphite.c (graphite_transform_loops): Likewise.
7439 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7440 pass in a dump_location_t rather than a location_t, via the
7442 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7443 * ipa.c (walk_polymorphic_call_targets): Likewise.
7444 * loop-unroll.c (report_unroll): Convert "locus" param from
7445 location_t to dump_location_t.
7446 (decide_unrolling): Update for change to get_loop_location's
7448 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7449 location_t to dump_user_location_t.
7450 (grid_find_single_omp_among_assignments_1): Updates calls to
7451 dump_printf_loc to pass in a dump_location_t rather than a
7452 location_t, via the gimple stmt.
7453 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7454 location_t to dump_location_t. Updates calls to dump_printf_loc
7455 to pass in a dump_location_t rather than a location_t, via the
7457 (grid_inner_loop_gridifiable_p): Likewise.
7458 (grid_dist_follows_simple_pattern): Likewise.
7459 (grid_gfor_follows_tiling_pattern): Likewise.
7460 (grid_target_follows_gridifiable_pattern): Likewise.
7461 (grid_attempt_target_gridification): Convert initialization
7462 of local "grid" from memset to zero-initialization; FIXME: does
7463 this require C++11? Update call to dump_printf_loc to pass in a
7464 optinfo_location rather than a location_t, via the gimple stmt.
7465 * profile.c (read_profile_edge_counts): Updates call to
7466 dump_printf_loc to pass in a dump_location_t rather than a
7468 (compute_branch_probabilities): Likewise.
7469 * selftest-run-tests.c (selftest::run_tests): Call
7471 * selftest.h (dumpfile_c_tests): New decl.
7472 * tree-loop-distribution.c (pass_loop_distribution::execute):
7473 Update for change in return type of find_loop_location.
7474 * tree-parloops.c (parallelize_loops): Likewise.
7475 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7476 "locus" from location_t to dump_user_location_t.
7477 (canonicalize_loop_induction_variables): Likewise.
7478 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7479 for change in return type of find_loop_location.
7480 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7481 to dump_printf_loc to pass in a dump_location_t rather than a
7482 location_t, via the stmt.
7483 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7485 * tree-vect-loop-manip.c (find_loop_location): Convert return
7486 type from source_location to dump_user_location_t.
7487 (vect_do_peeling): Update for above change.
7488 (vect_loop_versioning): Update for change in type of
7490 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7491 from location_t to dump_user_location_t.
7492 (vect_estimate_min_profitable_iters): Update for change in type
7494 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7495 location_t to dump_location_t.
7496 (vect_slp_bb): Update for change in type of vect_location.
7497 * tree-vectorizer.c (vect_location): Convert from source_location
7498 to dump_user_location_t.
7499 (try_vectorize_loop_1): Update for change in vect_location's type.
7500 (vectorize_loops): Likewise.
7501 (increase_alignment): Likewise.
7502 * tree-vectorizer.h (vect_location): Convert from source_location
7503 to dump_user_location_t.
7504 (find_loop_location): Convert return type from source_location to
7505 dump_user_location_t.
7506 (check_reduction_path): Convert 1st param from location_t to
7507 dump_user_location_t.
7508 * value-prof.c (check_counter): Update call to dump_printf_loc to
7509 pass in a dump_user_location_t rather than a location_t; update
7510 call to error_at for change in type of "locus".
7511 (check_ic_target): Update call to dump_printf_loc to
7512 pass in a dump_user_location_t rather than a location_t, via the
7515 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7517 * config/s390/s390.h (enum processor_flags): Do not use
7518 default tune parameter when -march was specified.
7520 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7523 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7524 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7527 2018-06-26 Richard Biener <rguenther@suse.de>
7529 PR tree-optimization/86287
7531 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7532 (vect_analyze_loop): Initialize n_stmts.
7534 2018-06-26 Richard Biener <rguenther@suse.de>
7537 * fold-const.c (fold_convertible_p): Pointer extension
7540 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7543 * dwarf2out.c (loc_list_has_views): Adjust comments.
7544 (dw_loc_list): Split single cross-partition range with
7547 2018-06-25 Jeff Law <law@redhat.com>
7549 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7550 on -mbig-switch by default.
7552 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7554 (const_float_0_operand): Remove unused predicate.
7555 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7556 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7557 (recipsf2): New expander. Original pattern now called
7559 (recipdf2, recipdf2_insn): Similarly.
7560 (rsqrtsf2, rsqrtsf2_insn): Similarly
7561 (rsqrtdf2, rsqrtdf2_insn): Similarly
7563 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7565 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7566 Simplify logic for FreeBSD (twice).
7568 2018-06-25 Martin Sebor <msebor@redhat.com>
7570 PR tree-optimization/86204
7571 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7572 a strnlen result if it's less than the length of the string.
7574 2018-06-25 Martin Sebor <msebor@redhat.com>
7576 PR tree-optimization/85700
7577 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7578 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7579 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7581 2018-06-25 Martin Sebor <msebor@redhat.com>
7583 * doc/extend.texi (Zero-length arrays): Update and clarify.
7585 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7587 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7588 added IEEE/IBM long double multilib support on PowerPC little
7589 endian Linux systems.
7590 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7591 (MULTILIB_DEFAULTS): Likewise.
7592 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7594 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7595 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7596 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7598 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7601 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7602 (REORDER_45): Likewise.
7604 2018-06-25 Jeff Law <law@redhat.com>
7606 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7607 dividend to 32 bits. Adjust length.
7608 (udivmodhi4): Cleanup output template. Fix length.
7610 2018-06-25 Carl Love <cel@us.ibm.com>
7612 * config/rs6000/vsx.md: Change word selector to prefered location.
7614 2018-06-25 Richard Biener <rguenther@suse.de>
7616 PR tree-optimization/86304
7617 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7618 epilogue-if-converted loops as well.
7620 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7622 * lto-section-out.c (lto_begin_section): Do not print section
7623 name for noaddr and unnumbered dumps.
7625 2018-06-25 Richard Biener <rguenther@suse.de>
7627 * tree-vectorizer.h (struct vec_info_shared): New structure
7628 with parts split out from struct vec_info and loop_nest from
7629 struct _loop_vec_info.
7630 (struct vec_info): Adjust accordingly.
7631 (struct _loop_vec_info): Likewise.
7632 (LOOP_VINFO_LOOP_NEST): Adjust.
7633 (LOOP_VINFO_DATAREFS): Likewise.
7634 (LOOP_VINFO_DDRS): Likewise.
7635 (struct _bb_vec_info): Likewise.
7636 (BB_VINFO_DATAREFS): Likewise.
7637 (BB_VINFO_DDRS): Likewise.
7638 (struct _stmt_vec_info): Add dr_aux member.
7639 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7640 (DR_MISALIGNMENT_UNINITIALIZED): New.
7641 (set_dr_misalignment): Adjust.
7642 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7643 (vect_analyze_loop): Adjust prototype.
7644 (vect_analyze_loop_form): Likewise.
7645 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7646 Compute dependences lazily.
7647 (vect_record_base_alignments): Use shared datarefs/ddrs.
7648 (vect_verify_datarefs_alignment): Likewise.
7649 (vect_analyze_data_refs_alignment): Likewise.
7650 (vect_analyze_data_ref_accesses): Likewise.
7651 (vect_analyze_data_refs): Likewise.
7652 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7653 constructor parameter for shared part.
7654 (vect_analyze_loop_form): Pass in shared part and adjust.
7655 (vect_analyze_loop_2): Pass in storage for the number of
7656 stmts. Move loop nest finding to the caller. Compute
7658 (vect_analyze_loop): Pass in shared part.
7659 (vect_transform_loop): Verify shared datarefs are unchanged.
7660 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7661 constructor parameter for shared part.
7662 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7663 (vect_slp_bb): Verify shared datarefs are unchanged before
7665 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7667 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7668 DR_MISALIGNMENT_UNINITIALIZED.
7669 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7670 parameter for shared part.
7671 (vec_info::~vec_info): Adjust.
7672 (vec_info_shared::vec_info_shared): New.
7673 (vec_info_shared::~vec_info_shared): Likewise.
7674 (vec_info_shared::save_datarefs): Likewise.
7675 (vec_info_shared::check_datarefs): Likewise.
7676 (try_vectorize_loop_1): Construct shared part live for analyses
7677 of a single loop for multiple vector sizes.
7678 * tree-parloops.c (gather_scalar_reductions): Adjust.
7680 2018-06-25 Richard Biener <rguenther@suse.de>
7682 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7683 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7684 (vect_analyze_data_refs): Remove similar code from here and
7685 simplify accordingly.
7687 2018-06-25 Richard Biener <rguenther@suse.de>
7689 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7690 for reverse storage order accesses rather than asserting
7691 they cannot happen here.
7693 2018-06-25 Tom de Vries <tdevries@suse.de>
7696 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7697 Use data16 instead of .byte for insn prefix.
7699 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7702 * parser.c (make_char_string_pack): Pass this literal chars
7703 through cpp_interpret_string.
7704 (cp_parser_userdef_numeric_literal): Check the result of
7705 make_char_string_pack.
7707 2018-06-24 Maya Rashish <coypu@sdf.org>
7709 * ginclude/stddef.h: Simplify conditions around avoiding
7710 re-definition of __size_t.
7712 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7714 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7715 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7717 2018-06-22 Maya Rashish <coypu@sdf.org>
7719 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7720 made to OpenBSD and NetBSD through the years.
7722 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7724 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7725 behavior of vec_pack (vector double, vector double) to match
7726 behavior of vec_float2 (vector double, vector double).
7728 2018-06-22 Olivier Hainque <hainque@adacore.com>
7730 * gimplify.c (gimplify_function_tree): Prevent creation
7731 of a trampoline for the address of the current function
7732 passed to entry/exit instrumentation hooks.
7734 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7737 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7740 2018-06-22 Martin Liska <mliska@suse.cz>
7742 PR tree-optimization/86263
7743 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7744 Bail out if is_enabled is false.
7745 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7747 (jump_table_cluster::is_enabled): New function.
7749 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7751 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7752 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7753 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7754 (lto_input_ts_binfo_tree_pointers): Likewise.
7755 * tree-streamer-out.c (streamer_write_tree_bitfields,
7756 write_ts_binfo_tree_pointers): Likewise.
7757 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7759 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7761 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7763 2018-06-22 Martin Liska <mliska@suse.cz>
7765 * symbol-summary.h (get): Make it pure and inline move
7766 functionality from ::get function.
7767 (get): Remove and inline into ::get and ::get_create.
7768 (get_create): Move code from ::get function.
7770 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7773 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7774 -x assembler-with-cpp.
7776 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7778 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7779 _FILE_OFFSET_BITS=64 for C++.
7781 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7783 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7784 conversion insn that shows up when pr85657-3.c is compiled using
7785 IEEE 128-bit long double.
7786 (neg<mode>2_internal): Use the correct mode to check whether the
7787 mode is IBM extended.
7788 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7789 multiply and divide external functions from being created more
7792 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7794 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7796 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7797 the edge can be forwarded.
7798 (cfg_layout_merge_blocks): Likewise.
7800 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7802 * except.c (finish_eh_generation): Commit edge insertions only after
7803 the EH edges have been redirected from post-landing to landing pads.
7805 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7807 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7808 create_tmp_var_for to create the FRAME decl.
7809 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7811 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7813 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7814 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7815 debug statement when resetting its value.
7816 (expand_call_inline): Copy the locus of the call onto the assignment
7817 of the return value, if any. Use local variable in more cases.
7819 2018-06-21 Martin Liska <mliska@suse.cz>
7821 * ipa-pure-const.c (propagate_nothrow): Use
7822 funct_state_summaries->get.
7823 (dump_malloc_lattice): Likewise.
7824 (propagate_malloc): Likewise.
7826 2018-06-21 Richard Biener <rguenther@suse.de>
7828 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7829 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7830 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7832 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7833 BLOCK_ABSTRACT_ORIGIN unconditionally.
7835 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7837 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7839 * ipa-reference.c (ipa_reference_c_finalize): Delete
7840 ipa_ref_opt_sum_summaries and set it to NULL.
7842 2018-06-21 Tom de Vries <tdevries@suse.de>
7844 PR tree-optimization/85859
7845 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7846 test with comment from bb_no_side_effects_p.
7848 2018-06-21 Richard Biener <rguenther@suse.de>
7850 PR tree-optimization/86232
7851 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7852 max for constant niter.
7854 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7856 * config/aarch64/aarch64-simd.md
7857 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7859 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7861 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7862 Make opernads of the unspec commutative.
7864 2018-06-21 Richard Biener <rguenther@suse.de>
7866 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7867 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7868 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7869 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7871 (vect_record_base_alignments): Do not record base alignment
7872 for gathers or scatters.
7873 (vect_compute_data_ref_alignment): Drop return value that is always
7874 true. Bail out early for gathers or scatters.
7875 (vect_enhance_data_refs_alignment): Bail out early for gathers
7877 (vect_find_same_alignment_drs): Likewise.
7878 (vect_analyze_data_refs_alignment): Remove dead code.
7879 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7880 (vect_analyze_data_refs): For possible gathers or scatters do
7881 not create an alternate DR, just check their possible validity
7882 and mark them. Adjust DECL_NONALIASED handling to not rely
7884 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7885 update inits of gathers or scatters.
7886 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7887 Also copy gather/scatter flag to pattern vinfo.
7889 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7891 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7892 behavior of vec_packsu (vector unsigned long long, vector unsigned
7893 long long) to match behavior of vec_packs with same signature.
7895 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7896 Thomas Schwinge <thomas@codesourcery.com>
7897 Cesar Philippidis <cesar@codesourcery.com>
7899 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7900 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7901 (gimplify_adjust_omp_clauses): Likewise.
7902 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7903 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7904 (gimplify_omp_target_update): Update handling of acc update and
7906 * omp-low.c (install_var_field): Remove unused parameter
7907 base_pointers_restrict.
7908 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7909 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7911 (omp_target_base_pointers_restrict_p): Delete.
7912 (scan_omp_target): Update call to scan_sharing_clauses.
7913 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7915 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7916 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7917 (convert_local_omp_clauses): Likewise.
7918 * tree-pretty-print.c (dump_omp_clause): Likewise.
7919 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7921 (omp_clause_code_name): Likewise.
7923 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7926 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7929 PR tree-optimization/86231
7930 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7931 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7933 2018-06-20 Tom de Vries <tdevries@suse.de>
7935 PR tree-optimization/86097
7936 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7937 iv type if signedness of iv type is not the same as that of *nit.
7939 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7941 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7942 EDGE_EH edges, verify they are all EDGE_EH.
7944 2018-06-20 Maya Rashish <coypu@sdf.org>
7946 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7948 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7950 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7951 * config/aarch64/aarch64.c (xgene1_tunings): Add
7952 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7953 (aarch64_mode_valid_for_sched_fusion_p):
7954 Allow 16-byte modes.
7955 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7956 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7958 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7960 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7961 * config/aarch64/iterators.md (VQ2): New mode iterator.
7963 2018-06-20 Martin Liska <mliska@suse.cz>
7965 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7966 Change default ratio from 10 to 8.
7968 2018-06-20 Martin Liska <mliska@suse.cz>
7970 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7972 (bit_test_cluster::find_bit_tests): Likewise.
7973 (switch_decision_tree::analyze_switch_statement): Find clusters.
7974 * tree-switch-conversion.h (struct jump_table_cluster): Document
7977 2018-06-20 Martin Liska <mliska@suse.cz>
7979 * tree-switch-conversion.c (switch_conversion::collect):
7980 Record m_uniq property.
7981 (switch_conversion::expand): Bail out for special conditions.
7982 (group_cluster::~group_cluster): New.
7983 (group_cluster::group_cluster): Likewise.
7984 (group_cluster::dump): Likewise.
7985 (jump_table_cluster::emit): New.
7986 (switch_decision_tree::fix_phi_operands_for_edges): New.
7987 (struct case_node): Remove struct.
7988 (jump_table_cluster::can_be_handled): New.
7989 (case_values_threshold): Moved to header.
7990 (reset_out_edges_aux): Likewise.
7991 (jump_table_cluster::is_beneficial): New.
7992 (bit_test_cluster::can_be_handled): Likewise.
7993 (add_case_node): Remove.
7994 (bit_test_cluster::is_beneficial): New.
7995 (case_bit_test::cmp): New.
7996 (bit_test_cluster::emit): New.
7997 (expand_switch_as_decision_tree_p): Remove.
7998 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7999 (fix_phi_operands_for_edge): Likewise.
8000 (switch_decision_tree::analyze_switch_statement): New.
8001 (compute_cases_per_edge): Move ...
8002 (switch_decision_tree::compute_cases_per_edge): ... here.
8003 (try_switch_expansion): Likewise.
8004 (switch_decision_tree::try_switch_expansion): Likewise.
8005 (record_phi_operand_mapping): Likewise.
8006 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8007 (emit_case_decision_tree): Likewise.
8008 (switch_decision_tree::emit): Likewise.
8009 (balance_case_nodes): Likewise.
8010 (switch_decision_tree::balance_case_nodes): Likewise.
8011 (dump_case_nodes): Likewise.
8012 (switch_decision_tree::dump_case_nodes): Likewise.
8013 (emit_jump): Likewise.
8014 (switch_decision_tree::emit_jump): Likewise.
8015 (emit_cmp_and_jump_insns): Likewise.
8016 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8017 (emit_case_nodes): Likewise.
8018 (switch_decision_tree::emit_case_nodes): Likewise.
8019 (conditional_probability): Remove.
8020 * tree-switch-conversion.h (enum cluster_type): New.
8022 (struct cluster): Likewise.
8023 (cluster::cluster): Likewise.
8024 (struct simple_cluster): Likewise.
8025 (simple_cluster::simple_cluster): Likewise.
8026 (struct group_cluster): Likewise.
8027 (struct jump_table_cluster): Likewise.
8028 (struct bit_test_cluster): Likewise.
8029 (struct min_cluster_item): Likewise.
8030 (struct case_tree_node): Likewise.
8031 (case_tree_node::case_tree_node): Likewise.
8032 (jump_table_cluster::case_values_threshold): Likewise.
8033 (struct case_bit_test): Likewise.
8034 (struct switch_decision_tree): Likewise.
8035 (struct switch_conversion): Likewise.
8036 (switch_decision_tree::reset_out_edges_aux): Likewise.
8038 2018-06-20 Martin Liska <mliska@suse.cz>
8040 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8041 (hoist_edge_and_branch_if_true): Likewise.
8042 (expand_switch_using_bit_tests_p): Likewise.
8043 (struct case_bit_test): Likewise.
8044 (case_bit_test_cmp): Likewise.
8045 (emit_case_bit_tests): Likewise.
8046 (switch_conversion::switch_conversion): New class.
8047 (struct switch_conv_info): Remove old struct.
8048 (collect_switch_conv_info): More to ...
8049 (switch_conversion::collect): ... this.
8050 (check_range): Likewise.
8051 (switch_conversion::check_range): Likewise.
8052 (check_all_empty_except_final): Likewise.
8053 (switch_conversion::check_all_empty_except_final): Likewise.
8054 (check_final_bb): Likewise.
8055 (switch_conversion::check_final_bb): Likewise.
8056 (create_temp_arrays): Likewise.
8057 (switch_conversion::create_temp_arrays): Likewise.
8058 (free_temp_arrays): Likewise.
8059 (gather_default_values): Likewise.
8060 (switch_conversion::gather_default_values): Likewise.
8061 (build_constructors): Likewise.
8062 (switch_conversion::build_constructors): Likewise.
8063 (constructor_contains_same_values_p): Likewise.
8064 (switch_conversion::contains_same_values_p): Likewise.
8065 (array_value_type): Likewise.
8066 (switch_conversion::array_value_type): Likewise.
8067 (build_one_array): Likewise.
8068 (switch_conversion::build_one_array): Likewise.
8069 (build_arrays): Likewise.
8070 (switch_conversion::build_arrays): Likewise.
8071 (gen_def_assigns): Likewise.
8072 (switch_conversion::gen_def_assigns): Likewise.
8073 (prune_bbs): Likewise.
8074 (switch_conversion::prune_bbs): Likewise.
8075 (fix_phi_nodes): Likewise.
8076 (switch_conversion::fix_phi_nodes): Likewise.
8077 (gen_inbound_check): Likewise.
8078 (switch_conversion::gen_inbound_check): Likewise.
8079 (process_switch): Use the newly created class.
8080 (switch_conversion::expand): New.
8081 (switch_conversion::~switch_conversion): New.
8082 * tree-switch-conversion.h: New file.
8084 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8086 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8087 tree-vect-patterns.c.
8088 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8089 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8090 (vect_recog_sad_pattern): Likewise.
8091 (vect_recog_widen_sum_pattern): Likewise.
8092 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8093 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8094 (vect_recog_rotate_pattern): Likewise.
8095 (vect_recog_mult_pattern): Likewise.
8096 (vect_recog_vector_vector_shift_pattern): Likewise.
8097 (vect_recog_divmod_pattern): Likewise.
8098 (vect_recog_mixed_size_cond_pattern): Likewise.
8099 (vect_recog_bool_pattern): Likewise.
8100 (vect_recog_mask_conversion_pattern): Likewise.
8101 (vect_try_gather_scatter_pattern): Likewise.
8102 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8103 (vect_recog_over_widening_pattern): Likewise.
8104 (vect_recog_gather_scatter_pattern): Likewise.
8105 (vect_recog_func_ptr): Move from tree-vectorizer.h
8106 (vect_vect_recog_func_ptrs): Move further down the file.
8107 (vect_recog_func): Likewise. Remove the third argument.
8108 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8109 (vect_pattern_recog_1): Expect the pattern function to do any
8110 necessary target tests. Also expect it to provide a vector type.
8111 Remove the type_in handling.
8113 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8115 * tree-vect-patterns.c (vect_pattern_detected): New function.
8116 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8117 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8118 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8119 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8120 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8121 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8122 (vect_recog_mask_conversion_pattern)
8123 (vect_try_gather_scatter_pattern): Likewise.
8125 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8127 * tree-vect-patterns.c (vect_get_internal_def): New function.
8128 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8129 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8130 (search_type_for_mask_1): Use it.
8132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8134 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8135 redundant WIDEN_SUM_EXPR handling.
8136 (vect_recog_sad_pattern): Likewise.
8138 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8140 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8141 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8142 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8143 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8144 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8146 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8148 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8149 use the stmt_vec_info of the original bb statement for the
8150 new zero assignment, even if the call is part of a pattern.
8152 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8154 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8155 that the sequence is attached to the original statement rather
8156 than the pattern statement.
8157 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8158 PATTERN_DEF_SEQ from the original statement rather than
8159 the main pattern statement.
8160 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8161 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8162 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8164 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8166 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8167 definition statements before the early exit for statements that aren't
8169 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8171 (vect_transform_loop): ...here. Process pattern definition
8172 statements without first checking whether the main pattern
8173 statement is live or relevant.
8175 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8177 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8178 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8180 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8182 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8183 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8184 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8185 (expand_block_compare): Change select_block_compare_mode call.
8186 (expand_strncmp_align_check): Use new functions, fix comment.
8187 (emit_final_str_compare_gpr): New function.
8188 (expand_strn_compare): Refactor and clean up code.
8189 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8191 2018-06-19 Tony Reix <tony.reix@atos.com>
8192 Damien Bergamini <damien.bergamini@atos.com>
8193 David Edelsohn <dje.gcc@gmail.com>
8195 * collect2.c (static_obj): New variable.
8196 (static_libs): New variable.
8197 (is_in_list): Uncomment declaration.
8198 (main): Track AIX libraries linked statically.
8199 (is_in_list): Uncomment definition.
8200 (scan_prog_file): Don't add AIX shared libraries initializer
8201 to constructor list if linking statically.
8203 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8205 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8207 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8209 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8211 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8214 2018-06-19 Martin Liska <mliska@suse.cz>
8216 * config/i386/i386.c (ix86_can_inline_p): Do not use
8217 ipa_fn_summaries::get_create.
8218 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8220 (devirtualization_time_bonus): Likewise.
8221 (ipcp_propagate_stage): Likewise.
8222 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8223 (edge_set_predicate): Likewise.
8224 (evaluate_conditions_for_known_args): Likewise.
8225 (evaluate_properties_for_edge): Likewise.
8226 (ipa_call_summary::reset): Tranform to ...
8227 (ipa_call_summary::~ipa_call_summary): ... this.
8228 (ipa_fn_summary::reset): Transform to ...
8229 (ipa_fn_summary::~ipa_fn_summary): ... this.
8230 (ipa_fn_summary_t::remove): Rename to ...
8231 (ipa_fn_summary_t::remove_callees): ... this.
8232 (ipa_fn_summary_t::duplicate): Use placement new
8233 instead of memory copy.
8234 (ipa_call_summary_t::duplicate): Likewise.
8235 (ipa_call_summary_t::remove): Remove.
8236 (dump_ipa_call_summary): Change get_create to get.
8237 (ipa_dump_fn_summary): Dump only when summary exists.
8238 (analyze_function_body): Use symbol_summary::get instead
8240 (compute_fn_summary): Likewise.
8241 (estimate_edge_devirt_benefit): Likewise.
8242 (estimate_edge_size_and_time): Likewise.
8243 (inline_update_callee_summaries): Likewise.
8244 (remap_edge_change_prob): Likewise.
8245 (remap_edge_summaries): Likewise.
8246 (ipa_merge_fn_summary_after_inlining): Likewise.
8247 (write_ipa_call_summary): Likewise.
8248 (ipa_fn_summary_write): Likewise.
8249 (ipa_free_fn_summary): Likewise.
8250 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8251 (struct ipa_call_summary): Likewise.
8252 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8254 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8255 (estimate_size_after_inlining): Likewise.
8256 (estimate_growth): Likewise.
8257 (growth_likely_positive): Likewise.
8258 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8259 (inline_call): Likewise.
8260 * ipa-inline.c (caller_growth_limits): Likewise.
8261 (can_inline_edge_p): Likewise.
8262 (can_inline_edge_by_limits_p): Likewise.
8263 (compute_uninlined_call_time): Likewise.
8264 (compute_inlined_call_time): Likewise.
8265 (want_inline_small_function_p): Likewise.
8266 (edge_badness): Likewise.
8267 (update_caller_keys): Likewise.
8268 (update_callee_keys): Likewise.
8269 (inline_small_functions): Likewise.
8270 (inline_to_all_callers_1): Likewise.
8271 (dump_overall_stats): Likewise.
8272 (early_inline_small_functions): Likewise.
8273 (early_inliner): Likewise.
8274 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8275 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8276 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8277 * ipa-split.c (execute_split_functions): Likewise.
8278 * symbol-summary.h: Likewise.
8279 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8281 2018-06-19 Richard Biener <rguenther@suse.de>
8283 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8284 (vectorize_loops): ... here. Fix dbgcnt handling.
8285 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8287 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8290 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8291 ieee128 argument takes up only one (vector) register, not two (floating
8294 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8296 * gimplify.c (gimplify_init_constructor): Really never clear for an
8297 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8299 2018-06-19 Richard Biener <rguenther@suse.de>
8301 PR tree-optimization/86179
8302 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8303 after failed recognition.
8305 2018-06-18 Martin Sebor <msebor@redhat.com>
8308 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8309 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8310 Handle integer subtraction.
8311 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8312 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8314 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8316 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8317 param from rtx to rtx_insn *.
8318 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8320 (frv_ifcvt_modify_insn): Likwise.
8321 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8322 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8323 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8324 as_a <rtx_insn *> cast to local "unprotected_region" once
8325 it's been established that it's not NULL or pc_rtx.
8326 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8327 param "sethi" from rtx to rtx_insn *.
8328 (nds32_group_float_insns): Likewise for param "insn".
8329 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8331 (vax_output_int_subtract): Likewise.
8332 * config/vax/vax.c (vax_output_int_add): Likewise for param
8334 (vax_output_int_subtract): Likewise.
8335 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8336 (emit_pattern_after): Likewise for param "after".
8337 (emit_insn_after): Likewise.
8338 (emit_jump_insn_after): Likewise.
8339 (emit_call_insn_after): Likewise.
8340 (emit_debug_insn_after): Likewise.
8341 (emit_pattern_before): Likewise for param "before".
8342 (emit_insn_before): Likewise.
8343 (emit_jump_insn_before): Likewise.
8344 * final.c (get_insn_template): Likewise for param "insn", removing
8346 * output.h (get_insn_template): Likewise for 2nd param.
8347 * rtl.h (emit_insn_before): Likewise.
8348 (emit_jump_insn_before): Likewise.
8349 (emit_debug_insn_before_noloc): Likewise.
8350 (emit_insn_after): Likewise.
8351 (emit_jump_insn_after): Likewise.
8352 (emit_call_insn_after): Likewise.
8353 (emit_debug_insn_after): Likewise.
8354 (set_insn_deleted): Likewise for param.
8356 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8359 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8360 floating point modes, so that IFmode is numerically greater than
8361 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8362 to declare the ordering. This prevents IFmode from being
8363 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8364 machine. Include rs6000-modes.h to share the fractional values
8365 between genmodes* and the rest of the compiler.
8369 * config/rs6000/rs6000-modes.h: New file.
8370 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8371 meaning of rs6000_long_double_size so that 126..128 selects an
8372 appropriate 128-bit floating point type.
8373 (rs6000_option_override_internal): Likewise.
8374 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8375 (TARGET_LONG_DOUBLE_128): Change the meaning of
8376 rs6000_long_double_size so that 126..128 selects an appropriate
8377 128-bit floating point type.
8378 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8379 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8380 source and destination to match the standard usage.
8381 (truncifkf2): Likewise.
8382 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8383 ISA 2.07 to use an explicit clobber, instead of passing in a
8385 (copysign<mode>3_soft): Likewise.
8387 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8389 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8390 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8391 (vect_slp_analyze_instance_dependence): Likewise.
8392 (vect_enhance_data_refs_alignment): Likewise.
8393 (vect_analyze_data_refs_alignment): Likewise.
8394 (vect_slp_analyze_and_verify_instance_alignment
8395 (vect_analyze_data_ref_accesses): Likewise.
8396 (vect_prune_runtime_alias_test_list): Likewise.
8397 (vect_analyze_data_refs): Likewise.
8398 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8399 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8400 (vect_analyze_scalar_cycles_1): Likewise.
8401 (vect_get_loop_niters): Likewise.
8402 (vect_analyze_loop_form_1): Likewise.
8403 (vect_update_vf_for_slp): Likewise.
8404 (vect_analyze_loop_operations): Likewise.
8405 (vect_analyze_loop): Likewise.
8406 (vectorizable_induction): Likewise.
8407 (vect_transform_loop): Likewise.
8408 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8409 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8410 (vect_make_slp_decision): Likewise.
8411 (vect_detect_hybrid_slp): Likewise.
8412 (vect_slp_analyze_operations): Likewise.
8413 (vect_slp_bb): Likewise.
8414 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8415 (vectorizable_bswap): Likewise.
8416 (vectorizable_call): Likewise.
8417 (vectorizable_simd_clone_call): Likewise.
8418 (vectorizable_conversion): Likewise.
8419 (vectorizable_assignment): Likewise.
8420 (vectorizable_shift): Likewise.
8421 (vectorizable_operation): Likewise.
8422 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8424 2018-06-18 Martin Sebor <msebor@redhat.com>
8426 PR tree-optimization/81384
8427 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8428 * builtins.c (expand_builtin_strnlen): New function.
8429 (expand_builtin): Call it.
8430 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8431 * builtins.def (BUILT_IN_STRNLEN): New.
8432 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8433 Warn for bounds in excess of maximum object size.
8434 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8435 single-value ranges. Handle strnlen.
8436 (handle_builtin_strlen): Handle strnlen.
8437 (strlen_check_and_optimize_stmt): Same.
8438 * doc/extend.texi (Other Builtins): Document strnlen.
8440 2018-06-18 Maya Rashish <coypu@sdf.org>
8442 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8443 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8444 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8446 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8448 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8450 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8452 * tree.c (escaped_string::escape): Replace cast to char * by
8453 const_cast<char *> (unescaped).
8455 2018-06-18 Nick Clifton <nickc@redhat.com>
8458 * tree.c (escaped_string): New class. Converts an unescaped
8459 string into its escaped equivalent.
8460 (warn_deprecated_use): Use the new class to convert the
8461 deprecation message, if present.
8462 (test_escaped_strings): New self test.
8463 (test_c_tests): Add test_escaped_strings.
8464 * doc/extend.texi (deprecated): Add a note that the
8465 deprecation message is affected by the -fmessage-length
8466 option, and that control characters will be escaped.
8467 (#pragma GCC error): Document this pragma.
8468 (#pragma GCC warning): Likewise.
8469 * doc/invoke.texi (-fmessage-length): Document this option's
8470 effect on the #warning and #error preprocessor directives and
8471 the deprecated attribute.
8473 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8475 * tree.c (decl_value_expr_lookup): Revert latest change.
8476 (decl_value_expr_insert): Likewise.
8478 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8480 * gimplify.c (nonlocal_vlas): Delete.
8481 (nonlocal_vla_vars): Likewise.
8482 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8484 (gimplify_body): Do not create and destroy nonlocal_vlas.
8485 * tree-nested.c: Include diagnostic.h.
8486 (use_pointer_in_frame): Tweak.
8487 (lookup_field_for_decl): Add assertion and declare the transformation.
8488 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8489 internal error when the reference is in a wrong context. Do not
8490 create a debug decl by default.
8491 (note_nonlocal_block_vlas): Delete.
8492 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8493 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8494 create a debug decl by default.
8495 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8496 call is in a wrong context.
8497 (fixup_vla_decls): New function.
8498 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8499 debug variables were created.
8500 * tree.c (decl_value_expr_lookup): Add checking assertion.
8501 (decl_value_expr_insert): Likewise.
8503 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8506 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8507 * tree-scalar-evolution.c (interpret_expr): Likewise.
8508 (expression_expensive_p): Likewise.
8509 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8510 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8511 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8512 (ssa_defined_by_minus_one_stmt_p): New.
8514 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8517 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8518 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8519 * dojump.c (do_jump): Likewise.
8520 * expr.c (expand_expr_real_2): Check operand type's sign.
8521 * fold-const.c (const_unop): Handle ABSU_EXPR.
8522 (fold_abs_const): Likewise.
8523 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8524 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8525 (strip_sign_op_1): Likesise.
8526 * match.pd: Add new pattern to generate ABSU_EXPR.
8527 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8528 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8529 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8530 * tree-inline.c (estimate_operator_cost): Likewise.
8531 * tree-pretty-print.c (dump_generic_node): Likewise.
8532 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8533 * tree.def (ABSU_EXPR): New.
8535 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8538 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8539 documented as preserved for backward compatibility only.
8540 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8542 PR rtl-optimization/86108
8543 * bb-reorder.c (create_forwarder_block): Renamed to ...
8544 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8545 jump from new landing pad to the second part.
8546 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8549 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8552 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8553 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8554 Only call store_expr for halves if the mode is the same.
8557 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8558 Fix up comment formatting.
8560 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8562 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8563 (typed_splay_tree::closure,
8564 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8565 (typed_splay_tree::typed_splay_tree,
8566 typed_splay_tree::operator =): Declared private.
8567 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8568 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8569 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8570 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8571 typed_splay_tree::splay_tree_splay,
8572 typed_splay_tree::splay_tree_foreach_helper,
8573 typed_splay_tree::splay_tree_insert,
8574 typed_splay_tree::splay_tree_remove,
8575 typed_splay_tree::splay_tree_lookup,
8576 typed_splay_tree::splay_tree_predecessor,
8577 typed_splay_tree::splay_tree_successor,
8578 typed_splay_tree::splay_tree_min,
8579 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8580 (typed_splay_tree::root, typed_splay_tree::comp,
8581 typed_splay_tree::delete_key,
8582 typed_splay_tree::delete_value): New data members.
8583 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8584 typed_splay_tree::remove.
8586 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8588 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8589 -mginv and -mno-ginv to the assembler.
8590 * config/mips/mips.opt (-mcrc): New option.
8592 * doc/invoke.text (-mcrc): Document.
8595 2018-06-15 Nick Clifton <nickc@redhat.com>
8598 * tree.c (escaped_string): New class. Converts an unescaped
8599 string into its escaped equivalent.
8600 (warn_deprecated_use): Use the new class to convert the
8601 deprecation message, if present.
8602 (test_escaped_strings): New self test.
8603 (test_c_tests): Add test_escaped_strings.
8604 * doc/extend.texi (deprecated): Add a note that the
8605 deprecation message is affected by the -fmessage-length
8606 option, and that control characters will be escaped.
8607 (#pragma GCC error): Document this pragma.
8608 (#pragma GCC warning): Likewise.
8609 * doc/invoke.texi (-fmessage-length): Document this option's
8610 effect on the #warning and #error preprocessor directives and
8611 the deprecated attribute.
8613 2018-06-15 Richard Biener <rguenther@suse.de>
8615 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8616 here, also noting vector size used.
8617 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8618 size used in MSG_OPTIMIZED_LOCATIONS dump.
8619 (pass_slp_vectorize::execute): Adjust.
8621 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8624 * config/arc/arc.c (arc_return_address_register): Fix
8627 2018-06-15 Richard Biener <rguenther@suse.de>
8630 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8631 leave useless conversion stripping to force_gimple_operand_gsi.
8632 (gimplify_build2): Likewise.
8633 (gimplify_build1): Likewise.
8635 2018-06-15 Richard Biener <rguenther@suse.de>
8638 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8639 before adjusting their block.
8641 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8643 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8644 multilibs for *-*-rtems*.
8645 * config/riscv/t-rtems: New file.
8647 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8650 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8651 unsigned_type_for returns NULL.
8654 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8655 subregs of multi-word pseudos unless the float mode has word size.
8657 2018-06-14 Richard Biener <rguenther@suse.de>
8660 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8661 duplicate and harmful type_hash_canon.
8662 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8664 2018-06-14 Richard Biener <rguenther@suse.de>
8667 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8670 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8672 * config/rtems.h (STDINT_LONG32): Define.
8674 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8675 Prachi Godbole <prachi.godbole@imgtec.com>
8677 * config/mips/mips-cpus.def: Define P6600.
8678 * config/mips/mips-tables.opt: Regenerate.
8679 * config/mips/mips.c (mips_ucbranch_type): New enum.
8680 (mips_rtx_cost_data): Add support for P6600.
8681 (mips_issue_rate): Likewise.
8682 (mips_multipass_dfa_lookahead): Likewise.
8683 (mips_avoid_hazard): Likewise.
8684 (mips_reorg_process_insns): Likewise.
8685 (mips_classify_branch_p6600): New function.
8686 * config/mips/mips.h (TUNE_P6600): New define.
8687 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8688 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8689 * config/mips/mips.md: Include p6600.md.
8690 (processor): Add p6600.
8691 * config/mips/p6600.md: New file.
8692 * doc/invoke.texi: Add p6600 to supported architectures.
8694 2018-06-13 Martin Sebor <msebor@redhat.com>
8696 PR tree-optimization/86114
8697 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8699 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8701 2018-06-13 Richard Biener <rguenther@suse.de>
8703 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8704 Properly set vector type of the intermediate stmt.
8705 * tree-vect-stmts.c (vectorizable_operation): The destination
8706 var always has vectype_out type.
8708 2018-06-13 Jeff Law <law@redhat.com>
8710 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8711 integer 0 for argument to print_rtl_with_bb.
8712 (rl78_reorg): Likewise.
8714 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8716 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8717 from rtx to rtx_insn *.
8718 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8720 (add_sched_insns_for_speculation): Likewise for local "target",
8721 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8722 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8723 from rtx_insn ** to rtx_code_label **.
8724 (reorg_emit_nops): Likewise.
8725 (c6x_reorg): Likewise for local "call_labels".
8726 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8728 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8729 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8730 the loops over LABEL_REFS.
8731 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8733 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8734 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8735 (split_branches): Strengthen local "olabel" from rtx to
8736 rtx_insn *, adding a safe_as_a cast.
8737 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8739 (add_insn_after): Likewise for first two params.
8740 (add_insn_before): Likewise.
8741 (remove_insn): Likewise for param.
8742 (emit_pattern_before_noloc): Likewise for second and third params.
8743 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8744 (emit_call_insn_before_noloc): Likewise.
8745 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8747 (emit_barrier_before): Likewise.
8748 (emit_label_before): Strengthen "label" param from "rtx" to
8749 "rtx_code_label *". Strengthen "before" param from "rtx" to
8751 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8753 (emit_pattern_after_noloc): Likewise.
8754 (emit_insn_after_noloc): Likewise.
8755 (emit_jump_insn_after_noloc): Likewise.
8756 (emit_call_insn_after_noloc): Likewise.
8757 (emit_debug_insn_after_noloc): Likewise.
8758 (emit_barrier_after): Likewise.
8759 (emit_label_after): Likewise for both params.
8760 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8761 "loc" param from "int" to "location_t".
8762 (emit_insn_after_setloc): Likewise.
8763 (emit_jump_insn_after_setloc): Likewise.
8764 (emit_call_insn_after_setloc): Likewise.
8765 (emit_debug_insn_after_setloc): Likewise.
8766 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8767 "loc" param from "int" to "location_t".
8768 (emit_pattern_before): Convert NULL_RTX to NULL.
8769 (emit_insn_before_setloc): Convert "loc" param from "int" to
8771 (emit_jump_insn_before_setloc): Likewise.
8772 (emit_call_insn_before_setloc): Likewise.
8773 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8774 rtx_insn *. Convert "loc" param from "int" to "location_t".
8775 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8776 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8777 Convert 3rd param from "int" to "location_t".
8778 (emit_barrier_before, emit_barrier_after, next_real_insn):
8779 Strengthen param from rtx to rtx_insn *.
8780 (emit_label_before): Strengthen 1st param from "rtx" to
8781 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8783 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8784 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8785 Strengthen 2nd param from "rtx" to "rtx_insn *".
8786 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8787 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8788 Likewise. Convert 3rd param from "int" to "location_t".
8789 (emit_label_after): Strengthen 1st param from "rtx" to
8791 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8793 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8794 from "rtx" to "rtx_insn *".
8796 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8798 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8799 bodies streamed in with -Q.
8800 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8801 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8802 * gimple-streamer-out.c: Include gimple-pretty-print.h
8803 (output_bb): Dump stmts streamed.
8804 * lto-section-out.c: Include print-tree.h
8805 (lto_begin_section): Dump sections created.
8806 (lto_output_decl_index): Dump decl encoded.
8807 * lto-streamer-out.c: Include print-tree.h
8808 (create_output_block): Dump output block created.
8809 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8810 (output_function): Dump function output.
8811 (output_constructor): Dump constructor streamed.
8812 (write_global_stream): Output indexes encoded.
8813 (produce_asm_for_decls): Dump streams encoded.
8814 * lto-streamer.c (streamer_dump_file): New global var.
8815 * lto-streamer.h (streamer_dump_file): Declare.
8816 * passes.c (ipa_write_summaries): Initialize streamer dump.
8817 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8820 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8823 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8824 offsets for register save directives. Emit a second batch of save
8825 directives, if need be, when the function accesses prior frames.
8827 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8829 * config/arc/fpu.md (fmasf4): Force operand to register.
8830 (fnmasf4): Likewise.
8832 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8834 * config/arc/arc-protos.h (arc_pad_return): Remove.
8835 * config/arc/arc.c (machine_function): Remove force_short_suffix
8837 (arc_print_operand): Adjust printing of '&'.
8838 (arc_verify_short): Remove conditional printing of short suffix.
8839 (arc_final_prescan_insn): Remove reference to size_reason.
8840 (pad_return): New function.
8841 (arc_reorg): Call pad_return.
8842 (arc_pad_return): Remove.
8843 (arc_init_machine_status): Remove reference to force_short_suffix.
8844 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8845 (attr length): When attribute iscompact is true force to 2
8846 regardless; in the case of maybe check if we want to force the
8847 instruction to have 4 bytes length.
8848 (nopv): Change it to generate 4 byte long nop as well.
8849 (blockage): New pattern.
8850 (simple_return): Remove call to arc_pad_return.
8851 (p_return_i): Likewise.
8853 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8855 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8857 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8859 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8862 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8864 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8865 for ARC700 and ARCv2.
8867 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8870 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8871 operands[2] instead of operands[1].
8874 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8876 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8877 case, check whether the outer register overlaps an unallocatable
8878 register, not just whether it fits the required class.
8880 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8882 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8884 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8885 (memrefs_conflict_p): Likewise.
8886 (init_alias_analysis): Likewise.
8887 * cfgexpand.c (expand_debug_expr): Likewise.
8888 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8889 * cse.c (fold_rtx): Likewise.
8890 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8891 * expr.c (emit_block_move_hints): Likewise.
8892 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8893 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8894 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8895 (emit_group_store): Likewise.
8896 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8897 to read the PRE/POST_MODIFY increment.
8898 * calls.c (store_one_arg): Use strip_offset.
8899 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8901 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8903 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8904 (simplify_binary_operation_1): Extend CONST_INT handling to
8906 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8907 than a HOST_WIDE_INT.
8908 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8910 (adjust_mems, add_stores): Update accodingly.
8911 (vt_canonicalize_addr): Track polynomial offsets.
8912 (emit_note_insn_var_location): Likewise.
8913 (vt_add_function_parameter): Likewise.
8914 (vt_initialize): Likewise.
8916 2018-06-12 Jeff Law <law@redhat.com>
8918 * config.gcc (alpha*-*-freebsd*): Remove.
8919 * config/alpha/freebsd.h: Remove.
8921 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8924 * spellcheck-tree.c (levenshtein_distance): Rename to...
8925 (get_edit_distance): ...this, and update for underlying renaming.
8926 * spellcheck-tree.h (levenshtein_distance): Rename to...
8927 (get_edit_distance): ...this.
8928 * spellcheck.c (levenshtein_distance): Rename to...
8929 (get_edit_distance): ...this. Convert from Levenshtein distance
8930 to Damerau-Levenshtein distance by supporting transpositions of
8931 adjacent characters. Rename "v1" to "v_next" and "v0" to
8933 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8934 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8935 update for underlying renaming.
8936 (selftest::levenshtein_distance_unit_test): Rename to...
8937 (selftest::test_get_edit_distance_unit): ...this, and update for
8938 underlying renaming.
8939 (selftest::test_find_closest_string): Add example from PR 69968
8940 where transposition helps
8941 (selftest::test_metric_conditions): Update for renaming.
8942 (selftest::test_metric_conditions): Likewise.
8943 (selftest::spellcheck_c_tests): Likewise.
8944 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8945 (get_edit_distance): ...this.
8946 (best_match::consider): Update for renaming.
8948 2018-06-12 Martin Sebor <msebor@redhat.com>
8950 PR tree-optimization/85259
8951 * builtins.c (compute_objsize): Handle constant offsets.
8952 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8953 true iff a warning has been issued.
8954 * gimple.h (gimple_nonartificial_location): New function.
8955 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8956 gimple_nonartificial_location and handle -Wno-system-headers.
8957 (handle_builtin_stxncpy): Same.
8959 2018-06-12 Martin Sebor <msebor@redhat.com>
8962 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8964 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8966 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8967 BUILTIN_VEC_XST entries for pointer to double and long long.
8969 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8972 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8974 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8977 2018-06-12 Martin Liska <mliska@suse.cz>
8979 * doc/options.texi: Document IntegerRange.
8981 2018-06-12 Martin Liska <mliska@suse.cz>
8983 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8984 * opt-functions.awk: Handle Deprecated flag.
8985 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8987 (read_cmdline_option): Report warning for a deprecated option.
8988 * opts.h (struct cl_option): Add new field cl_deprecated.
8989 (CL_ERR_DEPRECATED): New.
8991 2018-06-12 Martin Liska <mliska@suse.cz>
8993 * doc/options.texi: Document Deprecated option flag.
8995 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8997 * config/arc/arc-arch.h (arc_extras): New enum.
8998 (arc_cpu_t):Add field extra.
8999 (arc_cpu_types): Consider the extras.
9000 * config/arc/arc-cpus.def: Add extras info.
9001 * config/arc/arc-opts.h (processor_type): Consider extra field.
9002 * config/arc/arc.c (arc_override_options): Handle extra field.
9004 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9006 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9007 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9009 * config/arc/arc.c (arc_init): Update pic warning.
9010 (irq_range): Update irq range parsing warnings.
9011 (arc_override_options): Update various warning messages.
9012 (arc_handle_aux_attribute): Likewise.
9014 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9016 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9018 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9020 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9021 compiler messages directives.
9023 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9025 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9026 * config/mips/mips-tables.opt: Regenerate.
9027 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9029 * doc/invoke.texi: Document -march=i6500.
9031 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9033 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9034 (i6400_gpmul): Add cpu_unit.
9035 (i6400_gpdiv): Likewise.
9036 (i6400_msa_add_d): Update reservations.
9037 (i6400_msa_int_add) Likewise.
9038 (i6400_msa_short_logic3) Likewise.
9039 (i6400_msa_short_logic2) Likewise.
9040 (i6400_msa_short_logic) Likewise.
9041 (i6400_msa_move) Likewise.
9042 (i6400_msa_cmp) Likewise.
9043 (i6400_msa_short_float2) Likewise.
9044 (i6400_msa_div_d) Likewise.
9045 (i6400_msa_long_logic1) Likewise.
9046 (i6400_msa_long_logic2) Likewise.
9047 (i6400_msa_mult) Likewise.
9048 (i6400_msa_long_float2) Likewise.
9049 (i6400_msa_long_float4) Likewise.
9050 (i6400_msa_long_float5) Likewise.
9051 (i6400_msa_long_float8) Likewise.
9052 (i6400_fpu_fadd): Include frint type.
9053 (i6400_fpu_store): New define_insn_reservation.
9054 (i6400_fpu_load): Likewise.
9055 (i6400_fpu_move): Likewise.
9056 (i6400_fpu_fcmp): Likewise.
9057 (i6400_fpu_fmadd): Likewise.
9058 (i6400_int_mult): Include imul3nc type and update reservation.
9059 (i6400_int_div): Include idiv3 type and update reservation.
9060 (i6400_int_load): Update to check type not move_type.
9061 (i6400_int_store): Likewise.
9062 (i6400_int_prefetch): Set zero latency.
9064 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9066 * gcc.c: Document new %@{...} sequence.
9067 (LINK_COMMAND_SPEC): Use it for the -L switches.
9068 (cpp_unique_options): Use it for the -I switches.
9069 (at_file_argbuf): New global variable.
9070 (in_at_file): Likewise.
9071 (alloc_args): Create at_file_argbuf.
9072 (clear_args): Truncate at_file_argbuf.
9073 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9074 (open_at_file): New function.
9075 (close_at_file): Likewise.
9076 (create_at_file): Delete.
9077 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9080 (validate_switches_from_spec): Deal with %@{...} sequence.
9081 (validate_switches): Likewise.
9082 (driver::finalize): Call clear_args.
9084 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9086 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9088 2018-06-11 Martin Sebor <msebor@redhat.com>
9090 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9091 (Wno-class-memaccess): Add @opindex.
9092 (Wno-templates, Wno-multiple-inheritance): Same.
9093 (Wno-virtual-inheritance, Wno-namespaces): Same.
9094 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9095 (Wno-format-overflow, Wno-format-truncation): Same.
9096 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9097 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9098 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9099 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9100 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9101 (Wno-misspelled-isr): Same.
9103 2018-06-11 Martin Sebor <msebor@redhat.com>
9105 * PR tree-optimization/86083
9106 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9108 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9110 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9112 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9115 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9116 on the correct operand.
9117 (*movdi_internal64): Ditto.
9119 2018-06-11 Martin Liska <mliska@suse.cz>
9121 PR tree-optimization/86089
9122 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9124 2018-06-11 Julia Koval <julia.koval@intel.com>
9126 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9127 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9128 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9130 2018-06-11 Olivier Hainque <hainque@adacore.com>
9132 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9133 for Ada with strict dwarf2.
9135 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9138 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9141 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9143 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9145 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9147 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9150 2018-06-08 Martin Liska <mliska@suse.cz>
9152 * tree-cfg.h (debug_function): Fix argument type to match
9155 2018-06-08 Martin Liska <mliska@suse.cz>
9157 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9158 Remove usage of MPX-related (and removed) fields.
9159 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9161 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9163 * cfg.c (debug): Use TDF_NONE rather than 0.
9164 * cfghooks.c (debug): Likewise.
9165 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9166 (struct dump_option_value_info): Convert to...
9167 (struct kv_pair): ...this template type.
9168 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9170 (optinfo_verbosity_options): Likewise.
9171 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9173 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9174 than int for "optgroup_flags" param.
9175 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9177 (dump_dec): Likewise.
9178 (dump_finish): Use TDF_NONE rather than 0.
9179 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9180 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9181 than 0. Update for change to option_ptr.
9182 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9183 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9184 0. Update for changes to optinfo_verbosity_options and
9186 (opt_info_switch_p): Convert optgroup_flags from int to
9188 (dump_basic_block): Use dump_flags_t rather than int
9189 for "dump_kind" param.
9190 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9191 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9192 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9193 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9194 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9195 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9196 TDF_NONE): Convert from macros to...
9197 (enum dump_flag): ...this new enum.
9198 (dump_flags_t): Update to use enum.
9199 (operator|, operator&, operator~, operator|=, operator&=):
9200 Implement for dump_flags_t.
9201 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9202 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9203 Convert from macros to...
9204 (enum optgroup_flag): ...this new enum.
9205 (optgroup_flags_t): New typedef.
9206 (operator|, operator|=): Implement for optgroup_flags_t.
9207 (struct dump_file_info): Convert field "alt_flags" to
9208 dump_flags_t. Convert field "optgroup_flags" to
9210 (dump_basic_block): Use dump_flags_t rather than int for param.
9211 (dump_generic_expr_loc): Likewise.
9212 (dump_dec): Likewise.
9213 (dump_register): Convert param "optgroup_flags" to
9215 (opt_info_enable_passes): Likewise.
9216 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9218 * gimple-pretty-print.c (debug): Likewise.
9219 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9220 (merged_store_group::apply_stores): Likewise.
9221 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9222 * gimple.c (verify_gimple_pp): Likewise.
9223 * graphite-poly.c (print_pbb_body): Likewise.
9224 * passes.c (pass_manager::register_one_dump_file): Convert
9225 local "optgroup_flags" to optgroup_flags_t.
9226 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9228 (debug_body): Likewise.
9229 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9230 to optgroup_flags_t.
9231 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9233 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9234 (convert_mult_to_fma): Likewise.
9235 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9236 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9237 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9238 "dump_kind" to dump_flags_t.
9240 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9242 * config/rs6000/rs6000.c (min, max): Delete.
9244 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9246 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9247 -mabi=spe and -mabi=no-spe.
9249 2018-06-08 Martin Liska <mliska@suse.cz>
9251 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9252 where we expect an existing summary.
9254 2018-06-08 Martin Liska <mliska@suse.cz>
9256 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9257 * ipa-inline.h (estimate_edge_growth): Likewise.
9259 2018-06-08 Martin Liska <mliska@suse.cz>
9261 * cgraph.c (function_version_hasher::hash): Use
9262 cgraph_node::get_uid ().
9263 (function_version_hasher::equal):
9264 * cgraph.h (cgraph_node::get_uid): New method.
9265 * ipa-inline.c (update_caller_keys): Use
9266 cgraph_node::get_uid ().
9267 (update_callee_keys): Likewise.
9268 * ipa-utils.c (searchc): Likewise.
9269 (ipa_reduced_postorder): Likewise.
9270 * lto-cgraph.c (input_node): Likewise.
9271 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9272 * symbol-summary.h (symtab_insertion): Likewise.
9273 (symtab_removal): Likewise.
9274 (symtab_duplication): Likewise.
9275 * tree-pretty-print.c (dump_function_header): Likewise.
9276 * tree-sra.c (convert_callers_for_node): Likewise.
9278 2018-06-08 Martin Liska <mliska@suse.cz>
9280 * cgraph.c (symbol_table::create_edge): Always assign a new
9282 (symbol_table::free_edge): Do not recycle numbers.
9283 * cgraph.h (cgraph_edge::get): New method.
9284 * symbol-summary.h (symtab_removal): Use it.
9285 (symtab_duplication): Likewise.
9286 (call_summary::hashable_uid): Remove.
9288 2018-06-08 Martin Liska <mliska@suse.cz>
9290 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9291 (initialize_growth_caches): Remove.
9292 (free_growth_caches): Likewise.
9293 (do_estimate_edge_time): Use edge_growth_cache.
9294 (do_estimate_edge_size): Likewise.
9295 (do_estimate_edge_hints): Likewise.
9296 * ipa-inline.c (reset_edge_caches): Likewise.
9297 (recursive_inlining): Likewise.
9298 (inline_small_functions): Likewise.
9299 * ipa-inline.h (initialize_growth_caches): Remove.
9300 (estimate_edge_size): Likewise.
9301 (estimate_edge_time): Likewise.
9302 (estimate_edge_hints): Likewise.
9303 (reset_edge_growth_cache): Likewise.
9304 * symbol-summary.h (call_summary::remove): New method.
9306 2018-06-08 Martin Liska <mliska@suse.cz>
9308 * ipa-cp.c (class edge_clone_summary): New summary.
9309 (grow_edge_clone_vectors): Remove.
9310 (ipcp_edge_duplication_hook): Remove.
9311 (class edge_clone_summary_t): New call_summary class.
9312 (ipcp_edge_removal_hook): Remove.
9313 (edge_clone_summary_t::duplicate): New function.
9314 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9315 (create_specialized_node): Likewise.
9316 (ipcp_driver): Initialize edge_clone_summaries and do not
9319 2018-06-08 Martin Liska <mliska@suse.cz>
9321 * symbol-summary.h (get): New function.
9322 (call_summary::m_initialize_when_cloning): New class member.
9324 2018-06-08 Martin Liska <mliska@suse.cz>
9326 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9327 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9328 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9329 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9330 (remove_cgraph_node_from_order): Use the removed_nodes set.
9331 (do_per_function_toporder): Likwise.
9332 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9333 instead of summary_uid.
9334 (symtab_removal): Likewise.
9335 (symtab_duplication): Likewise.
9337 2018-06-08 Martin Liska <mliska@suse.cz>
9339 * ipa-cp.c (ipcp_store_bits_results): Use
9340 ipcp_transformation_sum.
9341 (ipcp_store_vr_results): Likewise.
9342 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9344 (ipcp_transformation_initialize): ... this.
9345 (ipa_set_node_agg_value_chain):
9346 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9347 (write_ipcp_transformation_info): Likewise.
9348 (read_ipcp_transformation_info): Likewise.
9349 (ipcp_update_bits): Likewise.
9350 (ipcp_update_vr): Likewise.
9351 (ipcp_transform_function): Likewise.
9352 * ipa-prop.h: Rename ipcp_transformation_summary to
9353 ipcp_transformation.
9354 (class ipcp_transformation_t): New function summary.
9355 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9356 (ipa_get_agg_replacements_for_node): Likewise.
9358 2018-06-08 Martin Liska <mliska@suse.cz>
9360 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9362 (class funct_state_summary_t): New function_summary class.
9363 (has_function_state): Remove.
9364 (get_function_state): Likewise.
9365 (set_function_state): Likewise.
9366 (add_new_function): Likewise.
9367 (funct_state_summary_t::insert): New function.
9368 (duplicate_node_data): Remove.
9369 (remove_node_data): Remove.
9370 (funct_state_summary_t::duplicate): New function.
9371 (register_hooks): Create new funct_state_summaries.
9372 (pure_const_generate_summary): Use it.
9373 (pure_const_write_summary): Likewise.
9374 (pure_const_read_summary): Likewise.
9375 (propagate_pure_const): Likewise.
9376 (propagate_nothrow): Likewise.
9377 (dump_malloc_lattice): Likewise.
9378 (propagate_malloc): Likewise.
9379 (execute): Do not register hooks, just remove summary
9381 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9384 2018-06-08 Martin Liska <mliska@suse.cz>
9386 * ipa-reference.c (remove_node_data): Remove.
9387 (duplicate_node_data): Likewise.
9388 (class ipa_ref_var_info_summary_t): New class.
9389 (class ipa_ref_opt_summary_t): Likewise.
9390 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9391 (get_reference_optimization_summary): Use
9392 ipa_ref_opt_sum_summaries.
9393 (set_reference_vars_info): Remove.
9394 (set_reference_optimization_summary): Likewise.
9395 (ipa_init): Create summaries.
9396 (init_function_info): Use function summary.
9397 (ipa_ref_opt_summary_t::duplicate): New function.
9398 (ipa_ref_opt_summary_t::remove): New function.
9399 (get_read_write_all_from_node): Fix GNU coding style.
9400 (propagate): Use function summary.
9401 (write_node_summary_p): Fix GNU coding style.
9402 (stream_out_bitmap): Likewise.
9403 (ipa_reference_read_optimization_summary): Use function summary.
9404 (ipa_reference_c_finalize): Do not release hooks.
9406 2018-06-08 Martin Liska <mliska@suse.cz>
9408 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9409 (analyze_function_body): Extract multiple calls of get_create.
9410 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9411 * ipa-inline.c (recursive_inlining): Use ::get method.
9412 * ipa-inline.h (estimate_edge_growth): Likewise.
9414 2018-06-08 Martin Liska <mliska@suse.cz>
9416 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9418 (hsa_function_summary::hsa_function_summary): Use the new enum
9420 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9421 * hsa-gen.c (hsa_get_host_function): Likewise.
9422 (get_brig_function_name): Likewise.
9423 * ipa-hsa.c (process_hsa_functions): Likewise.
9424 (ipa_hsa_write_summary): Likewise.
9425 * symbol-summary.h (symtab_duplication): Use ::get function/
9426 (get): New function.
9428 2018-06-08 Martin Liska <mliska@suse.cz>
9430 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9432 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9433 (hsa_register_kernel): Likewise.
9434 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9435 * hsa-gen.c (hsa_get_host_function): Likewise.
9436 (get_brig_function_name): Likewise.
9437 (generate_hsa): Likewise.
9438 (pass_gen_hsail::execute): Likewise.
9439 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9440 (devirtualization_time_bonus): Likewise.
9441 (ipcp_propagate_stage): Likewise.
9442 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9443 (edge_set_predicate): Likewise.
9444 (evaluate_conditions_for_known_args): Likewise.
9445 (evaluate_properties_for_edge): Likewise.
9446 (ipa_fn_summary::reset): Likewise.
9447 (ipa_fn_summary_t::duplicate): Likewise.
9448 (dump_ipa_call_summary): Likewise.
9449 (ipa_dump_fn_summary): Likewise.
9450 (analyze_function_body): Likewise.
9451 (compute_fn_summary): Likewise.
9452 (estimate_edge_devirt_benefit): Likewise.
9453 (estimate_edge_size_and_time): Likewise.
9454 (estimate_calls_size_and_time): Likewise.
9455 (estimate_node_size_and_time): Likewise.
9456 (inline_update_callee_summaries): Likewise.
9457 (remap_edge_change_prob): Likewise.
9458 (remap_edge_summaries): Likewise.
9459 (ipa_merge_fn_summary_after_inlining): Likewise.
9460 (ipa_update_overall_fn_summary): Likewise.
9461 (read_ipa_call_summary): Likewise.
9462 (inline_read_section): Likewise.
9463 (write_ipa_call_summary): Likewise.
9464 (ipa_fn_summary_write): Likewise.
9465 (ipa_free_fn_summary): Likewise.
9466 * ipa-hsa.c (process_hsa_functions): Likewise.
9467 (ipa_hsa_write_summary): Likewise.
9468 (ipa_hsa_read_section): Likewise.
9469 * ipa-icf.c (sem_function::merge): Likewise.
9470 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9471 (do_estimate_edge_time): Likewise.
9472 (estimate_size_after_inlining): Likewise.
9473 (estimate_growth): Likewise.
9474 (growth_likely_positive): Likewise.
9475 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9476 (inline_call): Likewise.
9477 * ipa-inline.c (caller_growth_limits): Likewise.
9478 (can_inline_edge_p): Likewise.
9479 (can_inline_edge_by_limits_p): Likewise.
9480 (compute_uninlined_call_time): Likewise.
9481 (compute_inlined_call_time): Likewise.
9482 (want_inline_small_function_p): Likewise.
9483 (edge_badness): Likewise.
9484 (update_caller_keys): Likewise.
9485 (update_callee_keys): Likewise.
9486 (recursive_inlining): Likewise.
9487 (inline_small_functions): Likewise.
9488 (inline_to_all_callers_1): Likewise.
9489 (dump_overall_stats): Likewise.
9490 (early_inline_small_functions): Likewise.
9491 (early_inliner): Likewise.
9492 * ipa-inline.h (estimate_edge_growth): Likewise.
9493 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9494 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9495 * ipa-prop.h (IPA_NODE_REF): Likewise.
9496 (IPA_EDGE_REF): Likewise.
9497 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9498 (propagate_malloc): Likewise.
9499 * ipa-split.c (execute_split_functions): Likewise.
9500 * symbol-summary.h: Rename get to get_create.
9502 (get_create): Likewise.
9503 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9505 2018-06-08 Martin Liska <mliska@suse.cz>
9507 * symbol-summary.h (release): Move definition out of class
9509 (symtab_removal): Likewise.
9510 (symtab_duplication): Likewise.
9512 2018-06-08 Martin Liska <mliska@suse.cz>
9514 * symbol-summary.h (function_summary): Move constructor
9515 implementation out of class declaration.
9516 (release): Likewise.
9517 (symtab_insertion): Likewise.
9518 (symtab_removal): Likewise.
9519 (symtab_duplication): Likewise.
9522 2018-06-08 Martin Liska <mliska@suse.cz>
9524 * Makefile.in: Remove support for MPX (macros, related functions,
9525 fields in cgraph_node, ...).
9526 * builtin-types.def (BT_BND): Likewise.
9527 (BT_FN_BND_CONST_PTR): Likewise.
9528 (BT_FN_CONST_PTR_BND): Likewise.
9529 (BT_FN_VOID_PTR_BND): Likewise.
9530 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9531 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9532 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9533 (expand_builtin_mempcpy_with_bounds): Likewise.
9534 (expand_builtin_memset_with_bounds): Likewise.
9535 (expand_builtin_memset_args): Likewise.
9536 (std_expand_builtin_va_start): Likewise.
9537 (expand_builtin): Likewise.
9538 (expand_builtin_with_bounds): Likewise.
9539 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9540 (DEF_LIB_BUILTIN_CHKP): Likewise.
9541 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9542 (DEF_CHKP_BUILTIN): Likewise.
9543 (BUILT_IN_MEMCPY): Likewise.
9544 (BUILT_IN_MEMMOVE): Likewise.
9545 (BUILT_IN_MEMPCPY): Likewise.
9546 (BUILT_IN_MEMSET): Likewise.
9547 (BUILT_IN_STPCPY): Likewise.
9548 (BUILT_IN_STRCAT): Likewise.
9549 (BUILT_IN_STRCHR): Likewise.
9550 (BUILT_IN_STRCPY): Likewise.
9551 (BUILT_IN_STRLEN): Likewise.
9552 (BUILT_IN_MEMCPY_CHK): Likewise.
9553 (BUILT_IN_MEMMOVE_CHK): Likewise.
9554 (BUILT_IN_MEMPCPY_CHK): Likewise.
9555 (BUILT_IN_MEMSET_CHK): Likewise.
9556 (BUILT_IN_STPCPY_CHK): Likewise.
9557 (BUILT_IN_STRCAT_CHK): Likewise.
9558 (BUILT_IN_STRCPY_CHK): Likewise.
9559 * calls.c (store_bounds): Likewise.
9560 (emit_call_1): Likewise.
9561 (special_function_p): Likewise.
9562 (maybe_warn_nonstring_arg): Likewise.
9563 (initialize_argument_information): Likewise.
9564 (finalize_must_preallocate): Likewise.
9565 (compute_argument_addresses): Likewise.
9566 (expand_call): Likewise.
9567 * cfgexpand.c (expand_call_stmt): Likewise.
9568 (expand_return): Likewise.
9569 (expand_gimple_stmt_1): Likewise.
9570 (pass_expand::execute): Likewise.
9571 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9572 (cgraph_node::remove): Likewise.
9573 (cgraph_node::dump): Likewise.
9574 (cgraph_node::verify_node): Likewise.
9575 * cgraph.h (chkp_function_instrumented_p): Likewise.
9576 (symtab_node::get_alias_target): Likewise.
9577 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9578 (cgraph_local_p): Likewise.
9579 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9580 (cgraph_edge::rebuild_references): Likewise.
9581 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9582 (walk_polymorphic_call_targets): Likewise.
9583 (cgraph_node::expand_thunk): Likewise.
9584 (symbol_table::output_weakrefs): Likewise.
9585 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9586 (ix86_handle_option): Likewise.
9587 * config/i386/constraints.md: Likewise.
9588 * config/i386/i386-builtin-types.def (BND): Likewise.
9592 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9593 (BDESC_FIRST): Likewise.
9595 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9596 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9597 * config/i386/i386.c (enum reg_class): Likewise.
9598 (ix86_target_string): Likewise.
9599 (ix86_option_override_internal): Likewise.
9600 (ix86_conditional_register_usage): Likewise.
9601 (ix86_valid_target_attribute_inner_p): Likewise.
9602 (ix86_set_indirect_branch_type): Likewise.
9603 (ix86_set_current_function): Likewise.
9604 (ix86_function_arg_regno_p): Likewise.
9605 (init_cumulative_args): Likewise.
9606 (ix86_function_arg_advance): Likewise.
9607 (ix86_function_arg): Likewise.
9608 (ix86_pass_by_reference): Likewise.
9609 (ix86_function_value_regno_p): Likewise.
9610 (ix86_function_value_1): Likewise.
9611 (ix86_function_value_bounds): Likewise.
9612 (ix86_return_in_memory): Likewise.
9613 (ix86_setup_incoming_vararg_bounds): Likewise.
9614 (ix86_va_start): Likewise.
9615 (indirect_thunk_need_prefix): Likewise.
9616 (print_reg): Likewise.
9617 (ix86_print_operand): Likewise.
9618 (ix86_expand_call): Likewise.
9619 (ix86_output_function_return): Likewise.
9620 (reg_encoded_number): Likewise.
9621 (BDESC_VERIFYS): Likewise.
9622 (ix86_init_mpx_builtins): Likewise.
9623 (ix86_init_builtins): Likewise.
9624 (ix86_emit_cmove): Likewise.
9625 (ix86_emit_move_max): Likewise.
9626 (ix86_expand_builtin): Likewise.
9627 (ix86_builtin_mpx_function): Likewise.
9628 (ix86_get_arg_address_for_bt): Likewise.
9629 (ix86_load_bounds): Likewise.
9630 (ix86_store_bounds): Likewise.
9631 (ix86_load_returned_bounds): Likewise.
9632 (ix86_store_returned_bounds): Likewise.
9633 (ix86_class_likely_spilled_p): Likewise.
9634 (ix86_hard_regno_mode_ok): Likewise.
9635 (x86_order_regs_for_local_alloc): Likewise.
9636 (ix86_mitigate_rop): Likewise.
9637 (ix86_bnd_prefixed_insn_p): Likewise.
9638 (ix86_mpx_bound_mode): Likewise.
9639 (ix86_make_bounds_constant): Likewise.
9640 (ix86_initialize_bounds): Likewise.
9641 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9642 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9643 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9644 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9645 (TARGET_CHKP_BOUND_MODE): Likewise.
9646 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9647 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9648 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9649 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9650 * config/i386/i386.h (TARGET_MPX): Likewise.
9651 (TARGET_MPX_P): Likewise.
9652 (VALID_BND_REG_MODE): Likewise.
9653 (FIRST_BND_REG): Likewise.
9654 (LAST_BND_REG): Likewise.
9655 (enum reg_class): Likewise.
9656 (BND_REG_P): Likewise.
9657 (BND_REGNO_P): Likewise.
9658 (BNDmode): Likewise.
9659 (ADJUST_INSN_LENGTH): Likewise.
9660 * config/i386/i386.md: Likewise.
9661 * config/i386/i386.opt: Likewise.
9662 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9663 (defined): Likewise.
9664 (LINK_MPX): Likewise.
9665 (MPX_SPEC): Likewise.
9666 (LIBMPX_SPEC): Likewise.
9667 (LIBMPXWRAPPERS_SPEC): Likewise.
9668 (CHKP_SPEC): Likewise.
9669 * config/i386/predicates.md: Likewise.
9670 * dbxout.c (dbxout_type): Likewise.
9671 * doc/extend.texi: Likewise.
9672 * doc/invoke.texi: Likewise.
9673 * doc/md.texi: Likewise.
9674 * doc/tm.texi: Likewise.
9675 * doc/tm.texi.in: Likewise.
9676 * dwarf2out.c (is_base_type): Likewise.
9677 (gen_formal_types_die): Likewise.
9678 (gen_subprogram_die): Likewise.
9679 (gen_type_die_with_usage): Likewise.
9680 (gen_decl_die): Likewise.
9681 (dwarf2out_late_global_decl): Likewise.
9682 * expr.c (expand_assignment): Likewise.
9683 (emit_storent_insn): Likewise.
9684 (store_expr_with_bounds): Likewise.
9685 (store_expr): Likewise.
9686 (expand_expr_real_1): Likewise.
9687 * expr.h (store_expr_with_bounds): Likewise.
9688 * function.c (use_register_for_decl): Likewise.
9689 (struct bounds_parm_data): Likewise.
9690 (assign_parms_augmented_arg_list): Likewise.
9691 (assign_parm_find_entry_rtl): Likewise.
9692 (assign_parm_is_stack_parm): Likewise.
9693 (assign_parm_load_bounds): Likewise.
9694 (assign_bounds): Likewise.
9695 (assign_parms): Likewise.
9696 (expand_function_start): Likewise.
9697 * gcc.c (CHKP_SPEC): Likewise.
9698 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9699 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9700 (wrestrict_dom_walker::check_call): Likewise.
9701 * gimple.c (gimple_build_call_from_tree): Likewise.
9702 * gimple.h (enum gf_mask): Likewise.
9703 (gimple_call_with_bounds_p): Likewise.
9704 (gimple_call_set_with_bounds): Likewise.
9705 * gimplify.c (gimplify_init_constructor): Likewise.
9706 * ipa-cp.c (initialize_node_lattices): Likewise.
9707 (propagate_constants_across_call): Likewise.
9708 (find_more_scalar_values_for_callers_subset): Likewise.
9709 * ipa-hsa.c (process_hsa_functions): Likewise.
9710 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9711 * ipa-icf.c (sem_function::merge): Likewise.
9712 * ipa-inline.c (early_inliner): Likewise.
9713 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9714 (warn_function_cold): Likewise.
9715 (propagate_pure_const): Likewise.
9716 * ipa-ref.h (enum GTY): Likewise.
9717 * ipa-split.c (find_retbnd): Likewise.
9718 (consider_split): Likewise.
9719 (split_function): Likewise.
9720 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9721 * ipa.c (walk_polymorphic_call_targets): Likewise.
9722 (symbol_table::remove_unreachable_nodes): Likewise.
9723 (process_references): Likewise.
9724 (cgraph_build_static_cdtor_1): Likewise.
9725 * lto-cgraph.c (lto_output_node): Likewise.
9726 (output_refs): Likewise.
9727 (compute_ltrans_boundary): Likewise.
9728 (input_overwrite_node): Likewise.
9729 (input_node): Likewise.
9730 (input_cgraph_1): Likewise.
9731 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9732 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9733 (class pass_chkp_instrumentation_passes): Likewise.
9734 (make_pass_chkp_instrumentation_passes): Likewise.
9735 * passes.def: Likewise.
9736 * rtl.h (struct GTY): Likewise.
9737 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9738 * stor-layout.c (layout_type): Likewise.
9739 * symtab.c: Likewise.
9740 * target.def: Likewise.
9741 * targhooks.c (default_chkp_bound_type): Likewise.
9742 (default_chkp_bound_mode): Likewise.
9743 (default_builtin_chkp_function): Likewise.
9744 (default_chkp_function_value_bounds): Likewise.
9745 (default_chkp_make_bounds_constant): Likewise.
9746 (default_chkp_initialize_bounds): Likewise.
9747 * targhooks.h (default_chkp_bound_type): Likewise.
9748 (default_chkp_bound_mode): Likewise.
9749 (default_builtin_chkp_function): Likewise.
9750 (default_chkp_function_value_bounds): Likewise.
9751 (default_chkp_make_bounds_constant): Likewise.
9752 (default_chkp_initialize_bounds): Likewise.
9753 * toplev.c (compile_file): Likewise.
9754 (process_options): Likewise.
9755 * tree-core.h (DEF_BUILTIN): Likewise.
9756 (DEF_BUILTIN_CHKP): Likewise.
9757 * tree-inline.c (declare_return_variable): Likewise.
9758 (remap_gimple_stmt): Likewise.
9759 (copy_bb): Likewise.
9760 (initialize_inlined_parameters): Likewise.
9761 (expand_call_inline): Likewise.
9762 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9763 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9764 (make_pass_ipa_chkp_produce_thunks): Likewise.
9765 (make_pass_chkp): Likewise.
9766 (make_pass_chkp_opt): Likewise.
9767 (make_pass_chkp_instrumentation_passes): Likewise.
9768 * tree-pretty-print.c (dump_generic_node): Likewise.
9769 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9770 * tree-ssa-dce.c (propagate_necessity): Likewise.
9771 (eliminate_unnecessary_stmts): Likewise.
9772 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9773 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9774 * tree-ssa-sccvn.h: Likewise.
9775 * tree-ssa-strlen.c (get_string_length): Likewise.
9776 (valid_builtin_call): Likewise.
9777 (adjust_last_stmt): Likewise.
9778 (handle_builtin_strchr): Likewise.
9779 (handle_builtin_strcpy): Likewise.
9780 (handle_builtin_stxncpy): Likewise.
9781 (handle_builtin_memcpy): Likewise.
9782 (handle_builtin_strcat): Likewise.
9783 (strlen_check_and_optimize_stmt): Likewise.
9784 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9785 * tree-streamer-in.c: Likewise.
9786 * tree-streamer.c (record_common_node): Likewise.
9787 * tree.c (tree_code_size): Likewise.
9788 (wide_int_to_tree_1): Likewise.
9789 (type_contains_placeholder_1): Likewise.
9790 (build_common_tree_nodes): Likewise.
9791 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9792 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9793 (POINTER_BOUNDS_P): Likewise.
9794 (BOUNDED_TYPE_P): Likewise.
9795 (BOUNDED_P): Likewise.
9796 (CALL_WITH_BOUNDS_P): Likewise.
9797 (pointer_bounds_type_node): Likewise.
9798 * value-prof.c (gimple_ic): Likewise.
9799 * var-tracking.c (vt_add_function_parameters): Likewise.
9800 * varasm.c (make_decl_rtl): Likewise.
9801 (assemble_start_function): Likewise.
9802 (output_constant): Likewise.
9803 (maybe_assemble_visibility): Likewise.
9804 * varpool.c (ctor_for_folding): Likewise.
9805 * chkp-builtins.def: Remove.
9806 * ipa-chkp.c: Remove.
9807 * ipa-chkp.h: Remove.
9808 * rtl-chkp.c: Remove.
9809 * rtl-chkp.h: Remove.
9810 * tree-chkp-opt.c: Remove.
9811 * tree-chkp.c: Remove.
9812 * tree-chkp.h: Remove.
9814 2018-06-07 Carl Love <cel@us.ibm.com>
9816 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9817 vextract_fp_from_shortl): Add BE support.
9819 2018-06-07 Paul Koning <ni1d@arrl.net>
9821 * compare-elim.c (try_merge_compare): Don't merge compare if
9822 address contains a side effect.
9823 (try_eliminate_compare): Likewise.
9825 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9827 * config.gcc: Support "tremont".
9828 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9829 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9831 * config/i386/i386.c (m_TREMONT): Define.
9832 (processor_target_table): Add "tremont".
9833 (PTA_TREMONT): Define.
9834 (ix86_lea_outperforms): Add TARGET_TREMONT.
9835 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9836 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9837 and M_INTEL_GOLDMONT_PLUS.
9838 (fold_builtin_cpu): Add "tremont".
9839 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9840 (ix86_option_override_internal): Add "tremont".
9841 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9842 (processor_type): Add PROCESSOR_TREMONT.
9843 * config/i386/x86-tune.def: Add m_TREMONT.
9844 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9846 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9848 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9849 symbol defined for msp430i* devices to be lower case.
9851 2018-06-07 Richard Biener <rguenther@suse.de>
9853 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9854 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9855 Properly wrap signed arithmetic if overflow wraps.
9857 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9859 PR tree-optimization/69615
9860 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9861 of a cast from a same precision integral SSA_NAME in a bb dominated
9862 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9863 cast to utype if rhs2 has already a compatible type.
9865 2018-06-07 Richard Biener <rguenther@suse.de>
9867 PR tree-optimization/85935
9868 * graphite-scop-detection.c (find_params_in_bb): Analyze
9869 condition operands with respect to the correct loop. Assert
9870 the analysis doesn't fail.
9872 2018-06-04 Carl Love <cel@us.ibm.com>
9874 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9875 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9876 as it is slightly cheaper.
9877 (first_match_or_eos_index_<mode>):
9878 Calculate index using natural element order.
9879 (first_match_index_<mode>):
9880 Calculate index using natural element order.
9881 (first_match_or_eos_index_<mode>):
9882 Calculate index using natural order.
9883 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9884 for BE and LE modes.
9885 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9886 P9V_BUILTIN_VCLZLSBB_V16QI.
9887 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9890 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9892 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9893 indentation and line wrap for many prototypes. Add missing
9894 @smallexample directives around block of prototypes for vec_xl and
9897 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9899 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9900 track if we pass or return IEEE 128-bit floating point.
9901 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9902 C++ mangling that is compatible with GCC 8.1.
9903 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9904 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9905 floating point types.
9906 (rs6000_function_arg_advance_1): Likewise.
9907 (rs6000_mangle_type): Optionally generate mangled names that match
9908 what GCC 8.1 generated for IEEE 128-bit floating point types.
9909 (rs6000_globalize_decl_name): If we have an external function that
9910 passes or returns IEEE 128-bit types, generate a weak reference
9911 from the mangled name used in GCC 8.1 to the current mangled
9913 (rs6000_init_builtins): Make __ibm128 use the long double type if
9914 long double is IBM extended double. Make __float128 use the long
9915 double type if long double is IEEE 128-bit.
9918 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9919 macro for __ibm128 built-in functions.
9920 (PACK_IF): Add __ibm128 pack/unpack functions.
9921 (UNPACK_IF): Likewise.
9922 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9923 enable long double built-in functions if long double is IEEE
9924 128-bit floating point.
9925 (rs6000_invalid_builtin): Update long double built-in function
9927 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9928 functions, adjust the built-in function to use the long double
9929 built-in function if __ibm128 and long double are the same type.
9930 * doc/extend.texi (PowerPC builtins): Update documention for
9931 __builtin_{,un}pack_longdouble. Add documentation for
9932 __builtin_{,un}pack_ibm128.
9934 2018-06-06 Jim Wilson <jimw@sifive.com>
9936 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9937 (struct machine_function): New field interrupt_mode.
9938 (riscv_handle_type_attribute): New function. Add forward declaration.
9939 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9940 (riscv_expand_epilogue): Check interrupt_mode field.
9941 (riscv_set_current_function): Check interrupt attribute args and
9942 set interrupt_mode field.
9943 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9944 (riscv_sret, riscv_uret): New.
9945 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9946 new arguments to interrupt attribute.
9948 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9951 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9952 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9954 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9956 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9957 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9958 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9959 several redundant entries.
9961 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9963 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9964 type from "rtx" to "rtx_insn *".
9965 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9966 for local "call_insn", removing cast.
9967 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9969 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9971 PR tree-optimization/86066
9972 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9973 for BIT_INSERT_EXPR stores.
9975 2018-06-06 Richard Biener <rguenther@suse.de>
9977 PR tree-optimization/86062
9978 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9979 component refs ontop
9980 of to be offsetted base.
9982 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9984 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9985 to be static and remove check on interrupt attribute name.
9987 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9989 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9990 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9992 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9995 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9997 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9998 Remove second argument, change how error is called.
9999 (aarch64_layout_arg): Remove second argument from
10000 aarch64_err_no_fpadvsimd call.
10001 (aarch64_init_cumulative_args): Ditto.
10002 (aarch64_gimplify_va_arg_expr): Ditto.
10003 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10005 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10007 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10008 (*simple_return_indirect_internal<mode>): Rename from
10009 simple_return_indirect_internal. Use W mode iterator.
10010 (rstorssp): New expander.
10011 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10012 (clrssbsy): New expander.
10013 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10015 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10017 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10019 (cmse_check_pointed_object): Likewise.
10021 2018-06-05 Martin Liska <mliska@suse.cz>
10023 PR gcov-profile/47618
10024 * doc/invoke.texi: Document how -fprofile-dir format
10027 2018-06-05 Richard Biener <rguenther@suse.de>
10029 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10030 removal pretend DOM info isn't available so we do not update
10031 it and only remove edges, not dominated blocks. Actually free
10032 DOM info in case we removed something. Remove unreachable blocks.
10033 (mfb_keep_latches): Work with either DOM info or marked backedges.
10034 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10035 first. Mark backedges if DOM info isn't available.
10036 (Re-)compute DOM info after cleanup_control_flow_pre.
10038 2018-06-05 Richard Biener <rguenther@suse.de>
10040 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10041 (locus_discrim_hasher::hash): Adjust.
10042 (locus_discrim_hasher::equal): Likewise.
10043 (next_discriminator_for_locus): Work on line directly.
10044 (same_line_p): Pass in expanded locus1 as well.
10045 (assign_discriminators): Avoid redundant location expansions.
10047 2018-06-05 Richard Biener <rguenther@suse.de>
10049 PR tree-optimization/86046
10050 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10051 if required after clearing TREE_ADDRESSABLE.
10053 2018-06-05 Richard Biener <rguenther@suse.de>
10055 PR tree-optimization/86047
10056 * tree-ssa-loop.c (for_each_index): Glob handling of all
10057 decls and constants and really handle all of them.
10059 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10062 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10063 qualifier_void_pointer and qualifier_const_void_pointer.
10064 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10065 (arm_init_builtins): Handle the above.
10066 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10067 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10068 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10071 2018-06-05 Martin Liska <mliska@suse.cz>
10073 * auto-profile.c (read_autofdo_file): Do not use
10074 gcov_ctr_summary struct.
10075 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10076 * coverage.c (struct counts_entry): Likewise.
10077 (read_counts_file): Read just single summary entry.
10078 (get_coverage_counts): Use gcov_summary struct.
10079 * coverage.h (get_coverage_counts): Likewise.
10080 * gcov-dump.c (dump_working_sets): Likewise.
10081 (tag_summary): Dump just single summary.
10082 * gcov-io.c (gcov_write_summary): Write just histogram
10084 (gcov_read_summary): Read just single summary.
10085 (compute_working_sets): Use gcov_summary struct.
10086 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10087 of GCOV_COUNTERS_SUMMABLE.
10088 (GCOV_COUNTERS_SUMMABLE): Remove.
10089 (GCOV_FIRST_VALUE_COUNTER): Replace with
10090 GCOV_COUNTER_V_INTERVAL.
10091 (struct gcov_ctr_summary): Remove.
10092 (struct gcov_summary): Directly use fields of former
10094 (compute_working_sets): Use gcov_summary struct.
10095 * gcov.c (read_count_file): Do not use ctrs fields.
10096 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10098 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10100 * profile.c: Likewise.
10101 * profile.h: Likewise.
10103 2018-06-05 Martin Liska <mliska@suse.cz>
10105 PR gcov-profile/84846
10106 * gcov.c (output_lines): Print working directory only
10107 in intermediate format.
10109 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10111 * config/s390/s390-builtin-types.def: Add void function type.
10112 * config/s390/s390-builtins.def: Use the function type for the
10115 2018-06-04 Jim Wilson <jimw@sifive.com>
10117 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10119 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10120 and maybe_eh_return. Change regno to unsigned int. Use new args to
10121 handle EH_RETURN_DATA_REGNO registers properly.
10122 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10123 (riscv_expand_epilogue): Update comment. Change argument name and
10124 type. Update code to use new name and type. Pass new args to
10125 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10127 * config/riscv/riscv.md (NORMAL_RETURN): New.
10128 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10129 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10130 (eh_return): Call gen_eh_return_internal and emit barrier.
10131 (eh_return_internal): Call riscv_expand_epilogue.
10133 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10135 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10136 bit_insertion field and declare can_be_merged_into method.
10137 (merged_store_group::can_be_merged_into): New method.
10138 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10139 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10140 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10142 2018-06-04 Richard Biener <rguenther@suse.de>
10144 PR tree-optimization/85955
10145 * builtins.c (fold_builtin_sincos): Convert pointers to
10146 destination to appropriate type before dereferencing.
10148 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10150 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10152 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10154 * expr.c (expand_expr_real_1): Force the operand into memory if
10155 its TYPE_MODE is BLKmode and if there is no integer mode for
10156 the number of bits being extracted.
10158 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10162 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10163 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10165 2018-06-04 Richard Biener <rguenther@suse.de>
10167 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10168 (cleanup_tree_cfg_noloop): ... single caller. Do
10169 start_recording_case_labels later.
10171 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10173 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10174 to _IMMINTRIN_H_INCLUDED.
10175 * config/i386/pconfigintrin.h: Ditto.
10176 * config/i386/waitpkgintrin.h: Ditto.
10177 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10178 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10179 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10180 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10181 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10182 waitpkgintrin.h and cldemoteintrin.h.
10184 2018-06-04 Richard Biener <rguenther@suse.de>
10186 PR tree-optimization/86038
10187 * tracer.c (find_best_successor): Check probability for
10188 being initialized, bail out if not.
10190 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10193 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10194 of bits to ignore when comparing architectures.
10196 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10198 PR tree-optimization/69615
10199 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10200 maximum or minimum of the type, try to merge it also as if
10201 range1 is + [-, x - 1] or + [x + 1, -].
10204 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10206 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10208 PR tree-optimization/86034
10209 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10210 the unsigned bitfield type in a bit insertion sequence if it does not
10211 have a larger precision than the bitfield size.
10212 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10214 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10216 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10218 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10220 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10221 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10222 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10223 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10225 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10227 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10228 Disable -fdelete-null-pointer-checks for ELF toolchain.
10230 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10231 Kito Cheng <kito.cheng@gmail.com>
10233 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10234 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10235 (nds32*-*-*): Add glibc and uclibc conditions.
10236 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10237 (TARGET_EXCEPT_UNWIND_INFO): Define.
10238 * config/nds32/elf.h: New file.
10239 * config/nds32/linux.h: New file.
10240 * config/nds32/nds32-elf.opt: New file.
10241 * config/nds32/nds32-linux.opt: New file.
10242 * config/nds32/nds32-fp-as-gp.c
10243 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10244 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10246 (nds32_asm_file_end): Ditto.
10247 (nds32_print_operand): Ditto.
10248 (nds32_insert_attributes): Ditto.
10249 (nds32_init_libfuncs): New function.
10250 (TARGET_HAVE_TLS): Define.
10251 (TARGET_INIT_LIBFUNCS): Define.
10252 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10254 (TARGET_ELF): Apply different mcmodel setting.
10255 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10256 been migrated into elf.h and linux.h files.
10257 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10258 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10259 (mcmodel): The content has been migrated into nds32-elf.opt and
10260 nds32-linux.opt files.
10261 * config/nds32/t-elf: New file.
10262 * config/nds32/t-linux: New file.
10264 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10265 Shiva Chen <shiva0217@gmail.com>
10267 * config/nds32/constants.md (unspec_volatile_element): Add
10268 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10269 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10271 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10272 (make_pass_nds32_fp_as_gp): Declare.
10273 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10275 (nds32_asm_function_end_prologue): Remove unused asm output.
10276 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10277 (nds32_asm_file_start): Output necessary fp_as_gp information.
10278 (nds32_option_override): Adjust register usage.
10279 (nds32_expand_prologue): Consider fp_as_gp situation.
10280 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10281 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10284 (simple_return): Ditto.
10285 (omit_fp_begin): Output special directive for fp_as_gp.
10286 (omit_fp_end): Output special directive for fp_as_gp.
10287 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10288 mforbid-fp-as-gp): New options.
10290 2018-06-01 Mark Wielaard <mark@klomp.org>
10292 * dwarf2out.c (dwarf2out_finish): Remove generation of
10293 DW_AT_loclists_base.
10295 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10297 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10298 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10299 (struct merged_store_group): Add bit_insertion field.
10300 (dump_char_array): Use standard hexadecimal format.
10301 (merged_store_group::merged_store_group): Set bit_insertion to false.
10302 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10303 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10304 also print the mask in the dump file.
10305 (pass_store_merging::gate): Minor tweak.
10306 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10307 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10308 stores with INTEGER_CST stores.
10309 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10310 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10311 and use it throughout. Generate bit insertion sequences if need be.
10312 (pass_store_merging::process_store): Remove redundant condition.
10313 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10315 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10317 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10318 the 128-bit floating point types. Fix function comment.
10320 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10322 * config/aarch64/aarch64-simd.md
10323 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10325 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10328 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10330 PR tree-optimization/85989
10331 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10333 (backprop::intersect_uses): Check it when deciding whether this
10334 is a backedge reference.
10335 (backprop::process_block): Add each phi to m_visited_phis
10336 after visiting it, then clear it at the end.
10338 2018-06-01 Richard Biener <rguenther@suse.de>
10340 * tree-vectorizer.h (vect_dr_stmt): New function.
10341 (vect_get_load_cost): Adjust.
10342 (vect_get_store_cost): Likewise.
10343 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10344 Use vect_dr_stmt instead of DR_SMTT.
10345 (vect_record_base_alignments): Likewise.
10346 (vect_calculate_target_alignment): Likewise.
10347 (vect_compute_data_ref_alignment): Likewise and make static.
10348 (vect_update_misalignment_for_peel): Likewise.
10349 (vect_verify_datarefs_alignment): Likewise.
10350 (vector_alignment_reachable_p): Likewise.
10351 (vect_get_data_access_cost): Likewise. Pass down
10352 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10353 (vect_get_peeling_costs_all_drs): Likewise.
10354 (vect_peeling_hash_get_lowest_cost): Likewise.
10355 (vect_enhance_data_refs_alignment): Likewise.
10356 (vect_find_same_alignment_drs): Likewise.
10357 (vect_analyze_data_refs_alignment): Likewise.
10358 (vect_analyze_group_access_1): Likewise.
10359 (vect_analyze_group_access): Likewise.
10360 (vect_analyze_data_ref_access): Likewise.
10361 (vect_analyze_data_ref_accesses): Likewise.
10362 (vect_vfa_segment_size): Likewise.
10363 (vect_small_gap_p): Likewise.
10364 (vectorizable_with_step_bound_p): Likewise.
10365 (vect_prune_runtime_alias_test_list): Likewise.
10366 (vect_analyze_data_refs): Likewise.
10367 (vect_supportable_dr_alignment): Likewise.
10368 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10369 (vect_gen_prolog_loop_niters): Likewise.
10370 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10371 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10373 (vect_recog_mask_conversion_pattern): Likewise.
10374 (vect_try_gather_scatter_pattern): Likewise.
10375 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10376 to vect_get_store_cost.
10377 (vect_get_store_cost): Get stmt_info instead of DR.
10378 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10379 (vect_get_load_cost): Get stmt_info instead of DR.
10381 2018-06-01 Richard Biener <rguenther@suse.de>
10383 PR middle-end/86017
10384 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10385 vars wrapped in MEM_REFs.
10387 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10389 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10390 Fix subreg tests so that we only return a choice between
10391 GENERAL_REGS and FP_REGS if the original classes included both.
10393 2018-06-01 Richard Biener <rguenther@suse.de>
10396 * tree-ssa-structalias.c (get_function_part_constraint):
10397 Handle NULL fi->decl.
10398 (find_func_aliases_for_call): Properly handle indirect
10399 fi from direct call.
10400 (find_func_clobbers): Likewise.
10401 (ipa_pta_execute): Likewise.
10402 (create_variable_info_for): For functions that are ifunc_resolver
10403 resolve to a varinfo that contains the result of the resolver call.
10404 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10407 2018-05-31 Michael Collison <michael.collison@arm.com>
10409 * config/aarch64/aarch64.md:
10410 (*fix_to_zero_extenddfdi2): New pattern.
10411 * gcc.target/aarch64/fix_extend1.c: New testcase.
10413 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10415 PR middle-end/78809
10416 PR middle-end/83026
10417 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10418 and BUILT_IN_STRNCMP_EQ.
10419 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10420 BUILT_IN_STRNCMP_EQ.
10421 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10422 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10423 (gimple_fold_builtin): Likewise.
10424 * tree-ssa-strlen.c (compute_string_length): New function.
10425 (determine_min_obsize): New function.
10426 (handle_builtin_string_cmp): New function to handle calls to
10427 string compare functions.
10428 (strlen_optimize_stmt): Add handling to builtin string compare
10430 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10431 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10432 * tree.c (build_common_builtin_nodes): Add new defines of
10433 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10435 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10438 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10439 functions with naked attribute.
10441 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10443 * config/i386/sse.md (avx_vec_concat<mode>):
10444 Substitute concat_tg_mode mode attribute with xtg_mode.
10445 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10446 (concat_tg_mode): Remove mode attribute.
10448 2018-05-31 Martin Sebor <msebor@redhat.com>
10451 * calls.c (alloc_max_size): Correct a logic error/typo.
10452 Treat excessive arguments as infinite. Warn for invalid arguments.
10453 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10455 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10458 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10459 and movx for Haswell.
10461 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10462 Cesar Philippidis <cesar@codesourcery.com>
10464 PR middle-end/85879
10465 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10466 when emitting error on private/firstprivate reductions.
10467 * omp-low.c (lower_omp_target): Avoid reference-type processing
10468 on pointers for firstprivate clause.
10470 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10472 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10475 * config/aarch64/aarch64-simd.md
10476 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10477 (aarch64_ld1_x3_<mode>): Likewise
10478 (aarch64_st1x2<VALLDIF:mode>): Likewise
10479 (aarch64_st1_x2_<mode>): Likewise
10480 (aarch64_st1x3<VALLDIF:mode>): Likewise
10481 (aarch64_st1_x3_<mode>): Likewise
10482 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10483 (vld1_s8_x3): Likewise.
10484 (vld1_u16_x3): Likewise.
10485 (vld1_s16_x3): Likewise.
10486 (vld1_u32_x3): Likewise.
10487 (vld1_s32_x3): Likewise.
10488 (vld1_u64_x3): Likewise.
10489 (vld1_s64_x3): Likewise.
10490 (vld1_f16_x3): Likewise.
10491 (vld1_f32_x3): Likewise.
10492 (vld1_f64_x3): Likewise.
10493 (vld1_p8_x3): Likewise.
10494 (vld1_p16_x3): Likewise.
10495 (vld1_p64_x3): Likewise.
10496 (vld1q_u8_x3): Likewise.
10497 (vld1q_s8_x3): Likewise.
10498 (vld1q_u16_x3): Likewise.
10499 (vld1q_s16_x3): Likewise.
10500 (vld1q_u32_x3): Likewise.
10501 (vld1q_s32_x3): Likewise.
10502 (vld1q_u64_x3): Likewise.
10503 (vld1q_s64_x3): Likewise.
10504 (vld1q_f16_x3): Likewise.
10505 (vld1q_f32_x3): Likewise.
10506 (vld1q_f64_x3): Likewise.
10507 (vld1q_p8_x3): Likewise.
10508 (vld1q_p16_x3): Likewise.
10509 (vld1q_p64_x3): Likewise.
10510 (vst1_s64_x2): Likewise.
10511 (vst1_u64_x2): Likewise.
10512 (vst1_f64_x2): Likewise.
10513 (vst1_s8_x2): Likewise.
10514 (vst1_p8_x2): Likewise.
10515 (vst1_s16_x2): Likewise.
10516 (vst1_p16_x2): Likewise.
10517 (vst1_s32_x2): Likewise.
10518 (vst1_u8_x2): Likewise.
10519 (vst1_u16_x2): Likewise.
10520 (vst1_u32_x2): Likewise.
10521 (vst1_f16_x2): Likewise.
10522 (vst1_f32_x2): Likewise.
10523 (vst1_p64_x2): Likewise.
10524 (vst1q_s8_x2): Likewise.
10525 (vst1q_p8_x2): Likewise.
10526 (vst1q_s16_x2): Likewise.
10527 (vst1q_p16_x2): Likewise.
10528 (vst1q_s32_x2): Likewise.
10529 (vst1q_s64_x2): Likewise.
10530 (vst1q_u8_x2): Likewise.
10531 (vst1q_u16_x2): Likewise.
10532 (vst1q_u32_x2): Likewise.
10533 (vst1q_u64_x2): Likewise.
10534 (vst1q_f16_x2): Likewise.
10535 (vst1q_f32_x2): Likewise.
10536 (vst1q_f64_x2): Likewise.
10537 (vst1q_p64_x2): Likewise.
10538 (vst1_s64_x3): Likewise.
10539 (vst1_u64_x3): Likewise.
10540 (vst1_f64_x3): Likewise.
10541 (vst1_s8_x3): Likewise.
10542 (vst1_p8_x3): Likewise.
10543 (vst1_s16_x3): Likewise.
10544 (vst1_p16_x3): Likewise.
10545 (vst1_s32_x3): Likewise.
10546 (vst1_u8_x3): Likewise.
10547 (vst1_u16_x3): Likewise.
10548 (vst1_u32_x3): Likewise.
10549 (vst1_f16_x3): Likewise.
10550 (vst1_f32_x3): Likewise.
10551 (vst1_p64_x3): Likewise.
10552 (vst1q_s8_x3): Likewise.
10553 (vst1q_p8_x3): Likewise.
10554 (vst1q_s16_x3): Likewise.
10555 (vst1q_p16_x3): Likewise.
10556 (vst1q_s32_x3): Likewise.
10557 (vst1q_s64_x3): Likewise.
10558 (vst1q_u8_x3): Likewise.
10559 (vst1q_u16_x3): Likewise.
10560 (vst1q_u32_x3): Likewise.
10561 (vst1q_u64_x3): Likewise.
10562 (vst1q_f16_x3): Likewise.
10563 (vst1q_f32_x3): Likewise.
10564 (vst1q_f64_x3): Likewise.
10565 (vst1q_p64_x3): Likewise.
10567 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10569 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10570 user_label_prefix to name.
10572 * tree-core.h: Update comment about the format of NAME string
10573 passed to handler in attribute_spec.
10575 * config/msp430/msp430.md: Remove erroneous subreg expression from
10576 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10577 zero_extend{q,h}isi2.
10579 2018-05-30 Borislav Petkov <bp@suse.de>
10581 * doc/extend.texi: Document some architecture specific
10582 constraints and sort entries.
10584 2018-05-30 Martin Sebor <msebor@redhat.com>
10586 PR middle-end/85369
10587 * builtins.c (expand_builtin_stpcpy_1): New function.
10588 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10589 only if the former succeeds.
10591 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10593 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10596 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10598 * doc/invoke.texi (-flinker-output): Document
10600 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10602 * passes.c (ipa_write_summaries): Only modify statements if body
10604 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10605 incrementally linking.
10606 (ipa_passes): Likewise.
10607 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10608 pass down resolution info.
10609 * common.opt (flag_incremental_link): Update info.
10610 * gcc.c (plugin specs): Turn flinker-output=* to
10611 -plugin-opt=-linker-output-known
10612 * toplev.c (compile_file): Also cut compilation when doing incremental
10614 * flag-types. (enum lto_partition_model): Add
10615 LTO_LINKER_OUTPUT_NOLTOREL.
10616 (invoke.texi): Add -flinker-output docs.
10617 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10618 link same way as WPA; do not stream in dead initializers.
10620 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10621 darf2out_register_external_decl): Support incremental link.
10623 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10625 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10627 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10629 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10630 it down to simple_object_copy_lto_debug_sections.
10631 (run_gcc): Determine incremental LTO link time and configure
10632 lto1 into non-wpa mode, disable renaming of debug sections.
10634 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10636 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10637 descriptions of various incorrectly documented functions.
10639 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10642 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10643 address check not strict.
10645 2018-05-30 Richard Biener <rguenther@suse.de>
10647 PR tree-optimization/85964
10648 * tracer.c (better_p): Drop initialized count check, we only
10649 call the function with initialized counts now.
10650 (find_best_successor): Do find a best edge if one
10651 has uninitialized count.
10652 (find_best_predecessor): Likewise. Do BB frequency check only
10653 if count is initialized.
10655 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10657 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10658 (aarch64_ldrstr_offset_compare): New.
10659 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10660 load/store orderings.
10661 (aarch64_gen_adjusted_ldpstp): Likewise.
10663 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10665 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10666 Check for subset of GENERAL_REGS and FP_REGS.
10667 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10670 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10672 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10673 and wi::to_poly_offset. Add the current offset and then check
10674 whether the sum fits, rather than using an unchecked addition of
10675 a checked term. Check for a shwi rather than a uhwi.
10676 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10677 (store_constructor): Use poly_int_tree_p.
10678 (expand_expr_real_1): Likewise.
10679 * function.c (assign_temp): Likewise.
10680 * fold-const.c (const_binop): Use poly_int_tree_p and
10681 wi::to_poly_offset.
10682 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10684 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10685 to_poly_offset for MEM offsets.
10686 * ipa-icf.c (sem_variable::equals): Likewise.
10687 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10688 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10689 wi::to_poly_offset for BIT_FIELD_REF offsets.
10690 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10691 wi::to_poly_offset.
10692 * var-tracking.c (emit_note_insn_var_location): Use
10693 tree_to_poly_uint64.
10695 2018-05-29 Jim Wilson <jimw@sifive.com>
10697 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10699 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10702 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10703 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10705 (sse4_1_round<mode>2): Use nonimmediate_operand
10706 for operand 1 predicate.
10708 2018-05-29 Martin Sebor <msebor@redhat.com>
10709 Richard Biener <rguenther@suse.de>
10712 * calls.c (get_size_range): Call determine_value_range instead
10713 of get_value_range..
10714 * tree-vrp.h (determine_value_range): Declared new function.
10715 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10717 2018-05-29 Richard Biener <rguenther@suse.de>
10719 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10720 sure to use non-pattern stmts for get_earlier_stmt arguments.
10721 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10722 called on pattern stmts.
10723 (get_later_stmt): Likewise.
10725 2018-05-29 Martin Liska <mliska@suse.cz>
10727 PR gcov-profile/85759
10728 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10731 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10733 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10735 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10739 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10740 VEC_PACK_FLOAT_EXPR): New tree codes.
10741 * tree-pretty-print.c (op_code_prio): Handle
10742 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10743 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10744 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10745 * tree-inline.c (estimate_operator_cost): Likewise.
10746 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10747 * fold-const.c (const_binop): Likewise.
10748 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10749 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10750 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10751 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10752 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10753 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10754 * expr.c (expand_expr_real_2): Likewise.
10755 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10756 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10757 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10759 * optabs.c (expand_widen_pattern_expr): For
10760 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10761 sign from result type rather than operand's type.
10762 (expand_binop_directly): For vec_packu_float_optab and
10763 vec_packs_float_optab allow result type to be different from operand's
10765 * optabs-tree.c (optab_for_tree_code): Handle
10766 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10767 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10768 * tree-vect-generic.c (expand_vector_operations_1): Handle
10769 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10770 VEC_PACK_FLOAT_EXPR.
10771 * tree-vect-stmts.c (supportable_widening_operation): Handle
10773 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10774 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10775 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10776 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10777 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10779 (vec_pack<floatprefix>_float_<mode>): New expander.
10780 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10782 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10783 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10784 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10785 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10786 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10788 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10789 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10790 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10791 VEC_PACK_FLOAT_EXPR): Document.
10793 2018-05-29 Richard Biener <rguenther@suse.de>
10795 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10797 (stmt_vec_info_vec): Make pointer.
10798 (init_stmt_vec_info_vec): Remove.
10799 (free_stmt_vec_info_vec): Likewise.
10800 (set_stmt_vec_info_vec): New function.
10801 (free_stmt_vec_infos): Likewise.
10802 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10803 (set_vinfo_for_stmt): Likewise.
10804 (get_earlier_stmt): Likewise.
10805 (get_later_stmt): Likewise.
10806 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10807 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10808 (vec_info::~vec_info): Free stmt_vec_infos.
10809 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10810 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10811 (pass_slp_vectorize::execute): Likewise.
10812 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10813 (free_stmt_vec_info_vec): Likewise.
10814 (set_stmt_vec_info_vec): New function.
10815 (free_stmt_vec_infos): Likewise.
10816 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10817 the global stmt_vec_info_vec.
10818 * tree-parloops.c (gather_scalar_reductions): Use
10819 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10822 2018-05-29 Richard Biener <rguenther@suse.de>
10824 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10826 2018-05-29 Martin Liska <mliska@suse.cz>
10827 David Malcolm <dmalcolm@redhat.com>
10829 * vec.c (test_reverse): New.
10830 (vec_c_tests): Add new test.
10831 * vec.h (vl_ptr>::reverse): New function.
10833 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10835 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10837 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10840 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10842 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10844 2018-05-28 Richard Biener <rguenther@suse.de>
10846 PR tree-optimization/85933
10847 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10848 look at stmts marked as vectorizable.
10850 2018-05-28 Richard Biener <rguenther@suse.de>
10852 PR tree-optimization/85934
10853 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10854 vector boolean check before scalar optimization.
10856 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10858 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10861 2018-05-28 Mark Wielaard <mark@klomp.org>
10863 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10864 if it is an expression containing a minus sign.
10866 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10868 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10870 2018-05-27 Paul Koning <ni1d@arrl.net>
10872 * config/pdp11/pdp11.md (truncsihi2): Remove.
10874 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10875 Chung-Ju Wu <jasonwucj@gmail.com>
10877 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10879 (unaligned_store_dw): Ditto.
10880 * config/nds32/nds32-memory-manipulation.c
10881 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10882 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10883 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10884 (emit_setmem_word_loop): Rename to ...
10885 (emit_setmem_doubleword_loop): ... this.
10886 (nds32_gen_dup_4_byte_to_word_value): New function.
10887 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10888 (nds32_expand_setmem_loop): Refine implementation.
10889 (nds32_expand_setmem_loop_v3m): Ditto.
10890 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10893 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10895 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10897 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10899 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10900 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10901 machine->attr_no_prologue_p.
10902 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10903 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10904 (nds32_expand_epilogue): Consider attr_naked_p.
10905 (nds32_expand_epilogue_v3pop): Likewise.
10906 (nds32_can_use_return_insn): Likewise.
10907 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10908 attr_no_prologue_p fields.
10909 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10911 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10914 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10916 * config/i386/sse.md
10917 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10919 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10921 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10923 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10925 (*<floatsuffix>floatv2div2sf2): Rename to ...
10926 (*float<floatunssuffix>v2div2sf2): ... this.
10927 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10928 (float<floatunssuffix>v2div2sf2_mask): ... this.
10929 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10930 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10931 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10933 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10935 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10937 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10939 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10941 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10943 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10944 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10945 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10946 gen_ufix_truncv8dfv8si2.
10947 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10948 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10949 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10950 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10951 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10952 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10953 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10954 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10956 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10960 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10962 2018-05-25 Jim Wilson <jimw@sifive.com>
10964 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10965 * config/riscv/riscv.c (struct machine_function): Add
10966 interrupt_handler_p and attribute_checked_p fields.
10967 (riscv_attribute_table): Add interrupt.
10968 (riscv_interrupt_type_p): New.
10969 (riscv_save_reg_p): Save extra regs for interrupt handler.
10970 (riscv_use_save_libcall): Return false for interrupt handler.
10971 (riscv_first_stack_step): Add forward declaration.
10972 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10973 for interrupt handler with large frame. Use it for saved reg list.
10974 (riscv_expand_prologue): Move flag_stack_usage_info support to
10975 eliminate duplication.
10976 (riscv_expand_epilogue): Generate mret for interrupt handler.
10977 (riscv_epilogue_uses): New.
10978 (riscv_can_use_return_insn): Return false for interrupt handler.
10979 (riscv_function_ok_for_sibcall): Likewise.
10980 (riscv_set_current_function): Add interrupt handler support.
10981 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10982 * config/riscv/riscv.md (UNSPECV_MRET): New.
10984 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10986 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10988 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10990 PR tree-optimization/85712
10991 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10992 this candidate has already been replaced in-situ by a copy.
10994 2018-05-25 Jason Merrill <jason@redhat.com>
10996 PR c++/80485 - inline function non-zero address.
10997 * symtab.c (nonzero_address): Check DECL_COMDAT.
10999 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11002 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11003 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11004 extension of SImode operation. Use const123_operand predicate.
11005 (*saddsi_1): Remove.
11006 (*saddl_se_1): Ditto.
11007 (*ssubsi_1): Ditto.
11008 (*ssubl_se_1): Ditto.
11009 * config/alpha/predicates.md (const123_operand): New predicate.
11010 * config/alpha/constraints.md (P): Use IN_RANGE.
11012 2018-05-25 Richard Biener <rguenther@suse.de>
11014 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11016 (ref_maybe_used_by_stmt_p): Likewise.
11017 (stmt_may_clobber_ref_p): Likewise.
11018 (stmt_may_clobber_ref_p_1): Likewise.
11019 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11021 (ref_maybe_used_by_stmt_p): Likewise.
11022 (stmt_may_clobber_ref_p): Likewise.
11023 (stmt_may_clobber_ref_p_1): Likewise.
11024 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11025 the alias oracle to disambiguate DRs with stmts DR analysis
11027 (vect_analyze_data_refs): Do not give up on not analyzable
11028 DRs for BB vectorization. Remove code truncating the dataref
11031 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11034 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11035 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11036 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11038 2018-05-25 Richard Biener <rguenther@suse.de>
11040 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11041 function, combining stmt data ref gathering and fatal analysis
11043 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11044 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11045 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11046 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11047 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11049 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11051 PR tree-optimization/85720
11052 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11053 SCC if all partitions are builtins.
11054 (version_loop_by_alias_check): New parameter. Generate cancelable
11055 runtime alias check if all partitions are builtins.
11056 (distribute_loop): Update call to above function.
11058 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11060 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11061 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11062 (parm_default_def_partition_arg): Ditto.
11063 (set_parm_default_def_partition): Ditto.
11064 (get_parm_default_def_partitions): Ditto and make it static.
11065 (get_undefined_value_partitions): Ditto and make it static.
11066 (remove_ssa_form): Refactor call to init_var_map here.
11067 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11068 computation for loop region.
11069 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11070 (register_default_def): Delete.
11071 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11072 (parm_default_def_partition_arg): Ditto.
11073 (set_parm_default_def_partition): Ditto.
11074 (get_parm_default_def_partitions): Ditto and make it static.
11075 (get_undefined_value_partitions): Ditto and make it static.
11076 (coalesce_with_default, coalesce_with_default): Update comment.
11077 (create_coalesce_list_for_region): New func factored out from
11078 create_outofssa_var_map.
11079 (populate_coalesce_list_for_outofssa): New func factored out from
11080 create_outofssa_var_map and coalesce_ssa_name.
11081 (create_outofssa_var_map): Delete.
11082 (coalesce_ssa_name): Refactor to support live range computation.
11083 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11084 (get_parm_default_def_partitions): Delete.
11085 (get_undefined_value_partitions): Ditto.
11086 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11087 computation for loop region.
11088 (new_tree_live_info, loe_visit_block): Ditto.
11089 (live_worklist, set_var_live_on_entry): Ditto.
11090 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11091 * tree-ssa-live.h (struct _var_map): New fields.
11092 (init_var_map): Change decl.
11093 (region_contains_p): New.
11095 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11097 * tree-ssa-live.h (live_merge_and_clear): Delete.
11099 2018-05-25 Richard Biener <rguenther@suse.de>
11102 * tree-dump.c (dequeue_and_dump): Remove access to removed
11103 operand 2 of a SWITCH_EXPR.
11105 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11107 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11108 multiplication and division.
11109 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11110 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11111 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11112 (cond_udiv_optab, cond_umod_optab): New optabs.
11113 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11114 (IFN_COND_RDIV): New internal functions.
11115 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11116 TRUNC_MOD_EXPR and RDIV_EXPR.
11117 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11118 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11120 (SVE_INT_BINARY): Include mult.
11121 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11122 (optab, sve_int_op): Handle mult.
11123 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11125 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11126 for SVE_INT_BINARY_SD.
11128 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11130 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11131 (optab, sve_int_op): Handle div and udiv.
11132 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11133 for SVE_INT_BINARY_SD.
11134 (*<optab><mode>3): New insn for the same.
11136 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11138 * tree-vect-patterns.c: Include predict.h.
11139 (vect_recog_divmod_pattern): Restrict check for division support
11140 to when optimizing for size.
11142 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11144 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11145 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11146 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11147 (gimple_match_op::set_op): Likewise.
11148 (gimple_resimplify4): Declare.
11149 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11150 (expr::gen_transform): Likewise.
11151 (decision_tree::gen): Generate a simplification routine for 4 operands.
11152 * gimple-match-head.c (gimple_simplify): Add an overload for
11153 4 operands. In the top-level function, handle up to 4 call
11154 arguments and call gimple_resimplify4.
11155 (gimple_resimplify4): New function.
11156 (build_call_internal): Pass a fourth operand.
11157 (maybe_push_to_seq): Likewise.
11158 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11159 Fold VEC_COND_EXPRs of an operation and a default value into
11160 an IFN_COND_* function if possible.
11161 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11163 (SVE_COND_FP_BINARY): Include them.
11164 (optab, sve_fp_op): Handle them.
11165 (SVE_INT_BINARY_REV): New code iterator.
11166 (SVE_COND_FP_BINARY_REV): New int iterator.
11167 (commutative): New int attribute.
11168 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11170 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11172 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11173 (*cond_<optab><mode>): New patterns for reversed operands.
11175 2018-05-25 Richard Biener <rguenther@suse.de>
11177 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11178 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11179 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11180 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11181 * tree-vect-data-refs.c (everywhere): Adjust users.
11182 * tree-vect-loop.c (everywhere): Likewise.
11183 * tree-vect-slp.c (everywhere): Likewise.
11184 * tree-vect-stmts.c (everywhere): Likewise.
11185 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11187 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11189 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11191 (gcc_cv_as_section_exclude): ... this.
11192 Try Solaris as #exclude syntax.
11193 * configure: Regenerate.
11194 * config.in: Regenerate.
11195 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11197 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11198 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11200 * varasm.c (default_elf_asm_named_section): Don't check if
11201 HAVE_GAS_SECTION_EXCLUDE is defined.
11203 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11205 * doc/md.texi: Update the documentation of the cond_* optabs
11206 to mention the new final operand. Fix GET_MODE_NUNITS call.
11207 Describe the scalar case too.
11208 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11209 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11211 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11212 (get_conditional_internal_fn): Update comment.
11213 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11214 accumulator value as a final argument to conditional functions.
11215 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11216 a define_expand and add an "else" operand. Assert for now that
11217 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11218 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11219 (*cond_<optab><mode>): New patterns.
11220 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11221 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11222 (UNSPEC_COND_EOR): Delete.
11223 (optab): Remove associated mappings.
11224 (SVE_INT_BINARY): New code iterator.
11225 (sve_int_op): Remove int attribute and add "minus" to the code
11227 (SVE_COND_INT_OP): Delete.
11228 (SVE_COND_FP_OP): Rename to...
11229 (SVE_COND_FP_BINARY): ...this.
11231 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11233 * optabs.c (can_reuse_operands_p): New function.
11234 (maybe_legitimize_operands): Try to reuse the results for
11237 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11239 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11240 Add {q} suffix to insn mnemonic.
11242 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11244 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11245 (msp430_warn_func_return): New.
11247 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11249 * fold-const.c (tree_nonzero_bits): New function.
11250 * fold-const.h (tree_nonzero_bits): Likewise.
11251 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11252 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11254 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11258 * varasm.c (assemble_alias): Check ifunc_resolver only on
11261 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11264 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11265 when memory input operand is handled.
11267 2018-05-24 Luis Machado <luis.machado@linaro.org>
11269 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11271 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11273 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11275 * match.pd: Delay FMA folds until after vectorization.
11277 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11280 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11281 address check not strict.
11283 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11285 * gimple-match.h (gimple_match_op): New class.
11286 (mprts_hook): Replace parameters with a gimple_match_op *.
11287 (maybe_build_generic_op): Likewise.
11288 (gimple_simplified_result_is_gimple_val): Replace parameters with
11289 a const gimple_match_op *.
11290 (gimple_simplify): Replace code_helper * and tree * parameters with
11291 a gimple_match_op * parameter.
11292 (gimple_resimplify1): Replace code_helper *, tree and tree *
11293 parameters with a gimple_match_op * parameter.
11294 (gimple_resimplify2): Likewise.
11295 (gimple_resimplify3): Likewise.
11296 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11297 parameters with a gimple_match_op * parameter.
11298 * gimple-match-head.c (gimple_simplify): Change prototypes of
11299 auto-generated functions to take a gimple_match_op * instead of
11300 separate code_helper * and tree * parameters. Make the same
11301 change in the top-level overload and update calls to the
11302 gimple_resimplify routines. Update calls to the auto-generated
11303 functions and to maybe_push_res_to_seq in the publicly-facing
11304 operation-specific gimple_simplify overloads.
11305 (gimple_match_op::MAX_NUM_OPS): Define.
11306 (gimple_resimplify1): Replace rcode and ops with a single res_op
11307 parameter. Update call to gimple_simplify.
11308 (gimple_resimplify2): Likewise.
11309 (gimple_resimplify3): Likewise.
11310 (mprts_hook): Replace parameters with a gimple_match_op *.
11311 (maybe_build_generic_op): Likewise.
11312 (build_call_internal): Replace type, nargs and ops with
11313 a gimple_match_op *.
11314 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11315 with a single gimple_match_op *. Update calls to mprts_hook,
11316 build_call_internal and gimple_simplified_result_is_gimple_val.
11317 Factor out code that is common to the tree_code and combined_fn cases.
11318 * genmatch.c (expr::gen_transform): Replace tem_code and
11319 tem_ops with a gimple_match_op called tem_op. Update calls
11320 to the gimple_resimplify functions and maybe_push_res_to_seq.
11321 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11322 res_ops. Update call to the gimple_resimplify functions.
11323 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11324 (decision_tree::gen): Make the functions take a gimple_match_op *
11325 called res_op instead of separate res_code and res_ops parameters.
11326 Update call accordingly.
11327 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11328 and ops with a single res_op parameter. Update calls to
11329 maybe_build_generic_op and maybe_push_res_to_seq.
11330 (fold_stmt_1): Update calls to gimple_simplify and
11331 replace_stmt_with_simplification.
11332 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11333 and gimple_simplified_result_is_gimple_val.
11334 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11336 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11337 with a gimple_match_op *.
11338 (vn_nary_build_or_lookup): Likewise. Update call to
11339 vn_nary_build_or_lookup_1.
11340 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11341 gimple_match_op *. Update calls to the gimple_resimplify routines
11342 and to gimple_simplified_result_is_gimple_val.
11343 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11344 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11345 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11346 (visit_nary_op): Likewise.
11347 (visit_reference_op_load): Likewise.
11349 2018-05-23 Luis Machado <luis.machado@linaro.org>
11351 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11352 modifier for printing the step amount.
11354 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11357 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11360 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11362 * doc/sourcebuild.texi (Endianness): New subsubsection.
11364 2018-05-23 Luis Machado <luis.machado@linaro.org>
11366 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11367 <prefetch_dynamic_strides>: New const bool field.
11368 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11369 prefetch_dynamic_strides.
11370 (exynosm1_prefetch_tune): Likewise.
11371 (thunderxt88_prefetch_tune): Likewise.
11372 (thunderx_prefetch_tune): Likewise.
11373 (thunderx2t99_prefetch_tune): Likewise.
11374 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11376 (aarch64_override_options_internal): Update to set
11377 PARAM_PREFETCH_DYNAMIC_STRIDES.
11378 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11379 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11380 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11381 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11382 prefetch-dynamic-strides setting.
11384 2018-05-23 Luis Machado <luis.machado@linaro.org>
11386 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11387 <minimum_stride>: New const int field.
11388 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11389 minimum_stride field defaulting to -1.
11390 (exynosm1_prefetch_tune): Likewise.
11391 (thunderxt88_prefetch_tune): Likewise.
11392 (thunderx_prefetch_tune): Likewise.
11393 (thunderx2t99_prefetch_tune): Likewise.
11394 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11395 <default_opt_level>: Set to 3.
11396 (aarch64_override_options_internal): Update to set
11397 PARAM_PREFETCH_MINIMUM_STRIDE.
11398 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11399 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11400 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11401 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11402 stride is constant and is below the minimum stride threshold.
11404 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11406 * config/arm/arm-cpus.in (mode26): Delete.
11407 (armv4): Delete mode26 reference.
11408 * config/arm/arm.c (arm_configure_build_target): Delete use of
11411 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11413 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11415 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11416 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11418 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11419 (floatunsdidf2): Ditto.
11421 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11423 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11424 (fixuns_trunc<mode>si2_avx512f): Ditto.
11425 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11426 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11427 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11429 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11431 PR rtl-optimization/79985
11432 * df-scan.c (df_insn_refs_collect): Remove special case for
11433 global registers and asm statements.
11435 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11437 * extend.texi (Global Register Variables): Rewrite the bullet list.
11438 Note that the register is available for allocation. Note that access
11439 via inline asm must use constraints. Add note about async-signal
11440 handlers. Remove paragraph about automagic register selection.
11442 2018-05-23 Richard Biener <rguenther@suse.de>
11444 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11445 of fixed offset from memset VN.
11447 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11449 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11450 first_interp field.
11451 (alloc_cand_and_find_basis): Initialize first_interp field.
11452 (slsr_process_mul): Modify first_interp field.
11453 (slsr_process_add): Likewise.
11454 (slsr_process_cast): Modify first_interp field for each new
11456 (slsr_process_copy): Likewise.
11457 (dump_candidate): Dump first_interp field.
11458 (replace_mult_candidate): Process all interpretations, not just
11460 (replace_rhs_if_not_dup): Likewise.
11461 (replace_one_candidate): Likewise.
11463 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11465 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11467 (aarch64_needs_frame_chain): New function.
11468 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11470 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11473 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11474 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11475 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11476 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11477 as true for strict-align.
11478 (aarch64_can_inline_p): Perform checks even when callee has no
11479 attributes to check for strict alignment.
11480 * doc/extend.texi (AArch64 Function Attributes): Document
11482 * doc/invoke.texi: (AArch64 Options): Likewise.
11484 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11486 PR tree-optimization/85853
11487 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11488 the handling of the root of the node to...
11489 (vect_slp_analyze_node_operations_1): ...this new function,
11490 and run the whole thing with the child nodes' def types
11491 set according to their SLP node's def type.
11493 2018-05-23 Richard Biener <rguenther@suse.de>
11495 PR middle-end/85874
11496 * tree-data-ref.c (create_runtime_alias_checks): Defer
11497 and ignore overflow warnings.
11499 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11501 PR tree-optimization/85822
11502 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11505 2018-05-23 Richard Biener <rguenther@suse.de>
11507 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11508 memset constants via native_interpret_expr.
11510 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11513 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11515 (cgraph_node::create_alias): Likewise.
11516 (cgraph_node::get_availability): Check ifunc_resolver instead
11517 of looking up ifunc attribute.
11518 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11519 * varasm.c (do_assemble_alias): Likewise.
11520 (assemble_alias): Likewise.
11521 (default_binds_local_p_3): Likewise.
11522 * cgraph.h (cgraph_node): Add ifunc_resolver.
11523 (cgraph_node::only_called_directly_or_aliased_p): Return false
11524 for IFUNC resolver.
11525 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11527 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11528 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11529 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11530 instead of looking up ifunc attribute.
11532 2018-05-22 Luis Machado <luis.machado@linaro.org>
11534 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11536 2018-05-22 Martin Sebor <msebor@redhat.com>
11538 PR middle-end/85359
11539 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11540 only when expasion succeeds.
11541 (expand_builtin_strcmp): Same.
11542 (expand_builtin_strncmp): Same.
11544 2018-05-22 Martin Sebor <msebor@redhat.com>
11546 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11548 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11549 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11551 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11552 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11554 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11555 Add check for legitimate_address.
11556 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11557 (aarch64_swap_ldrstr_operands): New.
11558 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11561 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11562 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11564 * config/aarch64/aarch64.md: New patterns to generate stp
11566 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11567 single words and double words.
11568 (load_pair_sw, load_pair_dw): Likewise.
11569 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11571 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11573 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11574 for different mode ldpstp and add peephole for merged zero stores.
11575 Likewise for loads.
11576 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11578 (aarch64_gen_store_pair): Rename calls to match new patterns.
11579 (aarch64_gen_load_pair): Rename calls to match new patterns.
11580 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11581 (load_pair<DREG:mode><DREG2:mode>): ... This.
11582 (store_pair<mode>): Rename to...
11583 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11584 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11585 New mode iterators.
11586 (V_INT_EQUIV): Handle SImode.
11587 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11590 2018-05-22 Martin Sebor <msebor@redhat.com>
11593 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11594 or ajust the presumed bound on an operation to avoid unnecessary
11597 2018-05-22 Martin Sebor <msebor@redhat.com>
11599 PR tree-optimization/85826
11600 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11601 assuming that a DECL necesarily has a constant size.
11603 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11605 PR middle-end/85862
11606 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11608 2018-05-22 Richard Biener <rguenther@suse.de>
11610 PR tree-optimization/85834
11611 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11612 non-constant and non-zero memset arguments.
11614 2018-05-22 Martin Liska <mliska@suse.cz>
11617 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11619 2018-05-22 Richard Biener <rguenther@suse.de>
11621 PR tree-optimization/85863
11622 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11623 comparisons when vectype is specified.
11624 (vectorizable_condition): Do not specify vectype for
11625 vect_is_simple_cond when SLP vectorizing.
11627 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11630 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11631 define __ibm128 as long double.
11632 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11633 as a distinct type when IEEE 128-bit support is enabled.
11634 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11635 128-bit types to use the correct functions.
11636 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11637 convert between 128-bit floating point types that have different
11638 modes but the same representation, instead of using gen_lowpart to
11640 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11642 (IFKF_reg): New attributes to give the register constraints for
11644 (extend<mode>tf2_internal): New insns to mark an explicit
11645 conversion between 128-bit floating point types that have a
11646 different mode but share the same representation.
11648 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11650 PR tree-optimization/85814
11651 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11652 a null return from get_strinfo when unsharing the next
11653 strinfo in the chain.
11655 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11658 * varasm.c (weak_finish): Clean up weak_decls.
11660 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11662 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11663 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11664 UNSPEC_UADALP values.
11665 * config/aarch64/iterators.md (ABAL): New int iterator.
11668 (sur): Add mappings for the above.
11669 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11671 (aarch64_<sur>abal<mode>_4): Likewise.
11672 (aarch64_<sur>adalp<mode>_3): Likewise.
11673 (<sur>sadv16qi): New define_expand.
11675 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11677 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11678 (*movdf_internal): Ditto.
11679 (*rcpsf2_sse): Ditto.
11680 (*rsqrtsf2_sse): Ditto.
11681 (*sqrt<mode>2_sse): Ditto.
11683 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11685 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11687 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11688 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11689 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11690 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11692 * config/aarch64/arm_neon.h: Likewise.
11693 * config/aarch64/iterators.md (VQ_I): New.
11695 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11697 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11699 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11702 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11704 * config/nds32/constraints.md (S): New constraint.
11705 * config/nds32/nds32.md (call_internal): Use constraint S.
11706 (call_value_internal): Likewise.
11707 (sibcall_internal): Likewise.
11708 (sibcall_value_internal): Likewise.
11710 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11711 Chung-Ju Wu <jasonwucj@gmail.com>
11713 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11714 into consideration.
11716 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11717 Chung-Ju Wu <jasonwucj@gmail.com>
11719 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11720 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11721 (nds32_rtx_costs_impl): Simplify.
11722 (nds32_address_cost_impl): Simplify.
11723 (nds32_init_rtx_costs): New function.
11724 (nds32_rtx_costs_speed_prefer): Likewise.
11725 (nds32_rtx_costs_size_prefer): Likewise.
11726 (nds32_address_cost_speed_prefer): Likewise.
11727 (nds32_address_cost_speed_fwprop): Likewise.
11728 (nds32_address_cost_size_prefer): Likewise.
11729 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11730 * config/nds32/nds32.c (nds32_option_override): Use
11731 nds32_init_rtx_costs function.
11733 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11735 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11736 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11737 (TARGET_PIPELINE_N8): Likewise.
11738 (TARGET_PIPELINE_N10): Likewise.
11739 (TARGET_PIPELINE_N13): Likewise.
11740 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11742 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11744 * config/nds32/nds32-fpu.md: Update copyright year.
11746 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11748 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11750 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11752 * config/nds32/nds32.c
11753 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11754 * config/nds32/nds32.opt (minline-asm-r15): New option.
11756 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11758 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11760 * config/nds32/nds32.md (abssi2): New pattern.
11762 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11764 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11765 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11766 Merge insn pattern from sse_cvtsi2ss<round_name> and
11767 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11768 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11769 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11770 using SWI48 mode iterator.
11771 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11772 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11773 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11774 pattern from sse_cvttss2si<round_saeonly_name>
11775 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11776 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11777 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11778 using SWI48 mode iterator.
11779 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11780 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11781 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11782 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11783 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11784 using SWI48 mode iterator.
11785 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11786 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11787 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11788 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11789 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11790 SWI48 mode iterator.
11791 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11792 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11793 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11794 pattern from sse_cvttsd2si<round_saeonly_name>
11795 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11797 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11799 * config/nds32/nds32-md-auxiliary.c
11800 (nds32_valid_smw_lwm_base_p): Refine.
11801 (nds32_output_smw_single_word): Refine.
11802 (nds32_output_smw_double_word): New.
11803 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11805 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11807 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11808 (nds32_output_stack_pop): Refine.
11809 (nds32_expand_unaligned_load): Refine.
11810 (nds32_expand_unaligned_store): Refine.
11812 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11813 Chung-Ju Wu <jasonwucj@gmail.com>
11815 * config/nds32/constants.md: Add TP_REGNUM constant.
11816 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11817 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11819 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11820 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11821 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11822 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11823 and PIC code generation.
11824 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11826 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11828 * config/nds32/nds32.md: Support TLS and PIC.
11829 * config/nds32/nds32.c: Support TLS and PIC.
11830 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11831 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11834 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11836 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11837 mode with E_ prefix.
11839 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11840 Chung-Ju Wu <jasonwucj@gmail.com>
11842 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11843 * config/nds32/nds32-md-auxiliary.c
11844 (symbolic_reference_mentioned_p): New.
11845 (nds32_legitimize_ict_address): New.
11846 (nds32_expand_ict_move): New.
11847 (nds32_indirect_call_referenced_p): New.
11848 (nds32_symbol_binds_local_p): Delete.
11849 (nds32_long_call_p): Modify.
11850 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11851 * config/nds32/nds32-protos.h
11852 (symbolic_reference_mentioned_p): Declare.
11853 (nds32_legitimize_ict_address): Declare.
11854 (nds32_expand_ict_move): Declare.
11855 (nds32_indirect_call_referenced_p): Declare.
11856 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11857 (nds32_relax_group): Use nds32_ict_const_p as condition.
11858 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11859 (nds32_asm_file_start): Output ict_model directive in asm code.
11860 (nds32_legitimate_address_p): Consider indirect call.
11861 (nds32_print_operand): Consider indirect call.
11862 (nds32_print_operand_address): Consider indirect call.
11863 (nds32_insert_attributes): Handle "indirect_call" attribute.
11864 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11865 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11866 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11867 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11868 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11869 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11870 (TARGET_ICT_MODEL_SMALL): Define.
11871 (TARGET_ICT_MODEL_LARGE): Define.
11872 * config/nds32/nds32.md (movsi): Consider ict model.
11873 (call, call_value): Consider ict model.
11874 (sibcall, sibcall_value): Consider ict model.
11875 * config/nds32/nds32.opt (mict-model): New option.
11876 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11879 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11880 Monk Chiang <sh.chiang04@gmail.com>
11881 Jim Wilson <jimw@sifive.com>
11883 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11884 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11885 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11886 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11887 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11888 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11889 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11890 compute save_libcall_adjustment properly.
11891 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11892 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11893 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11894 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11895 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11896 (ABI_SPEC): Handle mabi=ilp32e.
11897 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11898 (RVE): Add RVE mask.
11899 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11900 <-march>: Add rv32e as an example.
11902 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11905 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11906 (intra_create_variable_infos): Handle C++ constructors.
11908 2018-05-18 Martin Liska <mliska@suse.cz>
11910 * passes.def: Remove a redundant pass.
11912 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11915 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11917 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11919 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11921 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11923 (armv2, armv2a, armv3, armv3m): Delete architectures.
11924 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11925 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11926 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11928 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11929 (*mulsidi3adddi): Likewise.
11930 (mulsidi3): Likewise.
11931 (*mulsidi3_nov6): Likewise.
11932 (umulsidi3): Likewise.
11933 (umulsidi3_nov6): Likewise.
11934 (umaddsidi4): Likewise.
11935 (*umulsidi3adddi): Likewise.
11936 (smulsi3_highpart): Likewise.
11937 (*smulsi3_highpart_nov6): Likewise.
11938 (umulsi3_highpart): Likewise.
11939 (*umulsi3_highpart_nov6): Likewise.
11940 * config/arm/arm.h (arm_arch3m): Delete.
11941 * config/arm/arm.c (arm_arch3m): Delete.
11942 (arm_option_override_internal): Update armv3-related comment.
11943 (arm_configure_build_target): Delete use of isa_bit_mode32.
11944 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11945 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11946 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11947 (mulsa3): Likewise.
11948 (mulusa3): Likewise.
11949 * config/arm/arm-protos.h (arm_arch3m): Delete.
11950 * config/arm/arm-tables.opt: Regenerate.
11951 * config/arm/arm-tune.md: Likewise.
11952 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11953 deleted architectures.
11955 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11957 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11958 (armv5t, armv5te): New features.
11959 (ARMv5, ARMv5e): Delete fgroups.
11960 (ARMv5t, ARMv5te): Adjust for above changes.
11961 (ARMv6m): Likewise.
11962 (armv5, armv5e): Delete arches.
11963 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11965 (*call_reg_arm): Likewise.
11966 (*call_value_reg_armv5): Likewise.
11967 (*call_value_reg_arm): Likewise.
11968 (*call_symbol): Likewise.
11969 (*call_value_symbol): Likewise.
11970 (*sibcall_insn): Likewise.
11971 (*sibcall_value_insn): Likewise.
11972 (clzsi2): Likewise.
11973 (prefetch): Likewise.
11974 (define_split and define_peephole2 dependent on arm_arch5):
11976 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11978 (TARGET_ARM_QBIT): Likewise.
11979 (TARGET_DSP_MULTIPLY): Likewise.
11980 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11981 (arm_arch5, arm_arch5e): Delete.
11982 (arm_arch5t, arm_arch5te): Declare.
11983 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11984 (arm_arch5t): Declare.
11985 (arm_option_reconfigure_globals): Update for the above.
11986 (arm_options_perform_arch_sanity_checks): Update comment, replace
11987 use of arm_arch5 with arm_arch5t.
11988 (use_return_insn): Likewise.
11989 (arm_emit_call_insn): Likewise.
11990 (output_return_instruction): Likewise.
11991 (arm_final_prescan_insn): Likewise.
11992 (arm_coproc_builtin_available): Likewise.
11993 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11994 arm_arch5e with arm_arch5t and arm_arch5te.
11995 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11996 (arm_arch5t, arm_arch5te): Declare.
11997 * config/arm/arm-tables.opt: Regenerate.
11998 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11999 * config/arm/t-multilib: Likewise.
12000 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12001 instead of arm_arch5.
12002 (*call_reg_thumb1): Likewise.
12003 (*call_value_reg_thumb1_v5): Likewise.
12004 (*call_value_reg_thumb1): Likewise.
12005 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12007 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12009 2018-05-18 Martin Liska <mliska@suse.cz>
12011 PR gcov-profile/84846
12012 * doc/gcov.texi: Document -t option of gcov tool.
12014 2018-05-18 Martin Liska <mliska@suse.cz>
12016 PR gcov-profile/84846
12017 * gcov.c (print_usage): Add new -t option.
12018 (process_args): Handle the option.
12019 (generate_results): Use stdout as output when requested by
12022 2018-05-18 Martin Liska <mliska@suse.cz>
12024 PR gcov-profile/84846
12025 * coverage.c (coverage_init): Write PWD to .gcno file.
12026 * doc/gcov.texi: Document how working directory is printed.
12027 * gcov-dump.c (dump_gcov_file): Print PWD.
12028 * gcov.c (output_intermediate_file): Likewise.
12029 (read_graph_file): Read PWD string.
12030 (output_lines): Print PWD.
12032 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12034 PR middle-end/85817
12035 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12036 for retval and return false if all args to phi are zero.
12038 2018-05-18 Richard Biener <rguenther@suse.de>
12040 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12042 (evrp_dom_walker::before_dom_children): Call it.
12044 2018-05-18 Richard Biener <rguenther@suse.de>
12046 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12047 results when processing array refs with variable index.
12049 2018-05-18 Toon Moene <toon@moene.org>
12051 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12052 directly after that of -floop-interchange. Indicate that both
12053 options are enabled by default when specifying -O3.
12055 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12057 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12058 iterator. Delete separate integer-mode vec_set<mode> expander.
12059 (aarch64_simd_vec_setv2di): Delete.
12060 (vec_setv2di): Delete.
12061 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12062 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12063 the "w, r" alternative.
12065 2018-05-18 Martin Liska <mliska@suse.cz>
12067 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12068 * tree-pass.h (make_pass_lower_switch_O0): New function.
12069 * tree-switch-conversion.c (node_has_low_bound): Remove.
12070 (node_has_high_bound): Likewise.
12071 (node_is_bounded): Likewise.
12072 (class pass_lower_switch): Make it a template type and create
12074 (pass_lower_switch::execute): Add template argument.
12075 (make_pass_lower_switch): New function.
12076 (make_pass_lower_switch_O0): New function.
12077 (do_jump_if_equal): Remove.
12078 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12079 all the hard work to tree optimization passes.
12081 2018-05-18 Martin Liska <mliska@suse.cz>
12083 * dbgcnt.c (limit_low): Renamed from limit.
12084 (limit_high): New variable.
12085 (dbg_cnt_is_enabled): Check for upper limit.
12086 (dbg_cnt): Adjust dumping.
12087 (dbg_cnt_set_limit_by_index): Add new argument for high
12089 (dbg_cnt_set_limit_by_name): Likewise.
12090 (dbg_cnt_process_single_pair): Parse new format.
12091 (dbg_cnt_process_opt): Use strtok.
12092 (dbg_cnt_list_all_counters): Remove 'value' and add
12094 * doc/invoke.texi: Document changes.
12096 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12098 * doc/sourcebuild.texi (scalar_all_fma): Document.
12099 * tree.def (FMA_EXPR): Delete.
12100 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12101 * internal-fn.c (ternary_direct): New macro.
12102 (expand_ternary_optab_fn): Likewise.
12103 (direct_ternary_optab_supported_p): Likewise.
12104 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12105 * builtins.c (fold_builtin_fma): Delete.
12106 (fold_builtin_3): Don't call it.
12107 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12108 * expr.c (expand_expr_real_2): Likewise.
12109 * fold-const.c (operand_equal_p): Likewise.
12110 (fold_ternary_loc): Likewise.
12111 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12112 * gimple.c (DEFTREECODE): Likewise.
12113 * gimplify.c (gimplify_expr): Likewise.
12114 * optabs-tree.c (optab_for_tree_code): Likewise.
12115 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12116 * tree-eh.c (operation_could_trap_p): Likewise.
12117 (stmt_could_throw_1_p): Likewise.
12118 * tree-inline.c (estimate_operator_cost): Likewise.
12119 * tree-pretty-print.c (dump_generic_node): Likewise.
12120 (op_code_prio): Likewise.
12121 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12122 * tree-ssa-operands.c (get_expr_operands): Likewise.
12123 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12124 * fold-const-call.h (fold_fma): Delete.
12125 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12126 CFN_FNMA and CFN_FNMS.
12127 (fold_fma): Delete.
12128 * genmatch.c (combined_fn): New enum.
12129 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12130 (commutative_op): New function.
12131 (commutate): Use it. Handle more than 2 operands.
12132 (dt_operand::gen_gimple_expr): Use commutative_op.
12133 (parser::parse_expr): Allow :c to be used with non-binary
12134 operators if the commutative operand is known.
12135 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12136 CFN_FMS, CFN_FNMA and CFN_FNMS.
12137 (backprop::process_assign_use): Remove FMA_EXPR handling.
12138 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12139 (gen_hsa_fma): New function.
12140 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12141 IFN_FNMA and IFN_FNMS.
12142 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12143 * gimple-fold.h (follow_all_ssa_edges): Declare.
12144 * gimple-fold.c (follow_all_ssa_edges): New function.
12145 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12146 gimple_build interface and use follow_all_ssa_edges to fold the result.
12147 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12148 instead of checking for optabs directly.
12149 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12150 rather than FMA_EXPRs.
12151 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12152 call to IFN_FMA instead of an FMA_EXPR.
12154 2018-05-17 Jim Wilson <jimw@sifive.com>
12156 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12157 sign extended promoted subreg, and the range does not have the sign bit
12158 set, then do a sign extend.
12160 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12161 test, check for sign extended subreg and/or constant operands, and
12162 do a sign extend in that case.
12164 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12166 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12167 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12169 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12170 Change logics_shift_reg to logics_shift_imm.
12171 (thunderx2t99_fp_loadpair_basic): Delete.
12172 (thunderx2t99_fp_storepair_basic): Delete.
12173 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12174 (thunderx2t99_asimd_polynomial): Delete.
12175 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12176 and neon_fp_mul_d_scalar_q.
12177 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12178 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12179 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12180 (thunderx2t99_asimd_lut): Add missing tbl types.
12181 (thunderx2t99_asimd_ext): Delete.
12182 (thunderx2t99_asimd_load1_1_mult): Delete.
12183 (thunderx2t99_asimd_load1_2_mult): Delete.
12184 (thunderx2t99_asimd_load1_ldp): New.
12185 (thunderx2t99_asimd_load1): New.
12186 (thunderx2t99_asimd_load2): Add missing *load2* types.
12187 (thunderx2t99_asimd_load3): New.
12188 (thunderx2t99_asimd_load4): New.
12189 (thunderx2t99_asimd_store1_1_mult): Delete.
12190 (thunderx2t99_asimd_store1_2_mult): Delete.
12191 (thunderx2t99_asimd_store2_mult): Delete.
12192 (thunderx2t99_asimd_store2_onelane): Delete.
12193 (thunderx2t99_asimd_store_stp): New.
12194 (thunderx2t99_asimd_store1): New.
12195 (thunderx2t99_asimd_store2): New.
12196 (thunderx2t99_asimd_store3): New.
12197 (thunderx2t99_asimd_store4): New.
12199 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12201 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12202 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12204 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12205 Segher Boessenkool <segher@kernel.crashing.org>
12208 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12211 2018-05-17 Richard Biener <rguenther@suse.de>
12213 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12214 for pruning loop and prune defs feeding only already visited PHIs.
12216 2018-05-17 Richard Biener <rguenther@suse.de>
12218 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12220 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12221 Richard Biener <rguenther@suse.de>
12223 PR tree-optimization/85793
12224 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12225 for VMAT_ELEMENTWISE.
12227 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12229 * internal-fn.h (lookup_internal_fn): Declare
12230 * internal-fn.c (lookup_internal_fn): New function.
12231 * gimple.c (gimple_build_call_from_tree): Handle calls to
12232 internal functions.
12233 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12234 internal function names.
12235 * tree-pretty-print.c (dump_generic_node): Likewise.
12236 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12238 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12240 * gimple-fold.h (gimple_build): Make the function forms take
12241 combined_fn rather than built_in_function.
12242 (gimple_simplify): Likewise.
12243 * gimple-match-head.c (gimple_simplify): Likewise.
12244 * gimple-fold.c (gimple_build): Likewise.
12245 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12246 rather than gimple_build_call_internal.
12247 (get_initial_defs_for_reduction): Likewise.
12248 (vect_create_epilog_for_reduction): Likewise.
12249 (vectorizable_live_operation): Likewise.
12251 2018-05-17 Martin Liska <mliska@suse.cz>
12253 * gimple-ssa-sprintf.c (format_directive): Do not use
12254 space in between 'G_' and '('.
12256 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12259 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12260 even if the mask is not all ones.
12263 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12265 (ix86_gimple_fold_builtin): Likewise.
12268 * config/i386/i386.c: Include tree-vector-builder.h.
12269 (ix86_vector_shift_count): New function.
12270 (ix86_fold_builtin): Fold shift builtins by scalar count.
12271 (ix86_gimple_fold_builtin): Likewise.
12273 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12274 _mm512_setzero): New intrinsics.
12276 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12277 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12279 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12280 code generation for cases where splatting a value is not useful.
12281 * simplify-rtx.c (simplify_ternary_operation): Simplify
12282 vec_merge across a vec_duplicate and a paradoxical subreg forming
12283 a vector mode to a vec_concat.
12285 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12287 * config.gcc: Support "goldmont-plus".
12288 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12290 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12291 PROCESSOR_GOLDMONT_PLUS.
12292 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12293 (processor_target_table): Add "goldmont-plus".
12294 (PTA_GOLDMONT_PLUS): Define.
12295 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12296 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12297 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12298 (fold_builtin_cpu): Add "goldmont-plus".
12299 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12300 (ix86_option_override_internal): Add "goldmont-plus".
12301 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12302 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12303 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12304 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12306 2018-05-17 Richard Biener <rguenther@suse.de>
12308 PR tree-optimization/85757
12309 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12310 remove defs that only feed that PHI from further processing.
12312 2018-05-16 Jim Wilson <jimw@sifive.com>
12314 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12316 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12318 2018-05-16 Mark Wielaard <mark@klomp.org>
12320 * dwarf2out.c (count_index_strings): New function.
12321 (output_indirect_strings): Call count_index_strings and generate
12322 header for dwarf_version >= 5.
12324 2018-05-16 Mark Wielaard <mark@klomp.org>
12326 * dwarf2out.c (dwarf_FORM): New function.
12327 (set_indirect_string): Use dwarf_FORM.
12328 (reset_indirect_string): Likewise.
12329 (size_of_die): Likewise.
12330 (value_format): Likewise.
12331 (output_die): Likewise.
12332 (add_skeleton_AT_string): Likewise.
12333 (output_macinfo_op): Likewise.
12334 (index_string): Likewise.
12335 (output_index_string_offset): Likewise.
12336 (output_index_string): Likewise.
12337 (count_index_strings): Likewise.
12339 2018-05-16 Carl Love <cel@us.ibm.com>
12341 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12342 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12344 2018-05-16 Martin Jambor <mjambor@suse.cz>
12346 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12347 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12349 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12351 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12352 (fnma<mode>4): Likewise.
12353 (fms<mode>4): Likewise.
12354 (fnms<mode>4): Likewise.
12355 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12356 (aarch64_fnma<mode>4): Likewise.
12357 (aarch64_fms<mode>4): Likewise.
12358 (aarch64_fnms<mode>4): Likewise.
12359 (aarch64_fnmadd<mode>4): Likewise.
12361 2018-05-16 Jason Merrill <jason@redhat.com>
12363 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12365 2018-05-16 Richard Biener <rguenther@suse.de>
12367 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12368 (dump_stmt_cost): Declare.
12369 (add_stmt_cost): Dump cost we add.
12370 (add_stmt_costs): New function.
12371 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12372 No longer exported.
12373 (vect_analyze_stmt): Adjust prototype.
12374 (vectorizable_condition): Likewise.
12375 (vectorizable_live_operation): Likewise.
12376 (vectorizable_reduction): Likewise.
12377 (vectorizable_induction): Likewise.
12378 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12379 cost vector to pass to vectorizable_ and record afterwards.
12380 (vect_model_reduction_cost): Take cost vector argument and adjust.
12381 (vect_model_induction_cost): Likewise.
12382 (vectorizable_reduction): Likewise.
12383 (vectorizable_induction): Likewise.
12384 (vectorizable_live_operation): Likewise.
12385 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12386 SLP_TREE_NUMBER_OF_VEC_STMTS.
12387 (vect_analyze_slp_cost_1): Remove.
12388 (vect_analyze_slp_cost): Likewise.
12389 (vect_slp_analyze_node_operations): Take visited args and
12390 a target cost vector. Avoid processing already visited stmt sets.
12391 (vect_slp_analyze_operations): Use a local cost vector to gather
12392 costs and register those of non-discarded instances.
12393 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12394 (vect_schedule_slp_instance): Remove copying of
12395 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12397 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12398 adding cost. Record cost entry location.
12399 (vect_prologue_cost_for_slp_op): Function to compute cost of
12400 a constant or invariant generated for SLP vect in the prologue,
12401 split out from vect_analyze_slp_cost_1.
12402 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12403 (vect_model_promotion_demotion_cost): Likewise.
12404 (vect_model_store_cost): Likewise, make static.
12405 (vect_model_load_cost): Likewise.
12406 (vectorizable_bswap): Add cost vector arg and adjust.
12407 (vectorizable_call): Likewise.
12408 (vectorizable_simd_clone_call): Likewise.
12409 (vectorizable_conversion): Likewise.
12410 (vectorizable_assignment): Likewise.
12411 (vectorizable_shift): Likewise.
12412 (vectorizable_operation): Likewise.
12413 (vectorizable_store): Likewise.
12414 (vectorizable_load): Likewise.
12415 (vectorizable_condition): Likewise.
12416 (vectorizable_comparison): Likewise.
12417 (can_vectorize_live_stmts): Likewise.
12418 (vect_analyze_stmt): Likewise.
12419 (vect_transform_stmt): Adjust calls to vectorizable_*.
12420 * tree-vectorizer.c: Include gimple-pretty-print.h.
12421 (dump_stmt_cost): New function.
12423 2018-05-16 Richard Biener <rguenther@suse.de>
12425 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12426 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12427 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12428 (check_name): New callback.
12429 (dse_classify_store): Track cycles via a visited bitmap of PHI
12430 defs and simplify handling of in-loop and across loop dead stores
12431 and properly fail for loop-variant refs. Handle byte-tracking with
12432 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12435 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12437 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12438 (vect_get_mask_type_for_stmt): Likewise.
12439 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12441 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12442 to determine the statement's vector type and the vector type that
12443 should be used for calculating nunits. Deal with cases in which
12444 the type has to be deferred.
12445 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12446 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12447 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12448 (vect_determine_vf_for_stmt): New functions, split out from...
12449 (vect_determine_vectorization_factor): ...here.
12450 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12451 (vect_get_mask_type_for_stmt): New functions, split out from
12452 vect_determine_vectorization_factor.
12454 2018-05-16 Richard Biener <rguenther@suse.de>
12456 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12457 verify the [VEC_]COND_EXPR embedded comparison.
12459 2018-05-15 Martin Sebor <msebor@redhat.com>
12461 PR tree-optimization/85753
12462 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12463 RECORD_TYPE in addition to ARRAY_TYPE.
12465 2018-05-15 Martin Sebor <msebor@redhat.com>
12467 PR middle-end/85643
12468 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12470 2018-05-15 Richard Biener <rguenther@suse.de>
12472 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12473 add by_clobber_p one. Change algorithm to collect all defs
12474 representing uses we need to walk and try reducing them to
12475 a single one before failing.
12476 (dse_dom_walker::dse_optimize_stmt): Adjust.
12478 2018-05-13 Mark Wielaard <mark@klomp.org>
12480 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12481 (size_of_loc_descr): Likewise.
12482 (output_loc_operands): Likewise.
12483 (output_loc_operands_raw): Likewise.
12484 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12485 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12486 (hash_loc_operands): Likewise.
12487 (compare_loc_operands): Likewise.
12489 2018-05-14 Mark Wielaard <mark@klomp.org>
12491 * dwarf2out.c (count_index_addrs): New function.
12492 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12494 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12496 PR tree-optimization/83648
12497 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12498 return value as malloc candidate.
12500 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12503 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12504 param as true in call to suggest_attribute.
12506 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12508 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12509 -mreadonly-in-sdata.
12511 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12513 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12515 (aarch64_crypto_aesd_fused): Likewise.
12517 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12519 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12520 (movsi_aarch64): Likewise.
12521 (load_pairsi): Likewise.
12522 (load_pairdi): Likewise.
12523 (store_pairsi): Likewise.
12524 (store_pairdi): Likewise.
12525 (load_pairsf): Likewise.
12526 (load_pairdf): Likewise.
12527 (store_pairsf): Likewise.
12528 (store_pairdf): Likewise.
12529 (zero_extend): Likewise.
12530 (trunc): Swap alternatives.
12531 (fcvt_target): Add '?' to prefer w over r.
12533 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12536 * config/i386/i386.md: Disallow non-commutative arithmetics in
12537 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12538 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12539 in the peephole2 before it.
12541 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12543 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12544 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12545 (ix86_handle_option): Handle -mcldemote.
12546 * config.gcc: New header.
12547 * config/i386/cldemoteintrin.h: New file.
12548 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12549 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12551 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12552 OPTION_MASK_ISA_CLDEMOTE.
12553 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12554 (ix86_valid_target_attribute_inner_p): Ditto.
12555 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12556 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12557 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12558 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12559 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12561 * config/i386/i386.opt: Add -mcldemote.
12562 * config/i386/x86intrin.h: New header.
12563 * doc/invoke.texi: Add -mcldemote.
12565 2018-05-14 Richard Biener <rguenther@suse.de>
12567 * doc/match-and-simplify.texi: Adjust :s documentation.
12569 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12571 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12572 intended memcpy size.
12573 (REORDER_45): Likewise.
12575 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12577 * sort.cc: New file.
12578 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12579 * vec.c (qsort_chk): Use gcc_qsort.
12580 * Makefile.in (OBJS-libcommon): Add sort.o.
12581 (build/sort.o): New target. Use it...
12582 (BUILD_RTL): ... here, and...
12583 (build/gencfn-macros): ... here, and...
12584 (build/genmatch): ... here.
12586 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12587 Chung-Ju Wu <jasonwucj@gmail.com>
12589 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12590 * config/nds32/nds32-graywolf.md: New file.
12591 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12592 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12594 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12595 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12596 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12597 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12598 * config/nds32/pipelines.md: Include n15 settings.
12600 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12601 Chung-Ju Wu <jasonwucj@gmail.com>
12603 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12604 * config/nds32/nds32-n13.md: New file.
12605 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12606 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12608 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12609 * config/nds32/nds32.md (pipeline_model): Add n13.
12610 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12611 * config/nds32/pipelines.md: Include n13 settings.
12613 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12614 Chung-Ju Wu <jasonwucj@gmail.com>
12616 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12617 * config/nds32/nds32-n10.md: New file.
12618 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12619 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12621 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12622 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12623 * config/nds32/nds32.md (pipeline_model): Add n10.
12624 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12625 * config/nds32/pipelines.md: Include n10 settings.
12627 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12628 Kito Cheng <kito.cheng@gmail.com>
12629 Chung-Ju Wu <jasonwucj@gmail.com>
12631 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12632 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12633 Add enum values for DSP extension instructions.
12634 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12636 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12637 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12638 New code iterators.
12639 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12640 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12641 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12642 * config/nds32/nds32-intrinsic.md: Likewise.
12643 * config/nds32/nds32_intrinsic.h: Likewise.
12644 * config/nds32/nds32-md-auxiliary.c: Likewise.
12645 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12646 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12647 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12648 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12649 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12650 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12651 TYPE_DMAC in switch statement.
12652 * config/nds32/nds32.c: New checking and implementation for DSP
12653 extension instructions.
12654 * config/nds32/nds32.h: Likewise.
12655 * config/nds32/nds32.md: Likewise.
12656 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12657 * config/nds32/predicates.md: Implement new predicates for DSP
12660 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12662 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12663 Reformat alternatives and attributes so it is easier to identify
12664 which constraints/attributes go with which instruction.
12665 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12666 (mov<mode>_softfloat32, FMOVE64): Likewise.
12667 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12668 (mov<mode>_softfloat64, FMOVE64): Likewise.
12670 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12672 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12674 (Basic PowerPC Built-in Functions): The new name of the
12675 subsection previously known as "PowerPC Built-in Functions".
12676 (Basic PowerPC Built-in Functions Available on all Configurations):
12678 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12679 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12680 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12681 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12683 2018-05-11 Martin Jambor <mjambor@suse.cz>
12686 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12689 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12692 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12694 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12696 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12697 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12698 (ix86_handle_option): Handle -mwaitpkg.
12699 * config.gcc: New header.
12700 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12701 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12702 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12704 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12705 OPTION_MASK_ISA_WAITPKG.
12706 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12707 (ix86_option_override_internal): Add PTA_WAITPKG.
12708 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12709 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12710 IX86_BUILTIN_TPAUSE.
12711 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12712 __builtin_ia32_umwait and __builtin_ia32_tpause.
12713 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12714 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12715 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12716 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12717 UNSPECV_TPAUSE): New.
12718 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12719 * config/i386/i386.opt: Add -mwaitpkg.
12720 * config/i386/waitpkgintrin.h: New file.
12721 * config/i386/x86intrin.h: New header.
12722 * doc/invoke.texi: Add -mwaitpkg.
12724 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12727 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12729 (cortex-m0): Use armv6s-m isa.
12730 (cortex-m0plus): Likewise.
12731 (cortex-m1): Likewise.
12732 (cortex-m0.small-multiply): Likewise.
12733 (cortex-m0plus.small-multiply): Likewise.
12734 (cortex-m1.small-multiply): Likewise.
12736 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12737 Jakub Jelinek <jakub@redhat.com>
12739 PR tree-optimization/85692
12740 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12741 source permute as well.
12743 2018-05-11 Martin Liska <mliska@suse.cz>
12746 * doc/extend.texi: Document LLVM style format for no_sanitize
12749 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12751 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12752 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12753 (mode_supports_vsx_dform_quad): Likewise.
12754 (mode_supports_vmx_dform): Move these functions to be next to the
12755 other mode_supports functions.
12756 (mode_supports_dq_form): Likewise.
12757 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12758 mode_supports_dq_form.
12759 (reg_offset_addressing_ok_p): Likewise.
12760 (offsettable_ok_by_alignment): Likewise.
12761 (rs6000_legitimate_offset_address_p): Likewise.
12762 (legitimate_lo_sum_address_p): Likewise.
12763 (rs6000_legitimize_address): Likewise.
12764 (rs6000_legitimize_reload_address): Likewise.
12765 (rs6000_secondary_reload_inner): Likewise.
12766 (rs6000_preferred_reload_class): Likewise.
12767 (rs6000_output_move_128bit): Likewise.
12769 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12771 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12772 Generate SImode target register for null target.
12773 <case IX86_BUILTIN_XGETBV>: Ditto.
12774 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12775 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12777 2018-05-10 Carl Love <cel@us.ibm.com>
12779 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12780 dcbtt and dcbtstt if operands[2] is 0.
12782 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12785 * config/i386/sse.md (usadv64qi): New expander.
12787 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12789 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12790 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12791 -maltivec=be support.
12792 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12793 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12794 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12795 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12796 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12797 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12798 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12799 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12800 altivec_vsumsws): Adjust.
12801 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12802 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12803 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12805 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12806 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12807 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12808 (altivec_lve<VI_char>x): Delete expand.
12809 (*altivec_lve<VI_char>x_internal): Rename to...
12810 (altivec_lve<VI_char>x): ... this.
12811 (altivec_lvxl_<mode>): Delete expand.
12812 (*altivec_lvxl_<mode>_internal): Rename to ...
12813 (altivec_lvxl_<mode>): ... this.
12814 (altivec_stvxl_<mode>): Delete expand.
12815 (*altivec_stvxl_<mode>_internal): Rename to ...
12816 (altivec_stvxl_<mode>): ... this.
12817 (altivec_stve<VI_char>x): Delete expand.
12818 (*altivec_stve<VI_char>x_internal): Rename to ...
12819 (altivec_stve<VI_char>x): ... this.
12820 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12821 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12822 reduc_plus_scal_<mode>): Adjust.
12823 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12825 (rs6000_cpu_cpp_builtins): Adjust.
12826 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12827 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12828 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12829 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12830 -maltivec=be support.
12831 (rs6000_split_vec_extract_var): Adjust.
12832 (rs6000_split_v4si_init): Adjust.
12833 (swap_selector_for_mode): Delete.
12834 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12835 altivec_expand_stvex_be): Delete.
12836 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12837 -maltivec=be support.
12838 (rs6000_gimple_fold_builtin): Ditto.
12839 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12841 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12842 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12843 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12844 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12845 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12846 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12847 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12848 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12849 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12850 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12851 anonymous split): Adjust.
12852 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12853 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12855 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12857 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12858 when --with-gxx-include-dir is also specified.
12859 * configure: Regenerate.
12861 2018-05-09 Jim Wilson <jimw@sifive.com>
12864 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12865 * config/riscv/t-withmultilib: New.
12866 * config/riscv/withmultilib.h: New.
12867 * doc/install.texi: Document RISC-V --with-multilib-list support.
12869 2018-05-09 Richard Biener <rguenther@suse.de>
12871 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12873 (vect_bb_vectorization_profitable_p): Adjust. Compute
12874 actual scalar cost using the cost vector and the add_stmt_cost
12877 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12879 PR rtl-optimization/85645
12880 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12881 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12883 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12885 PR rtl-optimization/85645
12886 * shrink-wrap.c (spread_components): Return a boolean saying if
12887 anything was changed.
12888 (try_shrink_wrapping_separate): Iterate spread_components until
12889 nothing changes anymore.
12891 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12893 PR rtl-optimization/85645
12894 * regrename.c (build_def_use): Also kill the chains that include the
12895 destination of a REG_CFA_REGISTER note.
12897 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12899 PR rtl-optimization/85645
12900 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12901 insn that has a REG_CFA_REGISTER note.
12903 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12905 * cfgexpand.c (expand_clobber): New function.
12906 (expand_gimple_stmt_1): Use it.
12907 * tree-vect-stmts.c (vect_clobber_variable): New function,
12909 (vectorizable_simd_clone_call): ...here.
12910 (vectorizable_store): Emit a clobber either side of an
12911 IFN_STORE_LANES sequence.
12912 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12914 2018-05-09 Tom de Vries <tom@codesourcery.com>
12917 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12918 (define_insn "trap_if_false"): Add exit after trap.
12920 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12922 PR rtl-optimization/85638
12923 * bb-reorder.c: Include common/common-target.h.
12924 (create_forwarder_block): New function extracted from...
12925 (fix_up_crossing_landing_pad): ...here. Rename into...
12926 (dw2_fix_up_crossing_landing_pad): ...this.
12927 (sjlj_fix_up_crossing_landing_pad): New function.
12928 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12929 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12930 from both partitions and exit the loop after one iteration.
12932 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12935 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12937 (Basic PowerPC Built-in Functions): The new name of the
12938 subsection previously known as "PowerPC Built-in Functions".
12939 (Basic PowerPC Built-in Functions Available on all Configurations):
12941 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12943 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12945 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12947 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12950 2018-05-08 Jim Wilson <jimw@sifive.com>
12952 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12953 (LD_EMUL_SUFFIX): New.
12954 (LINK_SPEC): Use it.
12956 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12958 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12960 (Basic PowerPC Built-in Functions): The new name of the
12961 subsection previously known as "PowerPC Built-in Functions".
12962 (Basic PowerPC Built-in Functions Available on all Configurations):
12964 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12966 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12968 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12970 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12973 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12976 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12977 after cmpelim optimization.
12979 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12981 * config.gcc: Support "goldmont".
12982 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12983 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12984 PROCESSOR_GOLDMONT.
12985 * config/i386/i386.c (m_GOLDMONT): Define.
12986 (processor_target_table): Add "goldmont".
12987 (PTA_GOLDMONT): Define.
12988 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12989 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12990 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12991 (fold_builtin_cpu): Add "goldmont".
12992 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12993 (ix86_option_override_internal): Add "goldmont".
12994 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12995 (processor_type): Add PROCESSOR_GOLDMONT.
12996 * config/i386/i386.md: Add CPU "glm".
12997 * config/i386/glm.md: New file.
12998 * config/i386/x86-tune.def: Add m_GOLDMONT.
12999 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13001 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13004 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13006 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13007 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13008 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13011 * config/i386/i386.c (ix86_fold_builtin): Handle
13012 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13015 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13016 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13018 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13021 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13022 (check_arch): Likewise.
13023 (check_fpu): Return the result rather than printing it.
13024 (end arch): Fix operator precedence.
13025 (end cpu): Likewise.
13026 (END): Print the result from check_fpu.
13028 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13029 Alan Hayward <alan.hayward@arm.com>
13030 David Sherwood <david.sherwood@arm.com>
13032 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13033 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13034 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13035 (*fcmuo<mode>_and): New patterns.
13037 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13039 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13040 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13041 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13042 (cmp_op, sve_imm_con): New code attributes.
13043 (SVE_COND_INT_CMP, imm_con): Delete.
13044 (cmp_op): Remove above unspecs from int attribute.
13045 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13047 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13048 comparison-specific unspecs.
13049 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13050 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13051 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13052 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13053 (*vec_fcm<cmp_op><mode>): Rename to...
13054 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13055 (*vec_fcmuo<mode>): Rename to...
13056 (*fcmuo<mode>): ...this and adjust likewise.
13057 (*pred_fcm<cmp_op><mode>): New pattern.
13058 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13059 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13061 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13063 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13064 (aarch64_emit_sve_predicated_cond): New function.
13065 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13066 (aarch64_emit_unspec_cond_or): Replace with...
13067 (aarch64_emit_sve_or_conds): ...this new function. Use
13068 aarch64_emit_sve_ptrue_op for the individual comparisons and
13069 aarch64_emit_binop to OR them together.
13070 (aarch64_emit_inverted_unspec_cond): Replace with...
13071 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13072 aarch64_emit_sve_ptrue_op for the comparison and
13073 aarch64_emit_unop to invert the result.
13074 (aarch64_expand_sve_vec_cmp_float): Update after the above
13075 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13077 2018-05-07 Nathan Sidwell <nathan@acm.org>
13079 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13080 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13081 (Backwards Compatibility): Likewise.
13083 2018-05-07 Luis Machado <luis.machado@linaro.org>
13087 2018-05-07 Luis Machado <luis.machado@linaro.org>
13089 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13090 <prefetch_dynamic_strides>: New const bool field.
13091 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13092 prefetch_dynamic_strides.
13093 (exynosm1_prefetch_tune): Likewise.
13094 (thunderxt88_prefetch_tune): Likewise.
13095 (thunderx_prefetch_tune): Likewise.
13096 (thunderx2t99_prefetch_tune): Likewise.
13097 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13099 (aarch64_override_options_internal): Update to set
13100 PARAM_PREFETCH_DYNAMIC_STRIDES.
13101 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13102 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13103 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13104 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13105 prefetch-dynamic-strides setting.
13107 2018-05-07 Luis Machado <luis.machado@linaro.org>
13109 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13110 <minimum_stride>: New const int field.
13111 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13112 minimum_stride field.
13113 (exynosm1_prefetch_tune): Likewise.
13114 (thunderxt88_prefetch_tune): Likewise.
13115 (thunderx_prefetch_tune): Likewise.
13116 (thunderx2t99_prefetch_tune): Likewise.
13117 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13118 (aarch64_override_options_internal): Update to set
13119 PARAM_PREFETCH_MINIMUM_STRIDE.
13120 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13121 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13122 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13123 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13124 stride is constant and is below the minimum stride threshold.
13126 2018-05-07 Luis Machado <luis.machado@linaro.org>
13128 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13131 2018-05-07 Luis Machado <luis.machado@linaro.org>
13133 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13134 <prefetch_dynamic_strides>: New const bool field.
13135 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13136 prefetch_dynamic_strides.
13137 (exynosm1_prefetch_tune): Likewise.
13138 (thunderxt88_prefetch_tune): Likewise.
13139 (thunderx_prefetch_tune): Likewise.
13140 (thunderx2t99_prefetch_tune): Likewise.
13141 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13143 (aarch64_override_options_internal): Update to set
13144 PARAM_PREFETCH_DYNAMIC_STRIDES.
13145 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13146 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13147 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13148 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13149 prefetch-dynamic-strides setting.
13151 2018-05-07 Luis Machado <luis.machado@linaro.org>
13153 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13154 <minimum_stride>: New const int field.
13155 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13156 minimum_stride field.
13157 (exynosm1_prefetch_tune): Likewise.
13158 (thunderxt88_prefetch_tune): Likewise.
13159 (thunderx_prefetch_tune): Likewise.
13160 (thunderx2t99_prefetch_tune): Likewise.
13161 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13162 (aarch64_override_options_internal): Update to set
13163 PARAM_PREFETCH_MINIMUM_STRIDE.
13164 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13165 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13166 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13167 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13168 stride is constant and is below the minimum stride threshold.
13170 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13173 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13174 the type is addressable. Don't force op into register if it has
13177 2018-05-05 Roland McGrath <mcgrathr@google.com>
13180 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13181 any section for which we don't know a specific type it should have,
13182 regardless of name. Previously this was done only for the exact
13183 names ".init_array", ".fini_array", and ".preinit_array".
13184 (default_elf_asm_named_section): Add comment about
13185 relationship with default_section_type_flags and SECTION_NOTYPE.
13186 (get_section): Don't consider it a type conflict if one side has
13187 SECTION_NOTYPE and the other doesn't, as long as neither has the
13188 SECTION_BSS et al used in the default_section_type_flags logic.
13190 2018-05-05 Tom de Vries <tom@codesourcery.com>
13193 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13194 (workaround_barsyncs): New function.
13195 (nvptx_reorg): Use workaround_barsyncs.
13196 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13197 (define_expand "nvptx_membar_cta"): New define_expand.
13198 (define_insn "*nvptx_membar_cta"): New insn.
13200 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13202 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13203 To improve optimization opportunities.
13204 * builtin-types.def: The new needed builtin types for the above.
13206 2018-05-04 Richard Biener <rguenther@suse.de>
13208 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13209 * gimple-ssa-store-merging.c
13210 (imm_store_chain_info::output_merged_store): Remove redundant create,
13211 release split_store vector contents on failure.
13212 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13213 scalar stmt vector on cache hit.
13215 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13217 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13219 * config.gcc (powerpc-xilinx-eabi*): Remove.
13220 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13222 (fusion_addis_mem_combo_load): Ditto.
13223 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13225 (rs6000_cpu_cpp_builtins): Ditto.
13226 * config/rs6000/rs6000-linux.c
13227 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13228 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13229 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13231 (rs6000_setup_reg_addr_masks): Ditto.
13232 (rs6000_init_hard_regno_mode_ok): Ditto.
13233 (rs6000_option_override_internal): Ditto.
13234 (legitimate_lo_sum_address_p): Ditto.
13235 (rs6000_legitimize_address): Ditto.
13236 (rs6000_legitimize_reload_address): Ditto.
13237 (rs6000_legitimate_address_p): Ditto.
13238 (abi_v4_pass_in_fpr): Ditto.
13239 (setup_incoming_varargs): Ditto.
13240 (rs6000_gimplify_va_arg): Ditto.
13241 (rs6000_split_multireg_move): Ditto.
13242 (rs6000_savres_strategy): Ditto.
13243 (rs6000_emit_prologue_components): Ditto.
13244 (rs6000_emit_epilogue_components): Ditto.
13245 (rs6000_emit_prologue): Ditto.
13246 (rs6000_emit_epilogue): Ditto.
13247 (rs6000_elf_file_end): Ditto.
13248 (rs6000_function_value): Ditto.
13249 (rs6000_libcall_value): Ditto.
13250 * config/rs6000/rs6000.h: Ditto.
13251 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13252 (TARGET_MINMAX): ... this. New.
13253 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13254 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13255 (*movsi_internal1_single): Delete.
13256 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13257 mfpu=, mxilinx-fpu): Delete.
13258 * config/rs6000/singlefp.h: Delete.
13259 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13260 * config/rs6000/t-rs6000: Ditto.
13261 * config/rs6000/t-xilinx: Delete.
13262 * config/rs6000/titan.md: Adjust for fp_type removal.
13263 * config/rs6000/vsx.md: Remove Xilinx FP support.
13264 (VStype_simple): Delete.
13265 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13266 * config/rs6000/xfpu.h: Delete.
13267 * config/rs6000/xfpu.md: Delete.
13268 * config/rs6000/xilinx.h: Delete.
13269 * config/rs6000/xilinx.opt: Delete.
13270 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13271 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13273 2018-05-04 Tom de Vries <tom@codesourcery.com>
13276 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13279 2018-05-04 Richard Biener <rguenther@suse.de>
13281 PR middle-end/85627
13282 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13283 (expand_complex_div_wide): Likewise.
13284 (expand_complex_operations_1): Likewise.
13285 (expand_complex_libcall): Preserve EH info of the original stmt.
13286 (tree_lower_complex): Handle removed blocks.
13287 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13288 on complex multiplication and division libcall builtins.
13290 2018-05-04 Richard Biener <rguenther@suse.de>
13292 PR middle-end/85574
13293 * fold-const.c (negate_expr_p): Restrict negation of operand
13294 zero of a division to when we know that can happen without
13296 (fold_negate_expr_1): Likewise.
13298 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13301 * real.h (real_nextafter): Declare.
13302 * real.c (real_nextafter): New function.
13303 * fold-const-call.c (fold_const_nextafter): New function.
13304 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13305 CASE_CFN_NEXTTOWARD.
13306 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13307 even when arg1_mode is different from arg0_mode.
13309 2018-05-03 Nathan Sidwell <nathan@acm.org>
13311 * doc/extend.texi (Deprecated Features): Remove
13312 -ffriend-injection.
13313 (Backwards Compatibility): Likewise.
13314 * doc/invoke.texi (C++ Language Options): Likewise.
13315 (C++ Dialect Options): Likewise.
13317 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13320 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13321 _mm512_mask_mullox_epi64): New intrinsics.
13323 2018-05-03 Tom de Vries <tom@codesourcery.com>
13326 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13327 dump files): Add offload-tree.
13329 2018-05-03 Richard Biener <rguenther@suse.de>
13331 PR tree-optimization/85615
13332 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13333 to loops not nested in BBs loop father to avoid creating multi-entry
13336 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13338 PR tree-optimization/70291
13339 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13340 arguments. Change return type to tree. Emit libcall as a new
13341 statement rather than replacing existing one when inplace_p is true.
13342 (expand_complex_multiplication_components): New function.
13343 (expand_complex_multiplication): Expand floating-point complex
13344 multiplication using the above.
13345 (expand_complex_division): Rename inner_type parameter to type.
13346 Update expand_complex_libcall call-site.
13347 (expand_complex_operations_1): Update expand_complex_multiplication
13348 and expand_complex_division call-sites.
13350 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13353 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13354 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13355 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13356 the highest significant bit of the shift count mask is clear. In
13357 check whether and[sq]i3 is needed verify that all significant bits
13358 of the shift count other than the highest are set.
13360 2018-05-02 Tom de Vries <tom@codesourcery.com>
13363 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13364 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13365 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13366 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13367 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13368 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13369 __builtin_goacc_parlevel_size.
13371 2018-05-02 Richard Biener <rguenther@suse.de>
13373 PR tree-optimization/85597
13374 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13375 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13378 2018-05-02 Tom de Vries <tom@codesourcery.com>
13381 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13382 dump files): Add ltrans-tree.
13384 2018-05-02 Tom de Vries <tom@codesourcery.com>
13387 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13388 dump files): Add wpa-ipa.
13390 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13392 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13393 powerpc*-*-linux*paired* target.
13394 * config/rs6000/750cl.h: Delete.
13395 * config/rs6000/paired.h: Delete.
13396 * config/rs6000/paired.md: Delete.
13397 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13399 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13400 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13401 comment. Remove paired float support.
13402 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13403 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13405 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13406 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13408 * config/rs6000/rs6000.c: Remove paired float support.
13409 (paired_expand_vector_init, paired_expand_vector_move,
13410 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13411 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13412 paired_expand_builtin, paired_expand_predicate_builtin,
13413 paired_init_builtins): Delete.
13414 * config/rs6000/rs6000.h: Remove paired float support.
13415 * config/rs6000/rs6000.md: Remove paired float support.
13416 (move_from_CR_ov_bit): Delete.
13417 * config/rs6000/rs6000.opt (mpaired): Delete.
13418 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13419 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13421 2018-05-02 Richard Biener <rguenther@suse.de>
13423 PR middle-end/85567
13424 * gimplify.c (gimplify_save_expr): When in SSA form allow
13425 SAVE_EXPRs to compute to SSA vars.
13427 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13430 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13431 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13432 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13433 clobber operands[2], instead use a new pseudo. Formatting fixes.
13435 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13437 PR tree-optimization/85586
13438 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13439 exit early for statements in the same group if the accesses are
13442 2018-05-02 Tom de Vries <tom@codesourcery.com>
13445 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13448 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13450 PR tree-optimization/85143
13451 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13453 2018-05-01 Tom de Vries <tom@codesourcery.com>
13456 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13457 not found" error message.
13459 2018-05-01 Tom de Vries <tom@codesourcery.com>
13462 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13463 * vec.c (test_ordered_remove_if): New function.
13464 (vec_c_tests): Call test_ordered_remove_if.
13465 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13466 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13467 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13468 VEC_ORDERED_REMOVE_IF.
13470 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13472 PR tree-optimization/82665
13473 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13474 pointer subtraction where arguments come from a memchr call.
13476 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13478 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13479 --push-state --as-needed and --pop-state instead of --as-needed and
13480 --no-as-needed if ld supports it.
13481 * configure: Regenerated.
13484 * doc/install.texi2html: Replace _002d with - and _002a with * in
13485 generated html files using sed.
13487 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13490 * gcc-rich-location.c (blank_line_before_p): New function.
13491 (use_new_line): New function.
13492 (gcc_rich_location::add_fixit_insert_formatted): New function.
13493 * gcc-rich-location.h
13494 (gcc_rich_location::add_fixit_insert_formatted): New function.
13496 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13498 * selftest.c (assert_streq): Rename "expected" and "actual" to
13499 "val1" and "val2". Extend NULL-handling to cover both inputs
13500 symmetrically, while still requiring both to be non-NULL for a pass.
13501 * selftest.h (assert_streq): Rename "expected" and "actual" to
13503 (ASSERT_EQ): Likewise.
13504 (ASSERT_EQ_AT): Likewise.
13505 (ASSERT_KNOWN_EQ): Likewise.
13506 (ASSERT_KNOWN_EQ_AT): Likewise.
13507 (ASSERT_NE): Likewise.
13508 (ASSERT_MAYBE_NE): Likewise.
13509 (ASSERT_MAYBE_NE_AT): Likewise.
13510 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13511 the assertion to pass.
13512 (ASSERT_STREQ_AT): Likewise.
13514 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13516 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13517 interaction with -pie.
13519 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13521 * selftest.h: Fix alphabetization of per-source-file selftest
13524 2018-04-30 Jason Merrill <jason@redhat.com>
13526 PR c++/61982 - dead stores to destroyed objects.
13527 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13530 2018-04-30 Jason Merrill <jason@redhat.com>
13532 * tree.c (build_clobber): New.
13533 * tree.h: Declare it.
13534 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13536 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13538 * diagnostic-show-locus.c (layout::layout): Update for
13539 location_get_source_line returning a char_span.
13540 (struct char_span): Move to input.h.
13541 (struct correction): Update for fields in char_span becoming
13543 (struct source_line): Update for location_get_source_line
13544 returning a char_span.
13545 (layout::print_line): Likewise.
13546 * edit-context.c (edited_file::print_content): Likewise.
13547 (edited_file::print_diff_hunk): Likewise.
13548 (edited_file::print_run_of_changed_lines): Likewise.
13549 (edited_file::get_num_lines): Likewise.
13550 (edited_line::edited_line): Likewise.
13551 * final.c (asm_show_source): Likewise.
13552 * input.c (location_get_source_line): Convert return type
13553 from const char * to char_span, losing the final "line_len"
13555 (dump_location_info): Update for the above.
13556 (get_substring_ranges_for_loc): Likewise. Use a char_span
13557 when handling the literal within the line.
13558 (test_reading_source_line): Update for location_get_source_line
13559 returning a char_span.
13560 * input.h (class char_span): Move here from
13561 diagnostic-show-locus.c, converting from a struct to a class.
13562 Make data members private.
13563 (char_span::operator bool): New.
13564 (char_span::length): New.
13565 (char_span::get_buffer): New.
13566 (char_span::operator[]): New.
13567 (char_span::subspan): Make const.
13568 (char_span::xstrdup): New.
13569 (location_get_source_line): Convert return type from const char *
13570 to char_span, losing the final "line_size" param.
13572 2018-04-30 Jan Hubicka <jh@suse.cz>
13574 * lto-wrapper.c (ltrans_priorities): New static var.
13575 (cmp_priority): New.
13576 (run_gcc): Read priorities and if doing parallel build order
13577 the Makefile by them.
13579 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13581 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13583 2018-04-30 Richard Biener <rguenther@suse.de>
13585 * tree-cfg.c (verify_address): Remove base argument, add
13586 flag whether to check TREE_ADDRESSABLE and do that.
13587 (verify_expr): Remove.
13588 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13589 (verify_gimple_assign_single): Likewise.
13590 (verify_gimple_switch): Likewise.
13591 (verify_expr_location_1): Dereference tp once. Add (disabled)
13592 piece from verify_expr.
13593 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13595 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13597 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13599 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13601 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13602 (small_data_pattern): Likewise.
13603 (arc_rewrite_small_data): Likewise.
13604 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13605 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13606 (get_symbol_alignment): New function.
13607 (legitimate_small_data_address_p): Likewise.
13608 (legitimate_scaled_address): Update, call
13609 legitimate_small_data_address_p.
13610 (output_sdata): New static variable.
13611 (arc_print_operand): Update how we handle small data operands.
13612 (arc_print_operand_address): Likewise.
13613 (arc_legitimate_address_p): Update, use
13614 legitimate_small_data_address_p.
13615 (arc_rewrite_small_data_p): Remove.
13616 (arc_rewrite_small_data_1): Likewise.
13617 (arc_rewrite_small_data): Likewise.
13618 (small_data_pattern): Likewise.
13619 (compact_sda_memory_operand): Update to use
13620 legitimate_small_data_address_p and get_symbol_alignment.
13621 (prepare_move_operands): Don't rewite sdata pattern.
13622 (prepare_extend_operands): Remove.
13623 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13625 (zero_extendqisi2): Likewise.
13626 (zero_extendhisi2): Likewise.
13627 (extendqihi2): Likewise.
13628 (extendqisi2): Likewise.
13629 (extendhisi2): Likewise.
13630 (addsi3): Likewise.
13631 (subsi3): Likewise.
13632 (andsi3): Likewise.
13633 * config/arc/constraints.md (Usd): Change it to memory constraint.
13635 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13637 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13638 as source of std instructions.
13639 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13640 allow 6-bit constants as source for store instructions.
13641 (movdi_insn): Update instruction pattern to allow 6-bit constants
13642 as source for store instructions.
13644 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13646 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13648 2018-04-30 Nathan Sidwell <nathan@acm.org>
13649 Sandra Loosemore <sandra@codesourcery.com>
13651 * dumpfile.c (dump_open): Allow '-' for stdout.
13652 * doc/invoke.texi (Developer Options): Document dump filename
13653 determination early. Document stdin/stdout selection.
13655 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13657 Microblaze Target: PIC data text relative
13659 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13660 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13662 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13663 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13664 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13665 New addressing mode for data-text relative position indepenedent code.
13666 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13667 'ADDRESS_SYMBOLIC_TXT_REL'.
13668 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13669 (microblaze_legitimate_pic_operand): Exclude function calls from
13670 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13671 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13673 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13674 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13675 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13676 for 'address + offset'.
13677 (microblaze_expand_prologue): Add new function prologue call for
13679 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13680 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13681 table in case of TARGET_PIC_DATA_TEXT_REL.
13682 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13683 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13684 Add new macros 'UNSPEC_TEXT',
13685 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13686 + exclude function calls from 'UNSPEC_PLT' in case of data text
13688 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13689 new target hook for generating address diff vector tables in case of
13691 * doc/tm.texi : Regenerate.
13692 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13693 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13694 of addr diff vector generation.
13695 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13696 target hook definition.
13697 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13698 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13699 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13700 option for data text relative.
13702 2018-04-30 Richard Biener <rguenther@suse.de>
13704 * tree-chrec.h (evolution_function_is_constant_p): Remove
13706 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13708 2018-04-30 Richard Biener <rguenther@suse.de>
13711 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13713 2018-04-30 Richard Biener <rguenther@suse.de>
13715 PR tree-optimization/28364
13716 PR tree-optimization/85275
13717 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13718 copying first exit test.
13720 2018-04-28 Mark Wielaard <mark@klomp.org>
13722 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13723 dwarf_version >= 5.
13724 (dwarf_AT): Handle DW_AT_addr_base.
13725 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13727 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13730 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13731 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13732 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13733 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13735 2018-04-28 Richard Biener <rguenther@suse.de>
13737 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13738 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13739 to reflect use. Only add interesting stmts.
13741 2018-04-27 Martin Jambor <mjambor@suse.cz>
13744 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13745 the jump function allows for passing through aggregate values.
13747 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13749 * input.h (in_system_header_at): Convert from macro to inline
13751 (from_macro_expansion_at): Likewise.
13752 (from_macro_definition_at): Likewise.
13754 2018-04-27 Jeff Law <law@redhat.com>
13756 * config.gcc: Mark tile* targets as deprecated/obsolete.
13758 2018-04-27 Richard Biener <rguenther@suse.de>
13760 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13763 2018-04-27 Richard Biener <rguenther@suse.de>
13765 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13767 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13769 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13770 with Yd constraint. Set "preferred_for_speed" attribute from
13771 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13772 with Yd constraint.
13773 (*movdi_internal): Ditto.
13774 (movti_interunit splitters): Remove
13775 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13776 (movdi_interunit splitters): Ditto.
13777 * config/i386/constraints.md (Ye): Remove.
13778 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13780 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13783 * config/aarch64/constraints.md (Usg): Limit to 31.
13784 (Usj): Limit to 63.
13786 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13788 PR tree-optimization/85529
13789 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13790 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13791 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13792 zero extension or masking of the MSB bit.
13793 (optimize_range_tests): Add FIRST_BB argument, pass it through
13794 to optimize_range_tests_var_bound.
13795 (maybe_optimize_range_tests, reassociate_bb): Adjust
13796 optimize_range_tests callers.
13798 2018-04-26 Richard Biener <rguenther@suse.de>
13799 Jakub Jelinek <jakub@redhat.com>
13801 * cgraph.h (symbol_table): Just declare debug method here.
13802 * symtab.c (symbol_table::debug): Define.
13804 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13806 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13808 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13810 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13811 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13812 (*movdi_internal): Substitute Yi and Yj constraint with x
13813 and Ym and Yn constraint with y constraint. Update "isa"
13814 attribute and set "preferred_for_speed" attribute from
13815 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13816 (*movsi_internal): Ditto.
13817 (*movdf_internal): Ditto.
13818 (*movsf_internal): Ditto.
13819 (*zero_extendsidi2): Ditto.
13820 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13821 (sse2_loadld): Ditto.
13822 (*vec_extract<ssevecmodelower>_0): Ditto.
13823 (*vec_extractv4si_0_zext_sse4): Ditto.
13824 (vec_concatv2di): Ditto.
13825 (*vec_dup<mode>): Ditto.
13826 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13827 * config/i386/constraints.md (Yi): Remove.
13832 2018-04-26 Nathan Sidwell <nathan@acm.org>
13834 * dumpfile.c (dump_open): New.
13835 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13836 (dump_finish): Detect stdio/stderr by value not name.
13838 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13840 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13842 2018-04-26 Tom de Vries <tom@codesourcery.com>
13845 * config/nvptx/nvptx.c (verify_neutering_jumps)
13846 (verify_neutering_labels): New function
13847 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13849 2018-04-26 Tom de Vries <tom@codesourcery.com>
13852 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13853 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13856 2018-04-26 Richard Biener <rguenther@suse.de>
13857 Tom de Vries <tom@codesourcery.com>
13860 * lto-streamer-out.c (output_function): Fixup loops if required to match
13861 discovery done in the reader.
13863 2018-04-26 Richard Biener <rguenther@suse.de>
13865 PR tree-optimization/85116
13866 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13867 have a loop exit from the single latch predecessor. Remove
13868 case of header with just condition.
13869 (ch_base::copy_headers): Exclude infinite loops from any
13871 (pass_ch::execute): Record exits.
13873 2018-04-26 Richard Biener <rguenther@suse.de>
13875 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13876 prologue cost vector and pass it to vect_get_load_cost.
13877 (vect_get_peeling_costs_all_drs): Likewise.
13878 (vect_peeling_hash_get_lowest_cost): Likewise.
13879 (vect_enhance_data_refs_alignment): Likewise.
13881 2018-04-26 Richard Biener <rguenther@suse.de>
13883 PR middle-end/85450
13884 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13885 checking of integer<->pointer conversions.
13886 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13887 sign-/zero-extending pointer types.
13888 (expand_omp_for_static_chunk): Likewise.
13890 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13891 Jean Lee <xiaoyur347@gmail.com>
13893 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13894 (TARGET_ASAN_SHADOW_OFFSET): Define.
13895 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13896 true for -fsanitize=address.
13898 2018-04-25 Mark Wielaard <mark@klomp.org>
13900 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13903 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13905 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13906 than "alu", remove explicit "memory" and "imm_disp" attributes.
13907 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13909 PR middle-end/85414
13910 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13911 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13912 gen_lowpart_no_emit.
13914 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13917 * config/i386/i386.c (ix86_expand_builtin): Change memory
13918 operand to XI, extend p0 to Pmode.
13919 * config/i386/i386.md: Change unspec volatile and operand
13920 1 mode to XI, change operand 0 mode to P.
13922 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13924 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13925 GET_MODE_MASK before any checking.
13926 (nds32_can_use_bset_p): Likewise.
13927 (nds32_can_use_btgl_p): Likewise.
13929 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13931 * config/nds32/nds32-doubleword.md: New define_split pattern for
13932 illegal register number.
13934 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13936 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13938 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13940 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13942 2018-04-25 Richard Biener <rguenther@suse.de>
13944 * lto-streamer.h (LTO_major_version): Bump to 8.
13946 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13948 * BASE-VER: Set to 9.0.0.
13950 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13952 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13953 in __abskf2 and __powikf2.
13955 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13958 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13959 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13960 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13961 Use the above on operand 2. Reindent.
13962 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13964 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13967 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13969 * config/i386/i386.opt (mcet): Removed.
13970 * doc/install.texi: Remove -mcet documentation.
13971 * doc/invoke.texi: Likewise.
13973 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13976 * doc/install.texi: Remove -mcet from bootstrap-cet.
13978 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13981 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13982 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13986 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13987 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13988 containing a CONST_VECTOR.
13990 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13992 * doc/install.texi: Update newlib dependency for nvptx.
13994 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13997 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13998 instead of INTVAL when shifting x left.
14000 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14002 PR tree-optimization/85478
14003 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14004 vect_grouped_store_supported for single element vectors.
14006 2018-04-24 Richard Biener <rguenther@suse.de>
14009 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14010 load cost increase to the case of non-constant step.
14012 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14015 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14016 destination if any_malformed_asm.
14018 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14020 PR middle-end/85496
14021 * expr.c (store_field): In the bitfield case, if the value comes from
14022 a function call and is returned in registers by means of a PARALLEL,
14023 do not change the mode of the temporary unless BLKmode and VOIDmode.
14025 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14027 PR rtl-optimization/85423
14028 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14029 dependencies to debug insns when the previous insn is non-debug.
14031 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14033 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14034 enums into a single definition.
14035 (fls): Fix predicates and printing.
14038 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14040 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14041 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14042 and short u6 immediate.
14043 (check_if_valid_sleep_operand): Remove.
14044 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14046 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14048 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14049 flag_always_save_lp condition.
14050 * config/nds32/nds32.opt (malways-save-lp): New option.
14052 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14054 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14055 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14056 * config/nds32/nds32.h
14057 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14058 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14060 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14062 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14063 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14065 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14066 Chung-Ju Wu <jasonwucj@gmail.com>
14068 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14070 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14071 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14073 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14075 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14077 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14079 * config/nds32/nds32-protos.h (nds32_data_alignment,
14080 nds32_local_alignment): Declare.
14081 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14082 nds32_local_alignment): New functions.
14083 (TARGET_CONSTANT_ALIGNMENT): Define.
14084 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14086 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14088 * config/nds32/nds32.c
14089 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14090 (TARGET_MODES_TIEABLE_P): Likewise.
14092 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14094 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14095 level Ofast and Og.
14097 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14098 Chung-Ju Wu <jasonwucj@gmail.com>
14100 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14101 for unaligned access.
14102 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14104 * config/nds32/nds32-intrinsic.md: Likewise.
14105 * config/nds32/nds32_intrinsic.h: Likewise.
14106 * config/nds32/nds32.h (nds32_builtins): Likewise.
14107 * config/nds32/nds32.opt (munaligned-access): New option.
14108 * config/nds32/nds32.c (nds32_asm_file_start): Display
14109 flag_unaligned_access status.
14111 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14113 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14114 -mno-relax is present.
14115 * config/riscv/linux.h (LINK_SPEC): Ditto.
14117 2018-04-20 Martin Sebor <msebor@redhat.com>
14120 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14122 (gimple_fold_builtin_stxcpy_chk): Same.
14123 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14125 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14128 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14129 __powikf2 when long double is IEEE 128-bit.
14131 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14133 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14134 step to make sure stack always aligned.
14136 2018-04-20 Carl Love <cel@us.ibm.com>
14139 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14140 size check for arg0.
14142 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14143 Tom de Vries <tom@codesourcery.com>
14146 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14147 Emit insns for calls too.
14148 (nvptx_find_par): Always look for worker-level predecessor insn.
14149 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14151 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14152 (nvptx_process_pars): Propagate frames for calls.
14154 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14157 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14159 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14160 (ix86_handle_option): Don't handle OPT_mibt.
14161 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14163 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14165 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14166 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14167 (ix86_target_macros): Define __CET__ with flag_cf_protection
14168 for -fcf-protection.
14169 * config/i386/i386.c (isa2_opts): Remove -mibt.
14170 * config/i386/i386.h (TARGET_IBT): Removed.
14171 (TARGET_IBT_P): Likewise.
14172 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14173 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14174 * config/i386/i386.opt (mcet): Update help message.
14175 (mshstk): Likewise.
14177 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14178 -mcet as an alias for -mshstk.
14180 2018-04-20 Richard Biener <rguenther@suse.de>
14182 PR middle-end/85475
14183 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14184 complexity by forcing a single use of the multiply operand.
14186 2018-04-20 Martin Jambor <mjambor@suse.cz>
14189 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14190 recursion dependency to only apply to non-clones.
14192 2018-04-20 Martin Jambor <mjambor@suse.cz>
14195 * ipa-cp.c (create_specialized_node): Check that clones of
14196 self-recursive edges exist during IPA-CP.
14198 2018-04-19 Toon Moene <toon@moene.org>
14200 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14203 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14205 PR tree-optimization/85467
14206 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14207 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14208 VECTOR_CST element to type.
14210 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14213 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14214 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14215 (builtin_longjmp): Likewise.
14216 (save_stack_nonlocal): New pattern.
14217 (restore_stack_nonlocal): Likewise.
14219 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14222 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14223 Replace ASM_OUTPUT_LABEL with fprintf.
14225 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14228 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14229 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14230 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14231 define __IBT__ and __SHSTK__ for -fcf-protection.
14232 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14234 (ix86_trampoline_init): Likewise.
14235 (x86_output_mi_thunk): Likewise.
14236 (ix86_notrack_prefixed_insn_p): Likewise.
14237 (ix86_option_override_internal): Don't disallow -fcf-protection.
14238 * config/i386/i386.md (rdssp<mode>): Also enable for
14240 (incssp<mode>): Likewise.
14241 (nop_endbr): Likewise.
14242 * config/i386/i386.opt (mcet): Change help message to built-in
14245 (mshstk): Likewise.
14246 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14247 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14248 enable CET built-in functions.
14250 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14252 * common/config/i386/i386-common.c
14253 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14254 OPTION_MASK_ISA_MOVDIRI_UNSET,
14255 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14256 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14257 * config.gcc (movdirintrin.h): New header.
14258 * config/i386/cpuid.h (bit_MOVDIRI,
14259 bit_MOVDIR64B): New bits.
14260 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14262 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14263 (VOID, PVOID, PCVOID)): New function types.
14264 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14265 __builtin_ia32_directstoreu_u64,
14266 __builtin_ia32_movdir64b): New builtins.
14267 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14268 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14270 (ix86_valid_target_attribute_inner_p): Ditto.
14271 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14272 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14273 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14274 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14275 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14276 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14277 (movdiri<mode>, movdir64b_<mode>): New.
14278 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14279 * config/i386/immintrin.h: Include movdirintrin.h.
14280 * config/i386/movdirintrin.h: New file.
14281 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14283 2018-04-19 Richard Biener <rguenther@suse.de>
14285 PR middle-end/85455
14286 * cfg.c (clear_bb_flags): When loop state says we have
14287 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14289 2018-04-19 Richard Biener <rguenther@suse.de>
14291 PR tree-optimization/84737
14292 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14293 copying restrict info.
14294 (vect_setup_realignment): Use it.
14295 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14296 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14297 the first DR to all generated stores.
14298 (vectorizable_load): Likewise for loads.
14300 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14302 PR tree-optimization/85446
14303 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14304 the integral and pointer types to have the same precision.
14306 * doc/install.texi: Document --disable-cet being the default and
14309 2018-04-18 Martin Liska <mliska@suse.cz>
14311 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14314 2018-04-18 Martin Liska <mliska@suse.cz>
14317 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14320 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14321 arguments if they are comparable.
14323 2018-04-18 Martin Liska <mliska@suse.cz>
14326 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14329 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14332 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14335 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14336 ENDBR after calling __morestack.
14338 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14341 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14342 by using gcc_base_ver to generate a gcc_driver_version, and use
14343 it when generating GCC_DRIVER_NAME.
14344 * configure: Regenerate.
14346 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14349 * config.gcc: Obsolete powerpc*-*-*spe*.
14351 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14354 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14355 (stabstr_D): Change type of unum from unsigned int to
14356 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14359 2018-04-17 Jim Wilson <jimw@sifive.com>
14362 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14363 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14364 Set arg_pointer_offset after using pretend_args_size.
14366 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14368 PR rtl-optimization/85431
14369 * dse.c (record_store): Ignore zero width stores.
14372 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14373 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14374 __builtin_stack_restore rather than after it.
14375 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14376 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14377 argument instead of virtual_dynamic_stack_rtx.
14379 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14381 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14383 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14384 Add note to error message to explain internal mapping of overloaded
14385 built-in function name to non-overloaded built-in function name.
14386 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14389 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14392 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14393 where the inputs overlap with the output.
14395 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14397 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14398 (=v, v) alternative and explicit "memory" attribute.
14399 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14400 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14402 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14403 "sselog1" type instead of "sselog".
14404 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14405 "sselog". Remove explicit "memory" attribute.
14406 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14407 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14409 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14410 "sselog1" type instead of "sselog". Remove explicit "memory"
14412 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14413 use "sselog1" type instead of "sselog". Remove explicit "memory"
14415 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14416 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14418 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14419 "sselog1" type instead of "sselog". Remove explicit "memory"
14421 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14422 use "sselog1" type instead of "sselog". Remove explicit "memory"
14426 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14428 PR middle-end/85414
14429 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14432 2018-04-17 Martin Jambor <mjambor@suse.cz>
14435 * ipa-cp.c (create_specialized_node): Call
14436 expand_all_artificial_thunks if necessary.
14438 2018-04-17 Martin Liska <mliska@suse.cz>
14441 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14442 in message, remote space in between '_G' and '('.
14444 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14447 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14448 avx512f_vmcmp<mode>3<round_saeonly_name>,
14449 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14450 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14451 avx512f_rndscale<mode><round_saeonly_name>,
14452 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14453 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14454 Use %<iptr>2 instead of %2 for -masm=intel.
14455 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14456 avx512f_vcvttss2usi<round_saeonly_name>,
14457 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14459 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14460 avx512f_vcvttsd2usi<round_saeonly_name>,
14461 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14462 Use %q1 instead of %1 for -masm=intel.
14463 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14464 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14465 of %3 for -masm=intel.
14466 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14468 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14470 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14472 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14473 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14475 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14477 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14478 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14479 %g1 and one with %0 and %1.
14480 (avx512er_vmrcp28<mode><round_saeonly_name>,
14481 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14482 %1 for -masm=intel.
14483 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14484 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14485 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14486 of %0 and %{%4%} for -masm=intel.
14487 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14488 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14489 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14490 order of %0 and %{%5%}%{z%} for -masm=intel.
14492 2018-04-17 Jan Hubicka <jh@suse.cz>
14495 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14497 2018-04-17 Martin Liska <mliska@suse.cz>
14500 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14501 for target_clone error message. Make default implementation
14502 clone to be a local declaration.
14503 (separate_attrs): Add new argument and check for an empty
14505 (expand_target_clones): Handle it.
14506 (ipa_target_clone): Make redirection just for target_clones
14509 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14510 Tom de Vries <tom@codesourcery.com>
14512 PR middle-end/84955
14513 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14514 tiled basic blocks without omp continue statements.
14516 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14519 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14520 vec_extract expression as having side effects to make sure it gets
14523 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14526 * config/i386/i386.c (get_builtin_code_for_version): Check
14529 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14532 * config.gcc: Support "skylake".
14533 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14535 * config/i386/i386.c (m_SKYLAKE): Define.
14536 (processor_target_table): Add "skylake".
14537 (ix86_option_override_internal): Add "skylake".
14538 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14539 PROCESSOR_CANNONLAKE.
14540 (get_builtin_code_for_version): Fix priority for
14541 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14542 PROCESSOR_SKYLAKE-AVX512.
14543 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14544 (processor_type): Add PROCESSOR_SKYLAKE.
14546 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14547 Jason Merrill <jason@redhat.com>
14550 * convert.c (convert_to_integer_1): Use direct recursion for
14551 enumeral types and types with a precision less than the number
14552 of bits in their mode.
14554 2018-04-16 Julia Koval <julia.koval@intel.com>
14557 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14558 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14560 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14563 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14564 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14565 and -mno-direct-move.
14567 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14570 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14571 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14572 Ensure negative shifts result in {0}.
14574 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14576 PR rtl-optimization/79916
14577 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14578 regs (if any) to define how to gnerate SD moves when LRA is in
14581 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14583 PR rtl-optimization/85393
14584 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14585 * except.c (expand_dw2_landing_pad_for_region): Make static.
14586 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14587 a label and unconditional jump to old_bb, rather than
14588 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14591 PR rtl-optimization/85376
14592 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14593 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14594 instead of a specific value.
14596 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14597 Bin Cheng <bin.cheng@arm.com>
14599 PR tree-optimization/82965
14600 PR tree-optimization/83991
14601 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14602 by_profile_only parameter.
14603 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14604 information if the loop was predicted to iterate too many times.
14605 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14607 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14610 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14613 2018-04-13 Martin Liska <mliska@suse.cz>
14614 Jakub Jelinek <jakub@redhat.com>
14616 PR middle-end/81657
14617 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14618 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14619 * builtins.c (expand_builtin_memory_copy_args): Use
14620 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14621 handle dest_addr == pc_rtx.
14623 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14626 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14627 asked to not generate direct moves.
14628 (fix_trunc<mode>si2_stfiwx): Similar.
14629 (fix_trunc<mode>si2_internal): Similar.
14631 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14634 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14635 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14636 lookup if dest in some wider mode is known to be const0_rtx and
14637 if so, record permanent equivalence for it to be ZERO_EXTEND of
14638 the narrower mode destination.
14640 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14642 * lto-streamer-out.c (output_function): Revert 259346.
14643 * omp-expand.c (expand_oacc_for): Likewise.
14645 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14647 PR rtl-optimization/85354
14648 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14649 * sel-sched.c (sel_global_init): ... here.
14651 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14654 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14655 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14656 mode for PE-COFF targets.
14657 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14658 (i386_pe_asm_lto_end): Likewise.
14659 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14660 (TARGET_ASM_LTO_END): Likewise.
14661 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14662 (i386_pe_asm_lto_start): New function.
14663 (i386_pe_asm_lto_end): Likewise.
14665 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14666 Richard Biener <rguenther@suse.de>
14668 PR middle-end/84955
14669 * lto-streamer-out.c (output_function): Fix CFG loop state before
14671 * omp-expand.c (expand_oacc_for): Handle calls to internal
14672 functions like regular functions.
14674 2018-04-12 Richard Biener <rguenther@suse.de>
14677 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14678 for the early LTO debug to properly generate references to it
14679 during DIE emission. Do not re-use that for the skeleton for
14681 (dwarf2out_early_finish): Likewise.
14683 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14686 * config/i386/sse.md
14687 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14688 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14689 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14690 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14691 and output is a reg, avoid creating invalid lowpart subreg, but
14692 instead split into a 512-bit move. Don't split if not AVX512VL,
14693 input is xmm16+ reg and output is a mem.
14694 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14695 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14696 xmm16+ reg and output is a mem.
14698 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14700 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14701 also for flag_dwarf2_cfi_asm.
14703 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14705 PR rtl-optimization/85342
14706 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14707 a bool scalar var inside of the loop instead. Don't try to update
14708 recog_data.operand after failed apply_change_group.
14710 2018-04-12 Tom de Vries <tom@codesourcery.com>
14713 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14714 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14715 array with flexible array member as array without given dimension.
14716 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14717 argument for undefined param to true.
14719 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14722 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14723 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14724 from PowerPC section.
14725 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14726 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14727 help text that is too long.
14728 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14729 help text that is too long.
14730 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14731 help text that is too long.
14733 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14735 * config/alpha/alpha.md (stack_probe_internal): Rename
14736 from "probe_stack". Update all callers.
14738 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14740 PR rtl-optimization/84566
14741 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14742 sched_macro_fuse_insns.
14744 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14747 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14748 (compute_block_dependences): ... from here.
14750 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14752 PR tree-optimization/85331
14753 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14754 from int to HOST_WIDE_INT.
14756 2018-04-11 Martin Jambor <mjambor@suse.cz>
14759 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14760 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14761 not the same as the source val.
14762 (cgraph_edge_brings_value_p): New parameter.
14763 (gather_edges_for_value): Pass destination value to
14764 cgraph_edge_brings_value_p.
14765 (perhaps_add_new_callers): Likewise.
14766 (get_info_about_necessary_edges): Likewise and exclude values brought
14767 only by self-recursive edges.
14768 (create_specialized_node): Redirect only clones of self-calling edges.
14769 (+self_recursive_pass_through_p): New function.
14770 (find_more_scalar_values_for_callers_subset): Use it.
14771 (find_aggregate_values_for_callers_subset): Likewise.
14772 (known_aggs_to_agg_replacement_list): Removed.
14773 (decide_whether_version_node): Re-calculate known constants for all
14774 remaining context clones.
14776 2018-04-11 Richard Biener <rguenther@suse.de>
14779 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14780 from early DWARF output.
14781 (dwarf2out_early_finish): Output line info unconditionally into
14782 early DWARF and add reference to it.
14784 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14787 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14788 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14789 other than V2DFmode using iptr mode attribute.
14790 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14792 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14794 PR rtl-optimization/84659
14795 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14797 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14800 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14802 (output_loc_list): Pass address of a dummy size variable even in the
14803 locview handling loop.
14804 (index_location_lists): Add comment on why skip_loc_list_entry can't
14807 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14810 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14813 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14816 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14817 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14818 and -mstring-compare-inline-limit.
14820 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14823 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14824 for stack clash protection in a register whenever we need it to be in
14827 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14829 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14830 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14832 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14835 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14837 (mlong-double-): Ditto.
14838 * config/rs6000/sysv4.opt (msdata=): Ditto.
14839 (mtls-size=): Ditto.
14841 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14843 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14844 erroneous entries for
14845 "vector int vec_ldl (int, long int *)", and
14846 "vector unsigned int vec_ldl (int, unsigned long int *)".
14847 Add comments and entries for
14848 "vector bool char vec_ldl (int, bool char *)",
14849 "vector bool short vec_ldl (int, bool short *)",
14850 "vector bool int vec_ldl (int, bool int *)",
14851 "vector bool long long vec_ldl (int, bool long long *)",
14852 "vector pixel vec_ldl (int, pixel *)",
14853 "vector long long vec_ldl (int, long long *)",
14854 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14855 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14856 type tree bool_long_long_type_node and correct definition of
14857 bool_V2DI_type_node to make reference to this new type tree.
14858 (rs6000_mangle_type): Replace erroneous reference to
14859 bool_long_type_node with bool_long_long_type_node.
14860 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14861 comments to emphasize sign distinctions for char and int types and
14862 replace RS6000_BTI_bool_long constant with
14863 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14864 use of RS6000_BTI_pixel.
14865 (bool_long_type_node): Remove this macro definition.
14866 (bool_long_long_type_node): New macro definition
14868 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14870 PR rtl-optimization/85300
14871 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14872 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14873 simplify_unary_operation fails.
14875 2018-04-10 Martin Liska <mliska@suse.cz>
14877 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14878 cgraph_edge and ipa_ref.
14880 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14884 * config/i386/sse.md
14885 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14886 computation of the VEC_MERGE selector from mask.
14887 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14888 Fix decoding of the VEC_MERGE selector into mask.
14890 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14892 PR tree-optimization/85286
14893 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14895 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14897 * final.c (final_1): Set insn_last_address as well as
14898 insn_current_address.
14900 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14903 * explow.c (emit_stack_probe): Call validize_mem on memory location
14904 before passing it to gen_probe_stack. Create address operand and
14905 legitimize it for the probe_stack_address case.
14907 2018-04-09 Jan Hubicka <jh@suse.cz>
14910 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14911 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14912 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14914 (free_lang_data): Rebuild type inheritance graph.
14916 2018-04-09 Martin Sebor <msebor@redhat.com>
14918 * invoke.texi (-finline-small-functions): Mention other optimization
14920 (-findirect-inlining, -fpartial-inlining): Same.
14921 (-finline-functions-called-once): Same.
14922 (-freorder-blocks-and-partition): Same.
14924 2018-04-09 Jan Hubicka <jh@suse.cz>
14927 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14928 jumps; choose last target that matches the criteria (i.e.
14929 no partition changes for non-crossing jumps).
14930 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14931 support for redirecting crossing jumps to non-crossing.
14933 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14935 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14936 also for naked functions.
14938 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14940 * config/arc/arc.md (add_shift): New pattern.
14941 (add_shift2): Likewise.
14942 (sub_shift): Likewise.
14943 (sub_shift_cmp0_noout): Likewise.
14944 (compare_si_ashiftsi): Likewise.
14945 (xbfu_cmp0_noout): New combine pattern.
14946 (xbfu_cmp0"): Likewise.
14947 (movsi_set_cc_insn): Place the predicable variant first.
14948 (commutative_binary_cmp0_noout): Remove clobber.
14949 (commutative_binary_cmp0): New pattern.
14950 (noncommutative_binary_cmp0): Likewise.
14951 (noncommutative_binary_cmp0_noout): Likewise.
14952 (noncommutative_binary_comparison_result_used): Removed.
14953 (rsub_cmp0): New pattern.
14954 (rsub_cmp0_noout): Likewise.
14955 (extzvsi): Changed, keep only meaningful variants.
14956 (SQH, SEZ): New iterators.
14957 (SQH_postfix): New mode attribute.
14958 (SEZ_prefix): New code attribute.
14959 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14960 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14961 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14962 of numerical value.
14963 (noncommutative_operator): Check the availability of barrel
14966 2018-04-09 Richard Biener <rguenther@suse.de>
14968 PR tree-optimization/85284
14969 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14970 Only use the niter constraining form of simple_iv when the exit
14971 is always executed.
14973 2018-04-09 Tom de Vries <tom@codesourcery.com>
14976 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14977 (define_expand "*memory_barrier"): New define_expand.
14978 (define_insn "memory_barrier"): New insn.
14980 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14982 PR rtl-optimization/80463
14983 PR rtl-optimization/83972
14984 PR rtl-optimization/83480
14986 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14987 correct producer for the insn.
14988 (tidy_control_flow): Fixup seqnos in case of debug insns.
14990 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14992 PR rtl-optimization/83913
14994 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14995 different sched-times when merging exprs.
14997 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14999 PR rtl-optimization/83962
15001 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15002 tidy_fallthru_edge and tidy_control_flow.
15004 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15006 PR rtl-optimization/83530
15008 * sel-sched.c (force_next_insn): New global variable.
15009 (remove_insn_for_debug): When force_next_insn is true, also leave only
15010 next insn in the ready list.
15011 (sel_sched_region): When the region wasn't scheduled, make another pass
15012 over it with force_next_insn set to 1.
15014 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15016 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15018 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15019 for interrupt control.
15020 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15021 functions for interrupt control.
15022 * config/nds32/nds32-intrinsic.md: Likewise.
15023 * config/nds32/nds32_intrinsic.h: Likewise.
15024 * config/nds32/nds32.h (nds32_builtins): Likewise.
15026 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15028 * config/nds32/nds32.c (nds32_init_machine_status,
15029 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15030 strict_aligned_p field.
15031 (nds32_expand_to_rtl_hook): New function.
15032 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15033 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15035 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15036 Chung-Ju Wu <jasonwucj@gmail.com>
15038 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15039 * config/nds32/nds32-n7.md: New file.
15040 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15041 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15043 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15044 * config/nds32/nds32.md (pipeline_model): Add n7.
15045 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15046 * config/nds32/pipelines.md: Include n7 settings.
15048 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15049 Chung-Ju Wu <jasonwucj@gmail.com>
15051 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15052 * config/nds32/nds32-e8.md: New file.
15053 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15054 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15056 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15057 * config/nds32/nds32.md (pipeline_model): Add e8.
15058 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15059 * config/nds32/pipelines.md: Include e8 settings.
15061 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15062 Chung-Ju Wu <jasonwucj@gmail.com>
15064 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15065 * config/nds32/nds32-n8.md: New file.
15066 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15067 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15069 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15070 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15071 * config/nds32/nds32.md (pipeline_model): Add n8.
15072 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15073 * config/nds32/pipelines.md: Include n8 settings.
15075 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15076 Chung-Ju Wu <jasonwucj@gmail.com>
15078 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15079 * config/nds32/nds32-n9-2r1w.md: New file.
15080 * config/nds32/nds32-n9-3r2w.md: New file.
15081 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15082 nds32_register_ports): New or modify for cpu n9.
15083 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15085 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15086 * config/nds32/nds32-utils.c: New file.
15087 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15088 TARGET_MUL_SLOW): Define.
15089 * config/nds32/nds32.md (pipeline_model): New attribute.
15090 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15091 New options that support cpu n9.
15092 * config/nds32/pipelines.md: Include n9 settings.
15093 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15095 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15097 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15098 information if necessary.
15099 (output_cond_branch_compare_zero): Likewise.
15100 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15101 (nds32_target_alignment): Refine for alignment.
15102 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15103 (FUNCTION_BOUNDARY): Modify.
15104 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15106 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15108 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15110 * config/nds32/constants.md (unspec_volatile_element): Add values for
15111 TLB operation and data prefetch.
15112 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15113 functions for TLB operation and data prefetch.
15114 * config/nds32/nds32-intrinsic.md: Likewise.
15115 * config/nds32/nds32_intrinsic.h: Likewise.
15116 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15117 (nds32_print_operand): Likewise.
15118 * config/nds32/nds32.h (nds32_builtins): Likewise.
15120 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15121 Andrew Pinski <pinsika@gcc.gnu.org>
15123 PR middle-end/82976
15124 * match.pd: Use constant_boolean_node of correct type instead of
15125 boolean_true_node or boolean_false_node for simplifying
15126 pointer comparisons to zero.
15128 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15130 PR tree-optimization/80021
15131 * tree.c (verify_type_variant): Make error call in verify_variant_match
15132 translatable and remove final full stop.
15134 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15136 * config/nds32/constants.md (unspec_volatile_element): Add
15137 UNSPEC_VOLATILE_EH_RETURN.
15138 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15139 nds32_output_stack_pop): Support dwarf exception handling process.
15140 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15141 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15142 exception handling process.
15143 (nds32_compute_stack_frame): Likewise.
15144 (nds32_return_addr_rtx): Likewise.
15145 (nds32_initial_elimination_offset): Likewise.
15146 (nds32_expand_prologue): Likewise.
15147 (nds32_expand_epilogue): Likewise.
15148 (nds32_dynamic_chain_address): New function.
15149 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15150 exception handling.
15151 (DYNAMIC_CHAIN_ADDRESS): Define.
15152 (EH_RETURN_DATA_REGNO): Define.
15153 (EH_RETURN_STACKADJ_RTX): Define.
15154 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15155 patterns for dwarf exception handling.
15157 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15159 * config/nds32/nds32.h: Clean up obsolete macros.
15161 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15163 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15164 Add enum values for particular instructions.
15165 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15166 particular intrinsic functions.
15167 * config/nds32/nds32-intrinsic.md: Likewise.
15168 * config/nds32/nds32_intrinsic.h: Likewise.
15169 * config/nds32/nds32.h (nds32_builtins): Likewise.
15170 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15171 (btst, ave): New patterns for particular instructions.
15173 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15175 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15176 Add enum values for atomic load/store and memory sync.
15177 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15179 * config/nds32/nds32-intrinsic.md: Likewise.
15180 * config/nds32/nds32_intrinsic.h: Likewise.
15181 * config/nds32/nds32.h (nds32_builtins): Likewise.
15183 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15185 PR tree-optimization/85257
15186 * fold-const.c (native_encode_vector): If not all elts could fit
15187 and off is -1, return 0 rather than offset.
15188 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15189 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15190 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15191 adjust buffer in native_interpret_expr call.
15193 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15195 * config/nds32/constants.md (unspec_volatile_element): Add cache
15196 control enum values.
15197 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15198 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15199 * config/nds32/nds32.c (nds32_cctl_names): New.
15200 (nds32_print_operand): Handle cache control register names.
15201 * config/nds32/nds32.h (nds32_builtins): New enum values.
15202 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15204 * config/nds32/nds32.md (type): Add mmu.
15205 * config/nds32/pipelines.md (simple_insn): Add mmu.
15207 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15209 * config/nds32/nds32.md (type): Remove call.
15210 * config/nds32/pipelines.md (simple_insn): Likewise.
15212 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15214 * config/nds32/constants.md (unspec_volatile_element): Add
15215 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15216 UNSPEC_VOLATILE_FMFCFG.
15217 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15218 description for fmfcfg and fmfcsr.
15219 (bdesc_1arg): Add fmtcsr.
15220 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15221 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15222 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15223 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15224 unspec_fmfcfg): New patterns.
15225 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15226 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15227 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15228 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15229 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15230 __nds32__fmfcfg): Define.
15232 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15234 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15235 intrinsic register names.
15236 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15237 intrinsic register enum values and macros.
15239 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15241 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15242 for load/store addressing form.
15243 (nds32_print_operand_address): Likewise.
15245 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15248 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15249 based on LABEL_REF. Remove useless assertion.
15250 (pic_address_needs_scratch): Fix formatting.
15251 (sparc_legitimize_pic_address): Minor tweaks.
15252 (sparc_delegitimize_address): Adjust assertion accordingly.
15253 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15254 into symbolic_operand.
15255 (movsi_high_pic_label_ref): Likewise.
15256 (movsi_lo_sum_pic_label_ref): Likewise.
15257 (movdi_pic_label_ref): Likewise.
15258 (movdi_high_pic_label_ref): Likewise.
15259 (movdi_lo_sum_pic_label_ref): Likewise.
15261 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15263 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15264 custom LIB_SPEC setup.
15266 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15267 Kito Cheng <kito.cheng@gmail.com>
15269 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15270 * config/riscv/freebsd.h: New.
15272 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15274 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15275 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15278 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15279 Kito Cheng <kito.cheng@gmail.com>
15281 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15282 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15283 * config/nds32/nds32-protos.h (nds32_output_call,
15284 nds32_output_return): Declare.
15285 * config/nds32/nds32.md: Refine all the call and return patterns.
15287 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15290 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15291 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15293 PR rtl-optimization/84872
15294 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15295 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15296 EDGE_CROSSING edge.
15298 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15300 * expr.c (copy_blkmode_to_reg): Revert 254862.
15301 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15303 2018-04-06 Richard Biener <rguenther@suse.de>
15305 PR middle-end/85244
15306 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15307 after seeing a component reference with an adjacent field. Treat
15308 refs to arrays at struct end of external decls similar to
15309 refs to unconstrained commons.
15311 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15314 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15315 look through SAVE_EXPRs with non-side-effects argument. Adjust
15317 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15320 2018-04-06 Richard Biener <rguenther@suse.de>
15322 PR middle-end/85180
15323 * alias.c (find_base_term): New wrapper around find_base_term
15324 unwinding CSELIB_VAL_PTR changes.
15325 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15328 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15330 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15332 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15333 constant definitions.
15334 ("nop"): lr 0,0 -> nopr r0
15335 ("nop_lr0", "nop_lr1"): New insn definitions.
15337 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15339 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15340 NDS32_V3PUSH_AVAILABLE_P macro.
15342 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15343 Chung-Ju Wu <jasonwucj@gmail.com>
15345 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15346 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15347 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15348 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15349 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15350 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15351 * config/nds32/constraints.md: New constraints and checking for hard
15352 float configuration.
15353 * config/nds32/iterators.md: New mode iterator and attribute for hard
15354 float configuration.
15355 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15357 * config/nds32/nds32-fpu.md: New file.
15358 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15359 deal with hard float code generation.
15360 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15362 (abi_type, float_reg_number): New enum type.
15363 * config/nds32/nds32-predicates.c: New predicates for hard float.
15364 * config/nds32/nds32-protos.h: Declare functions for hard float.
15365 * config/nds32/nds32.c: Implementation for hard float configuration.
15366 * config/nds32/nds32.h: Definitions for hard float configuration.
15367 * config/nds32/nds32.md: Include hard float machine description and
15368 modify patterns for hard float configuration.
15369 * config/nds32/nds32.opt: New options for hard float configuration.
15370 * config/nds32/predicates.md: New predicates for hard float
15373 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15375 * common/config/nds32/nds32-common.c
15376 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15378 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15380 PR middle-end/85195
15381 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15382 CONSTRUCTOR_ELT (ctor, ...)->value.
15384 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15387 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15389 2018-04-05 Tom de Vries <tom@codesourcery.com>
15392 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15395 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15396 Kito Cheng <kito.cheng@gmail.com>
15398 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15399 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15400 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15401 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15403 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15404 Kito Cheng <kito.cheng@gmail.com>
15406 * config/nds32/constraints.md (Ufe): New memory constraint.
15407 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15408 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15409 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15411 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15412 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15414 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15416 * config/nds32/nds32.md: Use optimize_size in the condition for
15417 alu-shift instructions.
15419 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15421 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15423 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15425 * config/nds32/nds32.md (negsi2): Refine pattern.
15427 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15428 Chung-Ju Wu <jasonwucj@gmail.com>
15430 * config/nds32/iterators.md (shift_rotate): New code iterator.
15431 (shift): New code attribute.
15432 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15433 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15434 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15435 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15436 bit-wise operations.
15437 (andsi3, *andsi3): Ditto.
15438 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15439 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15440 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15441 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15442 nds32_ior_operand, nds32_xor_operand): New predicates.
15444 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15446 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15447 (addsi3, subsi3): ... this.
15449 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15451 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15453 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15455 * config/nds32/nds32.md: Adjust indention.
15457 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15459 * config/nds32/nds32.md (feature): New attribute.
15461 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15463 * config/nds32/nds32.md (subtype): New attribute.
15465 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15468 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15469 expansion to perform a bitwise AND of the argument followed by a
15470 boolean negation of the result.
15472 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15474 PR rtl-optimization/84878
15475 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15476 the basic block. Assert the use reference is not artificial and that
15477 it has an associated insn.
15479 2018-04-04 Michael Matz <matz@suse.de>
15481 * builtins.c (compute_objsize): Pass correct operand
15482 to array_at_struct_end_p.
15484 2018-04-04 Richard Biener <rguenther@suse.de>
15487 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15488 from contexts for DINFO_LEVEL_TERSE and below.
15490 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15492 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15493 resiter_operand condition.
15494 * config/nds32/nds32.md (*move<mode>): Ditto.
15496 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15497 Monk Chiang <sh.chiang04@gmail.com>
15499 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15501 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15503 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15505 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15506 Kito Cheng <kito.cheng@gmail.com>
15508 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15509 nds32_cond_code_str, output_cond_branch,
15510 output_cond_branch_compare_zero, nds32_expand_cbranch,
15511 nds32_expand_cstore, nds32_expand_movcc,
15512 nds32_output_cbranchsi4_equality_zero,
15513 nds32_output_cbranchsi4_equality_reg,
15514 nds32_output_cbranchsi4_equality_reg_or_const_int,
15515 nds32_output_cbranchsi4_greater_less_zero: New functions.
15516 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15517 nds32_expand_cstore, nds32_expand_movcc,
15518 nds32_output_cbranchsi4_equality_zero,
15519 nds32_output_cbranchsi4_equality_reg,
15520 nds32_output_cbranchsi4_equality_reg_or_const_int,
15521 nds32_output_cbranchsi4_greater_less_zero): Declare.
15522 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15523 nds32_rimm11s_operand): New predicates.
15524 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15525 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15528 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15530 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15531 * config/nds32/nds32.md: Ditto.
15532 * config/nds32/pipelines.md: Ditto.
15534 2018-04-04 Richard Biener <rguenther@suse.de>
15536 PR tree-optimization/85168
15537 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15538 propagating abnormals.
15540 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15542 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15544 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15545 Kito Cheng <kito.cheng@gmail.com>
15547 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15548 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15549 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15550 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15551 * config/nds32/nds32.md (sibcall_internal): New.
15552 (sibcall_register): Remove.
15553 (sibcall_immediate): Remove.
15554 (sibcall_value_internal): New.
15555 (sibcall_value_register): Remove.
15556 (sibcall_value_immediate): Remove.
15557 * config/nds32/predicates.md (nds32_general_register_operand): New.
15558 (nds32_call_address_operand): New.
15560 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15562 PR rtl-optimization/85167
15563 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15564 bb_defs if *split_p, instead preinitialize it to NULL.
15566 PR tree-optimization/85156
15567 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15568 evaluating the argument multiple times.
15570 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15572 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15574 (_mm_cvtpd_ps): Likewise.
15575 (_mm_cvttpd_epi32): Likewise.
15576 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15577 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15578 vector, pixel, and bool following altivec.h include.
15580 2018-04-03 Martin Sebor <msebor@redhat.com>
15582 * doc/extend.texi (Common Function Attributes): Clarify.
15583 (const attribute): Likewise.
15584 (pure attribute): Likewise.
15586 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15589 * config/i386/i386.c (ix86_expand_vector_set): Use
15590 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15592 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15594 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15595 instructions when changing rounding bits to preserve precision bits
15596 in the x87 control word.
15598 2018-04-03 Martin Liska <mliska@suse.cz>
15600 PR tree-optimization/82491
15601 * rtl.h (strip_offset_and_add): Replace += suboffset with
15602 poly_uint64 () + suboffset.
15604 2018-03-29 Martin Liska <mliska@suse.cz>
15605 Martin Jambor <mjambor@suse.cz>
15608 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15609 param_type is not an integral or pointer type.
15611 2018-04-03 Richard Biener <rguenther@suse.de>
15613 * sese.h (recompute_all_dominators): Remove.
15615 2018-04-02 Martin Sebor <msebor@redhat.com>
15617 * doc/invoke.texi (-Wrestrict): Fix typos.
15619 2018-04-02 Jim Wilson <jimw@sifive.com>
15621 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15622 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15623 (<optab>di3, <optab>si3_extend): Likewise.
15624 (<optab>si3_mask, <optab>si3_mask_1): New.
15625 (<optab>di3_mask, <optab>di3_mask_1): New.
15626 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15627 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15628 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15630 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15632 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15635 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15637 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15638 (nds32_canonicalize_comparison): New function.
15640 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15641 Kito Cheng <kito.cheng@gmail.com>
15642 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15644 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15645 * config/nds32/constants.md (unspec_volatile_element): Add
15646 UNSPEC_VOLATILE_RELAX_GROUP.
15647 * config/nds32/nds32-relax-opt.c: New file.
15648 * config/nds32/nds32-predicates.c
15649 (nds32_symbol_load_store_p): New function.
15650 * config/nds32/nds32-protos.h
15651 (nds32_symbol_load_store_p): Declare function.
15652 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15653 * config/nds32/nds32.c
15654 (nds32_register_pass): New function to register pass.
15655 (nds32_register_passes): New function to register passes.
15656 * config/nds32/nds32.md (relax_group): New pattern.
15657 * config/nds32/nds32.opt (mrelax-hint): New option.
15658 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15660 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15662 * config/nds32/t-nds32: Modify files dependency.
15664 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15666 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15667 (PROFILE_HOOK): Define its implementation.
15669 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15671 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15672 type and 32-bit size.
15674 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15676 PR middle-end/85090
15677 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15678 (V_128_256): New mode iterator.
15679 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15680 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15681 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15683 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15684 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15686 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15689 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15690 NaN inputs correctly.
15692 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15695 * config/rs6000/vsx.md (??r): New mode attribute.
15696 (*vsx_mov<mode>_64bit): Use it.
15697 (*vsx_mov<mode>_32bit): Likewise.
15699 2018-03-30 Martin Sebor <msebor@redhat.com>
15701 PR tree-optimization/84818
15702 * builtins.c (check_access): Use warning_n.
15704 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15707 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15709 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15712 2018-03-30 Julia Koval <julia.koval@intel.com>
15715 * x86-tune.def (movx, partial_reg_dependency): Enable for
15718 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15720 PR inline-asm/84985
15721 * lra-constraints.c (process_alt_operands): Move setting
15722 this_alternative_matches below.
15724 2018-03-29 Martin Liska <mliska@suse.cz>
15727 * doc/invoke.texi: Document how LTO works with debug info.
15728 Describe auto-load support of binutils. Mention 'x86-64'
15729 as valid option value of -march option.
15731 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15733 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15736 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15737 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15738 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15741 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15744 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15745 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15746 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15747 for RS6000_BTM_POWERPC64.
15748 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15749 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15750 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15753 (DIVDEU): Likewise.
15755 2018-03-28 Carl Love <cel@us.ibm.com>
15758 2017-09-27 Carl Love <cel@us.ibm.com>
15760 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15761 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15762 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15765 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15767 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15768 instead of __vector bool.
15769 (_mm_max_pu8): Likewise.
15770 (_mm_min_pi16): Likewise.
15772 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15775 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15776 (DIVWEUO): Likewise.
15777 (DIVDEO): Likewise.
15778 (DIVDEUO): Likewise.
15779 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15780 DIVWEUO and DIVDEUO.
15781 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15782 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15783 (div_extend): Likewise.
15784 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15786 (__builtin_divweuo): Likewise.
15787 (__builtin_divdeo): Likewise.
15788 (__builtin_divdeuo): Likewise.
15790 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15793 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15794 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15796 PR tree-optimization/82004
15797 * gimple-match-head.c (optimize_pow_to_exp): New function.
15798 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15799 Don't fold to exp if optimize_pow_to_exp is false.
15801 2018-03-28 Martin Liska <mliska@suse.cz>
15804 * calls.c (initialize_argument_information): Fix trailing space.
15805 * common.opt: Fix typo and provide better explanation for
15806 -fsanitize-coverage option.
15807 * config/i386/i386.opt: Fix typo.
15809 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15810 Martin Liska <mliska@suse.cz>
15813 * gimplify.c (asan_poison_variable): Don't do the check for
15814 gimplify_omp_ctxp here.
15815 (gimplify_decl_expr): Do it here.
15816 (gimplify_target_expr): Likewise.
15818 2018-03-28 Martin Liska <mliska@suse.cz>
15821 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15822 chkp_type_bounds_count if MPX is not enabled.
15824 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15826 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15828 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15831 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15832 function to create the function decl for complex long double
15833 multiply and divide for -mabi=ieeelongdouble.
15834 (init_float128_ieee): Call it.
15836 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15839 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15840 -fcf-protection=branch -mibt.
15841 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15843 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15846 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15847 arm_word_relocations.
15849 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15852 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15853 extern array declarations.
15855 2018-03-27 Richard Biener <rguenther@suse.de>
15857 PR middle-end/84067
15858 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15859 explicit single_use checks.
15861 2018-03-27 Richard Biener <rguenther@suse.de>
15863 PR tree-optimization/85082
15864 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15867 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15869 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15870 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15871 Turn on fasynchronous-unwind-tables and funwind-tables.
15873 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15876 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15877 (*bmi_blsr_<mode>_ccz): Ditto.
15879 2018-03-26 Tom de Vries <tom@codesourcery.com>
15881 PR tree-optimization/85063
15882 * omp-general.c (offloading_function_p): New function. Factor out
15884 * omp-offload.c (pass_omp_target_link::gate): ... here.
15885 * omp-general.h (offloading_function_p): Declare.
15886 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15887 with attribute omp declare target for offloading functions.
15889 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15891 PR tree-optimization/84005
15892 * tree-data-ref.h (get_base_for_alignment): Declare.
15893 * tree-data-ref.c (get_base_for_alignment_1): New function.
15894 (get_base_for_alignment): Likewise.
15895 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15896 get_base_for_alignment to find a suitable base object, instead
15897 of always using drb->base_address.
15899 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15901 PR inline-asm/85022
15902 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15903 known size by default.
15905 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15907 PR inline-asm/85030
15908 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15909 and non BLKmode operands.
15911 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15914 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15915 Clean up attributes.
15917 2018-03-23 Richard Biener <rguenther@suse.de>
15920 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15921 we are going to emit early debug for LTO.
15923 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15925 PR inline-asm/85034
15926 * function.c (match_asm_constraints_1): Don't optimize if input
15927 doesn't satisfy general_operand predicate for output's mode.
15929 PR inline-asm/85022
15930 * alias.c (write_dependence_p): Don't require for x_canonicalized
15931 non-VOIDmode if x has VOIDmode.
15934 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15935 just don't try to optimize it rather than assert it never happens.
15937 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15939 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15940 macro expansions for definition of ST_INTERNAL_<mode> and
15941 LD_INTERNAL_<mode> builtins.
15942 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15944 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15946 (altivec_expand_st_builtin): Likewise.
15947 (altivec_expand_builtin): Remove calls to deleted functions.
15948 (rs6000_address_for_altivec): Delete this function.
15949 * config/rs6000/vector.md: Remove expands for
15950 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15952 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15955 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15956 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15957 re-computing once computed.
15958 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15959 (arm_init_machine_status): Initialize
15960 machine->static_chain_stack_bytes.
15962 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15965 * doc/extend.texi: Add four new prototypes for vec_ld.
15966 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15967 definitions for more logical presentation.
15968 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15969 entries for V1TI variants of __builtin_altivec_ld builtin.
15970 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15971 handling of V1TI variant of LVX icode pattern.
15972 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15973 (rs6000_gimple_fold_builtin): Likewise.
15974 (altivec_init_builtins): Add code to define
15975 __builtin_altivec_lvx_v1ti function.
15977 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15979 PR inline-asm/84941
15980 * function.c (match_asm_constraints_1): Don't do the optimization
15981 if input isn't a REG, SUBREG, MEM or constant.
15983 2018-03-22 Tom de Vries <tom@codesourcery.com>
15985 PR tree-optimization/84956
15986 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15987 bb_has_abnormal_pred.
15989 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15992 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15993 DECL_INITIAL (decl) to decl at the end.
15994 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15995 adjust the comment.
15997 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15999 * doc/extend.texi (__builtin_tgmath): Document when complex
16000 integer types are treated as _Complex _Float64.
16002 2018-03-21 Tom de Vries <tom@codesourcery.com>
16004 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16006 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16008 PR tree-optimization/84960
16009 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16010 if it is ENTRY block, move them into single succ of ENTRY in that case.
16012 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16014 PR tree-optimization/84811
16015 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16016 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16017 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16018 (known_subrange_p): Update accordingly. Cast each value involved
16019 in the size comparison, rather than casting the result of the
16022 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16024 PR tree-optimization/84982
16025 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16026 by flipping the least significant bit rather than all bits from
16027 bitpos to bitpos + bitsize - 1.
16029 2018-03-21 Nathan Sidwell <nathan@acm.org>
16031 * doc/extend.texi (Deprecated Features): Remove mention of
16032 long-deleted deprecations.
16034 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16037 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16038 * configure: Regenerate.
16040 2018-03-21 Tom de Vries <tom@codesourcery.com>
16042 PR tree-optimization/83126
16043 * tree-parloops.c (num_phis): New function.
16044 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16046 2018-03-21 Nathan Sidwell <nathan@acm.org>
16048 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16049 mention anon-struct/union members and trailing attributes.
16051 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16053 PR tree-optimization/84969
16054 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16055 builtin memset partitions if they set different rhs values.
16057 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16059 PR rtl-optimization/84989
16060 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16061 VEC_DUPLICATE with scalar result mode.
16063 2018-03-21 Martin Liska <mliska@suse.cz>
16066 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16067 not intended return statement.
16069 2018-03-21 Martin Liska <mliska@suse.cz>
16072 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16073 (chkp_find_bound_slots_1): Limit number of iterations.
16075 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16078 * Minor grammar fixes for x86 options.
16080 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16083 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16084 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16086 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16089 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16090 (altivec_lvx_<mode>_1op): Likewise.
16091 (altivec_stvx_<mode>_2op): Likewise.
16092 (altivec_stvx_<mode>_1op): Likewise.
16093 (altivec_lvx_<VM2:mode>): New define_expand.
16094 (altivec_stvx_<VM2:mode>): Likewise.
16095 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16096 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16097 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16098 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16099 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16100 (rs6000_gen_lvx): Likewise.
16101 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16102 (altivec_expand_stv_builtin): Likewise.
16103 (altivec_expand_builtin): Likewise.
16104 * config/rs6000/vector.md: Likewise.
16106 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16109 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16112 2018-03-20 Richard Biener <rguenther@suse.de>
16115 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16116 sign-conversions as zero, fall back to standard scalar_stmt
16119 2018-03-20 Martin Liska <mliska@suse.cz>
16122 * predict.c (rebuild_frequencies): Handle case when we have
16123 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16125 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16128 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16129 flag_section_anchors.
16130 * varasm.c (use_blocks_for_decl_p): Remove hack for
16131 dw2_force_const_mem.
16134 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16136 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16137 be created, use lowpart_subreg of operands[0] rather than operands[0]
16139 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16140 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16141 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16142 and n constraint instead of aarch64_shift_imm_di and Usd.
16143 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16144 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16146 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16149 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16150 to favor GPR over NEON registers.
16151 (<shift>di3_neon): Likewise.
16153 2018-03-20 Tom de Vries <tom@codesourcery.com>
16156 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16157 (nvptx_process_pars): Emit bar.sync asap and alap.
16159 2018-03-20 Tom de Vries <tom@codesourcery.com>
16162 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16163 seen_label if seen_label is already set.
16165 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16168 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16169 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16170 Use 1U instead of 1. Formatting fixes.
16173 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16174 instead of TREE_TYPE (s1) for the return value.
16176 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16178 PR tree-optimization/84946
16179 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16180 bitsize + bitsize in poly_uint64 rather than poly_int64.
16183 * dwarf2asm.c: Include fold-const.c.
16184 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16185 of decl rather than decl itself.
16187 PR rtl-optimization/84643
16188 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16190 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16193 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16194 calling assemble_variable.
16196 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16199 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16200 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16202 2018-03-19 Jim Wilson <jimw@sifive.com>
16205 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16206 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16207 (riscv_first_stack_step): Likewise.
16208 (riscv_option_override): Use STACK_BOUNDARY instead of
16209 MIN_STACK_BOUNDARY.
16210 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16211 MIN_STACK_BOUNDARY.
16212 (BIGGEST_ALIGNMENT): Set to 128.
16213 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16214 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16217 2018-03-19 Richard Biener <rguenther@suse.de>
16219 PR tree-optimization/84933
16220 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16221 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16223 2018-03-19 Richard Biener <rguenther@suse.de>
16225 PR tree-optimization/84859
16226 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16227 (cond_if_else_store_replacement): Perform sinking operation on
16228 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16229 Generalize what a BB with a single eligible store is.
16231 2018-03-19 Richard Biener <rguenther@suse.de>
16233 PR tree-optimization/84929
16234 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16235 chrec_is_positive against non-chrec arg.
16237 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16240 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16242 2018-03-18 Martin Liska <mliska@suse.cz>
16244 PR rtl-optimization/84635
16245 * regrename.c (build_def_use): Use matches_mode only when
16248 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16250 PR tree-optimization/84913
16251 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16252 vectorize chains of COND_EXPRs.
16254 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16256 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16258 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16260 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16262 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16264 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16266 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16267 Kito Cheng <kito.cheng@gmail.com>
16269 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16270 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16271 (nds32_adjust_reg_alloc_order): New function.
16272 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16274 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16276 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16277 nds32_print_operand, nds32_print_operand_address): Use
16278 HOST_WIDE_INT_PRINT_DEC instead.
16280 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16282 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16284 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16287 * config/i386/i386.c (initial_ix86_tune_features,
16288 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16289 unsigned long long.
16290 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16291 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16292 rather than 1u << ix86_tune. Formatting fix.
16293 (ix86_option_override_internal): Change ix86_arch_mask from
16294 unsigned int to unsigned HOST_WIDE_INT, initialize to
16295 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16296 (ix86_function_specific_restore): Likewise.
16298 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16301 * postreload.c (reload_combine_recognize_pattern): Perform
16302 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16303 truncate_int_for_mode the result for the destination's mode.
16306 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16307 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16309 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16312 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16315 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16316 regno_allocno_class_array and sorted_pseudos.
16317 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16318 insns where regno is used.
16320 2018-03-16 Martin Liska <mliska@suse.cz>
16323 * multiple_target.c (create_dispatcher_calls): Redirect
16324 reference in the symbol table.
16326 2018-03-16 Martin Liska <mliska@suse.cz>
16329 * multiple_target.c (create_dispatcher_calls): Redirect also
16332 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16336 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16337 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16338 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16340 2018-03-16 Julia Koval <julia.koval@intel.com>
16342 * doc/invoke.texi (Skylake Server): Add CLWB.
16343 Cannonlake): Remove CLWB.
16345 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16347 PR tree-optimization/84841
16348 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16350 (FLOAT_ONE_CONST_TYPE): Define.
16351 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16352 (sort_by_operand_rank): Put entries with higher constant_type last
16353 rather than first to match comments.
16355 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16357 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16360 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16363 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16364 check and use address of target always.
16366 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16369 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16370 (indirect_thunk_bnd_needed): Likewise.
16371 (indirect_thunks_used): Likewise.
16372 (indirect_thunks_bnd_used): Likewise.
16373 (indirect_return_needed): New.
16374 (indirect_return_bnd_needed): Likewise.
16375 (output_indirect_thunk_function): Add a bool argument for
16377 (output_indirect_thunk_function): Don't generate alias for
16378 function return thunk.
16379 (ix86_code_end): Call output_indirect_thunk_function to generate
16380 function return thunks.
16381 (ix86_output_function_return): Set indirect_return_bnd_needed
16382 and indirect_return_needed instead of indirect_thunk_bnd_needed
16383 and indirect_thunk_needed.
16385 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16387 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16388 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16389 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16391 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16392 Paul Hua <paul.hua.gm@gmail.com>
16395 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16397 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16399 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16400 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16401 resp. SFmode cases.
16403 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16406 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16407 instead of GET_MODE_SIZE when comparing Units.
16409 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16412 * varasm.c (hash_section): Return an unchangeble hash value
16413 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16414 Return !aarch64_can_use_per_function_literal_pools_p ().
16416 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16419 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16420 rather than address of cmode as last argument to prepare_cmp_insn.
16422 2018-03-15 Julia Koval <julia.koval@intel.com>
16424 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16425 F_AVX512VNNI, F_AVX512BITALG): New.
16427 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16430 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16431 insn for floating-point loads and stores.
16433 2018-03-14 Carl Love <cel@us.ibm.com>
16435 * config/rs6000/rs6000-c.c: Add macro definitions for
16436 ALTIVEC_BUILTIN_VEC_PERMXOR.
16437 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16438 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16439 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16440 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16442 * config/doc/extend.texi: Add prototypes for vec_permxor.
16444 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16447 * diagnostic-show-locus.c (class layout_point): Convert m_line
16448 from int to linenum_type.
16449 (line_span::comparator): Use linenum "compare" function when
16450 comparing line numbers.
16451 (test_line_span): New function.
16452 (layout_range::contains_point): Convert param "row" from int to
16454 (layout_range::intersects_line_p): Likewise.
16455 (layout::will_show_line_p): Likewise.
16456 (layout::print_source_line): Likewise.
16457 (layout::should_print_annotation_line_p): Likewise.
16458 (layout::print_annotation_line): Likewise.
16459 (layout::print_leading_fixits): Likewise.
16460 (layout::annotation_line_showed_range_p): Likewise.
16461 (struct line_corrections): Likewise for field m_row.
16462 (line_corrections::line_corrections): Likewise for param "row".
16463 (layout::print_trailing_fixits): Likewise.
16464 (layout::get_state_at_point): Likewise.
16465 (layout::get_x_bound_for_row): Likewise.
16466 (layout::print_line): Likewise.
16467 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16468 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16469 * input.c (selftest::test_linenum_comparisons): New function.
16470 (selftest::input_c_tests): Call it.
16471 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16472 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16473 * selftest.h (ASSERT_GT): New macro.
16474 (ASSERT_GT_AT): New macro.
16475 (ASSERT_LT): New macro.
16476 (ASSERT_LT_AT): New macro.
16478 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16480 PR rtl-optimization/84780
16481 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16483 2018-03-14 Martin Liska <mliska@suse.cz>
16485 * tree.c (record_node_allocation_statistics): Use
16486 get_stats_node_kind.
16487 (get_stats_node_kind): New function extracted from
16488 record_node_allocation_statistics.
16489 (free_node): Use get_stats_node_kind.
16491 2018-03-14 Richard Biener <rguenther@suse.de>
16493 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16494 that the value-set of ANTIC_IN doesn't grow.
16497 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16499 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16500 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16502 2018-03-14 Julia Koval <julia.koval@intel.com>
16504 * config.gcc (icelake-client, icelake-server): New.
16506 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16507 (initial_ix86_arch_features): Ditto.
16508 (PTA_SKYLAKE): Add SGX.
16509 (PTA_ICELAKE): Remove.
16510 (PTA_ICELAKE_CLIENT): New.
16511 (PTA_ICELAKE_SERVER): New.
16512 (ix86_option_override_internal): Split up icelake on icelake client and
16514 (get_builtin_code_for_version): Ditto.
16515 (fold_builtin_cpu): Ditto.
16516 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16517 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16518 * config/i386/i386.h (processor_type): Ditto.
16519 * doc/invoke.texi: Ditto.
16521 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16524 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16525 INTEGER_CST offset, add it together with bitpos / 8 and
16526 sign extend based on POINTER_SIZE.
16530 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16533 * config/i386/constraints.md (Yc): New register constraint.
16534 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16535 Use Yc constraint for alternative 2 of operand 0. Remove
16536 preferred_for_speed attribute.
16538 2018-03-14 Richard Biener <rguenther@suse.de>
16540 PR tree-optimization/84830
16541 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16542 with the old one to avoid oscillations.
16544 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16547 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16549 (assign_by_spills): Return a flag of reload assignment failure.
16550 Do not process the reload assignment failures. Do not spill other
16551 reload pseudos if they has the same reg class. Update n if
16553 (lra_assign): Add a return arg. Set up from the result of
16554 assign_by_spills call.
16555 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16556 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16557 usage_insns if it is not NULL.
16558 (spill_hard_reg_in_range): New function.
16559 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16560 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16561 function prototypes.
16562 (lra_assign): Change prototype.
16563 * lra.c (lra): Add code to deal with fails by splitting hard reg
16566 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16568 * config/riscv/riscv.opt (mrelax): New option.
16569 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16570 "norelax" when riscv_mrelax is disabled.
16571 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16573 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16576 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16577 reassociation for int modes.
16579 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16581 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16582 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16584 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16585 * config/aarch64/aarch64-sve.md
16586 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16587 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16588 (*extend<mode><Vwide>2): Rename to...
16589 (aarch64_sve_extend<mode><Vwide>2): ...this.
16590 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16591 renaming the old pattern to...
16592 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16594 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16595 define_expand, renaming the old pattern to...
16596 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16597 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16598 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16599 account when deciding which SVE instruction the optab should use.
16600 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16602 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16604 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16605 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16606 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16607 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16608 (tlsdesc_small_<mode>): Turn a define_expand and use
16609 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16610 (tlsdesc_small_advsimd_<mode>): ...this.
16611 (tlsdesc_small_sve_<mode>): New pattern.
16613 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16615 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16616 (UNSPEC_UMUL_HIGHPART): New constants.
16617 (MUL_HIGHPART): New int iteraor.
16618 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16619 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16621 (*<su>mul<mode>3_highpart): New define_insn.
16623 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16626 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16629 2018-03-13 Martin Liska <mliska@suse.cz>
16632 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16634 (sem_item_optimizer::~sem_item_optimizer): Release it.
16635 (sem_item_optimizer::merge_classes): Register variable aliases.
16636 (sem_item_optimizer::fixup_pt_set): New function.
16637 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16638 * ipa-icf.h: Declare new variables and functions.
16640 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16642 PR middle-end/84834
16643 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16644 integer_pow2p@2 and test integer_pow2p in condition.
16645 (A < 0 ? C : 0): Similarly for @1.
16647 PR middle-end/84831
16648 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16649 characters starting at p contain '\0' character, don't look beyond
16653 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16654 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16657 * reg-stack.c (change_stack): Change update_end var from int to
16658 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16659 also call set_block_for_insn on the newly added insns and rescan.
16662 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16663 on the last operand.
16666 * tree.c (stabilize_reference_1): Return save_expr (e) for
16667 STATEMENT_LIST even if it doesn't have side-effects.
16669 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16671 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16673 2018-03-12 Renlin Li <renlin.li@arm.com>
16675 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16676 aarch64_output_scalar_simd_mov_immediate.
16678 2018-03-12 Martin Sebor <msebor@redhat.com>
16680 PR tree-optimization/83456
16681 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16682 for perfectly overlapping calls to memcpy.
16683 (gimple_fold_builtin_memory_chk): Same.
16684 (gimple_fold_builtin_strcpy): Handle no-warning.
16685 (gimple_fold_builtin_stxcpy_chk): Same.
16686 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16688 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16690 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16691 parameter. Use it for SFmode.
16692 (rs6000_function_arg_advance_1): Adjust.
16693 (rs6000_function_arg): Adjust.
16694 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16696 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16698 PR rtl-optimization/84169
16699 PR rtl-optimization/84780
16700 * combine.c (can_combine_p): Check for a 2-insn combination whether
16701 the destination register is used between the two insns, too.
16703 2018-03-12 Richard Biener <rguenther@suse.de>
16705 PR tree-optimization/84803
16706 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16707 for refs DR analysis didn't process.
16709 2018-03-12 Richard Biener <rguenther@suse.de>
16711 PR tree-optimization/84777
16712 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16713 force-vectorize loops ignore whether we are optimizing for size.
16715 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16717 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16718 (TARGET_MD_ASM_ADJUST): Define.
16720 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16721 Kito Cheng <kito.cheng@gmail.com>
16722 Chung-Ju Wu <jasonwucj@gmail.com>
16724 * config/nds32/nds32.c (nds32_compute_stack_frame,
16725 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16726 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16727 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16728 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16729 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16730 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16731 * config/nds32/nds32.md (prologue, epilogue): Use macro
16732 NDS32_V3PUSH_AVAILABLE_P to do checking.
16734 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16737 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16738 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16739 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16740 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16741 addition of most attributes on !orig_type_die or the attribute not
16742 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16744 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16745 Chung-Ju Wu <jasonwucj@gmail.com>
16747 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16748 __NDS32_VH__ macro.
16749 * config/nds32/nds32.opt (mvh): New option.
16751 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16752 Chung-Ju Wu <jasonwucj@gmail.com>
16754 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16756 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16757 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16760 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16761 Chung-Ju Wu <jasonwucj@gmail.com>
16763 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16765 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16766 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16768 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16769 Kito Cheng <kito.cheng@gmail.com>
16770 Chung-Ju Wu <jasonwucj@gmail.com>
16772 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16773 UNSPEC_FFMISM and UNSPEC_FLMISM.
16774 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16775 for ffb, ffmism and flmism.
16776 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16777 (unspec_ffmism): Ditto.
16778 (unspec_flmism): Ditto.
16779 (nds32_expand_builtin_impl): Check if string extension is available.
16780 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16781 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16783 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16786 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16789 * lra-assigns.c (assign_by_spills): Return a flag of reload
16790 assignment failure. Do not process the reload assignment
16791 failures. Do not spill other reload pseudos if they has the same
16793 (lra_assign): Add a return arg. Set up from the result of
16794 assign_by_spills call.
16795 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16796 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16797 usage_insns if it is not NULL.
16798 (spill_hard_reg_in_range): New function.
16799 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16800 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16801 function prototypes.
16802 (lra_assign): Change prototype.
16803 * lra.c (lra): Add code to deal with fails by splitting hard reg
16806 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16809 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16811 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16814 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16815 (dw_val_node): Add val_symbolic_view.
16816 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16817 (symview_upper_bound): New.
16818 (new_line_info_table): Initialize symviews_since_reset.
16819 (dwarf2out_source_line): Count symviews_since_reset and set
16820 symview_upper_bound.
16821 (dw_val_equal_p): Handle symview.
16822 (add_AT_symview): New.
16823 (print_dw_val): Handle symview.
16824 (attr_checksum, attr_checksum_ordered): Likewise.
16825 (same_dw_val_p, size_of_die): Likewise.
16826 (value_format, output_die): Likewise.
16827 (add_high_low_attributes): Use add_AT_symview for entry_view.
16828 (dwarf2out_finish): Reset symview_upper_bound, clear
16831 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16834 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16835 Add strict argument and use it.
16836 (rs6000_split_multireg_move): Update for new strict argument.
16837 (mem_operand_gpr): Disallow all non-offsettable addresses.
16838 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16840 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16843 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16844 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16845 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16848 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16849 decl, use remap_type if we want to use the type.
16851 2018-03-09 Martin Sebor <msebor@redhat.com>
16853 PR tree-optimization/84526
16854 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16856 (builtin_access::generic_overlap): Be prepared to handle non-array
16859 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16861 PR rtl-optimization/84682
16862 * lra-constraints.c (process_address_1): Check is_address flag
16863 for address constraints.
16864 (process_alt_operands): Likewise.
16865 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16866 preprocess_constraints.
16867 * recog.h (preprocess_constraints): Add oploc parameter.
16869 * recog.c (preprocess_constraints): Test address_operand for
16870 CT_ADDRESS constraints.
16872 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16875 * lra-assigns.c (assign_by_spills): Return a flag of reload
16876 assignment failure. Do not process the reload assignment
16877 failures. Do not spill other reload pseudos if they has the same
16879 (lra_assign): Add a return arg. Set up from the result of
16880 assign_by_spills call.
16881 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16882 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16883 usage_insns if it is not NULL.
16884 (spill_hard_reg_in_range): New function.
16885 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16886 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16887 function prototypes.
16888 (lra_assign): Change prototype.
16889 * lra.c (lra): Add code to deal with fails by splitting hard reg
16892 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16895 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16896 Accept complain bool parameter. Only emit errors if it is true.
16897 (arm_parse_cpu_option_name): Likewise.
16898 (arm_target_thumb_only): Adjust callers of the above.
16899 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16900 prototype to take a default true bool parameter.
16901 (arm_parse_arch_option_name): Likewise.
16903 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16904 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16908 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16909 * configure: Regenerate.
16910 * configure.ac ("linker --version-script option"): New.
16911 ("linker soname option"): New.
16913 2018-03-09 Richard Biener <rguenther@suse.de>
16915 PR tree-optimization/84775
16916 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16917 immediate uses of predicate stmts and mark them modified.
16920 PR tree-optimization/84178
16921 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16923 (version_loop_for_if_conversion): Delay update_ssa call.
16924 (tree_if_conversion): Delay update_ssa until after predicate
16927 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16930 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16931 when the function accesses prior frames.
16933 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16936 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16937 gen_llsym, otherwise call maybe_gen_llsym.
16939 PR inline-asm/84742
16940 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16941 has ',' character inside of it.
16943 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16946 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16947 as clobbering CC_REGNUM.
16949 2018-03-08 Richard Biener <rguenther@suse.de>
16951 PR middle-end/84552
16952 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16953 (follow_copies_to_constant): Do not follow SSA names registered
16956 2018-03-08 Richard Biener <rguenther@suse.de>
16958 PR tree-optimization/84178
16959 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16961 (version_loop_for_if_conversion): Delay update_ssa call.
16962 (tree_if_conversion): Delay update_ssa until after predicate
16965 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16967 PR tree-optimization/84178
16968 * tree-if-conv.c (release_bb_predicate): Remove the
16969 the assertion that the stmts have NULL use_ops.
16970 Discard the statements, asserting that they haven't
16971 yet been added to a BB.
16973 2018-03-08 Richard Biener <rguenther@suse.de>
16975 PR tree-optimization/84746
16976 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16977 (phi_translate): Pass in destination ANTIC_OUT set.
16978 (phi_translate_1): Likewise. For a simplified result lookup
16979 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16980 (phi_translate_set): Adjust.
16981 (do_pre_regular_insertion): Likewise.
16982 (do_pre_partial_partial_insertion): Likewise.
16984 2018-03-08 Martin Liska <mliska@suse.cz>
16986 PR gcov-profile/84735
16987 * doc/gcov.texi: Document usage of profile files.
16988 * gcov-io.h: Document changes in the format.
16990 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16994 * dwarf2out.c (struct dw_line_info_table): Update comments for
16996 (FORCE_RESET_NEXT_VIEW): New.
16997 (FORCE_RESETTING_VIEW_P): New.
16998 (RESETTING_VIEW_P): Check for -1 too.
16999 (ZERO_VIEW_P): Likewise.
17000 (new_line_info_table): Force-reset next view.
17001 (dwarf2out_begin_function): Likewise.
17002 (dwarf2out_source_line): Simplify zero_view_p initialization.
17003 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17004 view directly. Omit view when omitting .loc at line 0.
17006 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17008 PR tree-optimization/84740
17009 * tree-switch-conversion.c (process_switch): Call build_constructors
17010 only if info.phi_count is non-zero.
17012 PR tree-optimization/84739
17013 * tree-tailcall.c (find_tail_calls): Check call arguments against
17014 DECL_ARGUMENTS (current_function_decl) rather than
17015 DECL_ARGUMENTS (func) when checking for tail recursion.
17017 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17019 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17020 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17021 Volker Reichelt's entry and add entries for people that perform
17022 GCC fuzzy testing and report numerous bugs.
17024 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17027 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17028 readonly data in sdata, if that is disabled.
17029 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17030 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17031 -mreadonly-in-sdata option.
17033 2018-03-07 Martin Sebor <msebor@redhat.com>
17035 PR tree-optimization/84468
17036 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17037 basic block when looking for nul assignment.
17039 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17042 * except.h (output_function_exception_table): Adjust prototype.
17043 * except.c (output_function_exception_table): Remove FNNAME parameter
17044 and add SECTION parameter. Ouput one part of the table at a time.
17045 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17046 the first part of the exception table and emit unwind directives.
17047 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17048 (i386_pe_seh_cold_init): Likewise.
17049 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17050 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17051 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17052 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17053 * config/i386/winnt.c: Include except.h.
17054 (struct seh_frame_state): Add reg_offset, after_prologue and
17055 in_cold_section fields.
17056 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17057 (i386_pe_seh_cold_init): New function.
17058 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17059 to seh->in_cold_section.
17060 (seh_emit_push): Record the offset of the push.
17061 (seh_emit_save): Record the offet of the save.
17062 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17063 Test seh->after_prologue to disregard the epilogue.
17064 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17065 (i386_pe_end_cold_function): New function.
17067 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17070 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17071 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17074 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17076 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17077 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17079 PR middle-end/84723
17080 * multiple_target.c: Include tree-inline.h and intl.h.
17081 (expand_target_clones): Diagnose and fail if node->definition and
17082 !tree_versionable_function_p (node->decl).
17084 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17086 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17088 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17089 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17090 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17092 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17095 * combine.c (try_combine): Use reg_or_subregno instead of handling
17096 just paradoxical SUBREGs and REGs.
17098 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17100 * config/arc/arc.c (arc_finalize_pic): Remove function.
17101 (arc_must_save_register): We use single base PIC register, remove
17102 checks to save/restore the PIC register.
17103 (arc_expand_prologue): Likewise.
17104 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17106 (arc_verify_short): Likewise.
17107 (arc_attr_type): Likewise.
17108 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17109 (walk_stores): Likewise.
17110 (arc_address_cost): Make it static.
17111 (arc_verify_short): Likewise.
17112 (branch_dest): Likewise.
17113 (arc_attr_type): Likewise.
17114 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17115 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17116 (arc_final_prescan_insn): Remove inserting the nops due to
17117 hardware hazards. It is done in reorg step.
17118 (insn_length_variant_t): Remove.
17119 (insn_length_parameters_t): Likewise.
17120 (arc_insn_length_parameters): Likewise.
17121 (arc_get_insn_variants): Likewise.
17122 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17124 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17126 PR inline-asm/84683
17127 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17130 PR tree-optimization/84687
17131 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17133 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17135 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17137 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17138 Rename to ppc_speculation_barrier.
17139 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17140 __builtin_ppc_speculation_barrier.
17142 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17145 * combine.c (combine_simplify_rtx): Don't try to simplify if
17146 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17149 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17151 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17152 to 32 bytes when compiling for POWER9.
17154 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17157 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17158 regparm >= 3 with no arg reg available also for calls with
17159 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17162 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17164 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17166 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17169 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17171 2018-03-05 Richard Biener <rguenther@suse.de>
17173 PR tree-optimization/84486
17174 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17175 When inserting a __builtin_assume_aligned call set the LHS
17176 SSA name alignment info accordingly.
17178 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17180 PR tree-optimization/84114
17181 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17182 Avoid reassociation of FLOAT_MODE addition.
17184 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17186 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17187 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17188 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17189 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17190 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17191 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17192 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17194 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17195 __builtin_ia32_wbinvd): New builtins.
17196 (SPECIAL_ARGS2): New.
17197 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17198 (SPECIAL_ARGS2): New.
17199 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17200 (ix86_valid_target_attribute_inner_p): Ditto.
17201 (ix86_init_mmx_sse_builtins): Add special_args2.
17202 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17203 TARGET_WBNOINVD_P): New.
17204 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17205 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17206 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17207 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17208 * config/i386/pconfigintrin.h: New file.
17209 * config/i386/wbnoinvdintrin.h: Ditto.
17210 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17212 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17214 2018-03-05 Richard Biener <rguenther@suse.de>
17216 PR tree-optimization/84670
17217 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17219 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17220 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17221 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17222 doesn't grow if all successors (recursively) were visited at least
17225 2018-03-05 Richard Biener <rguenther@suse.de>
17227 PR tree-optimization/84650
17228 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17229 if executed in the loop pipeline.
17231 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17233 * doc/configfiles.texi (Configuration Files): Move info about
17234 conditionalizing $target-protos.h to...
17235 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17236 differs from $target-protos.h.
17238 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17239 Chung-Ju Wu <jasonwucj@gmail.com>
17241 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17242 * config/nds32/nds32-multiple.md (setmemsi): Define.
17243 * config/nds32/nds32-memory-manipulation.c
17244 (nds32_gen_dup_4_byte_to_word_value): New.
17245 (emit_setmem_word_loop): New.
17246 (emit_setmem_byte_loop): New.
17247 (nds32_expand_setmem_loop): New.
17248 (nds32_expand_setmem_loop_v3m): New.
17249 (nds32_expand_setmem_unroll): New.
17250 (nds32_expand_setmem): New.
17252 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17253 Chung-Ju Wu <jasonwucj@gmail.com>
17255 * config/nds32/nds32-memory-manipulation.c
17256 (nds32_emit_load_store): New.
17257 (nds32_emit_post_inc_load_store): New.
17258 (nds32_emit_mem_move): New.
17259 (nds32_emit_mem_move_block): New.
17260 (nds32_expand_movmemsi_loop_unknown_size): New.
17261 (nds32_expand_movmemsi_loop_known_size): New.
17262 (nds32_expand_movmemsi_loop): New.
17263 (nds32_expand_movmemsi_unroll): New.
17264 (nds32_expand_movmemqi): Rename ...
17265 (nds32_expand_movmemsi): ... to this.
17266 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17267 (movmemsi): ... to this.
17268 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17269 (nds32_expand_movmemsi): ... to this.
17271 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17272 Monk Chiang <sh.chiang04@gmail.com>
17273 Chung-Ju Wu <jasonwucj@gmail.com>
17275 * config/nds32/nds32-protos.h
17276 (nds32_expand_load_multiple): New arguments.
17277 (nds32_expand_store_multiple): Ditto.
17278 (nds32_valid_multiple_load_store): Rename ...
17279 (nds32_valid_multiple_load_store_p): ... to this.
17280 * config/nds32/nds32-memory-manipulation.c
17281 (nds32_expand_load_multiple): Refine implementation.
17282 (nds32_expand_store_multiple): Ditto.
17283 * config/nds32/nds32-multiple.md
17284 (load_multiple): Update nds32_expand_load_multiple interface.
17285 (store_multiple): Update nds32_expand_store_multiple interface.
17286 * config/nds32/nds32-predicates.c
17287 (nds32_valid_multiple_load_store): Rename ...
17288 (nds32_valid_multiple_load_store_p): ... to this and refine
17290 * config/nds32/predicates.md
17291 (nds32_load_multiple_and_update_address_operation): New predicate.
17292 (nds32_store_multiple_and_update_address_operation): New predicate.
17294 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17295 Chung-Ju Wu <jasonwucj@gmail.com>
17297 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17298 (combo): New attribute.
17299 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17301 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17303 * config/nds32/nds32.opt: Change -mcmodel= default value.
17305 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17306 Monk Chiang <sh.chiang04@gmail.com>
17307 Chung-Ju Wu <jasonwucj@gmail.com>
17309 * config/nds32/constants.md (unspec_element): New enum.
17310 * config/nds32/constraints.md (Umw): New constraint.
17311 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17312 * config/nds32/nds32-intrinsic.md: Likewise.
17313 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17314 (nds32_valid_smw_lwm_base_p): New.
17315 (nds32_output_smw_single_word): New.
17316 (nds32_output_lmw_single_word): New.
17317 (nds32_expand_unaligned_load): New.
17318 (nds32_expand_unaligned_store): New.
17319 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17320 (nds32_output_smw_single_word): Declare.
17321 (nds32_output_lmw_single_word): Declare.
17322 (nds32_expand_unaligned_load): Declare.
17323 (nds32_expand_unaligned_store): Declare.
17324 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17325 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17326 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17327 NDS32_BUILTIN_UASTORE_DW.
17328 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17331 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17332 Kito Cheng <kito.cheng@gmail.com>
17333 Chung-Ju Wu <jasonwucj@gmail.com>
17335 * config/nds32/nds32-intrinsic.c
17336 (nds32_expand_builtin_null_ftype_reg): Delete.
17337 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17338 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17339 (nds32_read_argument): New.
17340 (nds32_legitimize_target): Ditto.
17341 (nds32_legitimize_argument): Ditto.
17342 (nds32_check_constant_argument): Ditto.
17343 (nds32_expand_unop_builtin): Ditto.
17344 (nds32_expand_unopimm_builtin): Ditto.
17345 (nds32_expand_binop_builtin): Ditto.
17346 (nds32_builtin_decl_impl): Ditto.
17347 (builtin_description): Ditto.
17348 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17349 (nds32_init_builtins_impl): Ditto.
17350 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17351 (nds32_builtin_decl): New.
17352 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17353 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17355 2018-03-02 Jeff Law <law@redhat.com>
17357 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17358 (redundant_insn, fill_simple_delay_slots): Likewise.
17359 (fill_slots_from_thread): Likewise.
17360 * resource.c (mark_referenced_resources): Likewise.
17361 (mark_set_resources, find_dead_or_set_registers): Likewise.
17363 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17365 * substring-locations.h (format_warning_va): Formatting fix for
17366 ATTRIBUTE_GCC_DIAG.
17367 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17369 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17370 * substring-locations.c: Include intl.h.
17371 (format_warning_va): Turned into small wrapper around
17372 format_warning_n_va, renamed to ...
17373 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17374 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17376 (format_warning_at_substring_n): New function.
17377 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17378 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17379 format_warning_at_substring with just a shorter name instead of
17380 const function pointer.
17381 (fmtwarn_n): New function.
17382 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17383 appropriate, get rid of all the fmtstr temporaries, move conditionals
17384 with G_() wrapped string literals directly into fmtwarn arguments,
17385 cast dir.len to (int), formatting fixes.
17387 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17389 * doc/invoke.texi: Remove "Cilk Plus" references.
17391 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17392 Richard Biener <rguenther@suse.de>
17395 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17396 for error or warning attributes if CALL_FROM_THUNK_P is set.
17399 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17402 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17403 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17406 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17407 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17409 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17410 instead of -1U in last predictors element's probability member.
17412 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17415 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17416 arguments if they are comparable.
17418 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17420 PR tree-optimization/84634
17421 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17422 masks and masked_loop_p with a single loop_masks, making sure it's
17423 null for bb vectorization.
17425 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17427 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17428 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17429 loop->force_vectorize to check whether there is no alias.
17431 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17434 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17436 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17438 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17439 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17440 instead of a loop around prev_real_insn.
17441 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17444 PR inline-asm/84625
17445 * config/i386/i386.c (ix86_print_operand): Use conditional
17446 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17449 2018-03-02 Richard Biener <rguenther@suse.de>
17451 PR tree-optimization/84427
17452 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17453 (bitmap_set_subtract_values): Rewrite to handle multiple
17456 (prune_clobbered_mems): Likewise.
17457 (phi_translate): Take edge instead of pred/phiblock.
17458 (phi_translate_1): Likewise.
17459 (phi_translate_set): Likewise. Insert all translated
17460 exprs for a value into the set, keeping possibly multiple
17461 expressions per value.
17462 (compute_antic_aux): Adjust for phi_translate changes.
17463 When intersecting union the expressions and prune those
17464 not in the final value set, keeping possibly multiple
17465 expressions per value. Do not use value-insertion
17466 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17467 all expressions. Add verification that the value-sets
17468 only shrink during iteration.
17469 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17470 (do_pre_regular_insertion): Likewise.
17471 (do_pre_partial_partial_insertion): Likewise.
17473 2018-03-02 Richard Biener <rguenther@suse.de>
17476 * config/darwin.c (saved_debug_info_level): New static global.
17477 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17478 (darwin_asm_lto_end): Restore debug info generation settings.
17480 2018-03-01 Martin Liska <mliska@suse.cz>
17483 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17484 volatile arguments.
17486 2018-03-01 Richard Biener <rguenther@suse.de>
17489 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17490 type annotation with LTO when debug was disabled at compile-time.
17492 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17494 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17496 (mips_final_postscan_insn): Likewise.
17498 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17500 PR rtl-optimization/84528
17501 * alias.c (init_alias_target): Add commentary.
17502 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17503 a unique base value if the frame pointer is not eliminated
17504 to the stack pointer.
17506 2018-03-01 Tom de Vries <tom@codesourcery.com>
17508 PR rtl-optimization/83327
17509 * lra-int.h (hard_regs_spilled_into): Declare.
17510 * lra.c (hard_regs_spilled_into): Define.
17511 (init_reg_info): Init hard_regs_spilled_into.
17512 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17513 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17514 (process_bb_lives): Handle hard_regs_spilled_into.
17515 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17516 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17518 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17520 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17521 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17522 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17523 * config/rs6000/aix72.h: New file.
17525 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17527 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17528 instead of warning_at with conditional singular and plural messages
17532 * stor-layout.c (update_alignment_for_field): For
17533 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17534 && !DECL_PACKED (field), do the alignment update, just use
17535 only desired_align instead of MAX (type_align, desired_align)
17537 (place_field): Don't do known_align < desired_align handling
17538 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17539 is non-NULL, instead do it after rli->prev_field handling and
17540 only if not within a bitfield word. For DECL_PACKED (field)
17541 use type_align of BITS_PER_UNIT.
17543 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17545 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17546 superfluous parentheses and trailing spaces.
17548 2018-02-28 Richard Biener <rguenther@suse.de>
17550 PR tree-optimization/84584
17551 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17552 SCoPs with fake exit edge.
17554 2018-02-28 Martin Liska <mliska@suse.cz>
17557 * timevar.c (timer::print): Fix format to properly print 100%
17560 2018-02-28 Richard Biener <rguenther@suse.de>
17562 PR middle-end/84607
17563 * genmatch.c (capture_info::walk_match): Do not mark
17564 captured expressions without operands as expr_p given
17565 they act more like predicates and should be subject to
17566 "lost tail" side-effect preserving.
17568 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17570 PR rtl-optimization/81611
17571 * auto-inc-dec.c (attempt_change): Move dead note from
17572 mem_insn if it's the next use of regno
17573 (find_address): Take address use of reg holding
17574 non-incremented value. Add parm to limit search to the named
17576 (merge_in_block): Attempt to use a mem insn that is the next
17577 use of the original regno.
17579 2018-02-27 Martin Sebor <msebor@redhat.com>
17582 * doc/invoke.texi (-Wmissing-attributes): New option.
17583 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17585 2018-02-27 Martin Sebor <msebor@redhat.com>
17587 PR translation/84207
17588 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17589 n argument to unsigned HOST_WIDE_INT.
17590 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17591 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17592 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17593 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17595 2018-02-27 Richard Biener <rguenther@suse.de>
17597 PR tree-optimization/84512
17598 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17599 Do not use the estimate returned from record_stmt_cost for
17600 the scalar iteration cost but sum properly using add_stmt_cost.
17602 2018-02-27 Richard Biener <rguenther@suse.de>
17604 PR tree-optimization/84466
17605 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17606 Adjust last change to less strictly validate use operands.
17608 2018-02-27 Martin Liska <mliska@suse.cz>
17610 PR gcov-profile/84548
17611 * gcov.c (process_file): Allow partial overlap and consider it
17612 also as group functions.
17613 (output_lines): Properly calculate range of lines for a group.
17615 2018-02-27 Martin Liska <mliska@suse.cz>
17617 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17618 'ggc' suffixes. Change first column width.
17619 (timer::print): Fix formatting of the column.
17621 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17623 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17624 preserve inline entry blocks for the sake of debug inline
17625 entry point markers alone.
17626 (remove_unused_locals): Suggest in comments a better place to
17627 force the preservation of inline entry blocks that are
17628 otherwise unused, but do not preserve them.
17630 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17632 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17634 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17637 * config/i386/constraints.md (Bs): Replace
17638 ix86_indirect_branch_register with
17639 TARGET_INDIRECT_BRANCH_REGISTER.
17641 * config/i386/i386.md (indirect_jump): Likewise.
17642 (tablejump): Likewise.
17643 (*sibcall_memory): Likewise.
17644 (*sibcall_value_memory): Likewise.
17645 Peepholes of indirect call and jump via memory: Likewise.
17646 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17647 (*sibcall_value_GOT_32): Likewise.
17648 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17649 (GOT_memory_operand): Likewise.
17650 (call_insn_operand): Likewise.
17651 (sibcall_insn_operand): Likewise.
17652 (GOT32_symbol_operand): Likewise.
17653 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17655 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17657 PR rtl-optimization/83496
17658 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17659 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17660 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17661 redundant insn, if any.
17662 (relax_delay_slots): Likewise.
17663 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17665 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17667 PR tree-optimization/83965
17668 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17669 that grouped statements are part of a reduction chain. Return
17670 true if the statement is not marked as a reduction itself but
17671 is part of a group.
17672 (vect_recog_dot_prod_pattern): Don't check whether the statement
17673 is part of a group here.
17674 (vect_recog_sad_pattern): Likewise.
17675 (vect_recog_widen_sum_pattern): Likewise.
17677 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17680 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17682 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17685 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17687 (ix86_output_indirect_function_return): New prototype.
17688 (ix86_split_simple_return_pop_internal): Likewise.
17689 * config/i386/i386.c (indirect_return_via_cx): New.
17690 (indirect_return_via_cx_bnd): Likewise.
17691 (indirect_thunk_name): Handle return va CX_REG.
17692 (output_indirect_thunk_function): Create alias for
17693 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17694 (ix86_output_indirect_jmp): Remove the bool argument.
17695 (ix86_output_indirect_function_return): New function.
17696 (ix86_split_simple_return_pop_internal): Likewise.
17697 * config/i386/i386.md (*indirect_jump): Don't pass false
17698 to ix86_output_indirect_jmp.
17699 (*tablejump_1): Likewise.
17700 (simple_return_pop_internal): Change it to define_insn_and_split.
17701 Call ix86_split_simple_return_pop_internal to split it for
17702 -mfunction-return=.
17703 (simple_return_indirect_internal): Call
17704 ix86_output_indirect_function_return instead of
17705 ix86_output_indirect_jmp.
17707 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17710 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17711 memset and value initialization afterwards.
17713 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17715 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17717 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17720 * common/config/aarch64/aarch64-common.c
17721 (aarch_option_optimization_table[]): Switch
17722 off fomit-frame-pointer
17724 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17725 Chung-Ju Wu <jasonwucj@gmail.com>
17727 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17729 (store_multiple): Ditto.
17731 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17733 * config.gcc: Add --with-cpu support for nds32 target.
17734 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17735 * config/nds32/nds32.opt: Add -mcpu= option.
17737 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17739 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17740 isel=yes): Warn for these deprecated options.
17742 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17744 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17745 ISA_2_5_MASKS_EMBEDDED.
17747 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17749 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17750 p->max as pointers rather than using iterative_hash_expr.
17752 2018-02-23 Carl Love <cel@us.ibm.com>
17754 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17755 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17757 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17758 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17759 P8V_BUILTIN_VEC_VUNSIGNED2.
17761 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17764 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17765 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17767 * lra-constraints.c (curr_insn_transform): Set up
17768 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17770 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17771 * lra-eliminations.c (spill_pseudos): Ditto.
17772 (process_insn_for_elimination): Ditto.
17773 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17774 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17775 LRA_NON_CLOBBERED_ALT.
17777 2018-02-22 Martin Sebor <msebor@redhat.com>
17779 PR tree-optimization/84480
17780 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17781 to maybe_diag_stxncpy_trunc. Call it.
17782 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17783 from gimple_fold_builtin_strcpy. Print inlining stack.
17784 (handle_builtin_stxncpy): Print inlining stack.
17785 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17787 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17790 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17791 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17792 and -fcheck-pointer-bounds are used together.
17793 (indirect_thunk_prefix): New enum.
17794 (indirect_thunk_need_prefix): New function.
17795 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17796 "_nt" instead of "_bnd" for NOTRACK prefix.
17797 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17798 (output_indirect_thunk_function): Likewise.
17800 (ix86_code_end): Update output_indirect_thunk_function calls.
17801 (ix86_output_indirect_branch_via_reg): Replace
17802 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17803 (ix86_output_indirect_branch_via_push): Likewise.
17804 (ix86_output_function_return): Likewise.
17805 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17806 incompatible with -fcf-protection=branch and
17807 -fcheck-pointer-bounds.
17809 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17812 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17813 Change gcc_assert call to output_operand_lossage.
17815 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17817 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17819 2018-02-22 DJ Delorie <dj@redhat.com>
17820 Sebastian Perta <sebastian.perta@renesas.com>
17821 Oleg Endo <olegendo@gcc.gnu.org>
17823 * config/rx/rx.c (rx_rtx_costs): New function.
17824 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17826 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17828 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17830 2018-02-22 Martin Liska <mliska@suse.cz>
17833 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17834 Add "native" as a possible value.
17836 2018-02-22 Martin Liska <mliska@suse.cz>
17839 * config/i386/i386.c (ix86_option_override_internal):
17840 Add "native" as a possible value for -march and -mtune.
17842 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17845 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17846 to all type variants.
17848 PR tree-optimization/84503
17849 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17850 width as info->bitpos + info->bitsize - start.
17851 (merged_store_group::merge_overlapping): Simplify width computation.
17852 (check_no_overlap): New function.
17853 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17854 start + width and last_order of the group, fail if check_no_overlap
17856 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17857 to group if check_no_overlap fails.
17859 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17861 * config/rs6000/altivec.md: Delete contraint arguments to
17862 define_expand, define_split, and define_peephole2, and in
17863 define_insn_and_split if always unused.
17864 * config/rs6000/darwin.md: Ditto.
17865 * config/rs6000/dfp.md: Ditto.
17866 * config/rs6000/rs6000.md: Ditto.
17867 * config/rs6000/sync.md: Ditto.
17868 * config/rs6000/vector.md: Ditto.
17869 * config/rs6000/vsx.md: Ditto.
17871 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17873 * config/rs6000/altivec.md: Write output control strings as braced
17874 blocks instead of double-quoted strings.
17875 * config/rs6000/darwin.md: Ditto.
17876 * config/rs6000/rs6000.md: Ditto.
17877 * config/rs6000/vector.md: Ditto.
17878 * config/rs6000/vsx.md: Ditto.
17880 2018-02-21 Jason Merrill <jason@redhat.com>
17882 PR c++/84314 - ICE with templates and fastcall attribute.
17883 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17885 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17887 * ipa-cp.c (determine_versionability): Fix comment typos.
17889 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17892 * ipa-cp.c (determine_versionability): Do not version functions caling
17895 2018-02-21 Martin Liska <mliska@suse.cz>
17898 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17899 Add "native" as a possible value.
17900 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17901 the macro when native cpu detection is available.
17903 2018-02-21 Martin Liska <mliska@suse.cz>
17906 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17907 Add "native" as a possible value.
17908 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17909 when native cpu detection is available.
17911 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17912 Martin Sebor <msebor@redhat.com>
17914 PR tree-optimization/84478
17915 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17917 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17918 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17919 support which is conservatively correct, for 2 only stay conservative
17920 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17921 argument to the 2 argument get_range_strlen, adjust 6 arg
17922 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17924 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17925 (gimple_fold_builtin_strlen): Pass true as last argument to
17928 2018-02-20 Martin Sebor <msebor@redhat.com>
17930 PR middle-end/84095
17931 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17932 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17933 (builtin_memref::builtin_memref): Factor out parts into
17934 set_base_and_offset and call it.
17936 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17938 PR middle-end/84406
17939 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17940 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17941 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17942 search at the associated MODE_INT.
17944 2018-02-20 Jeff Law <law@redhat.com>
17946 PR middle-end/82123
17947 PR tree-optimization/81592
17948 PR middle-end/79257
17949 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17950 for range data rather than using global data.
17951 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17952 range data rather than using global data.
17953 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17954 pass it to children as needed.
17955 (struct directive::fmtresult): Similarly.
17956 (struct directive::set_width): Similarly.
17957 (struct directive::set_precision): Similarly.
17958 (format_integer, format_directive, parse_directive): Similarly.
17959 (format_none): Accept unnamed vr_values parameter.
17960 (format_percent, format_floating, format_character): Similarly.
17961 (format_string, format_plain): Similarly.
17962 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17963 the EVRP range analyzer for range data rather than using global data.
17964 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17965 gimple-ssa-evrp-analyze.h
17966 (class sprintf_dom_walker): Add after_dom_children member function.
17967 Add evrp_range_analyzer member.
17968 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17969 range analyzer as needed.
17970 (sprintf_dom_walker::after_dom_children): New member function.
17971 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17973 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17974 (evrp_range_analyzer::pop_to_marker): Likewise.
17976 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17978 PR tree-optimization/84419
17979 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17980 with the required type if its current type is compatible but
17983 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17985 PR middle-end/82004
17986 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17987 after vectorization.
17989 2018-02-20 Martin Liska <mliska@suse.cz>
17992 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17993 possible values if we don't have a hint.
17995 2018-02-20 Martin Liska <mliska@suse.cz>
17999 * final.c (shorten_branches): Build align_tab array with one
18001 * opts.c (finish_options): Add alignment option limit check.
18002 (MAX_CODE_ALIGN): Likewise.
18003 (MAX_CODE_ALIGN_VALUE): Likewise.
18004 * doc/invoke.texi: Document maximum allowed option value for
18005 all -falign-* options.
18007 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18010 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18011 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18012 * var-tracking.c (emit_note_insn_var_location): Remove all references
18013 to NOTE_INSN_CALL_ARG_LOCATION.
18014 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18015 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18016 Use copy_rtx_if_shared.
18017 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18018 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18019 (dwarf2out_var_location): Remove handling of
18020 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18022 * final.c (final_scan_insn): Remove all references to
18023 NOTE_INSN_CALL_ARG_LOCATION.
18024 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18025 before dumping final insns.
18026 * except.c (emit_note_eh_region_end): Remove all references to
18027 NOTE_INSN_CALL_ARG_LOCATION.
18028 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18029 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18030 * config/arc/arc.c (hwloop_optimize): Likewise.
18031 * config/arm/arm.c (create_fix_barrier): Likewise.
18032 * config/s390/s390.c (s390_chunkify_start): Likewise.
18033 * config/sh/sh.c (find_barrier): Likewise.
18034 * config/i386/i386.c (rest_of_insert_endbranch,
18035 ix86_seh_fixup_eh_fallthru): Likewise.
18036 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18037 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18038 * config/frv/frv.c (frv_function_prologue): Likewise.
18039 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18041 (note_outside_basic_block_p): Remove all references to
18042 NOTE_INSN_CALL_ARG_LOCATION.
18043 * gengtype.c (adjust_field_rtx_def): Likewise.
18044 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18046 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18047 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18050 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18053 PR tree-optimization/84452
18054 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18055 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18058 2018-02-19 Martin Liska <mliska@suse.cz>
18061 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18063 2018-02-19 Martin Liska <mliska@suse.cz>
18064 Richard Sandiford <richard.sandiford@linaro.org>
18066 PR tree-optimization/82491
18067 * gimple-fold.c (get_base_constructor): Make earlier bail out
18070 2018-02-19 Carl Love <cel@us.ibm.com>
18072 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18073 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18075 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18076 P8V_BUILTIN_VEC_NEG.
18078 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18080 * config/rl78/rl78.md (movdf): New define expand.
18082 2018-02-19 Martin Liska <mliska@suse.cz>
18085 * doc/invoke.texi: Fix typo.
18086 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18088 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18090 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18091 handle rs6000_single_float and rs6000_double_float specially for
18094 2018-02-16 Jeff Law <law@redhat.com>
18096 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18097 (pop_regs): Use it.
18099 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18102 * ipa-inline.c (inline_small_functions): Fix a typo.
18104 2018-02-16 Nathan Sidwell <nathan@acm.org>
18106 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18108 2018-02-16 Carl Love <cel@us.ibm.com>
18110 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18111 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18112 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18113 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18114 expansion to P8V_BUILTIN_VEC_FLOAT2.
18116 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18118 PR rtl-optimization/70023
18119 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18120 src_regno into account.
18122 2018-02-16 Carl Love <cel@us.ibm.com>
18124 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18125 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18126 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18127 * config/rs6000/rs6000.c: Remove case statements for
18128 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18129 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18130 and P9V_BUILTIN_VEC_VINSERT4B.
18131 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18132 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18133 * config/rs6000/vsx.md:
18134 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18137 2018-02-16 Carl Love <cel@us.ibm.com>
18139 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18141 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18143 * config/rs6000/rs6000-c.c: Add the definitions for
18144 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18145 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18146 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18147 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18148 definition for insert4b and define insn *insert3b_internal.
18149 * doc/extend.texi: Add documentation for vec_extract4b.
18151 2018-02-16 Nathan Sidwell <nathan@acm.org>
18153 * doc/extend.texi (Backwards Compatibility): Mention friend
18154 injection. Note for-scope is deprecated.
18155 * doc/invoke.texi (-ffriend-injection): Deprecate.
18157 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18159 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18160 that moved to I2, also allow destinations that are a paradoxical
18161 subreg (instead of a normal reg).
18163 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18166 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18169 2018-02-16 Richard Biener <rguenther@suse.de>
18171 PR tree-optimization/84037
18172 PR tree-optimization/84016
18174 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18175 Adjust vec_construct for the fact we need additional higher latency
18176 128bit inserts for AVX256 and AVX512 vector builds.
18177 (ix86_add_stmt_cost): Scale vector construction cost for
18180 2018-02-16 Richard Biener <rguenther@suse.de>
18182 PR tree-optimization/84417
18183 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18184 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18185 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18187 2018-02-16 Martin Liska <mliska@suse.cz>
18190 * internal-fn.def (ASAN_CHECK): Set proper flags.
18191 (ASAN_MARK): Likewise.
18193 2018-02-16 Julia Koval <julia.koval@intel.com>
18195 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18196 from PTA_CANNONLAKE.
18198 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18201 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18202 Use ++iter rather than iter++ for std::list iterators.
18203 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18204 defer deleting them until all nodes in the forest are processed. Do
18205 free even leaf nodes. Change to_process into auto_vec.
18208 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18209 * vec.h (vec_default_construct): Use memset instead of placement new
18210 if BROKEN_VALUE_INITIALIZATION is defined.
18211 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18212 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18215 PR rtl-optimization/83723
18216 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18217 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18218 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18220 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18222 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18224 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18226 PR rtl-optimization/81443
18227 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18228 from inner REGs to paradoxical SUBREGs.
18230 2018-02-16 Richard Biener <rguenther@suse.de>
18232 PR tree-optimization/84399
18233 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18234 For operands we can analyze at their definition make sure we can
18235 analyze them at each use as well.
18237 2018-02-16 Richard Biener <rguenther@suse.de>
18239 PR tree-optimization/84190
18240 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18241 volatile accesses if the decl isn't volatile.
18243 2018-02-15 Jason Merrill <jason@redhat.com>
18245 PR c++/84314 - ICE with templates and fastcall attribute.
18246 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18247 TYPE_CANONICAL on an existing type.
18249 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18251 PR tree-optimization/84383
18252 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18253 dstoff nor call operand_equal_p if dstbase is NULL.
18255 PR tree-optimization/84334
18256 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18257 also a CONSTANT_CLASS_P, punt.
18259 2018-02-14 Jim Wilson <jimw@sifive.com>
18261 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18262 first SMALL_OPERAND check. New local min_second_step. Move assert
18263 to where locals are set. Add TARGET_RVC support.
18264 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18266 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18268 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18270 2018-02-14 Martin Sebor <msebor@redhat.com>
18272 PR tree-optimization/83698
18273 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18274 arrays constrain the offset range to their bounds.
18275 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18276 (builtin_access::overlap): Avoid setting the size of overlap if it's
18278 (maybe_diag_overlap): Also consider arrays when deciding what values
18279 of offsets to include in diagnostics.
18281 2018-02-14 Martin Sebor <msebor@redhat.com>
18284 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18285 that correspond to the kind of a declaration.
18287 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18290 * config/pa/pa.md: Load address of PIC label using the linkage table
18291 if the label is nonlocal.
18293 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18295 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18296 warning message if user requests -maltivec=be.
18297 * doc/invoke.texi: Document deprecation of -maltivec=be.
18299 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18302 * config/rs6000/rs6000-c.c: Update definitions for
18303 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18304 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18306 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18309 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18310 add _get_ssp intrinsics. Remove argument from
18311 __builtin_ia32_rdssp[d|q].
18312 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18313 * config/i386/i386-builtin.def: Remove argument from
18314 __builtin_ia32_rdssp[d|q].
18315 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18316 ix86_expand_special_args_builtin for _rdssp[d|q].
18317 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18318 Clear register before usage.
18319 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18320 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18322 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18324 PR tree-optimization/84357
18325 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18326 operand 1 of an ARRAY_REF too.
18328 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18331 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18332 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18334 (set_of_reg): New struct.
18335 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18336 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18337 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18339 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18340 Split into bitclr, bitset, bitinvert patterns if appropriate.
18341 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18342 use rx_fuse_in_memory_bitop.
18343 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18344 to named insn, correct maximum insn length.
18346 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18349 * machmode.def: Define a complex mode for PARTIAL_INT.
18350 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18352 * doc/rtl.texi: Document CSPImode.
18353 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18355 (msp430_hard_regno_nregs_with_padding): Likewise.
18357 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18360 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18362 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18364 PR rtl-optimization/84169
18365 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18366 we generated a parallel as new i3 and we split that to new i2 and i3
18367 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18368 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18369 those to i2, not i1. Partially rewrite this scan code.
18371 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18374 * stor-layout.c (place_field): For variable length fields, adjust
18375 offset_align afterwards not just based on the field's alignment,
18376 but also on the size.
18378 PR middle-end/84309
18379 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18380 of exps and logs in the use_exp2 case.
18382 2018-02-13 Jeff Law <law@redhat.com>
18384 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18385 entry for "vector".
18387 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18390 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18394 * common.opt (gas-loc-support, gas-locview-support): New.
18395 (ginline-points, ginternal-reset-location-views): New.
18396 * doc/invoke.texi: Document them. Use @itemx where intended.
18397 (gvariable-location-views): Adjust.
18398 * target.def (reset_location_view): New.
18399 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18400 (TARGET_RESET_LOCATION_VIEW): New.
18401 * doc/tm.texi: Rebuilt.
18402 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18403 (dwarf2out_default_as_locview_support): New.
18404 (output_asm_line_debug_info): Use option variables.
18405 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18406 (output_loc_list): Likewise.
18407 (add_high_low_attributes): Check option variables.
18408 Don't output entry view attribute in strict mode.
18409 (gen_inlined_subroutine_die): Check option variables.
18410 (dwarf2out_inline_entry): Likewise.
18411 (init_sections_and_labels): Likewise.
18412 (dwarf2out_early_finish): Likewise.
18413 (maybe_reset_location_view): New, from...
18414 (dwarf2out_var_location): ... here. Call it.
18415 * debug.h (dwarf2out_default_as_loc_support): Declare.
18416 (dwarf2out_default_as_locview_support): Declare.
18417 * hooks.c (hook_int_rtx_insn_0): New.
18418 * hooks.h (hook_int_rtx_insn_0): Declare.
18419 * toplev.c (process_options): Take -gas-loc-support and
18420 -gas-locview-support from dwarf2out. Enable
18421 -gvariable-location-views by default only with locview
18422 assembler support. Enable -ginternal-reset-location-views by
18423 default only if the target defines the corresponding hook.
18424 Enable -ginline-points by default if location views are
18425 enabled; force it disabled if statement frontiers are
18427 * tree-inline.c (expand_call_inline): Check option variables.
18428 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18430 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18432 PR tree-optimization/84321
18433 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18434 handling. Also check whether the anti-range contains any values
18435 that satisfy the mask; switch to a VR_RANGE if not.
18437 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18440 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18442 2018-02-13 Martin Jambor <mjambor@suse.cz>
18445 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18446 of call statements, also set location of a load to a temporary.
18448 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18450 * config/rl78/rl78.c (add_vector_labels): New function.
18451 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18452 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18453 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18454 which checks that no arguments are passed.
18455 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18456 * doc/extend.texi: Documentation for the new attribute.
18458 2018-02-13 Andreas Schwab <schwab@suse.de>
18460 * config/riscv/linux.h (CPP_SPEC): Define.
18462 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18465 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18466 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18467 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18468 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18469 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18470 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18471 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18472 temporarily for AES and PCLMUL builtins.
18474 PR tree-optimization/84339
18475 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18476 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18479 PR middle-end/84309
18480 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18481 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18482 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18484 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18486 * omp-simd-clone.h: New file.
18487 * omp-simd-clone.c: Include omp-simd-clone.h.
18488 (expand_simd_clones): No longer static.
18489 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18490 cgraph.h and omp-simd-clone.h.
18491 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18492 (vect_recog_widen_shift_pattern): Formatting fix.
18493 (vect_pattern_recog_1): Don't check optab for calls.
18496 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18497 operands[2] into a REG before using gen_lowpart on it.
18499 2018-02-12 Jeff Law <law@redhat.com>
18502 * config/sh/sh.c (find_barrier): Consider a sibling call
18505 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18506 successfully back substituting a reg.
18508 2018-02-12 Richard Biener <rguenther@suse.de>
18510 PR tree-optimization/84037
18511 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18512 parameter, move visited init to caller.
18513 (vect_slp_analyze_operations): Separate cost from validity
18514 check, initialize visited once for all instances.
18515 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18517 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18519 (vect_model_promotion_demotion_cost): Likewise.
18520 (vectorizable_bswap): Guard cost modeling with !slp_node
18521 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18523 (vectorizable_call): Likewise.
18524 (vectorizable_conversion): Likewise.
18525 (vectorizable_assignment): Likewise.
18526 (vectorizable_shift): Likewise.
18527 (vectorizable_operation): Likewise.
18528 (vectorizable_store): Likewise.
18529 (vectorizable_load): Likewise.
18530 (vectorizable_condition): Likewise.
18531 (vectorizable_comparison): Likewise.
18533 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18536 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18537 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18538 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18540 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18542 PR middle-end/83665
18543 * params.def (inline-min-speedup): Increase from 8 to 15.
18544 (max-inline-insns-auto): Decrease from 40 to 30.
18545 * ipa-split.c (consider_split): Add some buffer for function to
18546 be considered inlining candidate.
18547 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18550 2018-02-12 Richard Biener <rguenther@suse.de>
18552 PR tree-optimization/84037
18553 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18554 matched stmts if we cannot swap the non-matched ones.
18556 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18558 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18559 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18560 _mm_maskz_scalef_round_ss): New intrinsics.
18561 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18562 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18563 __builtin_ia32_scalefss_round): Remove.
18564 (__builtin_ia32_scalefsd_mask_round,
18565 __builtin_ia32_scalefss_mask_round): New intrinsics.
18566 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18567 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18568 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18569 "<round_constraint>")): Changed to ...
18570 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18571 "<round_scalar_constraint>")): ... this.
18572 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18573 %0, %1, %2<round_op3>}"): Changed to ...
18574 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18575 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18576 %2<round_scalar_mask_op3>}"): ... this.
18577 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18579 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18581 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18582 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18583 (_mm_maskz_sqrt_round_ss): New intrinsics.
18584 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18585 (__builtin_ia32_sqrtsd_mask_round)
18586 (__builtin_ia32_sqrtss_mask_round): New builtins.
18587 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18588 (__builtin_ia32_sqrtss_round): Remove.
18589 (__builtin_ia32_sqrtsd_mask_round)
18590 (__builtin_ia32_sqrtss_mask_round): New builtins.
18591 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18592 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18593 ((match_operand:VF_128 1 "vector_operand"
18594 "xBm,<round_constraint>")): Changed to ...
18595 ((match_operand:VF_128 1 "vector_operand"
18596 "xBm,<round_scalar_constraint>")): ... this.
18597 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18598 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18599 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18600 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18601 %<iptr>1<round_scalar_mask_op3>}): ... this.
18602 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18603 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18605 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18608 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18609 Cast vec_cmpeq result to correct type.
18610 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18611 Cast vec_cmpgt result to correct type.
18613 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18615 * final.c (final_scan_insn_1): Renamed from...
18616 (final_scan_insn): ... this. New wrapper, to recover
18617 seen from the outermost call in recursive ones.
18618 * config/sparc/sparc.c (output_return): Drop seen from call.
18619 (output_sibcall): Likewise.
18620 * config/visium/visium.c (output_branch): Likewise.
18622 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18624 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18627 2018-02-10 Alan Modra <amodra@gmail.com>
18630 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18631 Specify LR as an input.
18633 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18636 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18637 remove_member_access_dummy_vars): New functions.
18638 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18639 lower_omp_1, execute_lower_omp): Use them.
18641 PR rtl-optimization/84308
18642 * shrink-wrap.c (spread_components): Release todo vector.
18644 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18646 PR rtl-optimization/57193
18647 * ira-color.c (struct allocno_color_data): Add member
18648 conflict_allocno_hard_prefs.
18649 (update_conflict_allocno_hard_prefs): New.
18650 (bucket_allocno_compare_func): Add a preference based on
18651 conflict_allocno_hard_prefs.
18652 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18653 (color_allocnos): Remove a dead code. Initiate
18654 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18656 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18659 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18660 constraint from =wa to wa. Avoid a subreg on the output operand,
18661 instead use a pseudo and subreg it in a move.
18662 (p9_xxbrd_<mode>): Changed to ...
18663 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18664 (p9_xxbrd_v2df): New expander.
18665 (p9_xxbrw_<mode>): Changed to ...
18666 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18667 (p9_xxbrw_v4sf): New expander.
18669 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18671 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18673 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18676 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18677 multiply in 32-bit mode.
18678 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18679 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18682 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18684 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18685 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18686 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18687 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18689 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18692 * dwarf2out.c (is_trivial_indirect_ref): New function.
18693 (dwarf2out_late_global_decl): Do not generate a location
18694 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18695 and that are not defined in the current unit.
18697 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18699 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18700 instead of a libcall for UNORDERED.
18702 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18705 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18706 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18708 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18711 * config/s390/s390.c (s390_set_current_function): Invoke
18712 s390_indirect_branch_settings also if fndecl didn't change.
18714 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18716 * config/rs6000/rs6000.md (blockage): Set length to zero.
18718 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18720 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18722 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18725 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18726 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18730 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18731 PARALLEL incoming that failed vt_get_decl_and_offset check.
18733 PR middle-end/84237
18734 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18735 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18737 (get_variable_section): For decls in named .bss* sections pass true as
18738 second argument to bss_initializer_p.
18740 2018-02-09 Marek Polacek <polacek@redhat.com>
18741 Jakub Jelinek <jakub@redhat.com>
18744 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18745 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18746 Sync some changes from cxx_fold_indirect_ref.
18748 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18750 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18752 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18753 (BLOCK_INLINE_ENTRY_LABEL): New.
18754 (dwarf2out_var_location): Disregard inline entry markers.
18755 (inline_entry_data): New struct.
18756 (inline_entry_data_hasher): New hashtable type.
18757 (inline_entry_data_hasher::hash): New.
18758 (inline_entry_data_hasher::equal): New.
18759 (inline_entry_data_table): New variable.
18760 (add_high_low_attributes): Add DW_AT_entry_pc and
18761 DW_AT_GNU_entry_view attributes if a pending entry is found
18762 in inline_entry_data_table. Add old entry_pc attribute only
18763 if debug nonbinding markers are disabled.
18764 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18765 markers are enabled.
18766 (block_within_block_p, dwarf2out_inline_entry): New.
18767 (dwarf2out_finish): Check that no entries remained in
18768 inline_entry_data_table.
18769 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18770 (final_scan_insn, notice_source_line): Likewise.
18771 (rest_of_clean_state): Skip inline entry markers.
18772 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18774 * gimple.c (gimple_build_debug_inline_entry): New.
18775 * gimple.h (enum gimple_debug_subcode): Add
18776 GIMPLE_DEBUG_INLINE_ENTRY.
18777 (gimple_build_debug_inline_entry): Declare.
18778 (gimple_debug_inline_entry_p): New.
18779 (gimple_debug_nonbind_marker_p): Adjust.
18780 * insn-notes.def (INLINE_ENTRY): New.
18781 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18782 inline entry marker notes.
18783 (print_insn): Likewise.
18784 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18785 (INSN_DEBUG_MARKER_KIND): Likewise.
18786 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18787 * tree-inline.c (expand_call_inline): Build and insert
18788 debug_inline_entry stmt.
18789 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18790 inline entry blocks early, if nonbind markers are enabled.
18791 (dump_scope_block): Dump fragment info.
18792 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18793 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18794 (gimple_build_debug_inline_entry): New.
18795 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18796 Enable/disable inline entry points too.
18797 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18798 (DEBUG_INSN): Describe inline entry markers.
18800 * common.opt (gvariable-location-views): New.
18801 (gvariable-location-views=incompat5): New.
18802 * config.in: Rebuilt.
18803 * configure: Rebuilt.
18804 * configure.ac: Test assembler for view support.
18805 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18806 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18807 * dwarf2out.c (var_loc_view): New typedef.
18808 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18809 (dwarf2out_locviews_in_attribute): New.
18810 (dwarf2out_locviews_in_loclist): New.
18811 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18812 (enum dw_line_info_opcode): Add LI_adv_address.
18813 (struct dw_line_info_table): Add view.
18814 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18815 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18816 (zero_view_p): New variable.
18817 (ZERO_VIEW_P): New macro.
18818 (output_asm_line_debug_info): New.
18819 (struct var_loc_node): Add view.
18820 (add_AT_view_list, AT_loc_list): New.
18821 (add_var_loc_to_decl): Add view param. Test it against last.
18822 (new_loc_list): Add view params. Record them.
18823 (AT_loc_list_ptr): Handle loc and view lists.
18824 (view_list_to_loc_list_val_node): New.
18825 (print_dw_val): Handle dw_val_class_view_list.
18826 (size_of_die): Likewise.
18827 (value_format): Likewise.
18828 (loc_list_has_views): New.
18829 (gen_llsym): Set vl_symbol too.
18830 (maybe_gen_llsym, skip_loc_list_entry): New.
18831 (dwarf2out_maybe_output_loclist_view_pair): New.
18832 (output_loc_list): Output view list or entries too.
18833 (output_view_list_offset): New.
18834 (output_die): Handle dw_val_class_view_list.
18835 (output_dwarf_version): New.
18836 (output_compilation_unit_header): Use it.
18837 (output_skeleton_debug_sections): Likewise.
18838 (output_rnglists, output_line_info): Likewise.
18839 (output_pubnames, output_aranges): Update version comments.
18840 (output_one_line_info_table): Output view numbers in asm comments.
18841 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18842 Call maybe_gen_llsym.
18843 (loc_list_from_tree_1): Adjust.
18844 (add_AT_location_description): Create view list attribute if
18845 needed, check it's absent otherwise.
18846 (convert_cfa_to_fb_loc_list): Adjust.
18847 (maybe_emit_file): Call output_asm_line_debug_info for test.
18848 (dwarf2out_var_location): Reset views as needed. Precompute
18849 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18850 attribute. Set view.
18851 (new_line_info_table): Reset next view.
18852 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18853 (dwarf2out_source_line): Likewise. Output view resets and labels to
18854 the assembler, or select appropriate line info opcodes.
18855 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18856 (optimize_string_length): Catch it. Adjust.
18857 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18858 dw_val_class_view_list, and remove it if no longer needed.
18859 (hash_loc_list): Hash view numbers.
18860 (loc_list_hasher::equal): Compare them.
18861 (optimize_location_lists): Check whether a view list symbol is
18862 needed, and whether the locview attribute is present, and
18863 whether they match. Remove the locview attribute if no longer
18865 (index_location_lists): Call skip_loc_list_entry for test.
18866 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18867 Use output_dwarf_version.
18868 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18869 (struct dw_val_node): Add val_view_list.
18870 * final.c (SEEN_NEXT_VIEW): New.
18871 (set_next_view_needed): New.
18872 (clear_next_view_needed): New.
18873 (maybe_output_next_view): New.
18874 (final_start_function): Rename to...
18875 (final_start_function_1): ... this. Take pointer to FIRST,
18876 add SEEN parameter. Emit param bindings in the initial view.
18877 (final_start_function): Reintroduce SEEN-less interface.
18878 (final): Rename to...
18879 (final_1): ... this. Take SEEN parameter. Output final pending
18880 next view at the end.
18881 (final): Reintroduce seen-less interface.
18882 (final_scan_insn): Output pending next view before switching
18883 sections or ending a block. Mark the next view as needed when
18884 outputting variable locations. Notify debug backend of section
18885 changes, and of location view changes.
18886 (rest_of_handle_final): Adjust.
18887 * toplev.c (process_options): Autodetect value for debug variable
18888 location views option. Warn on incompat5 without -gdwarf-5.
18889 * doc/invoke.texi (gvariable-location-views): New.
18890 (gvariable-location-views=incompat5): New.
18891 (gno-variable-location-views): New.
18893 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18895 PR tree-optimization/84136
18896 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18897 that the result of find_edge is non-NULL.
18899 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18902 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18903 storing integer register in SImode. Fix cost of 256 and 512
18904 byte aligned SSE register store.
18906 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18908 * config/i386/i386.c (ix86_multiplication_cost): Fix
18909 multiplication cost for TARGET_AVX512DQ.
18911 2018-02-08 Marek Polacek <polacek@redhat.com>
18913 PR tree-optimization/84238
18914 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18917 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18919 PR tree-optimization/84265
18920 * tree-vect-stmts.c (vectorizable_store): Don't treat
18921 VMAT_CONTIGUOUS accesses as grouped.
18922 (vectorizable_load): Likewise.
18924 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18926 PR tree-optimization/81635
18927 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18928 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18929 (test_round_for_mask): New functions.
18930 (wide_int_cc_tests): Call test_round_for_mask.
18931 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18932 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18933 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18934 range returned by get_range_info.
18936 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18939 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18940 * symtab.c: Include builtins.h
18941 (symtab_node::output_to_lto_symbol_table_p): Move here
18942 from lto-streamer-out.c:output_symbol_p.
18943 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18944 (output_symbol_p): Move all logic to symtab.c
18945 (produce_symtab): Update.
18947 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18949 * config/s390/s390-opts.h (enum indirect_branch): Define.
18950 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18951 (s390_indirect_branch_via_thunk)
18952 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18953 (enum s390_indirect_branch_type): Define.
18954 * config/s390/s390.c (struct s390_frame_layout, struct
18955 machine_function): Remove.
18956 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18957 (indirect_branch_table_label_no, indirect_branch_table_name):
18959 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18960 (enum s390_indirect_branch_option): Define.
18961 (s390_return_addr_from_memory): New function.
18962 (s390_handle_string_attribute): New function.
18963 (s390_attribute_table): Add new attribute handler.
18964 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18965 (s390_indirect_branch_via_thunk): New function.
18966 (s390_indirect_branch_via_inline_thunk): New function.
18967 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18968 sibling call optimization for non z10 compiles.
18969 (s390_emit_call): Force indirect branch target to be a single
18970 register. Add r1 clobber for non-z10 compiles.
18971 (s390_emit_epilogue): Emit return jump via return_use expander.
18972 (s390_reorg): Handle JUMP_INSNs as execute targets.
18973 (s390_option_override_internal): Perform validity checks for the
18974 new command line options.
18975 (s390_indirect_branch_attrvalue): New function.
18976 (s390_indirect_branch_settings): New function.
18977 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18978 (s390_output_indirect_thunk_function): New function.
18979 (s390_code_end): Implement target hook.
18980 (s390_case_values_threshold): Implement target hook.
18981 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18983 * config/s390/s390.h (struct s390_frame_layout)
18984 (struct machine_function): Move here from s390.c.
18985 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18986 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18987 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18988 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18989 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18990 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18991 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18992 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18993 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18994 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18995 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18996 (mnemonic attribute): Add values which aren't recognized
18998 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18999 pattern for branch conversion. Fix mnemonic attribute.
19000 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19001 indirect branch via thunk if requested.
19002 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19003 ("*indirect_jump"): Disable for branch conversion using out of
19005 ("indirect_jump_via_thunk<mode>_z10")
19006 ("indirect_jump_via_thunk<mode>")
19007 ("indirect_jump_via_inlinethunk<mode>_z10")
19008 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19009 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19010 ("casesi_jump_via_inlinethunk<mode>_z10")
19011 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19012 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19013 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19014 ("*indirect2_jump"): Disable for branch conversion.
19015 ("casesi_jump"): Turn into expander and expand patterns for branch
19017 ("return_use"): New expander.
19018 ("*return"): Emit return via thunk and rename it to ...
19019 ("*return<mode>"): ... this one.
19020 * config/s390/s390.opt: Add new options and and enum for the
19023 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19025 * lra-constraints.c (match_reload): Unconditionally use
19026 gen_lowpart_SUBREG, rather than selecting between that
19027 and equivalent gen_rtx_SUBREG code.
19029 2018-02-08 Richard Biener <rguenther@suse.de>
19031 PR tree-optimization/84233
19032 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19033 changed flag instead of boguously re-using phi_inserted.
19035 2018-02-08 Martin Jambor <mjambor@suse.cz>
19037 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19038 static local variables.
19040 2018-02-08 Richard Biener <rguenther@suse.de>
19042 PR tree-optimization/84278
19043 * tree-vect-stmts.c (vectorizable_store): When looking for
19044 smaller vector types to perform grouped strided loads/stores
19045 make sure the mode is supported by the target.
19046 (vectorizable_load): Likewise.
19048 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19050 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19051 Increase LDP/STP opportunities by adding adjacent callee-saves.
19053 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19055 PR rtl-optimization/84068
19056 PR rtl-optimization/83459
19057 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19059 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19061 PR tree-optimization/84224
19062 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19063 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19064 non-zero arguments.
19066 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19069 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19070 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19071 count, remove one USE.
19073 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19075 * doc/install.texi (Configuration): Document the
19076 --with-long-double-format={ibm,ieee} PowerPC configuration
19080 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19081 Convert from define_expand to be define_insn_and_split. Rework
19082 float/double/_Float128 conversions to QI/HI/SImode to work with
19083 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19084 conversions to QI/HImode types did a store and then a load to
19085 truncate the value. For conversions to VSX registers, don't split
19086 the insn, instead emit the code directly. Use the code iterator
19087 any_fix to combine signed and unsigned conversions.
19088 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19089 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19090 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19091 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19092 (fix_<mode>di2_hw): Likewise.
19093 (fixuns_<mode>di2_hw): Likewise.
19094 (fix_<mode>si2_hw): Likewise.
19095 (fixuns_<mode>si2_hw): Likewise.
19096 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19097 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19098 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19099 fix<uns>_trunc<SFDF:mode>si2_p8.
19100 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19101 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19102 (fix<uns>_<mode>_mem): Likewise.
19103 (fctiw<u>z_<mode>_mem): Likewise.
19104 (fix<uns>_<mode>_mem): Likewise.
19105 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19106 the register allocator from doing a direct move to the GPRs to do
19107 a store, and instead use the ISA 3.0 store byte/half-word from
19108 vector register instruction. For IEEE 128-bit floating point,
19109 also optimize stores of 32-bit ints.
19110 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19112 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19114 * genextract.c (push_pathstr_operand): New function to support
19116 (walk_rtx): Call push_pathstr_operand.
19117 (print_path): Support [a-zA-Z].
19119 2018-02-07 Richard Biener <rguenther@suse.de>
19121 PR tree-optimization/84037
19122 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19123 (cse_and_gimplify_to_preheader): Declare.
19124 (vect_get_place_in_interleaving_chain): Likewise.
19125 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19127 (_loop_vec_info::~_loop_vec_info): Delete it.
19128 (cse_and_gimplify_to_preheader): New function.
19129 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19130 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19131 (vectorizable_load): Likewise. For grouped stores always base
19132 the IV on the first element.
19133 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19134 condition before gimplifying.
19136 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19138 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19139 *DIV_EXPR and *MOD_EXPR.
19141 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19144 * config/i386/i386.c (ix86_option_override_internal): Mask out
19145 the CF_SET bit when checking -fcf-protection.
19147 2018-02-07 Tom de Vries <tom@codesourcery.com>
19150 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19153 2018-02-07 Richard Biener <rguenther@suse.de>
19155 PR tree-optimization/84204
19156 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19159 PR tree-optimization/84205
19160 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19161 special-case isl_ast_op_zdiv_r.
19163 PR tree-optimization/84223
19164 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19165 Only add conditions from within the region.
19166 (gather_bbs::after_dom_children): Adjust.
19168 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19171 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19172 * config/avr/avr.md: Only post-reload split REG-REG moves if
19173 either register is GENERAL_REG_P.
19175 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19177 PR tree-optimization/84235
19178 * tree-ssa-scopedtables.c
19179 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19180 if the subtraction is performed in floating point type where NaNs are
19181 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19182 build 1. Formatting fix.
19184 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19187 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19188 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19189 and skip it regardless of bb boundaries. Use CALL_P macro,
19190 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19191 unnecessarily, formatting fix.
19193 2018-02-06 Michael Collison <michael.collison@arm.com>
19195 * config/arm/thumb2.md:
19196 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19197 (*thumb_mov_notscc): Ditto.
19199 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19202 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19203 unsigned_fix, not "s".
19205 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19207 * configure.ac (gcc_fn_eh_frame_ro): New function.
19208 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19209 correct .eh_frame permissions.
19210 * configure: Regenerate.
19212 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19214 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19215 irrelevant options.
19217 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19219 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19220 Display warning message for -mno-speculate-indirect-jumps.
19222 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19224 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19226 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19228 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19230 PR tree-optimization/84225
19231 * tree-eh.c (find_trapping_overflow): Only call
19232 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19234 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19237 * config/i386/i386.c: Reimplement the check of possible options
19238 -mibt/-mshstk conbination. Change error messages.
19239 * doc/invoke.texi: Fix a typo: remove extra '='.
19241 2018-02-06 Marek Polacek <polacek@redhat.com>
19243 PR tree-optimization/84228
19244 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19246 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19249 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19250 emitted arch directives.
19251 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19252 __ARM_FEATURE_COPROC before changing architectures.
19254 2018-02-06 Richard Biener <rguenther@suse.de>
19256 * config/i386/i386.c (print_reg): Fix typo.
19257 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19259 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19261 * configure: Regenerate.
19263 2018-02-05 Martin Sebor <msebor@redhat.com>
19265 PR tree-optimization/83369
19266 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19269 2018-02-05 Martin Liska <mliska@suse.cz>
19271 * doc/invoke.texi: Cherry-pick upstream r323995.
19273 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19275 * ira.c (ira_init_register_move_cost): Adjust comment.
19277 2018-02-05 Martin Liska <mliska@suse.cz>
19279 PR gcov-profile/84137
19280 * doc/gcov.texi: Fix typo in documentation.
19282 2018-02-05 Martin Liska <mliska@suse.cz>
19284 PR gcov-profile/83879
19285 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19286 using dlopen functionality.
19288 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19290 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19291 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19292 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19293 _mm_maskz_range_round_ss): New intrinsics.
19294 (__builtin_ia32_rangesd128_round)
19295 (__builtin_ia32_rangess128_round): Remove.
19296 (__builtin_ia32_rangesd128_mask_round,
19297 __builtin_ia32_rangess128_mask_round): New builtins.
19298 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19299 __builtin_ia32_rangess128_round): Remove.
19300 (__builtin_ia32_rangesd128_mask_round,
19301 __builtin_ia32_rangess128_mask_round): New builtins.
19302 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19303 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19304 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19305 "<round_saeonly_constraint>")): Changed to ...
19306 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19307 "<round_saeonly_scalar_constraint>")): ... this.
19308 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19309 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19310 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19311 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19312 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19314 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19316 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19318 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19319 Remove all values except native, 8540 and 8548.
19321 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19323 * config/i386/i386.c (ix86_output_function_return): Pass
19324 INVALID_REGNUM, instead of -1, as invalid register number to
19325 indirect_thunk_name and output_indirect_thunk.
19327 2018-02-02 Julia Koval <julia.koval@intel.com>
19329 * config.gcc: Add -march=icelake.
19330 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19331 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19332 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19333 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19334 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19335 (processor_target_table): Add icelake.
19336 (ix86_option_override_internal): Handle new PTAs.
19337 (get_builtin_code_for_version): Handle icelake.
19338 (M_INTEL_COREI7_ICELAKE): New.
19339 (fold_builtin_cpu): Handle icelake.
19340 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19341 * doc/invoke.texi: Add -march=icelake.
19343 2018-02-02 Julia Koval <julia.koval@intel.com>
19345 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19346 to wide_int_bitmask.
19347 * wide-int-bitmask.h: New.
19349 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19352 * config/i386/i386.md: Replace Pmode with word_mode in
19353 builtin_setjmp_setup and builtin_longjmp to support x32.
19355 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19359 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19361 (rs6000_supported_cpu_names): New static variable.
19362 (linux_cpu_translation_table): Likewise.
19363 (elf_platform) <cpu>: Define new static variable and use it.
19364 Translate kernel AT_PLATFORM name to canonical name if needed.
19365 Error if platform name is unknown.
19367 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19370 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19372 2018-02-01 Jeff Law <law@redhat.com>
19375 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19376 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19377 the scratch if RELEASE_VIA_POP is false.
19378 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19379 If we have to save a temporary register, decrement SIZE appropriately.
19380 Pass new arguments to release_scratch_register_on_entry.
19381 (ix86_adjust_stack_and_probe): Likewise.
19382 (ix86_emit_probe_stack_range): Pass new arguments to
19383 release_scratch_register_on_entry.
19385 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19387 PR rtl-optimization/84157
19388 * combine.c (change_zero_ext): Use REG_P predicate in
19389 front of HARD_REGISTER_P predicate.
19391 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19393 * config/avr/avr.c (avr_option_override): Move disabling of
19394 -fdelete-null-pointer-checks to...
19395 * common/config/avr/avr-common.c (avr_option_optimization_table):
19398 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19400 PR tree-optimization/81635
19401 * tree-data-ref.c (split_constant_offset_1): For types that
19402 wrap on overflow, try to use range info to prove that wrapping
19405 2018-02-01 Renlin Li <renlin.li@arm.com>
19408 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19409 TAILCALL_ADDR_REGS.
19410 (aarch64_register_move_cost): Likewise.
19411 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19412 TAILCALL_ADDR_REGS.
19413 (REG_CLASS_NAMES): Likewise.
19414 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19415 TAILCALL_ADDR_REGS. Remove IP registers.
19416 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19418 2018-02-01 Richard Biener <rguenther@suse.de>
19420 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19421 for specifying RPO order and allow NULL for that.
19422 * domwalk.c (dom_walker::dom_walker): Likewise.
19423 (dom_walker::walk): Handle NULL RPO order.
19424 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19426 (rewrite_update_dom_walker): Likewise.
19427 (mark_def_dom_walker): Likewise.
19429 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19431 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19432 (aarch64_maybe_expand_sve_subreg_move): Declare.
19433 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19434 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19436 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19437 that are semantically a reverse operation.
19438 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19439 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19440 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19442 (aarch64_can_change_mode_class): For big-endian, forbid changes
19443 between two SVE modes if they have different element sizes.
19445 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19447 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19448 the TImode handling for big-endian targets.
19450 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19452 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19453 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19455 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19456 Remove BSWAP handing for big-endian targets and use the form of
19457 LD1RQ appropariate for the mode.
19459 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19461 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19462 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19463 duplicated element.
19465 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19468 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19469 check for operands that need to go through aarch64_sve_reload_be.
19471 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19473 PR tree-optimization/81661
19474 PR tree-optimization/84117
19475 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19476 * tree-eh.c: Include gimplify.h.
19477 (find_trapping_overflow, replace_trapping_overflow,
19478 rewrite_to_non_trapping_overflow): New functions.
19479 * tree-vect-loop.c: Include tree-eh.h.
19480 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19481 * tree-data-ref.c: Include tree-eh.h.
19482 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19484 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19486 PR rtl-optimization/84123
19487 * combine.c (change_zero_ext): Check if hard register satisfies
19488 can_change_dest_mode before calling gen_lowpart_SUBREG.
19490 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19493 * ira.c (ira_init_register_move_cost): Remove assert.
19495 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19497 PR rtl-optimization/84071
19498 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19499 * doc/tm.texi: Regenerate.
19501 2018-01-31 Richard Biener <rguenther@suse.de>
19503 PR tree-optimization/84132
19504 * tree-data-ref.c (analyze_miv_subscript): Properly
19505 check whether evolution_function_is_affine_multivariate_p
19506 before calling gcd_of_steps_may_divide_p.
19508 2018-01-31 Julia Koval <julia.koval@intel.com>
19511 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19512 * config/i386/i386.md (rdpid_rex64) New.
19513 (rdpid): Make 32bit only.
19515 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19518 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19519 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19521 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19524 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19526 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19528 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19530 PR rtl-optimization/84071
19531 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19532 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19534 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19536 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19537 (arc_attribute_table): Add 'aux' attribute.
19538 (arc_in_small_data_p): Consider aux like variables.
19539 (arc_is_aux_reg_p): New function.
19540 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19541 (arc_get_aux_arg): New function.
19542 (prepare_move_operands): Handle aux-register access.
19543 (arc_handle_aux_attribute): New function.
19544 * doc/extend.texi (ARC Variable attributes): Add subsection.
19546 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19548 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19549 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19550 (arc_attribute_table): Add 'uncached' attribute.
19551 (arc_print_operand): Print '.di' flag for uncached memory
19553 (arc_in_small_data_p): Do not consider for small data the uncached
19555 (arc_is_uncached_mem_p): New function.
19556 * config/arc/predicates.md (compact_store_memory_operand): Check
19557 for uncached memory accesses.
19558 (nonvol_nonimm_operand): Likewise.
19559 * doc/extend.texi (ARC Type Attribute): New subsection.
19561 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19564 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19565 falign-loops=): Add Optimization flag.
19567 2018-01-30 Jeff Law <law@redhat.com>
19570 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19571 INT_REGISTERS_SAVED. Check it prior to calling
19572 get_scratch_register_on_entry.
19573 (ix86_adjust_stack_and_probe): Similarly.
19574 (ix86_emit_probe_stack_range): Similarly.
19575 (ix86_expand_prologue): Corresponding changes.
19577 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19580 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19581 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19583 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19586 * lra-constraints.c (curr_insn_transform): Process AND in the
19589 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19591 PR rtl-optimization/83986
19592 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19593 dependence against last_pending_memory_flush in addition to
19594 pending_jump_insns.
19596 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19598 PR tree-optimization/81611
19599 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19602 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19605 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19608 2018-01-30 Richard Biener <rguenther@suse.de>
19609 Jakub Jelinek <jakub@redhat.com>
19611 PR tree-optimization/84111
19612 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19613 inner loops added during recursion, as they don't have up-to-date
19616 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19619 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19620 (can_inline_edge_by_limits_p): ... here.
19621 (can_early_inline_edge_p, check_callers,
19622 update_caller_keys, update_callee_keys, recursive_inlining,
19623 add_new_edges_to_heap, speculation_useful_p,
19624 inline_small_functions,
19625 inline_small_functions, flatten_function,
19626 inline_to_all_callers_1): Update.
19628 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19630 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19633 2018-01-30 Richard Biener <rguenther@suse.de>
19635 PR tree-optimization/83008
19636 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19637 invariant and constant vector uses in stmts when they need
19638 more than one stmt.
19640 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19643 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19644 * configure: Regenerate.
19646 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19648 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19650 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19651 Use gen_rtx_REG rather than gen_lowpart.
19653 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19655 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19656 rather than 0 when creating partial subregs.
19658 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19660 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19663 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19666 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19667 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19668 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19669 flags. This restores the settings used before the 2017-07-24.
19670 Turning off pre increment/decrement/modify allows IVOPTS to
19671 optimize DF/SF loops where the index is an int.
19673 2018-01-29 Richard Biener <rguenther@suse.de>
19674 Kelvin Nilsen <kelvin@gcc.gnu.org>
19677 * tree-vect-stmts.c (vectorizable_call): Don't call
19678 targetm.vectorize_builtin_md_vectorized_function if callee is
19681 2018-01-22 Carl Love <cel@us.ibm.com>
19683 * doc/extend.tex: Fix typo in second arg in
19684 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19686 2018-01-29 Richard Biener <rguenther@suse.de>
19688 PR tree-optimization/84086
19689 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19690 (flush_ssaname_freelist): When SSA names were released reset
19691 the SCEV hash table.
19693 2018-01-29 Richard Biener <rguenther@suse.de>
19695 PR tree-optimization/84057
19696 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19697 removed paths when removing edges.
19699 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19701 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19702 -mfunction-return=@var{choice}.
19704 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19706 PR diagnostic/84034
19707 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19708 Handle CR like TAB.
19709 (layout::print_source_line): Likewise.
19710 (test_get_line_width_without_trailing_whitespace): Add test cases.
19712 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19714 PR middle-end/84040
19715 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19718 2018-01-26 Jim Wilson <jimw@sifive.com>
19720 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19722 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19725 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19727 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19728 and CMP + SUB-immediate -> SUBS.
19730 2018-01-26 Martin Sebor <msebor@redhat.com>
19732 PR tree-optimization/83896
19733 * tree-ssa-strlen.c (get_string_len): Rename...
19734 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19735 Avoid assuming length is constant.
19736 (handle_char_store): Use HOST_WIDE_INT for string length.
19738 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19741 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19742 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19744 2018-01-26 Richard Biener <rguenther@suse.de>
19746 PR rtl-optimization/84003
19747 * dse.c (record_store): Only record redundant stores when
19748 the earlier store aliases at least all accesses the later one does.
19750 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19752 PR rtl-optimization/83985
19753 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19754 REG_CFA_RESTORE insns.
19755 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19756 REG_CFA_RESTORE insns here.
19759 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19760 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19762 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19764 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19765 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19766 (arc_init): Likewise.
19767 (arc_override_options): Likewise.
19768 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19770 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19772 * config/arc/arc.h (TARGET_DBNZ): Define.
19773 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19774 properly set the tune attribute.
19775 (dbnz): Use TARGET_DBNZ guard.
19776 * config/arc/arc.opt (mtune): Add core3 option.
19778 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19780 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19781 recognize new pic like addresses.
19782 (arc_delegitimize_address): Clean up.
19784 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19786 * config/arc/arc-arches.def: Option mrf16 valid for all
19788 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19789 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19790 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19791 * config/arc/arc-tables.opt: Regenerate.
19792 * config/arc/arc.c (arc_conditional_register_usage): Handle
19793 reduced register file case.
19794 (arc_file_start): Set must have build attributes.
19795 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19796 mrf16 option value.
19797 * config/arc/arc.opt (mrf16): Add new option.
19798 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19799 * config/arc/genmultilib.awk: Handle new mrf16 option.
19800 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19801 * config/arc/t-multilib: Regenerate.
19802 * doc/invoke.texi (ARC Options): Document mrf16 option.
19804 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19806 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19807 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19808 (arc_attribute_table): Add 'secure_call' attribute.
19809 (arc_print_operand): Print secure call operand.
19810 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19812 (arc_is_secure_call_p): New function. * config/arc/arc.md
19813 (call_i): Add support for sjli instruction.
19814 (call_value_i): Likewise.
19815 * config/arc/constraints.md (Csc): New constraint.
19817 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19818 John Eric Martin <John.Martin@emmicro-us.com>
19820 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19821 * config/arc/arc.c (_arc_jli_section): New struct.
19822 (arc_jli_section): New type.
19823 (rc_jli_sections): New static variable.
19824 (arc_handle_jli_attribute): New function.
19825 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19826 (arc_file_end): New function.
19827 (TARGET_ASM_FILE_END): Define.
19828 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19829 (arc_add_jli_section): New function.
19830 (jli_call_scan): Likewise.
19831 (arc_reorg): Call jli_call_scan.
19832 (arc_output_addsi): Remove 'S' from printing asm operand.
19833 (arc_is_jli_call_p): New function.
19834 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19836 (movhi_insn): Likewise.
19837 (movsi_insn): Likewise.
19838 (movsi_set_cc_insn): Likewise.
19839 (loadqi_update): Likewise.
19840 (load_zeroextendqisi_update): Likewise.
19841 (load_signextendqisi_update): Likewise.
19842 (loadhi_update): Likewise.
19843 (load_zeroextendhisi_update): Likewise.
19844 (load_signextendhisi_update): Likewise.
19845 (loadsi_update): Likewise.
19846 (loadsf_update): Likewise.
19847 (movsicc_insn): Likewise.
19848 (bset_insn): Likewise.
19849 (bxor_insn): Likewise.
19850 (bclr_insn): Likewise.
19851 (bmsk_insn): Likewise.
19852 (bicsi3_insn): Likewise.
19853 (cmpsi_cc_c_insn): Likewise.
19854 (movsi_ne): Likewise.
19855 (movsi_cond_exec): Likewise.
19856 (clrsbsi2): Likewise.
19857 (norm_f): Likewise.
19867 (call_i): Remove 'S' asm letter, add jli instruction.
19868 (call_value_i): Likewise.
19869 * config/arc/arc.op (mjli-always): New option.
19870 * config/arc/constraints.md (Cji): New constraint.
19871 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19873 (subsf3_fpx): Likewise.
19874 (mulsf3_fpx): Likewise.
19875 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19877 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19878 function attrbutes.
19879 * doc/invoke.texi (ARC): Document mjli-always option.
19881 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19883 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19884 avoid addition with 0 and use incw and decw where possible.
19886 2018-01-26 Richard Biener <rguenther@suse.de>
19888 PR tree-optimization/81082
19889 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19890 association if it requires casting to unsigned.
19891 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19892 from fold_plusminus_mult_expr to catch important cases late when
19893 range info is available.
19895 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19897 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19898 * configure.ac (hidden_linkonce): New test.
19899 * configure: Regenerate.
19900 * config.in: Regenerate.
19902 2018-01-26 Julia Koval <julia.koval@intel.com>
19904 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19905 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19906 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19907 _mm_mask_bitshuffle_epi64_mask): Fix type.
19908 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19909 USI_FTYPE_V4DI_V4DI_USI): Remove.
19910 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19911 __builtin_ia32_vpshufbitqmb256_mask,
19912 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19913 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19914 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19916 2018-01-26 Alan Modra <amodra@gmail.com>
19919 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19920 UNSPEC_VBPERMQ. Sort other unspecs.
19922 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19924 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19926 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19928 PR middle-end/83055
19929 * predict.c (drop_profile): Do not push/pop cfun; update also
19931 (handle_missing_profiles): Fix logic looking for zero profiles.
19933 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19935 PR middle-end/83977
19936 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19937 on functions with #pragma omp declare simd or functions with simd
19939 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19940 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19941 Remove trailing \n from warning_at calls.
19943 2018-01-25 Tom de Vries <tom@codesourcery.com>
19946 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19947 for neutered workers.
19949 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19952 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19953 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19955 2018-01-24 Jeff Law <law@redhat.com>
19958 * i386.c (get_probe_interval): Move to earlier point.
19959 (ix86_compute_frame_layout): If -fstack-clash-protection and
19960 the frame is larger than the probe interval, then use pushes
19961 to save registers rather than reg->mem moves.
19962 (ix86_expand_prologue): Remove conditional for int_registers_saved
19965 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19968 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19969 min/max for never referenced object.
19971 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19973 PR middle-end/83977
19974 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19976 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19977 attributes from DECL_ATTRIBUTES (decl) without affecting
19978 DECL_ATTRIBUTES (current_function_decl).
19979 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19980 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19982 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19984 PR tree-optimization/83979
19985 * fold-const.c (fold_comparison): Use constant_boolean_node
19986 instead of boolean_{true,false}_node.
19988 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19990 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19993 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19995 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19996 Simplify the clause that sets the length attribute.
19997 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19998 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19999 clause that sets the length attribute.
20000 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20002 2018-01-24 Tom de Vries <tom@codesourcery.com>
20005 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20006 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20007 Add strict parameter.
20008 (prevent_branch_around_nothing): Insert dummy insn between branch to
20009 label and label with no ptx insn inbetween.
20010 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20012 2018-01-24 Tom de Vries <tom@codesourcery.com>
20015 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20016 for neutered threads in warp.
20017 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20019 2018-01-24 Richard Biener <rguenther@suse.de>
20021 PR tree-optimization/83176
20022 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20025 2018-01-24 Richard Biener <rguenther@suse.de>
20027 PR tree-optimization/82819
20028 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20029 code generating pluses that are no-ops in the target precision.
20031 2018-01-24 Richard Biener <rguenther@suse.de>
20033 PR middle-end/84000
20034 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20036 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20038 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20039 to merge probabilities.
20040 * predict.c (probably_never_executed): Also mark as cold functions
20041 with global 0 profile and guessed local profile.
20042 * profile-count.c (profile_probability::combine_with_count): New
20044 * profile-count.h (profile_probability::operator*,
20045 profile_probability::operator*=, profile_probability::operator/,
20046 profile_probability::operator/=): Reduce precision to adjusted
20047 and set value to guessed on contradictory divisions.
20048 (profile_probability::combine_with_freq): Remove.
20049 (profile_probability::combine_wiht_count): Declare.
20050 (profile_count::force_nonzero):: Set to adjusted.
20051 (profile_count::probability_in):: Set quality to adjusted.
20052 * tree-ssa-tail-merge.c (replace_block_by): Use
20053 combine_with_count.
20055 2018-01-23 Andrew Waterman <andrew@sifive.com>
20056 Jim Wilson <jimw@sifive.com>
20058 * config/riscv/riscv.c (riscv_stack_boundary): New.
20059 (riscv_option_override): Set riscv_stack_boundary. Handle
20060 riscv_preferred_stack_boundary_arg.
20061 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20062 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20063 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20064 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20065 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20066 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20068 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20071 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20072 of struct ix86_frame.
20073 (ix86_expand_epilogue): Likewise. Add a local variable for
20074 the reg_save_offset field in struct ix86_frame.
20076 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20078 PR tree-optimization/82604
20079 * tree-loop-distribution.c (enum partition_kind): New enum item
20080 PKIND_PARTIAL_MEMSET.
20081 (partition_builtin_p): Support above new enum item.
20082 (generate_code_for_partition): Ditto.
20083 (compute_access_range): Differentiate cases that equality can be
20084 proven at all loops, the innermost loops or no loops.
20085 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20086 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20087 (finalize_partitions, distribute_loop): Don't fuse partition of
20088 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20089 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20090 parloop is enabled.
20092 2018-01-23 Martin Liska <mliska@suse.cz>
20094 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20095 order to ignore the predictor.
20096 (PRED_POLYMORPHIC_CALL): Likewise.
20097 (PRED_RECURSIVE_CALL): Likewise.
20099 2018-01-23 Martin Liska <mliska@suse.cz>
20101 * tree-profile.c (tree_profiling): Print function header to
20102 aware reader which function we are working on.
20103 * value-prof.c (gimple_find_values_to_profile): Do not print
20104 not interesting value histograms.
20106 2018-01-23 Martin Liska <mliska@suse.cz>
20108 * profile-count.h (enum profile_quality): Add
20109 profile_uninitialized as the first value. Do not number values
20110 as they are zero based.
20111 (profile_count::verify): Update sanity check.
20112 (profile_probability::verify): Likewise.
20114 2018-01-23 Nathan Sidwell <nathan@acm.org>
20116 * doc/invoke.texi (ffor-scope): Deprecate.
20118 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20120 PR tree-optimization/83510
20121 * domwalk.c (set_all_edges_as_executable): New function.
20122 (dom_walker::dom_walker): Convert bool param
20123 "skip_unreachable_blocks" to enum reachability. Move setup of
20124 edge flags to set_all_edges_as_executable and only do it when
20125 reachability is REACHABLE_BLOCKS.
20126 * domwalk.h (enum dom_walker::reachability): New enum.
20127 (dom_walker::dom_walker): Convert bool param
20128 "skip_unreachable_blocks" to enum reachability.
20129 (set_all_edges_as_executable): New decl.
20130 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20131 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20133 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20134 but converting true to REACHABLE_BLOCKS.
20135 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20137 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20138 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20139 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20141 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20142 if check_all_array_refs will be called.
20144 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20146 * tree.c (selftest::test_location_wrappers): Add more test
20149 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20151 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20152 (selftest::test_bit_in_range): Likewise.
20154 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20157 * doc/sourcebuild.texi (vect_float): Say that the selector
20158 only describes the situation when -funsafe-math-optimizations is on.
20159 (vect_float_strict): Document.
20161 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20163 PR tree-optimization/83965
20164 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20165 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20166 instead of checking only for a reduction.
20167 (vect_recog_widen_sum_pattern): Likewise.
20169 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20171 * predict.c (probably_never_executed): Only use precise profile info.
20172 (compute_function_frequency): Skip after inlining hack since we now
20173 have quality checking.
20175 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20177 * profile-count.h (profile_probability::very_unlikely,
20178 profile_probability::unlikely, profile_probability::even): Set
20179 precision to guessed.
20181 2018-01-23 Richard Biener <rguenther@suse.de>
20183 PR tree-optimization/83963
20184 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20185 Properly terminate dominator walk when crossing the exit edge not
20186 when visiting its source block.
20188 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20191 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20192 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20194 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20196 PR tree-optimization/83957
20197 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20198 semicolon after for body surrounded by braces.
20200 PR tree-optimization/83081
20201 * profile-count.h (profile_probability::split): New method.
20202 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20203 Use profile_probability::split.
20204 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20205 when splitting a single conditional jump into 2.
20207 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20209 PR tree-optimization/69452
20210 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20213 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20215 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20216 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20217 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20219 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20221 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20223 * config/rl78/rl78.md (movdi): New define_expand.
20224 * config/rl78/rl78.c (rl78_split_movdi): New function.
20226 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20229 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20231 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20232 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20233 128-bit to produce an UNSPEC move to get the double word with the
20234 signbit and then a shift directly to do signbit.
20235 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20236 implementation with a new version that just does either a direct
20237 move or a regular move. Move memory interface to separate insns.
20238 Move insns so they are next to the expander.
20239 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20240 with signbit move. Split big and little endian case.
20241 (signbit<mode>2_dm_mem_le): Likewise.
20242 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20243 (signbit<mode>2_dm2): Likewise.
20245 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20247 * config/rl78/rl78.md (anddi3): New define_expand.
20249 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20251 * config/rl78/rl78.md (umindi3): New define_expand.
20253 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20255 * config/rl78/rl78.md (smindi3): New define_expand.
20257 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20259 * config/rl78/rl78.md (smaxdi3): New define_expand.
20261 2018-01-22 Carl Love <cel@us.ibm.com>
20263 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20264 LVX_V1TI): Add macro expansion.
20265 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20266 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20267 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20268 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20269 Change check to determine if the instruction is a byte reversing
20270 entry. Fix typo in comment.
20271 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20272 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20273 Add def_builtin calls for new builtins.
20274 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20275 Add define_insn expansion.
20277 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20279 * config/rl78/rl78.md (umaxdi3): New define_expand.
20281 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20283 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20284 for non-QImode registers.
20286 2018-01-22 Richard Biener <rguenther@suse.de>
20288 PR tree-optimization/83963
20289 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20290 including the loop exit block.
20291 (scop_detection::merge_sese): Likewise.
20292 (scop_detection::add_scop): Do it here instead.
20294 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20296 * doc/sourcebuild.texi (arm_softfloat): Document.
20298 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20301 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20302 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20303 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20305 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20306 David Edelsohn <dje.gcc@gmail.com>
20309 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20310 Change "crset eq" to "crset 2".
20311 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20312 (*call_indirect_aix<mode>_nospec): Likewise.
20313 (*call_value_indirect_aix<mode>_nospec): Likewise.
20314 (*call_indirect_elfv2<mode>_nospec): Likewise.
20315 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20316 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20317 change assembly output from . to $.
20318 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20319 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20320 (*tablejump<mode>_internal1_nospec): Likewise.
20322 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20325 * config/sh/sh_optimize_sett_clrt.cc:
20326 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20328 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20330 PR tree-optimization/83940
20331 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20332 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20333 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20334 use it to pass back the definition type.
20335 (vect_check_store_rhs): Likewise rhs_dt_out.
20336 (vect_build_gather_load_calls): Add a mask_dt argument and use
20337 it instead of a call to vect_is_simple_use.
20338 (vectorizable_store): Update calls to vect_check_load_store_mask
20339 and vect_check_store_rhs. Use the dt returned by the latter instead
20340 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20341 instead of calls to vect_is_simple_use. Pass the scalar rather
20342 than the vector operand to vect_is_simple_use when handling
20343 second and subsequent copies of an rhs value.
20344 (vectorizable_load): Update calls to vect_check_load_store_mask
20345 and vect_build_gather_load_calls. Use the cached mask_dt and
20346 gs_info.offset_dt instead of calls to vect_is_simple_use.
20348 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20350 PR middle-end/83945
20351 * tree-emutls.c: Include gimplify.h.
20352 (lower_emutls_2): New function.
20353 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20354 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20355 it before further processing.
20358 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20359 UINTVAL (trueop1) instead of INTVAL (op1).
20361 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20365 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20366 INCOMING_FRAME_SP_OFFSET if not defined.
20367 (scan_trace): Add ENTRY argument. If true and
20368 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20369 emit a note to adjust the CFA offset.
20370 (create_cfi_notes): Adjust scan_trace callers.
20371 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20372 INCOMING_FRAME_SP_OFFSET in the CIE.
20373 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20374 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20376 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20377 * doc/tm.texi: Regenerated.
20379 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20381 PR rtl-optimization/83147
20382 * lra-constraints.c (remove_inheritance_pseudos): Use
20383 lra_substitute_pseudo_within_insn.
20385 2018-01-19 Tom de Vries <tom@codesourcery.com>
20386 Cesar Philippidis <cesar@codesourcery.com>
20389 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20391 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20394 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20395 spaces for function labels.
20397 2018-01-19 Martin Liska <mliska@suse.cz>
20399 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20400 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20401 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20402 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20403 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20404 (PRED_CONST_RETURN): Change from 69 to 65.
20405 (PRED_NULL_RETURN): Change from 91 to 71.
20406 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20407 (PRED_LOOP_GUARD): Change from 66 to 73.
20409 2018-01-19 Martin Liska <mliska@suse.cz>
20411 * predict.c (predict_insn_def): Add new assert.
20412 (struct branch_predictor): Change type to signed integer.
20413 (test_prediction_value_range): Amend test to cover
20414 PROB_UNINITIALIZED.
20415 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20416 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20417 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20418 (PRED_LOOP_IV_COMPARE): Likewise.
20419 * predict.h (PROB_UNINITIALIZED): Define new constant.
20421 2018-01-19 Martin Liska <mliska@suse.cz>
20423 * predict.c (dump_prediction): Add new format for
20424 analyze_brprob.py script which is enabled with -details
20426 * profile-count.h (precise_p): New function.
20428 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20430 PR tree-optimization/83922
20431 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20432 there are no statements that need masking.
20433 (vect_active_double_reduction_p): New function.
20434 (vect_analyze_loop_operations): Use it when handling phis that
20435 are not in the loop header.
20437 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20439 PR tree-optimization/83914
20440 * tree-vect-loop.c (vectorizable_induction): Don't convert
20441 init_expr or apply the peeling adjustment for inductions
20442 that are nested within the vectorized loop.
20444 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20446 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20449 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20453 * function.h (gimplify_parameters): Add gimple_seq * argument.
20454 * function.c: Include gimple.h and options.h.
20455 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20456 for the added local temporaries if needed.
20457 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20458 if there are any parameter cleanups, wrap whole body into a
20459 try/finally with the cleanups.
20461 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20464 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20465 Use GET_MODE_CLASS for scalar floating point.
20467 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20471 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20472 Fix call of call_cgraph_insertion_hooks.
20474 2018-01-18 Martin Sebor <msebor@redhat.com>
20476 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20478 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20481 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20484 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20487 * common.opt: (-ffile-prefix-map): New option.
20488 * opts.c (common_handle_option): Defer it.
20489 * opts-global.c (handle_common_deferred_options): Handle it.
20490 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20491 * file-prefix-map.h: New file.
20492 (remap_debug_filename, add_debug_prefix_map): ...here.
20493 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20494 * final.c (debug_prefix_map, add_debug_prefix_map
20495 remap_debug_filename): Move to...
20496 * file-prefix-map.c: New file.
20497 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20498 generalize, get rid of alloca(), use strrchr() instead of strchr().
20499 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20500 Implement in terms of add_prefix_map().
20501 (remap_macro_filename, remap_debug_filename): Implement in term of
20503 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20504 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20505 * dbxout.c: Include file-prefix-map.h.
20506 * varasm.c: Likewise.
20507 * vmsdbgout.c: Likewise.
20508 * xcoffout.c: Likewise.
20509 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20510 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20511 * doc/invoke.texi (-ffile-prefix-map): Document.
20512 (-fdebug-prefix-map): Update description.
20514 2018-01-18 Martin Liska <mliska@suse.cz>
20516 * config/i386/i386.c (indirect_thunk_name): Document that also
20518 (output_indirect_thunk): Document why both instructions
20519 (pause and lfence) are generated.
20521 2018-01-18 Richard Biener <rguenther@suse.de>
20523 PR tree-optimization/83887
20524 * graphite-scop-detection.c
20525 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20526 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20527 (scop_detection::merge_sese): Re-implement with a flood-fill
20528 algorithm that properly finds a SESE region if it exists.
20530 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20533 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20534 pointer_diff optimizations use view_convert instead of convert.
20536 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20538 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20539 Generate different code for -mno-speculate-indirect-jumps.
20540 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20541 (*call_indirect_aix<mode>): Disable for
20542 -mno-speculate-indirect-jumps.
20543 (*call_indirect_aix<mode>_nospec): New define_insn.
20544 (*call_value_indirect_aix<mode>): Disable for
20545 -mno-speculate-indirect-jumps.
20546 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20547 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20548 -mno-speculate-indirect-jumps.
20549 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20551 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20553 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20554 long double type, set the flags for noting the default long double
20555 type, even if we don't pass or return a long double type.
20557 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20560 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20563 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20565 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20566 support for merge[hl].
20567 (fold_mergehl_helper): New helper function.
20568 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20569 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20570 (altivec_vmrglw_direct): Add xxmrglw insn.
20572 2018-01-17 Andrew Waterman <andrew@sifive.com>
20574 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20575 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20577 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20580 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20581 call the lto_location_cache before reading the
20582 DECL_SOURCE_LOCATION of the types.
20584 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20585 Richard Sandiford <richard.sandiford@linaro.org>
20587 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20588 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20589 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20590 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20591 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20593 * config/aarch64/constraints.md (aarch64_movti_operand):
20595 * config/aarch64/predicates.md (Uti): Add new constraint.
20597 2018-01-17 Carl Love <cel@us.ibm.com>
20599 * config/rs6000/vsx.md (define_expand xl_len_r,
20600 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20601 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20603 (define_expand, define_insn): Move the shift left from the
20604 define_insn to the define_expand for lxvl and stxvl instructions.
20605 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20606 and XL_LEN_R definitions to PURE.
20608 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20610 * config/i386/i386.c (indirect_thunk_name): Declare regno
20611 as unsigned int. Compare regno with INVALID_REGNUM.
20612 (output_indirect_thunk): Ditto.
20613 (output_indirect_thunk_function): Ditto.
20614 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20615 in the call to output_indirect_thunk_function.
20617 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20619 PR middle-end/83884
20620 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20621 rather than the size of inner_type to determine the stack slot size
20622 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20624 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20627 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20630 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20632 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20633 endian Linux systems to optionally enable multilibs for selecting
20634 the long double type if the user configured an explicit type.
20635 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20636 have no long double multilibs if not defined.
20637 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20638 warn if the user used -mabi={ieee,ibm}longdouble and we built
20639 multilibs for long double.
20640 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20641 appropriate multilib option.
20642 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20644 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20645 for building long double multilibs.
20646 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20648 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20650 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20653 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20655 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20658 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20661 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20664 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20666 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20667 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20669 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20671 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20672 different rtl trees depending on TARGET_64BIT.
20673 (rs6000_gen_lvx): Likewise.
20675 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20677 * config/visium/visium.md (nop): Tweak comment.
20678 (hazard_nop): Likewise.
20680 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20682 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20683 -mspeculate-indirect-jumps.
20684 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20685 for -mno-speculate-indirect-jumps.
20686 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20687 (*call_value_indirect_elfv2<mode>): Disable for
20688 -mno-speculate-indirect-jumps.
20689 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20690 (indirect_jump): Emit different RTL for
20691 -mno-speculate-indirect-jumps.
20692 (*indirect_jump<mode>): Disable for
20693 -mno-speculate-indirect-jumps.
20694 (*indirect_jump<mode>_nospec): New define_insn.
20695 (tablejump): Emit different RTL for
20696 -mno-speculate-indirect-jumps.
20697 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20698 (tablejumpsi_nospec): New define_expand.
20699 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20700 (tablejumpdi_nospec): New define_expand.
20701 (*tablejump<mode>_internal1): Disable for
20702 -mno-speculate-indirect-jumps.
20703 (*tablejump<mode>_internal1_nospec): New define_insn.
20704 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20707 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20709 * caller-save.c (insert_save): Drop unnecessary parameter. All
20712 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20713 Richard Biener <rguenth@suse.de>
20716 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20717 return early, inline manually is_gimple_sizepos. Make sure if we
20718 call gimplify_expr we don't end up with a gimple constant.
20719 * tree.c (variably_modified_type_p): Don't return true for
20720 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20721 * gimplify.h (is_gimple_sizepos): Remove.
20723 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20725 PR tree-optimization/83857
20726 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20727 vectorizable_live_operation for pure SLP statements.
20728 (vectorizable_live_operation): Handle PHIs.
20730 2018-01-16 Richard Biener <rguenther@suse.de>
20732 PR tree-optimization/83867
20733 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20734 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20736 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20739 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20740 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20741 If off is not INTEGER_CST, issue a may not be aligned warning
20742 rather than isn't aligned. Use isn%'t rather than isn't.
20743 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20745 <case MULT_EXPR>: Improve the case when bottom and one of the
20746 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20747 operand, in that case check if the other operand is multiple of
20748 bottom divided by the INTEGER_CST operand.
20750 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20753 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20754 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20755 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20756 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20757 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20758 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20759 (pa_function_arg_size): New function.
20761 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20763 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20764 in a separate statement.
20766 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20768 PR tree-optimization/83847
20769 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20770 group gathers and scatters.
20772 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20774 PR rtl-optimization/86620
20775 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20777 PR rtl-optimization/83213
20778 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20779 to last if both are JUMP_INSNs.
20781 PR tree-optimization/83843
20782 * gimple-ssa-store-merging.c
20783 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20784 store_immediate_info for bswap/nop orig_stores.
20786 2018-01-15 Andrew Waterman <andrew@sifive.com>
20788 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20790 <UDIV>: Increase cost if !TARGET_DIV.
20792 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20794 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20795 (define_attr "cr_logical_3op"): New.
20796 (cceq_ior_compare): Adjust.
20797 (cceq_ior_compare_complement): Adjust.
20798 (*cceq_rev_compare): Adjust.
20799 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20800 (is_cracked_insn): Adjust.
20801 (insn_must_be_first_in_group): Adjust.
20802 * config/rs6000/40x.md: Adjust.
20803 * config/rs6000/440.md: Adjust.
20804 * config/rs6000/476.md: Adjust.
20805 * config/rs6000/601.md: Adjust.
20806 * config/rs6000/603.md: Adjust.
20807 * config/rs6000/6xx.md: Adjust.
20808 * config/rs6000/7450.md: Adjust.
20809 * config/rs6000/7xx.md: Adjust.
20810 * config/rs6000/8540.md: Adjust.
20811 * config/rs6000/cell.md: Adjust.
20812 * config/rs6000/e300c2c3.md: Adjust.
20813 * config/rs6000/e500mc.md: Adjust.
20814 * config/rs6000/e500mc64.md: Adjust.
20815 * config/rs6000/e5500.md: Adjust.
20816 * config/rs6000/e6500.md: Adjust.
20817 * config/rs6000/mpc.md: Adjust.
20818 * config/rs6000/power4.md: Adjust.
20819 * config/rs6000/power5.md: Adjust.
20820 * config/rs6000/power6.md: Adjust.
20821 * config/rs6000/power7.md: Adjust.
20822 * config/rs6000/power8.md: Adjust.
20823 * config/rs6000/power9.md: Adjust.
20824 * config/rs6000/rs64.md: Adjust.
20825 * config/rs6000/titan.md: Adjust.
20827 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20829 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20830 ix86_indirect_branch_register logic.
20832 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20834 * config/i386/constraints.md (Bs): Update
20835 ix86_indirect_branch_register check. Don't check
20836 ix86_indirect_branch_register with GOT_memory_operand.
20838 * config/i386/predicates.md (GOT_memory_operand): Don't check
20839 ix86_indirect_branch_register here.
20840 (GOT32_symbol_operand): Likewise.
20842 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20844 * config/i386/predicates.md (constant_call_address_operand):
20845 Rewrite ix86_indirect_branch_register logic.
20846 (sibcall_insn_operand): Likewise.
20848 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20850 * config/i386/constraints.md (Bs): Replace
20851 ix86_indirect_branch_thunk_register with
20852 ix86_indirect_branch_register.
20854 * config/i386/i386.md (indirect_jump): Likewise.
20855 (tablejump): Likewise.
20856 (*sibcall_memory): Likewise.
20857 (*sibcall_value_memory): Likewise.
20858 Peepholes of indirect call and jump via memory: Likewise.
20859 * config/i386/i386.opt: Likewise.
20860 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20861 (GOT_memory_operand): Likewise.
20862 (call_insn_operand): Likewise.
20863 (sibcall_insn_operand): Likewise.
20864 (GOT32_symbol_operand): Likewise.
20866 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20868 PR middle-end/83837
20869 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20870 type rather than type addr's type points to.
20871 (expand_omp_atomic_mutex): Likewise.
20872 (expand_omp_atomic): Likewise.
20874 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20877 * config/i386/i386.c (output_indirect_thunk_function): Use
20878 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20879 for __x86_return_thunk.
20881 2018-01-15 Richard Biener <rguenther@suse.de>
20883 PR middle-end/83850
20884 * expmed.c (extract_bit_field_1): Fix typo.
20886 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20889 * config/arm/iterators.md (VF): New mode iterator.
20890 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20891 Remove integer-related logic from pattern.
20892 (neon_vabd<mode>_3): Likewise.
20894 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20896 PR middle-end/82694
20897 * common.opt (fstrict-overflow): No longer an alias.
20898 (fwrapv-pointer): New option.
20899 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20900 also for pointer types based on flag_wrapv_pointer.
20901 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20902 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20903 opts->x_flag_wrapv got set.
20904 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20905 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20906 POINTER_TYPE_OVERFLOW_UNDEFINED.
20907 * match.pd: Likewise in address comparison pattern.
20908 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20910 2018-01-15 Richard Biener <rguenther@suse.de>
20913 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20914 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20915 Reset type names to their identifier if their TYPE_DECL doesn't
20916 have linkage (and thus is used for ODR and devirt).
20917 (save_debug_info_for_decl): Remove.
20918 (save_debug_info_for_type): Likewise.
20919 (add_tree_to_fld_list): Adjust.
20920 * tree-pretty-print.c (dump_generic_node): Make dumping of
20921 type names more robust.
20923 2018-01-15 Richard Biener <rguenther@suse.de>
20925 * BASE-VER: Bump to 8.0.1.
20927 2018-01-14 Martin Sebor <msebor@redhat.com>
20930 * builtins.c (check_access): Avoid warning when the no-warning bit
20933 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20935 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20936 * ira-color (allocno_hard_regs_compare): Likewise.
20938 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20941 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20942 Use .pushsection/.popsection.
20944 2018-01-14 Martin Sebor <msebor@redhat.com>
20947 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20949 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20951 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20952 entry from extra_headers.
20953 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20954 extra_headers, make the list bitwise identical to the i?86-*-* one.
20956 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20958 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20959 -mcmodel=large with -mindirect-branch=thunk,
20960 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20961 -mfunction-return=thunk-extern.
20962 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20963 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20964 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20966 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20968 * config/i386/i386.c (print_reg): Print the name of the full
20969 integer register without '%'.
20970 (ix86_print_operand): Handle 'V'.
20971 * doc/extend.texi: Document 'V' modifier.
20973 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20975 * config/i386/constraints.md (Bs): Disallow memory operand for
20976 -mindirect-branch-register.
20978 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20979 (GOT_memory_operand): Likewise.
20980 (call_insn_operand): Likewise.
20981 (sibcall_insn_operand): Likewise.
20982 (GOT32_symbol_operand): Likewise.
20983 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20984 for -mindirect-branch-register.
20985 (tablejump): Likewise.
20986 (*sibcall_memory): Likewise.
20987 (*sibcall_value_memory): Likewise.
20988 Disallow peepholes of indirect call and jump via memory for
20989 -mindirect-branch-register.
20990 (*call_pop): Replace m with Bw.
20991 (*call_value_pop): Likewise.
20992 (*sibcall_pop_memory): Replace m with Bs.
20993 * config/i386/i386.opt (mindirect-branch-register): New option.
20994 * doc/invoke.texi: Document -mindirect-branch-register option.
20996 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20998 * config/i386/i386-protos.h (ix86_output_function_return): New.
20999 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21000 set function_return_type.
21001 (indirect_thunk_name): Add ret_p to indicate thunk for function
21003 (output_indirect_thunk_function): Pass false to
21004 indirect_thunk_name.
21005 (ix86_output_indirect_branch_via_reg): Likewise.
21006 (ix86_output_indirect_branch_via_push): Likewise.
21007 (output_indirect_thunk_function): Create alias for function
21008 return thunk if regno < 0.
21009 (ix86_output_function_return): New function.
21010 (ix86_handle_fndecl_attribute): Handle function_return.
21011 (ix86_attribute_table): Add function_return.
21012 * config/i386/i386.h (machine_function): Add
21013 function_return_type.
21014 * config/i386/i386.md (simple_return_internal): Use
21015 ix86_output_function_return.
21016 (simple_return_internal_long): Likewise.
21017 * config/i386/i386.opt (mfunction-return=): New option.
21018 (indirect_branch): Mention -mfunction-return=.
21019 * doc/extend.texi: Document function_return function attribute.
21020 * doc/invoke.texi: Document -mfunction-return= option.
21022 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21024 * config/i386/i386-opts.h (indirect_branch): New.
21025 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21026 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21027 with local indirect jump when converting indirect call and jump.
21028 (ix86_set_indirect_branch_type): New.
21029 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21030 (indirectlabelno): New.
21031 (indirect_thunk_needed): Likewise.
21032 (indirect_thunk_bnd_needed): Likewise.
21033 (indirect_thunks_used): Likewise.
21034 (indirect_thunks_bnd_used): Likewise.
21035 (INDIRECT_LABEL): Likewise.
21036 (indirect_thunk_name): Likewise.
21037 (output_indirect_thunk): Likewise.
21038 (output_indirect_thunk_function): Likewise.
21039 (ix86_output_indirect_branch_via_reg): Likewise.
21040 (ix86_output_indirect_branch_via_push): Likewise.
21041 (ix86_output_indirect_branch): Likewise.
21042 (ix86_output_indirect_jmp): Likewise.
21043 (ix86_code_end): Call output_indirect_thunk_function if needed.
21044 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21046 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21047 (ix86_attribute_table): Add indirect_branch.
21048 * config/i386/i386.h (machine_function): Add indirect_branch_type
21049 and has_local_indirect_jump.
21050 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21052 (tablejump): Likewise.
21053 (*indirect_jump): Use ix86_output_indirect_jmp.
21054 (*tablejump_1): Likewise.
21055 (simple_return_indirect_internal): Likewise.
21056 * config/i386/i386.opt (mindirect-branch=): New option.
21057 (indirect_branch): New.
21060 (thunk-inline): Likewise.
21061 (thunk-extern): Likewise.
21062 * doc/extend.texi: Document indirect_branch function attribute.
21063 * doc/invoke.texi: Document -mindirect-branch= option.
21065 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21068 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21070 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21072 * ipa-inline.c (want_inline_small_function_p): Return false if
21073 inlining has already failed with CIF_FINAL_ERROR.
21074 (update_caller_keys): Call want_inline_small_function_p before
21076 (update_callee_keys): Likewise.
21078 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21080 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21082 (rs6000_quadword_masked_address_p): Likewise.
21083 (quad_aligned_load_p): Likewise.
21084 (quad_aligned_store_p): Likewise.
21085 (const_load_sequence_p): Add comment to describe the outer-most loop.
21086 (mimic_memory_attributes_and_flags): New function.
21087 (rs6000_gen_stvx): Likewise.
21088 (replace_swapped_aligned_store): Likewise.
21089 (rs6000_gen_lvx): Likewise.
21090 (replace_swapped_aligned_load): Likewise.
21091 (replace_swapped_load_constant): Capitalize argument name in
21092 comment describing this function.
21093 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21094 and stores that access quad-word aligned addresses and replace
21095 with stvx or lvx instructions when appropriate.
21096 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21097 New function prototype.
21098 (rs6000_quadword_masked_address_p): Likewise.
21099 (rs6000_gen_lvx): Likewise.
21100 (rs6000_gen_stvx): Likewise.
21101 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21102 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21103 when memory address is aligned.
21104 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21105 this split to select lvx instruction when memory address is aligned.
21106 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21107 instruction when memory address is aligned.
21108 (*vsx_le_perm_load_v16qi): Likewise.
21109 (four unnamed splitters): Modify to select the stvx instruction
21110 when memory is aligned.
21112 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21114 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21115 which appears in the queue multiple times.
21117 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21118 Alan Hayward <alan.hayward@arm.com>
21119 David Sherwood <david.sherwood@arm.com>
21121 * tree-vectorizer.h (vec_lower_bound): New structure.
21122 (_loop_vec_info): Add check_nonzero and lower_bounds.
21123 (LOOP_VINFO_CHECK_NONZERO): New macro.
21124 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21125 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21126 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21127 fields. Make seg_len the distance travelled, not including the
21129 (dr_direction_indicator): Declare.
21130 (dr_zero_step_indicator): Likewise.
21131 (dr_known_forward_stride_p): Likewise.
21132 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21134 (runtime_alias_check_p): Allow runtime alias checks with
21136 (operator ==): Compare access_size and align.
21137 (prune_runtime_alias_test_list): Rework for new distinction between
21138 the access_size and seg_len.
21139 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21141 (get_segment_min_max): New function.
21142 (create_intersect_range_checks): Use it.
21143 (dr_step_indicator): New function.
21144 (dr_direction_indicator): Likewise.
21145 (dr_zero_step_indicator): Likewise.
21146 (dr_known_forward_stride_p): Likewise.
21147 * tree-loop-distribution.c (data_ref_segment_size): Return
21148 DR_STEP * (niters - 1).
21149 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21151 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21152 (vect_preserves_scalar_order_p): New function, split out from...
21153 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21154 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21155 (vect_vfa_access_size): New function.
21156 (vect_vfa_align): Likewise.
21157 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21158 (dump_lower_bound): New function.
21159 (vect_check_lower_bound): Likewise.
21160 (vect_small_gap_p): Likewise.
21161 (vectorizable_with_step_bound_p): Likewise.
21162 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21163 depencies if the vectorization factor is 1. Convert the checks
21164 for nonzero steps into checks on the bounds of DR_STEP. Try using
21165 a bunds check for variable steps if the minimum required step is
21166 relatively small. Update calls to the dr_with_seg_len
21167 constructor and to vect_compile_time_alias.
21168 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21170 (vect_loop_versioning): Call it.
21171 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21173 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21175 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21176 Alan Hayward <alan.hayward@arm.com>
21177 David Sherwood <david.sherwood@arm.com>
21179 * doc/sourcebuild.texi (vect_scatter_store): Document.
21180 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21182 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21184 * genopinit.c (main): Add supports_vec_scatter_store and
21185 supports_vec_scatter_store_cached to target_optabs.
21186 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21187 IFN_MASK_SCATTER_STORE.
21188 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21190 * internal-fn.h (internal_store_fn_p): Declare.
21191 (internal_fn_stored_value_index): Likewise.
21192 * internal-fn.c (scatter_store_direct): New macro.
21193 (expand_scatter_store_optab_fn): New function.
21194 (direct_scatter_store_optab_supported_p): New macro.
21195 (internal_store_fn_p): New function.
21196 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21197 IFN_MASK_SCATTER_STORE.
21198 (internal_fn_mask_index): Likewise.
21199 (internal_fn_stored_value_index): New function.
21200 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21201 for scatter stores.
21202 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21203 * optabs-query.c (supports_vec_scatter_store_p): New function.
21204 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21205 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21206 true for scatter stores.
21207 (vect_gather_scatter_fn_p): Handle scatter stores too.
21208 (vect_check_gather_scatter): Consider using scatter stores if
21209 supports_vec_scatter_store_p.
21210 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21211 scatter stores too.
21212 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21213 internal_fn_stored_value_index.
21214 (check_load_store_masking): Handle scatter stores too.
21215 (vect_get_store_rhs): Make public.
21216 (vectorizable_call): Use internal_store_fn_p.
21217 (vectorizable_store): Handle scatter store internal functions.
21218 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21219 when deciding whether the end of the group has been reached.
21220 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21221 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21222 (mask_scatter_store<mode>): New insns.
21224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21225 Alan Hayward <alan.hayward@arm.com>
21226 David Sherwood <david.sherwood@arm.com>
21228 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21229 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21230 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21232 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21233 Use vect_truncate_gather_scatter_offset if we can't treat the
21234 operation as a normal gather load or scatter store.
21235 (get_group_load_store_type): Take the gather_scatter_info
21236 as argument. Try using a gather load or scatter store for
21237 single-element groups.
21238 (get_load_store_type): Update calls to get_group_load_store_type
21239 and vect_use_strided_gather_scatters_p.
21241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21242 Alan Hayward <alan.hayward@arm.com>
21243 David Sherwood <david.sherwood@arm.com>
21245 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21246 optional tree argument.
21247 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21249 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21250 but continue to use the current value as a fallback.
21251 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21252 to compare the updates.
21253 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21254 (get_load_store_type): Use it when handling a strided access.
21255 (vect_get_strided_load_store_ops): New function.
21256 (vect_get_data_ptr_increment): Likewise.
21257 (vectorizable_load): Handle strided gather loads. Always pass
21258 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21260 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21261 Alan Hayward <alan.hayward@arm.com>
21262 David Sherwood <david.sherwood@arm.com>
21264 * doc/md.texi (gather_load@var{m}): Document.
21265 (mask_gather_load@var{m}): Likewise.
21266 * genopinit.c (main): Add supports_vec_gather_load and
21267 supports_vec_gather_load_cached to target_optabs.
21268 * optabs-tree.c (init_tree_optimization_optabs): Use
21269 ggc_cleared_alloc to allocate target_optabs.
21270 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21271 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21273 * internal-fn.h (internal_load_fn_p): Declare.
21274 (internal_gather_scatter_fn_p): Likewise.
21275 (internal_fn_mask_index): Likewise.
21276 (internal_gather_scatter_fn_supported_p): Likewise.
21277 * internal-fn.c (gather_load_direct): New macro.
21278 (expand_gather_load_optab_fn): New function.
21279 (direct_gather_load_optab_supported_p): New macro.
21280 (direct_internal_fn_optab): New function.
21281 (internal_load_fn_p): Likewise.
21282 (internal_gather_scatter_fn_p): Likewise.
21283 (internal_fn_mask_index): Likewise.
21284 (internal_gather_scatter_fn_supported_p): Likewise.
21285 * optabs-query.c (supports_at_least_one_mode_p): New function.
21286 (supports_vec_gather_load_p): Likewise.
21287 * optabs-query.h (supports_vec_gather_load_p): Declare.
21288 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21289 and memory_type field.
21290 (NUM_PATTERNS): Bump to 15.
21291 * tree-vect-data-refs.c: Include internal-fn.h.
21292 (vect_gather_scatter_fn_p): New function.
21293 (vect_describe_gather_scatter_call): Likewise.
21294 (vect_check_gather_scatter): Try using internal functions for
21295 gather loads. Recognize existing calls to a gather load function.
21296 (vect_analyze_data_refs): Consider using gather loads if
21297 supports_vec_gather_load_p.
21298 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21299 (vect_get_gather_scatter_offset_type): Likewise.
21300 (vect_convert_mask_for_vectype): Likewise.
21301 (vect_add_conversion_to_patterm): Likewise.
21302 (vect_try_gather_scatter_pattern): Likewise.
21303 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21304 (vect_vect_recog_func_ptrs): Add it.
21305 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21306 internal_fn_mask_index and internal_gather_scatter_fn_p.
21307 (check_load_store_masking): Take the gather_scatter_info as an
21308 argument and handle gather loads.
21309 (vect_get_gather_scatter_ops): New function.
21310 (vectorizable_call): Check internal_load_fn_p.
21311 (vectorizable_load): Likewise. Handle gather load internal
21313 (vectorizable_store): Update call to check_load_store_masking.
21314 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21315 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21316 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21317 (aarch64_gather_scale_operand_d): New predicates.
21318 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21319 (mask_gather_load<mode>): New insns.
21321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21322 Alan Hayward <alan.hayward@arm.com>
21323 David Sherwood <david.sherwood@arm.com>
21325 * optabs.def (fold_left_plus_optab): New optab.
21326 * doc/md.texi (fold_left_plus_@var{m}): Document.
21327 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21328 * internal-fn.c (fold_left_direct): Define.
21329 (expand_fold_left_optab_fn): Likewise.
21330 (direct_fold_left_optab_supported_p): Likewise.
21331 * fold-const-call.c (fold_const_fold_left): New function.
21332 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21333 * tree-parloops.c (valid_reduction_p): New function.
21334 (gather_scalar_reductions): Use it.
21335 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21336 (vect_finish_replace_stmt): Declare.
21337 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21338 (needs_fold_left_reduction_p): New function, split out from...
21339 (vect_is_simple_reduction): ...here. Accept reductions that
21340 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21341 (vect_force_simple_reduction): Also store the reduction type in
21342 the assignment's STMT_VINFO_REDUC_TYPE.
21343 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21344 (merge_with_identity): New function.
21345 (vect_expand_fold_left): Likewise.
21346 (vectorize_fold_left_reduction): Likewise.
21347 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21348 scalar phi in place for it. Check for target support and reject
21349 cases that would reassociate the operation. Defer the transform
21350 phase to vectorize_fold_left_reduction.
21351 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21352 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21353 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21355 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21357 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21358 call to ifc_temp_var.
21360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21361 Alan Hayward <alan.hayward@arm.com>
21362 David Sherwood <david.sherwood@arm.com>
21364 * target.def (legitimize_address_displacement): Take the original
21365 offset as a poly_int.
21366 * targhooks.h (default_legitimize_address_displacement): Update
21368 * targhooks.c (default_legitimize_address_displacement): Likewise.
21369 * doc/tm.texi: Regenerate.
21370 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21371 as an argument, moving assert of ad->disp == ad->disp_term to...
21372 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21373 Try calling targetm.legitimize_address_displacement before expanding
21374 the address rather than afterwards, and adjust for the new interface.
21375 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21376 Match the new hook interface. Handle SVE addresses.
21377 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21378 new hook interface.
21380 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21382 * Makefile.in (OBJS): Add early-remat.o.
21383 * target.def (select_early_remat_modes): New hook.
21384 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21385 * doc/tm.texi: Regenerate.
21386 * targhooks.h (default_select_early_remat_modes): Declare.
21387 * targhooks.c (default_select_early_remat_modes): New function.
21388 * timevar.def (TV_EARLY_REMAT): New timevar.
21389 * passes.def (pass_early_remat): New pass.
21390 * tree-pass.h (make_pass_early_remat): Declare.
21391 * early-remat.c: New file.
21392 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21394 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21397 Alan Hayward <alan.hayward@arm.com>
21398 David Sherwood <david.sherwood@arm.com>
21400 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21401 vfm1 with a bound_epilog parameter.
21402 (vect_do_peeling): Update calls accordingly, and move the prologue
21403 call earlier in the function. Treat the base bound_epilog as 0 for
21404 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21405 this base when peeling for gaps.
21406 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21407 with fully-masked loops.
21408 (vect_estimate_min_profitable_iters): Handle the single peeled
21409 iteration in that case.
21411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21412 Alan Hayward <alan.hayward@arm.com>
21413 David Sherwood <david.sherwood@arm.com>
21415 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21416 single-element interleaving even if the size is not a power of 2.
21417 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21418 accesses for single-element interleaving if the group size is
21421 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21422 Alan Hayward <alan.hayward@arm.com>
21423 David Sherwood <david.sherwood@arm.com>
21425 * doc/md.texi (fold_extract_last_@var{m}): Document.
21426 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21427 * optabs.def (fold_extract_last_optab): New optab.
21428 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21429 * internal-fn.c (fold_extract_direct): New macro.
21430 (expand_fold_extract_optab_fn): Likewise.
21431 (direct_fold_extract_optab_supported_p): Likewise.
21432 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21433 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21434 EXTRACT_LAST_REDUCTION.
21435 (get_initial_def_for_reduction): Do not create an initial vector
21436 for EXTRACT_LAST_REDUCTION reductions.
21437 (vectorizable_reduction): Leave the scalar phi in place for
21438 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21439 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21440 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21441 transform phase to vectorizable_condition.
21442 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21444 (vect_finish_stmt_generation): ...here.
21445 (vect_finish_replace_stmt): New function.
21446 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21447 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21449 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21451 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21452 Alan Hayward <alan.hayward@arm.com>
21453 David Sherwood <david.sherwood@arm.com>
21455 * doc/md.texi (extract_last_@var{m}): Document.
21456 * optabs.def (extract_last_optab): New optab.
21457 * internal-fn.def (EXTRACT_LAST): New internal function.
21458 * internal-fn.c (cond_unary_direct): New macro.
21459 (expand_cond_unary_optab_fn): Likewise.
21460 (direct_cond_unary_optab_supported_p): Likewise.
21461 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21462 loops using EXTRACT_LAST.
21463 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21464 (extract_last_<mode>): ...this optab.
21465 (vec_extract<mode><Vel>): Update accordingly.
21467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21468 Alan Hayward <alan.hayward@arm.com>
21469 David Sherwood <david.sherwood@arm.com>
21471 * target.def (empty_mask_is_expensive): New hook.
21472 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21473 * doc/tm.texi: Regenerate.
21474 * targhooks.h (default_empty_mask_is_expensive): Declare.
21475 * targhooks.c (default_empty_mask_is_expensive): New function.
21476 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21477 if the target says that empty masks are expensive.
21478 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21480 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21483 Alan Hayward <alan.hayward@arm.com>
21484 David Sherwood <david.sherwood@arm.com>
21486 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21487 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21488 (vect_use_loop_mask_for_alignment_p): New function.
21489 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21490 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21491 niters_skip argument. Make sure that the first niters_skip elements
21492 of the first iteration are inactive.
21493 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21494 Update call to vect_set_loop_masks_directly.
21495 (get_misalign_in_elems): New function, split out from...
21496 (vect_gen_prolog_loop_niters): ...here.
21497 (vect_update_init_of_dr): Take a code argument that specifies whether
21498 the adjustment should be added or subtracted.
21499 (vect_update_init_of_drs): Likewise.
21500 (vect_prepare_for_masked_peels): New function.
21501 (vect_do_peeling): Skip prologue peeling if we're using a mask
21502 instead. Update call to vect_update_inits_of_drs.
21503 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21505 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21506 alignment. Do not include the number of peeled iterations in
21507 the minimum threshold in that case.
21508 (vectorizable_induction): Adjust the start value down by
21509 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21510 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21511 Take the number of skipped iterations into account when calculating
21513 * tree-vect-stmts.c (vect_gen_while_not): New function.
21515 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21516 Alan Hayward <alan.hayward@arm.com>
21517 David Sherwood <david.sherwood@arm.com>
21519 * doc/sourcebuild.texi (vect_fully_masked): Document.
21520 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21521 default value to 0.
21522 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21524 (vect_analyze_loop_2): ...here. Don't check the vectorization
21525 factor against the number of loop iterations if the loop is
21528 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21529 Alan Hayward <alan.hayward@arm.com>
21530 David Sherwood <david.sherwood@arm.com>
21532 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21533 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21534 (dump_groups): Update accordingly.
21535 (iv_use::mem_type): New member variable.
21536 (address_p): New function.
21537 (record_use): Add a mem_type argument and initialize the new
21539 (record_group_use): Add a mem_type argument. Use address_p.
21540 Remove obsolete null checks of base_object. Update call to record_use.
21541 (find_interesting_uses_op): Update call to record_group_use.
21542 (find_interesting_uses_cond): Likewise.
21543 (find_interesting_uses_address): Likewise.
21544 (get_mem_type_for_internal_fn): New function.
21545 (find_address_like_use): Likewise.
21546 (find_interesting_uses_stmt): Try find_address_like_use before
21547 calling find_interesting_uses_op.
21548 (addr_offset_valid_p): Use the iv mem_type field as the type
21549 of the addressed memory.
21550 (add_autoinc_candidates): Likewise.
21551 (get_address_cost): Likewise.
21552 (split_small_address_groups_p): Use address_p.
21553 (split_address_groups): Likewise.
21554 (add_iv_candidate_for_use): Likewise.
21555 (autoinc_possible_for_pair): Likewise.
21556 (rewrite_groups): Likewise.
21557 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21558 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21559 (get_alias_ptr_type_for_ptr_address): New function.
21560 (rewrite_use_address): Rewrite address uses in calls that were
21561 identified by find_address_like_use.
21563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21564 Alan Hayward <alan.hayward@arm.com>
21565 David Sherwood <david.sherwood@arm.com>
21567 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21569 * gimple-expr.h (is_gimple_addressable: Likewise.
21570 * gimple-expr.c (is_gimple_address): Likewise.
21571 * internal-fn.c (expand_call_mem_ref): New function.
21572 (expand_mask_load_optab_fn): Use it.
21573 (expand_mask_store_optab_fn): Likewise.
21575 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21576 Alan Hayward <alan.hayward@arm.com>
21577 David Sherwood <david.sherwood@arm.com>
21579 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21580 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21581 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21582 (cond_umax@var{mode}): Document.
21583 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21584 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21585 (cond_umin_optab, cond_umax_optab): New optabs.
21586 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21587 (COND_IOR, COND_XOR): New internal functions.
21588 * internal-fn.h (get_conditional_internal_fn): Declare.
21589 * internal-fn.c (cond_binary_direct): New macro.
21590 (expand_cond_binary_optab_fn): Likewise.
21591 (direct_cond_binary_optab_supported_p): Likewise.
21592 (get_conditional_internal_fn): New function.
21593 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21594 Cope with reduction statements that are vectorized as calls rather
21596 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21597 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21598 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21599 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21600 (UNSPEC_COND_EOR): New unspecs.
21601 (optab): Add mappings for them.
21602 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21603 (sve_int_op, sve_fp_op): New int attributes.
21605 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21606 Alan Hayward <alan.hayward@arm.com>
21607 David Sherwood <david.sherwood@arm.com>
21609 * optabs.def (while_ult_optab): New optab.
21610 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21611 * internal-fn.def (WHILE_ULT): New internal function.
21612 * internal-fn.h (direct_internal_fn_supported_p): New override
21613 that takes two types as argument.
21614 * internal-fn.c (while_direct): New macro.
21615 (expand_while_optab_fn): New function.
21616 (convert_optab_supported_p): Likewise.
21617 (direct_while_optab_supported_p): New macro.
21618 * wide-int.h (wi::udiv_ceil): New function.
21619 * tree-vectorizer.h (rgroup_masks): New structure.
21620 (vec_loop_masks): New typedef.
21621 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21622 and fully_masked_p.
21623 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21624 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21625 (vect_max_vf): New function.
21626 (slpeel_make_loop_iterate_ntimes): Delete.
21627 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21628 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21629 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21630 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21631 internal-fn.h, stor-layout.h and optabs-query.h.
21632 (vect_set_loop_mask): New function.
21633 (add_preheader_seq): Likewise.
21634 (add_header_seq): Likewise.
21635 (interleave_supported_p): Likewise.
21636 (vect_maybe_permute_loop_masks): Likewise.
21637 (vect_set_loop_masks_directly): Likewise.
21638 (vect_set_loop_condition_masked): Likewise.
21639 (vect_set_loop_condition_unmasked): New function, split out from
21640 slpeel_make_loop_iterate_ntimes.
21641 (slpeel_make_loop_iterate_ntimes): Rename to..
21642 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21643 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21644 (vect_do_peeling): Update call accordingly.
21645 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21647 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21648 mask_compare_type, can_fully_mask_p and fully_masked_p.
21649 (release_vec_loop_masks): New function.
21650 (_loop_vec_info): Use it to free the loop masks.
21651 (can_produce_all_loop_masks_p): New function.
21652 (vect_get_max_nscalars_per_iter): Likewise.
21653 (vect_verify_full_masking): Likewise.
21654 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21655 retries, and free the mask rgroups before retrying. Check loop-wide
21656 reasons for disallowing fully-masked loops. Make the final decision
21657 about whether use a fully-masked loop or not.
21658 (vect_estimate_min_profitable_iters): Do not assume that peeling
21659 for the number of iterations will be needed for fully-masked loops.
21660 (vectorizable_reduction): Disable fully-masked loops.
21661 (vectorizable_live_operation): Likewise.
21662 (vect_halve_mask_nunits): New function.
21663 (vect_double_mask_nunits): Likewise.
21664 (vect_record_loop_mask): Likewise.
21665 (vect_get_loop_mask): Likewise.
21666 (vect_transform_loop): Handle the case in which the final loop
21667 iteration might handle a partial vector. Call vect_set_loop_condition
21668 instead of slpeel_make_loop_iterate_ntimes.
21669 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21670 (check_load_store_masking): New function.
21671 (prepare_load_store_mask): Likewise.
21672 (vectorizable_store): Handle fully-masked loops.
21673 (vectorizable_load): Likewise.
21674 (supportable_widening_operation): Use vect_halve_mask_nunits for
21676 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21677 (vect_gen_while): New function.
21678 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21679 (aarch64_uqdec<mode>): New insn.
21681 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21682 Alan Hayward <alan.hayward@arm.com>
21683 David Sherwood <david.sherwood@arm.com>
21685 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21686 (reduc_xor_scal_optab): New optabs.
21687 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21688 (reduc_xor_scal_@var{m}): Document.
21689 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21690 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21691 internal functions.
21692 * fold-const-call.c (fold_const_call): Handle them.
21693 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21694 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21695 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21696 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21697 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21698 (UNSPEC_XORV): New unspecs.
21699 (optab): Add entries for them.
21700 (BITWISEV): New int iterator.
21701 (bit_reduc_op): New int attributes.
21703 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21704 Alan Hayward <alan.hayward@arm.com>
21705 David Sherwood <david.sherwood@arm.com>
21707 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21708 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21709 * optabs.def (vec_shl_insert_optab): New optab.
21710 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21711 (duplicate_and_interleave): Likewise.
21712 * tree-vect-loop.c: Include internal-fn.h.
21713 (neutral_op_for_slp_reduction): New function, split out from
21714 get_initial_defs_for_reduction.
21715 (get_initial_def_for_reduction): Handle option 2 for variable-length
21716 vectors by loading the neutral value into a vector and then shifting
21717 the initial value into element 0.
21718 (get_initial_defs_for_reduction): Replace the code argument with
21719 the neutral value calculated by neutral_op_for_slp_reduction.
21720 Use gimple_build_vector for constant-length vectors.
21721 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21722 but the first group_size elements have a neutral value.
21723 Use duplicate_and_interleave otherwise.
21724 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21725 Update call to get_initial_defs_for_reduction. Handle SLP
21726 reductions for variable-length vectors by creating one vector
21727 result for each scalar result, with the elements associated
21728 with other scalar results stubbed out with the neutral value.
21729 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21730 Require IFN_VEC_SHL_INSERT for double reductions on
21731 variable-length vectors, or SLP reductions that have
21732 a neutral value. Require can_duplicate_and_interleave_p
21733 support for variable-length unchained SLP reductions if there
21734 is no neutral value, such as for MIN/MAX reductions. Also require
21735 the number of vector elements to be a multiple of the number of
21736 SLP statements when doing variable-length unchained SLP reductions.
21737 Update call to vect_create_epilog_for_reduction.
21738 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21739 and remove initial values.
21740 (duplicate_and_interleave): Make public.
21741 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21742 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21745 Alan Hayward <alan.hayward@arm.com>
21746 David Sherwood <david.sherwood@arm.com>
21748 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21749 (can_duplicate_and_interleave_p): New function.
21750 (vect_get_and_check_slp_defs): Take the vector of statements
21751 rather than just the current one. Remove excess parentheses.
21752 Restriction rejectinon of vect_constant_def and vect_external_def
21753 for variable-length vectors to boolean types, or types for which
21754 can_duplicate_and_interleave_p is false.
21755 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21756 (duplicate_and_interleave): New function.
21757 (vect_get_constant_vectors): Use gimple_build_vector for
21758 constant-length vectors and suitable variable-length constant
21759 vectors. Use duplicate_and_interleave for other variable-length
21760 vectors. Don't defer the update when inserting new statements.
21762 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21763 Alan Hayward <alan.hayward@arm.com>
21764 David Sherwood <david.sherwood@arm.com>
21766 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21767 min_profitable_iters doesn't go negative.
21769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21770 Alan Hayward <alan.hayward@arm.com>
21771 David Sherwood <david.sherwood@arm.com>
21773 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21774 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21775 * optabs.def (vec_mask_load_lanes_optab): New optab.
21776 (vec_mask_store_lanes_optab): Likewise.
21777 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21778 (MASK_STORE_LANES): Likewise.
21779 * internal-fn.c (mask_load_lanes_direct): New macro.
21780 (mask_store_lanes_direct): Likewise.
21781 (expand_mask_load_optab_fn): Handle masked operations.
21782 (expand_mask_load_lanes_optab_fn): New macro.
21783 (expand_mask_store_optab_fn): Handle masked operations.
21784 (expand_mask_store_lanes_optab_fn): New macro.
21785 (direct_mask_load_lanes_optab_supported_p): Likewise.
21786 (direct_mask_store_lanes_optab_supported_p): Likewise.
21787 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21789 (vect_load_lanes_supported): Likewise.
21790 * tree-vect-data-refs.c (strip_conversion): New function.
21791 (can_group_stmts_p): Likewise.
21792 (vect_analyze_data_ref_accesses): Use it instead of checking
21793 for a pair of assignments.
21794 (vect_store_lanes_supported): Take a masked_p parameter.
21795 (vect_load_lanes_supported): Likewise.
21796 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21797 vect_store_lanes_supported and vect_load_lanes_supported.
21798 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21799 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21800 parameter. Don't allow gaps for masked accesses.
21801 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21802 and vect_load_lanes_supported.
21803 (get_load_store_type): Take a masked_p parameter and update
21804 call to get_group_load_store_type.
21805 (vectorizable_store): Update call to get_load_store_type.
21806 Handle IFN_MASK_STORE_LANES.
21807 (vectorizable_load): Update call to get_load_store_type.
21808 Handle IFN_MASK_LOAD_LANES.
21810 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21811 Alan Hayward <alan.hayward@arm.com>
21812 David Sherwood <david.sherwood@arm.com>
21814 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21816 * config/aarch64/aarch64-protos.h
21817 (aarch64_sve_struct_memory_operand_p): Declare.
21818 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21819 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21820 (VPRED, vpred): Handle SVE structure modes.
21821 * config/aarch64/constraints.md (Utx): New constraint.
21822 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21823 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21824 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21825 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21826 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21827 structure modes. Split into pieces after RA.
21828 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21829 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21831 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21832 SVE structure modes.
21833 (aarch64_classify_address): Likewise.
21834 (sizetochar): Move earlier in file.
21835 (aarch64_print_operand): Handle SVE register lists.
21836 (aarch64_array_mode): New function.
21837 (aarch64_sve_struct_memory_operand_p): Likewise.
21838 (TARGET_ARRAY_MODE): Redefine.
21840 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21841 Alan Hayward <alan.hayward@arm.com>
21842 David Sherwood <david.sherwood@arm.com>
21844 * target.def (array_mode): New target hook.
21845 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21846 * doc/tm.texi: Regenerate.
21847 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21848 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21849 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21850 targetm.array_mode.
21851 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21855 Alan Hayward <alan.hayward@arm.com>
21856 David Sherwood <david.sherwood@arm.com>
21858 * fold-const.c (fold_binary_loc): Check the argument types
21859 rather than the result type when testing for a vector operation.
21861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21863 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21864 * doc/tm.texi: Regenerate.
21866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21867 Alan Hayward <alan.hayward@arm.com>
21868 David Sherwood <david.sherwood@arm.com>
21870 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21871 (sve): Document new AArch64 extension.
21872 * doc/md.texi (w): Extend the description of the AArch64
21873 constraint to include SVE vectors.
21874 (Upl, Upa): Document new AArch64 predicate constraints.
21875 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21877 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21878 (msve-vector-bits=): New option.
21879 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21880 SVE when these are disabled.
21881 (sve): New extension.
21882 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21883 modes. Adjust their number of units based on aarch64_sve_vg.
21884 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21885 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21886 aarch64_addr_query_type.
21887 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21888 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21889 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21890 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21891 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21892 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21893 (aarch64_simd_imm_zero_p): Delete.
21894 (aarch64_check_zero_based_sve_index_immediate): Declare.
21895 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21896 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21897 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21898 (aarch64_sve_float_mul_immediate_p): Likewise.
21899 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21900 rather than an rtx.
21901 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21902 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21903 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21904 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21905 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21906 (aarch64_regmode_natural_size): Likewise.
21907 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21908 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21910 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21911 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21912 for VG and the SVE predicate registers.
21913 (V_ALIASES): Add a "z"-prefixed alias.
21914 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21915 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21916 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21917 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21918 (REG_CLASS_NAMES): Add entries for them.
21919 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21920 and the predicate registers.
21921 (aarch64_sve_vg): Declare.
21922 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21923 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21924 (REGMODE_NATURAL_SIZE): Define.
21925 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21927 * config/aarch64/aarch64.c: Include cfgrtl.h.
21928 (simd_immediate_info): Add a constructor for series vectors,
21929 and an associated step field.
21930 (aarch64_sve_vg): New variable.
21931 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21932 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21933 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21934 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21935 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21936 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21937 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21938 (aarch64_get_mask_mode): New functions.
21939 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21940 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21941 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21942 predicate modes and predicate registers. Explicitly restrict
21943 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21944 to store a vector mode if it is recognized by
21945 aarch64_classify_vector_mode.
21946 (aarch64_regmode_natural_size): New function.
21947 (aarch64_hard_regno_caller_save_mode): Return the original mode
21949 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21950 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21951 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21952 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21954 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21955 does not overlap dest if the function is frame-related. Handle
21957 (aarch64_split_add_offset): New function.
21958 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21959 them aarch64_add_offset.
21960 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21961 and update call to aarch64_sub_sp.
21962 (aarch64_add_cfa_expression): New function.
21963 (aarch64_expand_prologue): Pass extra temporary registers to the
21964 functions above. Handle the case in which we need to emit new
21965 DW_CFA_expressions for registers that were originally saved
21966 relative to the stack pointer, but now have to be expressed
21967 relative to the frame pointer.
21968 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21970 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21971 IP0 and IP1 values for SVE frames.
21972 (aarch64_expand_vec_series): New function.
21973 (aarch64_expand_sve_widened_duplicate): Likewise.
21974 (aarch64_expand_sve_const_vector): Likewise.
21975 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21976 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21977 into the register, rather than emitting a SET directly.
21978 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21979 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21980 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21981 (offset_9bit_signed_scaled_p): New functions.
21982 (aarch64_replicate_bitmask_imm): New function.
21983 (aarch64_bitmask_imm): Use it.
21984 (aarch64_cannot_force_const_mem): Reject expressions involving
21985 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21986 (aarch64_classify_index): Handle SVE indices, by requiring
21987 a plain register index with a scale that matches the element size.
21988 (aarch64_classify_address): Handle SVE addresses. Assert that
21989 the mode of the address is VOIDmode or an integer mode.
21990 Update call to aarch64_classify_symbol.
21991 (aarch64_classify_symbolic_expression): Update call to
21992 aarch64_classify_symbol.
21993 (aarch64_const_vec_all_in_range_p): New function.
21994 (aarch64_print_vector_float_operand): Likewise.
21995 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21996 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21997 and the FP immediates 1.0 and 0.5.
21998 (aarch64_print_address_internal): Handle SVE addresses.
21999 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22000 (aarch64_regno_regclass): Handle predicate registers.
22001 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22003 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22004 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22005 (aarch64_convert_sve_vector_bits): New function.
22006 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22007 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22008 rather than an rtx.
22009 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22010 Handle SVE vector and predicate modes. Accept VL-based constants
22011 that need only one temporary register, and VL offsets that require
22012 no temporary registers.
22013 (aarch64_conditional_register_usage): Mark the predicate registers
22014 as fixed if SVE isn't available.
22015 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22016 Return true for SVE vector and predicate modes.
22017 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22018 rather than an unsigned int. Handle SVE modes.
22019 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22021 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22023 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22024 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22025 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22026 (aarch64_sve_float_mul_immediate_p): New functions.
22027 (aarch64_sve_valid_immediate): New function.
22028 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22029 Explicitly reject structure modes. Check for INDEX constants.
22030 Handle PTRUE and PFALSE constants.
22031 (aarch64_check_zero_based_sve_index_immediate): New function.
22032 (aarch64_simd_imm_zero_p): Delete.
22033 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22034 vector modes. Accept constants in the range of CNT[BHWD].
22035 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22036 ask for an Advanced SIMD mode.
22037 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22038 (aarch64_simd_vector_alignment): Handle SVE predicates.
22039 (aarch64_vectorize_preferred_vector_alignment): New function.
22040 (aarch64_simd_vector_alignment_reachable): Use it instead of
22042 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22043 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22045 (MAX_VECT_LEN): Delete.
22046 (expand_vec_perm_d): Add a vec_flags field.
22047 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22048 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22049 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22051 (aarch64_evpc_rev): Rename to...
22052 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22053 (aarch64_evpc_rev_global): New function.
22054 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22055 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22057 (aarch64_evpc_sve_tbl): New function.
22058 (aarch64_expand_vec_perm_const_1): Update after rename of
22059 aarch64_evpc_rev. Handle SVE permutes too, trying
22060 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22061 than aarch64_evpc_tbl.
22062 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22063 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22064 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22065 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22066 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22067 (aarch64_expand_sve_vcond): New functions.
22068 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22069 of aarch64_vector_mode_p.
22070 (aarch64_dwarf_poly_indeterminate_value): New function.
22071 (aarch64_compute_pressure_classes): Likewise.
22072 (aarch64_can_change_mode_class): Likewise.
22073 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22074 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22075 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22076 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22077 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22078 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22079 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22080 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22082 (Dn, Dl, Dr): Accept const as well as const_vector.
22083 (Dz): Likewise. Compare against CONST0_RTX.
22084 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22085 of "vector" where appropriate.
22086 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22087 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22088 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22089 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22090 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22091 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22092 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22093 (v_int_equiv): Extend to SVE modes.
22094 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22096 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22097 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22098 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22099 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22100 (SVE_COND_FP_CMP): New int iterators.
22101 (perm_hilo): Handle the new unpack unspecs.
22102 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22104 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22105 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22106 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22107 (aarch64_equality_operator, aarch64_constant_vector_operand)
22108 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22109 (aarch64_sve_nonimmediate_operand): Likewise.
22110 (aarch64_sve_general_operand): Likewise.
22111 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22112 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22113 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22114 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22115 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22116 (aarch64_sve_float_arith_immediate): Likewise.
22117 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22118 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22119 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22120 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22121 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22122 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22123 (aarch64_sve_float_arith_operand): Likewise.
22124 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22125 (aarch64_sve_float_mul_operand): Likewise.
22126 (aarch64_sve_vec_perm_operand): Likewise.
22127 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22128 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22129 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22130 as well as const_vector.
22131 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22132 in file. Use CONST0_RTX and CONSTM1_RTX.
22133 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22134 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22135 Use aarch64_simd_imm_zero.
22136 * config/aarch64/aarch64-sve.md: New file.
22137 * config/aarch64/aarch64.md: Include it.
22138 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22139 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22140 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22141 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22142 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22143 (sve): New attribute.
22144 (enabled): Disable instructions with the sve attribute unless
22146 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22147 aarch64_expand_mov_immediate.
22148 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22149 CNT[BHSD] immediates.
22150 (movti): Split CONST_POLY_INT moves into two halves.
22151 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22152 Split additions that need a temporary here if the destination
22153 is the stack pointer.
22154 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22155 (*add<mode>3_poly_1): New instruction.
22156 (set_clobber_cc): New expander.
22158 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22160 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22161 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22162 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22163 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22164 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22165 Change innermode from fixed_mode_size to machine_mode.
22166 (simplify_subreg): Update call accordingly. Handle a constant-sized
22167 subreg of a variable-length CONST_VECTOR.
22169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22170 Alan Hayward <alan.hayward@arm.com>
22171 David Sherwood <david.sherwood@arm.com>
22173 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22174 (add_offset_to_base): New function, split out from...
22175 (create_mem_ref): ...here. When handling a scale other than 1,
22176 check first whether the address is valid without the offset.
22177 Add it into the base if so, leaving the index and scale as-is.
22179 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22182 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22183 fold_for_warn before checking if arg2 is INTEGER_CST.
22185 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22187 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22188 (store_multiple_operation): Delete.
22189 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22190 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22191 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22192 guarded by TARGET_STRING.
22193 (rs6000_output_load_multiple): Delete.
22194 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22195 OPTION_MASK_STRING / TARGET_STRING handling.
22196 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22197 (const rs6000_opt_masks) <"string">: Change mask to 0.
22198 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22199 (MASK_STRING): Delete.
22200 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22202 (load_multiple): Delete.
22209 (store_multiple): Delete.
22216 (movmemsi_8reg): Delete.
22217 (corresponding unnamed define_insn): Delete.
22218 (movmemsi_6reg): Delete.
22219 (corresponding unnamed define_insn): Delete.
22220 (movmemsi_4reg): Delete.
22221 (corresponding unnamed define_insn): Delete.
22222 (movmemsi_2reg): Delete.
22223 (corresponding unnamed define_insn): Delete.
22224 (movmemsi_1reg): Delete.
22225 (corresponding unnamed define_insn): Delete.
22226 * config/rs6000/rs6000.opt (mno-string): New.
22227 (mstring): Replace by deprecation warning stub.
22228 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22230 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22232 * regrename.c (regrename_do_replace): If replacing the same
22233 reg multiple times, try to reuse last created gen_raw_REG.
22236 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22237 main to workaround a bug in GDB.
22239 2018-01-12 Tom de Vries <tom@codesourcery.com>
22242 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22244 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22246 PR rtl-optimization/80481
22247 * ira-color.c (get_cap_member): New function.
22248 (allocnos_conflict_by_live_ranges_p): Use it.
22249 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22250 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22252 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22255 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22256 (*saddl_se_1): Ditto.
22257 (*ssubsi_1): Ditto.
22258 (*ssubl_se_1): Ditto.
22260 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22262 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22263 rather than wi::to_widest for DR_INITs.
22264 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22265 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22266 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22268 (vect_analyze_group_access_1): Note that here.
22270 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22272 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22273 polynomial type sizes.
22275 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22277 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22278 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22279 (gimple_add_tmp_var): Likewise.
22281 2018-01-12 Martin Liska <mliska@suse.cz>
22283 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22284 (gimple_alloc_sizes): Likewise.
22285 (dump_gimple_statistics): Use PRIu64 in printf format.
22286 * gimple.h: Change uint64_t to int.
22288 2018-01-12 Martin Liska <mliska@suse.cz>
22290 * tree-core.h: Use uint64_t instead of int.
22291 * tree.c (tree_node_counts): Likewise.
22292 (tree_node_sizes): Likewise.
22293 (dump_tree_statistics): Use PRIu64 in printf format.
22295 2018-01-12 Martin Liska <mliska@suse.cz>
22297 * Makefile.in: As qsort_chk is implemented in vec.c, add
22298 vec.o to linkage of gencfn-macros.
22299 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22300 passing the info to record_node_allocation_statistics.
22301 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22303 * ggc-common.c (struct ggc_usage): Add operator== and use
22304 it in operator< and compare function.
22305 * mem-stats.h (struct mem_usage): Likewise.
22306 * vec.c (struct vec_usage): Remove operator< and compare
22307 function. Can be simply inherited.
22309 2018-01-12 Martin Jambor <mjambor@suse.cz>
22312 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22313 * tree-ssa-math-opts.c: Include domwalk.h.
22314 (convert_mult_to_fma_1): New function.
22315 (fma_transformation_info): New type.
22316 (fma_deferring_state): Likewise.
22317 (cancel_fma_deferring): New function.
22318 (result_of_phi): Likewise.
22319 (last_fma_candidate_feeds_initial_phi): Likewise.
22320 (convert_mult_to_fma): Added deferring logic, split actual
22321 transformation to convert_mult_to_fma_1.
22322 (math_opts_dom_walker): New type.
22323 (math_opts_dom_walker::after_dom_children): New method, body moved
22324 here from pass_optimize_widening_mul::execute, added deferring logic
22326 (pass_optimize_widening_mul::execute): Moved most of code to
22327 math_opts_dom_walker::after_dom_children.
22328 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22329 * config/i386/i386.c (ix86_option_override_internal): Added
22330 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22332 2018-01-12 Richard Biener <rguenther@suse.de>
22335 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22336 inline instance vars.
22338 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22341 * config/rx/rx.c (rx_is_restricted_memory_address):
22342 Handle SUBREG case.
22344 2018-01-12 Richard Biener <rguenther@suse.de>
22346 PR tree-optimization/80846
22347 * target.def (split_reduction): New target hook.
22348 * targhooks.c (default_split_reduction): New function.
22349 * targhooks.h (default_split_reduction): Declare.
22350 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22351 target requests first reduce vectors by combining low and high
22353 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22354 (get_vectype_for_scalar_type_and_size): Export.
22355 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22356 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22357 * doc/tm.texi: Regenerate.
22358 * config/i386/i386.c (ix86_split_reduction): Implement
22359 TARGET_VECTORIZE_SPLIT_REDUCTION.
22361 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22364 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22365 in PIC mode except for TARGET_VXWORKS_RTP.
22366 * config/sparc/sparc.c: Include cfgrtl.h.
22367 (TARGET_INIT_PIC_REG): Define.
22368 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22369 (sparc_pic_register_p): New predicate.
22370 (sparc_legitimate_address_p): Use it.
22371 (sparc_legitimize_pic_address): Likewise.
22372 (sparc_delegitimize_address): Likewise.
22373 (sparc_mode_dependent_address_p): Likewise.
22374 (gen_load_pcrel_sym): Remove 4th parameter.
22375 (load_got_register): Adjust call to above. Remove obsolete stuff.
22376 (sparc_expand_prologue): Do not call load_got_register here.
22377 (sparc_flat_expand_prologue): Likewise.
22378 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22379 (sparc_use_pseudo_pic_reg): New function.
22380 (sparc_init_pic_reg): Likewise.
22381 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22382 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22384 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22386 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22387 Add item for branch_cost.
22389 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22391 PR rtl-optimization/83565
22392 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22393 not extend the result to a larger mode for rotate operations.
22394 (num_sign_bit_copies1): Likewise.
22396 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22399 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22401 Use values-Xc.o for -pedantic.
22402 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22404 2018-01-12 Martin Liska <mliska@suse.cz>
22407 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22409 (possible_polymorphic_call_targets): Use it.
22410 (ipa_devirt): Likewise.
22412 2018-01-12 Martin Liska <mliska@suse.cz>
22414 * profile-count.h (enum profile_quality): Use 0 as invalid
22415 enum value of profile_quality.
22417 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22419 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22420 -mext-string options.
22422 2018-01-12 Richard Biener <rguenther@suse.de>
22424 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22425 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22426 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22428 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22430 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22432 * configure.ac (--with-long-double-format): Add support for the
22433 configuration option to change the default long double format on
22435 * config.gcc (powerpc*-linux*-*): Likewise.
22436 * configure: Regenerate.
22437 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22438 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22439 used without modification.
22441 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22443 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22444 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22445 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22446 MISC_BUILTIN_SPEC_BARRIER.
22447 (rs6000_init_builtins): Likewise.
22448 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22450 (speculation_barrier): New define_insn.
22451 * doc/extend.texi: Document __builtin_speculation_barrier.
22453 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22456 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22457 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22458 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22460 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22461 integral modes instead of "ss" and "sd".
22462 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22463 vectors with 32-bit and 64-bit elements.
22464 (vecdupssescalarmodesuffix): New mode attribute.
22465 (vec_dup<mode>): Use it.
22467 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22470 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22471 frame if argument is passed on stack.
22473 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22476 * ree.c (combine_reaching_defs): Optimize also
22477 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22478 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22480 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22482 PR middle-end/83189
22483 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22485 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22487 PR middle-end/83718
22488 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22489 after they are computed.
22491 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22493 PR tree-optimization/83695
22494 * gimple-loop-linterchange.cc
22495 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22496 reset cached scev information after interchange.
22497 (pass_linterchange::execute): Remove call to scev_reset_htab.
22499 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22501 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22502 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22503 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22504 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22505 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22506 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22507 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22508 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22509 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22510 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22511 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22512 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22513 (V_lane_reg): Likewise.
22514 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22516 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22517 (vfmal_lane_low<mode>_intrinsic,
22518 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22519 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22520 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22521 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22522 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22523 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22525 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22527 * config/arm/arm-cpus.in (fp16fml): New feature.
22528 (ALL_SIMD): Add fp16fml.
22529 (armv8.2-a): Add fp16fml as an option.
22530 (armv8.3-a): Likewise.
22531 (armv8.4-a): Add fp16fml as part of fp16.
22532 * config/arm/arm.h (TARGET_FP16FML): Define.
22533 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22535 * config/arm/arm-modes.def (V2HF): Define.
22536 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22537 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22538 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22539 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22540 vfmsl_low, vfmsl_high): New set of builtins.
22541 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22542 (vfml_op): New code attribute.
22543 (VFMLHALVES): New int iterator.
22544 (VFML, VFMLSEL): New mode attributes.
22545 (V_reg): Define mapping for V2HF.
22546 (V_hi, V_lo): New mode attributes.
22547 (VF_constraint): Likewise.
22548 (vfml_half, vfml_half_selector): New int attributes.
22549 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22551 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22552 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22554 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22555 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22556 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22557 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22559 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22560 Document new effective target and option set.
22562 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22564 * config/arm/arm-cpus.in (armv8_4): New feature.
22565 (ARMv8_4a): New fgroup.
22566 (armv8.4-a): New arch.
22567 * config/arm/arm-tables.opt: Regenerate.
22568 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22569 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22570 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22571 Add matching rules for -march=armv8.4-a and extensions.
22572 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22574 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22577 * config/rx/rx.md (BW): New mode attribute.
22578 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22580 2018-01-11 Richard Biener <rguenther@suse.de>
22582 PR tree-optimization/83435
22583 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22584 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22585 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22587 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22588 Alan Hayward <alan.hayward@arm.com>
22589 David Sherwood <david.sherwood@arm.com>
22591 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22593 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22594 (aarch64_print_address_internal): Use it to check for a zero offset.
22596 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22597 Alan Hayward <alan.hayward@arm.com>
22598 David Sherwood <david.sherwood@arm.com>
22600 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22601 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22602 Return a poly_int64 rather than a HOST_WIDE_INT.
22603 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22604 rather than a HOST_WIDE_INT.
22605 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22606 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22607 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22608 final_offset from HOST_WIDE_INT to poly_int64.
22609 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22610 to_constant when getting the number of units in an Advanced SIMD
22612 (aarch64_builtin_vectorized_function): Check for a constant number
22614 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22616 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22617 attribute instead of GET_MODE_NUNITS.
22618 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22619 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22620 GET_MODE_SIZE for fixed-size registers.
22621 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22622 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22623 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22624 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22625 (aarch64_print_operand, aarch64_print_address_internal)
22626 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22627 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22628 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22629 Handle polynomial GET_MODE_SIZE.
22630 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22631 wider than SImode without modification.
22632 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22633 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22634 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22635 passing and returning SVE modes.
22636 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22637 rather than GEN_INT.
22638 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22639 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22640 (aarch64_allocate_and_probe_stack_space): Likewise.
22641 (aarch64_layout_frame): Cope with polynomial offsets.
22642 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22643 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22644 polynomial offsets.
22645 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22646 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22647 poly_int64 rather than a HOST_WIDE_INT.
22648 (aarch64_get_separate_components, aarch64_process_components)
22649 (aarch64_expand_prologue, aarch64_expand_epilogue)
22650 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22651 (aarch64_anchor_offset): New function, split out from...
22652 (aarch64_legitimize_address): ...here.
22653 (aarch64_builtin_vectorization_cost): Handle polynomial
22654 TYPE_VECTOR_SUBPARTS.
22655 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22657 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22658 number of elements from the PARALLEL rather than the mode.
22659 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22660 rather than GET_MODE_BITSIZE.
22661 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22662 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22663 (aarch64_expand_vec_perm_const_1): Handle polynomial
22664 d->perm.length () and d->perm elements.
22665 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22666 Apply to_constant to d->perm elements.
22667 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22668 polynomial CONST_VECTOR_NUNITS.
22669 (aarch64_move_pointer): Take amount as a poly_int64 rather
22671 (aarch64_progress_pointer): Avoid temporary variable.
22672 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22673 the mode attribute instead of GET_MODE.
22675 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22676 Alan Hayward <alan.hayward@arm.com>
22677 David Sherwood <david.sherwood@arm.com>
22679 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22680 x exists before using it.
22681 (aarch64_add_constant_internal): Rename to...
22682 (aarch64_add_offset_1): ...this. Replace regnum with separate
22683 src and dest rtxes. Handle the case in which they're different,
22684 including when the offset is zero. Replace scratchreg with an rtx.
22685 Use 2 additions if there is no spare register into which we can
22686 move a 16-bit constant.
22687 (aarch64_add_constant): Delete.
22688 (aarch64_add_offset): Replace reg with separate src and dest
22689 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22690 Use aarch64_add_offset_1.
22691 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22692 an rtx rather than an int. Take the delta as a poly_int64
22693 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22694 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22695 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22696 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22697 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22698 and aarch64_add_sp.
22699 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22700 aarch64_add_constant.
22702 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22704 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22705 Use scalar_float_mode.
22707 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22709 * config/aarch64/aarch64-simd.md
22710 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22711 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22712 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22713 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22714 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22715 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22716 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22717 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22718 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22719 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22721 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22724 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22725 targ_options->x_arm_arch_string is non NULL.
22727 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22729 * config/aarch64/aarch64.h
22730 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22732 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22735 * expmed.c (emit_store_flag_force): Swap if const op0
22736 and change VOIDmode to mode of op0.
22738 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22740 PR rtl-optimization/83761
22741 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22742 than bytes to mode_for_size.
22744 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22746 PR middle-end/83189
22747 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22748 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22751 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22753 PR middle-end/83575
22754 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22755 when in layout mode.
22756 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22757 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22760 2018-01-10 Michael Collison <michael.collison@arm.com>
22762 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22763 * config/aarch64/aarch64-option-extension.def: Add
22764 AARCH64_OPT_EXTENSION of 'fp16fml'.
22765 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22766 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22767 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22768 * config/aarch64/constraints.md (Ui7): New constraint.
22769 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22770 (VFMLA_SEL_W): Ditto.
22773 (VFMLA16_LOW): New int iterator.
22774 (VFMLA16_HIGH): Ditto.
22775 (UNSPEC_FMLAL): New unspec.
22776 (UNSPEC_FMLSL): Ditto.
22777 (UNSPEC_FMLAL2): Ditto.
22778 (UNSPEC_FMLSL2): Ditto.
22779 (f16mac): New code attribute.
22780 * config/aarch64/aarch64-simd-builtins.def
22781 (aarch64_fmlal_lowv2sf): Ditto.
22782 (aarch64_fmlsl_lowv2sf): Ditto.
22783 (aarch64_fmlalq_lowv4sf): Ditto.
22784 (aarch64_fmlslq_lowv4sf): Ditto.
22785 (aarch64_fmlal_highv2sf): Ditto.
22786 (aarch64_fmlsl_highv2sf): Ditto.
22787 (aarch64_fmlalq_highv4sf): Ditto.
22788 (aarch64_fmlslq_highv4sf): Ditto.
22789 (aarch64_fmlal_lane_lowv2sf): Ditto.
22790 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22791 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22792 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22793 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22794 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22795 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22796 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22797 (aarch64_fmlal_lane_highv2sf): Ditto.
22798 (aarch64_fmlsl_lane_highv2sf): Ditto.
22799 (aarch64_fmlal_laneq_highv2sf): Ditto.
22800 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22801 (aarch64_fmlalq_lane_highv4sf): Ditto.
22802 (aarch64_fmlsl_lane_highv4sf): Ditto.
22803 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22804 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22805 * config/aarch64/aarch64-simd.md:
22806 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22807 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22808 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22809 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22810 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22811 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22812 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22813 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22814 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22815 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22816 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22817 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22818 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22819 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22820 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22821 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22822 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22823 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22824 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22825 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22826 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22827 (vfmlsl_low_u32): Ditto.
22828 (vfmlalq_low_u32): Ditto.
22829 (vfmlslq_low_u32): Ditto.
22830 (vfmlal_high_u32): Ditto.
22831 (vfmlsl_high_u32): Ditto.
22832 (vfmlalq_high_u32): Ditto.
22833 (vfmlslq_high_u32): Ditto.
22834 (vfmlal_lane_low_u32): Ditto.
22835 (vfmlsl_lane_low_u32): Ditto.
22836 (vfmlal_laneq_low_u32): Ditto.
22837 (vfmlsl_laneq_low_u32): Ditto.
22838 (vfmlalq_lane_low_u32): Ditto.
22839 (vfmlslq_lane_low_u32): Ditto.
22840 (vfmlalq_laneq_low_u32): Ditto.
22841 (vfmlslq_laneq_low_u32): Ditto.
22842 (vfmlal_lane_high_u32): Ditto.
22843 (vfmlsl_lane_high_u32): Ditto.
22844 (vfmlal_laneq_high_u32): Ditto.
22845 (vfmlsl_laneq_high_u32): Ditto.
22846 (vfmlalq_lane_high_u32): Ditto.
22847 (vfmlslq_lane_high_u32): Ditto.
22848 (vfmlalq_laneq_high_u32): Ditto.
22849 (vfmlslq_laneq_high_u32): Ditto.
22850 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22851 (AARCH64_FL_FOR_ARCH8_4): New.
22852 (AARCH64_ISA_F16FML): New ISA flag.
22853 (TARGET_F16FML): New feature flag for fp16fml.
22854 (doc/invoke.texi): Document new fp16fml option.
22856 2018-01-10 Michael Collison <michael.collison@arm.com>
22858 * config/aarch64/aarch64-builtins.c:
22859 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22860 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22861 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22862 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22863 (AARCH64_ISA_SHA3): New ISA flag.
22864 (TARGET_SHA3): New feature flag for sha3.
22865 * config/aarch64/iterators.md (sha512_op): New int attribute.
22866 (CRYPTO_SHA512): New int iterator.
22867 (UNSPEC_SHA512H): New unspec.
22868 (UNSPEC_SHA512H2): Ditto.
22869 (UNSPEC_SHA512SU0): Ditto.
22870 (UNSPEC_SHA512SU1): Ditto.
22871 * config/aarch64/aarch64-simd-builtins.def
22872 (aarch64_crypto_sha512hqv2di): New builtin.
22873 (aarch64_crypto_sha512h2qv2di): Ditto.
22874 (aarch64_crypto_sha512su0qv2di): Ditto.
22875 (aarch64_crypto_sha512su1qv2di): Ditto.
22876 (aarch64_eor3qv8hi): Ditto.
22877 (aarch64_rax1qv2di): Ditto.
22878 (aarch64_xarqv2di): Ditto.
22879 (aarch64_bcaxqv8hi): Ditto.
22880 * config/aarch64/aarch64-simd.md:
22881 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22882 (aarch64_crypto_sha512su0qv2di): Ditto.
22883 (aarch64_crypto_sha512su1qv2di): Ditto.
22884 (aarch64_eor3qv8hi): Ditto.
22885 (aarch64_rax1qv2di): Ditto.
22886 (aarch64_xarqv2di): Ditto.
22887 (aarch64_bcaxqv8hi): Ditto.
22888 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22889 (vsha512h2q_u64): Ditto.
22890 (vsha512su0q_u64): Ditto.
22891 (vsha512su1q_u64): Ditto.
22892 (veor3q_u16): Ditto.
22893 (vrax1q_u64): Ditto.
22894 (vxarq_u64): Ditto.
22895 (vbcaxq_u16): Ditto.
22896 * config/arm/types.md (crypto_sha512): New type attribute.
22897 (crypto_sha3): Ditto.
22898 (doc/invoke.texi): Document new sha3 option.
22900 2018-01-10 Michael Collison <michael.collison@arm.com>
22902 * config/aarch64/aarch64-builtins.c:
22903 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22904 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22905 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22906 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22907 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22908 (AARCH64_ISA_SM4): New ISA flag.
22909 (TARGET_SM4): New feature flag for sm4.
22910 * config/aarch64/aarch64-simd-builtins.def
22911 (aarch64_sm3ss1qv4si): Ditto.
22912 (aarch64_sm3tt1aq4si): Ditto.
22913 (aarch64_sm3tt1bq4si): Ditto.
22914 (aarch64_sm3tt2aq4si): Ditto.
22915 (aarch64_sm3tt2bq4si): Ditto.
22916 (aarch64_sm3partw1qv4si): Ditto.
22917 (aarch64_sm3partw2qv4si): Ditto.
22918 (aarch64_sm4eqv4si): Ditto.
22919 (aarch64_sm4ekeyqv4si): Ditto.
22920 * config/aarch64/aarch64-simd.md:
22921 (aarch64_sm3ss1qv4si): Ditto.
22922 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22923 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22924 (aarch64_sm4eqv4si): Ditto.
22925 (aarch64_sm4ekeyqv4si): Ditto.
22926 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22927 (sm3part_op): Ditto.
22928 (CRYPTO_SM3TT): Ditto.
22929 (CRYPTO_SM3PART): Ditto.
22930 (UNSPEC_SM3SS1): New unspec.
22931 (UNSPEC_SM3TT1A): Ditto.
22932 (UNSPEC_SM3TT1B): Ditto.
22933 (UNSPEC_SM3TT2A): Ditto.
22934 (UNSPEC_SM3TT2B): Ditto.
22935 (UNSPEC_SM3PARTW1): Ditto.
22936 (UNSPEC_SM3PARTW2): Ditto.
22937 (UNSPEC_SM4E): Ditto.
22938 (UNSPEC_SM4EKEY): Ditto.
22939 * config/aarch64/constraints.md (Ui2): New constraint.
22940 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22941 * config/arm/types.md (crypto_sm3): New type attribute.
22942 (crypto_sm4): Ditto.
22943 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22944 (vsm3tt1aq_u32): Ditto.
22945 (vsm3tt1bq_u32): Ditto.
22946 (vsm3tt2aq_u32): Ditto.
22947 (vsm3tt2bq_u32): Ditto.
22948 (vsm3partw1q_u32): Ditto.
22949 (vsm3partw2q_u32): Ditto.
22950 (vsm4eq_u32): Ditto.
22951 (vsm4ekeyq_u32): Ditto.
22952 (doc/invoke.texi): Document new sm4 option.
22954 2018-01-10 Michael Collison <michael.collison@arm.com>
22956 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22957 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22958 (AARCH64_FL_FOR_ARCH8_4): New.
22959 (AARCH64_FL_V8_4): New flag.
22960 (doc/invoke.texi): Document new armv8.4-a option.
22962 2018-01-10 Michael Collison <michael.collison@arm.com>
22964 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22965 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22966 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22967 * config/aarch64/aarch64-option-extension.def: Add
22968 AARCH64_OPT_EXTENSION of 'sha2'.
22969 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22970 (crypto): Disable sha2 and aes if crypto disabled.
22971 (crypto): Enable aes and sha2 if enabled.
22972 (simd): Disable sha2 and aes if simd disabled.
22973 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22975 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22976 (TARGET_SHA2): New feature flag for sha2.
22977 (TARGET_AES): New feature flag for aes.
22978 * config/aarch64/aarch64-simd.md:
22979 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22980 conditional on TARGET_AES.
22981 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22982 (aarch64_crypto_sha1hsi): Make pattern conditional
22984 (aarch64_crypto_sha1hv4si): Ditto.
22985 (aarch64_be_crypto_sha1hv4si): Ditto.
22986 (aarch64_crypto_sha1su1v4si): Ditto.
22987 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22988 (aarch64_crypto_sha1su0v4si): Ditto.
22989 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22990 (aarch64_crypto_sha256su0v4si): Ditto.
22991 (aarch64_crypto_sha256su1v4si): Ditto.
22992 (doc/invoke.texi): Document new aes and sha2 options.
22994 2018-01-10 Martin Sebor <msebor@redhat.com>
22996 PR tree-optimization/83781
22997 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23000 2018-01-11 Martin Sebor <msebor@gmail.com>
23001 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23003 PR tree-optimization/83501
23004 PR tree-optimization/81703
23006 * tree-ssa-strlen.c (get_string_cst): Rename...
23007 (get_string_len): ...to this. Handle global constants.
23008 (handle_char_store): Adjust.
23010 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23011 Jim Wilson <jimw@sifive.com>
23013 * config/riscv/riscv-protos.h (riscv_output_return): New.
23014 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23015 (riscv_attribute_table, riscv_output_return),
23016 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23017 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23018 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23020 (riscv_expand_prologue): Add early return for naked function.
23021 (riscv_expand_epilogue): Likewise.
23022 (riscv_function_ok_for_sibcall): Return false for naked function.
23023 (riscv_set_current_function): New.
23024 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23025 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23026 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23027 * doc/extend.texi (RISC-V Function Attributes): New.
23029 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23031 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23032 check for 128-bit long double before checking TCmode.
23033 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23034 128-bit long doubles before checking TFmode or TCmode.
23035 (FLOAT128_IBM_P): Likewise.
23037 2018-01-10 Martin Sebor <msebor@redhat.com>
23039 PR tree-optimization/83671
23040 * builtins.c (c_strlen): Unconditionally return zero for the empty
23042 Use -Warray-bounds for warnings.
23043 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23044 for non-constant array indices with COMPONENT_REF, arrays of
23045 arrays, and pointers to arrays.
23046 (gimple_fold_builtin_strlen): Determine and set length range for
23047 non-constant character arrays.
23049 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23051 PR middle-end/81897
23052 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23055 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23057 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23059 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23062 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23063 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23064 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23065 indexed_or_indirect_operand predicate.
23066 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23067 (*vsx_le_perm_load_v8hi): Likewise.
23068 (*vsx_le_perm_load_v16qi): Likewise.
23069 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23070 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23071 (*vsx_le_perm_store_v8hi): Likewise.
23072 (*vsx_le_perm_store_v16qi): Likewise.
23073 (eight unnamed splitters): Likewise.
23075 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23077 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23078 * config/rs6000/emmintrin.h: Likewise.
23079 * config/rs6000/mmintrin.h: Likewise.
23080 * config/rs6000/xmmintrin.h: Likewise.
23082 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23085 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23087 * tree.c (tree_nop_conversion): Return true for location wrapper
23089 (maybe_wrap_with_location): New function.
23090 (selftest::check_strip_nops): New function.
23091 (selftest::test_location_wrappers): New function.
23092 (selftest::tree_c_tests): Call it.
23093 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23094 (maybe_wrap_with_location): New decl.
23095 (EXPR_LOCATION_WRAPPER_P): New macro.
23096 (location_wrapper_p): New inline function.
23097 (tree_strip_any_location_wrapper): New inline function.
23099 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23102 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23103 stack_realign_offset for the largest alignment of stack slot
23105 (ix86_find_max_used_stack_alignment): New function.
23106 (ix86_finalize_stack_frame_flags): Use it. Set
23107 max_used_stack_alignment if we don't realign stack.
23108 * config/i386/i386.h (machine_function): Add
23109 max_used_stack_alignment.
23111 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23113 * config/arm/arm.opt (-mbranch-cost): New option.
23114 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23117 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23120 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23121 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23123 2018-01-10 Richard Biener <rguenther@suse.de>
23126 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23127 early out so it also covers the case where we have a non-NULL
23130 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23132 PR tree-optimization/83753
23133 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23134 for non-strided grouped accesses if the number of elements is 1.
23136 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23139 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23140 * i386.h (TARGET_USE_GATHER): Define.
23141 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23143 2018-01-10 Martin Liska <mliska@suse.cz>
23146 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23147 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23149 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23150 CLEANUP_NO_PARTITIONING is not set.
23152 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23154 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23155 for vectors, as a partial revert of r254296.
23156 * rtl.h (const_vec_p): Delete.
23157 (const_vec_duplicate_p): Don't test for vector CONSTs.
23158 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23159 * expmed.c (make_tree): Likewise.
23162 * common.md (E, F): Use CONSTANT_P instead of checking for
23164 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23165 checking for CONST_VECTOR.
23167 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23169 PR middle-end/83575
23170 * predict.c (force_edge_cold): Handle in more sane way edges
23171 with no prediction.
23173 2018-01-09 Carl Love <cel@us.ibm.com>
23175 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23177 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23178 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23179 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23180 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23181 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23182 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23183 * config/rs6000/rs6000-protos.h: Add extern defition for
23184 rs6000_generate_float2_double_code.
23185 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23187 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23188 (float2_v2df): Add define_expand.
23190 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23193 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23194 op_mode in the force_to_mode call.
23196 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23198 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23199 instead of checking each element individually.
23200 (aarch64_evpc_uzp): Likewise.
23201 (aarch64_evpc_zip): Likewise.
23202 (aarch64_evpc_ext): Likewise.
23203 (aarch64_evpc_rev): Likewise.
23204 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23205 instead of checking each element individually. Return true without
23207 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23208 whether all selected elements come from the same input, instead of
23209 checking each element individually. Remove calls to gen_rtx_REG,
23210 start_sequence and end_sequence and instead assert that no rtl is
23213 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23215 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23216 order of HIGH and CONST checks.
23218 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23220 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23221 if the destination isn't an SSA_NAME.
23223 2018-01-09 Richard Biener <rguenther@suse.de>
23225 PR tree-optimization/83668
23226 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23228 (canonicalize_loop_form): ... here, renamed from ...
23229 (canonicalize_loop_closed_ssa_form): ... this and amended to
23230 swap successor edges for loop exit blocks to make us use
23231 the RPO order we need for initial schedule generation.
23233 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23235 PR tree-optimization/64811
23236 * match.pd: When optimizing comparisons with Inf, avoid
23237 introducing or losing exceptions from comparisons with NaN.
23239 2018-01-09 Martin Liska <mliska@suse.cz>
23242 * asan.c (shadow_mem_size): Add gcc_assert.
23244 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23246 Don't save registers in main().
23249 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23250 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23251 * config/avr/avr.c (avr_set_current_function): Don't error if
23252 naked, OS_task or OS_main are specified at the same time.
23253 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23255 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23257 * common/config/avr/avr-common.c (avr_option_optimization_table):
23258 Switch on -mmain-is-OS_task for optimizing compilations.
23260 2018-01-09 Richard Biener <rguenther@suse.de>
23262 PR tree-optimization/83572
23263 * graphite.c: Include cfganal.h.
23264 (graphite_transform_loops): Connect infinite loops to exit
23265 and remove fake edges at the end.
23267 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23269 * ipa-inline.c (edge_badness): Revert accidental checkin.
23271 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23274 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23275 symbols; not inline clones.
23277 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23280 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23281 hard registers. Formatting fixes.
23283 PR preprocessor/83722
23284 * gcc.c (try_generate_repro): Pass
23285 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23286 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23289 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23290 Kito Cheng <kito.cheng@gmail.com>
23292 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23293 (riscv_leaf_function_p): Delete.
23294 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23296 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23298 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23300 (do_ifelse): New function.
23301 (do_isel): New function.
23302 (do_sub3): New function.
23303 (do_add3): New function.
23304 (do_load_mask_compare): New function.
23305 (do_overlap_load_compare): New function.
23306 (expand_compare_loop): New function.
23307 (expand_block_compare): Call expand_compare_loop() when appropriate.
23308 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23309 option description.
23310 (-mblock-compare-inline-loop-limit): New option.
23312 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23315 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23316 Reverse order of second and third operands in first alternative.
23317 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23318 of first and second elements in UNSPEC_VPERMR vector.
23319 (altivec_expand_vec_perm_le): Likewise.
23321 2018-01-08 Jeff Law <law@redhat.com>
23323 PR rtl-optimizatin/81308
23324 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23325 (process_switch): If group_case_labels makes a change, then set
23327 (pass_convert_switch::execute): If a switch is converted, then
23328 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23330 PR rtl-optimization/81308
23331 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23334 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23336 PR target/83663 - Revert r255946
23337 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23338 generation for cases where splatting a value is not useful.
23339 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23340 across a vec_duplicate and a paradoxical subreg forming a vector
23341 mode to a vec_concat.
23343 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23345 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23346 -march=armv8.3-a variants.
23347 * config/arm/t-multilib: Likewise.
23348 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23350 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23352 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23354 (cceq_ior_compare_complement): Give it a name so I can use it, and
23355 change boolean_or_operator predicate to boolean_operator so it can
23356 be used to generate a crand.
23357 (eqne): New code iterator.
23358 (bd/bd_neg): New code_attrs.
23359 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23360 a single define_insn.
23361 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23362 decrement (bdnzt/bdnzf/bdzt/bdzf).
23363 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23364 with the new names of the branch decrement patterns, and added the
23365 names of the branch decrement conditional patterns.
23367 2018-01-08 Richard Biener <rguenther@suse.de>
23369 PR tree-optimization/83563
23370 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23373 2018-01-08 Richard Biener <rguenther@suse.de>
23375 PR middle-end/83713
23376 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23378 2018-01-08 Richard Biener <rguenther@suse.de>
23380 PR tree-optimization/83685
23381 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23382 references to abnormals.
23384 2018-01-08 Richard Biener <rguenther@suse.de>
23387 * dwarf2out.c (output_indirect_strings): Handle empty
23388 skeleton_debug_str_hash.
23389 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23391 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23393 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23394 (emit_store_direct): Likewise.
23395 (arc_trampoline_adjust_address): Likewise.
23396 (arc_asm_trampoline_template): New function.
23397 (arc_initialize_trampoline): Use asm_trampoline_template.
23398 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23399 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23400 * config/arc/arc.md (flush_icache): Delete pattern.
23402 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23404 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23405 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23408 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23411 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23412 by not USED_FOR_TARGET.
23413 (make_pass_resolve_sw_modes): Likewise.
23415 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23417 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23420 2018-01-08 Richard Biener <rguenther@suse.de>
23422 PR middle-end/83580
23423 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23425 2018-01-08 Richard Biener <rguenther@suse.de>
23427 PR middle-end/83517
23428 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23430 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23432 PR middle-end/81897
23433 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23434 basic blocks with a small number of successors.
23435 (convert_control_dep_chain_into_preds): Improve handling of
23437 (dump_predicates): Split apart into...
23438 (dump_pred_chain): ...here...
23439 (dump_pred_info): ...and here.
23440 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23441 (can_chain_union_be_invalidated_p): Improve check for invalidation
23443 (uninit_uses_cannot_happen): Avoid unnecessary if
23444 convert_control_dep_chain_into_preds yielded nothing.
23446 2018-01-06 Martin Sebor <msebor@redhat.com>
23448 PR tree-optimization/83640
23449 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23450 subtracting negative offset from size.
23451 (builtin_access::overlap): Adjust offset bounds of the access to fall
23452 within the size of the object if possible.
23454 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23456 PR rtl-optimization/83699
23457 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23458 extract_bit_field_as_subreg to cases in which the extracted
23459 value is also a vector.
23461 * lra-constraints.c (process_alt_operands): Test for the equivalence
23462 substitutions when detecting a possible reload cycle.
23464 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23467 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23468 by default if flag_selective_schedling{,2}. Formatting fixes.
23470 PR rtl-optimization/83682
23471 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23472 if it has non-VECTOR_MODE element mode.
23473 (vec_duplicate_p): Likewise.
23475 PR middle-end/83694
23476 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23477 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23479 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23482 * config/i386/i386-builtin.def
23483 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23484 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23485 Require also OPTION_MASK_ISA_AVX512F in addition to
23486 OPTION_MASK_ISA_GFNI.
23487 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23488 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23489 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23490 to OPTION_MASK_ISA_GFNI.
23491 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23492 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23493 OPTION_MASK_ISA_AVX512BW.
23494 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23495 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23496 addition to OPTION_MASK_ISA_GFNI.
23497 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23498 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23499 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23500 to OPTION_MASK_ISA_GFNI.
23501 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23502 a requirement for all ISAs rather than any of them with a few
23504 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23506 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23507 bitmasks to be enabled with 3 exceptions, instead of requiring any
23508 enabled ISA with lots of exceptions.
23509 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23510 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23511 Change avx512bw in isa attribute to avx512f.
23512 * config/i386/sgxintrin.h: Add license boilerplate.
23513 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23514 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23515 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23516 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23518 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23519 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23520 temporarily sse2 rather than sse if not enabled already.
23523 * config/i386/sse.md (VI248_VLBW): Rename to ...
23524 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23525 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23526 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23527 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23528 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23529 mode iterator instead of VI248_VLBW.
23531 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23533 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23534 (record_modified): Skip clobbers; add debug output.
23535 (param_change_prob): Use sreal frequencies.
23537 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23539 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23540 punt for user-aligned variables.
23542 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23544 * tree-chrec.c (chrec_contains_symbols): Return true for
23547 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23550 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23551 of (x|y) == x for BICS pattern.
23553 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23555 PR tree-optimization/83605
23556 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23557 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23560 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23562 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23563 * config/epiphany/rtems.h: New file.
23565 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23566 Uros Bizjak <ubizjak@gmail.com>
23569 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23570 QIreg_operand instead of register_operand predicate.
23571 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23572 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23573 comments instead of -fmitigate[-_]rop.
23575 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23578 * cgraphunit.c (symbol_table::compile): Switch to text_section
23579 before calling assembly_start debug hook.
23580 * run-rtl-passes.c (run_rtl_passes): Likewise.
23583 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23585 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23586 range_int_cst_p rather than !symbolic_range_p before calling
23587 extract_range_from_multiplicative_op_1.
23589 2018-01-04 Jeff Law <law@redhat.com>
23591 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23592 redundant test in assertion.
23594 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23596 * doc/rtl.texi: Document machine_mode wrapper classes.
23598 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23600 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23601 using tree_to_uhwi.
23603 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23605 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23606 the VEC_PERM_EXPR fold to fail.
23608 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23611 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23612 to switched_sections.
23614 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23617 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23618 test for d.testing.
23620 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23623 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23624 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23626 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23629 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23630 is BLKmode and bitpos not zero or mode change is needed.
23632 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23635 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23638 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23641 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23642 instead of MULT rtx. Update all corresponding splitters.
23643 (*saddl_se): Ditto.
23644 (*ssub<modesuffix>): Ditto.
23645 (*ssubl_se): Ditto.
23646 (*cmp_sadd_di): Update split patterns.
23647 (*cmp_sadd_si): Ditto.
23648 (*cmp_sadd_sidi): Ditto.
23649 (*cmp_ssub_di): Ditto.
23650 (*cmp_ssub_si): Ditto.
23651 (*cmp_ssub_sidi): Ditto.
23652 * config/alpha/predicates.md (const23_operand): New predicate.
23653 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23654 Look for ASHIFT, not MULT inner operand.
23655 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23657 2018-01-04 Martin Liska <mliska@suse.cz>
23659 PR gcov-profile/83669
23660 * gcov.c (output_intermediate_file): Add version to intermediate
23662 * doc/gcov.texi: Document new field 'version' in intermediate
23663 file format. Fix location of '-k' option of gcov command.
23665 2018-01-04 Martin Liska <mliska@suse.cz>
23668 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23670 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23672 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23674 2018-01-03 Martin Sebor <msebor@redhat.com>
23676 PR tree-optimization/83655
23677 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23678 checking calls with invalid arguments.
23680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23682 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23683 (vectorizable_mask_load_store): Delete.
23684 (vectorizable_call): Return false for masked loads and stores.
23685 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23686 instead of gimple_assign_rhs1.
23687 (vectorizable_load): Handle IFN_MASK_LOAD.
23688 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23692 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23694 (vectorizable_mask_load_store): ...here.
23695 (vectorizable_load): ...and here.
23697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23699 * tree-vect-stmts.c (vect_build_all_ones_mask)
23700 (vect_build_zero_merge_argument): New functions, split out from...
23701 (vectorizable_load): ...here.
23703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23705 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23707 (vectorizable_mask_load_store): ...here.
23708 (vectorizable_store): ...and here.
23710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23712 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23714 (vectorizable_mask_load_store): ...here.
23716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23718 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23719 (vect_model_store_cost): Take a vec_load_store_type instead of a
23721 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23722 (vect_model_store_cost): Take a vec_load_store_type instead of a
23724 (vectorizable_mask_load_store): Update accordingly.
23725 (vectorizable_store): Likewise.
23726 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23730 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23731 IFN_MASK_LOAD calls here rather than...
23732 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23735 Alan Hayward <alan.hayward@arm.com>
23736 David Sherwood <david.sherwood@arm.com>
23738 * expmed.c (extract_bit_field_1): For vector extracts,
23739 fall back to extract_bit_field_as_subreg if vec_extract
23742 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23743 Alan Hayward <alan.hayward@arm.com>
23744 David Sherwood <david.sherwood@arm.com>
23746 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23747 they are variable or constant sized.
23748 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23749 slots for constant-sized data.
23751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23752 Alan Hayward <alan.hayward@arm.com>
23753 David Sherwood <david.sherwood@arm.com>
23755 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23756 handling COND_EXPRs with boolean comparisons, try to find a better
23757 basis for the mask type than the boolean itself.
23759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23761 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23762 is calculated and how it can be overridden.
23763 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23764 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23766 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23770 Alan Hayward <alan.hayward@arm.com>
23771 David Sherwood <david.sherwood@arm.com>
23773 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23774 Remove the mode argument.
23775 (aarch64_simd_valid_immediate): Remove the mode and inverse
23777 * config/aarch64/iterators.md (bitsize): New iterator.
23778 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23779 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23780 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23781 aarch64_simd_valid_immediate.
23782 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23783 (aarch64_reg_or_bic_imm): Likewise.
23784 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23785 with an insn_type enum and msl with a modifier_type enum.
23786 Replace element_width with a scalar_mode. Change the shift
23787 to unsigned int. Add constructors for scalar_float_mode and
23788 scalar_int_mode elements.
23789 (aarch64_vect_float_const_representable_p): Delete.
23790 (aarch64_can_const_movi_rtx_p)
23791 (aarch64_simd_scalar_immediate_valid_for_move)
23792 (aarch64_simd_make_constant): Update call to
23793 aarch64_simd_valid_immediate.
23794 (aarch64_advsimd_valid_immediate_hs): New function.
23795 (aarch64_advsimd_valid_immediate): Likewise.
23796 (aarch64_simd_valid_immediate): Remove mode and inverse
23797 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23798 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23799 and aarch64_float_const_representable_p on the result.
23800 (aarch64_output_simd_mov_immediate): Remove mode argument.
23801 Update call to aarch64_simd_valid_immediate and use of
23802 simd_immediate_info.
23803 (aarch64_output_scalar_simd_mov_immediate): Update call
23806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23807 Alan Hayward <alan.hayward@arm.com>
23808 David Sherwood <david.sherwood@arm.com>
23810 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23811 (mode_nunits): Likewise CONST_MODE_NUNITS.
23812 * machmode.def (ADJUST_NUNITS): Document.
23813 * genmodes.c (mode_data::need_nunits_adj): New field.
23814 (blank_mode): Update accordingly.
23815 (adj_nunits): New variable.
23816 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23818 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23819 listed in adj_nunits.
23820 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23821 listed in adj_nunits. Don't emit case statements for such modes.
23822 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23823 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23824 nothing if adj_nunits is nonnull.
23825 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23826 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23827 (emit_mode_fbit): Update use of print_maybe_const_decl.
23828 (emit_move_size): Likewise. Treat the array as non-const
23830 (emit_mode_adjustments): Handle adj_nunits.
23832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23834 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23835 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23836 (VECTOR_MODES): Use it.
23837 (make_vector_modes): Take the prefix as an argument.
23839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23840 Alan Hayward <alan.hayward@arm.com>
23841 David Sherwood <david.sherwood@arm.com>
23843 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23844 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23845 for MODE_VECTOR_BOOL.
23846 * machmode.def (VECTOR_BOOL_MODE): Document.
23847 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23848 (make_vector_bool_mode): New function.
23849 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23851 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23852 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23854 * stor-layout.c (int_mode_for_mode): Likewise.
23855 * tree.c (build_vector_type_for_mode): Likewise.
23856 * varasm.c (output_constant_pool_2): Likewise.
23857 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23858 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23859 for MODE_VECTOR_BOOL.
23860 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23861 of mode class checks.
23862 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23863 instead of a list of mode class checks.
23864 (expand_vector_scalar_condition): Likewise.
23865 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23868 Alan Hayward <alan.hayward@arm.com>
23869 David Sherwood <david.sherwood@arm.com>
23871 * machmode.h (mode_size): Change from unsigned short to
23873 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23874 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23875 or if measurement_type is not polynomial.
23876 (fixed_size_mode::includes_p): Check for constant-sized modes.
23877 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23878 return a poly_uint16 rather than an unsigned short.
23879 (emit_mode_size): Change the type of mode_size from unsigned short
23880 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23881 (emit_mode_adjustments): Cope with polynomial vector sizes.
23882 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23884 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23886 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23887 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23888 * caller-save.c (setup_save_areas): Likewise.
23889 (replace_reg_with_saved_mem): Likewise.
23890 * calls.c (emit_library_call_value_1): Likewise.
23891 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23892 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23893 (gen_lowpart_for_combine): Likewise.
23894 * convert.c (convert_to_integer_1): Likewise.
23895 * cse.c (equiv_constant, cse_insn): Likewise.
23896 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23897 (cselib_subst_to_values): Likewise.
23898 * dce.c (word_dce_process_block): Likewise.
23899 * df-problems.c (df_word_lr_mark_ref): Likewise.
23900 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23901 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23902 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23903 (rtl_for_decl_location): Likewise.
23904 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23905 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23906 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23907 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23908 (expand_expr_real_1): Likewise.
23909 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23910 (pad_below): Likewise.
23911 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23912 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23913 * ira.c (get_subreg_tracking_sizes): Likewise.
23914 * ira-build.c (ira_create_allocno_objects): Likewise.
23915 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23916 (ira_sort_regnos_for_alter_reg): Likewise.
23917 * ira-costs.c (record_operand_costs): Likewise.
23918 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23919 (resolve_simple_move): Likewise.
23920 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23921 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23922 (lra_constraints): Likewise.
23923 (CONST_POOL_OK_P): Reject variable-sized modes.
23924 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23925 (add_pseudo_to_slot, lra_spill): Likewise.
23926 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23927 * optabs-query.c (get_best_extraction_insn): Likewise.
23928 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23929 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23930 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23931 * recog.c (offsettable_address_addr_space_p): Likewise.
23932 * regcprop.c (maybe_mode_change): Likewise.
23933 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23934 * regrename.c (build_def_use): Likewise.
23935 * regstat.c (dump_reg_info): Likewise.
23936 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23937 (find_reloads, find_reloads_subreg_address): Likewise.
23938 * reload1.c (eliminate_regs_1): Likewise.
23939 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23940 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23941 (simplify_binary_operation_1, simplify_subreg): Likewise.
23942 * targhooks.c (default_function_arg_padding): Likewise.
23943 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23944 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23945 (verify_gimple_assign_ternary): Likewise.
23946 * tree-inline.c (estimate_move_cost): Likewise.
23947 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23948 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23949 (get_address_cost_ainc): Likewise.
23950 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23951 (vect_supportable_dr_alignment): Likewise.
23952 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23953 (vectorizable_reduction): Likewise.
23954 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23955 (vectorizable_operation, vectorizable_load): Likewise.
23956 * tree.c (build_same_sized_truth_vector_type): Likewise.
23957 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23958 * var-tracking.c (emit_note_insn_var_location): Likewise.
23959 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23960 (ADDR_VEC_ALIGN): Likewise.
23962 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23963 Alan Hayward <alan.hayward@arm.com>
23964 David Sherwood <david.sherwood@arm.com>
23966 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23968 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23969 or if measurement_type is polynomial.
23970 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23971 * combine.c (make_extraction): Likewise.
23972 * dse.c (find_shift_sequence): Likewise.
23973 * dwarf2out.c (mem_loc_descriptor): Likewise.
23974 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23975 (extract_bit_field, extract_low_bits): Likewise.
23976 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23977 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23978 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23979 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23980 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23981 * reload.c (find_reloads): Likewise.
23982 * reload1.c (alter_reg): Likewise.
23983 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23984 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23985 * tree-if-conv.c (predicate_mem_writes): Likewise.
23986 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23987 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23988 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23989 * valtrack.c (dead_debug_insert_temp): Likewise.
23990 * varasm.c (mergeable_constant_section): Likewise.
23991 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23994 Alan Hayward <alan.hayward@arm.com>
23995 David Sherwood <david.sherwood@arm.com>
23997 * expr.c (expand_assignment): Cope with polynomial mode sizes
23998 when assigning to a CONCAT.
24000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24001 Alan Hayward <alan.hayward@arm.com>
24002 David Sherwood <david.sherwood@arm.com>
24004 * machmode.h (mode_precision): Change from unsigned short to
24006 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24008 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24009 or if measurement_type is not polynomial.
24010 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24011 in which the mode is already known to be a scalar_int_mode.
24012 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24013 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24015 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24016 for GET_MODE_PRECISION.
24017 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24018 for GET_MODE_PRECISION.
24019 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24021 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24022 (expand_field_assignment, make_extraction): Likewise.
24023 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24024 (get_last_value): Likewise.
24025 * convert.c (convert_to_integer_1): Likewise.
24026 * cse.c (cse_insn): Likewise.
24027 * expr.c (expand_expr_real_1): Likewise.
24028 * lra-constraints.c (simplify_operand_subreg): Likewise.
24029 * optabs-query.c (can_atomic_load_p): Likewise.
24030 * optabs.c (expand_atomic_load): Likewise.
24031 (expand_atomic_store): Likewise.
24032 * ree.c (combine_reaching_defs): Likewise.
24033 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24034 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24035 * tree.h (type_has_mode_precision_p): Likewise.
24036 * ubsan.c (instrument_si_overflow): Likewise.
24038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24039 Alan Hayward <alan.hayward@arm.com>
24040 David Sherwood <david.sherwood@arm.com>
24042 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24043 polynomial numbers of units.
24044 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24045 (valid_vector_subparts_p): New function.
24046 (build_vector_type): Remove temporary shim and take the number
24047 of units as a poly_uint64 rather than an int.
24048 (build_opaque_vector_type): Take the number of units as a
24049 poly_uint64 rather than an int.
24050 * tree.c (build_vector_from_ctor): Handle polynomial
24051 TYPE_VECTOR_SUBPARTS.
24052 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24053 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24054 (build_vector_from_val): If the number of units is variable,
24055 use build_vec_duplicate_cst for constant operands and
24056 VEC_DUPLICATE_EXPR otherwise.
24057 (make_vector_type): Remove temporary is_constant ().
24058 (build_vector_type, build_opaque_vector_type): Take the number of
24059 units as a poly_uint64 rather than an int.
24060 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24062 * cfgexpand.c (expand_debug_expr): Likewise.
24063 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24064 (store_constructor, expand_expr_real_1): Likewise.
24065 (const_scalar_mask_from_tree): Likewise.
24066 * fold-const-call.c (fold_const_reduction): Likewise.
24067 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24068 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24069 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24070 (fold_relational_const): Likewise.
24071 (native_interpret_vector): Likewise. Change the size from an
24072 int to an unsigned int.
24073 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24074 TYPE_VECTOR_SUBPARTS.
24075 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24076 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24077 duplicating a non-constant operand into a variable-length vector.
24078 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24079 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24080 * ipa-icf.c (sem_variable::equals): Likewise.
24081 * match.pd: Likewise.
24082 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24083 * print-tree.c (print_node): Likewise.
24084 * stor-layout.c (layout_type): Likewise.
24085 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24086 * tree-cfg.c (verify_gimple_comparison): Likewise.
24087 (verify_gimple_assign_binary): Likewise.
24088 (verify_gimple_assign_ternary): Likewise.
24089 (verify_gimple_assign_single): Likewise.
24090 * tree-pretty-print.c (dump_generic_node): Likewise.
24091 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24092 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24093 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24094 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24095 (vect_shift_permute_load_chain): Likewise.
24096 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24097 (expand_vector_condition, optimize_vector_constructor): Likewise.
24098 (lower_vec_perm, get_compute_type): Likewise.
24099 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24100 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24101 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24102 (vect_recog_mask_conversion_pattern): Likewise.
24103 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24104 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24105 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24106 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24107 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24108 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24109 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24110 (supportable_widening_operation): Likewise.
24111 (supportable_narrowing_operation): Likewise.
24112 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24114 * varasm.c (output_constant): Likewise.
24116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24117 Alan Hayward <alan.hayward@arm.com>
24118 David Sherwood <david.sherwood@arm.com>
24120 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24121 so that both the length == 3 and length != 3 cases set up their
24122 own permute vectors. Add comments explaining why we know the
24123 number of elements is constant.
24124 (vect_permute_load_chain): Likewise.
24126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24127 Alan Hayward <alan.hayward@arm.com>
24128 David Sherwood <david.sherwood@arm.com>
24130 * machmode.h (mode_nunits): Change from unsigned char to
24132 (ONLY_FIXED_SIZE_MODES): New macro.
24133 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24134 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24135 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24137 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24138 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24139 or if measurement_type is not polynomial.
24140 * genmodes.c (ZERO_COEFFS): New macro.
24141 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24143 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24144 Use ZERO_COEFFS when emitting initializers.
24145 * data-streamer.h (bp_pack_poly_value): New function.
24146 (bp_unpack_poly_value): Likewise.
24147 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24148 for GET_MODE_NUNITS.
24149 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24150 for GET_MODE_NUNITS.
24151 * tree.c (make_vector_type): Remove temporary shim and make
24152 the real function take the number of units as a poly_uint64
24153 rather than an int.
24154 (build_vector_type_for_mode): Handle polynomial nunits.
24155 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24156 * emit-rtl.c (const_vec_series_p_1): Likewise.
24157 (gen_rtx_CONST_VECTOR): Likewise.
24158 * fold-const.c (test_vec_duplicate_folding): Likewise.
24159 * genrecog.c (validate_pattern): Likewise.
24160 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24161 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24162 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24163 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24164 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24165 * rtlanal.c (subreg_get_info): Likewise.
24166 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24167 (vect_grouped_load_supported): Likewise.
24168 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24169 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24170 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24171 (simplify_const_unary_operation, simplify_binary_operation_1)
24172 (simplify_const_binary_operation, simplify_ternary_operation)
24173 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24174 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24175 instead of CONST_VECTOR_NUNITS.
24176 * varasm.c (output_constant_pool_2): Likewise.
24177 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24178 explicit-encoded elements in the XVEC for variable-length vectors.
24180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24182 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24185 Alan Hayward <alan.hayward@arm.com>
24186 David Sherwood <david.sherwood@arm.com>
24188 * coretypes.h (fixed_size_mode): Declare.
24189 (fixed_size_mode_pod): New typedef.
24190 * builtins.h (target_builtins::x_apply_args_mode)
24191 (target_builtins::x_apply_result_mode): Change type to
24192 fixed_size_mode_pod.
24193 * builtins.c (apply_args_size, apply_result_size, result_vector)
24194 (expand_builtin_apply_args_1, expand_builtin_apply)
24195 (expand_builtin_return): Update accordingly.
24197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24199 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24200 * cselib.c (cselib_hash_rtx): Likewise.
24201 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24202 CONST_VECTOR encoding.
24204 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24205 Jeff Law <law@redhat.com>
24208 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24209 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24210 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24211 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24214 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24215 explicitly probe *sp in a noreturn function if there were any callee
24216 register saves or frame pointer is needed.
24218 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24221 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24222 BLKmode for ternary, binary or unary expressions.
24225 * var-tracking.c (delete_vta_debug_insn): New inline function.
24226 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24227 insns from get_insns () to NULL instead of each bb separately.
24228 Use delete_vta_debug_insn. No longer static.
24229 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24230 delete_vta_debug_insns callers.
24231 * rtl.h (delete_vta_debug_insns): Declare.
24232 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24233 instead of variable_tracking_main.
24235 2018-01-03 Martin Sebor <msebor@redhat.com>
24237 PR tree-optimization/83603
24238 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24239 arguments past the endof the argument list in functions declared
24240 without a prototype.
24241 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24242 Avoid checking when arguments are null.
24244 2018-01-03 Martin Sebor <msebor@redhat.com>
24247 * doc/extend.texi (attribute const): Fix a typo.
24248 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24249 issuing -Wsuggest-attribute for void functions.
24251 2018-01-03 Martin Sebor <msebor@redhat.com>
24253 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24254 offset_int::from instead of wide_int::to_shwi.
24255 (maybe_diag_overlap): Remove assertion.
24256 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24257 * gimple-ssa-sprintf.c (format_directive): Same.
24258 (parse_directive): Same.
24259 (sprintf_dom_walker::compute_format_length): Same.
24260 (try_substitute_return_value): Same.
24262 2018-01-03 Jeff Law <law@redhat.com>
24264 PR middle-end/83654
24265 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24266 non-constant residual for zero at runtime and avoid probing in
24267 that case. Reorganize code for trailing problem to mirror handling
24270 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24272 PR tree-optimization/83501
24273 * tree-ssa-strlen.c (get_string_cst): New.
24274 (handle_char_store): Call get_string_cst.
24276 2018-01-03 Martin Liska <mliska@suse.cz>
24278 PR tree-optimization/83593
24279 * tree-ssa-strlen.c: Include tree-cfg.h.
24280 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24281 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24282 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24284 (strlen_dom_walker::before_dom_children): Call
24285 gimple_purge_dead_eh_edges. Dump tranformation with details
24287 (strlen_dom_walker::before_dom_children): Update call by adding
24288 new argument cleanup_eh.
24289 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24291 2018-01-03 Martin Liska <mliska@suse.cz>
24294 * cif-code.def (VARIADIC_THUNK): New enum value.
24295 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24298 2018-01-03 Jan Beulich <jbeulich@suse.com>
24300 * sse.md (mov<mode>_internal): Tighten condition for when to use
24301 vmovdqu<ssescalarsize> for TI and OI modes.
24303 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24305 Update copyright years.
24307 2018-01-03 Martin Liska <mliska@suse.cz>
24310 * ipa-visibility.c (function_and_variable_visibility): Skip
24311 functions with noipa attribure.
24313 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24315 * gcc.c (process_command): Update copyright notice dates.
24316 * gcov-dump.c (print_version): Ditto.
24317 * gcov.c (print_version): Ditto.
24318 * gcov-tool.c (print_version): Ditto.
24319 * gengtype.c (create_file): Ditto.
24320 * doc/cpp.texi: Bump @copying's copyright year.
24321 * doc/cppinternals.texi: Ditto.
24322 * doc/gcc.texi: Ditto.
24323 * doc/gccint.texi: Ditto.
24324 * doc/gcov.texi: Ditto.
24325 * doc/install.texi: Ditto.
24326 * doc/invoke.texi: Ditto.
24328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24330 * vector-builder.h (vector_builder::m_full_nelts): Change from
24331 unsigned int to poly_uint64.
24332 (vector_builder::full_nelts): Update prototype accordingly.
24333 (vector_builder::new_vector): Likewise.
24334 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24335 (vector_builder::operator ==): Likewise.
24336 (vector_builder::finalize): Likewise.
24337 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24338 Take the number of elements as a poly_uint64 rather than an
24340 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24341 from unsigned int to poly_uint64.
24342 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24343 (vec_perm_indices::new_vector): Likewise.
24344 (vec_perm_indices::length): Likewise.
24345 (vec_perm_indices::nelts_per_input): Likewise.
24346 (vec_perm_indices::input_nelts): Likewise.
24347 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24348 number of elements per input as a poly_uint64 rather than an
24349 unsigned int. Use the original encoding for variable-length
24350 vectors, rather than clamping each individual element.
24351 For the second and subsequent elements in each pattern,
24352 clamp the step and base before clamping their sum.
24353 (vec_perm_indices::series_p): Handle polynomial element counts.
24354 (vec_perm_indices::all_in_range_p): Likewise.
24355 (vec_perm_indices_to_tree): Likewise.
24356 (vec_perm_indices_to_rtx): Likewise.
24357 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24358 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24359 (tree_vector_builder::new_binary_operation): Handle polynomial
24360 element counts. Return false if we need to know the number
24361 of elements at compile time.
24362 * fold-const.c (fold_vec_perm): Punt if the number of elements
24363 isn't known at compile time.
24365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24367 * vec-perm-indices.h (vec_perm_builder): Change element type
24368 from HOST_WIDE_INT to poly_int64.
24369 (vec_perm_indices::element_type): Update accordingly.
24370 (vec_perm_indices::clamp): Handle polynomial element_types.
24371 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24372 (vec_perm_indices::all_in_range_p): Likewise.
24373 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24375 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24376 polynomial vec_perm_indices element types.
24377 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24378 * fold-const.c (fold_vec_perm): Likewise.
24379 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24380 * tree-vect-generic.c (lower_vec_perm): Likewise.
24381 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24382 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24383 element type to HOST_WIDE_INT.
24385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24386 Alan Hayward <alan.hayward@arm.com>
24387 David Sherwood <david.sherwood@arm.com>
24389 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24390 rather than an int. Use plus_constant.
24391 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24392 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24395 Alan Hayward <alan.hayward@arm.com>
24396 David Sherwood <david.sherwood@arm.com>
24398 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24399 a HOST_WIDE_INT to a poly_int64.
24401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24402 Alan Hayward <alan.hayward@arm.com>
24403 David Sherwood <david.sherwood@arm.com>
24405 * calls.c (load_register_parameters): Cope with polynomial
24406 mode sizes. Require a constant size for BLKmode parameters
24407 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24408 forces a parameter to be padded at the lsb end in order to
24409 fill a complete number of words, require the parameter size
24410 to be ordered wrt UNITS_PER_WORD.
24412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24413 Alan Hayward <alan.hayward@arm.com>
24414 David Sherwood <david.sherwood@arm.com>
24416 * reload1.c (spill_stack_slot_width): Change element type
24417 from unsigned int to poly_uint64_pod.
24418 (alter_reg): Treat mode sizes as polynomial.
24420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24421 Alan Hayward <alan.hayward@arm.com>
24422 David Sherwood <david.sherwood@arm.com>
24424 * reload.c (complex_word_subreg_p): New function.
24425 (reload_inner_reg_of_subreg, push_reload): Use it.
24427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24428 Alan Hayward <alan.hayward@arm.com>
24429 David Sherwood <david.sherwood@arm.com>
24431 * lra-constraints.c (process_alt_operands): Reject matched
24432 operands whose sizes aren't ordered.
24433 (match_reload): Refer to this check here.
24435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24436 Alan Hayward <alan.hayward@arm.com>
24437 David Sherwood <david.sherwood@arm.com>
24439 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24440 that the mode size is in the set {1, 2, 4, 8, 16}.
24442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24443 Alan Hayward <alan.hayward@arm.com>
24444 David Sherwood <david.sherwood@arm.com>
24446 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24447 Use plus_constant instead of gen_rtx_PLUS.
24449 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24450 Alan Hayward <alan.hayward@arm.com>
24451 David Sherwood <david.sherwood@arm.com>
24453 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24454 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24455 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24456 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24457 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24458 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24459 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24460 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24461 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24462 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24464 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24465 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24466 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24467 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24468 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24469 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24470 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24471 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24472 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24473 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24475 * expr.c (emit_move_resolve_push): Treat the input and result
24476 of PUSH_ROUNDING as a poly_int64.
24477 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24478 (emit_push_insn): Likewise.
24479 * lra-eliminations.c (mark_not_eliminable): Likewise.
24480 * recog.c (push_operand): Likewise.
24481 * reload1.c (elimination_effects): Likewise.
24482 * rtlanal.c (nonzero_bits1): Likewise.
24483 * calls.c (store_one_arg): Likewise. Require the padding to be
24484 known at compile time.
24486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24487 Alan Hayward <alan.hayward@arm.com>
24488 David Sherwood <david.sherwood@arm.com>
24490 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24491 Use plus_constant instead of gen_rtx_PLUS.
24493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24494 Alan Hayward <alan.hayward@arm.com>
24495 David Sherwood <david.sherwood@arm.com>
24497 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24498 rather than an int.
24500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24501 Alan Hayward <alan.hayward@arm.com>
24502 David Sherwood <david.sherwood@arm.com>
24504 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24505 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24506 via stack temporaries. Treat the mode size as polynomial too.
24508 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24509 Alan Hayward <alan.hayward@arm.com>
24510 David Sherwood <david.sherwood@arm.com>
24512 * expr.c (expand_expr_real_2): When handling conversions involving
24513 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24514 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24515 as a poly_uint64 too.
24517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24518 Alan Hayward <alan.hayward@arm.com>
24519 David Sherwood <david.sherwood@arm.com>
24521 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24524 Alan Hayward <alan.hayward@arm.com>
24525 David Sherwood <david.sherwood@arm.com>
24527 * combine.c (can_change_dest_mode): Handle polynomial
24528 REGMODE_NATURAL_SIZE.
24529 * expmed.c (store_bit_field_1): Likewise.
24530 * expr.c (store_constructor): Likewise.
24531 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24532 and polynomial REGMODE_NATURAL_SIZE.
24533 (gen_lowpart_common): Likewise.
24534 * reginfo.c (record_subregs_of_mode): Likewise.
24535 * rtlanal.c (read_modify_subreg_p): Likewise.
24537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24538 Alan Hayward <alan.hayward@arm.com>
24539 David Sherwood <david.sherwood@arm.com>
24541 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24542 numbers of elements.
24544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24545 Alan Hayward <alan.hayward@arm.com>
24546 David Sherwood <david.sherwood@arm.com>
24548 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24555 in a POINTER_PLUS_EXPR.
24557 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24558 Alan Hayward <alan.hayward@arm.com>
24559 David Sherwood <david.sherwood@arm.com>
24561 * omp-simd-clone.c (simd_clone_subparts): New function.
24562 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24563 (ipa_simd_modify_function_body): Likewise.
24565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24566 Alan Hayward <alan.hayward@arm.com>
24567 David Sherwood <david.sherwood@arm.com>
24569 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24570 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24571 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24572 (expand_vector_condition, vector_element): Likewise.
24573 (subparts_gt): New function.
24574 (get_compute_type): Use subparts_gt.
24575 (count_type_subparts): Delete.
24576 (expand_vector_operations_1): Use subparts_gt instead of
24577 count_type_subparts.
24579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24580 Alan Hayward <alan.hayward@arm.com>
24581 David Sherwood <david.sherwood@arm.com>
24583 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24584 (vect_compile_time_alias): ...this new function. Do the calculation
24585 on poly_ints rather than trees.
24586 (vect_prune_runtime_alias_test_list): Update call accordingly.
24588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24589 Alan Hayward <alan.hayward@arm.com>
24590 David Sherwood <david.sherwood@arm.com>
24592 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24594 (vect_schedule_slp_instance): Likewise.
24596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24597 Alan Hayward <alan.hayward@arm.com>
24598 David Sherwood <david.sherwood@arm.com>
24600 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24601 constant and extern definitions for variable-length vectors.
24602 (vect_get_constant_vectors): Note that the number of units
24603 is known to be constant.
24605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24606 Alan Hayward <alan.hayward@arm.com>
24607 David Sherwood <david.sherwood@arm.com>
24609 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24610 of units as polynomial. Choose between WIDE and NARROW based
24613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24614 Alan Hayward <alan.hayward@arm.com>
24615 David Sherwood <david.sherwood@arm.com>
24617 * tree-vect-stmts.c (simd_clone_subparts): New function.
24618 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24621 Alan Hayward <alan.hayward@arm.com>
24622 David Sherwood <david.sherwood@arm.com>
24624 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24625 vectors as polynomial. Use build_index_vector for
24626 IFN_GOMP_SIMD_LANE.
24628 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24629 Alan Hayward <alan.hayward@arm.com>
24630 David Sherwood <david.sherwood@arm.com>
24632 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24633 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24634 for variable-length vectors.
24635 (vectorizable_mask_load_store): Treat the number of units as
24636 polynomial, asserting that it is constant if the condition has
24637 already been enforced.
24638 (vectorizable_store, vectorizable_load): Likewise.
24640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24641 Alan Hayward <alan.hayward@arm.com>
24642 David Sherwood <david.sherwood@arm.com>
24644 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24645 of units as polynomial. Punt if we can't tell at compile time
24646 which vector contains the final result.
24648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24649 Alan Hayward <alan.hayward@arm.com>
24650 David Sherwood <david.sherwood@arm.com>
24652 * tree-vect-loop.c (vectorizable_induction): Treat the number
24653 of units as polynomial. Punt on SLP inductions. Use an integer
24654 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24655 cast of such a series for variable-length floating-point
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 * tree.h (build_index_vector): Declare.
24663 * tree.c (build_index_vector): New function.
24664 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24665 of units as polynomial, forcibly converting it to a constant if
24666 vectorizable_reduction has already enforced the condition.
24667 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24668 to create a {1,2,3,...} vector.
24669 (vectorizable_reduction): Treat the number of units as polynomial.
24670 Choose vectype_in based on the largest scalar element size rather
24671 than the smallest number of units. Enforce the restrictions
24674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24675 Alan Hayward <alan.hayward@arm.com>
24676 David Sherwood <david.sherwood@arm.com>
24678 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24679 number of units as polynomial.
24681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24682 Alan Hayward <alan.hayward@arm.com>
24683 David Sherwood <david.sherwood@arm.com>
24685 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24686 * target.def (autovectorize_vector_sizes): Return the vector sizes
24687 by pointer, using vector_sizes rather than a bitmask.
24688 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24689 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24690 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24692 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24693 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24694 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24695 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24696 * omp-general.c (omp_max_vf): Likewise.
24697 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24698 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24699 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24700 * tree-vect-slp.c (vect_slp_bb): Likewise.
24701 * doc/tm.texi: Regenerate.
24702 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24704 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24705 the vector size as a poly_uint64 rather than an unsigned int.
24706 (current_vector_size): Change from an unsigned int to a poly_uint64.
24707 (get_vectype_for_scalar_type): Update accordingly.
24708 * tree.h (build_truth_vector_type): Take the size and number of
24709 units as a poly_uint64 rather than an unsigned int.
24710 (build_vector_type): Add a temporary overload that takes
24711 the number of units as a poly_uint64 rather than an unsigned int.
24712 * tree.c (make_vector_type): Likewise.
24713 (build_truth_vector_type): Take the number of units as a poly_uint64
24714 rather than an unsigned int.
24716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24717 Alan Hayward <alan.hayward@arm.com>
24718 David Sherwood <david.sherwood@arm.com>
24720 * target.def (get_mask_mode): Take the number of units and length
24721 as poly_uint64s rather than unsigned ints.
24722 * targhooks.h (default_get_mask_mode): Update accordingly.
24723 * targhooks.c (default_get_mask_mode): Likewise.
24724 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24725 * doc/tm.texi: Regenerate.
24727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24728 Alan Hayward <alan.hayward@arm.com>
24729 David Sherwood <david.sherwood@arm.com>
24731 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24732 * omp-general.c (omp_max_vf): Likewise.
24733 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24734 (expand_omp_simd): Handle polynomial safelen.
24735 * omp-low.c (omplow_simd_context): Add a default constructor.
24736 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24737 (lower_rec_simd_input_clauses): Update accordingly.
24738 (lower_rec_input_clauses): Likewise.
24740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24741 Alan Hayward <alan.hayward@arm.com>
24742 David Sherwood <david.sherwood@arm.com>
24744 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24745 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24746 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24747 (vect_analyze_slp_cost): Likewise.
24748 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24749 (vect_model_load_cost): Likewise.
24751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24752 Alan Hayward <alan.hayward@arm.com>
24753 David Sherwood <david.sherwood@arm.com>
24755 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24756 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24757 from an unsigned int * to a poly_uint64_pod *.
24758 (calculate_unrolling_factor): New function.
24759 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
24766 from an unsigned int to a poly_uint64.
24767 (_loop_vec_info::slp_unrolling_factor): Likewise.
24768 (_loop_vec_info::vectorization_factor): Change from an int
24770 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24771 (vect_get_num_vectors): New function.
24772 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24773 (vect_get_num_copies): Use vect_get_num_vectors.
24774 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24775 to an unsigned int *.
24776 (vect_analyze_data_refs): Change min_vf from an int * to a
24778 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24779 than an unsigned HOST_WIDE_INT.
24780 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24781 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24782 to an unsigned int *.
24783 (vect_analyze_data_ref_dependences): Likewise.
24784 (vect_compute_data_ref_alignment): Handle polynomial vf.
24785 (vect_enhance_data_refs_alignment): Likewise.
24786 (vect_prune_runtime_alias_test_list): Likewise.
24787 (vect_shift_permute_load_chain): Likewise.
24788 (vect_supportable_dr_alignment): Likewise.
24789 (dependence_distance_ge_vf): Take the vectorization factor as a
24790 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24791 (vect_analyze_data_refs): Change min_vf from an int * to a
24793 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24794 vfm1 as a poly_uint64 rather than an int. Make the same change
24795 for the returned bound_scalar.
24796 (vect_gen_vector_loop_niters): Handle polynomial vf.
24797 (vect_do_peeling): Likewise. Update call to
24798 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24799 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24801 * tree-vect-loop.c (vect_determine_vectorization_factor)
24802 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24803 (vect_get_known_peeling_cost): Likewise.
24804 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24805 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24806 (vect_transform_loop): Likewise. Use the lowest possible VF when
24807 updating the upper bounds of the loop.
24808 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24809 rather than an int.
24810 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24811 polynomial unroll factors.
24812 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24813 (vect_make_slp_decision): Likewise.
24814 (vect_supported_load_permutation_p): Likewise, and polynomial
24816 (vect_analyze_slp_cost): Handle polynomial vf.
24817 (vect_slp_analyze_node_operations): Likewise.
24818 (vect_slp_analyze_bb_1): Likewise.
24819 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24820 than an unsigned HOST_WIDE_INT.
24821 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24822 (vectorizable_load): Handle polynomial vf.
24823 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24825 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24828 Alan Hayward <alan.hayward@arm.com>
24829 David Sherwood <david.sherwood@arm.com>
24831 * match.pd: Handle bit operations involving three constants
24832 and try to fold one pair.
24834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24836 * tree-vect-loop-manip.c: Include gimple-fold.h.
24837 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24838 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24839 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24840 Add a path that uses a step of VF instead of 1, but disable it
24842 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24843 and niters_no_overflow parameters. Update calls to
24844 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24845 Create a new SSA name if the latter choses to use a ste other
24846 than zero, and return it via niters_vector_mult_vf_var.
24847 * tree-vect-loop.c (vect_transform_loop): Update calls to
24848 vect_do_peeling, vect_gen_vector_loop_niters and
24849 slpeel_make_loop_iterate_ntimes.
24850 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24851 (vect_gen_vector_loop_niters): Update declarations after above changes.
24853 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24855 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24856 128-bit round to integer instructions.
24857 (ceil<mode>2): Likewise.
24858 (btrunc<mode>2): Likewise.
24859 (round<mode>2): Likewise.
24861 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24863 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24864 unaligned VSX load/store on P8/P9.
24865 (expand_block_clear): Allow the use of unaligned VSX
24866 load/store on P8/P9.
24868 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24870 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24872 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24873 swap associated with both a load and a store.
24875 2018-01-02 Andrew Waterman <andrew@sifive.com>
24877 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24878 * config/riscv/riscv.md (clear_cache): Use it.
24880 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24882 * web.c: Remove out-of-date comment.
24884 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24886 * expr.c (fixup_args_size_notes): Check that any existing
24887 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24888 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24889 (emit_single_push_insn): ...here.
24891 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24893 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24894 (const_vector_encoded_nelts): New function.
24895 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24896 (const_vector_int_elt, const_vector_elt): Declare.
24897 * emit-rtl.c (const_vector_int_elt_1): New function.
24898 (const_vector_elt): Likewise.
24899 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24900 of CONST_VECTOR_ELT.
24902 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24904 * expr.c: Include rtx-vector-builder.h.
24905 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24906 directly on the tree encoding.
24907 (const_vector_from_tree): Likewise.
24908 * optabs.c: Include rtx-vector-builder.h.
24909 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24910 sequence of "u" values.
24911 * vec-perm-indices.c: Include rtx-vector-builder.h.
24912 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24913 directly on the vec_perm_indices encoding.
24915 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24917 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24918 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24919 * rtx-vector-builder.h: New file.
24920 * rtx-vector-builder.c: Likewise.
24921 * rtl.h (rtx_def::u2): Add a const_vector field.
24922 (CONST_VECTOR_NPATTERNS): New macro.
24923 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24924 (CONST_VECTOR_DUPLICATE_P): Likewise.
24925 (CONST_VECTOR_STEPPED_P): Likewise.
24926 (CONST_VECTOR_ENCODED_ELT): Likewise.
24927 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24928 (unwrap_const_vec_duplicate): Likewise.
24929 (const_vec_series_p): Check for a non-duplicated vector encoding.
24930 Say that the function only returns true for integer vectors.
24931 * emit-rtl.c: Include rtx-vector-builder.h.
24932 (gen_const_vec_duplicate_1): Delete.
24933 (gen_const_vector): Call gen_const_vec_duplicate instead of
24934 gen_const_vec_duplicate_1.
24935 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24936 (gen_const_vec_duplicate): Use rtx_vector_builder.
24937 (gen_const_vec_series): Likewise.
24938 (gen_rtx_CONST_VECTOR): Likewise.
24939 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24940 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24941 Build a new vector rather than modifying a CONST_VECTOR in-place.
24942 (handle_special_swappables): Update call accordingly.
24943 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24944 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24945 Build a new vector rather than modifying a CONST_VECTOR in-place.
24946 (handle_special_swappables): Update call accordingly.
24948 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24950 * simplify-rtx.c (simplify_const_binary_operation): Use
24951 CONST_VECTOR_ELT instead of XVECEXP.
24953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24955 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24956 the selector elements to be different from the data elements
24957 if the selector is a VECTOR_CST.
24958 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24959 ssizetype for the selector.
24961 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24963 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24964 before testing each element individually.
24965 * tree-vect-generic.c (lower_vec_perm): Likewise.
24967 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24969 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24970 * selftest-run-tests.c (selftest::run_tests): Call it.
24971 * vector-builder.h (vector_builder::operator ==): New function.
24972 (vector_builder::operator !=): Likewise.
24973 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24974 (vec_perm_indices::all_from_input_p): New function.
24975 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24976 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24977 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24978 instead of reading the VECTOR_CST directly. Detect whether both
24979 vector inputs are the same before constructing the vec_perm_indices,
24980 and update the number of inputs argument accordingly. Use the
24981 utility functions added above. Only construct sel2 if we need to.
24983 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24985 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24986 the broadcast of the low byte.
24987 (expand_mult_highpart): Use an explicit encoding for the permutes.
24988 * optabs-query.c (can_mult_highpart_p): Likewise.
24989 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24990 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24991 (vectorizable_bswap): Likewise.
24992 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24993 explicit encoding for the power-of-2 permutes.
24994 (vect_permute_store_chain): Likewise.
24995 (vect_grouped_load_supported): Likewise.
24996 (vect_permute_load_chain): Likewise.
24998 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25000 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25001 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25002 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25003 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25004 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25005 (vect_gen_perm_mask_any): Likewise.
25007 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25009 * int-vector-builder.h: New file.
25010 * vec-perm-indices.h: Include int-vector-builder.h.
25011 (vec_perm_indices): Redefine as an int_vector_builder.
25012 (auto_vec_perm_indices): Delete.
25013 (vec_perm_builder): Redefine as a stand-alone class.
25014 (vec_perm_indices::vec_perm_indices): New function.
25015 (vec_perm_indices::clamp): Likewise.
25016 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25017 (vec_perm_indices::new_vector): New function.
25018 (vec_perm_indices::new_expanded_vector): Update for new
25019 vec_perm_indices class.
25020 (vec_perm_indices::rotate_inputs): New function.
25021 (vec_perm_indices::all_in_range_p): Operate directly on the
25022 encoded form, without computing elided elements.
25023 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25024 encoding. Update for new vec_perm_indices class.
25025 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25026 the given vec_perm_builder.
25027 (expand_vec_perm_var): Update vec_perm_builder constructor.
25028 (expand_mult_highpart): Use vec_perm_builder instead of
25029 auto_vec_perm_indices.
25030 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25031 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25032 or double series encoding as appropriate.
25033 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25034 vec_perm_indices instead of auto_vec_perm_indices.
25035 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25036 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25037 (vect_permute_store_chain): Likewise.
25038 (vect_grouped_load_supported): Likewise.
25039 (vect_permute_load_chain): Likewise.
25040 (vect_shift_permute_load_chain): Likewise.
25041 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25042 (vect_transform_slp_perm_load): Likewise.
25043 (vect_schedule_slp_instance): Likewise.
25044 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25045 (vectorizable_mask_load_store): Likewise.
25046 (vectorizable_bswap): Likewise.
25047 (vectorizable_store): Likewise.
25048 (vectorizable_load): Likewise.
25049 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25050 vec_perm_indices instead of auto_vec_perm_indices. Use
25051 tree_to_vec_perm_builder to read the vector from a tree.
25052 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25053 vec_perm_builder instead of a vec_perm_indices.
25054 (have_whole_vector_shift): Use vec_perm_builder and
25055 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25056 truncation to calc_vec_perm_mask_for_shift.
25057 (vect_create_epilog_for_reduction): Likewise.
25058 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25059 from auto_vec_perm_indices to vec_perm_indices.
25060 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25061 instead of changing individual elements.
25062 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25063 the vector in d.perm.
25064 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25065 from auto_vec_perm_indices to vec_perm_indices.
25066 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25067 instead of changing individual elements.
25068 (arm_vectorize_vec_perm_const): Use new_vector to install
25069 the vector in d.perm.
25070 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25071 Update vec_perm_builder constructor.
25072 (rs6000_expand_interleave): Likewise.
25073 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25074 (rs6000_expand_interleave): Likewise.
25076 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25078 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25079 to qimode could truncate the indices.
25080 * optabs.c (expand_vec_perm_var): Likewise.
25082 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25084 * Makefile.in (OBJS): Add vec-perm-indices.o.
25085 * vec-perm-indices.h: New file.
25086 * vec-perm-indices.c: Likewise.
25087 * target.h (vec_perm_indices): Replace with a forward class
25089 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25090 * optabs.h: Include vec-perm-indices.h.
25091 (expand_vec_perm): Delete.
25092 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25093 (expand_vec_perm_const): Declare.
25094 * target.def (vec_perm_const_ok): Replace with...
25095 (vec_perm_const): ...this new hook.
25096 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25097 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25098 * doc/tm.texi: Regenerate.
25099 * optabs.def (vec_perm_const): Delete.
25100 * doc/md.texi (vec_perm_const): Likewise.
25101 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25102 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25103 expand_vec_perm for constant permutation vectors. Assert that
25104 the mode of variable permutation vectors is the integer equivalent
25105 of the mode that is being permuted.
25106 * optabs-query.h (selector_fits_mode_p): Declare.
25107 * optabs-query.c: Include vec-perm-indices.h.
25108 (selector_fits_mode_p): New function.
25109 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25110 is defined, instead of checking whether the vec_perm_const_optab
25111 exists. Use targetm.vectorize.vec_perm_const instead of
25112 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25113 fit in the vector mode before using a variable permute.
25114 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25115 vec_perm_indices instead of an rtx.
25116 (expand_vec_perm): Replace with...
25117 (expand_vec_perm_const): ...this new function. Take the selector
25118 as a vec_perm_indices rather than an rtx. Also take the mode of
25119 the selector. Update call to shift_amt_for_vec_perm_mask.
25120 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25121 Use vec_perm_indices::new_expanded_vector to expand the original
25122 selector into bytes. Check whether the indices fit in the vector
25123 mode before using a variable permute.
25124 (expand_vec_perm_var): Make global.
25125 (expand_mult_highpart): Use expand_vec_perm_const.
25126 * fold-const.c: Includes vec-perm-indices.h.
25127 * tree-ssa-forwprop.c: Likewise.
25128 * tree-vect-data-refs.c: Likewise.
25129 * tree-vect-generic.c: Likewise.
25130 * tree-vect-loop.c: Likewise.
25131 * tree-vect-slp.c: Likewise.
25132 * tree-vect-stmts.c: Likewise.
25133 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25135 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25136 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25137 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25138 (aarch64_vectorize_vec_perm_const): ...this new function.
25139 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25140 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25141 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25142 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25143 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25144 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25145 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25147 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25148 check for NEON modes.
25149 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25150 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25151 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25152 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25154 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25155 the old VEC_PERM_CONST conditions.
25156 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25157 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25158 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25159 (ia64_vectorize_vec_perm_const_ok): Merge into...
25160 (ia64_vectorize_vec_perm_const): ...this new function.
25161 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25162 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25163 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25164 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25165 * config/mips/mips.c (mips_expand_vec_perm_const)
25166 (mips_vectorize_vec_perm_const_ok): Merge into...
25167 (mips_vectorize_vec_perm_const): ...this new function.
25168 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25169 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25170 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25171 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25172 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25173 (rs6000_expand_vec_perm_const): Delete.
25174 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25176 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25177 (altivec_expand_vec_perm_const_le): Take each operand individually.
25178 Operate on constant selectors rather than rtxes.
25179 (altivec_expand_vec_perm_const): Likewise. Update call to
25180 altivec_expand_vec_perm_const_le.
25181 (rs6000_expand_vec_perm_const): Delete.
25182 (rs6000_vectorize_vec_perm_const_ok): Delete.
25183 (rs6000_vectorize_vec_perm_const): New function.
25184 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25185 an element count and rtx array.
25186 (rs6000_expand_extract_even): Update call accordingly.
25187 (rs6000_expand_interleave): Likewise.
25188 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25189 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25190 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25191 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25192 (rs6000_expand_vec_perm_const): Delete.
25193 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25194 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25195 (altivec_expand_vec_perm_const_le): Take each operand individually.
25196 Operate on constant selectors rather than rtxes.
25197 (altivec_expand_vec_perm_const): Likewise. Update call to
25198 altivec_expand_vec_perm_const_le.
25199 (rs6000_expand_vec_perm_const): Delete.
25200 (rs6000_vectorize_vec_perm_const_ok): Delete.
25201 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25202 reference to the SPE evmerge intructions.
25203 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25204 an element count and rtx array.
25205 (rs6000_expand_extract_even): Update call accordingly.
25206 (rs6000_expand_interleave): Likewise.
25207 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25208 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25210 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25212 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25214 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25215 vector mode and that that mode matches the mode of the data
25217 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25218 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25219 directly using expand_vec_perm_1 when forcing selectors into
25221 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25223 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25225 * optabs-query.h (can_vec_perm_p): Delete.
25226 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25227 * optabs-query.c (can_vec_perm_p): Split into...
25228 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25229 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25230 particular selector is valid.
25231 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25232 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25233 (vect_grouped_load_supported): Likewise.
25234 (vect_shift_permute_load_chain): Likewise.
25235 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25236 (vect_transform_slp_perm_load): Likewise.
25237 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25238 (vectorizable_bswap): Likewise.
25239 (vect_gen_perm_mask_checked): Likewise.
25240 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25241 implementations of variable permutation vectors into account
25242 when deciding which selector to use.
25243 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25244 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25245 with a false third argument.
25246 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25247 to test whether the constant selector is valid and can_vec_perm_var_p
25248 to test whether a variable selector is valid.
25250 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25252 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25253 * optabs-query.c (can_vec_perm_p): Likewise.
25254 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25255 instead of vec_perm_indices.
25256 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25257 (vect_gen_perm_mask_checked): Likewise,
25258 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25259 (vect_gen_perm_mask_checked): Likewise,
25261 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25263 * optabs-query.h (qimode_for_vec_perm): Declare.
25264 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25265 (qimode_for_vec_perm): ...this new function.
25266 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25268 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25270 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25271 does not have a conditional at the top.
25273 2018-01-02 Richard Biener <rguenther@suse.de>
25275 * ipa-inline.c (big_speedup_p): Fix expression.
25277 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25280 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25283 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25287 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25288 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25289 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25290 cond_taken_branch_cost 3->4.
25292 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25294 PR tree-optimization/83581
25295 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25296 TODO_cleanup_cfg if any changes have been made.
25298 PR middle-end/83608
25299 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25300 convert_modes if target mode has the right side, but different mode
25303 PR middle-end/83609
25304 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25305 last argument when extracting from CONCAT. If either from_real or
25306 from_imag is NULL, use expansion through memory. If result is not
25307 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25308 the parts directly to inner mode, if even that fails, use expansion
25311 PR middle-end/83623
25312 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25313 check for bswap in mode rather than HImode and use that in expand_unop
25316 Copyright (C) 2018 Free Software Foundation, Inc.
25318 Copying and distribution of this file, with or without modification,
25319 are permitted in any medium without royalty provided the copyright
25320 notice and this notice are preserved.