1 2018-09-11 Nathan Sidwell <nathan@acm.org>
3 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8 for clobbers. Remove obsolete comment.
10 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
12 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
13 mpxchk, mpxld and mpxst types.
14 (define_attr length_immediate): Remove all processing of mpx types.
15 (define_attr prefix_0f): Ditto.
16 (define_attr memory): Ditto.
18 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
20 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
21 (log<mode>2): Change operand 1 predicate to general_operand.
22 Extend operand 1 to XFmode and generate logxf3 insn.
23 (log10<mode>2): Change operand 1 predicate to general_operand.
24 Extend operand 1 to XFmode and generate log10xf3 insn.
25 (log2<mode>2): Change operand 1 predicate to general_operand.
26 Extend operand 1 to XFmode and generate log2xf3 insn.
27 (fyl2xp1_extend<mode>xf3_i387): Remove.
28 (log1p<mode>2): Change operand 1 predicate to general_operand.
29 Extend operand 1 to XFmode and generate log1pxf3 insn.
30 (fxtract_extend<mode>xf3_i387): Remove.
31 (logb<mode>2): Change operand 1 predicate to general_operand.
32 Extend operand 1 to XFmode and generate logbxf3 insn.
33 (ilogb<mode>2): Change operand 1 predicate to general_operand.
34 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
35 (significand<mode>2): Change operand 1 predicate to general_operand.
36 Extend operand 1 to XFmode and generate significandxf3 insn.
38 2018-09-11 Nathan Sidwell <nathan@acm.org>
40 * gcc.c (perror_with_name, pfatal_with_name): Delete.
41 (load_specs): Use fatal_error.
42 (DELETE_IF_ORDINARY, process_command): Use error.
43 (execute, run_attempt): Use fatal_error.
45 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
47 * diagnostic-core.h (sorry_at): New prototype.
48 * diagnostic.c (sorry_at): New function.
50 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
52 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
53 by zero as VR_UNDEFINED.
55 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
57 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
58 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
59 (<sincos>mode2): New expander.
60 (sincos_extend<mode>xf3_i387): Remove insn pattern.
61 (sincos -> sin, cos splitters): Remove splitter patterns.
62 (sincos<mode>3): Change operand 2 predicate to general_operand.
63 Extend operand 2 to XFmode and generate sincosxf3 insn.
64 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
65 Change operand 3 predicate to const1_operand.
66 (fptan_extend<mode>xf4_i387): Remove insn pattern.
67 (tanxf2): Update operands in the call to fptanxf4_i387.
68 (tan<mode>2): Change operand 1 predicate to general_operand.
69 Extend operand 1 to XFmode and generate tanxf3 insn.
70 (atan2xf3): Rename from *fpatanxf3_i387.
71 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
72 (atan2xf3): Remove expander.
73 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
74 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
75 (atan<mode>2): Change operand 1 predicate to general_operand.
76 Extend operand 1 to XFmode and generate atanxf3 insn.
78 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
80 * config/i386/i386.md (x87/SSE constant load splitter): Use
81 memory_operand instead of nonimmediate_operand for input operand
84 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
86 * config/i386/i386.md (float partial SSE register stall splitter): Move
87 splitter near its instruction pattern.
88 (float_extend partial SSE register stall splitter): Ditto.
89 (float_truncate partial SSE register stall splitter): Ditto.
91 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
94 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
95 to speculation_safe_value_not_needed.
98 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
99 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
100 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
101 leaf_function_p, instead use has_hard_reg_initial_val.
103 2018-09-09 Nathan Sidwell <nathan@acm.org>
105 * gcc.h (pfatal_with_name): Don't declare here.
106 * gcc.c (pfatal_with_name): Make static.
108 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
110 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
113 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
115 PR rtl-optimization/85458
116 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
117 priority hook to reduce the priority of EXPR.
119 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
121 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
122 DImode for x87 on 32bit targets. Conditionally disable x87 modes
123 with X87_ENABLE_FLOAT. Remove preparation code.
124 (*float<SWI48:mode><MODEF:mode>2): Rename from
125 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
126 math using "enabled" attribute.
127 (*floatdi<MODEF:mode>2_i387): Rename from
128 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
129 enable for 32bit targets only.
130 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
132 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
133 as operand 1 predicate. Rewrite as define_insn_and_split.
134 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
136 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
138 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
139 to fallthru to FLOAT case.
141 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
144 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
145 around folding of vec_sl to handle out of range shift values.
147 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
149 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
150 Update callers to gen_fix_trunc<mode>_i387_fisttp
151 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
152 nonimmediate_operand.
153 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
154 and corresponding splitters.
155 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
156 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
157 (fix_truncdi_i387_with_temp): Remove insn pattern
158 and corresponding splitters.
159 (fix_trunc<mode>_i387): Change operand 0 predicate to
160 nonimmediate_operand.
161 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
162 and corresponding splitters.
163 (*fistdi2_1): Remove.
165 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
166 (lrintxfdi2): Remove expander. Reimplement as define_insn.
167 (*fist<mode>2_1): Remove.
168 (fist<mode>2): Ditto.
169 (fist<mode>2_with_temp): Remove insn pattern and corresponding
171 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
172 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
173 (fistdi2_<rounding>): Change operand 0 predicate to
174 nonimmediate_operand.
175 (fistdi2_<rounding>_with_temp): Remove insn pattern
176 and corresponding splitters.
177 (fist<mode>2_<rounding>): Change operand 0 predicate to
178 nonimmediate_operand.
179 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
180 and corresponding splitters.
182 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
184 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
186 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
189 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
191 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
192 early gimple folding of vec_splat().
193 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
194 * gimple-fold.h: Add an extern define for tree_vec_extract().
196 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
198 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
199 wrappers around TREE_TYPE comparisons.
201 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
204 * config/s390/predicates.md: Add nonsym_memory_operand.
205 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
206 contains a SYMBOL_REF, load it into an intermediate pseudo.
207 (s390_emit_compare_and_swap): Legitimize operand.
208 * config/s390/s390.md: Use the new nonsym_memory_operand
209 with UNSPECV_CAS patterns.
211 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
214 * config/s390/s390-passes.def: New file.
215 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
217 (make_pass_s390_early_mach): Add declaration.
218 * config/s390/s390.c (make_pass_s390_early_mach):
219 (s390_option_override): Remove dynamic registration.
220 * config/s390/t-s390: Add s390-passes.def.
222 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
224 * config/s390/s390.c (s390_decompose_constant_pool_ref):
225 Remove UNSPEC_LTREL_BASE check.
226 (annotate_constant_pool_refs): Likewise.
227 (find_constant_pool_ref): Likewise.
228 (find_ltrel_base): Removed.
229 (replace_ltrel_base): Removed.
230 (s390_mainpool_finish): Remove replace_ltrel_base call.
231 (s390_chunkify_start): Remove pending LTREL_BASE logic.
232 (s390_chunkify_finish): Remove replace_ltrel_base call.
233 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
235 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
238 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
239 to speculation_safe_value_not_needed.
241 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
242 Bernd Schmidt <bernds_cb1@t-online.de>
244 * config/nvptx/nvptx-opts.h: New file.
245 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
246 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
248 (TARGET_SM35): New macro.
249 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
251 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
254 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
256 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
258 * config/i386/i386.md (truncdfsf2): Remove expander.
259 (truncdfsf2_with_temp): Ditto.
260 (truncxf<mode>2): Ditto.
261 (*truncdfsf_fast_mixed): Remove insn pattern.
262 (*truncdfsf_fast_i387): Ditto.
263 (*truncdfsf_mixed): Ditto.
264 (*truncdfsf_i387): Ditto.
265 (*truncdfsf2_i387_1): Ditto.
266 (*truncxfsf2_mixed): Ditto.
267 (*truncxfdf2_mixed): Ditto.
268 (*truncxf<mode>2_i387_noop): Ditto. Update callers
269 to call gen_truncxf<mode>2 instead.
270 (*truncxf<mode>2_i387): Remove.
271 (reg->reg splitters): Remove splitter pattern.
272 (reg->mem splitters): Ditto.
274 (truncdfsf2): New insn pattern.
275 (truncxf<mode>2): Ditto.
277 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
279 * tree-ssa-math-opts.c (is_mult_by): New function.
280 (is_square_of): Use the above.
281 (optimize_recip_sqrt): New function.
282 (pass_cse_reciprocals::execute): Use the above.
284 2018-09-05 Richard Biener <rguenther@suse.de>
287 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
288 to zero-init the emplaced vec.
290 2018-09-05 Martin Liska <mliska@suse.cz>
292 PR tree-optimization/87205
293 * tree-switch-conversion.c (pass_lower_switch::execute):
294 Group cases for switch statements.
296 2018-09-05 Richard Biener <rguenther@suse.de>
298 PR tree-optimization/87217
299 * tree-ssa-sccvn.c (vuse_valueize): New.
300 (vn_reference_lookup_pieces): Use it.
301 (vn_reference_lookup): Likewise.
303 2018-09-05 Nathan Sidwell <nathan@acm.org>
306 * stor-layout.c (place_field): Scan forwards to check last
307 bitfield when ms_bitfield_placement is in effect.
309 2018-09-05 Richard Biener <rguenther@suse.de>
312 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
315 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
316 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
318 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
319 * config.gcc (extra_objs): Build it.
320 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
322 * config/aarch64/aarch64-passes.def
323 (pass_tag_collision_avoidance): New pass.
324 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
325 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
326 (aarch64_classify_address): Remove static qualifier.
327 (aarch64_address_info, aarch64_address_type): Move to...
328 * config/aarch64/aarch64-protos.h: ... here.
329 (make_pass_tag_collision_avoidance): New function.
330 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
333 2018-09-05 Martin Liska <mliska@suse.cz>
335 * doc/gcov.texi: Update documentation of humar
337 * gcov.c (format_count): Print one decimal place, it provides
338 more fine number of situations like '1G' vs. '1.4G'.
340 2018-09-05 Martin Liska <mliska@suse.cz>
343 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
344 * optc-gen.awk: Allow 'Var' for Deprecated options in order
345 to generate a MASK value.
347 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
350 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
351 if frame pointer isn't used.
352 (compute_frame_pointer_to_fb_displacement): Likewise.
354 2018-09-04 Jakub Jelinek <jakub@redhat.com>
357 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
358 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
359 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
360 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
361 and OPTION_MASK_ISA_XSAVEC_UNSET.
363 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
365 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
366 XOR operations in NAND case.
368 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
370 * wide-int-range.cc (wide_int_range_convert): New.
371 * wide-int-range.h (wide_int_range_convert): New.
372 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
373 code into wide_int_range_convert.
374 (extract_range_into_wide_ints): Do not munge anti range constants
375 into the entire domain. Just return the range back.
377 2018-09-04 Martin Liska <mliska@suse.cz>
379 * genmatch.c (output_line_directive): Add new argument
381 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
383 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
385 * doc/invoke.texi (Option Summary): Add whitespace.
387 * doc/invoke.texi (Option Summary): Add -Waligned-new.
389 2018-09-04 Richard Biener <rguenther@suse.de>
391 PR tree-optimization/87211
392 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
393 backedge value we're supposed to treat as VARYING also number
394 the PHI to VARYING in case it got a different value-number already.
396 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
398 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
399 (extract_range_from_binary_expr_1): Do not call
400 vrp_can_optimize_bit_op.
401 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
403 (wide_int_range_get_mask_and_bounds): New.
404 (wide_int_range_optimize_bit_op): New.
405 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
406 (wide_int_range_bit_and): Same.
407 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
408 (wide_int_range_optimize_bit_op): New.
409 (wide_int_range_get_mask_and_bounds): New.
411 2018-09-04 Richard Biener <rguenther@suse.de>
413 PR tree-optimization/87176
414 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
415 variable. When value-numbering a virtual PHI node make sure
416 to not value-number to the backedge value.
418 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
420 * doc/extend.texi (Long Long, Hex Floats): Document support for
421 long long and hex floats in more recent versions of ISO C++.
423 2018-09-03 Richard Biener <rguenther@suse.de>
425 PR tree-optimization/87177
426 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
429 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
431 * bb-reorder.c (edge_order): Convert to C-qsort-style
432 tri-state comparator.
433 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
435 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
437 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
438 tri-state comparator.
439 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
441 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
443 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
444 (mergesort): ... here as maximum count for using netsort.
445 (gcc_qsort): Set nlim to 3 if stable sort is requested.
446 (gcc_stablesort): New.
447 * system.h (gcc_stablesort): Declare.
449 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
451 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
452 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
453 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
455 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
457 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
458 lxsdx and stxsdx alternatives.
459 (*mov<mode>_hardfloat64): Ditto.
460 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
462 2018-09-03 Richard Biener <rguenther@suse.de>
464 PR tree-optimization/87200
465 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
468 2018-09-03 Martin Liska <mliska@suse.cz>
470 PR tree-optimization/87201
471 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
472 Fix parenthesis in an expression.
474 2018-09-03 Richard Biener <rguenther@suse.de>
476 PR tree-optimization/87197
477 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
478 visited. CSE the VN_INFO hashtable lookup.
480 PR tree-optimization/87169
481 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
482 iterating make sure there's no extra backedges from irreducible
483 regions feeding the header. Mark the destination block
486 2018-09-03 Martin Liska <mliska@suse.cz>
489 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
490 * common/common-targhooks.c (default_get_valid_option_values):
492 * common/common-targhooks.h (default_get_valid_option_values):
494 * common/config/i386/i386-common.c: Move processor_target_table
496 (ix86_get_valid_option_values): New function.
497 (TARGET_GET_VALID_OPTION_VALUES): New macro.
498 * config/i386/i386.c (struct ptt): Move to i386-common.c.
499 (PTA_*): Move all defined masks into i386-common.c.
500 (ix86_function_specific_restore): Use new processor_cost_table.
501 * config/i386/i386.h (struct ptt): Moved from i386.c.
502 (struct pta): Likewise.
503 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
504 * doc/tm.texi.in: Likewise.
505 * opt-suggestions.c (option_proposer::suggest_option):
506 Pass prefix to build_option_suggestions.
507 (option_proposer::get_completions): Likewise.
508 (option_proposer::build_option_suggestions): Use the new target
510 * opts.c (struct option_help_tuple): New struct.
511 (print_filtered_help): Use the new target hook.
513 2018-09-03 Martin Liska <mliska@suse.cz>
516 * predict.c (set_even_probabilities): Add likely_edges
517 argument and handle cases where we have precisely one
519 (combine_predictions_for_bb): Catch also likely_edges.
520 (tree_predict_by_opcode): Handle gswitch statements.
521 * tree-cfg.h (find_case_label_for_value): New declaration.
522 (find_taken_edge_switch_expr): Likewise.
523 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
524 Find pivot in decision tree based on probabily, not by number of
527 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
529 * doc/standards.texi (Standards): Update Objective-C reference.
531 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
533 * doc/install.texi (Prerequisites): Update link for MPC.
535 2018-09-01 Michael Matz <matz@suse.de>
537 PR tree-optimization/87074
538 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
539 PHIs for outer-loop uses.
541 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
543 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
544 * doc/invoke.texi (C Dialect Options): Ditto.
546 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
548 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
550 2018-08-31 Richard Biener <rguenther@suse.de>
552 PR tree-optimization/87168
553 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
554 (rpo_elim::eliminate_avail): When OP was not visited it must
557 2018-08-31 David Malcolm <dmalcolm@redhat.com>
559 * tree-vrp.c (copy_value_range): Convert param "from" from
560 "value_range *" to "const value_range *".
561 (range_is_null): Likewise for param "vr".
562 (range_int_cst_p): Likewise.
563 (range_int_cst_singleton_p): Likewise.
564 (symbolic_range_p): Likewise.
565 (value_ranges_intersect_p): Likewise for both params.
566 (value_range_nonnegative_p): Likewise for param "vr".
567 (value_range_constant_singleton): Likewise.
568 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
569 (extract_range_into_wide_ints): Likewise for param "vr".
570 (extract_range_from_multiplicative_op): Likewise for params "vr0"
572 (vrp_can_optimize_bit_op): Likewise.
573 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
575 (extract_range_from_unary_expr): Likewise.
576 (debug_value_range): Likewise for param "vr".
577 (value_range::dump): Add "const" qualifier.
578 (vrp_prop::check_array_ref): Convert local "vr" from
579 "value_range *" to "const value_range *".
580 (vrp_prop::check_mem_ref): Likewise.
581 (vrp_prop::visit_stmt): Likewise for local "old_vr".
582 (vrp_intersect_ranges_1): Likewise for param "vr_1".
583 (vrp_intersect_ranges): Likewise.
584 (simplify_stmt_for_jump_threading): Likewise for local "vr".
585 (vrp_prop::vrp_finalize): Likewise.
586 * tree-vrp.h (value_range::dump): Add "const" qualifier.
587 (vrp_intersect_ranges): Add "const" qualifier to params as above.
588 (extract_range_from_unary_expr): Likewise.
589 (value_range_constant_singleton): Likewise.
590 (symbolic_range_p): Likewise.
591 (copy_value_range): Likewise.
592 (extract_range_from_binary_expr_1): Likewise.
593 (range_int_cst_p): Likewise.
594 (vrp_set_zero_nonzero_bits): Likewise.
595 (range_int_cst_singleton_p): Likewise.
597 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
599 * config/aarch64/arm_neon.h (vabsd_s64): New.
600 (vnegd_s64): Likewise.
602 2018-08-31 Martin Jambor <mjambor@suse.cz>
604 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
606 2018-08-31 Martin Liska <mliska@suse.cz>
608 * ipa-icf.c (sem_item::add_type): Use
609 sem_item::m_type_hash_cache.
610 * ipa-icf.h: Move the cache from sem_item_optimizer
613 2018-08-31 Nathan Sidwell <nathan@acm.org>
615 * doc/extend.texi (Backwards Compatibility): Remove implicit
616 extern C leeway of () being (...).
618 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
620 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
622 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
626 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
628 2018-08-31 Jakub Jelinek <jakub@redhat.com>
631 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
632 gen_int_mode. Formatting fixes.
634 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
636 * target.def (custom_function_descriptors): Improve documentation.
637 * doc/tm.texi.in (Trampolines): Expand discussion of function
638 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
639 beginning of the section.
640 * doc/tm.texi: Regenerated.
642 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
644 * cfg.h (class auto_edge_flag): Spell out the template-id of the
645 base class in the initializer list. This is a workaround for
646 building with older GCC.
647 (class auto_bb_flag): Likewise.
649 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
651 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
652 (altivec_vcmpequ<VI_char>_p): Remove star.
653 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
655 (expand_strncmp_vec_sequence): New function.
656 (emit_final_str_compare_vec): New function.
657 (expand_strn_compare): Add support for vector strncmp.
658 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
659 length specification to bytes.
660 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
661 (vcmpnezb_p): New pattern.
662 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
663 for option -mstring-compare-inline-limit.
665 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
667 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
668 (PTA_SKYLAKE): Add PTA_AES.
669 (PTA_GOLDMONT): Likewise.
671 2018-08-29 Jan Hubicka <jh@suse.cz>
674 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
675 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
677 2018-08-29 Jan Hubicka <jh@suse.cz>
679 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
681 (hash_tree): Do not visit TYPE_STUB_DECL.
682 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
683 stream TYPE_STUB_DECL.
684 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
685 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
686 after free_lang_data.
687 (type_in_anonymous_namespace_p): Likewise.
689 2018-08-29 Jan Hubicka <jh@suse.cz>
691 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
692 comment that it has to be even number.
693 (class sreal): Change m_sig type to int32_t.
694 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
695 int64_t for temporary calculations.
696 (sreal_verify_basics): Drop one bit from minimum and maximum.
698 2018-08-30 Richard Biener <rguenther@suse.de>
700 PR tree-optimization/87147
701 * tree-ssa-sccvn.c (SSA_VISITED): New function.
702 (visit_phi): When the degenerate result is from the backedge and
703 we didn't visit its definition yet drop to VARYING.
704 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
706 2018-08-29 Jan Hubicka <jh@suse.cz>
708 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
710 (hash_tree): Likewise.
712 2018-08-29 Jan Hubicka <jh@suse.cz>
714 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
715 and TYPE_NEXT_REF_TO.
717 2018-08-29 Jan Hubicka <jh@suse.cz>
719 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
720 comment that it has to be even number.
721 (class sreal): Change m_sig type to int32_t.
722 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
723 int64_t for temporary calculations.
724 (sreal_verify_basics): Drop one bit from minimum and maximum.
726 2018-08-30 Tamar Christina <tamar.christina@arm.com>
728 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
730 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
733 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
734 if to_add is negative.
736 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
739 * builtins.c (c_strlen): Improve range checks.
741 2018-08-29 Martin Sebor <msebor@redhat.com>
742 Jeff Law <law@redhat.com>
744 PR tree-optimization/86714
745 PR tree-optimization/86711
746 * builtins.c (c_strlen): Add arguments to call to string_constant.
747 * expr.c (string_constant): Add argument. Detect missing nul
748 terminator and outermost declaration it's missing in.
749 * expr.h (string_constant): Add argument.
750 * fold-const.c (read_from_constant_string): Add arguments to call to
752 (c_getstr): Likewise.
753 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
755 * tree-ssa-strlen.c (get_stridx): Likewise.
757 2018-08-29 Jan Hubicka <jh@suse.cz>
759 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
760 Do not stream DECL_VINDEX.
761 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
762 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
763 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
765 2018-08-29 Richard Biener <rguenther@suse.de>
767 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
768 virtual operands that are not default defs to honor region
770 (rpo_vn_valueize): Remove ineffective code here.
772 2018-08-29 Richard Biener <rguenther@suse.de>
774 PR tree-optimization/87132
775 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
776 when skipping defs reachable over backedges.
778 2018-08-29 Richard Biener <rguenther@suse.de>
780 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
781 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
782 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
783 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
784 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
785 (vn_reference_lookup_3): Remove use of const_parms.
786 (free_rpo_vn): Do not free const_parms.
787 (do_rpo_vn): Do not call init_const_parms.
788 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
789 SSA_NAME_POINTS_TO_READONLY_MEMORY.
790 (call_may_clobber_ref_p_1): Likewise.
792 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
795 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
797 (-ftree-scev-cprop): Document.
799 2018-08-29 Jan Hubicka <jh@suse.cz>
801 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
803 (sreal constructor): Update.
804 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
805 sreal:operator/): Update.
807 2018-08-29 Martin Liska <mliska@suse.cz>
809 * tree-switch-conversion.c (switch_conversion::expand):
810 Strenghten assumption about gswitch statements.
812 2018-08-29 Richard Biener <rguenther@suse.de>
814 PR tree-optimization/87117
815 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
816 re-value-number released SSA VDEFs.
818 2018-08-29 Richard Biener <rguenther@suse.de>
820 PR tree-optimization/87126
821 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
823 2018-08-28 Jim Wilson <jimw@sifive.com>
825 * config/riscv/pic.md: Rewrite.
826 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
828 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
829 (SOFTF, default_load, softload, softstore): New.
831 2018-08-28 Jeff Law <law@redhat.com>
833 * fold-const.c (fold_binary_loc): Remove recently added assert.
835 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
837 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
838 to OP parmeter of generated function.
840 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
842 PR tree-optimization/87009
843 * match.pd: Add boolean optimizations.
845 2018-08-28 Martin Sebor <msebor@redhat.com>
848 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
849 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
850 (pass_walloca::gate): Use it.
851 (alloca_call_type): Same.
852 (pass_walloca::execute): Same.
853 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
855 2018-08-28 David Malcolm <dmalcolm@redhat.com>
857 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
858 GCC_VERSION for usage of "__gcc_dump_printf__" format from
861 2018-08-28 Richard Biener <rguenther@suse.de>
863 PR tree-optimization/87124
864 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
865 constants before looking up avail.
867 2018-08-28 Jakub Jelinek <jakub@redhat.com>
870 * calls.c (maybe_warn_nonstring_arg): Punt early if
871 warn_stringop_overflow is zero. Don't call get_range_strlen
872 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
873 Swap comparison operands to have constants on rhs. Only use
874 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
877 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
879 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
880 use of tree_to_shwi. Remove duplicated test for the size being
881 a whole number of bytes.
883 2018-08-28 Richard Biener <rguenther@suse.de>
885 PR tree-optimization/87117
886 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
887 Handle removed stmt without LHS (GIMPLE_NOP).
889 2018-08-28 Richard Biener <rguenther@suse.de>
891 PR tree-optimization/87117
892 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
893 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
895 2018-08-28 Richard Biener <rguenther@suse.de>
897 PR tree-optimization/87117
898 * tree-ssa-pre.c (compute_avail): Do not make expressions
899 with predicated values available.
900 (get_expr_value_id): Assert we do not run into predicated value
903 2018-08-28 Richard Biener <rguenther@suse.de>
905 PR tree-optimization/87117
906 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
907 get virtual operands.
908 (get_expr_operands): Handle STRING_CST like other decls.
910 2018-08-28 Martin Liska <mliska@suse.cz>
912 * tree.h: Update documentation of fndecl_built_in_p
916 2018-08-27 Jeff Law <law@redhat.com>
917 PR tree-optimization/87110
918 * tree-ssa-dse.c (compute_trims): Handle non-constant
921 2018-08-27 Martin Sebor <msebor@redhat.com>
923 PR tree-optimization/86914
924 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
926 2018-08-27 Martin Sebor <msebor@redhat.com>
928 PR tree-optimization/87112
929 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
930 the type of the bound argument.
932 2018-08-27 Jeff Law <law@redhat.com>
934 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
935 type does not have a TYPE_SIZE_UNIT.
937 2018-08-27 Steve Ellcey <sellcey@cavium.com>
939 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
940 with include of backend.h.
942 2018-08-27 Richard Biener <rguenther@suse.de>
944 PR tree-optimization/86927
945 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
946 use const cond reduction code.
948 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
950 PR tree-optimization/85758
951 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
953 2018-08-27 David Malcolm <dmalcolm@redhat.com>
956 * diagnostic-show-locus.c (class layout_range): Update for
957 conversion of show_caret_p to a tri-state.
958 (layout_range::layout_range): Likewise.
959 (make_range): Likewise.
960 (layout::maybe_add_location_range): Likewise.
961 (layout::should_print_annotation_line_p): Don't show annotation
962 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
963 (layout::get_state_at_point): Update for conversion of
964 show_caret_p to a tri-state. Bail out early for
965 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
966 underlining or source colorization.
967 (gcc_rich_location::add_location_if_nearby): Update for conversion
968 of show_caret_p to a tri-state.
969 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
970 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
972 (selftest::test_one_liner_labels): Likewise.
973 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
974 conversion of show_caret_p to a tri-state.
975 * pretty-print.c (text_info::set_location): Likewise.
976 * pretty-print.h (text_info::set_location): Likewise.
977 * substring-locations.c (format_warning_n_va): Likewise.
978 * tree-diagnostic.c (default_tree_printer): Likewise.
979 * tree-pretty-print.c (newline_and_indent): Likewise.
981 2018-08-27 David Malcolm <dmalcolm@redhat.com>
984 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
985 line above for line-insertion fix-it hints.
986 (selftest::test_fixit_insert_containing_newline): Update the
987 expected results, and add a test with line-numbering enabled.
989 2018-08-27 Martin Liska <mliska@suse.cz>
992 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
993 params with DECL_HAS_VALUE_EXPR_P.
995 2018-08-27 Martin Liska <mliska@suse.cz>
997 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
998 selected expansion strategy.
1000 2018-08-27 Martin Liska <mliska@suse.cz>
1002 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1003 * builtins.c (is_builtin_fn): Likewise.
1004 * attribs.c (diag_attr_exclusions): Use new function
1005 fndecl_built_in_p and remove check for FUNCTION_DECL if
1007 (builtin_mathfn_code): Likewise.
1008 (fold_builtin_expect): Likewise.
1009 (fold_call_expr): Likewise.
1010 (fold_builtin_call_array): Likewise.
1011 (fold_call_stmt): Likewise.
1012 (set_builtin_user_assembler_name): Likewise.
1013 (is_simple_builtin): Likewise.
1014 * calls.c (gimple_alloca_call_p): Likewise.
1015 (maybe_warn_nonstring_arg): Likewise.
1016 * cfgexpand.c (expand_call_stmt): Likewise.
1017 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1018 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1019 (cgraph_node::verify_node): Likewise.
1020 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1021 (cgraph_node::create_clone): Likewise.
1022 * config/arm/arm.c (arm_insert_attributes): Likewise.
1023 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1024 * dse.c (scan_insn): Likewise.
1025 * expr.c (expand_expr_real_1): Likewise.
1026 * fold-const.c (operand_equal_p): Likewise.
1027 (fold_binary_loc): Likewise.
1028 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1029 * gimple-low.c (lower_stmt): Likewise.
1030 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1031 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1032 * gimple.c (gimple_build_call_from_tree): Likewise.
1033 (gimple_call_builtin_p): Likewise.
1034 (gimple_call_combined_fn): Likewise.
1035 * gimplify.c (gimplify_call_expr): Likewise.
1036 (gimple_boolify): Likewise.
1037 (gimplify_modify_expr): Likewise.
1038 (gimplify_addr_expr): Likewise.
1039 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1040 * ipa-cp.c (determine_versionability): Likewise.
1041 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1042 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1043 * ipa-split.c (visit_bb): Likewise.
1044 (split_function): Likewise.
1045 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1046 * lto-cgraph.c (input_node): Likewise.
1047 * lto-streamer-out.c (write_symbol): Likewise.
1048 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1049 (lower_omp_1): Likewise.
1050 * predict.c (strip_predict_hints): Likewise.
1051 * print-tree.c (print_node): Likewise.
1052 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1053 * trans-mem.c (is_tm_irrevocable): Likewise.
1054 (is_tm_load): Likewise.
1055 (is_tm_simple_load): Likewise.
1056 (is_tm_store): Likewise.
1057 (is_tm_simple_store): Likewise.
1058 (is_tm_abort): Likewise.
1059 (tm_region_init_1): Likewise.
1060 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1061 * tree-cfg.c (verify_gimple_call): Likewise.
1062 (move_stmt_r): Likewise.
1063 (stmt_can_terminate_bb_p): Likewise.
1064 * tree-eh.c (lower_eh_constructs_2): Likewise.
1065 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1066 * tree-inline.c (remap_gimple_stmt): Likewise.
1067 (copy_bb): Likewise.
1068 (estimate_num_insns): Likewise.
1069 (fold_marked_statements): Likewise.
1070 * tree-sra.c (scan_function): Likewise.
1071 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1072 (optimize_stack_restore): Likewise.
1073 (pass_fold_builtins::execute): Likewise.
1074 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1075 (mark_all_reaching_defs_necessary_1): Likewise.
1076 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1077 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1078 (pass_forwprop::execute): Likewise.
1079 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1080 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1081 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1082 * tree-ssa-strlen.c (get_string_length): Likewise.
1083 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1084 (find_func_aliases_for_call): Likewise.
1085 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1086 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1087 * tree-tailcall.c (find_tail_calls): Likewise.
1088 * tree.c (need_assembler_name_p): Likewise.
1089 (free_lang_data_in_decl): Likewise.
1090 (get_call_combined_fn): Likewise.
1091 * ubsan.c (is_ubsan_builtin_p): Likewise.
1092 * varasm.c (incorporeal_function_p): Likewise.
1093 * tree.h (DECL_BUILT_IN): Remove and replace with
1095 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1096 (fndecl_built_in_p): New.
1098 2018-08-27 Martin Liska <mliska@suse.cz>
1100 PR tree-optimization/86847
1101 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1102 Dump also subtree probability.
1103 (switch_decision_tree::do_jump_if_equal): New function.
1104 (switch_decision_tree::emit_case_nodes): Handle special
1105 situations in balanced tree that can be emitted much simpler.
1106 Fix calculation of probabilities that happen in tree expansion.
1107 * tree-switch-conversion.h (struct cluster): Add
1109 (struct simple_cluster): Likewise.
1110 (struct case_tree_node): Add new function has_child.
1111 (do_jump_if_equal): New.
1113 2018-08-27 Martin Liska <mliska@suse.cz>
1115 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1116 Add new argument to bit_test_cluster constructor.
1117 (bit_test_cluster::emit): Set bits really number of values
1119 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1120 probability argument.
1121 * tree-switch-conversion.h (struct bit_test_cluster):
1122 Add m_handles_entire_switch.
1124 2018-08-27 Martin Liska <mliska@suse.cz>
1126 PR tree-optimization/86702
1127 * tree-switch-conversion.c (jump_table_cluster::emit):
1128 Make probabilities even for values in jump table
1129 according to number of cases handled.
1130 (switch_decision_tree::compute_cases_per_edge): Pass
1131 argument to reset_out_edges_aux function.
1132 (switch_decision_tree::analyze_switch_statement): Likewise.
1133 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1136 2018-08-27 Martin Liska <mliska@suse.cz>
1138 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1139 cfun argument explicitly.
1140 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1141 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1142 function gimple_switch_default_bb.
1143 (convert_switch_statements):
1145 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1146 * stmt.c (label_to_block_fn): Use label_to_block and pass
1147 cfun argument explicitly and use gimple_switch_label_bb.
1148 (expand_case): Likewise.
1149 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1150 cfun argument explicitly. Likewise.
1151 (make_edges_bb): Likewise.
1152 (make_cond_expr_edges): Likewise.
1153 (get_cases_for_edge): Likewise.
1154 (make_gimple_switch_edges): Likewise.
1155 (label_to_block_fn): Likewise.
1156 (label_to_block): Likewise.
1157 (make_goto_expr_edges): Likewise.
1158 (make_gimple_asm_edges): Likewise.
1159 (main_block_label): Likewise.
1160 (group_case_labels_stmt): Likewise.
1161 (find_taken_edge_computed_goto): Likewise.
1162 (find_taken_edge_switch_expr): Likewise.
1163 (gimple_verify_flow_info): Likewise.
1164 (gimple_redirect_edge_and_branch): Likewise.
1165 (gimple_switch_label_bb): New function.
1166 (gimple_switch_default_bb): Likewise.
1167 (gimple_switch_edge): Likewise.
1168 (gimple_switch_default_edge): Likewise.
1169 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1170 (label_to_block): ... with this.
1171 (gimple_switch_label_bb): New.
1172 (gimple_switch_default_bb): Likewise.
1173 (gimple_switch_edge): Likewise.
1174 (gimple_switch_default_edge): Likewise.
1175 * tree-cfgcleanup.c (convert_single_case_switch): Use
1176 new gimple functions and pass new argument to label_to_block.
1177 (cleanup_control_flow_bb):
1178 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1179 cfun argument explicitly.
1180 (make_eh_edges): Likewise.
1181 (redirect_eh_dispatch_edge): Likewise.
1182 (lower_resx): Likewise.
1183 (lower_eh_dispatch): Likewise.
1184 (maybe_remove_unreachable_handlers): Likewise.
1185 (unsplit_eh): Likewise.
1186 (cleanup_empty_eh): Likewise.
1187 (verify_eh_edges): Likewise.
1188 (verify_eh_dispatch_edge): Likewise.
1189 * tree-ssa-dom.c (record_edge_info): Likewise.
1190 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1191 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1192 (thread_through_normal_block): Likewise.
1193 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1194 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1195 * tree-switch-conversion.c (switch_conversion::collect): Use new
1197 (switch_conversion::check_final_bb): Likewise.
1198 (switch_conversion::gather_default_values): Pass new argument
1200 (switch_conversion::build_constructors): Likewise.
1201 (switch_decision_tree::compute_cases_per_edge): Use new
1202 gimple_switch_edge function.
1203 (switch_decision_tree::analyze_switch_statement): Pass new argument
1205 (switch_decision_tree::try_switch_expansion): Use
1206 gimple_switch_default_edge.
1207 * tree-vrp.c (find_switch_asserts): Pass new argument
1209 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1210 (vr_values::simplify_switch_using_ranges): Likewise.
1212 2018-08-27 Richard Biener <rguenther@suse.de>
1214 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1215 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1217 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1218 (struct vn_nary_op_s): Add unwind_to member. Add
1219 predicated_values flag and put result into a union together
1220 with a linked list of vn_pval.
1221 (struct vn_ssa_aux): Add name member to make maintaining
1222 a map of SSA name to vn_ssa_aux possible. Remove no longer
1223 needed info, dfsnum, low, visited, on_sccstack, use_processed
1224 and range_info_anti_range_p members.
1225 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1226 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1228 (vn_valueize): New global.
1229 (vn_context_bb): Likewise.
1230 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1231 VN_INFO_PTR_INFO): Remove.
1232 * tree-ssa-sccvn.c: ... (rewrite)
1233 (pass_fre::execute): For -O2+ initialize loops and run
1234 RPO VN in optimistic mode (iterating). For -O1 and -Og
1235 run RPO VN in non-optimistic mode.
1236 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1237 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1238 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1239 (rpo-vn-max-loop-depth): Document.
1240 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1241 when valuezing the VUSE signals we walked out of the region.
1242 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1243 (phi_translate): Set VN context block to use for availability
1245 (compute_avail): Likewise.
1246 (pre_valueize): New function.
1247 (pass_pre::execute): Adjust to the RPO VN API.
1249 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1250 (propagate_constants_for_unrolling): Remove.
1251 (tree_unroll_loops_completely): Perform value-numbering
1252 on the unrolled bodies loop parent.
1254 2018-08-27 Richard Biener <rguenther@suse.de>
1256 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1257 for partial antic compute.
1259 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1261 PR rtl-optimization/87065
1262 * combine.c (simplify_if_then_else): Formatting fix.
1263 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1265 (known_cond): Don't return const_true_rtx for vector modes. Use
1266 CONST0_RTX instead of const0_rtx. Formatting fixes.
1268 2018-08-27 Martin Liska <mliska@suse.cz>
1270 PR gcov-profile/87069
1271 * gcov.c (process_file): Record files already processed
1272 and warn about a file being processed multiple times.
1274 2018-08-27 Martin Liska <mliska@suse.cz>
1277 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1278 Set default values for x_aarch64_*_string strings.
1279 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1280 prefix. For -mabi do not print '=ABI' in help and use
1281 <option_value> format for -msve-vector-bits and -moverride
1284 2018-08-26 Jeff Law <law@redhat.com>
1286 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1289 2018-08-26 Marek Polacek <polacek@redhat.com>
1291 PR c++/87029, Implement -Wredundant-move.
1292 * doc/invoke.texi: Document -Wredundant-move.
1294 2018-08-25 Martin Sebor <msebor@redhat.com>
1296 PR tree-optimization/87059
1297 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1298 to the same type as the other.
1299 * fold-const.c (fold_binary_loc): Assert expectation.
1301 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1303 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1304 extraneous parentheses, dead code section and formatting.
1306 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1309 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1310 wide enough for jumps in the line-numbering to be visible.
1311 (layout::print_gap_in_line_numbering): New member function.
1312 (layout::calculate_line_spans): When using line numbering, merge
1313 line spans that are only 1 line apart.
1314 (diagnostic_show_locus): When printing line numbers, show gaps in
1315 line numbering directly, rather than printing headers.
1316 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1317 line-numbering with multiple line spans.
1318 (selftest::test_fixit_insert_containing_newline_2): Add test of
1319 line-numbering, in which the spans are close enough to be merged.
1321 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1323 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1324 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1325 * tree-vrp.c (range_is_nonnull): Remove.
1326 (range_includes_zero_p): Accept value_range instead of min/max.
1327 (extract_range_from_binary_expr_1): Do not early bail on
1329 Use range_includes_zero_p instead of range_is_nonnull.
1330 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1331 of range_is_nonnull.
1332 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1333 special case VR_ANTI_RANGE.
1334 (vrp_finalize): Same.
1335 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1337 (range_is_nonnull): Remove.
1338 * vr-values.c (vrp_stmt_computes_nonzero): Use
1339 range_includes_zero_p instead of range_is_nonnull.
1340 (extract_range_basic): Pass value_range to range_includes_zero_p
1341 instead of range_is_nonnull.
1343 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1345 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1346 * emit-rtl.h (rtl_data): Remove return_bnd.
1347 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1348 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1349 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1350 (POINTER_BOUNDS_MODE): Remove definition.
1351 (make_pointer_bounds_mode): Remove.
1352 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1353 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1354 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1355 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1356 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1357 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1358 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1360 * config/i386/i386-modes.def (BND32, BND64): Remove.
1361 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1362 (dbx64_register_map): Ditto.
1363 (svr4_dbx_register_map): Ditto.
1364 (indirect_thunk_bnd_needed): Remove.
1365 (indirect_thunks_bnd_used): Ditto.
1366 (indirect_return_bnd_needed): Ditto.
1367 (indirect_return_via_cx_bnd): Ditto.
1368 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1369 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1370 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1371 (output_indirect_thunk_function): Remove handling of
1372 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1373 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1374 (ix86_save_reg): Remove handling of crtl->return_bnd.
1375 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1376 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1377 and UNSPEC_BNDLX_ADDR.
1378 (ix86_output_indirect_branch_via_reg): Remove handling of
1379 indirect_thunk_prefix_bnd.
1380 (ix86_output_indirect_branch_via_push): Ditto.
1381 (ix86_output_function_return): Ditto.
1382 (ix86_output_indirect_function_return): Ditto.
1383 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1384 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1385 (CALL_USED_REGISTERS): Ditto.
1386 (REG_ALLOC_ORDER): Update for removal of bound registers.
1387 (HI_REGISTER_NAMES): Ditto.
1388 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1389 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1390 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1391 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1392 (FIRST_PSEUDO_REG): Update.
1393 (BND): Remove mode iterator.
1394 * config/i386/predicates.md (bnd_mem_operator): Remove.
1396 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1398 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1401 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1403 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1404 the case in which the permute needs only a single element and
1405 repeats for every vector of the result. Extend that case to
1406 handle variable-length vectors.
1407 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1409 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1412 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1413 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1415 2018-08-24 Richard Biener <rguenther@suse.de>
1417 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1418 bb_flags_allocated members.
1419 (auto_flag): New RAII class for allocating flags.
1420 (auto_edge_flag): New RAII class for allocating edge flags.
1421 (auto_bb_flag): New RAII class for allocating bb flags.
1422 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1424 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1425 in favor of temporarily allocated BB flag.
1426 * hsa-brig.c: Re-order includes.
1427 * hsa-dump.c: Likewise.
1428 * hsa-regalloc.c: Likewise.
1429 * print-rtl.c: Likewise.
1430 * profile-count.c: Likewise.
1432 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1435 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1438 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1441 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1442 from wide_int_range_multiplicative_op.
1444 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1446 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1449 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1451 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1454 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1456 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1457 full GENERIC expression used for replacement.
1459 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1461 * tree-vrp.c (abs_extent_range): Remove.
1462 (extract_range_into_wide_ints): Pass wide ints by reference.
1463 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1464 Pass wide ints by reference in all calls to
1465 extract_range_into_wide_ints.
1466 * wide-int-range.cc (wide_int_range_div): New.
1467 * wide-int-range.h (wide_int_range_div): New.
1468 (wide_int_range_includes_zero_p): New.
1469 (wide_int_range_zero_p): New.
1471 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1473 * config/aarch64/aarch64.md (arches): New enum.
1474 (arch): New enum attr.
1475 (arch_enabled): New attr.
1476 (enabled): Now uses arch_enabled only.
1477 (simd, sve, fp16): Removed attribute.
1478 (fp): Attr now defined in terms of 'arch'.
1479 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1480 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1481 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1482 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1483 attributes into 'arch'.
1484 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1485 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1486 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1487 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1488 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1489 'simd' attribute into 'arch'.
1490 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1491 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1492 Convert use of 'fp' attribute to 'arch'.
1493 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1494 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1496 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1497 (different modes) Merge 'fp' and 'simd' into 'arch'.
1498 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1501 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1503 PR rtl-optimization/87026
1504 * expmed.c (canonicalize_comparison): If we can no longer create
1505 pseudoregisters, don't.
1507 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1510 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1512 * config/arm/arm.c (speculation_barrier_libfunc): New static
1514 (arm_init_libfuncs): Initialize it.
1515 (arm_emit_speculation_barrier): New function.
1516 * config/arm/arm.md (speculation_barrier): Call
1517 arm_emit_speculation_barrier for architectures that do not have
1519 (speculation_barrier_insn): Only match on Armv7 or later.
1521 2018-08-23 Richard Biener <rguenther@suse.de>
1524 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1527 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1529 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1530 of single-vector TBLs.
1531 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1534 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1537 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1538 aarch64_evpc_tbl guard.
1540 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1542 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1545 2018-08-22 Martin Sebor <msebor@redhat.com>
1548 * tree-pretty-print.c (pretty_print_string): Add argument.
1549 (dump_generic_node): Call to pretty_print_string with string size.
1551 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1553 PR rtl-optimization/86771
1554 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1555 of two SETs into those two SETs, one to be placed at i2, if that SETs
1556 destination is modified between i2 and i3.
1558 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1560 PR tree-optimization/86725
1561 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1563 (vect_analyze_scalar_cycles_1): Check it.
1565 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1567 PR tree-optimization/86725
1568 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1569 an outer loop phi as a double reduction, make sure that the
1570 single user of the phi result is an inner loop phi.
1572 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1574 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1575 grouped stores with gaps to a strided group.
1577 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1579 * tree-vect-stmts.c (get_group_load_store_type)
1580 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1581 first statement in a group.
1583 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1585 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1586 the sequence used in gcc/gcc.c.
1588 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1591 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1594 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1596 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1597 Darwin10-specific unwinder-shim.
1598 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1599 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1600 New to cater for Darwin10 Rosetta.
1602 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1604 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1605 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1607 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1612 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1613 (dwarf2out_switch_text_section): Generate a local label for the
1614 second function sub-section and apply it as the second FDE start
1616 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1617 second sub-section start.
1619 2018-08-22 Richard Biener <rguenther@suse.de>
1621 PR tree-optimization/86988
1622 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1624 2018-08-22 Richard Biener <rguenther@suse.de>
1626 PR tree-optimization/86945
1627 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1629 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1631 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1632 a comment about how uses of r2 for .sdata2 come about.
1634 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1636 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1638 2018-08-21 Marek Polacek <polacek@redhat.com>
1640 PR c++/86981, Implement -Wpessimizing-move.
1641 * doc/invoke.texi: Document -Wpessimizing-move.
1643 2018-08-21 Jan Hubicka <jh@suse.cz>
1645 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1646 * tree.h (is_redundant_typedef): Remove.
1647 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1649 2018-08-21 Jan Hubicka <jh@suse.cz>
1651 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1654 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1656 * expmed.c (extract_low_bits): Reject invalid subregs early.
1658 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1661 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1664 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1666 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1667 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1668 * config/vxworks.c: Likewise.
1670 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1672 * config/vxworks.c: Set targetm.have_ctors_dtors
1673 if HAVE_INITFINI_ARRAY_SUPPORT.
1674 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1675 if HAVE_INITFINI_ARRAY_SUPPORT.
1677 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1679 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1680 default search path for VxWorks < 7.
1682 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1684 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1685 (get_format_string): Refer to c_getstr.
1687 2018-08-21 Tom de Vries <tdevries@suse.de>
1689 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1690 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1691 (debuginfo_early_stop): Declare.
1692 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1693 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1694 (debuginfo_early_stop): New function.
1695 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1696 and debuginfo_early_stop.
1697 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1698 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1699 (general_init): Call debuginfo_early_init.
1700 (finalize): Call debuginfo_fini.
1701 (do_compile): Call debuginfo_init.
1702 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1704 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1706 2018-08-21 Tom de Vries <tdevries@suse.de>
1708 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1709 flag_dump_noaddr and flag_dump_unnumbered.
1711 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1713 * wide-int-range.cc (wide_int_range_abs): New.
1714 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1715 * wide-int-range.h (wide_int_range_abs): New.
1716 (wide_int_range_min_max): New.
1717 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1718 case to call wide_int_range_abs.
1719 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1720 (extract_range_from_abs_expr): Delete.
1722 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1725 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1726 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1729 2018-08-20 Nathan Sidwell <nathan@acm.org>
1730 Jeff Law <law@redhat.com>
1732 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1733 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1735 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1738 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1739 (decl_attributes): Likewise.
1740 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1742 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1743 * diagnostic-core.h (class auto_diagnostic_group): New class.
1744 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1745 (diagnostic_report_diagnostic): Handle the first diagnostics within
1747 (emit_diagnostic): Add auto_diagnostic_group instance.
1749 (inform_n): Likewise.
1750 (warning): Likewise.
1751 (warning_at): Likewise.
1752 (warning_n): Likewise.
1753 (pedwarn): Likewise.
1754 (permerror): Likewise.
1756 (error_n): Likewise.
1757 (error_at): Likewise.
1759 (fatal_error): Likewise.
1760 (internal_error): Likewise.
1761 (internal_error_no_backtrace): Likewise.
1762 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1763 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1764 * diagnostic.h (struct diagnostic_context): Add fields
1765 "diagnostic_group_nesting_depth",
1766 "diagnostic_group_emission_count", "begin_group_cb",
1768 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1769 Add auto_diagnostic_group instance(s).
1770 (find_explicit_erroneous_behavior): Likewise.
1771 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1772 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1773 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1774 (gimplify_va_arg_expr): Likewise.
1775 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1776 (HSA_SORRY_AT): Likewise.
1777 * ipa-devirt.c (compare_virtual_tables): Likewise.
1778 (warn_odr): Likewise.
1779 * multiple_target.c (expand_target_clones): Likewise.
1780 * opts-common.c (cmdline_handle_error): Likewise.
1781 * reginfo.c (globalize_reg): Likewise.
1782 * substring-locations.c (format_warning_n_va): Likewise.
1783 * tree-inline.c (expand_call_inline): Likewise.
1784 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1785 * tree-ssa-loop-niter.c
1786 (do_warn_aggressive_loop_optimizations): Likewise.
1787 * tree-ssa-uninit.c (warn_uninit): Likewise.
1788 * tree.c (warn_deprecated_use): Likewise.
1790 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1793 * config/i386/i386.md (eh_return): Always update EH return
1794 address in word_mode.
1796 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1798 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1799 TARGET_SPLIT_COMPLEX_ARG is defined.
1801 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1803 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1805 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1808 * expr.c (expand_assignment): Assert that bitpos is positive.
1809 (store_field): Likewise
1810 (expand_expr_real_1): Make sure that bitpos is positive.
1811 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1814 2018-08-20 Nathan Sidwell <nathan@acm.org>
1816 * Makefile.in (CPP_ID_DATA_H): Delete.
1817 (CPP_INTERNAL_H): Don't add it.
1818 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1819 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1821 2018-08-20 Richard Biener <rguenther@suse.de>
1823 PR tree-optimization/78655
1824 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1825 pointer + offset nonnull if either operand is nonnull work.
1827 2018-08-20 Tom de Vries <tdevries@suse.de>
1829 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1830 unless the referenced die describes the added property using
1831 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1832 Otherwise, add a DW_AT_location to the referenced die.
1834 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1837 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1838 register_operand when calling ix86_set_reg_reg_cost.
1839 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1840 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1841 predicate and to 1 otherwise.
1843 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1845 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1846 emit a diagnostic that it is not supported and reset the option.
1847 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1848 supported and consume the option. (ASM_FINAL_SPEC): New.
1850 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1852 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1855 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1857 C-SKY port: Documentation
1859 * doc/extend.texi (C-SKY Function Attributes): New section.
1860 * doc/invoke.texi (Option Summary): Add C-SKY options.
1861 (C-SKY Options): New section.
1862 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1864 2018-08-17 Jojo <jijie_rong@c-sky.com>
1865 Huibin Wang <huibin_wang@c-sky.com>
1866 Sandra Loosemore <sandra@codesourcery.com>
1867 Chung-Lin Tang <cltang@codesourcery.com>
1869 C-SKY port: Backend implementation
1871 * config/csky/*: New.
1872 * common/config/csky/*: New.
1874 2018-08-17 Jojo <jijie_rong@c-sky.com>
1875 Huibin Wang <huibin_wang@c-sky.com>
1876 Sandra Loosemore <sandra@codesourcery.com>
1877 Chung-Lin Tang <cltang@codesourcery.com>
1878 Andrew Jenner <andrew@codesourcery.com>
1880 C-SKY port: Configury
1882 * config.gcc (csky-*-*): New.
1883 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1884 * configure: Regenerated.
1886 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1888 * dump-context.h: Include "dumpfile.h".
1889 (dump_context::dump_printf_va): Convert final param from va_list
1890 to va_list *. Convert from ATTRIBUTE_PRINTF to
1891 ATTRIBUTE_GCC_DUMP_PRINTF.
1892 (dump_context::dump_printf_loc_va): Likewise.
1893 * dumpfile.c: Include "stringpool.h".
1894 (make_item_for_dump_printf_va): Delete.
1895 (make_item_for_dump_printf): Delete.
1896 (class dump_pretty_printer): New class.
1897 (dump_pretty_printer::dump_pretty_printer): New ctor.
1898 (dump_pretty_printer::emit_items): New member function.
1899 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1901 (dump_pretty_printer::emit_item): New member function.
1902 (dump_pretty_printer::stash_item): New member function.
1903 (dump_pretty_printer::format_decoder_cb): New member function.
1904 (dump_pretty_printer::decode_format): New member function.
1905 (dump_context::dump_printf_va): Reimplement in terms of
1906 dump_pretty_printer.
1907 (dump_context::dump_printf_loc_va): Convert final param from va_list
1909 (dump_context::begin_scope): Reimplement call to
1910 make_item_for_dump_printf.
1911 (dump_printf): Update for change to dump_printf_va.
1912 (dump_printf_loc): Likewise.
1913 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1914 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1915 with %T, %E, and %G.
1916 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1917 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1918 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1919 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1920 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1921 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1922 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1923 within a dump_printf_loc call to "%wu".
1924 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1925 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1926 missing space after "=".
1927 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1928 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1929 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1930 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1931 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1932 duplicate "vectorized" from message.
1934 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1936 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1937 polyNxK_t element's TYPE_STRING_FLAG.
1939 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1941 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1942 (they were unnamed before). Fix comments.
1944 2018-08-17 Nathan Sidwell <nathan@acm.org>
1946 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1948 2018-08-17 Richard Biener <rguenther@suse.de>
1950 PR tree-optimization/86841
1951 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1953 2018-08-17 Martin Liska <mliska@suse.cz>
1955 * common.opt: Remove Warn, Init and Report for options with
1956 Ignore/Deprecated flag. Warning is done automatically for
1958 * config/i386/i386.opt: Likewise.
1959 * config/ia64/ia64.opt: Likewise.
1960 * config/rs6000/rs6000.opt: Likewise.
1961 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1962 Remove usage of flag_check_pointer_bounds.
1963 * lto-wrapper.c (merge_and_complain): Do not handle
1964 OPT_fcheck_pointer_bounds.
1965 (append_compiler_options): Likewise.
1966 * opt-functions.awk: Do not handle Deprecated.
1967 * optc-gen.awk: Check that Var, Report and Init are not
1968 used for an option with Ignore/Deprecated flag.
1969 * opts-common.c (decode_cmdline_option): Do not report
1971 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1973 * opts.h (struct cl_option): Remove cl_deprecated flag.
1974 (CL_ERR_DEPRECATED): Remove error enum value.
1976 2018-08-17 Richard Biener <rguenther@suse.de>
1979 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1980 across a va-arg-pack using call adjust its return value accordingly.
1982 2018-08-16 Martin Sebor <msebor@redhat.com>
1984 PR tree-optimization/86853
1985 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1986 (struct fmtresult): Add member and initialize it in ctors.
1987 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1988 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1989 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1990 (parse_directive): Handle %C same as %c.
1991 (sprintf_dom_walker::compute_format_length): Adjust.
1992 (is_call_safe): Adjust.
1994 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1996 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1997 for determining how to count the elements.
1998 * builtins.h (c_strlen): Adjust prototype.
1999 * expr.c (string_constant): Add new parameter mem_size.
2000 Set *mem_size appropriately.
2001 * expr.h (string_constant): Adjust protoype.
2002 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2003 * gimple-fold.h (get_range_strlen): Adjust prototype.
2004 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2005 (format_string): Call get_string_length with eltsize.
2007 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2009 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2010 to emit the span, rather than setting it as the prefix.
2012 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2014 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2015 "margin_char" parameter, defaulting to space. Use it in place
2016 of pp_space for the initial part of the margin.
2017 (layout::print_leading_fixits): Use '+' when filling the margin
2018 of line-insertion fix-it hints.
2020 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2022 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2025 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2027 * config/rs6000/altivec.md: Don't set length attribute to the default
2029 * config/rs6000/darwin.md: Ditto.
2030 * config/rs6000/dfp.md: Ditto.
2031 * config/rs6000/htm.md: Ditto.
2032 * config/rs6000/rs6000.md: Ditto.
2033 * config/rs6000/sync.md: Ditto.
2034 * config/rs6000/vsx.md: Ditto.
2036 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2038 * config/rs6000/altivec.md: Don't set length attribute to the default
2039 value, for branch instructions.
2040 * config/rs6000/darwin.md: Ditto.
2041 * config/rs6000/rs6000.md: Ditto.
2043 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2045 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2046 (unnamed conditional branch define_insn): Set length to 4 or 8
2047 depending on offset.
2048 (<bd>_<mode>): Similar, for alternative 0.
2049 (<bd>tf_<mode>): Ditto.
2051 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2053 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2055 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2057 * doc/rtl.texi: Replace old RTX class names with new names.
2060 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2062 * expmed.h (canonicalize_comparison): New declaration.
2063 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2064 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2065 * optabs.c (prepare_cmp_insn): Likewise.
2066 * rtl.h (unsigned_condition_p): New function which checks if a
2067 comparison operator is unsigned.
2069 2018-08-16 Nathan Sidwell <nathan@acm.org>
2071 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2072 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2074 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2077 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2078 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2079 (mov<mov>): ..this and enable unconditionally.
2081 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2083 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2085 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2087 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2088 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2089 "Common" with "Target".
2091 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2093 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2094 * doc/invoke.texi (mmitigate-rop): Remove.
2095 * config/i386/i386.c: Do not include "regrename.h".
2096 (ix86_rop_should_change_byte_p, reg_encoded_number)
2097 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2099 (ix86_reorg): Remove call to ix86_mitigate_rop.
2100 * config/i386/i386.md (attr "modrm_class"): Remove.
2101 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2102 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2103 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2105 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2107 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2108 allow folding of mergeh() and mergel() for the float and double types.
2109 (fold_mergehl_helper): Rework to handle building a permute tree
2112 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2114 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2117 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2119 * common.opt (fdiagnostics-show-labels): New option.
2120 * diagnostic-show-locus.c (class layout_range): Add field
2122 (class layout): Add field "m_show_labels_p".
2123 (layout_range::layout_range): Add param "label" and use it to
2125 (make_range): Pass in NULL for new "label" param of layout_range's
2127 (layout::layout): Initialize m_show_labels_p.
2128 (layout::maybe_add_location_range): Pass in loc_range->m_label
2129 when constructing layout_range instances.
2130 (struct line_label): New struct.
2131 (layout::print_any_labels): New member function.
2132 (layout::print_line): Call it if label-printing is enabled.
2133 (selftest::test_one_liner_labels): New test.
2134 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2135 * diagnostic.c (diagnostic_initialize): Initialize
2136 context->show_labels_p.
2137 * diagnostic.h (struct diagnostic_context): Add field
2139 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2140 -fno-diagnostics-show-labels.
2141 * dwarf2out.c (gen_producer_string): Add
2142 OPT_fdiagnostics_show_labels to the ignored options.
2143 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2145 (gcc_rich_location::maybe_add_expr): Likewise.
2146 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2147 label" param, defaulting to NULL.
2148 (gcc_rich_location::add_expr): Add "label" param.
2149 (gcc_rich_location::maybe_add_expr): Likewise.
2150 (class text_range_label): New class.
2151 (class range_label_for_type_mismatch): New class.
2152 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2153 of format_warning_va.
2154 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2155 * lto-wrapper.c (merge_and_complain): Add
2156 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2157 (append_compiler_options): Likewise to the dropped options.
2158 (append_diag_options): Likewise to the passed-on options.
2159 * opts.c (common_handle_option): Handle the new option.
2160 * selftest-diagnostic.c
2161 (test_diagnostic_context::test_diagnostic_context): Enable
2163 * substring-locations.c: Include "gcc-rich-location.h".
2164 (format_warning_n_va): Add "fmt_label" and "param_label" params
2165 and use them as appropriate.
2166 (format_warning_va): Add "fmt_label" and "param_label" params,
2167 passing them on to format_warning_n_va.
2168 (format_warning_at_substring): Likewise.
2169 (format_warning_at_substring_n): Likewise.
2170 * substring-locations.h (format_warning_va): Add "fmt_label" and
2171 "param_label" params.
2172 (format_warning_n_va): Likewise.
2173 (format_warning_at_substring): Likewise.
2174 (format_warning_at_substring_n): Likewise.
2175 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2177 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2180 * builtins.c (expand_builtin_memcmp): Do not expand the call
2181 when overflow is detected.
2183 2018-08-15 Martin Sebor <msebor@redhat.com>
2185 PR tree-optimization/71625
2186 * config/aarch64/aarch64-builtins.c
2187 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2189 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2191 * config/s390/s390.c (s390_reorg): Remove loop.
2193 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2196 (darwin_function_switched_text_sections): Delete.
2197 * gcc/config/darwin.h
2198 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2200 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2203 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2204 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2205 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2207 2018-08-15 Martin Liska <mliska@suse.cz>
2209 PR tree-optimization/86925
2210 * predict.c (expr_expected_value_1): When taking
2211 later predictor, assign also probability.
2212 Use fold_build2_initializer_loc in order to fold
2213 the expression in -frounding-math.
2215 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2217 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2219 (expand_vec_perm_1): Try the new method.
2221 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2224 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2225 Check whether lra_live_max_point is 0 before dividing.
2227 2018-08-14 Martin Sebor <msebor@redhat.com>
2229 PR tree-optimization/86650
2230 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2231 (vrp_prop::check_mem_ref): Same.
2233 2018-08-13 Liu Hao <lh_mouse@126.com>
2235 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2236 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2237 and clear it thereafter, as it only works for DBCS.
2239 2018-08-13 Liu Hao <lh_mouse@126.com>
2241 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2242 handle returned by _get_osf_handle().
2244 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2246 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2247 for folding vec_perm.
2249 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2251 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2252 Add support for gimple-folding of vec_pack() and vec_unpack()
2255 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2257 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2258 vec_xst variants to the list.
2259 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2260 vector loads and stores.
2262 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2264 * config.gcc (rs6000-ibm-aix4.x): Delete.
2265 (rs6000-ibm-aix5.1): Delete.
2266 (rs6000-ibm-aix5.2): Delete.
2267 (rs6000-ibm-aix5.3): Delete.
2268 * config/rs6000/aix43.h: Delete.
2269 * config/rs6000/aix51.h: Delete.
2270 * config/rs6000/aix52.h: Delete.
2271 * config/rs6000/t-aix43: Delete.
2273 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2275 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2277 (s390_decompose_address): Factor out constant pool ref
2280 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2282 * config/nds32/nds32-predicates.c
2283 (nds32_can_use_bclr_p): Change return type as bool.
2284 (nds32_can_use_bset_p): Ditto.
2285 (nds32_can_use_btgl_p): Ditto.
2286 (nds32_can_use_bitci_p): Ditto.
2287 * config/nds32/nds32-protos.h
2288 (nds32_can_use_bclr_p): Change declaration.
2289 (nds32_can_use_bset_p): Ditto.
2290 (nds32_can_use_btgl_p): Ditto.
2291 (nds32_can_use_bitci_p): Ditto.
2293 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2295 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2296 Support -msched-prolog-epilog option.
2297 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2299 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2301 * common/config/nds32/nds32-common.c
2302 (nds32_option_optimization_table): Enalbe -malways-align.
2304 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2306 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2308 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2309 OPT_misr_secure_ case.
2310 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2311 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2312 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2314 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2315 (nds32_isr_info): New field security_level.
2316 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2317 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2318 * config/nds32/nds32.opt (misr-secure): New option.
2319 * config/nds32/nds32_init.inc: New file.
2320 * config/nds32/nds32_isr.h: New file.
2322 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2324 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2325 Update comment for atomic instructions.
2326 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2327 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2329 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2330 load for __ATOMIC_SEQ_CST model.
2331 (atomic_loaddi_1): Remove float register target.
2332 (atomic_storedi): Handle CONST_INT values.
2333 (atomic_storedi_1): Remove float register source. Add special case
2335 (memory_barrier): New expander and insn.
2337 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2339 PR tree-optimization/86835
2340 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2341 new_stmt after def_gsi, make sure to insert new_square_stmt after
2342 that stmt, not 2 stmts before it.
2344 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2347 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2350 2018-08-10 Martin Liska <mliska@suse.cz>
2353 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2355 * builtins.c (expand_builtin_expect_with_probability):
2357 (expand_builtin_expect_with_probability): New function.
2358 (build_builtin_expect_predicate): Add new argumnet probability
2359 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2360 (fold_builtin_expect):
2363 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2364 * builtins.h (fold_builtin_expect): Set new argument.
2365 * doc/extend.texi: Document __builtin_expect_with_probability.
2366 * doc/invoke.texi: Likewise.
2367 * gimple-fold.c (gimple_fold_call): Pass new argument.
2368 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2369 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2370 * predict.c (get_predictor_value): New function.
2371 (expr_expected_value): Add new argument probability. Assume
2372 that predictor and probability are always non-null.
2373 (expr_expected_value_1): Likewise. For __builtin_expect and
2374 __builtin_expect_with_probability set probability. Handle
2375 combination in binary expressions.
2376 (tree_predict_by_opcode): Simplify code by simply calling
2377 get_predictor_value.
2378 (pass_strip_predict_hints::execute): Add handling of
2379 BUILT_IN_EXPECT_WITH_PROBABILITY.
2380 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2382 * tree.h (DECL_BUILT_IN_P): New function.
2384 2018-08-10 Martin Liska <mliska@suse.cz>
2386 PR tree-optimization/85799
2387 * passes.def: Add argument for pass_strip_predict_hints.
2388 * predict.c (class pass_strip_predict_hints): Add new argument
2390 (strip_predictor_early): New function.
2391 (pass_strip_predict_hints::execute): Call the function to
2393 (strip_predict_hints): New function.
2394 * predict.def: Fix comment.
2396 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2398 * Makefile.in: Clarify which tm.texi to copy over to assert the
2399 right to grant a GFDL license for all.
2401 2018-08-09 Jeff Law <law@redhat.com>
2403 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2406 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2408 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2411 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2413 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2414 reductions for variable-length vectors.
2416 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2419 * common.opt (fdiagnostics-show-line-numbers): New option.
2420 * diagnostic-show-locus.c (class layout): Add fields
2421 "m_show_line_numbers_p" and "m_linenum_width";
2422 (num_digits): New function.
2423 (test_num_digits): New function.
2424 (layout::layout): Initialize new fields. Update m_x_offset
2425 logic to handle any left margin.
2426 (layout::print_source_line): Print line number when requested.
2427 (layout::start_annotation_line): New member function.
2428 (layout::print_annotation_line): Call it.
2429 (layout::print_leading_fixits): Likewise.
2430 (layout::print_trailing_fixits): Likewise. Update calls to
2431 move_to_column for new parameter.
2432 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2433 it to potentially call start_annotation_line.
2434 (layout::show_ruler): Call start_annotation_line.
2435 (selftest::test_line_numbers_multiline_range): New selftest.
2436 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2437 and selftest::test_line_numbers_multiline_range.
2438 * diagnostic.c (diagnostic_initialize): Initialize
2439 show_line_numbers_p.
2440 * diagnostic.h (struct diagnostic_context): Add field
2441 "show_line_numbers_p".
2442 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2443 -fno-diagnostics-show-line-numbers.
2444 * dwarf2out.c (gen_producer_string): Add
2445 OPT_fdiagnostics_show_line_numbers to the ignored options.
2446 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2447 one setting" options.
2448 (append_compiler_options): Likewise to the dropped options.
2449 (append_diag_options): Likewise to the passed-on options.
2450 * opts.c (common_handle_option): Handle the new option.
2451 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2453 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2455 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2456 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2457 third argument of type "const signed char" to descriptions of
2458 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2459 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2460 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2461 __builtin_bcdsub_ov functions.
2463 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2465 PR tree-optimization/86858
2466 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2467 flow_bb_inside_loop_p calls.
2469 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2471 PR tree-optimization/86871
2472 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2473 instead of gimple_assign_lhs.
2475 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2478 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2479 register constraint to operand 0.
2480 (add<mode>3_carryinC): Likewise.
2481 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2483 2018-08-09 Martin Liska <mliska@suse.cz>
2486 * common.opt: Remove extra line.
2488 2018-08-09 Martin Liska <mliska@suse.cz>
2490 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2491 at the end of a line, make first letter capital and end up
2492 a sentence with a dot.
2493 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2494 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2495 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2496 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2497 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2498 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2499 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2500 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2501 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2502 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2503 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2504 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2505 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2506 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2507 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2508 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2509 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2510 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2512 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2515 * config/s390/s390.c (s390_option_override_internal): Reduce the
2516 stack-clash-protection-probe-interval param if it would be too big
2519 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2522 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2523 * config/m68k/m68k.c (handle_move_double): Don't call
2524 m68k_final_prescan_insn.
2525 (m68k_adjust_decorated_operand): Renamed from
2526 m68k_final_prescan_insn, remove first and third operand and
2528 (print_operand): Call it.
2529 (print_operand_address): Call it.
2531 2018-08-08 Nathan Sidwell <nathan@acm.org>
2533 * diagnostic.c (diagnostic_report_current_module): Use
2534 linemap_included_from & linemap_included_from_linemap.
2536 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2538 * config/aarch64/aarch64-cores.def: Add phecda core.
2539 * config/aarch64/aarch64-tune.md: Regenerate.
2540 * doc/invoke.texi: Add phecda core.
2542 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2545 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2547 * config/s390/s390.md ("movti"): Add more alternatives for
2548 constant to GPR copies.
2550 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2552 * config/s390/s390.c: Fix whitespace damage throughout the file.
2553 * config/s390/s390.h: Likewise.
2554 * config/s390/tpf.h: Likewise.
2556 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2558 * config/s390/s390.c (s390_loadrelative_operand_p):
2559 Remove TARGET_CPU_ZARCH usages.
2560 (s390_rtx_costs): Likewise.
2561 (s390_legitimate_constant_p): Likewise.
2562 (s390_cannot_force_const_mem): Likewise.
2563 (legitimate_reload_constant_p): Likewise.
2564 (s390_preferred_reload_class): Likewise.
2565 (legitimize_pic_address): Likewise.
2566 (legitimize_tls_address): Likewise.
2567 (s390_split_branches): Removed.
2568 (s390_add_execute): Removed.
2569 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2570 (s390_mainpool_start): Likewise.
2571 (s390_mainpool_finish): Likewise.
2572 (s390_mainpool_cancel): Removed.
2573 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2574 (s390_chunkify_cancel): Likewise.
2575 (s390_return_addr_rtx): Likewise.
2576 (s390_register_info): Remove split_branches_pending_p uages.
2577 (s390_optimize_register_info): Likewise.
2578 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2579 split_branches_pending_p usages.
2580 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2581 (s390_load_got): Likewise.
2582 (s390_expand_split_stack_prologue): Likewise.
2583 (output_asm_nops): Likewise.
2584 (s390_function_profiler): Likewise.
2585 (s390_emit_call): Likewise.
2586 (s390_conditional_register_usage): Likewise.
2587 (s390_optimize_prologue): Likewise.
2588 (s390_reorg): Remove TARGET_CPU_ZARCH and
2589 split_branches_pending_p usages.
2590 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2592 (s390_output_indirect_thunk_function): Likewise.
2593 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2594 (TARGET_CPU_ZARCH_P): Removed.
2595 (struct machine_function): Remove split_branches_pending_p.
2596 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2598 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2600 * common/config/s390/s390-common.c (processor_flags_table):
2602 * config.gcc: Remove with_arch/with_tune support.
2603 * config/s390/2064.md: Remove cpu attribute comparisons.
2604 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2606 * config/s390/linux.h (ASM_SPEC):
2607 Remove -march support.
2608 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2609 Use a table to get an arch level.
2610 * config/s390/s390-opts.h (enum processor_type):
2612 * config/s390/s390.c
2613 (processor_table): Remove entries, add arch_level values.
2614 (s390_issue_rate): Remove cases.
2615 (s390_option_override): Adjust
2616 s390_option_override_internal() call.
2617 (s390_option_override_internal): Remove deprecation warning.
2618 (s390_valid_target_attribute_tree): Adjust
2619 s390_option_override_internal() call.
2620 * config/s390/s390.h (struct s390_processor):
2621 Share with s390-c.c, add arch_level field.
2622 * config/s390/s390.md:
2623 Remove occurrences in cpu attribute.
2624 * config/s390/s390.opt: Remove -march/-mtune support.
2625 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2626 * doc/invoke.texi: Remove deprecation warning.
2628 2018-08-08 Luis Machado <luis.machado@linaro.org>
2630 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2632 (qdf24xx_tunings): Set vector cost structure to
2633 qdf24xx_vector_cost.
2635 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2636 <register_sextend>: Set to 3.
2638 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2641 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2642 * config/aarch64/aarch64-simd.md
2643 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2644 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2645 (aarch64_frecpx<mode>): ...this new pattern.
2646 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2647 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2649 2018-08-07 Martin Liska <mliska@suse.cz>
2652 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2653 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2654 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2655 * doc/extend.texi: Document that malloc attribute adds
2658 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2661 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2662 Define to speculation_safe_value_not_needed.
2664 2018-08-06 Jeff Law <law@redhat.com>
2666 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2667 the vr_values instance to cprop_into_stmt.
2668 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2669 (cprop_operand): Also query EVRP to determine if OP is a constant.
2671 2018-08-06 Nathan Sidwell <nathan@acm.org>
2673 * diagnostic.c (diagnostic_report_current_module): Reroll
2674 included-at loop. Translate text.
2676 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2678 * function-tests.c (selftest::test_expansion_to_rtl): Call
2679 free_after_compilation.
2681 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2683 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2685 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2687 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2688 loops with memory block operations from getting unrolled.
2690 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2693 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2694 Define to speculation_safe_value_not_needed.
2696 2018-08-06 Jeff Law <law@redhat.com>
2698 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2701 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2704 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2705 with all enabled __intN types.
2707 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2709 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2711 * alias.c (record_set): Check for clobber high.
2712 * cfgexpand.c (expand_gimple_stmt): Likewise.
2713 * combine-stack-adj.c (single_set_for_csa): Likewise.
2714 * combine.c (find_single_use_1): Likewise.
2715 (set_nonzero_bits_and_sign_copies): Likewise.
2716 (get_combine_src_dest): Likewise.
2717 (is_parallel_of_n_reg_sets): Likewise.
2718 (try_combine): Likewise.
2719 (record_dead_and_set_regs_1): Likewise.
2720 (reg_dead_at_p_1): Likewise.
2721 (reg_dead_at_p): Likewise.
2722 * dce.c (deletable_insn_p): Likewise.
2723 (mark_nonreg_stores_1): Likewise.
2724 (mark_nonreg_stores_2): Likewise.
2725 * df-scan.c (df_find_hard_reg_defs): Likewise.
2726 (df_uses_record): Likewise.
2727 (df_get_call_refs): Likewise.
2728 * dwarf2out.c (mem_loc_descriptor): Likewise.
2729 * haifa-sched.c (haifa_classify_rtx): Likewise.
2730 * ira-build.c (create_insn_allocnos): Likewise.
2731 * ira-costs.c (scan_one_insn): Likewise.
2732 * ira.c (equiv_init_movable_p): Likewise.
2733 (rtx_moveable_p): Likewise.
2734 (interesting_dest_for_shprep): Likewise.
2735 * jump.c (mark_jump_label_1): Likewise.
2736 * postreload-gcse.c (record_opr_changes): Likewise.
2737 * postreload.c (reload_cse_simplify): Likewise.
2738 (struct reg_use): Add source expr.
2739 (reload_combine): Check for clobber high.
2740 (reload_combine_note_use): Likewise.
2741 (reload_cse_move2add): Likewise.
2742 (move2add_note_store): Likewise.
2743 * print-rtl.c (print_pattern): Likewise.
2744 * recog.c (decode_asm_operands): Likewise.
2745 (store_data_bypass_p): Likewise.
2746 (if_test_bypass_p): Likewise.
2747 * regcprop.c (kill_clobbered_value): Likewise.
2748 (kill_set_value): Likewise.
2749 * reginfo.c (reg_scan_mark_refs): Likewise.
2750 * reload1.c (maybe_fix_stack_asms): Likewise.
2751 (eliminate_regs_1): Likewise.
2752 (elimination_effects): Likewise.
2753 (mark_not_eliminable): Likewise.
2754 (scan_paradoxical_subregs): Likewise.
2755 (forget_old_reloads_1): Likewise.
2756 * reorg.c (find_end_label): Likewise.
2757 (try_merge_delay_insns): Likewise.
2758 (redundant_insn): Likewise.
2759 (own_thread_p): Likewise.
2760 (fill_simple_delay_slots): Likewise.
2761 (fill_slots_from_thread): Likewise.
2762 (dbr_schedule): Likewise.
2763 * resource.c (update_live_status): Likewise.
2764 (mark_referenced_resources): Likewise.
2765 (mark_set_resources): Likewise.
2766 * rtl.c (copy_rtx): Likewise.
2767 * rtlanal.c (reg_referenced_p): Likewise.
2768 (single_set_2): Likewise.
2769 (noop_move_p): Likewise.
2770 (note_stores): Likewise.
2771 * sched-deps.c (sched_analyze_reg): Likewise.
2772 (sched_analyze_insn): Likewise.
2774 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2776 * cse.c (invalidate_reg): New function extracted from...
2777 (invalidate): ...here.
2778 (canonicalize_insn): Check for clobber high.
2779 (invalidate_from_clobbers): invalidate clobber highs.
2780 (invalidate_from_sets_and_clobbers): Likewise.
2781 (count_reg_usage): Check for clobber high.
2782 (insn_live_p): Likewise.
2783 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2784 (cselib_invalidate_regno): Check for clobber in setter.
2785 (cselib_invalidate_rtx): Pass through setter.
2786 (cselib_invalidate_rtx_note_stores):
2787 (cselib_process_insn): Check for clobber high.
2788 * cselib.h (cselib_invalidate_rtx): Add operand.
2790 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2792 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2793 (mark_not_eliminable): Likewise.
2794 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2795 * lra-lives.c (process_bb_lives): Check for clobber high.
2796 * lra.c (new_insn_reg): Remember clobber highs.
2797 (collect_non_operand_hard_regs): Check for clobber high.
2798 (lra_set_insn_recog_data): Likewise.
2799 (add_regs_to_insn_regno_info): Likewise.
2800 (lra_update_insn_regno_info): Likewise.
2802 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2804 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2805 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2807 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2809 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2810 (copy_insn_1): Likewise.
2811 (gen_hard_reg_clobber_high): New gen function.
2812 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2813 * genemit.c (gen_exp): Likewise.
2814 (gen_emit_seq): Pass through info.
2815 (gen_insn): Check for CLOBBER_HIGH.
2816 (gen_expand): Pass through info.
2817 (gen_split): Likewise.
2818 (output_add_clobbers): Likewise.
2819 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2820 (remove_clobbers): Likewise.
2821 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2823 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2825 * doc/rtl.texi (clobber_high): Add.
2826 (parallel): Add in clobber high
2827 * rtl.c (rtl_check_failed_code3): Add function.
2828 * rtl.def (CLOBBER_HIGH): Add expression.
2829 * rtl.h (RTL_CHECKC3): Add macro.
2830 (rtl_check_failed_code3): Add declaration.
2831 (XC3EXP): Add macro.
2833 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2836 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2837 cfun->machine->max_used_stack_alignment if needed.
2839 2018-08-04 Martin Sebor <msebor@redhat.com>
2841 PR tree-optimization/86571
2842 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2845 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2848 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2851 2018-08-03 Jeff Law <law@redhat.com>
2854 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2855 Define to speculation_safe_value_not_needed.
2857 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2859 * doc/gcov.texi (-x): Remove duplicate "to".
2860 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2861 (-Wif-not-aligned): Remove duplicate "is".
2862 (-flto): Remove duplicate "the".
2863 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2864 duplicate "v5.00.b".
2865 (MSP430 Options): Remove duplicate "and" from the description
2866 of "-mgprel-sec=regexp".
2867 (x86 Options): Remove duplicate copies of "vmldLog102" and
2868 vmlsLog104 from description of "-mveclibabi=type".
2870 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2872 * internal-fn.h (first_commutative_argument): Declare.
2873 * internal-fn.c (first_commutative_argument): New function.
2874 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2875 restrictions for pattern statements. Use first_commutative_argument
2876 to look for commutative operands in calls to internal functions.
2878 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2880 * Makefile.in (wide-int-range.o): New.
2881 * tree-vrp.c: Move all the wide_int_* functions to...
2882 * wide-int-range.cc: ...here.
2883 * tree-vrp.h: Move all the wide_int_* prototypes to...
2884 * wide-int-range.h: ...here.
2886 2018-08-03 Tom de Vries <tdevries@suse.de>
2888 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2890 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2891 * except.c (output_function_exception_table): Do early exit if
2892 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2894 2018-08-03 Martin Liska <mliska@suse.cz>
2896 * predict.c (dump_prediction): Change to 2 digits
2899 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2901 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2903 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2905 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2907 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2908 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2909 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2910 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2911 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2913 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2915 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2916 pp_take_prefix when saving the existing prefix.
2917 * diagnostic.c (diagnostic_append_note): Likewise.
2918 * langhooks.c (lhd_print_error_function): Likewise.
2919 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2920 param's type. Free the existing prefix.
2921 (pp_take_prefix): New function.
2922 (pretty_printer::pretty_printer): Drop the prefix parameter.
2923 Rename the length parameter to match the comment.
2924 (pretty_printer::~pretty_printer): Free the prefix.
2925 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2927 (struct pretty_printer): Drop the "const" from "prefix" field's
2928 type and clarify memory management.
2929 (pp_set_prefix): Drop the "const" from the 2nd param.
2930 (pp_take_prefix): New decl.
2932 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2934 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2935 for word_mode_ok here instead of passing as argument.
2936 (expand_block_compare): Change select_block_compare_mode() call.
2937 (expand_strncmp_gpr_sequence): New function.
2938 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2940 2018-08-02 Jeff Law <law@redhat.com>
2943 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2944 Define to speculation_safe_value_not_needed.
2947 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2948 Define to speculation_safe_value_not_needed.
2950 2018-08-02 Tom de Vries <tdevries@suse.de>
2953 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2954 function. Return UI_TARGET unconditionally.
2955 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2956 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2958 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2960 * genemit.c (print_overload_test): Fix typo.
2962 2018-08-02 Richard Biener <rguenther@suse.de>
2964 PR tree-optimization/86816
2965 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2966 which checks for value availability before querying it.
2967 (gvn_uses_equal): Use it.
2968 (same_succ_hash): Likewise.
2969 (gimple_equal_p): Likewise.
2971 2018-08-02 Nick Clifton <nickc@redhat.com>
2974 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2975 Define to speculation_safe_value_not_needed.
2978 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2979 Define to speculation_safe_value_not_needed.
2982 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2983 Define to speculation_safe_value_not_needed.
2986 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2987 Define to speculation_safe_value_not_needed.
2990 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2991 Define to speculation_safe_value_not_needed.
2994 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2995 Define to speculation_safe_value_not_needed.
2998 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2999 Define to speculation_safe_value_not_needed.
3002 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3003 Define to speculation_safe_value_not_needed.
3006 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3007 speculation_safe_value_not_needed.
3010 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3011 to speculation_safe_value_not_needed.
3013 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3015 * doc/md.texi: Expand the documentation of instruction names
3016 to mention port-local uses. Document '@' in pattern names.
3017 * read-md.h (overloaded_instance, overloaded_name): New structs.
3019 (md_reader::handle_overloaded_name): New member function.
3020 (md_reader::get_overloads): Likewise.
3021 (md_reader::m_first_overload): New member variable.
3022 (md_reader::m_next_overload_ptr): Likewise.
3023 (md_reader::m_overloads_htab): Likewise.
3024 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3025 m_next_overload_ptr and m_overloads_htab.
3026 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3027 (get_mode_token, get_code_token, get_int_token): New functions.
3028 (map_attr_string): Add an optional argument that passes back
3029 the associated iterator.
3030 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3031 (md_reader::handle_overloaded_name, add_overload_instance): New
3033 (apply_iterators): Handle '@' names. Report an error if '@'
3034 is used without iterators.
3035 (initialize_iterators): Initialize the new iterator_group fields.
3036 * genopinit.c (handle_overloaded_code_for)
3037 (handle_overloaded_gen): New functions.
3038 (main): Use them to print declarations of maybe_code_for_* and
3039 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3040 * genemit.c (print_overload_arguments, print_overload_test)
3041 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3042 (main): Use it to print definitions of maybe_code_for_* and
3043 maybe_gen_* functions.
3044 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3045 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3046 instead of explicit mode checks.
3047 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3048 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3049 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3050 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3051 (aarch64_expand_compare_and_swap): Likewise
3052 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3053 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3054 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3055 (aarch64_constant_pool_reload_icode): Delete.
3056 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3057 instead of aarch64_constant_pool_reload_icode. Use
3058 code_for_aarch64_reload_mov instead of explicit mode checks.
3059 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3060 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3061 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3062 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3063 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3064 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3065 (aarch64_atomic_load_op_code): Delete.
3066 (aarch64_emit_atomic_load_op): Likewise.
3067 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3068 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3069 instead of aarch64_emit_atomic_load_op.
3070 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3071 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3072 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3073 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3074 character before the pattern name.
3075 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3076 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3077 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3078 (aarch64_frecps<mode>): Likewise.
3079 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3080 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3081 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3082 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3083 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3085 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3087 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3088 Allow HFmode constants if TARGET_FP_F16INST.
3090 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3093 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3094 No longer check last store for clobber of address register.
3096 2018-08-02 Martin Liska <mliska@suse.cz>
3098 PR gcov-profile/86817
3099 * gcov.c (process_all_functions): New function.
3101 (process_file): Move functions processing to
3102 process_all_functions.
3104 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3106 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3107 "const" to the "gimple *" and "rtx_insn *" parameters.
3108 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3110 (dump_location_t::dump_location_t): Likewise.
3112 2018-08-01 Martin Sebor <msebor@redhat.com>
3114 PR tree-optimization/86650
3115 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3116 rather than a "gcall *". Directly pass the data of interest
3117 to percent_K_format, rather than building a temporary CALL_EXPR
3119 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3120 (gimple_fold_builtin_strncat): Adjust.
3121 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3122 gcall* argument with gimple*.
3123 * gimple-ssa-warn-restrict.c (check_call): Same.
3124 (wrestrict_dom_walker::before_dom_children): Same.
3125 (builtin_access::builtin_access): Same.
3126 (check_bounds_or_overlap): Same
3127 (maybe_diag_overlap): Same.
3128 (maybe_diag_offset_bounds): Same.
3129 * tree-diagnostic.c (default_tree_printer): Move usage of
3130 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3132 * tree-pretty-print.c (percent_K_format): Add argument.
3133 * tree-pretty-print.h: Add argument.
3134 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3135 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3136 (maybe_diag_stxncpy_trunc): Same.
3137 (handle_builtin_stxncpy): Same.
3138 (handle_builtin_strcat): Same.
3140 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3142 * match.pd: Optimise pointer range checks.
3144 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3146 PR tree-optimization/86758
3147 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3148 to remove pattern statements.
3150 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3152 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3153 result of dfs_enumerate_from when constructing stmt_vec_infos,
3154 instead of additionally calling get_loop_body.
3156 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3158 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3160 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3161 When creating an iv, assert that the step is not known to be zero.
3162 (vect_setup_realignment): Update call accordingly.
3163 * tree-vect-stmts.c (vectorizable_store): Likewise.
3164 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3166 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3168 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3169 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3170 (vectorizable_reduction): Likewise.
3171 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3172 (vect_detect_hybrid_slp_stmts): Likewise.
3173 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3175 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3177 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3178 (wide_int_set_zero_nonzero_bits): ...this.
3179 (zero_nonzero_bits_from_vr): Rename to...
3180 (vrp_set_zero_nonzero_bits): ...this.
3181 (extract_range_from_multiplicative_op_1): Abstract wide int
3183 (wide_int_range_multiplicative_op): ...here.
3184 (extract_range_from_binary_expr_1): Extract wide int binary
3185 operations into their own functions.
3186 (wide_int_range_lshift): New.
3187 (wide_int_range_can_optimize_bit_op): New.
3188 (wide_int_range_shift_undefined_p): New.
3189 (wide_int_range_bit_xor): New.
3190 (wide_int_range_bit_ior): New.
3191 (wide_int_range_bit_and): New.
3192 (wide_int_range_trunc_mod): New.
3193 (extract_range_into_wide_ints): New.
3194 (vrp_shift_undefined_p): New.
3195 (extract_range_from_multiplicative_op): New.
3196 (vrp_can_optimize_bit_op): New.
3197 * tree-vrp.h (value_range::dump): New.
3198 (wide_int_range_multiplicative_op): New.
3199 (wide_int_range_lshift):New.
3200 (wide_int_range_shift_undefined_p): New.
3201 (wide_int_range_bit_xor): New.
3202 (wide_int_range_bit_ior): New.
3203 (wide_int_range_bit_and): New.
3204 (wide_int_range_trunc_mod): New.
3205 (zero_nonzero_bits_from_bounds): Rename to...
3206 (wide_int_set_zero_nonzero_bits): ...this.
3207 (zero_nonzero_bits_from_vr): Rename to...
3208 (vrp_set_zero_nonzero_bits): ...this.
3209 (range_easy_mask_min_max): Rename to...
3210 (wide_int_range_can_optimize_bit_op): this.
3211 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3212 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3214 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3216 * tree-vectorizer.h (vect_orig_stmt): New function.
3217 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3218 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3219 (vect_create_epilog_for_reduction): Likewise.
3220 (vectorizable_live_operation): Likewise.
3221 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3222 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3223 * tree-vect-stmts.c (vectorizable_call): Likewise.
3224 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3226 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3228 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3230 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3231 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3232 (vect_transform_loop): Likewise.
3233 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3235 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3237 * tree-vectorizer.h (vect_schedule_slp): Return void.
3238 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3239 (vect_schedule_slp): Likewise.
3241 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3243 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3245 (vect_transform_loop): Update calls accordingly. Schedule SLP
3246 instances before the main loop, if any exist.
3248 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3250 PR tree-optimization/86749
3251 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3252 If the lhs is used in a COND_EXPR, check that it is being used
3253 as the "then" or "else" value.
3255 2018-08-01 Tom de Vries <tdevries@suse.de>
3258 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3259 speculation_safe_value_not_needed.
3261 2018-08-01 Richard Biener <rguenther@suse.de>
3263 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3266 2018-08-01 Martin Liska <mliska@suse.cz>
3268 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3269 format how successful transformation is dumped.
3270 (gimple_mod_pow2_value_transform): Likewise.
3271 (gimple_mod_subtract_transform): Likewise.
3272 (gimple_stringops_transform): Likewise.
3274 2018-08-01 Martin Liska <mliska@suse.cz>
3277 * value-prof.c (interesting_stringop_to_profile_p):
3278 Simplify the code and add BUILT_IN_MEMMOVE.
3279 (gimple_stringops_transform): Likewise.
3281 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3283 * config/aarch64/aarch64-simd.md
3284 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3285 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3286 use GPI iterator instead of SI mode.
3288 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3290 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3291 rs6000_speculation_barrier.
3292 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3293 new barrier pattern name.
3295 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3297 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3298 (speculation_barrier): New insn.
3300 2018-08-01 Richard Biener <rguenther@suse.de>
3303 * graphite.h: Include isl/id.h and isl/space.h to allow build
3306 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3309 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3310 mode for COFF targets.
3311 * defaults.h (TARGET_COFF): Define.
3312 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3313 TARGET_COFF): Define.
3314 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3315 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3316 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3318 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3320 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3321 * gimple-streamer-out.c (output_bb): Save it.
3322 * lto-streamer-in.c (input_struct_function_base): Restore
3323 instance discriminator if available. Create map on demand.
3324 * lto-streamer-out.c (output_struct_function_base): Save it if
3326 * final.c (decl_to_instance_map): Document LTO strategy.
3328 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3329 Olivier Hainque <hainque@adacore.com>
3331 * debug.h (decl_to_instance_map_t): New type.
3332 (decl_to_instance_map): Declare.
3333 (maybe_create_decl_to_instance_map): New inline function.
3334 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3335 to track basic block discriminators.
3336 (final_start_function_1): Initialize them.
3337 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3339 (decl_to_instance_map): New variable.
3340 (map_decl_to_instance, maybe_set_discriminator): New functions.
3341 (notice_source_line): Set discriminator.
3343 2018-07-31 Ian Lance Taylor <iant@golang.org>
3345 * targhooks.c (default_have_speculation_safe_value): Add
3348 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3350 * dump-context.h: Include "pretty-print.h".
3351 (dump_context::refresh_dumps_are_enabled): New decl.
3352 (dump_context::emit_item): New decl.
3353 (class dump_context): Add fields "m_test_pp" and
3355 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3356 (temp_dump_context::get_dumped_text): New decl.
3357 (class temp_dump_context): Add field "m_pp".
3358 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3359 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3361 (set_dump_file): Update for above change.
3362 (set_alt_dump_file): Likewise.
3363 (dump_loc): New overload, taking a pretty_printer *.
3364 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3365 to any test pretty-printer.
3366 (make_item_for_dump_gimple_stmt): New function, adapted from
3367 optinfo::add_gimple_stmt.
3368 (dump_context::dump_gimple_stmt): Call it, and use the result,
3369 eliminating the direct usage of dump_file and alt_dump_file in
3370 favor of indirectly using them via emit_item.
3371 (make_item_for_dump_gimple_expr): New function, adapted from
3372 optinfo::add_gimple_expr.
3373 (dump_context::dump_gimple_expr): Call it, and use the result,
3374 eliminating the direct usage of dump_file and alt_dump_file in
3375 favor of indirectly using them via emit_item.
3376 (make_item_for_dump_generic_expr): New function, adapted from
3378 (dump_context::dump_generic_expr): Call it, and use the result,
3379 eliminating the direct usage of dump_file and alt_dump_file in
3380 favor of indirectly using them via emit_item.
3381 (make_item_for_dump_printf_va): New function, adapted from
3382 optinfo::add_printf_va.
3383 (make_item_for_dump_printf): New function.
3384 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3385 and use the result, eliminating the direct usage of dump_file and
3386 alt_dump_file in favor of indirectly using them via emit_item.
3387 (make_item_for_dump_dec): New function.
3388 (dump_context::dump_dec): Call it, and use the result,
3389 eliminating the direct usage of dump_file and alt_dump_file in
3390 favor of indirectly using them via emit_item.
3391 (make_item_for_dump_symtab_node): New function, adapted from
3392 optinfo::add_symtab_node.
3393 (dump_context::dump_symtab_node): Call it, and use the result,
3394 eliminating the direct usage of dump_file and alt_dump_file in
3395 favor of indirectly using them via emit_item.
3396 (dump_context::begin_scope): Reimplement, avoiding direct usage
3397 of dump_file and alt_dump_file in favor of indirectly using them
3399 (dump_context::emit_item): New member function.
3400 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3401 Set up test pretty-printer on the underlying context. Call
3402 refresh_dumps_are_enabled.
3403 (temp_dump_context::~temp_dump_context): Call
3404 refresh_dumps_are_enabled.
3405 (temp_dump_context::get_dumped_text): New member function.
3406 (selftest::verify_dumped_text): New function.
3407 (ASSERT_DUMPED_TEXT_EQ): New macro.
3408 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3409 and then without optinfo enabled. Add uses of
3410 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3411 * dumpfile.h: Update comment for the dump_* API.
3412 * optinfo-emit-json.cc
3413 (selftest::test_building_json_from_dump_calls): Update for new
3414 param for temp_dump_context ctor.
3415 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3416 and "m_owned" field.
3417 (optinfo_item::~optinfo_item): Likewise.
3418 (optinfo::add_item): New member function.
3419 (optinfo::emit): Update comment.
3420 (optinfo::add_string): Delete.
3421 (optinfo::add_printf): Delete.
3422 (optinfo::add_printf_va): Delete.
3423 (optinfo::add_gimple_stmt): Delete.
3424 (optinfo::add_gimple_expr): Delete.
3425 (optinfo::add_tree): Delete.
3426 (optinfo::add_symtab_node): Delete.
3427 (optinfo::add_dec): Delete.
3428 * optinfo.h (class dump_context): New forward decl.
3429 (optinfo::add_item): New decl.
3430 (optinfo::add_string): Delete.
3431 (optinfo::add_printf): Delete.
3432 (optinfo::add_printf_va): Delete.
3433 (optinfo::add_gimple_stmt): Delete.
3434 (optinfo::add_gimple_expr): Delete.
3435 (optinfo::add_tree): Delete.
3436 (optinfo::add_symtab_node): Delete.
3437 (optinfo::add_dec): Delete.
3438 (optinfo::add_poly_int): Delete.
3439 (optinfo_item::optinfo_item): Remove "owned" param.
3440 (class optinfo_item): Remove field "m_owned".
3442 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3445 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3446 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3447 requested variable alignment.
3448 (expand_one_ssa_partition): Likewise.
3449 (expand_one_var): Likewise.
3451 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3453 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3454 to speculation_safe_value_not_needed.
3456 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3458 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3459 * targhooks.c (speculation_safe_value_not_needed): New function.
3460 * target.def (have_speculation_safe_value): Update documentation.
3461 * doc/tm.texi: Regenerated.
3463 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3465 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3466 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3468 (despeculate_copy<ALLI:mode>_insn): New insn.
3469 (despeculate_copyti_insn): New insn.
3470 (despeculate_simple<ALLI:mode>): New insn
3471 (despeculate_simpleti): New insn.
3472 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3474 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3475 aarch64_speculation_safe_value.
3476 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3478 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3480 * config/aarch64/aarch64-speculation.cc: New file.
3481 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3482 before pass_reorder_blocks.
3483 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3485 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3486 X14 and X15 when tracking speculation.
3487 * config/aarch64/aarch64.md (register name constants): Add
3488 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3489 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3490 (speculation_barrier): New insn attribute.
3491 (cmp<mode>): Allow SP in comparisons.
3492 (speculation_tracker): New insn.
3493 (speculation_barrier): Add speculation_barrier attribute.
3494 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3495 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3496 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3498 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3500 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3501 aarch64_track_speculation is true.
3502 (tb<optab><mode>1): Likewise.
3503 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3504 generate CB[N]Z when tracking speculation.
3505 (aarch64_split_compare_and_swap): Likewise.
3506 (aarch64_split_atomic_op): Likewise.
3508 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3510 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3512 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3514 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3515 (speculation_barrier): New insn.
3517 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3519 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3520 * config/arm/arm.md (speculation_barrier): New expand.
3521 (speculation_barrier_insn): New pattern.
3523 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3525 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3526 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3527 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3528 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3530 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3531 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3532 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3533 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3534 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3535 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3536 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3537 * builtins.c (expand_speculation_safe_value): New function.
3538 (expand_builtin): Call it.
3539 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3540 * doc/extend.texi: Document __builtin_speculation_safe_value.
3541 * doc/md.texi: Document "speculation_barrier" pattern.
3542 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3543 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3544 * doc/tm.texi: Regenerated.
3545 * target.def (have_speculation_safe_value, speculation_safe_value): New
3547 * targhooks.c (default_have_speculation_safe_value): New function.
3548 (default_speculation_safe_value): New function.
3549 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3550 (default_speculation_safe_value): Add prototype.
3552 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3554 * dump-context.h (dump_context::dump_loc): New decl.
3555 * dumpfile.c (dump_context::dump_loc): New member function.
3556 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3557 and dump_gimple_stmt.
3558 (dump_context::dump_gimple_expr_loc): Likewise, using
3560 (dump_context::dump_generic_expr_loc): Likewise, using
3562 (dump_context::dump_printf_loc_va): Likewise, using
3564 (dump_context::begin_scope): Explicitly using the global function
3565 "dump_loc", rather than the member function.
3567 2018-07-31 Martin Sebor <msebor@redhat.com>
3569 PR tree-optimization/86741
3570 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3572 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3574 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3575 depend on whether prefetch instructions will be emitted or not.
3576 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3577 will be emitted or not.
3578 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3579 (TARGET_SETMEM_PFD): New macros.
3581 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3583 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3584 (NULL_STMT_VEC_INFO): Delete.
3585 (stmt_vec_info::operator*): Likewise.
3586 (stmt_vec_info::operator gimple *): Likewise.
3587 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3588 of NULL_STMT_VEC_INFO.
3589 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3590 (vect_reassociating_reduction_p): Likewise.
3591 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3592 (vectorizable_store): Likewise.
3593 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3594 (vec_info::free_stmt_vec_infos): Likewise.
3596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3598 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3599 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3603 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3604 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3605 (vec_info::free_stmt_vec_info): New private member functions.
3606 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3607 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3608 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3609 set_stmt_vec_info_vec and free_stmt_vec_infos.
3610 * tree-vect-loop.c (_loop_vec_info): Remove call to
3611 set_stmt_vec_info_vec.
3612 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3613 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3614 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3615 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3616 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3617 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3618 with the clearing in the xcalloc.
3619 (stmt_vec_info_vec): Delete.
3620 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3621 (vectorize_loops): Likewise.
3622 (vec_info::~vec_info): Remove argument from call to
3623 free_stmt_vec_infos.
3624 (vec_info::add_stmt): Remove vinfo argument from call to
3627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3629 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3630 rather than a gimple stmt.
3631 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3632 information for pattern statements when passed the original
3633 statement; instead wait to be passed the pattern statement itself.
3634 Don't call set_vinfo_for_stmt here.
3635 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3636 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3637 stmt_vec_infos here.
3638 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3639 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3640 stmt_vec_infos entry.
3642 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3644 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3645 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3646 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3647 * tree-vect-stmts.c (vectorizable_call): Likewise.
3648 (vectorizable_simd_clone_call): Likewise.
3650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3652 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3653 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3654 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3655 * tree-vect-loop.c (vect_transform_loop): Likewise.
3656 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3657 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3659 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3661 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3662 (vect_dr_stmt): Delete.
3663 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3664 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3666 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3667 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3668 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3669 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3670 (vect_analyze_data_refs): Likewise.
3671 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3673 (vect_find_same_alignment_drs): Likewise.
3674 (vect_slp_analyze_node_dependences): Update calls accordingly.
3675 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3676 instead of DR_VECT_AUX.
3677 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3678 of a vector data references. Use vec_info::lookup_dr instead of
3680 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3681 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3682 instead of DR_VECT_AUX.
3684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3686 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3688 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3690 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3691 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3692 (vect_gen_prolog_loop_niters): Likewise.
3694 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3696 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3697 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3698 (vect_known_alignment_in_bytes, vect_dr_behavior)
3699 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3700 instead of data_references. Update calls to other routines for
3701 which the same change has been made.
3702 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3703 dr_vec_infos instead of stmt_vec_infos.
3704 (vect_analyze_data_ref_dependence): Update call accordingly.
3705 (vect_slp_analyze_data_ref_dependence)
3706 (vect_record_base_alignments): Use DR_VECT_AUX.
3707 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3708 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3709 (vector_alignment_reachable_p, vect_get_data_access_cost)
3710 (vect_peeling_supportable, vect_analyze_group_access_1)
3711 (vect_analyze_group_access, vect_analyze_data_ref_access)
3712 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3713 (vect_compile_time_alias, vect_small_gap_p)
3714 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3715 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3716 instead of data_references. Update calls to other routines for
3717 which the same change has been made.
3718 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3719 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3720 (vect_slp_analyze_and_verify_node_alignment)
3721 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3722 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3723 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3725 (_vect_peel_info::dr): Replace with...
3726 (_vect_peel_info::dr_info): ...this new field.
3727 (vect_peeling_hash_get_most_frequent)
3728 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3729 (vect_peeling_hash_get_lowest_cost):
3730 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3731 routines for which the same change has been made.
3732 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3734 * tree-vect-loop-manip.c (get_misalign_in_elems)
3735 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3737 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3738 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3739 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3740 (get_group_load_store_type, get_negative_load_store_type)
3741 (vect_get_data_ptr_increment, vectorizable_store)
3742 (vectorizable_load): Likewise.
3743 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3744 Update calls to other routines for which the same change has been made.
3746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3748 * tree-vectorizer.h (vec_info::move_dr): New member function.
3749 (dataref_aux): Rename to...
3750 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3751 (_stmt_vec_info::dr_aux): Update accordingly.
3752 (_stmt_vec_info::data_ref_info): Delete.
3753 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3754 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3755 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3756 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3758 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3759 (STMT_VINFO_DR_INFO): New macro.
3760 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3761 (set_dr_misalignment): Update after rename of dataref_aux.
3762 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3763 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3764 initialization of STMT_VINFO_DATA_REF.
3765 * tree-vectorizer.c (vec_info::move_dr): New function.
3766 * tree-vect-patterns.c (vect_recog_bool_pattern)
3767 (vect_recog_mask_conversion_pattern)
3768 (vect_recog_gather_scatter_pattern): Use it.
3769 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3770 the "dr" and "stmt" fields of dr_vec_info instead of
3771 STMT_VINFO_DATA_REF.
3773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3775 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3776 (is_pattern_stmt_p): Use it.
3777 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3778 on pattern statements.
3780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3782 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3783 original stmt as a stmt_vec_info rather than a gimple stmt.
3784 (vect_pattern_recog_1): Take the statement directly as a
3785 stmt_vec_info, rather than via a gimple_stmt_iterator.
3786 Update call to vect_mark_pattern_stmts.
3787 (vect_pattern_recog): Update calls accordingly.
3789 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3791 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3792 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3793 a vect_def_type for the first argument.
3794 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3795 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3796 operand if it isn't defined by a vectorized statement.
3797 (vect_build_gather_load_calls): Remove the mask_dt argument and
3798 update calls to vect_get_vec_def_for_stmt_copy.
3799 (vectorizable_bswap): Likewise the dt argument.
3800 (vectorizable_call): Update calls to vectorizable_bswap and
3801 vect_get_vec_def_for_stmt_copy.
3802 (vectorizable_simd_clone_call, vectorizable_assignment)
3803 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3804 (vectorizable_comparison): Update calls to
3805 vect_get_vec_def_for_stmt_copy.
3806 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3808 (vect_get_loop_based_defs): Remove dt argument and update call
3809 to vect_get_vec_def_for_stmt_copy.
3810 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3811 and vect_get_vec_def_for_stmt_copy.
3812 (vectorizable_load): Update calls to vect_build_gather_load_calls
3813 and vect_get_vec_def_for_stmt_copy.
3814 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3815 (vectorizable_reduction, vectorizable_live_operation): Update calls
3816 to vect_get_vec_def_for_stmt_copy.
3818 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3820 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3821 and gimple stmt arguments with a stmt_vec_info.
3822 (vect_record_base_alignments): Update calls accordingly.
3823 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3824 and gimple stmt arguments with a stmt_vec_info.
3825 (vect_build_slp_tree_1): Remove vinfo argument and update call
3826 to vect_record_max_nunits.
3827 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3828 and vect_record_max_nunits.
3830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3832 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3833 file and take a stmt_vec_info instead of a gimple stmt.
3834 (supportable_widening_operation, vect_finish_replace_stmt)
3835 (vect_finish_stmt_generation, vect_get_store_rhs)
3836 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3837 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3838 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3839 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3840 (vect_create_data_ref_ptr, bump_vector_ptr)
3841 (vect_permute_store_chain, vect_setup_realignment)
3842 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3843 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3844 (vectorizable_reduction, vectorizable_induction)
3845 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3846 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3847 than gimple stmts as arguments.
3848 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3849 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3850 (can_group_stmts_p, vect_check_gather_scatter)
3851 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3852 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3853 (vect_permute_load_chain, vect_shift_permute_load_chain)
3854 (vect_transform_grouped_load)
3855 (vect_record_grouped_load_vectors): Likewise.
3856 * tree-vect-loop.c (vect_fixup_reduc_chain)
3857 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3858 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3859 (vectorizable_reduction, vectorizable_induction)
3860 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3861 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3862 (vect_get_load_store_mask): Likewise.
3863 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3864 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3865 * tree-vect-stmts.c (vect_mark_relevant)
3866 (is_simple_and_all_uses_invariant)
3867 (exist_non_indexing_operands_for_use_p, process_use)
3868 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3869 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3870 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3871 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3872 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3873 (get_negative_load_store_type, get_load_store_type)
3874 (vect_check_load_store_mask, vect_check_store_rhs)
3875 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3876 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3877 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3878 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3879 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3880 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3881 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3882 (supportable_widening_operation): Likewise.
3884 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3886 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3887 a stmt_vec_info instead of a gcall.
3888 (vect_check_gather_scatter): Update call accordingly.
3889 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3891 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3892 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3893 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3894 instead of a gimple stmt.
3895 (vect_transform_loop): Update calls accordingly.
3896 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3897 stmt_vec_infos instead of gimple stmts.
3898 (vect_analyze_slp_instance): Update use accordingly.
3899 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3900 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3901 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3902 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3903 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3904 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3905 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3906 down to subroutines.
3908 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3910 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3911 of the worklist from a vector of gimple stmts to a vector of
3913 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3914 (vect_mark_stmts_to_be_vectorized): Likewise
3916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3918 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3919 statement before passing it to vect_analyze_stmt.
3920 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3921 the chain of phi vector definitions. Track the exit phi via its
3923 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3924 STMT_VINFO_REDUC_DEF.
3925 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3926 stmt_vec_infos to handle the statement chains.
3927 (vect_get_slp_defs): Record the first statement in the node
3928 using a stmt_vec_info.
3929 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3930 statements here and pass their stmt_vec_info down to subroutines.
3931 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3932 down to vect_finish_stmt_generation.
3933 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3934 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3935 stmt_vec_infos to subroutines.
3936 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3939 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3941 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3942 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3943 (vect_permute_store_chain, vect_setup_realignment)
3944 (vect_permute_load_chain, vect_shift_permute_load_chain)
3945 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3946 stmts internally, and when passing values to other vectorizer routines.
3947 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3948 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3949 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3950 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3951 (vectorizable_reduction, vectorizable_induction)
3952 (vectorizable_live_operation, vect_transform_loop_stmt)
3953 (vect_transform_loop): Likewise.
3954 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3955 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3956 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3957 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3958 (vect_slp_analyze_node_operations_1): Likewise.
3959 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3960 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3961 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3962 (vect_finish_stmt_generation_1, get_group_load_store_type)
3963 (get_load_store_type, vect_build_gather_load_calls)
3964 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3965 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3966 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3967 (vectorizable_store, vectorizable_load, vectorizable_condition)
3968 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3969 (supportable_widening_operation): Likewise.
3970 (vect_get_vector_types_for_stmt): Likewise.
3971 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3975 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3976 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3977 (vect_permute_store_chain, vect_permute_load_chain)
3978 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3979 repeated stmt_vec_info lookups.
3980 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3981 (vect_update_ivs_after_vectorizer): Likewise.
3982 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3983 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3984 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3985 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3986 (vect_bb_slp_scalar_cost): Likewise.
3987 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3989 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3991 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3992 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3993 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3994 to get gassigns and gcalls, rather than operating on generc gimple
3996 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3997 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3998 (vectorizable_load, vect_analyze_stmt): Likewise.
3999 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4003 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4004 return stmt_vec_infos rather than gimple stmts. Do not accept
4006 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4008 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4009 Update use of get_later_stmt.
4010 (vect_get_constant_vectors): Update call accordingly.
4011 (vect_schedule_slp_instance): Likewise
4012 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4013 (vect_slp_analyze_instance_dependence): Likewise.
4014 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4018 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4019 (stmt_info_for_cost::stmt_info): ...this new field.
4020 (add_stmt_costs): Update accordingly.
4021 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4022 (vect_get_known_peeling_cost): Likewise.
4023 (vect_estimate_min_profitable_iters): Likewise.
4024 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4026 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4028 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4029 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4030 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4032 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4036 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4037 a gimple stmt to a stmt_vec_info.
4038 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4042 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4043 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4044 (_loop_vec_info::reduction_chains): Likewise.
4045 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4047 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4051 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4052 a gimple stmt to a stmt_vec_info.
4053 (_stmt_vec_info::next_element): Likewise.
4054 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4055 (vect_slp_analyze_and_verify_node_alignment)
4056 (vect_analyze_group_access_1, vect_analyze_group_access)
4057 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4058 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4059 (vect_supportable_dr_alignment): Update accordingly.
4060 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4061 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4062 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4063 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4064 * tree-vect-slp.c (vect_build_slp_tree_1)
4065 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4066 (vect_split_slp_store_group, vect_analyze_slp_instance)
4067 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4068 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4069 (get_group_load_store_type, get_load_store_type)
4070 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4071 (vect_transform_stmt, vect_remove_stores): Likewise.
4073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4075 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4077 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4078 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4079 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4080 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4081 (vector_alignment_reachable_p, vect_get_data_access_cost)
4082 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4083 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4084 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4085 (vect_analyze_group_access_1, vect_analyze_group_access)
4086 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4087 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4088 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4089 result of vect_dr_stmt and use the stmt_vec_info instead of
4090 the associated gimple stmt.
4091 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4092 (vect_gen_prolog_loop_niters): Likewise.
4093 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4097 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4098 to a vec<stmt_vec_info>.
4099 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4100 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4102 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4103 to a vec<stmt_vec_info>.
4104 (bst_traits::value_type, bst_traits::value_type): Likewise.
4105 (bst_traits::hash): Update accordingly.
4106 (vect_get_and_check_slp_defs): Change the stmts parameter from
4107 a vec<gimple *> to a vec<stmt_vec_info>.
4108 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4109 (vect_build_slp_tree): Likewise.
4110 (vect_build_slp_tree_2): Likewise. Update uses of
4111 SLP_TREE_SCALAR_STMTS.
4112 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4113 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4114 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4115 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4116 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4117 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4118 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4119 (vect_get_constant_vectors, vect_get_slp_defs)
4120 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4121 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4122 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4123 instead of gimple stmts.
4124 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4125 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4126 (vect_slp_analyze_instance_dependence): Update uses of
4127 SLP_TREE_SCALAR_STMTS.
4128 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4129 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4130 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4131 (get_initial_defs_for_reduction): Likewise.
4132 (vect_create_epilog_for_reduction): Likewise.
4133 (vectorize_fold_left_reduction): Likewise.
4134 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4135 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4136 (can_vectorize_live_stmts): Likewise.
4138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4140 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4141 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4142 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4144 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4146 (gather_scalar_reductions): Update after above interface changes.
4147 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4148 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4150 (vect_force_simple_reduction): Likewise.
4151 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4152 LOOP_VINFO_REDUCTIONS.
4153 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4155 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4157 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4158 a gimple stmt to a stmt_vec_info.
4159 * tree-vect-loop.c (vect_active_double_reduction_p)
4160 (vect_force_simple_reduction, vectorizable_reduction): Update
4163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4165 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4166 vec<gimple *> to a vec<stmt_vec_info>.
4167 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4168 the reduction_phis argument from a vec<gimple *> to a
4170 (vectorizable_reduction): Likewise the phis local variable that
4171 is passed to vect_create_epilog_for_reduction. Update for new type
4172 of SLP_TREE_VEC_STMTS.
4173 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4174 (vectorizable_live_operation): Likewise.
4175 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4176 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4180 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4181 a gimple stmt to a stmt_vec_info.
4182 (vectorizable_condition, vectorizable_live_operation)
4183 (vectorizable_reduction, vectorizable_induction): Pass back the
4184 vectorized statement as a stmt_vec_info.
4185 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4186 use of STMT_VINFO_VEC_STMT.
4187 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4188 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4189 as stmt_vec_infos rather than gimple stmts.
4190 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4192 (vectorizable_live_operation): Likewise.
4193 (vectorizable_reduction, vectorizable_induction): Likewise,
4194 updating use of STMT_VINFO_VEC_STMT.
4195 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4196 of STMT_VINFO_VEC_STMT.
4197 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4198 (vectorizable_simd_clone_call, vectorizable_conversion)
4199 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4200 (vectorizable_store, vectorizable_load, vectorizable_condition)
4201 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4202 from a gimple stmt to a stmt_vec_info.
4203 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4204 pointer to a stmt_vec_info to the vectorizable_* routines.
4206 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4208 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4209 a gimple stmt to a stmt_vec_info.
4210 (is_pattern_stmt_p): Update accordingly.
4211 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4212 (vect_record_grouped_load_vectors): Likewise.
4213 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4214 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4215 (vect_model_reduction_cost): Likewise.
4216 (vect_create_epilog_for_reduction): Likewise.
4217 (vectorizable_reduction, vectorizable_induction): Likewise.
4218 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4219 Return the stmt_vec_info for the pattern statement.
4220 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4221 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4222 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4223 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4224 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4225 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4226 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4227 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4229 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4231 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4232 (vect_finish_stmt_generation): Likewise.
4233 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4234 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4235 (vect_build_gather_load_calls): Use the return value of the above
4236 functions instead of a separate call to vinfo_for_stmt. Use narrow
4237 scopes for the input gimple stmt and wider scopes for the associated
4238 stmt_vec_info. Use vec_info::lookup_def when setting these
4239 stmt_vec_infos from an SSA_NAME definition.
4240 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4241 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4242 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4243 (vectorizable_store, vectorizable_load, vectorizable_condition)
4244 (vectorizable_comparison): Likewise.
4245 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4246 (vectorizable_reduction): Likewise.
4248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4250 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4251 stmt_vec_info * parameter before the optional gimple **.
4252 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4253 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4254 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4255 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4256 (vectorizable_live_operation): Likewise.
4257 * tree-vect-patterns.c (type_conversion_p): Likewise.
4258 (vect_look_through_possible_promotion): Likewise.
4259 (vect_recog_rotate_pattern): Likewise.
4260 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4264 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4265 a typedef to a wrapper class.
4266 (NULL_STMT_VEC_INFO): New macro.
4267 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4268 (stmt_vec_info::operator*): New function.
4269 (stmt_vec_info::operator gimple *): Likewise.
4270 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4271 (add_stmt_costs): Likewise.
4272 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4273 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4274 (vect_get_known_peeling_cost): Likewise.
4275 (vect_estimate_min_profitable_iters): Likewise.
4276 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4277 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4278 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4279 (vectorizable_store, free_stmt_vec_infos): Likewise.
4280 (new_stmt_vec_info): Change return type of xcalloc to
4283 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4285 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4286 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4287 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4288 a single_imm_use-based sequence.
4289 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4293 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4294 * tree-vectorizer.c (vec_info::lookup_def): New function.
4295 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4296 (vect_widened_op_tree): Likewise.
4297 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4298 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4299 (vectorizable_reduction): Likewise.
4300 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4302 (vect_is_slp_reduction): Update calls accordingly. Use
4303 vec_info::lookup_def.
4304 (vect_is_simple_reduction): Likewise
4305 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4307 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4309 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4310 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4311 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4313 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4314 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4315 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4316 (vect_is_slp_reduction, vectorizable_induction)
4317 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4318 * tree-vect-patterns.c (vect_init_pattern_stmt):
4319 (vect_determine_min_output_precision_1, vect_determine_precisions)
4320 (vect_pattern_recog): Likewise.
4321 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4322 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4323 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4324 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4325 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4326 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4327 info field from a loop to a loop_vec_info.
4329 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4331 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4332 (vec_info::add_stmt): Declare.
4333 * tree-vectorizer.c (vec_info::add_stmt): New function.
4334 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4335 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4336 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4337 (vectorizable_induction): Likewise.
4338 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4339 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4340 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4341 (vectorizable_load): Likewise.
4342 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4343 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4344 (vect_recog_gather_scatter_pattern): Likewise.
4345 (append_pattern_def_seq): Likewise. Remove a check that is
4346 performed by add_stmt itself.
4348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4350 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4351 which make_ssa_name was called with new_stmt before new_stmt
4354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4356 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4358 (vect_is_slp_reduction): ...here...
4359 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4360 that are already known to be false.
4362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4364 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4365 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4366 STMT_VINFO_NUM_SLP_USES when it's true.
4367 (vect_free_slp_instance): Add a final_p parameter and pass it to
4369 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4370 (vect_analyze_slp_instance): Likewise.
4371 (vect_slp_analyze_operations): Likewise.
4372 (vect_slp_analyze_bb_1): Likewise.
4373 * tree-vectorizer.c (vec_info): Likewise.
4374 * tree-vect-loop.c (vect_transform_loop): Likewise.
4376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4378 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4379 function is not called for second and subsequent members of
4382 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4384 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4385 cases for nested loops from here to ...
4386 (vect_create_epilog_for_reduction): ...here. Only call
4387 vect_is_simple_use for inner-loop reductions.
4389 2018-07-31 Martin Liska <mliska@suse.cz>
4391 PR gcov-profile/85338
4392 PR gcov-profile/85350
4393 PR gcov-profile/85372
4394 * profile.c (struct location_triplet): New.
4395 (struct location_triplet_hash): Likewise.
4396 (output_location): Do not output a BB that
4397 is already recorded for a line.
4398 (branch_prob): Use streamed_locations.
4400 2018-07-31 Martin Liska <mliska@suse.cz>
4402 PR gcov-profile/85370
4403 * coverage.c (coverage_begin_function): Do not mark target
4404 clones as artificial functions.
4406 2018-07-31 Martin Liska <mliska@suse.cz>
4408 PR gcov-profile/83813
4409 PR gcov-profile/84758
4410 PR gcov-profile/85217
4411 PR gcov-profile/85332
4412 * profile.c (branch_prob): Do not record GOTO expressions
4413 for GIMPLE statements which locations are already streamed.
4415 2018-07-31 Olivier Hainque <hainque@adacore.com>
4417 * gcc.c (handle_spec_function): Accept a soft_matched_part
4418 argument, as do_spec_1. Pass it down to ...
4419 (eval_spec_function): Accept a soft_matched_part argument,
4420 and pass it down to ...
4421 (do_spec_2): Accept a soft_matched_part argument, and pass
4422 it down to do_spec_1.
4423 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4424 (handle_braces): Update call to handle_spec_function.
4425 (driver::set_up_specs): Update calls to do_spec_2.
4426 (compare_debug_dump_opt_spec_function): Likewise.
4427 (compare_debug_self_opt_spec_function): Likewise.
4429 2018-07-31 Olivier Hainque <hainque@adacore.com>
4431 * common.opt (nolibc): New option.
4432 * doc/invoke.texi (Link Options): Document it.
4433 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4434 * config/alpha/linux.h: Likewise.
4435 * config/arc/elf.h: Likewise.
4436 * config/arm/uclinux-elf.h: Likewise.
4437 * config/arm/unknown-elf.h: Likewise.
4438 * config/avr/avrlibc.h: Likewise.
4439 * config/bfin/bfin.h: Likewise.
4440 * config/bfin/linux.h: Likewise.
4441 * config/bfin/uclinux.h: Likewise.
4442 * config/darwin.h: Likewise.
4443 * config/darwin10.h: Likewise.
4444 * config/darwin12.h: Likewise.
4445 * config/gnu-user.h: Likewise.
4446 * config/lm32/uclinux-elf.h: Likewise.
4447 * config/pa/pa-hpux11.h: Likewise.
4448 * config/pa/pa64-hpux.h: Likewise.
4449 * config/sparc/sparc.h: Likewise.
4451 2018-07-31 Olivier Hainque <hainque@adacore.com>
4453 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4454 undefined variables.
4456 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4459 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4462 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4464 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4465 terminated string literal.
4467 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4469 PR rtl-optimization/85160
4470 * combine.c (is_just_move): New function.
4471 (try_combine): Allow combining two instructions into two if neither of
4472 the original instructions was a move.
4474 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4477 * doc/extend.texi (Global Register Variables): Discourage use of type
4479 (Local Register Variables): Likewise.
4481 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4483 PR tree-optimization/86506
4484 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4486 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4489 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4490 hard_regno, make sure no insn between `from` and `to` clobbers it.
4492 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4493 Tom de Vries <tdevries@suse.de>
4495 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4496 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4497 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4498 PTX_DEFAULT_RUNTIME_DIM.
4499 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4501 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4503 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4504 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4505 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4507 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4509 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4511 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4512 predicate to reflect toc fusion has been deleted.
4513 (toc_fusion_mem_raw): Delete, no longer used.
4514 (toc_fusion_mem_wrapped): Likewise.
4515 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4517 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4518 Delete, no longer used.
4519 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4520 meant to be used for toc fusion.
4521 (rs6000_debug_print_mode): Delete toc fusion debugging.
4522 (rs6000_debug_reg_global): Likewise.
4523 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4524 fusion and secondary reload support that were never used.
4525 (rs6000_option_override_internal): Delete TOC fusion, that was only
4526 partially defined, and it did not work unless you also used the
4528 (rs6000_legitimate_address_p): Delete TOC fusion support.
4529 (rs6000_opt_masks): Likewise.
4530 (fusion_wrap_memory_address): Delete function, no longer used.
4531 (fusion_split_address); Delete TOC fusion support.
4532 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4533 longer used with toc fusion being deleted.
4534 (TARGET_TOC_FUSION_FP): Likewise.
4535 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4537 (toc fusion spliter): Delete TOC fusion support.
4538 (toc_fusionload_<mode>): Likewise.
4539 (toc_fusionload_di): Likewise.
4540 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4541 longer needs to be named. Rename predicate to delete TOC fusion.
4542 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4543 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4544 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4545 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4546 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4548 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4550 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4551 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4552 __int128 in built-in function prototypes.
4553 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4554 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4556 2018-07-27 Martin Sebor <msebor@redhat.com>
4558 PR tree-optimization/86696
4559 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4560 types, including enums.
4561 (handle_char_store): Be prepared for the above function to fail.
4563 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4565 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4566 when optimization level is lower than 2 or optimize for size.
4568 2018-07-26 Martin Sebor <msebor@redhat.com>
4570 PR tree-optimization/86043
4571 PR tree-optimization/86042
4572 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4573 (get_string_cst_length): Rename...
4574 (get_min_string_length): ...to this. Add argument.
4575 (handle_char_store): Extend to handle multi-character stores by
4577 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4578 * tree.h (initializer_zerop): Add argument.
4580 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4583 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4584 declare target to variables if they have always,{to,from,tofrom} map
4587 2018-07-26 Martin Liska <mliska@suse.cz>
4590 * lto-wrapper.c: Add linker_output as prefix
4591 for ltrans_output_file.
4593 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4595 PR rtl-optimization/85805
4596 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4597 value for hard registers if that was written in the same mode.
4599 2018-07-26 Martin Liska <mliska@suse.cz>
4601 PR gcov-profile/86536
4602 * gcov.c (format_gcov): Use printf format %.*f directly
4603 and do not handle special values.
4605 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4607 * common/config/arc/arc-common.c (arc_option_optimization_table):
4608 Update default optimizations for size.
4610 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4612 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4613 * config/arc/constraints.md (CfZ): New constraint.
4614 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4615 (subsf3_fpu): Likewise.
4616 (cmpsf_fpu): Likewise.
4617 (cmpsf_fpu_uneq): Likewise.
4619 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4621 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4623 (arc_is_uncached_mem_p): uncached applies to both the variable and
4626 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4628 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4631 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4633 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4634 field "m_scopes" from vec to auto_vec.
4636 2018-07-25 Martin Liska <mliska@suse.cz>
4638 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4641 2018-07-25 Richard Biener <rguenther@suse.de>
4644 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4645 special wrt context_die late.
4646 (gen_subprogram_die): Re-use DIEs in local scope.
4648 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4650 PR tree-optimization/86644
4651 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4653 2018-07-25 Martin Liska <mliska@suse.cz>
4656 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4657 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4659 2018-07-25 Martin Liska <mliska@suse.cz>
4662 * params.def: Explain ASan abbreviation and provide
4663 a documentation link.
4665 2018-07-24 Martin Sebor <msebor@redhat.com>
4667 PR tree-optimization/86622
4668 PR tree-optimization/86532
4669 * builtins.h (string_length): Declare.
4670 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4671 (check_access): Be prepared for non-constant length ranges.
4672 (string_length): Make extern.
4673 * expr.c (string_constant): Only handle the minor non-constant
4674 array index. Use string_constant to compute the length of
4675 a generic string constant.
4677 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4679 PR tree-optimization/86618
4680 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4681 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4683 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4685 PR tree-optimization/86636
4686 * json.cc (json::object::set): Fix comment. Add assertions.
4687 (json::array::append): Move here from json.h. Add comment and an
4689 (json::string::string): Likewise.
4690 * json.h (json::array::append): Move to json.cc.
4691 (json::string::string): Likewise.
4692 * optinfo-emit-json.cc
4693 (optrecord_json_writer::impl_location_to_json): Assert that we
4694 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4695 wrapper around it. Expand the location once, rather than three
4697 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4698 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4700 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4701 places. Fix some overlong lines.
4703 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4705 * config/aarch64/aarch64-simd.md
4706 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4707 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4708 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4709 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4710 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4711 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4712 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4713 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4714 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4716 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4719 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4720 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4721 and abs_d == d, do the power of two handling if profitable.
4723 2018-07-24 Richard Biener <rguenther@suse.de>
4725 * match.pd: Add BIT_FIELD_REF canonicalizations.
4727 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4730 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4732 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4734 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4735 terminated STRING_CST object.
4737 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4739 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4741 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4743 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4744 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4745 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4746 the elements into a register.
4747 (rs6000_split_v4si_init_di_reg): Delete.
4748 (rs6000_split_v4si_init): Delete.
4749 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4750 (vsx_init_v4si): Rewrite as a define_expand.
4752 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4754 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4755 zero_extend argument from memory): New.
4757 2018-07-22 Martin Sebor <msebor@redhat.com>
4760 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4761 diagnosing calls with unknown arguments unless -Walloca-larger-than
4762 is restricted to less than PTRDIFF_MAX bytes.
4764 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4766 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4768 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4770 * pretty-print.c (text_info::set_location): Remove redundant
4771 "line_table" parameter from call to rich_location::set_range.
4773 2018-07-20 Martin Sebor <msebor@redhat.com>
4776 * builtins.c (expand_builtin_alloca): Adjust.
4777 * calls.c (alloc_max_size): Simplify.
4778 * cgraphunit.c (cgraph_node::expand): Adjust.
4779 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4781 (frame_larger_than_size): Same.
4782 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4783 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4785 * doc/invoke.texi (GCC Command Options): Document option arguments.
4786 Explain byte-size arguments and suffixes.
4787 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4788 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4789 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4790 * doc/options.texi (UInteger): Expand.
4791 (Host_Wide_Int, ByteSize): Document new properties.
4792 * final.c (final_start_function_1): Include sizes in an error message.
4793 * function.c (frame_offset_overflow): Same.
4794 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4795 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4796 Diagnose unbounded alloca calls only for limits of less than
4798 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4799 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4801 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4802 only for limits of less than PTRDIFF_MAX.
4803 * langhooks-def.h (lhd_handle_option): Change function argument
4805 * langhooks.c (lhd_handle_option): Same.
4806 * langhooks.h (handle_option): Same.
4807 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4809 (var_type, var_type_struct): Same.
4810 (var_set): Handle ByteSize flag.
4811 * optc-gen.awk: Add comments to output to ease debugging. Make
4812 use of HOST_WIDE_INT where appropriate.
4813 * opts-gen-save.awk: Use %lx to format unsigned long.
4814 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4815 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4816 arguments. Parse bytes-size suffixes.
4817 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4818 (enum_value_to_arg): Same.
4819 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4820 (handle_option): Adjust.
4821 (generate_option): Change function argument to HOST_WIDE_INT.
4822 (cmdline_handle_error): Adjust.
4823 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4824 (set_option): Change function argument to HOST_WIDE_INT.
4825 (option_enabled): Handle cl_host_wide_int.
4826 (get_option_state): Handle CLVC_SIZE.
4827 (control_warning_option): Same.
4828 * opts.c (common_handle_option): Change function argument to
4829 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4830 OPT_Wvla_larger_than_.
4831 * opts.h (enum cl_var_type): Add an enumerator.
4832 * stor-layout.c (layout_decl): Print a more meaningful warning.
4833 * toplev.c (output_stack_usage): Adjust.
4835 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4837 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4838 call to inline_expand_builtin_string_cmp.
4839 (expand_builtin_strcmp): Likewise.
4840 (expand_builtin_strncmp): Likewise.
4841 (inline_string_cmp): Delete the last parameter, change char_type_node
4842 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4844 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4845 the inlining expansion on target where the type of the call has same or
4846 narrower precision than unsigned char.
4848 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4850 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4851 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4852 * common.opt (fsave-optimization-record): New option.
4853 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4854 * doc/invoke.texi (-fsave-optimization-record): New option.
4855 * dumpfile.c: Include "optinfo-emit-json.h".
4856 (struct kv_pair): Move to coretypes.h.
4857 (optgroup_options): Make non-static.
4858 (dump_context::end_scope): Call
4859 optimization_records_maybe_pop_dump_scope.
4860 * dumpfile.h (optgroup_options): New decl.
4861 * json.cc: New file.
4863 * optinfo-emit-json.cc: New file.
4864 * optinfo-emit-json.h: New file.
4865 * optinfo.cc: Include "optinfo-emit-json.h".
4866 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4867 (optinfo_enabled_p): Check optimization_records_enabled_p.
4868 (optinfo_wants_inlining_info_p): Likewise.
4869 * optinfo.h: Update comment.
4870 * profile-count.c (profile_quality_as_string): New function.
4871 * profile-count.h (profile_quality_as_string): New decl.
4872 (profile_count::quality): New accessor.
4873 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4874 and optinfo_emit_json_cc_tests.
4875 * selftest.h (selftest::json_cc_tests): New decl.
4876 (selftest::optinfo_emit_json_cc_tests): New decl.
4877 * toplev.c: Include "optinfo-emit-json.h".
4878 (compile_file): Call optimization_records_finish.
4879 (do_compile): Call optimization_records_start.
4880 * tree-ssa-live.c: Include optinfo.h.
4881 (remove_unused_scope_block_p): Retain inlining information if
4882 optinfo_wants_inlining_info_p returns true.
4884 2018-07-20 Richard Biener <rguenther@suse.de>
4887 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4888 to cover -flto-partition=none.
4890 2018-07-20 Martin Liska <mliska@suse.cz>
4892 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4893 (get_decl_source_range): Remove unused function.
4895 2018-07-20 Richard Biener <rguenther@suse.de>
4897 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4898 (struct vn_phi_s): Likewise.
4899 (struct vn_reference_s): Likewise.
4900 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4901 for searching the slot of an entry known to be in the hash itself.
4902 (vn_phi_hasher::equal): Likewise.
4903 (vn_reference_hasher::equal): Likewise.
4904 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4906 (optimistic_info, current_info): Remove, keeping only valid_info.
4907 (vn_reference_lookup_1): Remove fallback lookup.
4908 (vn_reference_lookup_2): Likewise.
4909 (vn_nary_op_lookup_1): Likewise.
4910 (vn_phi_lookup): Likewise.
4911 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4913 (vn_reference_insert): Adjust, chain the inserted hash element
4914 at last_inserted_ref.
4915 (vn_reference_insert_pieces): Likewise.
4916 (visit_reference_op_call): Likewise.
4917 (vn_nary_op_insert_into): Chain the inserted hash element at
4919 (vn_nary_op_insert_pieces): Adjust.
4920 (vn_nary_op_insert): Likewise.
4921 (vn_nary_op_insert_stmt): Likewise.
4922 (vn_phi_insert): Adjust, chain the inserted hash element at
4924 (process_scc): Remove clearing and copying the optimistic
4925 table. Instead remove elements inserted during an optimistic
4926 iteration from the single table we maintain.
4927 (init_scc_vn): Adjust.
4928 (free_scc_vn): Likewise.
4929 (sccvn_dom_walker::record_cond): Likewise.
4930 (sccvn_dom_walker::after_dom_children): Likewise.
4932 2018-07-19 Martin Sebor <msebor@redhat.com>
4934 PR tree-optimization/84047
4935 PR tree-optimization/83776
4936 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4937 (check_array_bounds): Call it.
4939 2018-07-19 Martin Sebor <msebor@redhat.com>
4941 * align.h (align_flags): Use member initialization.
4943 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4945 * Makefile.in (OBJS): Add optinfo.o.
4946 * coretypes.h (class symtab_node): New forward decl.
4947 (struct cgraph_node): New forward decl.
4948 (class varpool_node): New forward decl.
4949 * dump-context.h: New file.
4950 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4952 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4953 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4954 (set_alt_dump_file): Likewise.
4955 (dump_context::~dump_context): New dtor.
4956 (dump_gimple_stmt): Move implementation to...
4957 (dump_context::dump_gimple_stmt): ...this new member function.
4958 Add the stmt to any pending optinfo, creating one if need be.
4959 (dump_gimple_stmt_loc): Move implementation to...
4960 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4961 Start a new optinfo and add the stmt to it.
4962 (dump_gimple_expr): Move implementation to...
4963 (dump_context::dump_gimple_expr): ...this new member function.
4964 Add the stmt to any pending optinfo, creating one if need be.
4965 (dump_gimple_expr_loc): Move implementation to...
4966 (dump_context::dump_gimple_expr_loc): ...this new member function.
4967 Start a new optinfo and add the stmt to it.
4968 (dump_generic_expr): Move implementation to...
4969 (dump_context::dump_generic_expr): ...this new member function.
4970 Add the tree to any pending optinfo, creating one if need be.
4971 (dump_generic_expr_loc): Move implementation to...
4972 (dump_context::dump_generic_expr_loc): ...this new member
4973 function. Add the tree to any pending optinfo, creating one if
4975 (dump_printf): Move implementation to...
4976 (dump_context::dump_printf_va): ...this new member function. Add
4977 the text to any pending optinfo, creating one if need be.
4978 (dump_printf_loc): Move implementation to...
4979 (dump_context::dump_printf_loc_va): ...this new member function.
4980 Start a new optinfo and add the stmt to it.
4981 (dump_dec): Move implementation to...
4982 (dump_context::dump_dec): ...this new member function. Add the
4983 value to any pending optinfo, creating one if need be.
4984 (dump_context::dump_symtab_node): New member function.
4985 (dump_context::get_scope_depth): New member function.
4986 (dump_context::begin_scope): New member function.
4987 (dump_context::end_scope): New member function.
4988 (dump_context::ensure_pending_optinfo): New member function.
4989 (dump_context::begin_next_optinfo): New member function.
4990 (dump_context::end_any_optinfo): New member function.
4991 (dump_context::s_current): New global.
4992 (dump_context::s_default): New global.
4993 (dump_scope_depth): Delete global.
4994 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4995 (dump_symtab_node): New function.
4996 (get_dump_scope_depth): Reimplement in terms of dump_context.
4997 (dump_begin_scope): Likewise.
4998 (dump_end_scope): Likewise.
4999 (selftest::temp_dump_context::temp_dump_context): New ctor.
5000 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5001 (selftest::verify_item): New function.
5002 (ASSERT_IS_TEXT): New macro.
5003 (ASSERT_IS_TREE): New macro.
5004 (ASSERT_IS_GIMPLE): New macro.
5005 (selftest::test_capture_of_dump_calls): New test.
5006 (selftest::dumpfile_c_tests): Call it.
5007 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5008 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5009 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5010 descriptive comment.
5011 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5012 (dump_node, dump_bb): Move these unrelated decls.
5013 (class dump_manager): Add leading comment.
5014 * optinfo.cc: New file.
5015 * optinfo.h: New file.
5017 2018-07-19 Michael Collison <michael.collison@arm.com>
5018 Richard Henderson <rth@redhat.com>
5020 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5021 (subti): Handle op1 zero.
5022 (subvti4, usub4ti4): New.
5023 (*sub<GPI>3_compare1_imm): New.
5024 (sub<GPI>3_carryinCV): New.
5025 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5026 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5028 2018-07-19 Michael Collison <michael.collison@arm.com>
5029 Richard Henderson <rth@redhat.com>
5031 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5032 (addti3): Create simpler code if low part is already known to be 0.
5033 (addvti4, uaddvti4): New.
5034 (*add<GPI>3_compareC_cconly_imm): New.
5035 (*add<GPI>3_compareC_cconly): New.
5036 (*add<GPI>3_compareC_imm): New.
5037 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5038 handle constants within this pattern..
5039 (*add<GPI>3_compareV_cconly_imm): New.
5040 (*add<GPI>3_compareV_cconly): New.
5041 (*add<GPI>3_compareV_imm): New.
5042 (add<GPI>3_compareV): New.
5043 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5044 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5045 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5046 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5047 with 'comparison' operator.
5048 (*add<GPI>3_compareV_cconly_imm): Ditto.
5049 (*add<GPI>3_compareV_cconly): Ditto.
5050 (*add<GPI>3_compareV_imm): Ditto.
5051 (add<GPI>3_compareV): Ditto.
5052 (add<mode>3_carryinC): Ditto.
5053 (*add<mode>3_carryinC_zero): Ditto.
5054 (*add<mode>3_carryinC): Ditto.
5055 (add<mode>3_carryinV): Ditto.
5056 (*add<mode>3_carryinV_zero): Ditto.
5057 (*add<mode>3_carryinV): Ditto.
5059 2018-07-19 Michael Collison <michael.collison@arm.com>
5060 Richard Henderson <rth@redhat.com>
5062 * config/aarch64/aarch64-modes.def (CC_V): New.
5063 * config/aarch64/aarch64-protos.h
5064 (aarch64_addti_scratch_regs): Declare
5065 (aarch64_subvti_scratch_regs): Declare.
5066 (aarch64_expand_subvti): Declare.
5067 (aarch64_gen_unlikely_cbranch): Declare
5068 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5069 for signed overflow using CC_Vmode.
5070 (aarch64_get_condition_code_1): Handle CC_Vmode.
5071 (aarch64_gen_unlikely_cbranch): New function.
5072 (aarch64_addti_scratch_regs): New function.
5073 (aarch64_subvti_scratch_regs): New function.
5074 (aarch64_expand_subvti): New function.
5076 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5078 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5080 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5081 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5084 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5087 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5088 address check not strict.
5090 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5092 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5094 (store_pair_lanes<mode>): Likewise.
5095 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5096 enum value 'ADDR_QUERY_LDP_STP_N'.
5097 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5098 (aarch64_print_address_internal): Add declaration.
5099 (aarch64_print_ldpstp_address): Remove.
5100 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5101 (aarch64_print_operand): Change printing of 'y'.
5102 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5103 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5104 'true' rather than '1'.
5105 * config/aarch64/constraints.md (Uml): Likewise.
5106 (Uml): Rename to Umn.
5109 2018-07-19 Richard Biener <rguenther@suse.de>
5111 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5113 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5114 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5115 (vn_reference_hasher): Likewise.
5116 (struct vn_tables_s): Remove obstack and alloc-pool members.
5117 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5118 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5119 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5120 (vn_reference_insert_pieces): Likewise.
5121 (alloc_vn_nary_op_noinit): Adjust.
5122 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5123 (vn_phi_eq): Adjust.
5124 (shared_lookup_phiargs): Remove.
5125 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5126 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5127 (visit_reference_op_call): Likewise.
5128 (copy_nary, copy_phi, copy_reference): Remove.
5129 (process_scc): Rewind the obstack when iterating. Do not
5130 copy the elements to valid_info but just move them from one
5131 hashtable to the other.
5132 (allocate_vn_table): Adjust.
5133 (free_vn_table): Likewise.
5134 (init_scc_vn): Likewise.
5135 (free_scc_vn): Likewise.
5137 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5140 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5141 indirect_return as function type attribute.
5142 (ix86_attribute_table): Change indirect_return to function
5144 * doc/extend.texi: Update indirect_return attribute.
5146 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5148 * wide-int.h (widest2_int): New.
5149 * gimple-fold.c (arith_overflowed_p): Use it.
5150 * tree.h (widest2_int_cst): New.
5151 * tree-vrp.c (wide_int_binop_overflow): Rename from
5152 vrp_int_const_binop.
5153 Rewrite to work on trees.
5154 (extract_range_from_multiplicative_op_1): Abstract code to...
5155 (wide_int_range_min_max): ...here.
5156 (wide_int_range_cross_product): ...and here.
5157 (extract_range_from_binary_expr_1): Abstract overflow code to...
5158 (wide_int_range_mult_wrapping): ...here.
5159 * tree-vrp.h (wide_int_range_cross_product): New.
5160 (wide_int_range_mult_wrapping): New.
5162 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5163 Julia Koval <julia.koval@intel.com>
5165 * config/i386/x86-tune-costs.h (skylake_memcpy,
5166 skylake_memset): Replace rep_prefix with unrolling for size 512.
5168 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5171 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5172 comparision with EQ_EXPR in last stmt.
5174 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5176 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5177 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5178 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5179 previously known as "PowerPC AltiVec Built-in Functions". Move
5180 some material to new subsubsections "PowerPC AltiVec Built-in
5181 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5183 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5184 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5185 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5186 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5188 2018-07-18 Richard Biener <rguenther@suse.de>
5190 PR tree-optimization/86557
5191 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5194 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5196 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5198 2018-07-17 Jeff Law <law@redhat.com>
5200 * config/arm/arm.c (get_label_padding): Update for recent
5201 changes to label_to_alignment.
5203 PR tree-optimization/86010
5204 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5206 * config/mips/mips.c (vr4130_align_insns): Update for recent
5207 changes to label_to_alignment.
5209 * config/frv/frv.c (frv_label_align): Update for recent changes
5210 to label_to_alignment.
5212 * config/nios2/nios2.c (nios2_label_align): Update for recent
5213 changes which dropped ALIGN_LABELS_LOG.
5215 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5217 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5218 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5220 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5222 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5223 deprecated align_labels_log.
5225 2018-07-17 Richard Biener <rguenther@suse.de>
5228 * dwarf2out.c (init_sections_and_labels): Always generate
5229 a debug_line_str_section for early LTO debug.
5230 (dwarf2out_finish): Reset debug_line_str_hash output early.
5231 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5233 (dwarf2out_early_finish): Output debug_line_str.
5235 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5237 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5238 index register on z196 or later.
5240 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5242 * config/s390/s390.c (s390_default_align): Set default function
5244 (s390_override_options_after_change): Call s390_default align.
5245 (s390_option_override_internal): Call s390_default_align.
5246 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5248 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5251 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5252 to _looptemp_ clauses, other than the first two.
5254 2018-07-17 Martin Liska <mliska@suse.cz>
5256 * opts.c: Do not enable OPT_falign_* for -Os.
5258 2018-07-17 Martin Liska <mliska@suse.cz>
5260 * align.h (MAX_CODE_ALIGN): New.
5261 (MAX_CODE_ALIGN_VALUE): New.
5262 * common/config/i386/i386-common.c (ix86_handle_option):
5263 (MAX_CODE_ALIGN): Moved to align.h.
5264 * final.c (MAX_CODE_ALIGN): Likewise.
5265 * opts.c (parse_and_check_align_values):
5266 (MAX_CODE_ALIGN): Likewise.
5267 (MAX_CODE_ALIGN_VALUE): Likewise.
5269 2018-07-17 Martin Liska <mliska@suse.cz>
5271 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5272 in order to fulfil coding style.
5273 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5274 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5275 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5276 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5277 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5278 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5279 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5280 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5281 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5283 2018-07-17 Martin Liska <mliska@suse.cz>
5285 * align.h: New file.
5286 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5288 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5289 align_flags of label_to_alignment.
5290 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5292 * config/m68k/m68k.c: Do not use removed align_labels_value and
5294 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5295 (LOOP_ALIGN): Likewise.
5296 (LABEL_ALIGN): Likewise.
5297 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5298 Remove not used macro.
5299 (rs6000_loop_align): Change return type to align_flags.
5300 (rs6000_loop_align_max_skip): Remove.
5301 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5302 Change return type to align_flags.
5303 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5304 Remove not used macro.
5305 (rs6000_loop_align): Change return type to align_flags.
5306 (rs6000_loop_align_max_skip): Remove.
5307 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5308 * config/rx/rx-protos.h (rx_align_for_label): Make it
5310 * config/rx/rx.c (rx_align_for_label): Change return type
5312 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5314 into align_flags class.
5315 (LABEL_ALIGN): Likewise.
5316 (LOOP_ALIGN): Likewise.
5317 * config/s390/s390.c (s390_label_align): Use align_flags
5319 (s390_asm_output_function_label): Likewise.
5320 * config/sh/sh.c (sh_override_options_after_change):
5321 Use align_flags class directly without macros.
5322 (find_barrier): Likewise.
5323 (barrier_align): Likewise.
5324 (sh_loop_align): Likewise.
5325 * config/spu/spu.c (spu_option_override):
5326 Use align_flags_tuple::get_value instead of removed macros.
5327 (spu_sched_init): Likewise.
5328 * config/spu/spu.h (GTY): Likewise.
5329 * config/visium/visium.c (visium_option_override):
5330 Set "8" as default secondary alignment.
5331 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5332 in order to guarantee secondary alignment of 8.
5333 * coretypes.h: Include align.h header file.
5334 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5335 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5336 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5337 * doc/tm.texi.in: Likewise.
5338 * final.c (struct label_alignment): Remove not used structure.
5339 (LABEL_ALIGN): Change type to align_flags.
5340 (LOOP_ALIGN): Likewise.
5341 (JUMP_ALIGN): Likewise.
5342 (default_loop_align_max_skip): Remove.
5343 (default_label_align_max_skip): Likewise.
5344 (default_jump_align_max_skip): Likewise.
5345 (default_label_align_after_barrier_max_skip):
5346 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5347 (LABEL_TO_MAX_SKIP): Remove.
5348 (label_to_alignment): Return align_flags type instead of integer.
5349 (label_to_max_skip): Remove.
5350 (align_fuzz): Use align_flags type.
5351 (compute_alignments): Use align_flags type and use align_flags::max
5352 to combine multiple alignments.
5353 (grow_label_align): Grow vec instead of C array.
5354 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5355 (shorten_branches): Use align_flags type and use align_flags::max
5356 to combine multiple alignments.
5357 (final_scan_insn_1): Remove usage of secondary alignment that comes
5358 from label alignment, but instead use proper secondary alignment
5359 which is computed in grow_label_align.
5360 * flags.h (struct align_flags_tuple): Move to align.h.
5361 (struct align_flags): Likewise.
5362 (state_align_loops): Rename to align_loops.
5363 (state_align_jumps): Rename to align_jumps.
5364 (state_align_labels): Rename to align_labels.
5365 (state_align_functions): Rename to align_functions.
5366 (align_loops_log): Remove.
5367 (align_jumps_log): Remove.
5368 (align_labels_log): Remove.
5369 (align_functions_log): Remove.
5370 (align_loops_max_skip): Remove.
5371 (align_jumps_max_skip): Remove.
5372 (align_labels_max_skip): Remove.
5373 (align_functions_max_skip): Remove.
5374 (align_loops_value): Remove.
5375 (align_jumps_value): Remove.
5376 (align_labels_value): Remove.
5377 (align_functions_value): Remove.
5378 * output.h (label_to_alignment): Change return type to align_flags.
5379 (label_to_max_skip): Remove.
5380 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5381 jump_align_max_skip macros.
5382 * targhooks.h (default_loop_align_max_skip): Remove.
5383 (default_label_align_max_skip): Likewise.
5384 (default_jump_align_max_skip): Likewise.
5385 (default_label_align_after_barrier_max_skip): Remove.
5386 * toplev.c (read_log_maxskip): Use ::normalize function.
5387 (parse_N_M): Remove not used argument and also call ::normalize.
5388 (parse_alignment_opts): Do not pass unused arguments.
5389 * varasm.c (assemble_start_function): Use directly align_functions
5390 instead of removed macros.
5391 * system.h: Do not poison removed macros.
5393 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5396 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5397 and cond temporaries don't have reference type if iterator has
5398 pointer type. For init use &for_pre_body instead of pre_p if
5399 for_pre_body is non-empty.
5401 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5403 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5404 double-double modes to SFmode directly directly.
5405 (trunc<mode>sf2_fprs): Delete.
5407 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5409 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5410 for conversions between IFmode and the decimal floating point modes.
5411 (init_float128_ieee): Use the correct names for conversions between
5412 KFmode and the decimal floating point modes.
5414 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5416 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5417 for the conversions between TDmode and IFmode.
5418 (init_float128_ieee): Use more correct names for the conversions
5419 between TDmode and KFmode.
5421 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5423 PR tree-optimization/86526
5424 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5425 (inline_expand_builtin_string_cmp): Likewise.
5426 (inline_string_cmp): Likewise. Use c_readstr instead of
5427 builtin_memcpy_read_str. Add unit_mode temporary.
5429 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5432 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5433 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5435 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5437 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5438 Alphabetize prototypes of built-in functions, separating out
5439 built-in functions that are listed in this section but should be
5440 described elsewhere.
5442 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5445 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5446 conditional move when trapping comparison was split to a
5447 non-trapping one (and vice versa).
5449 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5451 * config/s390/s390.c (s390_function_profiler): Generate nops
5452 instead of profiler call sequences.
5453 * config/s390/s390.opt: Add the new option.
5455 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5457 * config/s390/s390.c (s390_function_profiler): Generate
5458 __mcount_loc section.
5459 * config/s390/s390.opt: Add the new option.
5461 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5463 * common.opt: Add the new warning.
5464 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5465 %r0,__fentry__" when -mfentry is specified.
5466 (s390_option_override_internal): Disallow -mfentry for 31-bit
5468 * config/s390/s390.opt: Add the new option.
5470 2018-07-16 Richard Biener <rguenther@suse.de>
5473 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5474 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5476 2018-07-16 Martin Liska <mliska@suse.cz>
5479 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5482 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5484 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5486 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5488 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5490 * config/arc/arc-cpus.def (hs4x): New cpu.
5492 * config/arc/arc-tables.opt: Regenerate.
5493 * config/arc/arc.c (arc_sched_issue_rate): New function.
5494 (TARGET_SCHED_ISSUE_RATE): Define.
5495 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5496 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5498 (attr tune): Add ARCHS4x tune values.
5499 (attr tune_dspmpy): Define.
5500 (*tst): Correct instruction type.
5501 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5502 * config/arc/arcHS4x.md: New file.
5503 * config/arc/fpu.md: Update instruction type attributes.
5504 * config/arc/t-multilib: Regenerate.
5506 2018-07-16 Tom de Vries <tdevries@suse.de>
5509 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5511 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5513 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5516 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5518 PR tree-optimization/86514
5519 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5520 conversion to a boolean type from a type with greater precision.
5522 2018-07-16 Tom de Vries <tdevries@suse.de>
5524 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5525 dump_flags request TDF_SLIM.
5527 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5529 * fold-const.c (int_const_binop_1): Abstract...
5530 (wide_int_binop): ...wide int code here.
5531 (poly_int_binop): ...poly int code here.
5532 Abstract the rest of int_const_binop_1 into int_const_binop.
5533 * fold-const.h (wide_int_binop): New.
5534 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5535 Remove useless PLUS/MINUS_EXPR case.
5536 (zero_nonzero_bits_from_vr): Move wide int code...
5537 (zero_nonzero_bits_from_bounds): ...here.
5538 (extract_range_from_binary_expr_1): Move mask optimization code...
5539 (range_easy_mask_min_max): ...here.
5540 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5541 (range_easy_mask_min_max): New.
5543 2018-07-15 Jeff Law <law@redhat.com>
5546 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5549 2018-07-14 Jim Wilson <jimw@sifive.com>
5551 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5553 2018-07-14 Paul Koning <ni1d@arrl.net>
5555 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5557 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5559 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5562 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5563 Steve Munroe <munroesj52@gmail.com>
5565 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5566 (_mm_andnot_si128): Likewise.
5567 (_mm_or_si128): Likewise.
5568 (_mm_xor_si128): Likewise.
5570 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5573 * builtins.c (expand_builtin_memcmp): Inline the calls first
5574 when result_eq is false.
5575 (expand_builtin_strcmp): Inline the calls first.
5576 (expand_builtin_strncmp): Likewise.
5577 (inline_string_cmp): New routine. Expand a string compare
5578 call by using a sequence of char comparison.
5579 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5580 a call to str(n)cmp/memcmp.
5581 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5583 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5585 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5587 * config/arm/driver-arm.c: Include arm-native.h.
5588 (host_detect_local_cpu): Use auto-generated data tables.
5589 (vendors, arm_cpu_table): Delete. Move part information to ...
5590 * config/arm/arm-cpus.in: ... here.
5591 * config/arm/parsecpu.awk (gen_native): New function.
5592 (vendor, part): New CPU fields.
5593 (END): Add support for building the native CPU detection tables.
5594 * config/arm/t-arm (arm-native.h): Add build rule.
5595 (driver-arm.o): Add dependency on arm-native.h.
5597 2018-07-13 Richard Biener <rguenther@suse.de>
5600 * match.pd (addr1 - addr2): Allow either of the operand to
5603 2018-07-13 Tom de Vries <tdevries@suse.de>
5605 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5608 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5610 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5611 arrays instead of numbered variables.
5613 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5615 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5616 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5618 2018-07-13 Richard Biener <rguenther@suse.de>
5621 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5622 instead of get_context_die.
5624 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5625 Richard Biener <rguenther@suse.de>
5628 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5629 that the loop latch destination where phi is defined.
5631 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5633 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5634 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5635 (riscv_set_current_function): Extract getting interrupt type to new
5637 (riscv_get_interrupt_type): New function.
5638 (riscv_merge_decl_attributes): New function, checking interrupt type is
5640 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5642 2018-07-12 Paul Koning <ni1d@arrl.net>
5644 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5647 2018-07-12 Paul Koning <ni1d@arrl.net>
5649 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5650 zero reference, add doloop_end instead.
5651 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5652 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5653 detail for doloop_end.
5655 2018-07-12 Martin Sebor <msebor@redhat.com>
5658 * attribs.c (decl_attributes): Reject conflicting attributes before
5659 calling attribute handlers.
5661 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5663 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5665 (gcc::dump_manager::get_dump_file_name): likewise.
5666 (dump_begin): Likewise.
5667 * dumpfile.h (dump_begin): Update prototype.
5668 (gcc::dump_manager::get_dump_file_name,
5669 gcc::dump_manager::get_dump_file_name): Update prototype.
5671 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5673 * internal-fn.h (vectorizable_internal_fn_p): New function.
5674 * tree-vect-slp.c (compatible_calls_p): Likewise.
5675 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5676 to internal functions.
5677 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5679 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5681 * fold-const.h (inverse_conditions_p): Declare.
5682 * fold-const.c (inverse_conditions_p): New function.
5683 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5684 that test the inverse condition of a conditional internal function.
5685 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5686 * internal-fn.c (internal_fn_mask_index): Handle conditional
5688 (vectorized_internal_fn_supported_p): New function.
5689 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5690 (any_pred_load_store): Replace with...
5691 (need_to_predicate): ...this new variable.
5692 (redundant_ssa_names): New variable.
5693 (ifcvt_can_use_mask_load_store): Move initial checks to...
5694 (ifcvt_can_predicate): ...this new function. Handle tree codes
5695 for which a conditional internal function exists.
5696 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5697 instead of ifcvt_can_use_mask_load_store. Update after variable
5699 (predicate_load_or_store): New function, split out from
5700 predicate_mem_writes.
5701 (check_redundant_cond_expr): New function.
5702 (value_available_p): Likewise.
5703 (predicate_rhs_code): Likewise.
5704 (predicate_mem_writes): Rename to...
5705 (predicate_statements): ...this. Use predicate_load_or_store
5706 and predicate_rhs_code.
5707 (combine_blocks, tree_if_conversion): Update after above name changes.
5708 (ifcvt_local_dce): Handle redundant_ssa_names.
5709 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5710 general conditional functions.
5711 * tree-vect-stmts.c (vectorizable_call): Likewise.
5713 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5714 Alan Hayward <alan.hayward@arm.com>
5715 David Sherwood <david.sherwood@arm.com>
5717 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5718 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5719 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5720 plus and minus and convert them into IFN_COND_FMA-based sequences.
5721 (convert_mult_to_fma): Handle conditional plus and minus.
5723 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5725 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5726 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5727 (cond_fnms_optab): New optabs.
5728 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5730 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5731 * internal-fn.h (get_conditional_internal_fn): Declare.
5732 (get_unconditional_internal_fn): Likewise.
5733 * internal-fn.c (cond_ternary_direct): New macro.
5734 (expand_cond_ternary_optab_fn): Likewise.
5735 (direct_cond_ternary_optab_supported_p): Likewise.
5736 (FOR_EACH_COND_FN_PAIR): Likewise.
5737 (get_conditional_internal_fn): New function.
5738 (get_unconditional_internal_fn): Likewise.
5739 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5740 (gimple_match_op::gimple_match_op): Add a new overload for 5
5742 (gimple_match_op::set_op): Likewise.
5743 (gimple_resimplify5): Declare.
5744 * genmatch.c (decision_tree::gen): Generate simplifications for
5746 * gimple-match-head.c (gimple_simplify): Define an overload for
5747 5 operands. Handle calls with 5 arguments in the top-level overload.
5748 (convert_conditional_op): Handle conversions from unconditional
5749 internal functions to conditional ones.
5750 (gimple_resimplify5): New function.
5751 (build_call_internal): Pass a fifth operand.
5752 (maybe_push_res_to_seq): Likewise.
5753 (try_conditional_simplification): Try converting conditional
5754 internal functions to unconditional internal functions.
5755 Handle 3-operand unconditional forms.
5756 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5757 Define ternary equivalents of the current rules for binary conditional
5759 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5761 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5762 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5763 (optab): Handle them.
5764 (SVE_COND_FP_TERNARY): New int iterator.
5765 (sve_fmla_op, sve_fmad_op): New int attributes.
5766 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5767 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5768 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5770 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5772 * target.def (preferred_else_value): New target hook.
5773 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5774 * doc/tm.texi: Regenerate.
5775 * targhooks.h (default_preferred_else_value): Declare.
5776 * targhooks.c (default_preferred_else_value): New function.
5777 * internal-fn.h (conditional_internal_fn_code): Declare.
5778 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5779 (get_conditional_internal_fn): Use it.
5780 (conditional_internal_fn_code): New function.
5781 * gimple-match.h (gimple_match_cond): New struct.
5782 (gimple_match_op): Add a cond member function.
5783 (gimple_match_op::gimple_match_op): Update all forms to take a
5785 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5786 for the suboperation, but don't specify a particular else_value.
5787 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5788 (visit_nary_op, visit_reference_op_load): Pass
5789 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5790 * gimple-match-head.c: Include tree-eh.h
5791 (convert_conditional_op): New function.
5792 (maybe_resimplify_conditional_op): Likewise.
5793 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5794 (gimple_resimplify2): Likewise.
5795 (gimple_resimplify3): Likewise.
5796 (gimple_resimplify4): Likewise.
5797 (maybe_push_res_to_seq): Return null for conditional operations.
5798 (try_conditional_simplification): New function.
5799 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5801 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5803 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5805 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5807 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5809 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5811 (hash_tree): Do not hash DECL_FCONTEXT
5812 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5813 Do not stream DECL_FCONTEXT.
5814 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5815 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5817 2018-07-12 Richard Biener <rguenther@suse.de>
5820 * dwarf2out.c (gen_block_die): Only output blocks when they have
5821 at least one !DECL_IGNORED_P variable.
5823 2018-07-12 Richard Biener <rguenther@suse.de>
5826 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5827 Remove -mieee-fp handling.
5829 2018-07-12 Richard Biener <rguenther@suse.de>
5831 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5832 left-over from last patch.
5834 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5836 PR tree-optimization/86492
5837 * gimple-ssa-store-merging.c
5838 (imm_store_chain_info::coalesce_immediate_stores): Call
5839 check_no_overlap even for the merge_overlapping case. Formatting fix.
5841 2018-07-12 Richard Biener <rguenther@suse.de>
5844 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5845 move possibly trapping operations into the conditional.
5847 2018-07-12 Richard Biener <rguenther@suse.de>
5849 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5850 (vn_lookup_simplify_result): Remove recursion limit applied
5852 (vn_nary_build_or_lookup_1): Adjust.
5853 (try_to_simplify): Likewise.
5854 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5856 (gimple_resimplify2): Likewise.
5857 (gimple_resimplify3): Likewise.
5858 (gimple_resimplify4): Likewise.
5860 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5862 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5863 Use __mmask64 type instead of __mmask8 for __M argument.
5864 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5865 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5867 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5868 __mmask16 for __M argument.
5869 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5870 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5871 to __mmask16 instead of __mmask8.
5872 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5873 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5874 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5875 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5876 instead of __mmask16 for __U argument.
5877 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5878 __mmask16 instead of __mmask8 for __U argument.
5879 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5881 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5883 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5885 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5887 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5889 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5891 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5893 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5895 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5897 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5899 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5900 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5901 return type as well as __M argument type and all casts from __mmask8
5903 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5904 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5905 return type as well as __M argument type and all casts from __mmask8
5907 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5908 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5909 return type as well as __M argument type and all casts from __mmask8
5911 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5912 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5913 return type as well as __M argument type and all casts from __mmask8
5915 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5916 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5919 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5921 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5922 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5925 2018-07-11 Paul Koning <ni1d@arrl.net>
5927 * doc/md.texi (define_subst): Document how multiple occurrences of
5928 the same argument in the replacement pattern are handled.
5930 2018-07-11 Paul Koning <ni1d@arrl.net>
5932 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5934 (Common Type Attributes): Add "mode" attribute.
5936 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5938 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5939 stream DECL_ORIGINAL_TYPE.
5940 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5941 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5942 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5943 Do not walk original type.
5944 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5946 (write_ts_decl_non_common_tree_pointers): Do not stream
5948 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5949 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5951 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5953 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5954 thread twice from the same starting edge.
5956 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5958 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5959 * gimple.c (gimple_call_nonnull_result_p): ...here...
5960 (gimple_call_nonnull_arg): ...and here.
5961 * gimple.h (gimple_call_nonnull_result_p): New.
5962 (gimple_call_nonnull_arg): New.
5964 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5966 * config/arm/arm-cpus.in: Move information from fpu field of each
5967 cpu definition to the isa field.
5968 * config/arm/parsecpu.awk (fpu): Delete match rule.
5969 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5971 2018-07-11 Richard Biener <rguenther@suse.de>
5974 * dwarf2out.c (init_sections_and_labels): Use
5975 output_asm_line_debug_info consistently.
5976 (dwarf2out_early_finish): Likewise.
5977 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5980 2018-07-11 Richard Biener <rguenther@suse.de>
5982 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5983 Rework father_bb setting in a way to avoid propagating constants
5984 multiple times on a loop body.
5986 2018-07-10 Mark Wielaard <mark@klomp.org>
5989 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5991 2018-07-10 Richard Biener <rguenther@suse.de>
5993 * hash-map.h (hash_map::iterator::operator*): Return
5994 references to key and value.
5996 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5999 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6000 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6001 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6002 (gimplify_omp_for): For composite loops, move outer
6003 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6004 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6005 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6006 TREE_LIST for both the original class iterator and the "last" helper
6007 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6008 loop, remember has_decl_expr from outer composite loops for the
6009 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6011 2018-07-09 Martin Sebor <msebor@redhat.com>
6015 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6016 accessing implicitly initialized array elements.
6017 * expr.c (string_constant): Handle string initializers of
6018 character arrays within aggregates.
6019 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6020 Store element offset. As a special case, handle zero size.
6021 (fold_nonarray_ctor_reference): Same.
6022 (fold_ctor_reference): Add argument. Store subobject offset.
6023 * gimple-fold.h (fold_ctor_reference): Add argument.
6025 2018-07-09 Paul Koning <ni1d@arrl.net>
6027 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6028 (pdp11_insn_cost): New function.
6029 (pdp11_md_asm_adjust): New function.
6030 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6031 (pdp11_rtx_costs): Update to match machine better.
6032 (output_addr_const_pdp11): Correct format mismatch warnings.
6033 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6034 * config/pdp11/pdp11.md: General change to add base_cost and/or
6035 length attributes for use by new pdp11_insn_cost function.
6036 (MIN_BRANCH): Correct definition.
6038 (doloop_end): Use standard pattern name for looping pattern.
6039 (doloop_end_nocc): New.
6040 (movsf): Add another constraint alternative.
6041 (zero_extendqihi2): Add constraint alternatives for not in place
6043 (zero_extendhisi2): Remove.
6044 (shift patterns): Add CC handling variants.
6048 (define_peephole2): New peephole to recognize mov that sets CC for
6051 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6053 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6054 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6057 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6060 * real.c (real_nextafter): Return true if result is denormal.
6062 2018-07-09 Martin Liska <mliska@suse.cz>
6064 * common.opt: Add back wrongly removed attribute.
6066 2018-07-09 Richard Biener <rguenther@suse.de>
6069 * dwarf2out.c (gen_block_die): For an early generated DIE
6070 always output high/low PC attributes.
6072 2018-07-09 Tom de Vries <tdevries@suse.de>
6074 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6075 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6076 onto VAR_DECL with abstract origin.
6078 2018-07-07 Jim Wilson <jimw@sifive.com>
6080 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6082 2018-07-07 Tom de Vries <tdevries@suse.de>
6084 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6086 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6088 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6090 (combine_bound): Use wide-int overflow calculation instead of
6092 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6094 * fold-const.c (int_const_binop_2): Same.
6095 (extract_muldiv_1): Same.
6096 (fold_div_compare): Same.
6097 (fold_abs_const): Same.
6099 * poly-int.h (add): Same.
6103 * predict.c (predict_iv_comparison): Same.
6104 * profile-count.c (slow_safe_scale_64bit): Same.
6105 * simplify-rtx.c (simplify_const_binary_operation): Same.
6106 * tree-chrec.c (tree_fold_binomial): Same.
6107 * tree-data-ref.c (split_constant_offset_1): Same.
6108 * tree-if-conv.c (idx_within_array_bound): Same.
6109 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6110 * tree-ssa-phiopt.c (minmax_replacement): Same.
6111 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6112 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6113 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6114 * wide-int.cc (wi::add_large): Same.
6115 (wi::mul_internal): Same.
6116 (wi::sub_large): Same.
6117 (wi::divmod_internal): Same.
6118 * wide-int.h: Change overflow type to overflow_type for neg, add,
6119 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6120 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6121 mul_internal, divmod_internal.
6122 (overflow_type): New enum.
6123 (accumulate_overflow): New.
6125 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6127 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6128 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6130 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6132 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6133 argument is checked for zero before entering loop, avoid checking again.
6135 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6137 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6138 * gimplify.h (generic_expr_could_trap_p): Likwise.
6139 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6141 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6143 PR tree-optimization/86401
6144 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6145 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6146 (fold_bit_and_mask): ... here. New helper function for match.pd.
6147 * fold-const.h (fold_bit_and_mask): Declare.
6148 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6150 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6153 * target.def (translate_mode_attribute): New hook.
6154 * targhooks.h (default_translate_mode_attribute): Declare.
6155 * targhooks.c (default_translate_mode_attribute): New function.
6156 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6157 * doc/tm.texi: Regenerate.
6158 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6159 (rs6000_translate_mode_attribute): New function.
6161 2018-07-06 Paul Koning <ni1d@arrl.net>
6163 * doc/md.texi (define_split): Document DONE and FAIL.
6164 (define_peephole2): Ditto.
6166 2018-07-05 Jeff Law <law@redhat.com>
6168 PR tree-optimization/86010
6169 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6170 both the head and tail of mem* and str* calls.
6172 2018-07-05 Jim Wilson <jimw@sifive.com>
6174 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6176 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6178 * config/aarch64/aarch64-simd.md: correct flags text for
6179 MIN_EXPR replacement.
6181 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6183 * configure: Regenerated.
6185 2018-07-05 Carl Love <cel@us.ibm.com>
6187 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6188 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6189 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6190 VSX_BUILTIN_DOUBLEL_V4SF.
6192 2018-07-05 Martin Sebor <msebor@redhat.com>
6195 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6196 than its domain to compute its the upper bound of a char array.
6198 2018-07-05 Nathan Sidwell <nathan@acm.org>
6200 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6201 * doc/cpp.texi: Update comment.
6202 * doc/tm.texi: Rebuilt.
6203 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6204 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6205 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6206 headers affected by extern "C".
6207 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6208 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6209 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6210 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6211 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6212 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6213 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6214 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6215 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6216 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6217 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6218 config/sparc/sp64-elf.h, config/spu/spu.h,
6219 config/stormy16/stormy16.h, config/v850/v850.h,
6220 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6221 define NO_IMPLICIT_EXTERN_C.
6222 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6224 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6227 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6228 instead of GET_MODE_SIZE when comparing Units.
6230 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6233 * rtlanal.c (set_noop_p): Constrain on mode change,
6234 include hard-reg-set.h
6236 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6238 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6240 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6243 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6246 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6248 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6250 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6253 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6255 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6257 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6260 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6262 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6264 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6265 neg_*_op* variables.
6267 2018-07-04 Martin Liska <mliska@suse.cz>
6269 * tree-switch-conversion.c: Define
6270 max_ratio_for_speed and max_ratio_for_size constants.
6272 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6273 Martin Liska <mliska@suse.cz>
6278 * common.opt: Rename align options with 'str_' prefix.
6279 * common/config/i386/i386-common.c (set_malign_value): New
6281 (ix86_handle_option): Use it to set -falign-* options/
6282 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6283 type from int to string.
6284 * config/aarch64/aarch64.c: Update default values from int
6286 * config/alpha/alpha.c (alpha_override_options_after_change):
6288 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6289 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6290 max skip conditionally.
6291 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6292 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6293 max skip conditionally.
6294 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6295 max skip conditionally.
6296 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6297 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6298 max skip conditionally.
6299 * config/i386/i386.c (struct ptt): Change type from int to
6301 (ix86_default_align): Set default values.
6302 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6303 max skip conditionally.
6304 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6305 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6306 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6307 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6308 max skip conditionally.
6309 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6310 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6311 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6312 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6313 max skip conditionally.
6314 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6315 * config/ia64/ia64.c (ia64_option_override): Set default values
6316 for alignment options.
6317 * config/m68k/m68k.c: Handle new str_align_* options.
6318 * config/mips/mips.c (mips_set_compression_mode): Change
6320 (mips_option_override): Set default values for options.
6321 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6323 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6325 * config/rx/rx.c (rx_option_override): Likewise.
6326 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6327 (LABEL_ALIGN): Use align_labels_log.
6328 (LOOP_ALIGN): Use align_loops_align.
6329 * config/s390/s390.c (s390_asm_output_function_label): Use new
6331 * config/sh/sh.c (sh_override_options_after_change):
6332 Change type of constants.
6333 * config/spu/spu.c (spu_sched_init): Likewise.
6334 * config/sparc/sparc.c (sparc_option_override): Set default
6336 * config/visium/visium.c (visium_option_override): Likewise.
6337 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6338 emit p2align format with last argument if it's not needed.
6339 * doc/invoke.texi: Document extended format of -falign-*.
6340 * final.c: Use align_labels alignment.
6341 * flags.h (struct target_flag_state): Change type to use
6343 (struct align_flags_tuple): New.
6344 (struct align_flags): Likewise.
6345 (align_loops_log): Redefine macro to use new types.
6346 (align_loops_max_skip): Redefine macro to use new types.
6347 (align_jumps_log): Redefine macro to use new types.
6348 (align_jumps_max_skip): Redefine macro to use new types.
6349 (align_labels_log): Redefine macro to use new types.
6350 (align_labels_max_skip): Redefine macro to use new types.
6351 (align_functions_log): Redefine macro to use new types.
6352 (align_loops): Redefine macro to use new types.
6353 (align_jumps): Redefine macro to use new types.
6354 (align_labels): Redefine macro to use new types.
6355 (align_functions): Redefine macro to use new types.
6356 (align_functions_max_skip): Redefine macro to use new types.
6357 (align_loops_value): New macro.
6358 (align_jumps_value): New macro.
6359 (align_labels_value): New macro.
6360 (align_functions_value): New macro.
6361 * function.c (invoke_set_current_function_hook): Propagate
6362 alignment values from flags to global variables default in
6364 * ipa-icf.c (sem_function::equals_wpa): Use
6365 cl_optimization_option_eq instead of memcmp.
6366 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6368 (cl_optimization_stream_in): Likewise.
6369 * optc-save-gen.awk: Support strings in cl_optimization.
6370 * opth-gen.awk: Likewise.
6371 * opts.c (finish_options): Remove error checking of invalid
6373 (MAX_CODE_ALIGN): Remove.
6374 (MAX_CODE_ALIGN_VALUE): Likewise.
6375 (parse_and_check_align_values): New function.
6376 (check_alignment_argument): Likewise.
6377 (common_handle_option): Use check_alignment_argument.
6378 * opts.h (parse_and_check_align_values): Declare.
6379 * toplev.c (init_alignments): Remove.
6380 (read_log_maxskip): New.
6381 (parse_N_M): Likewise.
6382 (parse_alignment_opts): Likewise.
6383 (backend_init_target): Remove usage of init_alignments.
6384 * toplev.h (parse_alignment_opts): Declare.
6385 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6387 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6388 * tree.c (cl_option_hasher::equal): New.
6389 * varasm.c: Use new global macros.
6391 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6393 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6394 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6395 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6396 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6397 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6398 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6399 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6400 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6401 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6402 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6403 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6404 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6405 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6407 2018-07-04 Martin Liska <mliska@suse.cz>
6408 Jonathan Wakely <jwakely@redhat.com>
6410 * coverage.c: Use correct type.
6411 * doc/invoke.texi: Language correction.
6413 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6416 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6417 ENDBRANCH for non-tail call which may return via indirect branch.
6418 * doc/extend.texi: Document indirect_return attribute.
6420 2018-07-03 Martin Sebor <msebor@redhat.com>
6422 PR tree-optimization/86274
6423 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6425 (format_floating): Correct handling of infinities and NaNs.
6427 2018-07-03 Martin Sebor <msebor@redhat.com>
6429 * print-tree.c (print_real_cst): New function.
6430 (print_node_brief): Call it.
6431 (print_node): Ditto.
6433 2018-07-03 Jeff Law <law@redhat.com>
6435 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6436 into a single pattern.
6438 * config/h8300/h8300.md (ors code_iterator): New.
6439 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6440 a single pattern and single splitter.
6441 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6442 (iorqi3_1, xorqi3_1): Likewise.
6443 (iorqi3, xorqi3 expanders): Similarly.
6445 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6446 (movmd_internal) into a single pattern using the P mode iterator.
6447 (movmd splitters): Similarly.
6448 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6449 (movsd splitters): Similarly.
6451 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6452 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6453 right table based on the size of the operand.
6454 * config/h8300/h8300.md (length_table): Corresponding changes. All
6455 references to "addb", "addw" and "addl" changed to "add".
6456 (btst patterns): Merge two variants into a single pattern.
6457 (tstqi, tsthi): Likewise.
6458 (addhi3_incdec, addsi3_incdec): Likewise.
6459 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6460 (mulhi3, mulsi3): Likewise.
6461 (udivhi3, udivsi3): Likewise.
6462 (divhi3, divsi3): Likewise.
6463 (andorqi3, andorhi3, andorsi3): Likewise.
6465 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6468 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6469 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6471 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6473 PR tree-optimization/85694
6474 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6475 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6477 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6478 (<u>avg<mode>3_ceil): New patterns.
6480 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6482 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6483 scan-tree-dump directive.
6484 * gcc.dg/vect/slp-perm-2.c: Likewise.
6485 * gcc.dg/vect/slp-perm-3.c: Likewise.
6486 * gcc.dg/vect/slp-perm-5.c: Likewise.
6487 * gcc.dg/vect/slp-perm-6.c: Likewise.
6488 * gcc.dg/vect/slp-perm-7.c: Likewise.
6489 * gcc.dg/vect/slp-perm-8.c: Likewise.
6491 2018-07-03 Marek Polacek <polacek@redhat.com>
6494 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6496 2018-07-03 Richard Biener <rguenther@suse.de>
6499 * tree-ssa-structalias.c (find_func_clobbers): Properly
6500 handle indirect calls.
6502 2018-07-03 Jeff Law <law@redhat.com>
6504 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6505 (shifts): New code iterator.
6506 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6507 expander. Fix HImode handling on H8/SX.
6508 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6509 (subqi3, subhi3, subsi3 expanders): Likewise.
6510 (andqi3, andhi3, andsi3 expanders): Likewise.
6511 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6512 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6513 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6514 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6515 (zero_extendqihi2, zero_extendqisi2): Likewise.
6516 (extendqihi2, extendqisi2): Likewise.
6517 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6518 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6519 (rotlqi3_1, rotlhi3_1): Likewise.
6520 (logicalhi3_sn, logicalsi3_sn): Likewise.
6521 (logicalhi3, logicalsi3): Likewise.
6523 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6525 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6526 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6527 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6528 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6529 type to append_pattern_def_seq instead of creating a stmt_vec_info
6531 (build_mask_conversion): Likewise. Remove vinfo argument.
6532 (vect_add_conversion_to_patterm): Likewise, renaming to...
6533 (vect_add_conversion_to_pattern): ...this.
6534 (vect_recog_mask_conversion_pattern): Update call to
6535 build_mask_conversion. Pass the vector type to
6536 append_pattern_def_seq here too.
6537 (vect_recog_gather_scatter_pattern): Update call to
6538 vect_add_conversion_to_pattern.
6540 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6542 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6543 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6544 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6545 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6546 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6547 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6548 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6549 append_pattern_def_seq instead of new_pattern_def_seq.
6550 (vect_recog_divmod_pattern): Do both of the above.
6551 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6554 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6556 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6557 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6558 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6559 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6560 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6561 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6562 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6563 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6564 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6565 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6566 parameter with a single stmt_vec_info.
6567 (vect_recog_func_ptr): Likewise.
6568 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6569 (vect_try_gather_scatter_pattern): ...this.
6570 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6571 the stmt_vec_info of the statement to be matched. Don't clear
6572 STMT_VINFO_RELATED_STMT.
6573 (vect_pattern_recog): Update call accordingly.
6575 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6577 PR tree-optimization/85694
6578 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6579 (uavgM3_ceil): Document new optabs.
6580 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6581 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6583 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6584 (savg_ceil_optab): New optabs.
6585 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6586 (vect_vect_recog_func_ptrs): Add it.
6587 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6588 constant directly from the associated lhs.
6590 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6592 * tree-vect-patterns.c (vect_split_statement): New function.
6593 (vect_convert_input): Use it to try to split an existing cast.
6595 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6597 * poly-int.h (print_hex): New function.
6598 * dumpfile.h (dump_dec, dump_hex): Declare.
6599 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6600 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6601 min_input_precision, operation_precision and operation_sign.
6602 * tree-vect-patterns.c (vect_get_range_info): New function.
6603 (vect_same_loop_or_bb_p, vect_single_imm_use)
6604 (vect_operation_fits_smaller_type): Delete.
6605 (vect_look_through_possible_promotion): Add an optional
6606 single_use_p parameter.
6607 (vect_recog_over_widening_pattern): Rewrite to use new
6608 stmt_vec_info infomration. Handle one operation at a time.
6609 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6610 (vect_truncatable_operation_p, vect_set_operation_type)
6611 (vect_set_min_input_precision): New functions.
6612 (vect_determine_min_output_precision_1): Likewise.
6613 (vect_determine_min_output_precision): Likewise.
6614 (vect_determine_precisions_from_range): Likewise.
6615 (vect_determine_precisions_from_users): Likewise.
6616 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6617 (vect_vect_recog_func_ptrs): Put over_widening first.
6619 (vect_pattern_recog): Call vect_determine_precisions.
6621 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6623 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6624 statements that have been replaced by further pattern statements.
6625 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6627 2018-07-03 Richard Biener <rguenther@suse.de>
6629 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6630 always set *dt. Dump vectype in vectype overload.
6631 * dumpfile.h (dump_gimple_expr): New function.
6632 (dump_gimple_expr_loc): Likewise.
6633 * dumpfile.c (dump_gimple_expr): New function.
6634 (dump_gimple_expr_loc): Likewise.
6636 2018-07-02 Jeff Law <law@redhat.com>
6638 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6639 the H8/300, H8/300H and H8/S variants into a single pattern.
6640 (movhi_h8300, movqi_h8300hs): Similarly.
6641 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6642 (QHI mode iterator): New.
6644 * config/h8300/h8300.md: Remove trailing whitespace.
6646 2018-07-02 Jim Wilson <jimw@sifive.com>
6648 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6649 instead of emit_insn for interrupt returns.
6650 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6651 (riscv_sret, riscv_uret): Likewise.
6653 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6655 * pretty-print.c (selftest::test_pp_format): Move save and restore
6656 of quotes to class auto_fix_quotes, and add an instance.
6657 * selftest.c: Include "intl.h".
6658 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6659 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6660 * selftest.h (selftest::auto_fix_quotes): New class.
6662 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6664 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6665 (aarch64_sve_prepare_conditional_op): Remove.
6666 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6667 Allow aarch64_simd_reg_or_zero as select operand; remove
6668 the aarch64_sve_prepare_conditional_op call.
6669 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6670 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6671 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6672 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6673 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6674 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6675 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6676 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6677 and a splitters to match all of the *_any patterns.
6678 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6680 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6681 (SVE_COND_FP_BINARY_REV): Remove.
6682 (sve_int_op_rev, sve_fp_op_rev): New.
6683 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6684 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6685 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6686 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6687 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6688 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6689 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6690 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6691 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6693 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6694 Remove match_dup 1 from the inner unspec.
6695 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6697 * config/aarch64/aarch64.md (movprfx): New attr.
6698 (length): Default movprfx to 8.
6699 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6700 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6701 (*<su>mul<SVE_I>3_highpart): Likewise.
6702 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6703 (*v<ASHIFT><SVE_I>3): Likewise.
6704 (*<su><MAXMIN><SVE_I>3): Likewise.
6705 (*<su><MAXMIN><SVE_F>3): Likewise.
6706 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6707 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6708 (*div<SVE_F>4): Likewise.
6710 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6712 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6715 2018-07-02 Richard Biener <rguenther@suse.de>
6717 PR tree-optimization/86363
6718 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6719 memset argument refers to a non-variable address.
6721 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6723 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6724 {PLUS,MINUS}_EXPR code to...
6725 (adjust_symbolic_bound): ...here,
6726 (combine_bound): ...here,
6727 (set_value_range_with_overflow): ...and here.
6729 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6731 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6733 (extract_range_from_abs_expr): ...here.
6735 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6737 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6738 -fno-omit-frame-pointer when not optimizing.
6740 2018-07-02 Martin Liska <mliska@suse.cz>
6743 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6744 (propagate_nothrow): Likewise.
6746 2018-07-02 Martin Liska <mliska@suse.cz>
6749 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6751 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6753 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6754 function in r262149, changing "loc" param from source_location to
6755 const dump_location_t &.
6756 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6757 declaration, as above.
6759 2018-07-01 Paul Koning <ni1d@arrl.net>
6761 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6762 -munit-asm, -mgnu-asm, -mdec-asm.
6763 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6764 (pdp11_output_labelref): New.
6765 (pdp11_output_def): New.
6766 (pdp11_output_addr_vec_elt): New.
6767 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6768 %# and %@ format codes.
6769 (pdp11_option_override): New.
6770 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6771 (pdp11_output_ident): New.
6772 (pdp11_asm_named_section): New.
6773 (pdp11_asm_init_sections): New.
6774 (pdp11_file_start): New.
6775 (pdp11_file_end): New.
6776 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6777 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6778 %o, like %c but octal.
6779 (pdp11_option_override): New.
6780 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6782 (DATA_SECTION_ASM_OP): Ditto.
6783 (READONLY_DATA_SECTION_ASM_OP): New.
6784 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6785 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6786 (ASM_OUTPUT_LABELREF): Ditto.
6787 (ASM_OUTPUT_DEF): Ditto.
6788 (ASM_OUTPUT_EXTERNAL): New.
6789 (ASM_OUTPUT_SOURCE_FILENAME): New.
6790 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6791 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6792 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6793 %# and %@ format codes.
6794 * config/pdp11/pdp11.opt (mgnu-asm): New.
6795 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6796 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6797 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6799 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6801 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6802 dereferencing path[] beyond its length.
6804 (debug_all_paths): New.
6805 (rewire_first_differing_edge): New.
6806 (adjust_paths_after_duplication): New.
6807 (duplicate_thread_path): Call adjust_paths_after_duplication.
6809 (thread_through_all_blocks): Add new argument to
6810 duplicate_thread_path.
6812 2018-06-30 Jim Wilson <jimw@sifive.com>
6814 * config/riscv/predicates.md (p2m1_shift_operand): New.
6815 (high_mask_shift_operand): New.
6816 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6817 pattern using p2m1_shift_operand.
6818 (lshsi3_zero_extend_3+2): New combiner pattern using
6819 high_mask_shift_operand.
6821 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6823 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6825 (vect_recog_rotate_pattern): ...here.
6826 (vect_convert_input): Try to insert casts of invariants in the
6828 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6829 preheader to be empty.
6831 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6833 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6834 vector type. If given, install it in the new statement's
6836 (vect_element_precision): New function.
6837 (vect_unpromoted_value): New struct.
6838 (vect_unpromoted_value::vect_unpromoted_value): New function.
6839 (vect_unpromoted_value::set_op): Likewise.
6840 (vect_look_through_possible_promotion): Likewise.
6841 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6842 (vect_widened_op_tree, vect_convert_input): Likewise.
6843 (vect_convert_inputs, vect_convert_output): Likewise.
6844 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6845 to handle the optional cast of the multiplication result and
6846 vect_widened_op_tree to detect the widened multiplication itself.
6847 Do not require the input and output of promotion casts to have
6848 the same sign, but base the signedness of the operation on the
6849 input rather than the result. If the pattern includes two
6850 promotions, check that those promotions have the same sign.
6851 Do not restrict the MULT_EXPR handling to a double-width result;
6852 handle quadruple-width results and wider. Use vect_convert_inputs
6853 to convert the inputs to the common type.
6854 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6855 to handle the optional cast of the ABS result. Also allow a sign
6856 change or a sign extension between the ABS and MINUS.
6857 Use vect_widened_op_tree to detect the widened subtraction and use
6858 vect_convert_inputs to convert the inputs to the common type.
6859 (vect_handle_widen_op_by_const): Delete.
6860 (vect_recog_widen_op_pattern): New function.
6861 (vect_recog_widen_mult_pattern): Use it.
6862 (vect_recog_widen_shift_pattern): Likewise.
6863 (vect_recog_widen_sum_pattern): Use
6864 vect_look_through_possible_promotion to handle the promoted
6867 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6869 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6870 the containing gimple_seq *.
6871 * gimple-iterator.h (gsi_for_stmt): Declare it.
6872 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6873 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6874 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6875 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6876 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6878 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6880 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6881 statement being replaced is part of an existing pattern
6882 definition sequence, inserting the new pattern statements before
6884 (vect_pattern_recog_1): Don't return a bool. If the statement
6885 is already part of a pattern, instead apply pattern matching
6886 to the pattern definition statements. Don't clear the
6887 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6888 (vect_pattern_recog): Don't break after the first match;
6889 continue processing the pattern definition statements instead.
6890 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6892 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6894 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6895 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6896 (vect_recog_widen_sum_pattern): Use it.
6898 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6900 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6901 phi is not a pattern statement and has not been replaced by
6902 a pattern statement.
6903 * tree-vect-patterns.c (type_conversion_p): Don't check
6904 STMT_VINFO_IN_PATTERN_P.
6905 (vect_recog_vector_vector_shift_pattern): Likewise.
6906 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6907 the pattern statement rather than the original statement; check
6908 directly for a WIDEN_MULT_EXPR here.
6909 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6910 vect_is_simple_use to return the pattern statement rather
6911 than the original statement; use is_pattern_stmt_p to check
6912 for such a pattern statement.
6913 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6914 to return the pattern statement rather than the original statement;
6915 don't do the same transformation here.
6916 (vect_is_simple_use): If the defining statement has been replaced
6917 by a pattern statement, return the pattern statement instead.
6918 Remove the corresponding (local) transformation from the vectype
6921 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6923 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6924 end and default to null.
6925 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6926 (vectorizable_reduction): Update calls accordingly, dropping the
6927 gimple ** argument if the passed-back statement isn't needed.
6928 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6929 (vect_recog_rotate_pattern): Likewise.
6930 (vect_recog_mask_conversion_pattern): Likewise.
6931 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6932 (vect_mask_constant_operand_p): Likewise.
6933 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6934 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6935 (get_group_load_store_type, get_load_store_type): Likewise.
6936 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6937 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6938 (vectorizable_conversion, vectorizable_assignment): Likewise.
6939 (vectorizable_shift, vectorizable_operation): Likewise.
6940 (vectorizable_store, vect_is_simple_cond): Likewise.
6941 (vectorizable_condition, vectorizable_comparison): Likewise.
6942 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6943 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6944 and move it to the end. Cope with null def_stmt_outs.
6946 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6948 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6950 2018-06-29 Jeff Law <law@redhat.com>
6952 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6953 displacements for TARGET_V850E2V3 and newer.
6954 (TARGET_LRA_P): Remove. Defaults to LRA now.
6955 * config/v850/v850.md (sign23byte_load): Remove.
6956 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6957 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6959 2018-06-29 Martin Liska <mliska@suse.cz>
6962 * coverage.c (coverage_init): Mangle full path name.
6963 * doc/invoke.texi: Document the change.
6964 * gcov-io.c (mangle_path): New.
6965 * gcov-io.h (mangle_path): Likewise.
6966 * gcov.c (mangle_name): Use mangle_path for path mangling.
6968 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6970 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6971 if starting source register is not even.
6973 2018-06-29 Martin Liska <mliska@suse.cz>
6975 PR tree-optimization/86263
6976 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6977 Make edge redirection.
6979 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6981 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6982 (dump_scope_depth): New variable.
6983 (get_dump_scope_depth): New function.
6984 (dump_begin_scope): New function.
6985 (dump_end_scope): New function.
6986 * dumpfile.h (get_dump_scope_depth): New declaration.
6987 (dump_begin_scope): New declaration.
6988 (dump_end_scope): New declaration.
6989 (class auto_dump_scope): New class.
6990 (AUTO_DUMP_SCOPE): New macro.
6991 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6994 2018-06-29 Richard Biener <rguenther@suse.de>
6996 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6997 compute_all_dependences succeeds.
6998 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6999 exceed --param loop-max-datarefs-for-datadeps.
7001 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7003 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7005 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7008 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7009 alternative 0 in preferred_for_speed attribute.
7011 2018-06-28 Paul Koning <ni1d@arrl.net>
7013 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7014 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7015 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7016 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7017 for shift insn patterns.
7019 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7021 * cgraph.c (cgraph_node::get_body): Replace assignments to
7022 "dump_file" with calls to set_dump_file.
7023 * dumpfile.c (alt_dump_file): Make static, and group with...
7024 (alt_flags): ...this definition.
7025 (dumps_are_enabled): New variable.
7026 (refresh_dumps_are_enabled): New function.
7027 (set_dump_file): New function.
7028 (set_alt_dump_file): New function.
7029 (gcc::dump_manager::dump_start): Replace assignments to
7030 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7032 (gcc::dump_manager::dump_finish): Likewise.
7033 * dumpfile.h (alt_dump_file): Delete decl.
7034 (dumps_are_enabled): New variable decl.
7035 (set_dump_file): New function decl.
7036 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7038 * tree-nested.c (lower_nested_functions): Replace assignments to
7039 "dump_file" with calls to set_dump_file.
7041 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7043 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7044 goto_locus of each outgoing edge of each basic block.
7046 2018-06-28 Richard Biener <rguenther@suse.de>
7048 * dwarf2out.c (decl_scope_table): Remove.
7049 (push_decl_scope): Likewise.
7050 (pop_decl_scope): Likewise.
7051 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7052 (gen_struct_or_union_type_die): Likewise.
7053 (gen_tagged_type_die): Likewise.
7054 (dwarf2out_init): Do not initialize decl_scope_table.
7055 (dwarf2out_c_finalize): Do not free it.
7057 2018-06-28 Richard Biener <rguenther@suse.de>
7059 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7060 deciding whether to not re-use a DIE.
7062 2018-06-28 Richard Biener <rguenther@suse.de>
7064 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7065 DW_AT_abstract_origin attribute.
7067 2018-06-28 Martin Liska <mliska@suse.cz>
7069 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7070 Use newly introduced constants.
7071 * tree-switch-conversion.h (struct jump_table_cluster):
7072 Define max_ratio_for_size and max_ratio_for_speed.
7074 2018-06-28 Martin Liska <mliska@suse.cz>
7076 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7077 Add new checking assert to catch invalid state.
7078 (jump_table_cluster::can_be_handled): Handle single case
7080 (jump_table_cluster::is_beneficial): Bail out for such case.
7081 (bit_test_cluster::find_bit_tests):
7082 Add new checking assert to catch invalid state.
7083 (bit_test_cluster::can_be_handled): Handle single case
7085 (bit_test_cluster::is_beneficial): Bail out for such case.
7086 (switch_decision_tree::analyze_switch_statement):
7089 2018-06-28 Martin Liska <mliska@suse.cz>
7091 * common.opt: Introduce -completion option.
7092 * gcc.c (driver_handle_option): Handle it.
7093 (driver::main): Print completions if completion
7095 * opt-suggestions.c (option_proposer::get_completions):
7097 (option_proposer::suggest_completion): Likewise.
7098 (option_proposer::find_param_completions): Likewise.
7099 (verify_autocompletions): Likewise.
7100 (test_completion_valid_options): Likewise.
7101 (test_completion_valid_params): Likewise.
7102 (in_completion_p): Likewise.
7103 (empty_completion_p): Likewise.
7104 (test_completion_partial_match): Likewise.
7105 (test_completion_garbage): Likewise.
7106 (opt_proposer_c_tests): Likewise.
7107 * opt-suggestions.h: Declare new functions.
7108 * opts.c (common_handle_option): Handle OPT__completion_.
7109 * selftest-run-tests.c (selftest::run_tests): Add
7110 opt_proposer_c_tests.
7111 * selftest.c (assert_str_startswith): New.
7112 * selftest.h (assert_str_startswith): Likewise.
7113 (opt_proposer_c_tests): New.
7114 (ASSERT_STR_STARTSWITH): Likewise.
7116 2018-06-28 Martin Liska <mliska@suse.cz>
7118 * Makefile.in: Add opt-suggestions.o.
7119 * gcc-main.c: Include opt-suggestions.h.
7120 * gcc.c (driver::driver): Likewise.
7121 (driver::~driver): Remove m_option_suggestions.
7122 (driver::build_option_suggestions): Moved to option_proposer.
7123 (driver::suggest_option): Likewise.
7124 (driver::handle_unrecognized_options): Use option_proposer.
7125 * gcc.h (class driver): Add new memver m_option_proposer.
7126 * opt-suggestions.c: New file.
7127 * opt-suggestions.h: New file.
7129 2018-06-28 Martin Liska <mliska@suse.cz>
7131 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7132 (auto_string_vec::~auto_string_vec): Likewise.
7134 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7136 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7137 prevent_decl_creation_for_types fields up and add reset_location field.
7138 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7139 statement if id->reset_location is true.
7140 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7141 id->reset_location is true.
7142 (copy_phis_for_bb): Force input_location on the arguments if
7143 id->reset_location is true.
7144 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7145 is set on the function to be inlined.
7147 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7149 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7151 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7153 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7154 registers for Pmode.
7155 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7156 hard registers for the clobbered pseudo.
7158 2018-06-27 Paul Koning <ni1d@arrl.net>
7160 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7161 mutually exclusive options.
7162 * config/pdp11/constraints.md (h): New constraint.
7163 (O): Update definition to match shift code generation.
7164 (D): New constraint.
7165 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7167 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7169 (output_jump): Change arguments.
7170 (pdp11_fixed_cc_regs): New function.
7171 (pdp11_cc_mode): Ditto.
7172 (pdp11_expand_shift): Ditto.
7173 (pdp11_assemble_shift): Ditto.
7174 (pdp11_small_shift): Ditto.
7175 (pdp11_branch_cost): Remove.
7176 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7178 (pdp11_register_move_cost): Update for CC registers.
7179 (pdp11_rtx_costs): Add case for LSHIFTRT.
7180 (pdp11_output_jump): Add CCNZ mode conditional branches.
7181 (notice_update_cc_on_set): Remove.
7182 (pdp11_cc_mode): New function.
7183 (simple_memory_operand): Correct pre/post decrement case.
7184 (no_side_effect_operand): New function.
7185 (pdp11_regno_reg_class): Add CC_REGS class.
7186 (pdp11_fixed_cc_regs): New function.
7187 (pdp11_small_shift): New function.
7188 (pdp11_expand_shift): New function to expand shift insns.
7189 (pdp11_assemble_shift): New function to output shifts.
7190 (pdp11_branch_cost): Remove.
7191 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7192 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7193 (WCHAR_TYPE): Ditto.
7194 (PTRDIFF_TYPE): Ditto.
7195 (ADJUST_INSN_LENGTH): New macro.
7196 (FIXED_REGISTERS): Add CC registers.
7197 (CALL_USED_REGISTERS): Ditto.
7199 (REG_CLASS_NAMES): Ditto.
7200 (REG_CLASS_CONTENTS): Ditto.
7201 (SELECT_CC_MODE): Use new function.
7202 (TARGET_FLAGS_REGNUM): New macro.
7203 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7204 (cc0_reg_rtx): Remove.
7205 (CC_STATUS_MDEP): Remove.
7206 (CC_STATUS_MDEFP_INIT): Remove.
7207 (CC_IN_FPU): Remove.
7208 (NOTICE_UPDATE_CC): Remove.
7209 (REGISTER_NAMES): Add CC registers.
7210 (BRANCH_COST): Change to constant 1.
7211 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7213 * config/pdp11/pdp11.opt (mbcopy): Remove.
7214 (mbcopy-builtin): Remove.
7215 (mbranch-cheap): Remove.
7216 (mbranch-expensive): Remove.
7217 * config/pdp11/predicates.md (expand_shift_operand): Update to
7218 match shift code generation.
7219 (ccnz_operator): New predicate.
7220 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7221 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7222 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7224 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7225 description of O constraint.
7227 2018-06-27 Jeff Law <law@redhat.com>
7228 Austin Law <austinklaw@gmail.com>
7230 * config/v850/v850.md (addsi3_set_flags): New pattern.
7231 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7232 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7233 (zero_extendhisi2_v850_set_flags): Likewise.
7234 (zero_extendqisi2_v850_set_flags): Likewise.
7235 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7236 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7237 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7239 * config/v850/v850-protos.h (notice_update_cc): Remove.
7240 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7241 (v850_print_operand): Handle 'D' and "d".
7242 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7243 Add handling of arithmetic/logical operations compared against zero.
7244 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7245 Do not look at v850_compare_op, instead get mode from last argument.
7246 (v850_gen_compare): Remove
7247 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7248 after reload for prologue insns.
7249 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7251 (construct_save_jarl): Likewise.
7252 (TARGET_FLAGS_REGNUM): Define.
7253 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7254 (NOTICE_UPDATE_CC): Remove.
7255 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7256 than cc0. Conditionalize on reload_completed.
7257 (cmpsi_insn, setfcc_insn): Likewise.
7258 (tst1 splitter): Turn into define_and_split which sets the flags
7260 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7261 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7262 (cstoresf4, cstoredf4): Clobber the flags.
7263 (cmpsi, cmpsf, cmpdf): Remove expanders.
7264 (setf_insn): Remove pattern.
7265 (addsi3): Turn into define_and_split which clobbers the flags after
7266 reload and a suitable pattern (addsi3_clobber_flags) for use after
7268 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7269 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7270 (ashrsi3, ashrsi3_v850e2): Likewise.
7271 (bins): Clobber the flags.
7272 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7273 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7274 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7275 (call_value_internal_short, call_value_internal_long): Likewise.
7276 (callt_save_interrupt, callt_return_interrupt): Likewise.
7277 (save_interrupt, return_interrupt): Likewise.
7278 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7279 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7280 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7281 (All FP comparisons): Only allow after reload has completed.
7283 (divh, divhu): Tweak output template.
7284 (branch_z_normal, branch_z_invert): Remove
7285 (branch_nz_normal, branch_nz_invert): Likewise.
7286 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7288 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7289 * config/v850/v850.c (notice_update_cc): Remove.
7290 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7291 (CC_NO_CARRY): Likewise.
7292 (NOTICE_UPDATE_CC): Define to nothing.
7293 * config/v850/v850.md: Remove block comment on cc0 handling
7294 Remove "cc" attribute from all patterns. Remove cc_status handling
7295 from all patterns. Minor formatting fixes.
7297 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7299 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7300 (cortex-a76.cortex-a55): Likewise.
7301 * config/aarch64/aarch64-tune.md: Regenerate.
7302 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7303 cortex-a76.cortex-a55.
7305 2018-06-27 Jeff Law <law@redhat.com>
7307 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7308 (MULTILIB_DIRNAMES): Similarly.
7310 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7312 * gimple.h (gimple_return_retbnd): Delete.
7313 (gimple_return_set_retbnd): Likewise.
7314 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7315 gimple_return_set_retbnd.
7316 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7317 gimple_return_retbnd and adjust.
7318 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7319 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7320 Explicitly return NULL in a couple more cases. Move assertion
7321 on debug statements and remove unreachable code.
7322 (reset_debug_binding): Do not test id->retbnd.
7323 (expand_call_inline): Do not set it.
7325 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7327 * configure.ac: Add --disable-gcov option.
7328 * configure: Regenerate.
7329 * Makefile.in: Honour @enable_gcov@.
7330 * doc/install.texi: Document --disable-gcov.
7332 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7334 * config/arm/arm-cpus.in (cortex-a76): New entry.
7335 (cortex-a76.cortex-a55): Likewise.
7336 * config/arm/arm-tables.opt: Regenerate.
7337 * config/arm/arm-tune.md: Likewise.
7338 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7339 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7340 cortex-a76.cortex-a55.
7342 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7345 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7347 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7349 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7351 (EPILOGUE_USES): Likewise.
7353 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7355 * tree-inline.c (remap_location): New function extracted from...
7356 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7357 (copy_phis_for_bb): ...here. Call remap_location.
7358 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7360 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7362 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7363 unaligned vsx for 16B memset.
7365 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7368 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7369 ieee128_float_type_node to long_double_type_node unless
7370 TARGET_LONG_DOUBLE_128 is set.
7372 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7374 * cfgloop.c (get_loop_location): Convert return type from
7375 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7376 by implicit construction from rtx_insn *, and using
7377 dump_user_location_t::from_function_decl for the fallback case.
7378 * cfgloop.h (get_loop_location): Convert return type from
7379 location_t to dump_user_location_t.
7380 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7381 dump_printf_loc to pass in a dump_location_t rather than a
7382 location_t, via the gimple stmt.
7383 * coverage.c (get_coverage_counts): Update calls to
7384 dump_printf_loc to pass in dump_location_t rather than a
7386 * doc/optinfo.texi (Dump types): Convert example of
7387 dump_printf_loc from taking "locus" to taking "insn". Update
7388 description of the "_loc" calls to cover dump_location_t.
7389 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7391 (dump_user_location_t::dump_user_location_t): New constructors,
7392 from gimple *stmt and rtx_insn *.
7393 (dump_user_location_t::from_function_decl): New function.
7394 (dump_loc): Make static.
7395 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7396 const dump_location_t &.
7397 (dump_generic_expr_loc): Delete.
7398 (dump_printf_loc): Convert param "loc" from location_t to
7399 const dump_location_t &.
7400 (selftest::test_impl_location): New function.
7401 (selftest::dumpfile_c_tests): New function.
7402 * dumpfile.h: Include "profile-count.h".
7403 (class dump_user_location_t): New class.
7404 (struct dump_impl_location_t): New struct.
7405 (class dump_location_t): New class.
7406 (dump_printf_loc): Convert 2nd param from source_location to
7407 const dump_location_t &.
7408 (dump_generic_expr_loc): Delete.
7409 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7410 const dump_location_t &.
7411 * gimple-fold.c (fold_gimple_assign): Update call to
7412 dump_printf_loc to pass in a dump_location_t rather than a
7413 location_t, via the gimple stmt.
7414 (gimple_fold_call): Likewise.
7415 * gimple-loop-interchange.cc
7416 (loop_cand::analyze_iloop_reduction_var): Update for change to
7417 check_reduction_path.
7418 (tree_loop_interchange::interchange): Update for change to
7420 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7421 change in return-type of find_loop_location.
7422 (graphite_regenerate_ast_isl): Likewise.
7423 * graphite-optimize-isl.c (optimize_isl): Likewise.
7424 * graphite.c (graphite_transform_loops): Likewise.
7425 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7426 pass in a dump_location_t rather than a location_t, via the
7428 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7429 * ipa.c (walk_polymorphic_call_targets): Likewise.
7430 * loop-unroll.c (report_unroll): Convert "locus" param from
7431 location_t to dump_location_t.
7432 (decide_unrolling): Update for change to get_loop_location's
7434 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7435 location_t to dump_user_location_t.
7436 (grid_find_single_omp_among_assignments_1): Updates calls to
7437 dump_printf_loc to pass in a dump_location_t rather than a
7438 location_t, via the gimple stmt.
7439 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7440 location_t to dump_location_t. Updates calls to dump_printf_loc
7441 to pass in a dump_location_t rather than a location_t, via the
7443 (grid_inner_loop_gridifiable_p): Likewise.
7444 (grid_dist_follows_simple_pattern): Likewise.
7445 (grid_gfor_follows_tiling_pattern): Likewise.
7446 (grid_target_follows_gridifiable_pattern): Likewise.
7447 (grid_attempt_target_gridification): Convert initialization
7448 of local "grid" from memset to zero-initialization; FIXME: does
7449 this require C++11? Update call to dump_printf_loc to pass in a
7450 optinfo_location rather than a location_t, via the gimple stmt.
7451 * profile.c (read_profile_edge_counts): Updates call to
7452 dump_printf_loc to pass in a dump_location_t rather than a
7454 (compute_branch_probabilities): Likewise.
7455 * selftest-run-tests.c (selftest::run_tests): Call
7457 * selftest.h (dumpfile_c_tests): New decl.
7458 * tree-loop-distribution.c (pass_loop_distribution::execute):
7459 Update for change in return type of find_loop_location.
7460 * tree-parloops.c (parallelize_loops): Likewise.
7461 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7462 "locus" from location_t to dump_user_location_t.
7463 (canonicalize_loop_induction_variables): Likewise.
7464 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7465 for change in return type of find_loop_location.
7466 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7467 to dump_printf_loc to pass in a dump_location_t rather than a
7468 location_t, via the stmt.
7469 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7471 * tree-vect-loop-manip.c (find_loop_location): Convert return
7472 type from source_location to dump_user_location_t.
7473 (vect_do_peeling): Update for above change.
7474 (vect_loop_versioning): Update for change in type of
7476 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7477 from location_t to dump_user_location_t.
7478 (vect_estimate_min_profitable_iters): Update for change in type
7480 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7481 location_t to dump_location_t.
7482 (vect_slp_bb): Update for change in type of vect_location.
7483 * tree-vectorizer.c (vect_location): Convert from source_location
7484 to dump_user_location_t.
7485 (try_vectorize_loop_1): Update for change in vect_location's type.
7486 (vectorize_loops): Likewise.
7487 (increase_alignment): Likewise.
7488 * tree-vectorizer.h (vect_location): Convert from source_location
7489 to dump_user_location_t.
7490 (find_loop_location): Convert return type from source_location to
7491 dump_user_location_t.
7492 (check_reduction_path): Convert 1st param from location_t to
7493 dump_user_location_t.
7494 * value-prof.c (check_counter): Update call to dump_printf_loc to
7495 pass in a dump_user_location_t rather than a location_t; update
7496 call to error_at for change in type of "locus".
7497 (check_ic_target): Update call to dump_printf_loc to
7498 pass in a dump_user_location_t rather than a location_t, via the
7501 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7503 * config/s390/s390.h (enum processor_flags): Do not use
7504 default tune parameter when -march was specified.
7506 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7509 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7510 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7513 2018-06-26 Richard Biener <rguenther@suse.de>
7515 PR tree-optimization/86287
7517 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7518 (vect_analyze_loop): Initialize n_stmts.
7520 2018-06-26 Richard Biener <rguenther@suse.de>
7523 * fold-const.c (fold_convertible_p): Pointer extension
7526 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7529 * dwarf2out.c (loc_list_has_views): Adjust comments.
7530 (dw_loc_list): Split single cross-partition range with
7533 2018-06-25 Jeff Law <law@redhat.com>
7535 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7536 on -mbig-switch by default.
7538 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7540 (const_float_0_operand): Remove unused predicate.
7541 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7542 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7543 (recipsf2): New expander. Original pattern now called
7545 (recipdf2, recipdf2_insn): Similarly.
7546 (rsqrtsf2, rsqrtsf2_insn): Similarly
7547 (rsqrtdf2, rsqrtdf2_insn): Similarly
7549 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7551 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7552 Simplify logic for FreeBSD (twice).
7554 2018-06-25 Martin Sebor <msebor@redhat.com>
7556 PR tree-optimization/86204
7557 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7558 a strnlen result if it's less than the length of the string.
7560 2018-06-25 Martin Sebor <msebor@redhat.com>
7562 PR tree-optimization/85700
7563 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7564 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7565 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7567 2018-06-25 Martin Sebor <msebor@redhat.com>
7569 * doc/extend.texi (Zero-length arrays): Update and clarify.
7571 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7573 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7574 added IEEE/IBM long double multilib support on PowerPC little
7575 endian Linux systems.
7576 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7577 (MULTILIB_DEFAULTS): Likewise.
7578 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7580 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7581 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7582 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7584 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7587 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7588 (REORDER_45): Likewise.
7590 2018-06-25 Jeff Law <law@redhat.com>
7592 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7593 dividend to 32 bits. Adjust length.
7594 (udivmodhi4): Cleanup output template. Fix length.
7596 2018-06-25 Carl Love <cel@us.ibm.com>
7598 * config/rs6000/vsx.md: Change word selector to prefered location.
7600 2018-06-25 Richard Biener <rguenther@suse.de>
7602 PR tree-optimization/86304
7603 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7604 epilogue-if-converted loops as well.
7606 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7608 * lto-section-out.c (lto_begin_section): Do not print section
7609 name for noaddr and unnumbered dumps.
7611 2018-06-25 Richard Biener <rguenther@suse.de>
7613 * tree-vectorizer.h (struct vec_info_shared): New structure
7614 with parts split out from struct vec_info and loop_nest from
7615 struct _loop_vec_info.
7616 (struct vec_info): Adjust accordingly.
7617 (struct _loop_vec_info): Likewise.
7618 (LOOP_VINFO_LOOP_NEST): Adjust.
7619 (LOOP_VINFO_DATAREFS): Likewise.
7620 (LOOP_VINFO_DDRS): Likewise.
7621 (struct _bb_vec_info): Likewise.
7622 (BB_VINFO_DATAREFS): Likewise.
7623 (BB_VINFO_DDRS): Likewise.
7624 (struct _stmt_vec_info): Add dr_aux member.
7625 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7626 (DR_MISALIGNMENT_UNINITIALIZED): New.
7627 (set_dr_misalignment): Adjust.
7628 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7629 (vect_analyze_loop): Adjust prototype.
7630 (vect_analyze_loop_form): Likewise.
7631 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7632 Compute dependences lazily.
7633 (vect_record_base_alignments): Use shared datarefs/ddrs.
7634 (vect_verify_datarefs_alignment): Likewise.
7635 (vect_analyze_data_refs_alignment): Likewise.
7636 (vect_analyze_data_ref_accesses): Likewise.
7637 (vect_analyze_data_refs): Likewise.
7638 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7639 constructor parameter for shared part.
7640 (vect_analyze_loop_form): Pass in shared part and adjust.
7641 (vect_analyze_loop_2): Pass in storage for the number of
7642 stmts. Move loop nest finding to the caller. Compute
7644 (vect_analyze_loop): Pass in shared part.
7645 (vect_transform_loop): Verify shared datarefs are unchanged.
7646 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7647 constructor parameter for shared part.
7648 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7649 (vect_slp_bb): Verify shared datarefs are unchanged before
7651 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7653 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7654 DR_MISALIGNMENT_UNINITIALIZED.
7655 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7656 parameter for shared part.
7657 (vec_info::~vec_info): Adjust.
7658 (vec_info_shared::vec_info_shared): New.
7659 (vec_info_shared::~vec_info_shared): Likewise.
7660 (vec_info_shared::save_datarefs): Likewise.
7661 (vec_info_shared::check_datarefs): Likewise.
7662 (try_vectorize_loop_1): Construct shared part live for analyses
7663 of a single loop for multiple vector sizes.
7664 * tree-parloops.c (gather_scalar_reductions): Adjust.
7666 2018-06-25 Richard Biener <rguenther@suse.de>
7668 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7669 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7670 (vect_analyze_data_refs): Remove similar code from here and
7671 simplify accordingly.
7673 2018-06-25 Richard Biener <rguenther@suse.de>
7675 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7676 for reverse storage order accesses rather than asserting
7677 they cannot happen here.
7679 2018-06-25 Tom de Vries <tdevries@suse.de>
7682 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7683 Use data16 instead of .byte for insn prefix.
7685 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7688 * parser.c (make_char_string_pack): Pass this literal chars
7689 through cpp_interpret_string.
7690 (cp_parser_userdef_numeric_literal): Check the result of
7691 make_char_string_pack.
7693 2018-06-24 Maya Rashish <coypu@sdf.org>
7695 * ginclude/stddef.h: Simplify conditions around avoiding
7696 re-definition of __size_t.
7698 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7700 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7701 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7703 2018-06-22 Maya Rashish <coypu@sdf.org>
7705 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7706 made to OpenBSD and NetBSD through the years.
7708 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7710 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7711 behavior of vec_pack (vector double, vector double) to match
7712 behavior of vec_float2 (vector double, vector double).
7714 2018-06-22 Olivier Hainque <hainque@adacore.com>
7716 * gimplify.c (gimplify_function_tree): Prevent creation
7717 of a trampoline for the address of the current function
7718 passed to entry/exit instrumentation hooks.
7720 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7723 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7726 2018-06-22 Martin Liska <mliska@suse.cz>
7728 PR tree-optimization/86263
7729 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7730 Bail out if is_enabled is false.
7731 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7733 (jump_table_cluster::is_enabled): New function.
7735 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7737 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7738 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7739 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7740 (lto_input_ts_binfo_tree_pointers): Likewise.
7741 * tree-streamer-out.c (streamer_write_tree_bitfields,
7742 write_ts_binfo_tree_pointers): Likewise.
7743 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7745 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7747 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7749 2018-06-22 Martin Liska <mliska@suse.cz>
7751 * symbol-summary.h (get): Make it pure and inline move
7752 functionality from ::get function.
7753 (get): Remove and inline into ::get and ::get_create.
7754 (get_create): Move code from ::get function.
7756 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7759 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7760 -x assembler-with-cpp.
7762 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7764 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7765 _FILE_OFFSET_BITS=64 for C++.
7767 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7769 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7770 conversion insn that shows up when pr85657-3.c is compiled using
7771 IEEE 128-bit long double.
7772 (neg<mode>2_internal): Use the correct mode to check whether the
7773 mode is IBM extended.
7774 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7775 multiply and divide external functions from being created more
7778 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7780 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7782 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7783 the edge can be forwarded.
7784 (cfg_layout_merge_blocks): Likewise.
7786 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7788 * except.c (finish_eh_generation): Commit edge insertions only after
7789 the EH edges have been redirected from post-landing to landing pads.
7791 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7793 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7794 create_tmp_var_for to create the FRAME decl.
7795 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7797 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7799 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7800 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7801 debug statement when resetting its value.
7802 (expand_call_inline): Copy the locus of the call onto the assignment
7803 of the return value, if any. Use local variable in more cases.
7805 2018-06-21 Martin Liska <mliska@suse.cz>
7807 * ipa-pure-const.c (propagate_nothrow): Use
7808 funct_state_summaries->get.
7809 (dump_malloc_lattice): Likewise.
7810 (propagate_malloc): Likewise.
7812 2018-06-21 Richard Biener <rguenther@suse.de>
7814 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7815 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7816 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7818 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7819 BLOCK_ABSTRACT_ORIGIN unconditionally.
7821 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7823 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7825 * ipa-reference.c (ipa_reference_c_finalize): Delete
7826 ipa_ref_opt_sum_summaries and set it to NULL.
7828 2018-06-21 Tom de Vries <tdevries@suse.de>
7830 PR tree-optimization/85859
7831 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7832 test with comment from bb_no_side_effects_p.
7834 2018-06-21 Richard Biener <rguenther@suse.de>
7836 PR tree-optimization/86232
7837 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7838 max for constant niter.
7840 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7842 * config/aarch64/aarch64-simd.md
7843 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7845 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7847 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7848 Make opernads of the unspec commutative.
7850 2018-06-21 Richard Biener <rguenther@suse.de>
7852 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7853 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7854 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7855 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7857 (vect_record_base_alignments): Do not record base alignment
7858 for gathers or scatters.
7859 (vect_compute_data_ref_alignment): Drop return value that is always
7860 true. Bail out early for gathers or scatters.
7861 (vect_enhance_data_refs_alignment): Bail out early for gathers
7863 (vect_find_same_alignment_drs): Likewise.
7864 (vect_analyze_data_refs_alignment): Remove dead code.
7865 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7866 (vect_analyze_data_refs): For possible gathers or scatters do
7867 not create an alternate DR, just check their possible validity
7868 and mark them. Adjust DECL_NONALIASED handling to not rely
7870 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7871 update inits of gathers or scatters.
7872 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7873 Also copy gather/scatter flag to pattern vinfo.
7875 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7877 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7878 behavior of vec_packsu (vector unsigned long long, vector unsigned
7879 long long) to match behavior of vec_packs with same signature.
7881 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7882 Thomas Schwinge <thomas@codesourcery.com>
7883 Cesar Philippidis <cesar@codesourcery.com>
7885 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7886 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7887 (gimplify_adjust_omp_clauses): Likewise.
7888 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7889 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7890 (gimplify_omp_target_update): Update handling of acc update and
7892 * omp-low.c (install_var_field): Remove unused parameter
7893 base_pointers_restrict.
7894 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7895 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7897 (omp_target_base_pointers_restrict_p): Delete.
7898 (scan_omp_target): Update call to scan_sharing_clauses.
7899 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7901 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7902 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7903 (convert_local_omp_clauses): Likewise.
7904 * tree-pretty-print.c (dump_omp_clause): Likewise.
7905 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7907 (omp_clause_code_name): Likewise.
7909 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7912 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7915 PR tree-optimization/86231
7916 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7917 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7919 2018-06-20 Tom de Vries <tdevries@suse.de>
7921 PR tree-optimization/86097
7922 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7923 iv type if signedness of iv type is not the same as that of *nit.
7925 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7927 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7928 EDGE_EH edges, verify they are all EDGE_EH.
7930 2018-06-20 Maya Rashish <coypu@sdf.org>
7932 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7934 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7936 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7937 * config/aarch64/aarch64.c (xgene1_tunings): Add
7938 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7939 (aarch64_mode_valid_for_sched_fusion_p):
7940 Allow 16-byte modes.
7941 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7942 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7944 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7946 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7947 * config/aarch64/iterators.md (VQ2): New mode iterator.
7949 2018-06-20 Martin Liska <mliska@suse.cz>
7951 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7952 Change default ratio from 10 to 8.
7954 2018-06-20 Martin Liska <mliska@suse.cz>
7956 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7958 (bit_test_cluster::find_bit_tests): Likewise.
7959 (switch_decision_tree::analyze_switch_statement): Find clusters.
7960 * tree-switch-conversion.h (struct jump_table_cluster): Document
7963 2018-06-20 Martin Liska <mliska@suse.cz>
7965 * tree-switch-conversion.c (switch_conversion::collect):
7966 Record m_uniq property.
7967 (switch_conversion::expand): Bail out for special conditions.
7968 (group_cluster::~group_cluster): New.
7969 (group_cluster::group_cluster): Likewise.
7970 (group_cluster::dump): Likewise.
7971 (jump_table_cluster::emit): New.
7972 (switch_decision_tree::fix_phi_operands_for_edges): New.
7973 (struct case_node): Remove struct.
7974 (jump_table_cluster::can_be_handled): New.
7975 (case_values_threshold): Moved to header.
7976 (reset_out_edges_aux): Likewise.
7977 (jump_table_cluster::is_beneficial): New.
7978 (bit_test_cluster::can_be_handled): Likewise.
7979 (add_case_node): Remove.
7980 (bit_test_cluster::is_beneficial): New.
7981 (case_bit_test::cmp): New.
7982 (bit_test_cluster::emit): New.
7983 (expand_switch_as_decision_tree_p): Remove.
7984 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7985 (fix_phi_operands_for_edge): Likewise.
7986 (switch_decision_tree::analyze_switch_statement): New.
7987 (compute_cases_per_edge): Move ...
7988 (switch_decision_tree::compute_cases_per_edge): ... here.
7989 (try_switch_expansion): Likewise.
7990 (switch_decision_tree::try_switch_expansion): Likewise.
7991 (record_phi_operand_mapping): Likewise.
7992 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7993 (emit_case_decision_tree): Likewise.
7994 (switch_decision_tree::emit): Likewise.
7995 (balance_case_nodes): Likewise.
7996 (switch_decision_tree::balance_case_nodes): Likewise.
7997 (dump_case_nodes): Likewise.
7998 (switch_decision_tree::dump_case_nodes): Likewise.
7999 (emit_jump): Likewise.
8000 (switch_decision_tree::emit_jump): Likewise.
8001 (emit_cmp_and_jump_insns): Likewise.
8002 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8003 (emit_case_nodes): Likewise.
8004 (switch_decision_tree::emit_case_nodes): Likewise.
8005 (conditional_probability): Remove.
8006 * tree-switch-conversion.h (enum cluster_type): New.
8008 (struct cluster): Likewise.
8009 (cluster::cluster): Likewise.
8010 (struct simple_cluster): Likewise.
8011 (simple_cluster::simple_cluster): Likewise.
8012 (struct group_cluster): Likewise.
8013 (struct jump_table_cluster): Likewise.
8014 (struct bit_test_cluster): Likewise.
8015 (struct min_cluster_item): Likewise.
8016 (struct case_tree_node): Likewise.
8017 (case_tree_node::case_tree_node): Likewise.
8018 (jump_table_cluster::case_values_threshold): Likewise.
8019 (struct case_bit_test): Likewise.
8020 (struct switch_decision_tree): Likewise.
8021 (struct switch_conversion): Likewise.
8022 (switch_decision_tree::reset_out_edges_aux): Likewise.
8024 2018-06-20 Martin Liska <mliska@suse.cz>
8026 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8027 (hoist_edge_and_branch_if_true): Likewise.
8028 (expand_switch_using_bit_tests_p): Likewise.
8029 (struct case_bit_test): Likewise.
8030 (case_bit_test_cmp): Likewise.
8031 (emit_case_bit_tests): Likewise.
8032 (switch_conversion::switch_conversion): New class.
8033 (struct switch_conv_info): Remove old struct.
8034 (collect_switch_conv_info): More to ...
8035 (switch_conversion::collect): ... this.
8036 (check_range): Likewise.
8037 (switch_conversion::check_range): Likewise.
8038 (check_all_empty_except_final): Likewise.
8039 (switch_conversion::check_all_empty_except_final): Likewise.
8040 (check_final_bb): Likewise.
8041 (switch_conversion::check_final_bb): Likewise.
8042 (create_temp_arrays): Likewise.
8043 (switch_conversion::create_temp_arrays): Likewise.
8044 (free_temp_arrays): Likewise.
8045 (gather_default_values): Likewise.
8046 (switch_conversion::gather_default_values): Likewise.
8047 (build_constructors): Likewise.
8048 (switch_conversion::build_constructors): Likewise.
8049 (constructor_contains_same_values_p): Likewise.
8050 (switch_conversion::contains_same_values_p): Likewise.
8051 (array_value_type): Likewise.
8052 (switch_conversion::array_value_type): Likewise.
8053 (build_one_array): Likewise.
8054 (switch_conversion::build_one_array): Likewise.
8055 (build_arrays): Likewise.
8056 (switch_conversion::build_arrays): Likewise.
8057 (gen_def_assigns): Likewise.
8058 (switch_conversion::gen_def_assigns): Likewise.
8059 (prune_bbs): Likewise.
8060 (switch_conversion::prune_bbs): Likewise.
8061 (fix_phi_nodes): Likewise.
8062 (switch_conversion::fix_phi_nodes): Likewise.
8063 (gen_inbound_check): Likewise.
8064 (switch_conversion::gen_inbound_check): Likewise.
8065 (process_switch): Use the newly created class.
8066 (switch_conversion::expand): New.
8067 (switch_conversion::~switch_conversion): New.
8068 * tree-switch-conversion.h: New file.
8070 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8072 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8073 tree-vect-patterns.c.
8074 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8075 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8076 (vect_recog_sad_pattern): Likewise.
8077 (vect_recog_widen_sum_pattern): Likewise.
8078 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8079 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8080 (vect_recog_rotate_pattern): Likewise.
8081 (vect_recog_mult_pattern): Likewise.
8082 (vect_recog_vector_vector_shift_pattern): Likewise.
8083 (vect_recog_divmod_pattern): Likewise.
8084 (vect_recog_mixed_size_cond_pattern): Likewise.
8085 (vect_recog_bool_pattern): Likewise.
8086 (vect_recog_mask_conversion_pattern): Likewise.
8087 (vect_try_gather_scatter_pattern): Likewise.
8088 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8089 (vect_recog_over_widening_pattern): Likewise.
8090 (vect_recog_gather_scatter_pattern): Likewise.
8091 (vect_recog_func_ptr): Move from tree-vectorizer.h
8092 (vect_vect_recog_func_ptrs): Move further down the file.
8093 (vect_recog_func): Likewise. Remove the third argument.
8094 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8095 (vect_pattern_recog_1): Expect the pattern function to do any
8096 necessary target tests. Also expect it to provide a vector type.
8097 Remove the type_in handling.
8099 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8101 * tree-vect-patterns.c (vect_pattern_detected): New function.
8102 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8103 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8104 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8105 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8106 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8107 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8108 (vect_recog_mask_conversion_pattern)
8109 (vect_try_gather_scatter_pattern): Likewise.
8111 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8113 * tree-vect-patterns.c (vect_get_internal_def): New function.
8114 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8115 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8116 (search_type_for_mask_1): Use it.
8118 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8120 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8121 redundant WIDEN_SUM_EXPR handling.
8122 (vect_recog_sad_pattern): Likewise.
8124 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8126 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8127 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8128 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8129 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8130 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8134 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8135 use the stmt_vec_info of the original bb statement for the
8136 new zero assignment, even if the call is part of a pattern.
8138 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8140 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8141 that the sequence is attached to the original statement rather
8142 than the pattern statement.
8143 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8144 PATTERN_DEF_SEQ from the original statement rather than
8145 the main pattern statement.
8146 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8147 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8148 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8150 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8152 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8153 definition statements before the early exit for statements that aren't
8155 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8157 (vect_transform_loop): ...here. Process pattern definition
8158 statements without first checking whether the main pattern
8159 statement is live or relevant.
8161 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8163 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8164 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8166 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8168 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8169 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8170 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8171 (expand_block_compare): Change select_block_compare_mode call.
8172 (expand_strncmp_align_check): Use new functions, fix comment.
8173 (emit_final_str_compare_gpr): New function.
8174 (expand_strn_compare): Refactor and clean up code.
8175 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8177 2018-06-19 Tony Reix <tony.reix@atos.com>
8178 Damien Bergamini <damien.bergamini@atos.com>
8179 David Edelsohn <dje.gcc@gmail.com>
8181 * collect2.c (static_obj): New variable.
8182 (static_libs): New variable.
8183 (is_in_list): Uncomment declaration.
8184 (main): Track AIX libraries linked statically.
8185 (is_in_list): Uncomment definition.
8186 (scan_prog_file): Don't add AIX shared libraries initializer
8187 to constructor list if linking statically.
8189 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8191 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8193 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8195 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8197 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8200 2018-06-19 Martin Liska <mliska@suse.cz>
8202 * config/i386/i386.c (ix86_can_inline_p): Do not use
8203 ipa_fn_summaries::get_create.
8204 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8206 (devirtualization_time_bonus): Likewise.
8207 (ipcp_propagate_stage): Likewise.
8208 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8209 (edge_set_predicate): Likewise.
8210 (evaluate_conditions_for_known_args): Likewise.
8211 (evaluate_properties_for_edge): Likewise.
8212 (ipa_call_summary::reset): Tranform to ...
8213 (ipa_call_summary::~ipa_call_summary): ... this.
8214 (ipa_fn_summary::reset): Transform to ...
8215 (ipa_fn_summary::~ipa_fn_summary): ... this.
8216 (ipa_fn_summary_t::remove): Rename to ...
8217 (ipa_fn_summary_t::remove_callees): ... this.
8218 (ipa_fn_summary_t::duplicate): Use placement new
8219 instead of memory copy.
8220 (ipa_call_summary_t::duplicate): Likewise.
8221 (ipa_call_summary_t::remove): Remove.
8222 (dump_ipa_call_summary): Change get_create to get.
8223 (ipa_dump_fn_summary): Dump only when summary exists.
8224 (analyze_function_body): Use symbol_summary::get instead
8226 (compute_fn_summary): Likewise.
8227 (estimate_edge_devirt_benefit): Likewise.
8228 (estimate_edge_size_and_time): Likewise.
8229 (inline_update_callee_summaries): Likewise.
8230 (remap_edge_change_prob): Likewise.
8231 (remap_edge_summaries): Likewise.
8232 (ipa_merge_fn_summary_after_inlining): Likewise.
8233 (write_ipa_call_summary): Likewise.
8234 (ipa_fn_summary_write): Likewise.
8235 (ipa_free_fn_summary): Likewise.
8236 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8237 (struct ipa_call_summary): Likewise.
8238 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8240 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8241 (estimate_size_after_inlining): Likewise.
8242 (estimate_growth): Likewise.
8243 (growth_likely_positive): Likewise.
8244 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8245 (inline_call): Likewise.
8246 * ipa-inline.c (caller_growth_limits): Likewise.
8247 (can_inline_edge_p): Likewise.
8248 (can_inline_edge_by_limits_p): Likewise.
8249 (compute_uninlined_call_time): Likewise.
8250 (compute_inlined_call_time): Likewise.
8251 (want_inline_small_function_p): Likewise.
8252 (edge_badness): Likewise.
8253 (update_caller_keys): Likewise.
8254 (update_callee_keys): Likewise.
8255 (inline_small_functions): Likewise.
8256 (inline_to_all_callers_1): Likewise.
8257 (dump_overall_stats): Likewise.
8258 (early_inline_small_functions): Likewise.
8259 (early_inliner): Likewise.
8260 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8261 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8262 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8263 * ipa-split.c (execute_split_functions): Likewise.
8264 * symbol-summary.h: Likewise.
8265 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8267 2018-06-19 Richard Biener <rguenther@suse.de>
8269 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8270 (vectorize_loops): ... here. Fix dbgcnt handling.
8271 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8273 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8276 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8277 ieee128 argument takes up only one (vector) register, not two (floating
8280 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8282 * gimplify.c (gimplify_init_constructor): Really never clear for an
8283 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8285 2018-06-19 Richard Biener <rguenther@suse.de>
8287 PR tree-optimization/86179
8288 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8289 after failed recognition.
8291 2018-06-18 Martin Sebor <msebor@redhat.com>
8294 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8295 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8296 Handle integer subtraction.
8297 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8298 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8300 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8302 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8303 param from rtx to rtx_insn *.
8304 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8306 (frv_ifcvt_modify_insn): Likwise.
8307 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8308 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8309 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8310 as_a <rtx_insn *> cast to local "unprotected_region" once
8311 it's been established that it's not NULL or pc_rtx.
8312 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8313 param "sethi" from rtx to rtx_insn *.
8314 (nds32_group_float_insns): Likewise for param "insn".
8315 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8317 (vax_output_int_subtract): Likewise.
8318 * config/vax/vax.c (vax_output_int_add): Likewise for param
8320 (vax_output_int_subtract): Likewise.
8321 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8322 (emit_pattern_after): Likewise for param "after".
8323 (emit_insn_after): Likewise.
8324 (emit_jump_insn_after): Likewise.
8325 (emit_call_insn_after): Likewise.
8326 (emit_debug_insn_after): Likewise.
8327 (emit_pattern_before): Likewise for param "before".
8328 (emit_insn_before): Likewise.
8329 (emit_jump_insn_before): Likewise.
8330 * final.c (get_insn_template): Likewise for param "insn", removing
8332 * output.h (get_insn_template): Likewise for 2nd param.
8333 * rtl.h (emit_insn_before): Likewise.
8334 (emit_jump_insn_before): Likewise.
8335 (emit_debug_insn_before_noloc): Likewise.
8336 (emit_insn_after): Likewise.
8337 (emit_jump_insn_after): Likewise.
8338 (emit_call_insn_after): Likewise.
8339 (emit_debug_insn_after): Likewise.
8340 (set_insn_deleted): Likewise for param.
8342 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8345 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8346 floating point modes, so that IFmode is numerically greater than
8347 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8348 to declare the ordering. This prevents IFmode from being
8349 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8350 machine. Include rs6000-modes.h to share the fractional values
8351 between genmodes* and the rest of the compiler.
8355 * config/rs6000/rs6000-modes.h: New file.
8356 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8357 meaning of rs6000_long_double_size so that 126..128 selects an
8358 appropriate 128-bit floating point type.
8359 (rs6000_option_override_internal): Likewise.
8360 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8361 (TARGET_LONG_DOUBLE_128): Change the meaning of
8362 rs6000_long_double_size so that 126..128 selects an appropriate
8363 128-bit floating point type.
8364 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8365 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8366 source and destination to match the standard usage.
8367 (truncifkf2): Likewise.
8368 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8369 ISA 2.07 to use an explicit clobber, instead of passing in a
8371 (copysign<mode>3_soft): Likewise.
8373 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8375 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8376 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8377 (vect_slp_analyze_instance_dependence): Likewise.
8378 (vect_enhance_data_refs_alignment): Likewise.
8379 (vect_analyze_data_refs_alignment): Likewise.
8380 (vect_slp_analyze_and_verify_instance_alignment
8381 (vect_analyze_data_ref_accesses): Likewise.
8382 (vect_prune_runtime_alias_test_list): Likewise.
8383 (vect_analyze_data_refs): Likewise.
8384 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8385 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8386 (vect_analyze_scalar_cycles_1): Likewise.
8387 (vect_get_loop_niters): Likewise.
8388 (vect_analyze_loop_form_1): Likewise.
8389 (vect_update_vf_for_slp): Likewise.
8390 (vect_analyze_loop_operations): Likewise.
8391 (vect_analyze_loop): Likewise.
8392 (vectorizable_induction): Likewise.
8393 (vect_transform_loop): Likewise.
8394 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8395 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8396 (vect_make_slp_decision): Likewise.
8397 (vect_detect_hybrid_slp): Likewise.
8398 (vect_slp_analyze_operations): Likewise.
8399 (vect_slp_bb): Likewise.
8400 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8401 (vectorizable_bswap): Likewise.
8402 (vectorizable_call): Likewise.
8403 (vectorizable_simd_clone_call): Likewise.
8404 (vectorizable_conversion): Likewise.
8405 (vectorizable_assignment): Likewise.
8406 (vectorizable_shift): Likewise.
8407 (vectorizable_operation): Likewise.
8408 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8410 2018-06-18 Martin Sebor <msebor@redhat.com>
8412 PR tree-optimization/81384
8413 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8414 * builtins.c (expand_builtin_strnlen): New function.
8415 (expand_builtin): Call it.
8416 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8417 * builtins.def (BUILT_IN_STRNLEN): New.
8418 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8419 Warn for bounds in excess of maximum object size.
8420 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8421 single-value ranges. Handle strnlen.
8422 (handle_builtin_strlen): Handle strnlen.
8423 (strlen_check_and_optimize_stmt): Same.
8424 * doc/extend.texi (Other Builtins): Document strnlen.
8426 2018-06-18 Maya Rashish <coypu@sdf.org>
8428 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8429 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8430 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8432 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8434 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8436 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8438 * tree.c (escaped_string::escape): Replace cast to char * by
8439 const_cast<char *> (unescaped).
8441 2018-06-18 Nick Clifton <nickc@redhat.com>
8444 * tree.c (escaped_string): New class. Converts an unescaped
8445 string into its escaped equivalent.
8446 (warn_deprecated_use): Use the new class to convert the
8447 deprecation message, if present.
8448 (test_escaped_strings): New self test.
8449 (test_c_tests): Add test_escaped_strings.
8450 * doc/extend.texi (deprecated): Add a note that the
8451 deprecation message is affected by the -fmessage-length
8452 option, and that control characters will be escaped.
8453 (#pragma GCC error): Document this pragma.
8454 (#pragma GCC warning): Likewise.
8455 * doc/invoke.texi (-fmessage-length): Document this option's
8456 effect on the #warning and #error preprocessor directives and
8457 the deprecated attribute.
8459 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8461 * tree.c (decl_value_expr_lookup): Revert latest change.
8462 (decl_value_expr_insert): Likewise.
8464 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8466 * gimplify.c (nonlocal_vlas): Delete.
8467 (nonlocal_vla_vars): Likewise.
8468 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8470 (gimplify_body): Do not create and destroy nonlocal_vlas.
8471 * tree-nested.c: Include diagnostic.h.
8472 (use_pointer_in_frame): Tweak.
8473 (lookup_field_for_decl): Add assertion and declare the transformation.
8474 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8475 internal error when the reference is in a wrong context. Do not
8476 create a debug decl by default.
8477 (note_nonlocal_block_vlas): Delete.
8478 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8479 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8480 create a debug decl by default.
8481 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8482 call is in a wrong context.
8483 (fixup_vla_decls): New function.
8484 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8485 debug variables were created.
8486 * tree.c (decl_value_expr_lookup): Add checking assertion.
8487 (decl_value_expr_insert): Likewise.
8489 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8492 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8493 * tree-scalar-evolution.c (interpret_expr): Likewise.
8494 (expression_expensive_p): Likewise.
8495 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8496 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8497 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8498 (ssa_defined_by_minus_one_stmt_p): New.
8500 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8503 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8504 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8505 * dojump.c (do_jump): Likewise.
8506 * expr.c (expand_expr_real_2): Check operand type's sign.
8507 * fold-const.c (const_unop): Handle ABSU_EXPR.
8508 (fold_abs_const): Likewise.
8509 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8510 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8511 (strip_sign_op_1): Likesise.
8512 * match.pd: Add new pattern to generate ABSU_EXPR.
8513 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8514 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8515 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8516 * tree-inline.c (estimate_operator_cost): Likewise.
8517 * tree-pretty-print.c (dump_generic_node): Likewise.
8518 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8519 * tree.def (ABSU_EXPR): New.
8521 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8524 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8525 documented as preserved for backward compatibility only.
8526 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8528 PR rtl-optimization/86108
8529 * bb-reorder.c (create_forwarder_block): Renamed to ...
8530 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8531 jump from new landing pad to the second part.
8532 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8535 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8538 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8539 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8540 Only call store_expr for halves if the mode is the same.
8543 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8544 Fix up comment formatting.
8546 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8548 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8549 (typed_splay_tree::closure,
8550 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8551 (typed_splay_tree::typed_splay_tree,
8552 typed_splay_tree::operator =): Declared private.
8553 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8554 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8555 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8556 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8557 typed_splay_tree::splay_tree_splay,
8558 typed_splay_tree::splay_tree_foreach_helper,
8559 typed_splay_tree::splay_tree_insert,
8560 typed_splay_tree::splay_tree_remove,
8561 typed_splay_tree::splay_tree_lookup,
8562 typed_splay_tree::splay_tree_predecessor,
8563 typed_splay_tree::splay_tree_successor,
8564 typed_splay_tree::splay_tree_min,
8565 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8566 (typed_splay_tree::root, typed_splay_tree::comp,
8567 typed_splay_tree::delete_key,
8568 typed_splay_tree::delete_value): New data members.
8569 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8570 typed_splay_tree::remove.
8572 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8574 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8575 -mginv and -mno-ginv to the assembler.
8576 * config/mips/mips.opt (-mcrc): New option.
8578 * doc/invoke.text (-mcrc): Document.
8581 2018-06-15 Nick Clifton <nickc@redhat.com>
8584 * tree.c (escaped_string): New class. Converts an unescaped
8585 string into its escaped equivalent.
8586 (warn_deprecated_use): Use the new class to convert the
8587 deprecation message, if present.
8588 (test_escaped_strings): New self test.
8589 (test_c_tests): Add test_escaped_strings.
8590 * doc/extend.texi (deprecated): Add a note that the
8591 deprecation message is affected by the -fmessage-length
8592 option, and that control characters will be escaped.
8593 (#pragma GCC error): Document this pragma.
8594 (#pragma GCC warning): Likewise.
8595 * doc/invoke.texi (-fmessage-length): Document this option's
8596 effect on the #warning and #error preprocessor directives and
8597 the deprecated attribute.
8599 2018-06-15 Richard Biener <rguenther@suse.de>
8601 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8602 here, also noting vector size used.
8603 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8604 size used in MSG_OPTIMIZED_LOCATIONS dump.
8605 (pass_slp_vectorize::execute): Adjust.
8607 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8610 * config/arc/arc.c (arc_return_address_register): Fix
8613 2018-06-15 Richard Biener <rguenther@suse.de>
8616 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8617 leave useless conversion stripping to force_gimple_operand_gsi.
8618 (gimplify_build2): Likewise.
8619 (gimplify_build1): Likewise.
8621 2018-06-15 Richard Biener <rguenther@suse.de>
8624 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8625 before adjusting their block.
8627 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8629 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8630 multilibs for *-*-rtems*.
8631 * config/riscv/t-rtems: New file.
8633 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8636 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8637 unsigned_type_for returns NULL.
8640 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8641 subregs of multi-word pseudos unless the float mode has word size.
8643 2018-06-14 Richard Biener <rguenther@suse.de>
8646 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8647 duplicate and harmful type_hash_canon.
8648 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8650 2018-06-14 Richard Biener <rguenther@suse.de>
8653 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8656 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8658 * config/rtems.h (STDINT_LONG32): Define.
8660 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8661 Prachi Godbole <prachi.godbole@imgtec.com>
8663 * config/mips/mips-cpus.def: Define P6600.
8664 * config/mips/mips-tables.opt: Regenerate.
8665 * config/mips/mips.c (mips_ucbranch_type): New enum.
8666 (mips_rtx_cost_data): Add support for P6600.
8667 (mips_issue_rate): Likewise.
8668 (mips_multipass_dfa_lookahead): Likewise.
8669 (mips_avoid_hazard): Likewise.
8670 (mips_reorg_process_insns): Likewise.
8671 (mips_classify_branch_p6600): New function.
8672 * config/mips/mips.h (TUNE_P6600): New define.
8673 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8674 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8675 * config/mips/mips.md: Include p6600.md.
8676 (processor): Add p6600.
8677 * config/mips/p6600.md: New file.
8678 * doc/invoke.texi: Add p6600 to supported architectures.
8680 2018-06-13 Martin Sebor <msebor@redhat.com>
8682 PR tree-optimization/86114
8683 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8685 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8687 2018-06-13 Richard Biener <rguenther@suse.de>
8689 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8690 Properly set vector type of the intermediate stmt.
8691 * tree-vect-stmts.c (vectorizable_operation): The destination
8692 var always has vectype_out type.
8694 2018-06-13 Jeff Law <law@redhat.com>
8696 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8697 integer 0 for argument to print_rtl_with_bb.
8698 (rl78_reorg): Likewise.
8700 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8702 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8703 from rtx to rtx_insn *.
8704 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8706 (add_sched_insns_for_speculation): Likewise for local "target",
8707 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8708 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8709 from rtx_insn ** to rtx_code_label **.
8710 (reorg_emit_nops): Likewise.
8711 (c6x_reorg): Likewise for local "call_labels".
8712 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8714 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8715 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8716 the loops over LABEL_REFS.
8717 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8719 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8720 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8721 (split_branches): Strengthen local "olabel" from rtx to
8722 rtx_insn *, adding a safe_as_a cast.
8723 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8725 (add_insn_after): Likewise for first two params.
8726 (add_insn_before): Likewise.
8727 (remove_insn): Likewise for param.
8728 (emit_pattern_before_noloc): Likewise for second and third params.
8729 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8730 (emit_call_insn_before_noloc): Likewise.
8731 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8733 (emit_barrier_before): Likewise.
8734 (emit_label_before): Strengthen "label" param from "rtx" to
8735 "rtx_code_label *". Strengthen "before" param from "rtx" to
8737 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8739 (emit_pattern_after_noloc): Likewise.
8740 (emit_insn_after_noloc): Likewise.
8741 (emit_jump_insn_after_noloc): Likewise.
8742 (emit_call_insn_after_noloc): Likewise.
8743 (emit_debug_insn_after_noloc): Likewise.
8744 (emit_barrier_after): Likewise.
8745 (emit_label_after): Likewise for both params.
8746 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8747 "loc" param from "int" to "location_t".
8748 (emit_insn_after_setloc): Likewise.
8749 (emit_jump_insn_after_setloc): Likewise.
8750 (emit_call_insn_after_setloc): Likewise.
8751 (emit_debug_insn_after_setloc): Likewise.
8752 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8753 "loc" param from "int" to "location_t".
8754 (emit_pattern_before): Convert NULL_RTX to NULL.
8755 (emit_insn_before_setloc): Convert "loc" param from "int" to
8757 (emit_jump_insn_before_setloc): Likewise.
8758 (emit_call_insn_before_setloc): Likewise.
8759 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8760 rtx_insn *. Convert "loc" param from "int" to "location_t".
8761 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8762 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8763 Convert 3rd param from "int" to "location_t".
8764 (emit_barrier_before, emit_barrier_after, next_real_insn):
8765 Strengthen param from rtx to rtx_insn *.
8766 (emit_label_before): Strengthen 1st param from "rtx" to
8767 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8769 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8770 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8771 Strengthen 2nd param from "rtx" to "rtx_insn *".
8772 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8773 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8774 Likewise. Convert 3rd param from "int" to "location_t".
8775 (emit_label_after): Strengthen 1st param from "rtx" to
8777 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8779 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8780 from "rtx" to "rtx_insn *".
8782 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8784 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8785 bodies streamed in with -Q.
8786 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8787 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8788 * gimple-streamer-out.c: Include gimple-pretty-print.h
8789 (output_bb): Dump stmts streamed.
8790 * lto-section-out.c: Include print-tree.h
8791 (lto_begin_section): Dump sections created.
8792 (lto_output_decl_index): Dump decl encoded.
8793 * lto-streamer-out.c: Include print-tree.h
8794 (create_output_block): Dump output block created.
8795 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8796 (output_function): Dump function output.
8797 (output_constructor): Dump constructor streamed.
8798 (write_global_stream): Output indexes encoded.
8799 (produce_asm_for_decls): Dump streams encoded.
8800 * lto-streamer.c (streamer_dump_file): New global var.
8801 * lto-streamer.h (streamer_dump_file): Declare.
8802 * passes.c (ipa_write_summaries): Initialize streamer dump.
8803 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8806 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8809 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8810 offsets for register save directives. Emit a second batch of save
8811 directives, if need be, when the function accesses prior frames.
8813 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8815 * config/arc/fpu.md (fmasf4): Force operand to register.
8816 (fnmasf4): Likewise.
8818 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8820 * config/arc/arc-protos.h (arc_pad_return): Remove.
8821 * config/arc/arc.c (machine_function): Remove force_short_suffix
8823 (arc_print_operand): Adjust printing of '&'.
8824 (arc_verify_short): Remove conditional printing of short suffix.
8825 (arc_final_prescan_insn): Remove reference to size_reason.
8826 (pad_return): New function.
8827 (arc_reorg): Call pad_return.
8828 (arc_pad_return): Remove.
8829 (arc_init_machine_status): Remove reference to force_short_suffix.
8830 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8831 (attr length): When attribute iscompact is true force to 2
8832 regardless; in the case of maybe check if we want to force the
8833 instruction to have 4 bytes length.
8834 (nopv): Change it to generate 4 byte long nop as well.
8835 (blockage): New pattern.
8836 (simple_return): Remove call to arc_pad_return.
8837 (p_return_i): Likewise.
8839 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8841 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8843 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8845 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8848 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8850 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8851 for ARC700 and ARCv2.
8853 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8856 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8857 operands[2] instead of operands[1].
8860 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8862 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8863 case, check whether the outer register overlaps an unallocatable
8864 register, not just whether it fits the required class.
8866 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8868 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8870 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8871 (memrefs_conflict_p): Likewise.
8872 (init_alias_analysis): Likewise.
8873 * cfgexpand.c (expand_debug_expr): Likewise.
8874 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8875 * cse.c (fold_rtx): Likewise.
8876 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8877 * expr.c (emit_block_move_hints): Likewise.
8878 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8879 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8880 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8881 (emit_group_store): Likewise.
8882 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8883 to read the PRE/POST_MODIFY increment.
8884 * calls.c (store_one_arg): Use strip_offset.
8885 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8887 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8889 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8890 (simplify_binary_operation_1): Extend CONST_INT handling to
8892 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8893 than a HOST_WIDE_INT.
8894 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8896 (adjust_mems, add_stores): Update accodingly.
8897 (vt_canonicalize_addr): Track polynomial offsets.
8898 (emit_note_insn_var_location): Likewise.
8899 (vt_add_function_parameter): Likewise.
8900 (vt_initialize): Likewise.
8902 2018-06-12 Jeff Law <law@redhat.com>
8904 * config.gcc (alpha*-*-freebsd*): Remove.
8905 * config/alpha/freebsd.h: Remove.
8907 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8910 * spellcheck-tree.c (levenshtein_distance): Rename to...
8911 (get_edit_distance): ...this, and update for underlying renaming.
8912 * spellcheck-tree.h (levenshtein_distance): Rename to...
8913 (get_edit_distance): ...this.
8914 * spellcheck.c (levenshtein_distance): Rename to...
8915 (get_edit_distance): ...this. Convert from Levenshtein distance
8916 to Damerau-Levenshtein distance by supporting transpositions of
8917 adjacent characters. Rename "v1" to "v_next" and "v0" to
8919 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8920 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8921 update for underlying renaming.
8922 (selftest::levenshtein_distance_unit_test): Rename to...
8923 (selftest::test_get_edit_distance_unit): ...this, and update for
8924 underlying renaming.
8925 (selftest::test_find_closest_string): Add example from PR 69968
8926 where transposition helps
8927 (selftest::test_metric_conditions): Update for renaming.
8928 (selftest::test_metric_conditions): Likewise.
8929 (selftest::spellcheck_c_tests): Likewise.
8930 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8931 (get_edit_distance): ...this.
8932 (best_match::consider): Update for renaming.
8934 2018-06-12 Martin Sebor <msebor@redhat.com>
8936 PR tree-optimization/85259
8937 * builtins.c (compute_objsize): Handle constant offsets.
8938 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8939 true iff a warning has been issued.
8940 * gimple.h (gimple_nonartificial_location): New function.
8941 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8942 gimple_nonartificial_location and handle -Wno-system-headers.
8943 (handle_builtin_stxncpy): Same.
8945 2018-06-12 Martin Sebor <msebor@redhat.com>
8948 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8950 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8952 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8953 BUILTIN_VEC_XST entries for pointer to double and long long.
8955 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8958 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8960 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8963 2018-06-12 Martin Liska <mliska@suse.cz>
8965 * doc/options.texi: Document IntegerRange.
8967 2018-06-12 Martin Liska <mliska@suse.cz>
8969 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8970 * opt-functions.awk: Handle Deprecated flag.
8971 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8973 (read_cmdline_option): Report warning for a deprecated option.
8974 * opts.h (struct cl_option): Add new field cl_deprecated.
8975 (CL_ERR_DEPRECATED): New.
8977 2018-06-12 Martin Liska <mliska@suse.cz>
8979 * doc/options.texi: Document Deprecated option flag.
8981 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8983 * config/arc/arc-arch.h (arc_extras): New enum.
8984 (arc_cpu_t):Add field extra.
8985 (arc_cpu_types): Consider the extras.
8986 * config/arc/arc-cpus.def: Add extras info.
8987 * config/arc/arc-opts.h (processor_type): Consider extra field.
8988 * config/arc/arc.c (arc_override_options): Handle extra field.
8990 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8992 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8993 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8995 * config/arc/arc.c (arc_init): Update pic warning.
8996 (irq_range): Update irq range parsing warnings.
8997 (arc_override_options): Update various warning messages.
8998 (arc_handle_aux_attribute): Likewise.
9000 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9002 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9004 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9006 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9007 compiler messages directives.
9009 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9011 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9012 * config/mips/mips-tables.opt: Regenerate.
9013 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9015 * doc/invoke.texi: Document -march=i6500.
9017 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9019 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9020 (i6400_gpmul): Add cpu_unit.
9021 (i6400_gpdiv): Likewise.
9022 (i6400_msa_add_d): Update reservations.
9023 (i6400_msa_int_add) Likewise.
9024 (i6400_msa_short_logic3) Likewise.
9025 (i6400_msa_short_logic2) Likewise.
9026 (i6400_msa_short_logic) Likewise.
9027 (i6400_msa_move) Likewise.
9028 (i6400_msa_cmp) Likewise.
9029 (i6400_msa_short_float2) Likewise.
9030 (i6400_msa_div_d) Likewise.
9031 (i6400_msa_long_logic1) Likewise.
9032 (i6400_msa_long_logic2) Likewise.
9033 (i6400_msa_mult) Likewise.
9034 (i6400_msa_long_float2) Likewise.
9035 (i6400_msa_long_float4) Likewise.
9036 (i6400_msa_long_float5) Likewise.
9037 (i6400_msa_long_float8) Likewise.
9038 (i6400_fpu_fadd): Include frint type.
9039 (i6400_fpu_store): New define_insn_reservation.
9040 (i6400_fpu_load): Likewise.
9041 (i6400_fpu_move): Likewise.
9042 (i6400_fpu_fcmp): Likewise.
9043 (i6400_fpu_fmadd): Likewise.
9044 (i6400_int_mult): Include imul3nc type and update reservation.
9045 (i6400_int_div): Include idiv3 type and update reservation.
9046 (i6400_int_load): Update to check type not move_type.
9047 (i6400_int_store): Likewise.
9048 (i6400_int_prefetch): Set zero latency.
9050 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9052 * gcc.c: Document new %@{...} sequence.
9053 (LINK_COMMAND_SPEC): Use it for the -L switches.
9054 (cpp_unique_options): Use it for the -I switches.
9055 (at_file_argbuf): New global variable.
9056 (in_at_file): Likewise.
9057 (alloc_args): Create at_file_argbuf.
9058 (clear_args): Truncate at_file_argbuf.
9059 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9060 (open_at_file): New function.
9061 (close_at_file): Likewise.
9062 (create_at_file): Delete.
9063 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9066 (validate_switches_from_spec): Deal with %@{...} sequence.
9067 (validate_switches): Likewise.
9068 (driver::finalize): Call clear_args.
9070 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9072 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9074 2018-06-11 Martin Sebor <msebor@redhat.com>
9076 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9077 (Wno-class-memaccess): Add @opindex.
9078 (Wno-templates, Wno-multiple-inheritance): Same.
9079 (Wno-virtual-inheritance, Wno-namespaces): Same.
9080 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9081 (Wno-format-overflow, Wno-format-truncation): Same.
9082 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9083 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9084 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9085 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9086 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9087 (Wno-misspelled-isr): Same.
9089 2018-06-11 Martin Sebor <msebor@redhat.com>
9091 * PR tree-optimization/86083
9092 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9094 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9096 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9098 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9101 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9102 on the correct operand.
9103 (*movdi_internal64): Ditto.
9105 2018-06-11 Martin Liska <mliska@suse.cz>
9107 PR tree-optimization/86089
9108 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9110 2018-06-11 Julia Koval <julia.koval@intel.com>
9112 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9113 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9114 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9116 2018-06-11 Olivier Hainque <hainque@adacore.com>
9118 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9119 for Ada with strict dwarf2.
9121 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9124 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9127 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9129 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9131 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9133 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9136 2018-06-08 Martin Liska <mliska@suse.cz>
9138 * tree-cfg.h (debug_function): Fix argument type to match
9141 2018-06-08 Martin Liska <mliska@suse.cz>
9143 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9144 Remove usage of MPX-related (and removed) fields.
9145 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9147 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9149 * cfg.c (debug): Use TDF_NONE rather than 0.
9150 * cfghooks.c (debug): Likewise.
9151 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9152 (struct dump_option_value_info): Convert to...
9153 (struct kv_pair): ...this template type.
9154 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9156 (optinfo_verbosity_options): Likewise.
9157 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9159 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9160 than int for "optgroup_flags" param.
9161 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9163 (dump_dec): Likewise.
9164 (dump_finish): Use TDF_NONE rather than 0.
9165 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9166 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9167 than 0. Update for change to option_ptr.
9168 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9169 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9170 0. Update for changes to optinfo_verbosity_options and
9172 (opt_info_switch_p): Convert optgroup_flags from int to
9174 (dump_basic_block): Use dump_flags_t rather than int
9175 for "dump_kind" param.
9176 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9177 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9178 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9179 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9180 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9181 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9182 TDF_NONE): Convert from macros to...
9183 (enum dump_flag): ...this new enum.
9184 (dump_flags_t): Update to use enum.
9185 (operator|, operator&, operator~, operator|=, operator&=):
9186 Implement for dump_flags_t.
9187 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9188 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9189 Convert from macros to...
9190 (enum optgroup_flag): ...this new enum.
9191 (optgroup_flags_t): New typedef.
9192 (operator|, operator|=): Implement for optgroup_flags_t.
9193 (struct dump_file_info): Convert field "alt_flags" to
9194 dump_flags_t. Convert field "optgroup_flags" to
9196 (dump_basic_block): Use dump_flags_t rather than int for param.
9197 (dump_generic_expr_loc): Likewise.
9198 (dump_dec): Likewise.
9199 (dump_register): Convert param "optgroup_flags" to
9201 (opt_info_enable_passes): Likewise.
9202 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9204 * gimple-pretty-print.c (debug): Likewise.
9205 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9206 (merged_store_group::apply_stores): Likewise.
9207 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9208 * gimple.c (verify_gimple_pp): Likewise.
9209 * graphite-poly.c (print_pbb_body): Likewise.
9210 * passes.c (pass_manager::register_one_dump_file): Convert
9211 local "optgroup_flags" to optgroup_flags_t.
9212 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9214 (debug_body): Likewise.
9215 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9216 to optgroup_flags_t.
9217 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9219 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9220 (convert_mult_to_fma): Likewise.
9221 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9222 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9223 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9224 "dump_kind" to dump_flags_t.
9226 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9228 * config/rs6000/rs6000.c (min, max): Delete.
9230 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9232 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9233 -mabi=spe and -mabi=no-spe.
9235 2018-06-08 Martin Liska <mliska@suse.cz>
9237 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9238 where we expect an existing summary.
9240 2018-06-08 Martin Liska <mliska@suse.cz>
9242 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9243 * ipa-inline.h (estimate_edge_growth): Likewise.
9245 2018-06-08 Martin Liska <mliska@suse.cz>
9247 * cgraph.c (function_version_hasher::hash): Use
9248 cgraph_node::get_uid ().
9249 (function_version_hasher::equal):
9250 * cgraph.h (cgraph_node::get_uid): New method.
9251 * ipa-inline.c (update_caller_keys): Use
9252 cgraph_node::get_uid ().
9253 (update_callee_keys): Likewise.
9254 * ipa-utils.c (searchc): Likewise.
9255 (ipa_reduced_postorder): Likewise.
9256 * lto-cgraph.c (input_node): Likewise.
9257 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9258 * symbol-summary.h (symtab_insertion): Likewise.
9259 (symtab_removal): Likewise.
9260 (symtab_duplication): Likewise.
9261 * tree-pretty-print.c (dump_function_header): Likewise.
9262 * tree-sra.c (convert_callers_for_node): Likewise.
9264 2018-06-08 Martin Liska <mliska@suse.cz>
9266 * cgraph.c (symbol_table::create_edge): Always assign a new
9268 (symbol_table::free_edge): Do not recycle numbers.
9269 * cgraph.h (cgraph_edge::get): New method.
9270 * symbol-summary.h (symtab_removal): Use it.
9271 (symtab_duplication): Likewise.
9272 (call_summary::hashable_uid): Remove.
9274 2018-06-08 Martin Liska <mliska@suse.cz>
9276 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9277 (initialize_growth_caches): Remove.
9278 (free_growth_caches): Likewise.
9279 (do_estimate_edge_time): Use edge_growth_cache.
9280 (do_estimate_edge_size): Likewise.
9281 (do_estimate_edge_hints): Likewise.
9282 * ipa-inline.c (reset_edge_caches): Likewise.
9283 (recursive_inlining): Likewise.
9284 (inline_small_functions): Likewise.
9285 * ipa-inline.h (initialize_growth_caches): Remove.
9286 (estimate_edge_size): Likewise.
9287 (estimate_edge_time): Likewise.
9288 (estimate_edge_hints): Likewise.
9289 (reset_edge_growth_cache): Likewise.
9290 * symbol-summary.h (call_summary::remove): New method.
9292 2018-06-08 Martin Liska <mliska@suse.cz>
9294 * ipa-cp.c (class edge_clone_summary): New summary.
9295 (grow_edge_clone_vectors): Remove.
9296 (ipcp_edge_duplication_hook): Remove.
9297 (class edge_clone_summary_t): New call_summary class.
9298 (ipcp_edge_removal_hook): Remove.
9299 (edge_clone_summary_t::duplicate): New function.
9300 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9301 (create_specialized_node): Likewise.
9302 (ipcp_driver): Initialize edge_clone_summaries and do not
9305 2018-06-08 Martin Liska <mliska@suse.cz>
9307 * symbol-summary.h (get): New function.
9308 (call_summary::m_initialize_when_cloning): New class member.
9310 2018-06-08 Martin Liska <mliska@suse.cz>
9312 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9313 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9314 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9315 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9316 (remove_cgraph_node_from_order): Use the removed_nodes set.
9317 (do_per_function_toporder): Likwise.
9318 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9319 instead of summary_uid.
9320 (symtab_removal): Likewise.
9321 (symtab_duplication): Likewise.
9323 2018-06-08 Martin Liska <mliska@suse.cz>
9325 * ipa-cp.c (ipcp_store_bits_results): Use
9326 ipcp_transformation_sum.
9327 (ipcp_store_vr_results): Likewise.
9328 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9330 (ipcp_transformation_initialize): ... this.
9331 (ipa_set_node_agg_value_chain):
9332 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9333 (write_ipcp_transformation_info): Likewise.
9334 (read_ipcp_transformation_info): Likewise.
9335 (ipcp_update_bits): Likewise.
9336 (ipcp_update_vr): Likewise.
9337 (ipcp_transform_function): Likewise.
9338 * ipa-prop.h: Rename ipcp_transformation_summary to
9339 ipcp_transformation.
9340 (class ipcp_transformation_t): New function summary.
9341 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9342 (ipa_get_agg_replacements_for_node): Likewise.
9344 2018-06-08 Martin Liska <mliska@suse.cz>
9346 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9348 (class funct_state_summary_t): New function_summary class.
9349 (has_function_state): Remove.
9350 (get_function_state): Likewise.
9351 (set_function_state): Likewise.
9352 (add_new_function): Likewise.
9353 (funct_state_summary_t::insert): New function.
9354 (duplicate_node_data): Remove.
9355 (remove_node_data): Remove.
9356 (funct_state_summary_t::duplicate): New function.
9357 (register_hooks): Create new funct_state_summaries.
9358 (pure_const_generate_summary): Use it.
9359 (pure_const_write_summary): Likewise.
9360 (pure_const_read_summary): Likewise.
9361 (propagate_pure_const): Likewise.
9362 (propagate_nothrow): Likewise.
9363 (dump_malloc_lattice): Likewise.
9364 (propagate_malloc): Likewise.
9365 (execute): Do not register hooks, just remove summary
9367 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9370 2018-06-08 Martin Liska <mliska@suse.cz>
9372 * ipa-reference.c (remove_node_data): Remove.
9373 (duplicate_node_data): Likewise.
9374 (class ipa_ref_var_info_summary_t): New class.
9375 (class ipa_ref_opt_summary_t): Likewise.
9376 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9377 (get_reference_optimization_summary): Use
9378 ipa_ref_opt_sum_summaries.
9379 (set_reference_vars_info): Remove.
9380 (set_reference_optimization_summary): Likewise.
9381 (ipa_init): Create summaries.
9382 (init_function_info): Use function summary.
9383 (ipa_ref_opt_summary_t::duplicate): New function.
9384 (ipa_ref_opt_summary_t::remove): New function.
9385 (get_read_write_all_from_node): Fix GNU coding style.
9386 (propagate): Use function summary.
9387 (write_node_summary_p): Fix GNU coding style.
9388 (stream_out_bitmap): Likewise.
9389 (ipa_reference_read_optimization_summary): Use function summary.
9390 (ipa_reference_c_finalize): Do not release hooks.
9392 2018-06-08 Martin Liska <mliska@suse.cz>
9394 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9395 (analyze_function_body): Extract multiple calls of get_create.
9396 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9397 * ipa-inline.c (recursive_inlining): Use ::get method.
9398 * ipa-inline.h (estimate_edge_growth): Likewise.
9400 2018-06-08 Martin Liska <mliska@suse.cz>
9402 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9404 (hsa_function_summary::hsa_function_summary): Use the new enum
9406 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9407 * hsa-gen.c (hsa_get_host_function): Likewise.
9408 (get_brig_function_name): Likewise.
9409 * ipa-hsa.c (process_hsa_functions): Likewise.
9410 (ipa_hsa_write_summary): Likewise.
9411 * symbol-summary.h (symtab_duplication): Use ::get function/
9412 (get): New function.
9414 2018-06-08 Martin Liska <mliska@suse.cz>
9416 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9418 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9419 (hsa_register_kernel): Likewise.
9420 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9421 * hsa-gen.c (hsa_get_host_function): Likewise.
9422 (get_brig_function_name): Likewise.
9423 (generate_hsa): Likewise.
9424 (pass_gen_hsail::execute): Likewise.
9425 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9426 (devirtualization_time_bonus): Likewise.
9427 (ipcp_propagate_stage): Likewise.
9428 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9429 (edge_set_predicate): Likewise.
9430 (evaluate_conditions_for_known_args): Likewise.
9431 (evaluate_properties_for_edge): Likewise.
9432 (ipa_fn_summary::reset): Likewise.
9433 (ipa_fn_summary_t::duplicate): Likewise.
9434 (dump_ipa_call_summary): Likewise.
9435 (ipa_dump_fn_summary): Likewise.
9436 (analyze_function_body): Likewise.
9437 (compute_fn_summary): Likewise.
9438 (estimate_edge_devirt_benefit): Likewise.
9439 (estimate_edge_size_and_time): Likewise.
9440 (estimate_calls_size_and_time): Likewise.
9441 (estimate_node_size_and_time): Likewise.
9442 (inline_update_callee_summaries): Likewise.
9443 (remap_edge_change_prob): Likewise.
9444 (remap_edge_summaries): Likewise.
9445 (ipa_merge_fn_summary_after_inlining): Likewise.
9446 (ipa_update_overall_fn_summary): Likewise.
9447 (read_ipa_call_summary): Likewise.
9448 (inline_read_section): Likewise.
9449 (write_ipa_call_summary): Likewise.
9450 (ipa_fn_summary_write): Likewise.
9451 (ipa_free_fn_summary): Likewise.
9452 * ipa-hsa.c (process_hsa_functions): Likewise.
9453 (ipa_hsa_write_summary): Likewise.
9454 (ipa_hsa_read_section): Likewise.
9455 * ipa-icf.c (sem_function::merge): Likewise.
9456 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9457 (do_estimate_edge_time): Likewise.
9458 (estimate_size_after_inlining): Likewise.
9459 (estimate_growth): Likewise.
9460 (growth_likely_positive): Likewise.
9461 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9462 (inline_call): Likewise.
9463 * ipa-inline.c (caller_growth_limits): Likewise.
9464 (can_inline_edge_p): Likewise.
9465 (can_inline_edge_by_limits_p): Likewise.
9466 (compute_uninlined_call_time): Likewise.
9467 (compute_inlined_call_time): Likewise.
9468 (want_inline_small_function_p): Likewise.
9469 (edge_badness): Likewise.
9470 (update_caller_keys): Likewise.
9471 (update_callee_keys): Likewise.
9472 (recursive_inlining): Likewise.
9473 (inline_small_functions): Likewise.
9474 (inline_to_all_callers_1): Likewise.
9475 (dump_overall_stats): Likewise.
9476 (early_inline_small_functions): Likewise.
9477 (early_inliner): Likewise.
9478 * ipa-inline.h (estimate_edge_growth): Likewise.
9479 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9480 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9481 * ipa-prop.h (IPA_NODE_REF): Likewise.
9482 (IPA_EDGE_REF): Likewise.
9483 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9484 (propagate_malloc): Likewise.
9485 * ipa-split.c (execute_split_functions): Likewise.
9486 * symbol-summary.h: Rename get to get_create.
9488 (get_create): Likewise.
9489 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9491 2018-06-08 Martin Liska <mliska@suse.cz>
9493 * symbol-summary.h (release): Move definition out of class
9495 (symtab_removal): Likewise.
9496 (symtab_duplication): Likewise.
9498 2018-06-08 Martin Liska <mliska@suse.cz>
9500 * symbol-summary.h (function_summary): Move constructor
9501 implementation out of class declaration.
9502 (release): Likewise.
9503 (symtab_insertion): Likewise.
9504 (symtab_removal): Likewise.
9505 (symtab_duplication): Likewise.
9508 2018-06-08 Martin Liska <mliska@suse.cz>
9510 * Makefile.in: Remove support for MPX (macros, related functions,
9511 fields in cgraph_node, ...).
9512 * builtin-types.def (BT_BND): Likewise.
9513 (BT_FN_BND_CONST_PTR): Likewise.
9514 (BT_FN_CONST_PTR_BND): Likewise.
9515 (BT_FN_VOID_PTR_BND): Likewise.
9516 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9517 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9518 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9519 (expand_builtin_mempcpy_with_bounds): Likewise.
9520 (expand_builtin_memset_with_bounds): Likewise.
9521 (expand_builtin_memset_args): Likewise.
9522 (std_expand_builtin_va_start): Likewise.
9523 (expand_builtin): Likewise.
9524 (expand_builtin_with_bounds): Likewise.
9525 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9526 (DEF_LIB_BUILTIN_CHKP): Likewise.
9527 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9528 (DEF_CHKP_BUILTIN): Likewise.
9529 (BUILT_IN_MEMCPY): Likewise.
9530 (BUILT_IN_MEMMOVE): Likewise.
9531 (BUILT_IN_MEMPCPY): Likewise.
9532 (BUILT_IN_MEMSET): Likewise.
9533 (BUILT_IN_STPCPY): Likewise.
9534 (BUILT_IN_STRCAT): Likewise.
9535 (BUILT_IN_STRCHR): Likewise.
9536 (BUILT_IN_STRCPY): Likewise.
9537 (BUILT_IN_STRLEN): Likewise.
9538 (BUILT_IN_MEMCPY_CHK): Likewise.
9539 (BUILT_IN_MEMMOVE_CHK): Likewise.
9540 (BUILT_IN_MEMPCPY_CHK): Likewise.
9541 (BUILT_IN_MEMSET_CHK): Likewise.
9542 (BUILT_IN_STPCPY_CHK): Likewise.
9543 (BUILT_IN_STRCAT_CHK): Likewise.
9544 (BUILT_IN_STRCPY_CHK): Likewise.
9545 * calls.c (store_bounds): Likewise.
9546 (emit_call_1): Likewise.
9547 (special_function_p): Likewise.
9548 (maybe_warn_nonstring_arg): Likewise.
9549 (initialize_argument_information): Likewise.
9550 (finalize_must_preallocate): Likewise.
9551 (compute_argument_addresses): Likewise.
9552 (expand_call): Likewise.
9553 * cfgexpand.c (expand_call_stmt): Likewise.
9554 (expand_return): Likewise.
9555 (expand_gimple_stmt_1): Likewise.
9556 (pass_expand::execute): Likewise.
9557 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9558 (cgraph_node::remove): Likewise.
9559 (cgraph_node::dump): Likewise.
9560 (cgraph_node::verify_node): Likewise.
9561 * cgraph.h (chkp_function_instrumented_p): Likewise.
9562 (symtab_node::get_alias_target): Likewise.
9563 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9564 (cgraph_local_p): Likewise.
9565 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9566 (cgraph_edge::rebuild_references): Likewise.
9567 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9568 (walk_polymorphic_call_targets): Likewise.
9569 (cgraph_node::expand_thunk): Likewise.
9570 (symbol_table::output_weakrefs): Likewise.
9571 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9572 (ix86_handle_option): Likewise.
9573 * config/i386/constraints.md: Likewise.
9574 * config/i386/i386-builtin-types.def (BND): Likewise.
9578 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9579 (BDESC_FIRST): Likewise.
9581 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9582 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9583 * config/i386/i386.c (enum reg_class): Likewise.
9584 (ix86_target_string): Likewise.
9585 (ix86_option_override_internal): Likewise.
9586 (ix86_conditional_register_usage): Likewise.
9587 (ix86_valid_target_attribute_inner_p): Likewise.
9588 (ix86_set_indirect_branch_type): Likewise.
9589 (ix86_set_current_function): Likewise.
9590 (ix86_function_arg_regno_p): Likewise.
9591 (init_cumulative_args): Likewise.
9592 (ix86_function_arg_advance): Likewise.
9593 (ix86_function_arg): Likewise.
9594 (ix86_pass_by_reference): Likewise.
9595 (ix86_function_value_regno_p): Likewise.
9596 (ix86_function_value_1): Likewise.
9597 (ix86_function_value_bounds): Likewise.
9598 (ix86_return_in_memory): Likewise.
9599 (ix86_setup_incoming_vararg_bounds): Likewise.
9600 (ix86_va_start): Likewise.
9601 (indirect_thunk_need_prefix): Likewise.
9602 (print_reg): Likewise.
9603 (ix86_print_operand): Likewise.
9604 (ix86_expand_call): Likewise.
9605 (ix86_output_function_return): Likewise.
9606 (reg_encoded_number): Likewise.
9607 (BDESC_VERIFYS): Likewise.
9608 (ix86_init_mpx_builtins): Likewise.
9609 (ix86_init_builtins): Likewise.
9610 (ix86_emit_cmove): Likewise.
9611 (ix86_emit_move_max): Likewise.
9612 (ix86_expand_builtin): Likewise.
9613 (ix86_builtin_mpx_function): Likewise.
9614 (ix86_get_arg_address_for_bt): Likewise.
9615 (ix86_load_bounds): Likewise.
9616 (ix86_store_bounds): Likewise.
9617 (ix86_load_returned_bounds): Likewise.
9618 (ix86_store_returned_bounds): Likewise.
9619 (ix86_class_likely_spilled_p): Likewise.
9620 (ix86_hard_regno_mode_ok): Likewise.
9621 (x86_order_regs_for_local_alloc): Likewise.
9622 (ix86_mitigate_rop): Likewise.
9623 (ix86_bnd_prefixed_insn_p): Likewise.
9624 (ix86_mpx_bound_mode): Likewise.
9625 (ix86_make_bounds_constant): Likewise.
9626 (ix86_initialize_bounds): Likewise.
9627 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9628 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9629 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9630 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9631 (TARGET_CHKP_BOUND_MODE): Likewise.
9632 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9633 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9634 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9635 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9636 * config/i386/i386.h (TARGET_MPX): Likewise.
9637 (TARGET_MPX_P): Likewise.
9638 (VALID_BND_REG_MODE): Likewise.
9639 (FIRST_BND_REG): Likewise.
9640 (LAST_BND_REG): Likewise.
9641 (enum reg_class): Likewise.
9642 (BND_REG_P): Likewise.
9643 (BND_REGNO_P): Likewise.
9644 (BNDmode): Likewise.
9645 (ADJUST_INSN_LENGTH): Likewise.
9646 * config/i386/i386.md: Likewise.
9647 * config/i386/i386.opt: Likewise.
9648 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9649 (defined): Likewise.
9650 (LINK_MPX): Likewise.
9651 (MPX_SPEC): Likewise.
9652 (LIBMPX_SPEC): Likewise.
9653 (LIBMPXWRAPPERS_SPEC): Likewise.
9654 (CHKP_SPEC): Likewise.
9655 * config/i386/predicates.md: Likewise.
9656 * dbxout.c (dbxout_type): Likewise.
9657 * doc/extend.texi: Likewise.
9658 * doc/invoke.texi: Likewise.
9659 * doc/md.texi: Likewise.
9660 * doc/tm.texi: Likewise.
9661 * doc/tm.texi.in: Likewise.
9662 * dwarf2out.c (is_base_type): Likewise.
9663 (gen_formal_types_die): Likewise.
9664 (gen_subprogram_die): Likewise.
9665 (gen_type_die_with_usage): Likewise.
9666 (gen_decl_die): Likewise.
9667 (dwarf2out_late_global_decl): Likewise.
9668 * expr.c (expand_assignment): Likewise.
9669 (emit_storent_insn): Likewise.
9670 (store_expr_with_bounds): Likewise.
9671 (store_expr): Likewise.
9672 (expand_expr_real_1): Likewise.
9673 * expr.h (store_expr_with_bounds): Likewise.
9674 * function.c (use_register_for_decl): Likewise.
9675 (struct bounds_parm_data): Likewise.
9676 (assign_parms_augmented_arg_list): Likewise.
9677 (assign_parm_find_entry_rtl): Likewise.
9678 (assign_parm_is_stack_parm): Likewise.
9679 (assign_parm_load_bounds): Likewise.
9680 (assign_bounds): Likewise.
9681 (assign_parms): Likewise.
9682 (expand_function_start): Likewise.
9683 * gcc.c (CHKP_SPEC): Likewise.
9684 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9685 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9686 (wrestrict_dom_walker::check_call): Likewise.
9687 * gimple.c (gimple_build_call_from_tree): Likewise.
9688 * gimple.h (enum gf_mask): Likewise.
9689 (gimple_call_with_bounds_p): Likewise.
9690 (gimple_call_set_with_bounds): Likewise.
9691 * gimplify.c (gimplify_init_constructor): Likewise.
9692 * ipa-cp.c (initialize_node_lattices): Likewise.
9693 (propagate_constants_across_call): Likewise.
9694 (find_more_scalar_values_for_callers_subset): Likewise.
9695 * ipa-hsa.c (process_hsa_functions): Likewise.
9696 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9697 * ipa-icf.c (sem_function::merge): Likewise.
9698 * ipa-inline.c (early_inliner): Likewise.
9699 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9700 (warn_function_cold): Likewise.
9701 (propagate_pure_const): Likewise.
9702 * ipa-ref.h (enum GTY): Likewise.
9703 * ipa-split.c (find_retbnd): Likewise.
9704 (consider_split): Likewise.
9705 (split_function): Likewise.
9706 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9707 * ipa.c (walk_polymorphic_call_targets): Likewise.
9708 (symbol_table::remove_unreachable_nodes): Likewise.
9709 (process_references): Likewise.
9710 (cgraph_build_static_cdtor_1): Likewise.
9711 * lto-cgraph.c (lto_output_node): Likewise.
9712 (output_refs): Likewise.
9713 (compute_ltrans_boundary): Likewise.
9714 (input_overwrite_node): Likewise.
9715 (input_node): Likewise.
9716 (input_cgraph_1): Likewise.
9717 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9718 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9719 (class pass_chkp_instrumentation_passes): Likewise.
9720 (make_pass_chkp_instrumentation_passes): Likewise.
9721 * passes.def: Likewise.
9722 * rtl.h (struct GTY): Likewise.
9723 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9724 * stor-layout.c (layout_type): Likewise.
9725 * symtab.c: Likewise.
9726 * target.def: Likewise.
9727 * targhooks.c (default_chkp_bound_type): Likewise.
9728 (default_chkp_bound_mode): Likewise.
9729 (default_builtin_chkp_function): Likewise.
9730 (default_chkp_function_value_bounds): Likewise.
9731 (default_chkp_make_bounds_constant): Likewise.
9732 (default_chkp_initialize_bounds): Likewise.
9733 * targhooks.h (default_chkp_bound_type): Likewise.
9734 (default_chkp_bound_mode): Likewise.
9735 (default_builtin_chkp_function): Likewise.
9736 (default_chkp_function_value_bounds): Likewise.
9737 (default_chkp_make_bounds_constant): Likewise.
9738 (default_chkp_initialize_bounds): Likewise.
9739 * toplev.c (compile_file): Likewise.
9740 (process_options): Likewise.
9741 * tree-core.h (DEF_BUILTIN): Likewise.
9742 (DEF_BUILTIN_CHKP): Likewise.
9743 * tree-inline.c (declare_return_variable): Likewise.
9744 (remap_gimple_stmt): Likewise.
9745 (copy_bb): Likewise.
9746 (initialize_inlined_parameters): Likewise.
9747 (expand_call_inline): Likewise.
9748 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9749 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9750 (make_pass_ipa_chkp_produce_thunks): Likewise.
9751 (make_pass_chkp): Likewise.
9752 (make_pass_chkp_opt): Likewise.
9753 (make_pass_chkp_instrumentation_passes): Likewise.
9754 * tree-pretty-print.c (dump_generic_node): Likewise.
9755 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9756 * tree-ssa-dce.c (propagate_necessity): Likewise.
9757 (eliminate_unnecessary_stmts): Likewise.
9758 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9759 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9760 * tree-ssa-sccvn.h: Likewise.
9761 * tree-ssa-strlen.c (get_string_length): Likewise.
9762 (valid_builtin_call): Likewise.
9763 (adjust_last_stmt): Likewise.
9764 (handle_builtin_strchr): Likewise.
9765 (handle_builtin_strcpy): Likewise.
9766 (handle_builtin_stxncpy): Likewise.
9767 (handle_builtin_memcpy): Likewise.
9768 (handle_builtin_strcat): Likewise.
9769 (strlen_check_and_optimize_stmt): Likewise.
9770 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9771 * tree-streamer-in.c: Likewise.
9772 * tree-streamer.c (record_common_node): Likewise.
9773 * tree.c (tree_code_size): Likewise.
9774 (wide_int_to_tree_1): Likewise.
9775 (type_contains_placeholder_1): Likewise.
9776 (build_common_tree_nodes): Likewise.
9777 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9778 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9779 (POINTER_BOUNDS_P): Likewise.
9780 (BOUNDED_TYPE_P): Likewise.
9781 (BOUNDED_P): Likewise.
9782 (CALL_WITH_BOUNDS_P): Likewise.
9783 (pointer_bounds_type_node): Likewise.
9784 * value-prof.c (gimple_ic): Likewise.
9785 * var-tracking.c (vt_add_function_parameters): Likewise.
9786 * varasm.c (make_decl_rtl): Likewise.
9787 (assemble_start_function): Likewise.
9788 (output_constant): Likewise.
9789 (maybe_assemble_visibility): Likewise.
9790 * varpool.c (ctor_for_folding): Likewise.
9791 * chkp-builtins.def: Remove.
9792 * ipa-chkp.c: Remove.
9793 * ipa-chkp.h: Remove.
9794 * rtl-chkp.c: Remove.
9795 * rtl-chkp.h: Remove.
9796 * tree-chkp-opt.c: Remove.
9797 * tree-chkp.c: Remove.
9798 * tree-chkp.h: Remove.
9800 2018-06-07 Carl Love <cel@us.ibm.com>
9802 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9803 vextract_fp_from_shortl): Add BE support.
9805 2018-06-07 Paul Koning <ni1d@arrl.net>
9807 * compare-elim.c (try_merge_compare): Don't merge compare if
9808 address contains a side effect.
9809 (try_eliminate_compare): Likewise.
9811 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9813 * config.gcc: Support "tremont".
9814 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9815 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9817 * config/i386/i386.c (m_TREMONT): Define.
9818 (processor_target_table): Add "tremont".
9819 (PTA_TREMONT): Define.
9820 (ix86_lea_outperforms): Add TARGET_TREMONT.
9821 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9822 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9823 and M_INTEL_GOLDMONT_PLUS.
9824 (fold_builtin_cpu): Add "tremont".
9825 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9826 (ix86_option_override_internal): Add "tremont".
9827 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9828 (processor_type): Add PROCESSOR_TREMONT.
9829 * config/i386/x86-tune.def: Add m_TREMONT.
9830 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9832 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9834 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9835 symbol defined for msp430i* devices to be lower case.
9837 2018-06-07 Richard Biener <rguenther@suse.de>
9839 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9840 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9841 Properly wrap signed arithmetic if overflow wraps.
9843 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9845 PR tree-optimization/69615
9846 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9847 of a cast from a same precision integral SSA_NAME in a bb dominated
9848 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9849 cast to utype if rhs2 has already a compatible type.
9851 2018-06-07 Richard Biener <rguenther@suse.de>
9853 PR tree-optimization/85935
9854 * graphite-scop-detection.c (find_params_in_bb): Analyze
9855 condition operands with respect to the correct loop. Assert
9856 the analysis doesn't fail.
9858 2018-06-04 Carl Love <cel@us.ibm.com>
9860 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9861 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9862 as it is slightly cheaper.
9863 (first_match_or_eos_index_<mode>):
9864 Calculate index using natural element order.
9865 (first_match_index_<mode>):
9866 Calculate index using natural element order.
9867 (first_match_or_eos_index_<mode>):
9868 Calculate index using natural order.
9869 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9870 for BE and LE modes.
9871 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9872 P9V_BUILTIN_VCLZLSBB_V16QI.
9873 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9876 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9878 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9879 indentation and line wrap for many prototypes. Add missing
9880 @smallexample directives around block of prototypes for vec_xl and
9883 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9885 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9886 track if we pass or return IEEE 128-bit floating point.
9887 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9888 C++ mangling that is compatible with GCC 8.1.
9889 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9890 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9891 floating point types.
9892 (rs6000_function_arg_advance_1): Likewise.
9893 (rs6000_mangle_type): Optionally generate mangled names that match
9894 what GCC 8.1 generated for IEEE 128-bit floating point types.
9895 (rs6000_globalize_decl_name): If we have an external function that
9896 passes or returns IEEE 128-bit types, generate a weak reference
9897 from the mangled name used in GCC 8.1 to the current mangled
9899 (rs6000_init_builtins): Make __ibm128 use the long double type if
9900 long double is IBM extended double. Make __float128 use the long
9901 double type if long double is IEEE 128-bit.
9904 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9905 macro for __ibm128 built-in functions.
9906 (PACK_IF): Add __ibm128 pack/unpack functions.
9907 (UNPACK_IF): Likewise.
9908 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9909 enable long double built-in functions if long double is IEEE
9910 128-bit floating point.
9911 (rs6000_invalid_builtin): Update long double built-in function
9913 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9914 functions, adjust the built-in function to use the long double
9915 built-in function if __ibm128 and long double are the same type.
9916 * doc/extend.texi (PowerPC builtins): Update documention for
9917 __builtin_{,un}pack_longdouble. Add documentation for
9918 __builtin_{,un}pack_ibm128.
9920 2018-06-06 Jim Wilson <jimw@sifive.com>
9922 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9923 (struct machine_function): New field interrupt_mode.
9924 (riscv_handle_type_attribute): New function. Add forward declaration.
9925 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9926 (riscv_expand_epilogue): Check interrupt_mode field.
9927 (riscv_set_current_function): Check interrupt attribute args and
9928 set interrupt_mode field.
9929 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9930 (riscv_sret, riscv_uret): New.
9931 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9932 new arguments to interrupt attribute.
9934 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9937 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9938 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9940 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9942 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9943 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9944 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9945 several redundant entries.
9947 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9949 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9950 type from "rtx" to "rtx_insn *".
9951 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9952 for local "call_insn", removing cast.
9953 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9955 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9957 PR tree-optimization/86066
9958 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9959 for BIT_INSERT_EXPR stores.
9961 2018-06-06 Richard Biener <rguenther@suse.de>
9963 PR tree-optimization/86062
9964 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9965 component refs ontop
9966 of to be offsetted base.
9968 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9970 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9971 to be static and remove check on interrupt attribute name.
9973 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9975 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9976 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9978 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9981 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9983 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9984 Remove second argument, change how error is called.
9985 (aarch64_layout_arg): Remove second argument from
9986 aarch64_err_no_fpadvsimd call.
9987 (aarch64_init_cumulative_args): Ditto.
9988 (aarch64_gimplify_va_arg_expr): Ditto.
9989 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9991 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9993 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9994 (*simple_return_indirect_internal<mode>): Rename from
9995 simple_return_indirect_internal. Use W mode iterator.
9996 (rstorssp): New expander.
9997 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9998 (clrssbsy): New expander.
9999 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10001 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10003 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10005 (cmse_check_pointed_object): Likewise.
10007 2018-06-05 Martin Liska <mliska@suse.cz>
10009 PR gcov-profile/47618
10010 * doc/invoke.texi: Document how -fprofile-dir format
10013 2018-06-05 Richard Biener <rguenther@suse.de>
10015 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10016 removal pretend DOM info isn't available so we do not update
10017 it and only remove edges, not dominated blocks. Actually free
10018 DOM info in case we removed something. Remove unreachable blocks.
10019 (mfb_keep_latches): Work with either DOM info or marked backedges.
10020 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10021 first. Mark backedges if DOM info isn't available.
10022 (Re-)compute DOM info after cleanup_control_flow_pre.
10024 2018-06-05 Richard Biener <rguenther@suse.de>
10026 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10027 (locus_discrim_hasher::hash): Adjust.
10028 (locus_discrim_hasher::equal): Likewise.
10029 (next_discriminator_for_locus): Work on line directly.
10030 (same_line_p): Pass in expanded locus1 as well.
10031 (assign_discriminators): Avoid redundant location expansions.
10033 2018-06-05 Richard Biener <rguenther@suse.de>
10035 PR tree-optimization/86046
10036 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10037 if required after clearing TREE_ADDRESSABLE.
10039 2018-06-05 Richard Biener <rguenther@suse.de>
10041 PR tree-optimization/86047
10042 * tree-ssa-loop.c (for_each_index): Glob handling of all
10043 decls and constants and really handle all of them.
10045 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10048 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10049 qualifier_void_pointer and qualifier_const_void_pointer.
10050 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10051 (arm_init_builtins): Handle the above.
10052 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10053 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10054 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10057 2018-06-05 Martin Liska <mliska@suse.cz>
10059 * auto-profile.c (read_autofdo_file): Do not use
10060 gcov_ctr_summary struct.
10061 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10062 * coverage.c (struct counts_entry): Likewise.
10063 (read_counts_file): Read just single summary entry.
10064 (get_coverage_counts): Use gcov_summary struct.
10065 * coverage.h (get_coverage_counts): Likewise.
10066 * gcov-dump.c (dump_working_sets): Likewise.
10067 (tag_summary): Dump just single summary.
10068 * gcov-io.c (gcov_write_summary): Write just histogram
10070 (gcov_read_summary): Read just single summary.
10071 (compute_working_sets): Use gcov_summary struct.
10072 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10073 of GCOV_COUNTERS_SUMMABLE.
10074 (GCOV_COUNTERS_SUMMABLE): Remove.
10075 (GCOV_FIRST_VALUE_COUNTER): Replace with
10076 GCOV_COUNTER_V_INTERVAL.
10077 (struct gcov_ctr_summary): Remove.
10078 (struct gcov_summary): Directly use fields of former
10080 (compute_working_sets): Use gcov_summary struct.
10081 * gcov.c (read_count_file): Do not use ctrs fields.
10082 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10084 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10086 * profile.c: Likewise.
10087 * profile.h: Likewise.
10089 2018-06-05 Martin Liska <mliska@suse.cz>
10091 PR gcov-profile/84846
10092 * gcov.c (output_lines): Print working directory only
10093 in intermediate format.
10095 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10097 * config/s390/s390-builtin-types.def: Add void function type.
10098 * config/s390/s390-builtins.def: Use the function type for the
10101 2018-06-04 Jim Wilson <jimw@sifive.com>
10103 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10105 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10106 and maybe_eh_return. Change regno to unsigned int. Use new args to
10107 handle EH_RETURN_DATA_REGNO registers properly.
10108 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10109 (riscv_expand_epilogue): Update comment. Change argument name and
10110 type. Update code to use new name and type. Pass new args to
10111 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10113 * config/riscv/riscv.md (NORMAL_RETURN): New.
10114 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10115 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10116 (eh_return): Call gen_eh_return_internal and emit barrier.
10117 (eh_return_internal): Call riscv_expand_epilogue.
10119 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10121 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10122 bit_insertion field and declare can_be_merged_into method.
10123 (merged_store_group::can_be_merged_into): New method.
10124 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10125 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10126 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10128 2018-06-04 Richard Biener <rguenther@suse.de>
10130 PR tree-optimization/85955
10131 * builtins.c (fold_builtin_sincos): Convert pointers to
10132 destination to appropriate type before dereferencing.
10134 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10136 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10138 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10140 * expr.c (expand_expr_real_1): Force the operand into memory if
10141 its TYPE_MODE is BLKmode and if there is no integer mode for
10142 the number of bits being extracted.
10144 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10148 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10149 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10151 2018-06-04 Richard Biener <rguenther@suse.de>
10153 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10154 (cleanup_tree_cfg_noloop): ... single caller. Do
10155 start_recording_case_labels later.
10157 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10159 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10160 to _IMMINTRIN_H_INCLUDED.
10161 * config/i386/pconfigintrin.h: Ditto.
10162 * config/i386/waitpkgintrin.h: Ditto.
10163 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10164 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10165 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10166 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10167 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10168 waitpkgintrin.h and cldemoteintrin.h.
10170 2018-06-04 Richard Biener <rguenther@suse.de>
10172 PR tree-optimization/86038
10173 * tracer.c (find_best_successor): Check probability for
10174 being initialized, bail out if not.
10176 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10179 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10180 of bits to ignore when comparing architectures.
10182 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10184 PR tree-optimization/69615
10185 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10186 maximum or minimum of the type, try to merge it also as if
10187 range1 is + [-, x - 1] or + [x + 1, -].
10190 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10192 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10194 PR tree-optimization/86034
10195 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10196 the unsigned bitfield type in a bit insertion sequence if it does not
10197 have a larger precision than the bitfield size.
10198 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10200 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10202 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10204 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10206 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10207 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10208 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10209 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10211 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10213 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10214 Disable -fdelete-null-pointer-checks for ELF toolchain.
10216 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10217 Kito Cheng <kito.cheng@gmail.com>
10219 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10220 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10221 (nds32*-*-*): Add glibc and uclibc conditions.
10222 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10223 (TARGET_EXCEPT_UNWIND_INFO): Define.
10224 * config/nds32/elf.h: New file.
10225 * config/nds32/linux.h: New file.
10226 * config/nds32/nds32-elf.opt: New file.
10227 * config/nds32/nds32-linux.opt: New file.
10228 * config/nds32/nds32-fp-as-gp.c
10229 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10230 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10232 (nds32_asm_file_end): Ditto.
10233 (nds32_print_operand): Ditto.
10234 (nds32_insert_attributes): Ditto.
10235 (nds32_init_libfuncs): New function.
10236 (TARGET_HAVE_TLS): Define.
10237 (TARGET_INIT_LIBFUNCS): Define.
10238 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10240 (TARGET_ELF): Apply different mcmodel setting.
10241 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10242 been migrated into elf.h and linux.h files.
10243 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10244 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10245 (mcmodel): The content has been migrated into nds32-elf.opt and
10246 nds32-linux.opt files.
10247 * config/nds32/t-elf: New file.
10248 * config/nds32/t-linux: New file.
10250 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10251 Shiva Chen <shiva0217@gmail.com>
10253 * config/nds32/constants.md (unspec_volatile_element): Add
10254 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10255 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10257 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10258 (make_pass_nds32_fp_as_gp): Declare.
10259 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10261 (nds32_asm_function_end_prologue): Remove unused asm output.
10262 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10263 (nds32_asm_file_start): Output necessary fp_as_gp information.
10264 (nds32_option_override): Adjust register usage.
10265 (nds32_expand_prologue): Consider fp_as_gp situation.
10266 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10267 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10270 (simple_return): Ditto.
10271 (omit_fp_begin): Output special directive for fp_as_gp.
10272 (omit_fp_end): Output special directive for fp_as_gp.
10273 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10274 mforbid-fp-as-gp): New options.
10276 2018-06-01 Mark Wielaard <mark@klomp.org>
10278 * dwarf2out.c (dwarf2out_finish): Remove generation of
10279 DW_AT_loclists_base.
10281 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10283 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10284 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10285 (struct merged_store_group): Add bit_insertion field.
10286 (dump_char_array): Use standard hexadecimal format.
10287 (merged_store_group::merged_store_group): Set bit_insertion to false.
10288 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10289 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10290 also print the mask in the dump file.
10291 (pass_store_merging::gate): Minor tweak.
10292 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10293 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10294 stores with INTEGER_CST stores.
10295 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10296 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10297 and use it throughout. Generate bit insertion sequences if need be.
10298 (pass_store_merging::process_store): Remove redundant condition.
10299 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10301 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10303 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10304 the 128-bit floating point types. Fix function comment.
10306 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10308 * config/aarch64/aarch64-simd.md
10309 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10311 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10314 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10316 PR tree-optimization/85989
10317 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10319 (backprop::intersect_uses): Check it when deciding whether this
10320 is a backedge reference.
10321 (backprop::process_block): Add each phi to m_visited_phis
10322 after visiting it, then clear it at the end.
10324 2018-06-01 Richard Biener <rguenther@suse.de>
10326 * tree-vectorizer.h (vect_dr_stmt): New function.
10327 (vect_get_load_cost): Adjust.
10328 (vect_get_store_cost): Likewise.
10329 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10330 Use vect_dr_stmt instead of DR_SMTT.
10331 (vect_record_base_alignments): Likewise.
10332 (vect_calculate_target_alignment): Likewise.
10333 (vect_compute_data_ref_alignment): Likewise and make static.
10334 (vect_update_misalignment_for_peel): Likewise.
10335 (vect_verify_datarefs_alignment): Likewise.
10336 (vector_alignment_reachable_p): Likewise.
10337 (vect_get_data_access_cost): Likewise. Pass down
10338 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10339 (vect_get_peeling_costs_all_drs): Likewise.
10340 (vect_peeling_hash_get_lowest_cost): Likewise.
10341 (vect_enhance_data_refs_alignment): Likewise.
10342 (vect_find_same_alignment_drs): Likewise.
10343 (vect_analyze_data_refs_alignment): Likewise.
10344 (vect_analyze_group_access_1): Likewise.
10345 (vect_analyze_group_access): Likewise.
10346 (vect_analyze_data_ref_access): Likewise.
10347 (vect_analyze_data_ref_accesses): Likewise.
10348 (vect_vfa_segment_size): Likewise.
10349 (vect_small_gap_p): Likewise.
10350 (vectorizable_with_step_bound_p): Likewise.
10351 (vect_prune_runtime_alias_test_list): Likewise.
10352 (vect_analyze_data_refs): Likewise.
10353 (vect_supportable_dr_alignment): Likewise.
10354 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10355 (vect_gen_prolog_loop_niters): Likewise.
10356 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10357 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10359 (vect_recog_mask_conversion_pattern): Likewise.
10360 (vect_try_gather_scatter_pattern): Likewise.
10361 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10362 to vect_get_store_cost.
10363 (vect_get_store_cost): Get stmt_info instead of DR.
10364 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10365 (vect_get_load_cost): Get stmt_info instead of DR.
10367 2018-06-01 Richard Biener <rguenther@suse.de>
10369 PR middle-end/86017
10370 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10371 vars wrapped in MEM_REFs.
10373 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10375 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10376 Fix subreg tests so that we only return a choice between
10377 GENERAL_REGS and FP_REGS if the original classes included both.
10379 2018-06-01 Richard Biener <rguenther@suse.de>
10382 * tree-ssa-structalias.c (get_function_part_constraint):
10383 Handle NULL fi->decl.
10384 (find_func_aliases_for_call): Properly handle indirect
10385 fi from direct call.
10386 (find_func_clobbers): Likewise.
10387 (ipa_pta_execute): Likewise.
10388 (create_variable_info_for): For functions that are ifunc_resolver
10389 resolve to a varinfo that contains the result of the resolver call.
10390 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10393 2018-05-31 Michael Collison <michael.collison@arm.com>
10395 * config/aarch64/aarch64.md:
10396 (*fix_to_zero_extenddfdi2): New pattern.
10397 * gcc.target/aarch64/fix_extend1.c: New testcase.
10399 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10401 PR middle-end/78809
10402 PR middle-end/83026
10403 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10404 and BUILT_IN_STRNCMP_EQ.
10405 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10406 BUILT_IN_STRNCMP_EQ.
10407 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10408 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10409 (gimple_fold_builtin): Likewise.
10410 * tree-ssa-strlen.c (compute_string_length): New function.
10411 (determine_min_obsize): New function.
10412 (handle_builtin_string_cmp): New function to handle calls to
10413 string compare functions.
10414 (strlen_optimize_stmt): Add handling to builtin string compare
10416 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10417 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10418 * tree.c (build_common_builtin_nodes): Add new defines of
10419 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10421 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10424 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10425 functions with naked attribute.
10427 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10429 * config/i386/sse.md (avx_vec_concat<mode>):
10430 Substitute concat_tg_mode mode attribute with xtg_mode.
10431 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10432 (concat_tg_mode): Remove mode attribute.
10434 2018-05-31 Martin Sebor <msebor@redhat.com>
10437 * calls.c (alloc_max_size): Correct a logic error/typo.
10438 Treat excessive arguments as infinite. Warn for invalid arguments.
10439 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10441 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10444 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10445 and movx for Haswell.
10447 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10448 Cesar Philippidis <cesar@codesourcery.com>
10450 PR middle-end/85879
10451 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10452 when emitting error on private/firstprivate reductions.
10453 * omp-low.c (lower_omp_target): Avoid reference-type processing
10454 on pointers for firstprivate clause.
10456 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10458 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10461 * config/aarch64/aarch64-simd.md
10462 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10463 (aarch64_ld1_x3_<mode>): Likewise
10464 (aarch64_st1x2<VALLDIF:mode>): Likewise
10465 (aarch64_st1_x2_<mode>): Likewise
10466 (aarch64_st1x3<VALLDIF:mode>): Likewise
10467 (aarch64_st1_x3_<mode>): Likewise
10468 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10469 (vld1_s8_x3): Likewise.
10470 (vld1_u16_x3): Likewise.
10471 (vld1_s16_x3): Likewise.
10472 (vld1_u32_x3): Likewise.
10473 (vld1_s32_x3): Likewise.
10474 (vld1_u64_x3): Likewise.
10475 (vld1_s64_x3): Likewise.
10476 (vld1_f16_x3): Likewise.
10477 (vld1_f32_x3): Likewise.
10478 (vld1_f64_x3): Likewise.
10479 (vld1_p8_x3): Likewise.
10480 (vld1_p16_x3): Likewise.
10481 (vld1_p64_x3): Likewise.
10482 (vld1q_u8_x3): Likewise.
10483 (vld1q_s8_x3): Likewise.
10484 (vld1q_u16_x3): Likewise.
10485 (vld1q_s16_x3): Likewise.
10486 (vld1q_u32_x3): Likewise.
10487 (vld1q_s32_x3): Likewise.
10488 (vld1q_u64_x3): Likewise.
10489 (vld1q_s64_x3): Likewise.
10490 (vld1q_f16_x3): Likewise.
10491 (vld1q_f32_x3): Likewise.
10492 (vld1q_f64_x3): Likewise.
10493 (vld1q_p8_x3): Likewise.
10494 (vld1q_p16_x3): Likewise.
10495 (vld1q_p64_x3): Likewise.
10496 (vst1_s64_x2): Likewise.
10497 (vst1_u64_x2): Likewise.
10498 (vst1_f64_x2): Likewise.
10499 (vst1_s8_x2): Likewise.
10500 (vst1_p8_x2): Likewise.
10501 (vst1_s16_x2): Likewise.
10502 (vst1_p16_x2): Likewise.
10503 (vst1_s32_x2): Likewise.
10504 (vst1_u8_x2): Likewise.
10505 (vst1_u16_x2): Likewise.
10506 (vst1_u32_x2): Likewise.
10507 (vst1_f16_x2): Likewise.
10508 (vst1_f32_x2): Likewise.
10509 (vst1_p64_x2): Likewise.
10510 (vst1q_s8_x2): Likewise.
10511 (vst1q_p8_x2): Likewise.
10512 (vst1q_s16_x2): Likewise.
10513 (vst1q_p16_x2): Likewise.
10514 (vst1q_s32_x2): Likewise.
10515 (vst1q_s64_x2): Likewise.
10516 (vst1q_u8_x2): Likewise.
10517 (vst1q_u16_x2): Likewise.
10518 (vst1q_u32_x2): Likewise.
10519 (vst1q_u64_x2): Likewise.
10520 (vst1q_f16_x2): Likewise.
10521 (vst1q_f32_x2): Likewise.
10522 (vst1q_f64_x2): Likewise.
10523 (vst1q_p64_x2): Likewise.
10524 (vst1_s64_x3): Likewise.
10525 (vst1_u64_x3): Likewise.
10526 (vst1_f64_x3): Likewise.
10527 (vst1_s8_x3): Likewise.
10528 (vst1_p8_x3): Likewise.
10529 (vst1_s16_x3): Likewise.
10530 (vst1_p16_x3): Likewise.
10531 (vst1_s32_x3): Likewise.
10532 (vst1_u8_x3): Likewise.
10533 (vst1_u16_x3): Likewise.
10534 (vst1_u32_x3): Likewise.
10535 (vst1_f16_x3): Likewise.
10536 (vst1_f32_x3): Likewise.
10537 (vst1_p64_x3): Likewise.
10538 (vst1q_s8_x3): Likewise.
10539 (vst1q_p8_x3): Likewise.
10540 (vst1q_s16_x3): Likewise.
10541 (vst1q_p16_x3): Likewise.
10542 (vst1q_s32_x3): Likewise.
10543 (vst1q_s64_x3): Likewise.
10544 (vst1q_u8_x3): Likewise.
10545 (vst1q_u16_x3): Likewise.
10546 (vst1q_u32_x3): Likewise.
10547 (vst1q_u64_x3): Likewise.
10548 (vst1q_f16_x3): Likewise.
10549 (vst1q_f32_x3): Likewise.
10550 (vst1q_f64_x3): Likewise.
10551 (vst1q_p64_x3): Likewise.
10553 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10555 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10556 user_label_prefix to name.
10558 * tree-core.h: Update comment about the format of NAME string
10559 passed to handler in attribute_spec.
10561 * config/msp430/msp430.md: Remove erroneous subreg expression from
10562 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10563 zero_extend{q,h}isi2.
10565 2018-05-30 Borislav Petkov <bp@suse.de>
10567 * doc/extend.texi: Document some architecture specific
10568 constraints and sort entries.
10570 2018-05-30 Martin Sebor <msebor@redhat.com>
10572 PR middle-end/85369
10573 * builtins.c (expand_builtin_stpcpy_1): New function.
10574 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10575 only if the former succeeds.
10577 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10579 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10582 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10584 * doc/invoke.texi (-flinker-output): Document
10586 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10588 * passes.c (ipa_write_summaries): Only modify statements if body
10590 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10591 incrementally linking.
10592 (ipa_passes): Likewise.
10593 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10594 pass down resolution info.
10595 * common.opt (flag_incremental_link): Update info.
10596 * gcc.c (plugin specs): Turn flinker-output=* to
10597 -plugin-opt=-linker-output-known
10598 * toplev.c (compile_file): Also cut compilation when doing incremental
10600 * flag-types. (enum lto_partition_model): Add
10601 LTO_LINKER_OUTPUT_NOLTOREL.
10602 (invoke.texi): Add -flinker-output docs.
10603 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10604 link same way as WPA; do not stream in dead initializers.
10606 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10607 darf2out_register_external_decl): Support incremental link.
10609 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10611 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10613 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10615 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10616 it down to simple_object_copy_lto_debug_sections.
10617 (run_gcc): Determine incremental LTO link time and configure
10618 lto1 into non-wpa mode, disable renaming of debug sections.
10620 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10622 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10623 descriptions of various incorrectly documented functions.
10625 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10628 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10629 address check not strict.
10631 2018-05-30 Richard Biener <rguenther@suse.de>
10633 PR tree-optimization/85964
10634 * tracer.c (better_p): Drop initialized count check, we only
10635 call the function with initialized counts now.
10636 (find_best_successor): Do find a best edge if one
10637 has uninitialized count.
10638 (find_best_predecessor): Likewise. Do BB frequency check only
10639 if count is initialized.
10641 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10643 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10644 (aarch64_ldrstr_offset_compare): New.
10645 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10646 load/store orderings.
10647 (aarch64_gen_adjusted_ldpstp): Likewise.
10649 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10651 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10652 Check for subset of GENERAL_REGS and FP_REGS.
10653 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10656 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10658 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10659 and wi::to_poly_offset. Add the current offset and then check
10660 whether the sum fits, rather than using an unchecked addition of
10661 a checked term. Check for a shwi rather than a uhwi.
10662 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10663 (store_constructor): Use poly_int_tree_p.
10664 (expand_expr_real_1): Likewise.
10665 * function.c (assign_temp): Likewise.
10666 * fold-const.c (const_binop): Use poly_int_tree_p and
10667 wi::to_poly_offset.
10668 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10670 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10671 to_poly_offset for MEM offsets.
10672 * ipa-icf.c (sem_variable::equals): Likewise.
10673 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10674 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10675 wi::to_poly_offset for BIT_FIELD_REF offsets.
10676 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10677 wi::to_poly_offset.
10678 * var-tracking.c (emit_note_insn_var_location): Use
10679 tree_to_poly_uint64.
10681 2018-05-29 Jim Wilson <jimw@sifive.com>
10683 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10685 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10688 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10689 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10691 (sse4_1_round<mode>2): Use nonimmediate_operand
10692 for operand 1 predicate.
10694 2018-05-29 Martin Sebor <msebor@redhat.com>
10695 Richard Biener <rguenther@suse.de>
10698 * calls.c (get_size_range): Call determine_value_range instead
10699 of get_value_range..
10700 * tree-vrp.h (determine_value_range): Declared new function.
10701 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10703 2018-05-29 Richard Biener <rguenther@suse.de>
10705 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10706 sure to use non-pattern stmts for get_earlier_stmt arguments.
10707 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10708 called on pattern stmts.
10709 (get_later_stmt): Likewise.
10711 2018-05-29 Martin Liska <mliska@suse.cz>
10713 PR gcov-profile/85759
10714 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10717 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10719 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10721 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10725 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10726 VEC_PACK_FLOAT_EXPR): New tree codes.
10727 * tree-pretty-print.c (op_code_prio): Handle
10728 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10729 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10730 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10731 * tree-inline.c (estimate_operator_cost): Likewise.
10732 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10733 * fold-const.c (const_binop): Likewise.
10734 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10735 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10736 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10737 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10738 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10739 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10740 * expr.c (expand_expr_real_2): Likewise.
10741 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10742 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10743 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10745 * optabs.c (expand_widen_pattern_expr): For
10746 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10747 sign from result type rather than operand's type.
10748 (expand_binop_directly): For vec_packu_float_optab and
10749 vec_packs_float_optab allow result type to be different from operand's
10751 * optabs-tree.c (optab_for_tree_code): Handle
10752 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10753 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10754 * tree-vect-generic.c (expand_vector_operations_1): Handle
10755 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10756 VEC_PACK_FLOAT_EXPR.
10757 * tree-vect-stmts.c (supportable_widening_operation): Handle
10759 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10760 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10761 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10762 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10763 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10765 (vec_pack<floatprefix>_float_<mode>): New expander.
10766 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10768 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10769 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10770 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10771 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10772 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10774 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10775 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10776 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10777 VEC_PACK_FLOAT_EXPR): Document.
10779 2018-05-29 Richard Biener <rguenther@suse.de>
10781 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10783 (stmt_vec_info_vec): Make pointer.
10784 (init_stmt_vec_info_vec): Remove.
10785 (free_stmt_vec_info_vec): Likewise.
10786 (set_stmt_vec_info_vec): New function.
10787 (free_stmt_vec_infos): Likewise.
10788 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10789 (set_vinfo_for_stmt): Likewise.
10790 (get_earlier_stmt): Likewise.
10791 (get_later_stmt): Likewise.
10792 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10793 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10794 (vec_info::~vec_info): Free stmt_vec_infos.
10795 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10796 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10797 (pass_slp_vectorize::execute): Likewise.
10798 * tree-vect-stmts.c (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 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10803 the global stmt_vec_info_vec.
10804 * tree-parloops.c (gather_scalar_reductions): Use
10805 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10808 2018-05-29 Richard Biener <rguenther@suse.de>
10810 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10812 2018-05-29 Martin Liska <mliska@suse.cz>
10813 David Malcolm <dmalcolm@redhat.com>
10815 * vec.c (test_reverse): New.
10816 (vec_c_tests): Add new test.
10817 * vec.h (vl_ptr>::reverse): New function.
10819 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10821 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10823 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10826 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10828 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10830 2018-05-28 Richard Biener <rguenther@suse.de>
10832 PR tree-optimization/85933
10833 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10834 look at stmts marked as vectorizable.
10836 2018-05-28 Richard Biener <rguenther@suse.de>
10838 PR tree-optimization/85934
10839 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10840 vector boolean check before scalar optimization.
10842 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10844 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10847 2018-05-28 Mark Wielaard <mark@klomp.org>
10849 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10850 if it is an expression containing a minus sign.
10852 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10854 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10856 2018-05-27 Paul Koning <ni1d@arrl.net>
10858 * config/pdp11/pdp11.md (truncsihi2): Remove.
10860 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10861 Chung-Ju Wu <jasonwucj@gmail.com>
10863 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10865 (unaligned_store_dw): Ditto.
10866 * config/nds32/nds32-memory-manipulation.c
10867 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10868 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10869 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10870 (emit_setmem_word_loop): Rename to ...
10871 (emit_setmem_doubleword_loop): ... this.
10872 (nds32_gen_dup_4_byte_to_word_value): New function.
10873 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10874 (nds32_expand_setmem_loop): Refine implementation.
10875 (nds32_expand_setmem_loop_v3m): Ditto.
10876 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10879 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10881 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10883 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10885 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10886 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10887 machine->attr_no_prologue_p.
10888 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10889 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10890 (nds32_expand_epilogue): Consider attr_naked_p.
10891 (nds32_expand_epilogue_v3pop): Likewise.
10892 (nds32_can_use_return_insn): Likewise.
10893 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10894 attr_no_prologue_p fields.
10895 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10897 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10900 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10902 * config/i386/sse.md
10903 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10905 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10907 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10909 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10911 (*<floatsuffix>floatv2div2sf2): Rename to ...
10912 (*float<floatunssuffix>v2div2sf2): ... this.
10913 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10914 (float<floatunssuffix>v2div2sf2_mask): ... this.
10915 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10916 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10917 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10919 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10921 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10923 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10925 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10927 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10929 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10930 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10931 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10932 gen_ufix_truncv8dfv8si2.
10933 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10934 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10935 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10936 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10937 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10938 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10939 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10940 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10942 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10946 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10948 2018-05-25 Jim Wilson <jimw@sifive.com>
10950 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10951 * config/riscv/riscv.c (struct machine_function): Add
10952 interrupt_handler_p and attribute_checked_p fields.
10953 (riscv_attribute_table): Add interrupt.
10954 (riscv_interrupt_type_p): New.
10955 (riscv_save_reg_p): Save extra regs for interrupt handler.
10956 (riscv_use_save_libcall): Return false for interrupt handler.
10957 (riscv_first_stack_step): Add forward declaration.
10958 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10959 for interrupt handler with large frame. Use it for saved reg list.
10960 (riscv_expand_prologue): Move flag_stack_usage_info support to
10961 eliminate duplication.
10962 (riscv_expand_epilogue): Generate mret for interrupt handler.
10963 (riscv_epilogue_uses): New.
10964 (riscv_can_use_return_insn): Return false for interrupt handler.
10965 (riscv_function_ok_for_sibcall): Likewise.
10966 (riscv_set_current_function): Add interrupt handler support.
10967 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10968 * config/riscv/riscv.md (UNSPECV_MRET): New.
10970 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10972 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10974 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10976 PR tree-optimization/85712
10977 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10978 this candidate has already been replaced in-situ by a copy.
10980 2018-05-25 Jason Merrill <jason@redhat.com>
10982 PR c++/80485 - inline function non-zero address.
10983 * symtab.c (nonzero_address): Check DECL_COMDAT.
10985 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10988 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10989 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10990 extension of SImode operation. Use const123_operand predicate.
10991 (*saddsi_1): Remove.
10992 (*saddl_se_1): Ditto.
10993 (*ssubsi_1): Ditto.
10994 (*ssubl_se_1): Ditto.
10995 * config/alpha/predicates.md (const123_operand): New predicate.
10996 * config/alpha/constraints.md (P): Use IN_RANGE.
10998 2018-05-25 Richard Biener <rguenther@suse.de>
11000 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11002 (ref_maybe_used_by_stmt_p): Likewise.
11003 (stmt_may_clobber_ref_p): Likewise.
11004 (stmt_may_clobber_ref_p_1): Likewise.
11005 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11007 (ref_maybe_used_by_stmt_p): Likewise.
11008 (stmt_may_clobber_ref_p): Likewise.
11009 (stmt_may_clobber_ref_p_1): Likewise.
11010 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11011 the alias oracle to disambiguate DRs with stmts DR analysis
11013 (vect_analyze_data_refs): Do not give up on not analyzable
11014 DRs for BB vectorization. Remove code truncating the dataref
11017 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11020 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11021 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11022 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11024 2018-05-25 Richard Biener <rguenther@suse.de>
11026 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11027 function, combining stmt data ref gathering and fatal analysis
11029 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11030 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11031 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11032 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11033 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11035 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11037 PR tree-optimization/85720
11038 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11039 SCC if all partitions are builtins.
11040 (version_loop_by_alias_check): New parameter. Generate cancelable
11041 runtime alias check if all partitions are builtins.
11042 (distribute_loop): Update call to above function.
11044 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11046 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11047 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11048 (parm_default_def_partition_arg): Ditto.
11049 (set_parm_default_def_partition): Ditto.
11050 (get_parm_default_def_partitions): Ditto and make it static.
11051 (get_undefined_value_partitions): Ditto and make it static.
11052 (remove_ssa_form): Refactor call to init_var_map here.
11053 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11054 computation for loop region.
11055 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11056 (register_default_def): Delete.
11057 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11058 (parm_default_def_partition_arg): Ditto.
11059 (set_parm_default_def_partition): Ditto.
11060 (get_parm_default_def_partitions): Ditto and make it static.
11061 (get_undefined_value_partitions): Ditto and make it static.
11062 (coalesce_with_default, coalesce_with_default): Update comment.
11063 (create_coalesce_list_for_region): New func factored out from
11064 create_outofssa_var_map.
11065 (populate_coalesce_list_for_outofssa): New func factored out from
11066 create_outofssa_var_map and coalesce_ssa_name.
11067 (create_outofssa_var_map): Delete.
11068 (coalesce_ssa_name): Refactor to support live range computation.
11069 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11070 (get_parm_default_def_partitions): Delete.
11071 (get_undefined_value_partitions): Ditto.
11072 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11073 computation for loop region.
11074 (new_tree_live_info, loe_visit_block): Ditto.
11075 (live_worklist, set_var_live_on_entry): Ditto.
11076 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11077 * tree-ssa-live.h (struct _var_map): New fields.
11078 (init_var_map): Change decl.
11079 (region_contains_p): New.
11081 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11083 * tree-ssa-live.h (live_merge_and_clear): Delete.
11085 2018-05-25 Richard Biener <rguenther@suse.de>
11088 * tree-dump.c (dequeue_and_dump): Remove access to removed
11089 operand 2 of a SWITCH_EXPR.
11091 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11093 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11094 multiplication and division.
11095 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11096 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11097 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11098 (cond_udiv_optab, cond_umod_optab): New optabs.
11099 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11100 (IFN_COND_RDIV): New internal functions.
11101 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11102 TRUNC_MOD_EXPR and RDIV_EXPR.
11103 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11104 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11106 (SVE_INT_BINARY): Include mult.
11107 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11108 (optab, sve_int_op): Handle mult.
11109 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11111 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11112 for SVE_INT_BINARY_SD.
11114 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11116 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11117 (optab, sve_int_op): Handle div and udiv.
11118 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11119 for SVE_INT_BINARY_SD.
11120 (*<optab><mode>3): New insn for the same.
11122 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11124 * tree-vect-patterns.c: Include predict.h.
11125 (vect_recog_divmod_pattern): Restrict check for division support
11126 to when optimizing for size.
11128 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11130 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11131 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11132 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11133 (gimple_match_op::set_op): Likewise.
11134 (gimple_resimplify4): Declare.
11135 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11136 (expr::gen_transform): Likewise.
11137 (decision_tree::gen): Generate a simplification routine for 4 operands.
11138 * gimple-match-head.c (gimple_simplify): Add an overload for
11139 4 operands. In the top-level function, handle up to 4 call
11140 arguments and call gimple_resimplify4.
11141 (gimple_resimplify4): New function.
11142 (build_call_internal): Pass a fourth operand.
11143 (maybe_push_to_seq): Likewise.
11144 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11145 Fold VEC_COND_EXPRs of an operation and a default value into
11146 an IFN_COND_* function if possible.
11147 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11149 (SVE_COND_FP_BINARY): Include them.
11150 (optab, sve_fp_op): Handle them.
11151 (SVE_INT_BINARY_REV): New code iterator.
11152 (SVE_COND_FP_BINARY_REV): New int iterator.
11153 (commutative): New int attribute.
11154 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11156 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11158 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11159 (*cond_<optab><mode>): New patterns for reversed operands.
11161 2018-05-25 Richard Biener <rguenther@suse.de>
11163 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11164 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11165 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11166 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11167 * tree-vect-data-refs.c (everywhere): Adjust users.
11168 * tree-vect-loop.c (everywhere): Likewise.
11169 * tree-vect-slp.c (everywhere): Likewise.
11170 * tree-vect-stmts.c (everywhere): Likewise.
11171 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11173 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11175 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11177 (gcc_cv_as_section_exclude): ... this.
11178 Try Solaris as #exclude syntax.
11179 * configure: Regenerate.
11180 * config.in: Regenerate.
11181 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11183 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11184 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11186 * varasm.c (default_elf_asm_named_section): Don't check if
11187 HAVE_GAS_SECTION_EXCLUDE is defined.
11189 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11191 * doc/md.texi: Update the documentation of the cond_* optabs
11192 to mention the new final operand. Fix GET_MODE_NUNITS call.
11193 Describe the scalar case too.
11194 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11195 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11197 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11198 (get_conditional_internal_fn): Update comment.
11199 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11200 accumulator value as a final argument to conditional functions.
11201 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11202 a define_expand and add an "else" operand. Assert for now that
11203 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11204 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11205 (*cond_<optab><mode>): New patterns.
11206 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11207 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11208 (UNSPEC_COND_EOR): Delete.
11209 (optab): Remove associated mappings.
11210 (SVE_INT_BINARY): New code iterator.
11211 (sve_int_op): Remove int attribute and add "minus" to the code
11213 (SVE_COND_INT_OP): Delete.
11214 (SVE_COND_FP_OP): Rename to...
11215 (SVE_COND_FP_BINARY): ...this.
11217 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11219 * optabs.c (can_reuse_operands_p): New function.
11220 (maybe_legitimize_operands): Try to reuse the results for
11223 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11225 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11226 Add {q} suffix to insn mnemonic.
11228 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11230 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11231 (msp430_warn_func_return): New.
11233 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11235 * fold-const.c (tree_nonzero_bits): New function.
11236 * fold-const.h (tree_nonzero_bits): Likewise.
11237 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11238 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11240 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11244 * varasm.c (assemble_alias): Check ifunc_resolver only on
11247 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11250 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11251 when memory input operand is handled.
11253 2018-05-24 Luis Machado <luis.machado@linaro.org>
11255 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11257 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11259 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11261 * match.pd: Delay FMA folds until after vectorization.
11263 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11266 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11267 address check not strict.
11269 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11271 * gimple-match.h (gimple_match_op): New class.
11272 (mprts_hook): Replace parameters with a gimple_match_op *.
11273 (maybe_build_generic_op): Likewise.
11274 (gimple_simplified_result_is_gimple_val): Replace parameters with
11275 a const gimple_match_op *.
11276 (gimple_simplify): Replace code_helper * and tree * parameters with
11277 a gimple_match_op * parameter.
11278 (gimple_resimplify1): Replace code_helper *, tree and tree *
11279 parameters with a gimple_match_op * parameter.
11280 (gimple_resimplify2): Likewise.
11281 (gimple_resimplify3): Likewise.
11282 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11283 parameters with a gimple_match_op * parameter.
11284 * gimple-match-head.c (gimple_simplify): Change prototypes of
11285 auto-generated functions to take a gimple_match_op * instead of
11286 separate code_helper * and tree * parameters. Make the same
11287 change in the top-level overload and update calls to the
11288 gimple_resimplify routines. Update calls to the auto-generated
11289 functions and to maybe_push_res_to_seq in the publicly-facing
11290 operation-specific gimple_simplify overloads.
11291 (gimple_match_op::MAX_NUM_OPS): Define.
11292 (gimple_resimplify1): Replace rcode and ops with a single res_op
11293 parameter. Update call to gimple_simplify.
11294 (gimple_resimplify2): Likewise.
11295 (gimple_resimplify3): Likewise.
11296 (mprts_hook): Replace parameters with a gimple_match_op *.
11297 (maybe_build_generic_op): Likewise.
11298 (build_call_internal): Replace type, nargs and ops with
11299 a gimple_match_op *.
11300 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11301 with a single gimple_match_op *. Update calls to mprts_hook,
11302 build_call_internal and gimple_simplified_result_is_gimple_val.
11303 Factor out code that is common to the tree_code and combined_fn cases.
11304 * genmatch.c (expr::gen_transform): Replace tem_code and
11305 tem_ops with a gimple_match_op called tem_op. Update calls
11306 to the gimple_resimplify functions and maybe_push_res_to_seq.
11307 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11308 res_ops. Update call to the gimple_resimplify functions.
11309 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11310 (decision_tree::gen): Make the functions take a gimple_match_op *
11311 called res_op instead of separate res_code and res_ops parameters.
11312 Update call accordingly.
11313 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11314 and ops with a single res_op parameter. Update calls to
11315 maybe_build_generic_op and maybe_push_res_to_seq.
11316 (fold_stmt_1): Update calls to gimple_simplify and
11317 replace_stmt_with_simplification.
11318 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11319 and gimple_simplified_result_is_gimple_val.
11320 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11322 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11323 with a gimple_match_op *.
11324 (vn_nary_build_or_lookup): Likewise. Update call to
11325 vn_nary_build_or_lookup_1.
11326 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11327 gimple_match_op *. Update calls to the gimple_resimplify routines
11328 and to gimple_simplified_result_is_gimple_val.
11329 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11330 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11331 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11332 (visit_nary_op): Likewise.
11333 (visit_reference_op_load): Likewise.
11335 2018-05-23 Luis Machado <luis.machado@linaro.org>
11337 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11338 modifier for printing the step amount.
11340 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11343 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11346 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11348 * doc/sourcebuild.texi (Endianness): New subsubsection.
11350 2018-05-23 Luis Machado <luis.machado@linaro.org>
11352 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11353 <prefetch_dynamic_strides>: New const bool field.
11354 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11355 prefetch_dynamic_strides.
11356 (exynosm1_prefetch_tune): Likewise.
11357 (thunderxt88_prefetch_tune): Likewise.
11358 (thunderx_prefetch_tune): Likewise.
11359 (thunderx2t99_prefetch_tune): Likewise.
11360 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11362 (aarch64_override_options_internal): Update to set
11363 PARAM_PREFETCH_DYNAMIC_STRIDES.
11364 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11365 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11366 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11367 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11368 prefetch-dynamic-strides setting.
11370 2018-05-23 Luis Machado <luis.machado@linaro.org>
11372 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11373 <minimum_stride>: New const int field.
11374 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11375 minimum_stride field defaulting to -1.
11376 (exynosm1_prefetch_tune): Likewise.
11377 (thunderxt88_prefetch_tune): Likewise.
11378 (thunderx_prefetch_tune): Likewise.
11379 (thunderx2t99_prefetch_tune): Likewise.
11380 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11381 <default_opt_level>: Set to 3.
11382 (aarch64_override_options_internal): Update to set
11383 PARAM_PREFETCH_MINIMUM_STRIDE.
11384 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11385 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11386 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11387 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11388 stride is constant and is below the minimum stride threshold.
11390 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11392 * config/arm/arm-cpus.in (mode26): Delete.
11393 (armv4): Delete mode26 reference.
11394 * config/arm/arm.c (arm_configure_build_target): Delete use of
11397 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11399 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11401 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11402 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11404 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11405 (floatunsdidf2): Ditto.
11407 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11409 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11410 (fixuns_trunc<mode>si2_avx512f): Ditto.
11411 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11412 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11413 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11415 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11417 PR rtl-optimization/79985
11418 * df-scan.c (df_insn_refs_collect): Remove special case for
11419 global registers and asm statements.
11421 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11423 * extend.texi (Global Register Variables): Rewrite the bullet list.
11424 Note that the register is available for allocation. Note that access
11425 via inline asm must use constraints. Add note about async-signal
11426 handlers. Remove paragraph about automagic register selection.
11428 2018-05-23 Richard Biener <rguenther@suse.de>
11430 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11431 of fixed offset from memset VN.
11433 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11435 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11436 first_interp field.
11437 (alloc_cand_and_find_basis): Initialize first_interp field.
11438 (slsr_process_mul): Modify first_interp field.
11439 (slsr_process_add): Likewise.
11440 (slsr_process_cast): Modify first_interp field for each new
11442 (slsr_process_copy): Likewise.
11443 (dump_candidate): Dump first_interp field.
11444 (replace_mult_candidate): Process all interpretations, not just
11446 (replace_rhs_if_not_dup): Likewise.
11447 (replace_one_candidate): Likewise.
11449 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11451 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11453 (aarch64_needs_frame_chain): New function.
11454 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11456 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11459 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11460 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11461 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11462 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11463 as true for strict-align.
11464 (aarch64_can_inline_p): Perform checks even when callee has no
11465 attributes to check for strict alignment.
11466 * doc/extend.texi (AArch64 Function Attributes): Document
11468 * doc/invoke.texi: (AArch64 Options): Likewise.
11470 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11472 PR tree-optimization/85853
11473 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11474 the handling of the root of the node to...
11475 (vect_slp_analyze_node_operations_1): ...this new function,
11476 and run the whole thing with the child nodes' def types
11477 set according to their SLP node's def type.
11479 2018-05-23 Richard Biener <rguenther@suse.de>
11481 PR middle-end/85874
11482 * tree-data-ref.c (create_runtime_alias_checks): Defer
11483 and ignore overflow warnings.
11485 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11487 PR tree-optimization/85822
11488 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11491 2018-05-23 Richard Biener <rguenther@suse.de>
11493 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11494 memset constants via native_interpret_expr.
11496 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11499 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11501 (cgraph_node::create_alias): Likewise.
11502 (cgraph_node::get_availability): Check ifunc_resolver instead
11503 of looking up ifunc attribute.
11504 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11505 * varasm.c (do_assemble_alias): Likewise.
11506 (assemble_alias): Likewise.
11507 (default_binds_local_p_3): Likewise.
11508 * cgraph.h (cgraph_node): Add ifunc_resolver.
11509 (cgraph_node::only_called_directly_or_aliased_p): Return false
11510 for IFUNC resolver.
11511 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11513 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11514 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11515 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11516 instead of looking up ifunc attribute.
11518 2018-05-22 Luis Machado <luis.machado@linaro.org>
11520 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11522 2018-05-22 Martin Sebor <msebor@redhat.com>
11524 PR middle-end/85359
11525 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11526 only when expasion succeeds.
11527 (expand_builtin_strcmp): Same.
11528 (expand_builtin_strncmp): Same.
11530 2018-05-22 Martin Sebor <msebor@redhat.com>
11532 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11534 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11535 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11537 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11538 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11540 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11541 Add check for legitimate_address.
11542 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11543 (aarch64_swap_ldrstr_operands): New.
11544 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11547 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11548 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11550 * config/aarch64/aarch64.md: New patterns to generate stp
11552 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11553 single words and double words.
11554 (load_pair_sw, load_pair_dw): Likewise.
11555 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11557 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11559 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11560 for different mode ldpstp and add peephole for merged zero stores.
11561 Likewise for loads.
11562 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11564 (aarch64_gen_store_pair): Rename calls to match new patterns.
11565 (aarch64_gen_load_pair): Rename calls to match new patterns.
11566 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11567 (load_pair<DREG:mode><DREG2:mode>): ... This.
11568 (store_pair<mode>): Rename to...
11569 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11570 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11571 New mode iterators.
11572 (V_INT_EQUIV): Handle SImode.
11573 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11576 2018-05-22 Martin Sebor <msebor@redhat.com>
11579 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11580 or ajust the presumed bound on an operation to avoid unnecessary
11583 2018-05-22 Martin Sebor <msebor@redhat.com>
11585 PR tree-optimization/85826
11586 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11587 assuming that a DECL necesarily has a constant size.
11589 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11591 PR middle-end/85862
11592 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11594 2018-05-22 Richard Biener <rguenther@suse.de>
11596 PR tree-optimization/85834
11597 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11598 non-constant and non-zero memset arguments.
11600 2018-05-22 Martin Liska <mliska@suse.cz>
11603 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11605 2018-05-22 Richard Biener <rguenther@suse.de>
11607 PR tree-optimization/85863
11608 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11609 comparisons when vectype is specified.
11610 (vectorizable_condition): Do not specify vectype for
11611 vect_is_simple_cond when SLP vectorizing.
11613 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11616 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11617 define __ibm128 as long double.
11618 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11619 as a distinct type when IEEE 128-bit support is enabled.
11620 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11621 128-bit types to use the correct functions.
11622 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11623 convert between 128-bit floating point types that have different
11624 modes but the same representation, instead of using gen_lowpart to
11626 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11628 (IFKF_reg): New attributes to give the register constraints for
11630 (extend<mode>tf2_internal): New insns to mark an explicit
11631 conversion between 128-bit floating point types that have a
11632 different mode but share the same representation.
11634 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11636 PR tree-optimization/85814
11637 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11638 a null return from get_strinfo when unsharing the next
11639 strinfo in the chain.
11641 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11644 * varasm.c (weak_finish): Clean up weak_decls.
11646 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11648 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11649 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11650 UNSPEC_UADALP values.
11651 * config/aarch64/iterators.md (ABAL): New int iterator.
11654 (sur): Add mappings for the above.
11655 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11657 (aarch64_<sur>abal<mode>_4): Likewise.
11658 (aarch64_<sur>adalp<mode>_3): Likewise.
11659 (<sur>sadv16qi): New define_expand.
11661 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11663 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11664 (*movdf_internal): Ditto.
11665 (*rcpsf2_sse): Ditto.
11666 (*rsqrtsf2_sse): Ditto.
11667 (*sqrt<mode>2_sse): Ditto.
11669 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11671 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11673 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11674 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11675 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11676 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11678 * config/aarch64/arm_neon.h: Likewise.
11679 * config/aarch64/iterators.md (VQ_I): New.
11681 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11683 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11685 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11688 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11690 * config/nds32/constraints.md (S): New constraint.
11691 * config/nds32/nds32.md (call_internal): Use constraint S.
11692 (call_value_internal): Likewise.
11693 (sibcall_internal): Likewise.
11694 (sibcall_value_internal): Likewise.
11696 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11697 Chung-Ju Wu <jasonwucj@gmail.com>
11699 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11700 into consideration.
11702 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11703 Chung-Ju Wu <jasonwucj@gmail.com>
11705 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11706 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11707 (nds32_rtx_costs_impl): Simplify.
11708 (nds32_address_cost_impl): Simplify.
11709 (nds32_init_rtx_costs): New function.
11710 (nds32_rtx_costs_speed_prefer): Likewise.
11711 (nds32_rtx_costs_size_prefer): Likewise.
11712 (nds32_address_cost_speed_prefer): Likewise.
11713 (nds32_address_cost_speed_fwprop): Likewise.
11714 (nds32_address_cost_size_prefer): Likewise.
11715 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11716 * config/nds32/nds32.c (nds32_option_override): Use
11717 nds32_init_rtx_costs function.
11719 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11721 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11722 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11723 (TARGET_PIPELINE_N8): Likewise.
11724 (TARGET_PIPELINE_N10): Likewise.
11725 (TARGET_PIPELINE_N13): Likewise.
11726 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11728 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11730 * config/nds32/nds32-fpu.md: Update copyright year.
11732 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11734 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11736 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11738 * config/nds32/nds32.c
11739 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11740 * config/nds32/nds32.opt (minline-asm-r15): New option.
11742 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11744 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11746 * config/nds32/nds32.md (abssi2): New pattern.
11748 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11750 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11751 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11752 Merge insn pattern from sse_cvtsi2ss<round_name> and
11753 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11754 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11755 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11756 using SWI48 mode iterator.
11757 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11758 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11759 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11760 pattern from sse_cvttss2si<round_saeonly_name>
11761 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11762 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11763 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11764 using SWI48 mode iterator.
11765 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11766 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11767 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11768 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11769 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11770 using SWI48 mode iterator.
11771 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11772 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11773 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11774 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11775 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11776 SWI48 mode iterator.
11777 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11778 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11779 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11780 pattern from sse_cvttsd2si<round_saeonly_name>
11781 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11783 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11785 * config/nds32/nds32-md-auxiliary.c
11786 (nds32_valid_smw_lwm_base_p): Refine.
11787 (nds32_output_smw_single_word): Refine.
11788 (nds32_output_smw_double_word): New.
11789 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11791 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11793 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11794 (nds32_output_stack_pop): Refine.
11795 (nds32_expand_unaligned_load): Refine.
11796 (nds32_expand_unaligned_store): Refine.
11798 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11799 Chung-Ju Wu <jasonwucj@gmail.com>
11801 * config/nds32/constants.md: Add TP_REGNUM constant.
11802 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11803 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11805 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11806 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11807 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11808 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11809 and PIC code generation.
11810 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11812 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11814 * config/nds32/nds32.md: Support TLS and PIC.
11815 * config/nds32/nds32.c: Support TLS and PIC.
11816 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11817 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11820 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11822 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11823 mode with E_ prefix.
11825 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11826 Chung-Ju Wu <jasonwucj@gmail.com>
11828 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11829 * config/nds32/nds32-md-auxiliary.c
11830 (symbolic_reference_mentioned_p): New.
11831 (nds32_legitimize_ict_address): New.
11832 (nds32_expand_ict_move): New.
11833 (nds32_indirect_call_referenced_p): New.
11834 (nds32_symbol_binds_local_p): Delete.
11835 (nds32_long_call_p): Modify.
11836 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11837 * config/nds32/nds32-protos.h
11838 (symbolic_reference_mentioned_p): Declare.
11839 (nds32_legitimize_ict_address): Declare.
11840 (nds32_expand_ict_move): Declare.
11841 (nds32_indirect_call_referenced_p): Declare.
11842 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11843 (nds32_relax_group): Use nds32_ict_const_p as condition.
11844 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11845 (nds32_asm_file_start): Output ict_model directive in asm code.
11846 (nds32_legitimate_address_p): Consider indirect call.
11847 (nds32_print_operand): Consider indirect call.
11848 (nds32_print_operand_address): Consider indirect call.
11849 (nds32_insert_attributes): Handle "indirect_call" attribute.
11850 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11851 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11852 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11853 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11854 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11855 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11856 (TARGET_ICT_MODEL_SMALL): Define.
11857 (TARGET_ICT_MODEL_LARGE): Define.
11858 * config/nds32/nds32.md (movsi): Consider ict model.
11859 (call, call_value): Consider ict model.
11860 (sibcall, sibcall_value): Consider ict model.
11861 * config/nds32/nds32.opt (mict-model): New option.
11862 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11865 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11866 Monk Chiang <sh.chiang04@gmail.com>
11867 Jim Wilson <jimw@sifive.com>
11869 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11870 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11871 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11872 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11873 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11874 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11875 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11876 compute save_libcall_adjustment properly.
11877 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11878 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11879 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11880 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11881 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11882 (ABI_SPEC): Handle mabi=ilp32e.
11883 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11884 (RVE): Add RVE mask.
11885 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11886 <-march>: Add rv32e as an example.
11888 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11891 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11892 (intra_create_variable_infos): Handle C++ constructors.
11894 2018-05-18 Martin Liska <mliska@suse.cz>
11896 * passes.def: Remove a redundant pass.
11898 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11901 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11903 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11905 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11907 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11909 (armv2, armv2a, armv3, armv3m): Delete architectures.
11910 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11911 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11912 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11914 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11915 (*mulsidi3adddi): Likewise.
11916 (mulsidi3): Likewise.
11917 (*mulsidi3_nov6): Likewise.
11918 (umulsidi3): Likewise.
11919 (umulsidi3_nov6): Likewise.
11920 (umaddsidi4): Likewise.
11921 (*umulsidi3adddi): Likewise.
11922 (smulsi3_highpart): Likewise.
11923 (*smulsi3_highpart_nov6): Likewise.
11924 (umulsi3_highpart): Likewise.
11925 (*umulsi3_highpart_nov6): Likewise.
11926 * config/arm/arm.h (arm_arch3m): Delete.
11927 * config/arm/arm.c (arm_arch3m): Delete.
11928 (arm_option_override_internal): Update armv3-related comment.
11929 (arm_configure_build_target): Delete use of isa_bit_mode32.
11930 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11931 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11932 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11933 (mulsa3): Likewise.
11934 (mulusa3): Likewise.
11935 * config/arm/arm-protos.h (arm_arch3m): Delete.
11936 * config/arm/arm-tables.opt: Regenerate.
11937 * config/arm/arm-tune.md: Likewise.
11938 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11939 deleted architectures.
11941 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11943 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11944 (armv5t, armv5te): New features.
11945 (ARMv5, ARMv5e): Delete fgroups.
11946 (ARMv5t, ARMv5te): Adjust for above changes.
11947 (ARMv6m): Likewise.
11948 (armv5, armv5e): Delete arches.
11949 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11951 (*call_reg_arm): Likewise.
11952 (*call_value_reg_armv5): Likewise.
11953 (*call_value_reg_arm): Likewise.
11954 (*call_symbol): Likewise.
11955 (*call_value_symbol): Likewise.
11956 (*sibcall_insn): Likewise.
11957 (*sibcall_value_insn): Likewise.
11958 (clzsi2): Likewise.
11959 (prefetch): Likewise.
11960 (define_split and define_peephole2 dependent on arm_arch5):
11962 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11964 (TARGET_ARM_QBIT): Likewise.
11965 (TARGET_DSP_MULTIPLY): Likewise.
11966 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11967 (arm_arch5, arm_arch5e): Delete.
11968 (arm_arch5t, arm_arch5te): Declare.
11969 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11970 (arm_arch5t): Declare.
11971 (arm_option_reconfigure_globals): Update for the above.
11972 (arm_options_perform_arch_sanity_checks): Update comment, replace
11973 use of arm_arch5 with arm_arch5t.
11974 (use_return_insn): Likewise.
11975 (arm_emit_call_insn): Likewise.
11976 (output_return_instruction): Likewise.
11977 (arm_final_prescan_insn): Likewise.
11978 (arm_coproc_builtin_available): Likewise.
11979 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11980 arm_arch5e with arm_arch5t and arm_arch5te.
11981 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11982 (arm_arch5t, arm_arch5te): Declare.
11983 * config/arm/arm-tables.opt: Regenerate.
11984 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11985 * config/arm/t-multilib: Likewise.
11986 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11987 instead of arm_arch5.
11988 (*call_reg_thumb1): Likewise.
11989 (*call_value_reg_thumb1_v5): Likewise.
11990 (*call_value_reg_thumb1): Likewise.
11991 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11993 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11995 2018-05-18 Martin Liska <mliska@suse.cz>
11997 PR gcov-profile/84846
11998 * doc/gcov.texi: Document -t option of gcov tool.
12000 2018-05-18 Martin Liska <mliska@suse.cz>
12002 PR gcov-profile/84846
12003 * gcov.c (print_usage): Add new -t option.
12004 (process_args): Handle the option.
12005 (generate_results): Use stdout as output when requested by
12008 2018-05-18 Martin Liska <mliska@suse.cz>
12010 PR gcov-profile/84846
12011 * coverage.c (coverage_init): Write PWD to .gcno file.
12012 * doc/gcov.texi: Document how working directory is printed.
12013 * gcov-dump.c (dump_gcov_file): Print PWD.
12014 * gcov.c (output_intermediate_file): Likewise.
12015 (read_graph_file): Read PWD string.
12016 (output_lines): Print PWD.
12018 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12020 PR middle-end/85817
12021 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12022 for retval and return false if all args to phi are zero.
12024 2018-05-18 Richard Biener <rguenther@suse.de>
12026 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12028 (evrp_dom_walker::before_dom_children): Call it.
12030 2018-05-18 Richard Biener <rguenther@suse.de>
12032 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12033 results when processing array refs with variable index.
12035 2018-05-18 Toon Moene <toon@moene.org>
12037 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12038 directly after that of -floop-interchange. Indicate that both
12039 options are enabled by default when specifying -O3.
12041 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12043 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12044 iterator. Delete separate integer-mode vec_set<mode> expander.
12045 (aarch64_simd_vec_setv2di): Delete.
12046 (vec_setv2di): Delete.
12047 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12048 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12049 the "w, r" alternative.
12051 2018-05-18 Martin Liska <mliska@suse.cz>
12053 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12054 * tree-pass.h (make_pass_lower_switch_O0): New function.
12055 * tree-switch-conversion.c (node_has_low_bound): Remove.
12056 (node_has_high_bound): Likewise.
12057 (node_is_bounded): Likewise.
12058 (class pass_lower_switch): Make it a template type and create
12060 (pass_lower_switch::execute): Add template argument.
12061 (make_pass_lower_switch): New function.
12062 (make_pass_lower_switch_O0): New function.
12063 (do_jump_if_equal): Remove.
12064 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12065 all the hard work to tree optimization passes.
12067 2018-05-18 Martin Liska <mliska@suse.cz>
12069 * dbgcnt.c (limit_low): Renamed from limit.
12070 (limit_high): New variable.
12071 (dbg_cnt_is_enabled): Check for upper limit.
12072 (dbg_cnt): Adjust dumping.
12073 (dbg_cnt_set_limit_by_index): Add new argument for high
12075 (dbg_cnt_set_limit_by_name): Likewise.
12076 (dbg_cnt_process_single_pair): Parse new format.
12077 (dbg_cnt_process_opt): Use strtok.
12078 (dbg_cnt_list_all_counters): Remove 'value' and add
12080 * doc/invoke.texi: Document changes.
12082 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12084 * doc/sourcebuild.texi (scalar_all_fma): Document.
12085 * tree.def (FMA_EXPR): Delete.
12086 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12087 * internal-fn.c (ternary_direct): New macro.
12088 (expand_ternary_optab_fn): Likewise.
12089 (direct_ternary_optab_supported_p): Likewise.
12090 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12091 * builtins.c (fold_builtin_fma): Delete.
12092 (fold_builtin_3): Don't call it.
12093 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12094 * expr.c (expand_expr_real_2): Likewise.
12095 * fold-const.c (operand_equal_p): Likewise.
12096 (fold_ternary_loc): Likewise.
12097 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12098 * gimple.c (DEFTREECODE): Likewise.
12099 * gimplify.c (gimplify_expr): Likewise.
12100 * optabs-tree.c (optab_for_tree_code): Likewise.
12101 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12102 * tree-eh.c (operation_could_trap_p): Likewise.
12103 (stmt_could_throw_1_p): Likewise.
12104 * tree-inline.c (estimate_operator_cost): Likewise.
12105 * tree-pretty-print.c (dump_generic_node): Likewise.
12106 (op_code_prio): Likewise.
12107 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12108 * tree-ssa-operands.c (get_expr_operands): Likewise.
12109 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12110 * fold-const-call.h (fold_fma): Delete.
12111 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12112 CFN_FNMA and CFN_FNMS.
12113 (fold_fma): Delete.
12114 * genmatch.c (combined_fn): New enum.
12115 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12116 (commutative_op): New function.
12117 (commutate): Use it. Handle more than 2 operands.
12118 (dt_operand::gen_gimple_expr): Use commutative_op.
12119 (parser::parse_expr): Allow :c to be used with non-binary
12120 operators if the commutative operand is known.
12121 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12122 CFN_FMS, CFN_FNMA and CFN_FNMS.
12123 (backprop::process_assign_use): Remove FMA_EXPR handling.
12124 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12125 (gen_hsa_fma): New function.
12126 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12127 IFN_FNMA and IFN_FNMS.
12128 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12129 * gimple-fold.h (follow_all_ssa_edges): Declare.
12130 * gimple-fold.c (follow_all_ssa_edges): New function.
12131 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12132 gimple_build interface and use follow_all_ssa_edges to fold the result.
12133 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12134 instead of checking for optabs directly.
12135 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12136 rather than FMA_EXPRs.
12137 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12138 call to IFN_FMA instead of an FMA_EXPR.
12140 2018-05-17 Jim Wilson <jimw@sifive.com>
12142 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12143 sign extended promoted subreg, and the range does not have the sign bit
12144 set, then do a sign extend.
12146 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12147 test, check for sign extended subreg and/or constant operands, and
12148 do a sign extend in that case.
12150 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12152 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12153 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12155 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12156 Change logics_shift_reg to logics_shift_imm.
12157 (thunderx2t99_fp_loadpair_basic): Delete.
12158 (thunderx2t99_fp_storepair_basic): Delete.
12159 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12160 (thunderx2t99_asimd_polynomial): Delete.
12161 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12162 and neon_fp_mul_d_scalar_q.
12163 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12164 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12165 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12166 (thunderx2t99_asimd_lut): Add missing tbl types.
12167 (thunderx2t99_asimd_ext): Delete.
12168 (thunderx2t99_asimd_load1_1_mult): Delete.
12169 (thunderx2t99_asimd_load1_2_mult): Delete.
12170 (thunderx2t99_asimd_load1_ldp): New.
12171 (thunderx2t99_asimd_load1): New.
12172 (thunderx2t99_asimd_load2): Add missing *load2* types.
12173 (thunderx2t99_asimd_load3): New.
12174 (thunderx2t99_asimd_load4): New.
12175 (thunderx2t99_asimd_store1_1_mult): Delete.
12176 (thunderx2t99_asimd_store1_2_mult): Delete.
12177 (thunderx2t99_asimd_store2_mult): Delete.
12178 (thunderx2t99_asimd_store2_onelane): Delete.
12179 (thunderx2t99_asimd_store_stp): New.
12180 (thunderx2t99_asimd_store1): New.
12181 (thunderx2t99_asimd_store2): New.
12182 (thunderx2t99_asimd_store3): New.
12183 (thunderx2t99_asimd_store4): New.
12185 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12187 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12188 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12190 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12191 Segher Boessenkool <segher@kernel.crashing.org>
12194 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12197 2018-05-17 Richard Biener <rguenther@suse.de>
12199 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12200 for pruning loop and prune defs feeding only already visited PHIs.
12202 2018-05-17 Richard Biener <rguenther@suse.de>
12204 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12206 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12207 Richard Biener <rguenther@suse.de>
12209 PR tree-optimization/85793
12210 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12211 for VMAT_ELEMENTWISE.
12213 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12215 * internal-fn.h (lookup_internal_fn): Declare
12216 * internal-fn.c (lookup_internal_fn): New function.
12217 * gimple.c (gimple_build_call_from_tree): Handle calls to
12218 internal functions.
12219 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12220 internal function names.
12221 * tree-pretty-print.c (dump_generic_node): Likewise.
12222 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12224 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12226 * gimple-fold.h (gimple_build): Make the function forms take
12227 combined_fn rather than built_in_function.
12228 (gimple_simplify): Likewise.
12229 * gimple-match-head.c (gimple_simplify): Likewise.
12230 * gimple-fold.c (gimple_build): Likewise.
12231 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12232 rather than gimple_build_call_internal.
12233 (get_initial_defs_for_reduction): Likewise.
12234 (vect_create_epilog_for_reduction): Likewise.
12235 (vectorizable_live_operation): Likewise.
12237 2018-05-17 Martin Liska <mliska@suse.cz>
12239 * gimple-ssa-sprintf.c (format_directive): Do not use
12240 space in between 'G_' and '('.
12242 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12245 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12246 even if the mask is not all ones.
12249 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12251 (ix86_gimple_fold_builtin): Likewise.
12254 * config/i386/i386.c: Include tree-vector-builder.h.
12255 (ix86_vector_shift_count): New function.
12256 (ix86_fold_builtin): Fold shift builtins by scalar count.
12257 (ix86_gimple_fold_builtin): Likewise.
12259 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12260 _mm512_setzero): New intrinsics.
12262 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12263 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12265 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12266 code generation for cases where splatting a value is not useful.
12267 * simplify-rtx.c (simplify_ternary_operation): Simplify
12268 vec_merge across a vec_duplicate and a paradoxical subreg forming
12269 a vector mode to a vec_concat.
12271 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12273 * config.gcc: Support "goldmont-plus".
12274 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12276 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12277 PROCESSOR_GOLDMONT_PLUS.
12278 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12279 (processor_target_table): Add "goldmont-plus".
12280 (PTA_GOLDMONT_PLUS): Define.
12281 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12282 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12283 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12284 (fold_builtin_cpu): Add "goldmont-plus".
12285 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12286 (ix86_option_override_internal): Add "goldmont-plus".
12287 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12288 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12289 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12290 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12292 2018-05-17 Richard Biener <rguenther@suse.de>
12294 PR tree-optimization/85757
12295 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12296 remove defs that only feed that PHI from further processing.
12298 2018-05-16 Jim Wilson <jimw@sifive.com>
12300 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12302 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12304 2018-05-16 Mark Wielaard <mark@klomp.org>
12306 * dwarf2out.c (count_index_strings): New function.
12307 (output_indirect_strings): Call count_index_strings and generate
12308 header for dwarf_version >= 5.
12310 2018-05-16 Mark Wielaard <mark@klomp.org>
12312 * dwarf2out.c (dwarf_FORM): New function.
12313 (set_indirect_string): Use dwarf_FORM.
12314 (reset_indirect_string): Likewise.
12315 (size_of_die): Likewise.
12316 (value_format): Likewise.
12317 (output_die): Likewise.
12318 (add_skeleton_AT_string): Likewise.
12319 (output_macinfo_op): Likewise.
12320 (index_string): Likewise.
12321 (output_index_string_offset): Likewise.
12322 (output_index_string): Likewise.
12323 (count_index_strings): Likewise.
12325 2018-05-16 Carl Love <cel@us.ibm.com>
12327 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12328 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12330 2018-05-16 Martin Jambor <mjambor@suse.cz>
12332 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12333 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12335 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12337 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12338 (fnma<mode>4): Likewise.
12339 (fms<mode>4): Likewise.
12340 (fnms<mode>4): Likewise.
12341 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12342 (aarch64_fnma<mode>4): Likewise.
12343 (aarch64_fms<mode>4): Likewise.
12344 (aarch64_fnms<mode>4): Likewise.
12345 (aarch64_fnmadd<mode>4): Likewise.
12347 2018-05-16 Jason Merrill <jason@redhat.com>
12349 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12351 2018-05-16 Richard Biener <rguenther@suse.de>
12353 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12354 (dump_stmt_cost): Declare.
12355 (add_stmt_cost): Dump cost we add.
12356 (add_stmt_costs): New function.
12357 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12358 No longer exported.
12359 (vect_analyze_stmt): Adjust prototype.
12360 (vectorizable_condition): Likewise.
12361 (vectorizable_live_operation): Likewise.
12362 (vectorizable_reduction): Likewise.
12363 (vectorizable_induction): Likewise.
12364 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12365 cost vector to pass to vectorizable_ and record afterwards.
12366 (vect_model_reduction_cost): Take cost vector argument and adjust.
12367 (vect_model_induction_cost): Likewise.
12368 (vectorizable_reduction): Likewise.
12369 (vectorizable_induction): Likewise.
12370 (vectorizable_live_operation): Likewise.
12371 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12372 SLP_TREE_NUMBER_OF_VEC_STMTS.
12373 (vect_analyze_slp_cost_1): Remove.
12374 (vect_analyze_slp_cost): Likewise.
12375 (vect_slp_analyze_node_operations): Take visited args and
12376 a target cost vector. Avoid processing already visited stmt sets.
12377 (vect_slp_analyze_operations): Use a local cost vector to gather
12378 costs and register those of non-discarded instances.
12379 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12380 (vect_schedule_slp_instance): Remove copying of
12381 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12383 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12384 adding cost. Record cost entry location.
12385 (vect_prologue_cost_for_slp_op): Function to compute cost of
12386 a constant or invariant generated for SLP vect in the prologue,
12387 split out from vect_analyze_slp_cost_1.
12388 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12389 (vect_model_promotion_demotion_cost): Likewise.
12390 (vect_model_store_cost): Likewise, make static.
12391 (vect_model_load_cost): Likewise.
12392 (vectorizable_bswap): Add cost vector arg and adjust.
12393 (vectorizable_call): Likewise.
12394 (vectorizable_simd_clone_call): Likewise.
12395 (vectorizable_conversion): Likewise.
12396 (vectorizable_assignment): Likewise.
12397 (vectorizable_shift): Likewise.
12398 (vectorizable_operation): Likewise.
12399 (vectorizable_store): Likewise.
12400 (vectorizable_load): Likewise.
12401 (vectorizable_condition): Likewise.
12402 (vectorizable_comparison): Likewise.
12403 (can_vectorize_live_stmts): Likewise.
12404 (vect_analyze_stmt): Likewise.
12405 (vect_transform_stmt): Adjust calls to vectorizable_*.
12406 * tree-vectorizer.c: Include gimple-pretty-print.h.
12407 (dump_stmt_cost): New function.
12409 2018-05-16 Richard Biener <rguenther@suse.de>
12411 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12412 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12413 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12414 (check_name): New callback.
12415 (dse_classify_store): Track cycles via a visited bitmap of PHI
12416 defs and simplify handling of in-loop and across loop dead stores
12417 and properly fail for loop-variant refs. Handle byte-tracking with
12418 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12421 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12423 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12424 (vect_get_mask_type_for_stmt): Likewise.
12425 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12427 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12428 to determine the statement's vector type and the vector type that
12429 should be used for calculating nunits. Deal with cases in which
12430 the type has to be deferred.
12431 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12432 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12433 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12434 (vect_determine_vf_for_stmt): New functions, split out from...
12435 (vect_determine_vectorization_factor): ...here.
12436 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12437 (vect_get_mask_type_for_stmt): New functions, split out from
12438 vect_determine_vectorization_factor.
12440 2018-05-16 Richard Biener <rguenther@suse.de>
12442 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12443 verify the [VEC_]COND_EXPR embedded comparison.
12445 2018-05-15 Martin Sebor <msebor@redhat.com>
12447 PR tree-optimization/85753
12448 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12449 RECORD_TYPE in addition to ARRAY_TYPE.
12451 2018-05-15 Martin Sebor <msebor@redhat.com>
12453 PR middle-end/85643
12454 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12456 2018-05-15 Richard Biener <rguenther@suse.de>
12458 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12459 add by_clobber_p one. Change algorithm to collect all defs
12460 representing uses we need to walk and try reducing them to
12461 a single one before failing.
12462 (dse_dom_walker::dse_optimize_stmt): Adjust.
12464 2018-05-13 Mark Wielaard <mark@klomp.org>
12466 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12467 (size_of_loc_descr): Likewise.
12468 (output_loc_operands): Likewise.
12469 (output_loc_operands_raw): Likewise.
12470 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12471 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12472 (hash_loc_operands): Likewise.
12473 (compare_loc_operands): Likewise.
12475 2018-05-14 Mark Wielaard <mark@klomp.org>
12477 * dwarf2out.c (count_index_addrs): New function.
12478 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12480 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12482 PR tree-optimization/83648
12483 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12484 return value as malloc candidate.
12486 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12489 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12490 param as true in call to suggest_attribute.
12492 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12494 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12495 -mreadonly-in-sdata.
12497 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12499 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12501 (aarch64_crypto_aesd_fused): Likewise.
12503 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12505 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12506 (movsi_aarch64): Likewise.
12507 (load_pairsi): Likewise.
12508 (load_pairdi): Likewise.
12509 (store_pairsi): Likewise.
12510 (store_pairdi): Likewise.
12511 (load_pairsf): Likewise.
12512 (load_pairdf): Likewise.
12513 (store_pairsf): Likewise.
12514 (store_pairdf): Likewise.
12515 (zero_extend): Likewise.
12516 (trunc): Swap alternatives.
12517 (fcvt_target): Add '?' to prefer w over r.
12519 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12522 * config/i386/i386.md: Disallow non-commutative arithmetics in
12523 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12524 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12525 in the peephole2 before it.
12527 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12529 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12530 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12531 (ix86_handle_option): Handle -mcldemote.
12532 * config.gcc: New header.
12533 * config/i386/cldemoteintrin.h: New file.
12534 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12535 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12537 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12538 OPTION_MASK_ISA_CLDEMOTE.
12539 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12540 (ix86_valid_target_attribute_inner_p): Ditto.
12541 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12542 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12543 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12544 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12545 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12547 * config/i386/i386.opt: Add -mcldemote.
12548 * config/i386/x86intrin.h: New header.
12549 * doc/invoke.texi: Add -mcldemote.
12551 2018-05-14 Richard Biener <rguenther@suse.de>
12553 * doc/match-and-simplify.texi: Adjust :s documentation.
12555 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12557 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12558 intended memcpy size.
12559 (REORDER_45): Likewise.
12561 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12563 * sort.cc: New file.
12564 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12565 * vec.c (qsort_chk): Use gcc_qsort.
12566 * Makefile.in (OBJS-libcommon): Add sort.o.
12567 (build/sort.o): New target. Use it...
12568 (BUILD_RTL): ... here, and...
12569 (build/gencfn-macros): ... here, and...
12570 (build/genmatch): ... here.
12572 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12573 Chung-Ju Wu <jasonwucj@gmail.com>
12575 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12576 * config/nds32/nds32-graywolf.md: New file.
12577 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12578 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12580 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12581 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12582 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12583 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12584 * config/nds32/pipelines.md: Include n15 settings.
12586 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12587 Chung-Ju Wu <jasonwucj@gmail.com>
12589 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12590 * config/nds32/nds32-n13.md: New file.
12591 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12592 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12594 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12595 * config/nds32/nds32.md (pipeline_model): Add n13.
12596 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12597 * config/nds32/pipelines.md: Include n13 settings.
12599 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12600 Chung-Ju Wu <jasonwucj@gmail.com>
12602 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12603 * config/nds32/nds32-n10.md: New file.
12604 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12605 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12607 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12608 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12609 * config/nds32/nds32.md (pipeline_model): Add n10.
12610 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12611 * config/nds32/pipelines.md: Include n10 settings.
12613 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12614 Kito Cheng <kito.cheng@gmail.com>
12615 Chung-Ju Wu <jasonwucj@gmail.com>
12617 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12618 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12619 Add enum values for DSP extension instructions.
12620 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12622 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12623 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12624 New code iterators.
12625 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12626 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12627 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12628 * config/nds32/nds32-intrinsic.md: Likewise.
12629 * config/nds32/nds32_intrinsic.h: Likewise.
12630 * config/nds32/nds32-md-auxiliary.c: Likewise.
12631 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12632 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12633 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12634 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12635 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12636 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12637 TYPE_DMAC in switch statement.
12638 * config/nds32/nds32.c: New checking and implementation for DSP
12639 extension instructions.
12640 * config/nds32/nds32.h: Likewise.
12641 * config/nds32/nds32.md: Likewise.
12642 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12643 * config/nds32/predicates.md: Implement new predicates for DSP
12646 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12648 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12649 Reformat alternatives and attributes so it is easier to identify
12650 which constraints/attributes go with which instruction.
12651 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12652 (mov<mode>_softfloat32, FMOVE64): Likewise.
12653 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12654 (mov<mode>_softfloat64, FMOVE64): Likewise.
12656 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12658 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12660 (Basic PowerPC Built-in Functions): The new name of the
12661 subsection previously known as "PowerPC Built-in Functions".
12662 (Basic PowerPC Built-in Functions Available on all Configurations):
12664 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12665 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12666 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12667 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12669 2018-05-11 Martin Jambor <mjambor@suse.cz>
12672 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12675 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12678 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12680 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12682 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12683 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12684 (ix86_handle_option): Handle -mwaitpkg.
12685 * config.gcc: New header.
12686 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12687 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12688 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12690 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12691 OPTION_MASK_ISA_WAITPKG.
12692 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12693 (ix86_option_override_internal): Add PTA_WAITPKG.
12694 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12695 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12696 IX86_BUILTIN_TPAUSE.
12697 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12698 __builtin_ia32_umwait and __builtin_ia32_tpause.
12699 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12700 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12701 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12702 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12703 UNSPECV_TPAUSE): New.
12704 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12705 * config/i386/i386.opt: Add -mwaitpkg.
12706 * config/i386/waitpkgintrin.h: New file.
12707 * config/i386/x86intrin.h: New header.
12708 * doc/invoke.texi: Add -mwaitpkg.
12710 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12713 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12715 (cortex-m0): Use armv6s-m isa.
12716 (cortex-m0plus): Likewise.
12717 (cortex-m1): Likewise.
12718 (cortex-m0.small-multiply): Likewise.
12719 (cortex-m0plus.small-multiply): Likewise.
12720 (cortex-m1.small-multiply): Likewise.
12722 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12723 Jakub Jelinek <jakub@redhat.com>
12725 PR tree-optimization/85692
12726 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12727 source permute as well.
12729 2018-05-11 Martin Liska <mliska@suse.cz>
12732 * doc/extend.texi: Document LLVM style format for no_sanitize
12735 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12737 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12738 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12739 (mode_supports_vsx_dform_quad): Likewise.
12740 (mode_supports_vmx_dform): Move these functions to be next to the
12741 other mode_supports functions.
12742 (mode_supports_dq_form): Likewise.
12743 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12744 mode_supports_dq_form.
12745 (reg_offset_addressing_ok_p): Likewise.
12746 (offsettable_ok_by_alignment): Likewise.
12747 (rs6000_legitimate_offset_address_p): Likewise.
12748 (legitimate_lo_sum_address_p): Likewise.
12749 (rs6000_legitimize_address): Likewise.
12750 (rs6000_legitimize_reload_address): Likewise.
12751 (rs6000_secondary_reload_inner): Likewise.
12752 (rs6000_preferred_reload_class): Likewise.
12753 (rs6000_output_move_128bit): Likewise.
12755 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12757 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12758 Generate SImode target register for null target.
12759 <case IX86_BUILTIN_XGETBV>: Ditto.
12760 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12761 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12763 2018-05-10 Carl Love <cel@us.ibm.com>
12765 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12766 dcbtt and dcbtstt if operands[2] is 0.
12768 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12771 * config/i386/sse.md (usadv64qi): New expander.
12773 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12775 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12776 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12777 -maltivec=be support.
12778 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12779 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12780 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12781 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12782 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12783 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12784 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12785 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12786 altivec_vsumsws): Adjust.
12787 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12788 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12789 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12791 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12792 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12793 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12794 (altivec_lve<VI_char>x): Delete expand.
12795 (*altivec_lve<VI_char>x_internal): Rename to...
12796 (altivec_lve<VI_char>x): ... this.
12797 (altivec_lvxl_<mode>): Delete expand.
12798 (*altivec_lvxl_<mode>_internal): Rename to ...
12799 (altivec_lvxl_<mode>): ... this.
12800 (altivec_stvxl_<mode>): Delete expand.
12801 (*altivec_stvxl_<mode>_internal): Rename to ...
12802 (altivec_stvxl_<mode>): ... this.
12803 (altivec_stve<VI_char>x): Delete expand.
12804 (*altivec_stve<VI_char>x_internal): Rename to ...
12805 (altivec_stve<VI_char>x): ... this.
12806 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12807 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12808 reduc_plus_scal_<mode>): Adjust.
12809 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12811 (rs6000_cpu_cpp_builtins): Adjust.
12812 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12813 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12814 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12815 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12816 -maltivec=be support.
12817 (rs6000_split_vec_extract_var): Adjust.
12818 (rs6000_split_v4si_init): Adjust.
12819 (swap_selector_for_mode): Delete.
12820 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12821 altivec_expand_stvex_be): Delete.
12822 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12823 -maltivec=be support.
12824 (rs6000_gimple_fold_builtin): Ditto.
12825 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12827 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12828 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12829 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12830 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12831 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12832 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12833 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12834 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12835 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12836 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12837 anonymous split): Adjust.
12838 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12839 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12841 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12843 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12844 when --with-gxx-include-dir is also specified.
12845 * configure: Regenerate.
12847 2018-05-09 Jim Wilson <jimw@sifive.com>
12850 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12851 * config/riscv/t-withmultilib: New.
12852 * config/riscv/withmultilib.h: New.
12853 * doc/install.texi: Document RISC-V --with-multilib-list support.
12855 2018-05-09 Richard Biener <rguenther@suse.de>
12857 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12859 (vect_bb_vectorization_profitable_p): Adjust. Compute
12860 actual scalar cost using the cost vector and the add_stmt_cost
12863 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12865 PR rtl-optimization/85645
12866 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12867 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12869 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12871 PR rtl-optimization/85645
12872 * shrink-wrap.c (spread_components): Return a boolean saying if
12873 anything was changed.
12874 (try_shrink_wrapping_separate): Iterate spread_components until
12875 nothing changes anymore.
12877 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12879 PR rtl-optimization/85645
12880 * regrename.c (build_def_use): Also kill the chains that include the
12881 destination of a REG_CFA_REGISTER note.
12883 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12885 PR rtl-optimization/85645
12886 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12887 insn that has a REG_CFA_REGISTER note.
12889 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12891 * cfgexpand.c (expand_clobber): New function.
12892 (expand_gimple_stmt_1): Use it.
12893 * tree-vect-stmts.c (vect_clobber_variable): New function,
12895 (vectorizable_simd_clone_call): ...here.
12896 (vectorizable_store): Emit a clobber either side of an
12897 IFN_STORE_LANES sequence.
12898 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12900 2018-05-09 Tom de Vries <tom@codesourcery.com>
12903 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12904 (define_insn "trap_if_false"): Add exit after trap.
12906 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12908 PR rtl-optimization/85638
12909 * bb-reorder.c: Include common/common-target.h.
12910 (create_forwarder_block): New function extracted from...
12911 (fix_up_crossing_landing_pad): ...here. Rename into...
12912 (dw2_fix_up_crossing_landing_pad): ...this.
12913 (sjlj_fix_up_crossing_landing_pad): New function.
12914 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12915 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12916 from both partitions and exit the loop after one iteration.
12918 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12921 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12923 (Basic PowerPC Built-in Functions): The new name of the
12924 subsection previously known as "PowerPC Built-in Functions".
12925 (Basic PowerPC Built-in Functions Available on all Configurations):
12927 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12929 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12931 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12933 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12936 2018-05-08 Jim Wilson <jimw@sifive.com>
12938 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12939 (LD_EMUL_SUFFIX): New.
12940 (LINK_SPEC): Use it.
12942 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12944 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12946 (Basic PowerPC Built-in Functions): The new name of the
12947 subsection previously known as "PowerPC Built-in Functions".
12948 (Basic PowerPC Built-in Functions Available on all Configurations):
12950 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12952 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12954 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12956 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12959 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12962 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12963 after cmpelim optimization.
12965 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12967 * config.gcc: Support "goldmont".
12968 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12969 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12970 PROCESSOR_GOLDMONT.
12971 * config/i386/i386.c (m_GOLDMONT): Define.
12972 (processor_target_table): Add "goldmont".
12973 (PTA_GOLDMONT): Define.
12974 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12975 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12976 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12977 (fold_builtin_cpu): Add "goldmont".
12978 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12979 (ix86_option_override_internal): Add "goldmont".
12980 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12981 (processor_type): Add PROCESSOR_GOLDMONT.
12982 * config/i386/i386.md: Add CPU "glm".
12983 * config/i386/glm.md: New file.
12984 * config/i386/x86-tune.def: Add m_GOLDMONT.
12985 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12987 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12990 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12992 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12993 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12994 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12997 * config/i386/i386.c (ix86_fold_builtin): Handle
12998 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13001 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13002 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13004 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13007 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13008 (check_arch): Likewise.
13009 (check_fpu): Return the result rather than printing it.
13010 (end arch): Fix operator precedence.
13011 (end cpu): Likewise.
13012 (END): Print the result from check_fpu.
13014 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13015 Alan Hayward <alan.hayward@arm.com>
13016 David Sherwood <david.sherwood@arm.com>
13018 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13019 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13020 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13021 (*fcmuo<mode>_and): New patterns.
13023 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13025 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13026 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13027 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13028 (cmp_op, sve_imm_con): New code attributes.
13029 (SVE_COND_INT_CMP, imm_con): Delete.
13030 (cmp_op): Remove above unspecs from int attribute.
13031 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13033 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13034 comparison-specific unspecs.
13035 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13036 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13037 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13038 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13039 (*vec_fcm<cmp_op><mode>): Rename to...
13040 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13041 (*vec_fcmuo<mode>): Rename to...
13042 (*fcmuo<mode>): ...this and adjust likewise.
13043 (*pred_fcm<cmp_op><mode>): New pattern.
13044 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13045 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13047 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13049 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13050 (aarch64_emit_sve_predicated_cond): New function.
13051 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13052 (aarch64_emit_unspec_cond_or): Replace with...
13053 (aarch64_emit_sve_or_conds): ...this new function. Use
13054 aarch64_emit_sve_ptrue_op for the individual comparisons and
13055 aarch64_emit_binop to OR them together.
13056 (aarch64_emit_inverted_unspec_cond): Replace with...
13057 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13058 aarch64_emit_sve_ptrue_op for the comparison and
13059 aarch64_emit_unop to invert the result.
13060 (aarch64_expand_sve_vec_cmp_float): Update after the above
13061 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13063 2018-05-07 Nathan Sidwell <nathan@acm.org>
13065 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13066 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13067 (Backwards Compatibility): Likewise.
13069 2018-05-07 Luis Machado <luis.machado@linaro.org>
13073 2018-05-07 Luis Machado <luis.machado@linaro.org>
13075 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13076 <prefetch_dynamic_strides>: New const bool field.
13077 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13078 prefetch_dynamic_strides.
13079 (exynosm1_prefetch_tune): Likewise.
13080 (thunderxt88_prefetch_tune): Likewise.
13081 (thunderx_prefetch_tune): Likewise.
13082 (thunderx2t99_prefetch_tune): Likewise.
13083 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13085 (aarch64_override_options_internal): Update to set
13086 PARAM_PREFETCH_DYNAMIC_STRIDES.
13087 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13088 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13089 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13090 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13091 prefetch-dynamic-strides setting.
13093 2018-05-07 Luis Machado <luis.machado@linaro.org>
13095 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13096 <minimum_stride>: New const int field.
13097 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13098 minimum_stride field.
13099 (exynosm1_prefetch_tune): Likewise.
13100 (thunderxt88_prefetch_tune): Likewise.
13101 (thunderx_prefetch_tune): Likewise.
13102 (thunderx2t99_prefetch_tune): Likewise.
13103 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13104 (aarch64_override_options_internal): Update to set
13105 PARAM_PREFETCH_MINIMUM_STRIDE.
13106 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13107 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13108 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13109 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13110 stride is constant and is below the minimum stride threshold.
13112 2018-05-07 Luis Machado <luis.machado@linaro.org>
13114 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13117 2018-05-07 Luis Machado <luis.machado@linaro.org>
13119 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13120 <prefetch_dynamic_strides>: New const bool field.
13121 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13122 prefetch_dynamic_strides.
13123 (exynosm1_prefetch_tune): Likewise.
13124 (thunderxt88_prefetch_tune): Likewise.
13125 (thunderx_prefetch_tune): Likewise.
13126 (thunderx2t99_prefetch_tune): Likewise.
13127 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13129 (aarch64_override_options_internal): Update to set
13130 PARAM_PREFETCH_DYNAMIC_STRIDES.
13131 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13132 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13133 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13134 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13135 prefetch-dynamic-strides setting.
13137 2018-05-07 Luis Machado <luis.machado@linaro.org>
13139 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13140 <minimum_stride>: New const int field.
13141 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13142 minimum_stride field.
13143 (exynosm1_prefetch_tune): Likewise.
13144 (thunderxt88_prefetch_tune): Likewise.
13145 (thunderx_prefetch_tune): Likewise.
13146 (thunderx2t99_prefetch_tune): Likewise.
13147 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13148 (aarch64_override_options_internal): Update to set
13149 PARAM_PREFETCH_MINIMUM_STRIDE.
13150 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13151 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13152 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13153 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13154 stride is constant and is below the minimum stride threshold.
13156 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13159 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13160 the type is addressable. Don't force op into register if it has
13163 2018-05-05 Roland McGrath <mcgrathr@google.com>
13166 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13167 any section for which we don't know a specific type it should have,
13168 regardless of name. Previously this was done only for the exact
13169 names ".init_array", ".fini_array", and ".preinit_array".
13170 (default_elf_asm_named_section): Add comment about
13171 relationship with default_section_type_flags and SECTION_NOTYPE.
13172 (get_section): Don't consider it a type conflict if one side has
13173 SECTION_NOTYPE and the other doesn't, as long as neither has the
13174 SECTION_BSS et al used in the default_section_type_flags logic.
13176 2018-05-05 Tom de Vries <tom@codesourcery.com>
13179 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13180 (workaround_barsyncs): New function.
13181 (nvptx_reorg): Use workaround_barsyncs.
13182 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13183 (define_expand "nvptx_membar_cta"): New define_expand.
13184 (define_insn "*nvptx_membar_cta"): New insn.
13186 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13188 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13189 To improve optimization opportunities.
13190 * builtin-types.def: The new needed builtin types for the above.
13192 2018-05-04 Richard Biener <rguenther@suse.de>
13194 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13195 * gimple-ssa-store-merging.c
13196 (imm_store_chain_info::output_merged_store): Remove redundant create,
13197 release split_store vector contents on failure.
13198 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13199 scalar stmt vector on cache hit.
13201 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13203 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13205 * config.gcc (powerpc-xilinx-eabi*): Remove.
13206 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13208 (fusion_addis_mem_combo_load): Ditto.
13209 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13211 (rs6000_cpu_cpp_builtins): Ditto.
13212 * config/rs6000/rs6000-linux.c
13213 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13214 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13215 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13217 (rs6000_setup_reg_addr_masks): Ditto.
13218 (rs6000_init_hard_regno_mode_ok): Ditto.
13219 (rs6000_option_override_internal): Ditto.
13220 (legitimate_lo_sum_address_p): Ditto.
13221 (rs6000_legitimize_address): Ditto.
13222 (rs6000_legitimize_reload_address): Ditto.
13223 (rs6000_legitimate_address_p): Ditto.
13224 (abi_v4_pass_in_fpr): Ditto.
13225 (setup_incoming_varargs): Ditto.
13226 (rs6000_gimplify_va_arg): Ditto.
13227 (rs6000_split_multireg_move): Ditto.
13228 (rs6000_savres_strategy): Ditto.
13229 (rs6000_emit_prologue_components): Ditto.
13230 (rs6000_emit_epilogue_components): Ditto.
13231 (rs6000_emit_prologue): Ditto.
13232 (rs6000_emit_epilogue): Ditto.
13233 (rs6000_elf_file_end): Ditto.
13234 (rs6000_function_value): Ditto.
13235 (rs6000_libcall_value): Ditto.
13236 * config/rs6000/rs6000.h: Ditto.
13237 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13238 (TARGET_MINMAX): ... this. New.
13239 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13240 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13241 (*movsi_internal1_single): Delete.
13242 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13243 mfpu=, mxilinx-fpu): Delete.
13244 * config/rs6000/singlefp.h: Delete.
13245 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13246 * config/rs6000/t-rs6000: Ditto.
13247 * config/rs6000/t-xilinx: Delete.
13248 * config/rs6000/titan.md: Adjust for fp_type removal.
13249 * config/rs6000/vsx.md: Remove Xilinx FP support.
13250 (VStype_simple): Delete.
13251 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13252 * config/rs6000/xfpu.h: Delete.
13253 * config/rs6000/xfpu.md: Delete.
13254 * config/rs6000/xilinx.h: Delete.
13255 * config/rs6000/xilinx.opt: Delete.
13256 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13257 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13259 2018-05-04 Tom de Vries <tom@codesourcery.com>
13262 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13265 2018-05-04 Richard Biener <rguenther@suse.de>
13267 PR middle-end/85627
13268 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13269 (expand_complex_div_wide): Likewise.
13270 (expand_complex_operations_1): Likewise.
13271 (expand_complex_libcall): Preserve EH info of the original stmt.
13272 (tree_lower_complex): Handle removed blocks.
13273 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13274 on complex multiplication and division libcall builtins.
13276 2018-05-04 Richard Biener <rguenther@suse.de>
13278 PR middle-end/85574
13279 * fold-const.c (negate_expr_p): Restrict negation of operand
13280 zero of a division to when we know that can happen without
13282 (fold_negate_expr_1): Likewise.
13284 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13287 * real.h (real_nextafter): Declare.
13288 * real.c (real_nextafter): New function.
13289 * fold-const-call.c (fold_const_nextafter): New function.
13290 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13291 CASE_CFN_NEXTTOWARD.
13292 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13293 even when arg1_mode is different from arg0_mode.
13295 2018-05-03 Nathan Sidwell <nathan@acm.org>
13297 * doc/extend.texi (Deprecated Features): Remove
13298 -ffriend-injection.
13299 (Backwards Compatibility): Likewise.
13300 * doc/invoke.texi (C++ Language Options): Likewise.
13301 (C++ Dialect Options): Likewise.
13303 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13306 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13307 _mm512_mask_mullox_epi64): New intrinsics.
13309 2018-05-03 Tom de Vries <tom@codesourcery.com>
13312 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13313 dump files): Add offload-tree.
13315 2018-05-03 Richard Biener <rguenther@suse.de>
13317 PR tree-optimization/85615
13318 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13319 to loops not nested in BBs loop father to avoid creating multi-entry
13322 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13324 PR tree-optimization/70291
13325 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13326 arguments. Change return type to tree. Emit libcall as a new
13327 statement rather than replacing existing one when inplace_p is true.
13328 (expand_complex_multiplication_components): New function.
13329 (expand_complex_multiplication): Expand floating-point complex
13330 multiplication using the above.
13331 (expand_complex_division): Rename inner_type parameter to type.
13332 Update expand_complex_libcall call-site.
13333 (expand_complex_operations_1): Update expand_complex_multiplication
13334 and expand_complex_division call-sites.
13336 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13339 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13340 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13341 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13342 the highest significant bit of the shift count mask is clear. In
13343 check whether and[sq]i3 is needed verify that all significant bits
13344 of the shift count other than the highest are set.
13346 2018-05-02 Tom de Vries <tom@codesourcery.com>
13349 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13350 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13351 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13352 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13353 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13354 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13355 __builtin_goacc_parlevel_size.
13357 2018-05-02 Richard Biener <rguenther@suse.de>
13359 PR tree-optimization/85597
13360 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13361 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13364 2018-05-02 Tom de Vries <tom@codesourcery.com>
13367 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13368 dump files): Add ltrans-tree.
13370 2018-05-02 Tom de Vries <tom@codesourcery.com>
13373 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13374 dump files): Add wpa-ipa.
13376 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13378 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13379 powerpc*-*-linux*paired* target.
13380 * config/rs6000/750cl.h: Delete.
13381 * config/rs6000/paired.h: Delete.
13382 * config/rs6000/paired.md: Delete.
13383 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13385 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13386 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13387 comment. Remove paired float support.
13388 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13389 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13391 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13392 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13394 * config/rs6000/rs6000.c: Remove paired float support.
13395 (paired_expand_vector_init, paired_expand_vector_move,
13396 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13397 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13398 paired_expand_builtin, paired_expand_predicate_builtin,
13399 paired_init_builtins): Delete.
13400 * config/rs6000/rs6000.h: Remove paired float support.
13401 * config/rs6000/rs6000.md: Remove paired float support.
13402 (move_from_CR_ov_bit): Delete.
13403 * config/rs6000/rs6000.opt (mpaired): Delete.
13404 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13405 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13407 2018-05-02 Richard Biener <rguenther@suse.de>
13409 PR middle-end/85567
13410 * gimplify.c (gimplify_save_expr): When in SSA form allow
13411 SAVE_EXPRs to compute to SSA vars.
13413 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13416 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13417 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13418 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13419 clobber operands[2], instead use a new pseudo. Formatting fixes.
13421 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13423 PR tree-optimization/85586
13424 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13425 exit early for statements in the same group if the accesses are
13428 2018-05-02 Tom de Vries <tom@codesourcery.com>
13431 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13434 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13436 PR tree-optimization/85143
13437 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13439 2018-05-01 Tom de Vries <tom@codesourcery.com>
13442 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13443 not found" error message.
13445 2018-05-01 Tom de Vries <tom@codesourcery.com>
13448 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13449 * vec.c (test_ordered_remove_if): New function.
13450 (vec_c_tests): Call test_ordered_remove_if.
13451 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13452 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13453 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13454 VEC_ORDERED_REMOVE_IF.
13456 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13458 PR tree-optimization/82665
13459 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13460 pointer subtraction where arguments come from a memchr call.
13462 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13464 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13465 --push-state --as-needed and --pop-state instead of --as-needed and
13466 --no-as-needed if ld supports it.
13467 * configure: Regenerated.
13470 * doc/install.texi2html: Replace _002d with - and _002a with * in
13471 generated html files using sed.
13473 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13476 * gcc-rich-location.c (blank_line_before_p): New function.
13477 (use_new_line): New function.
13478 (gcc_rich_location::add_fixit_insert_formatted): New function.
13479 * gcc-rich-location.h
13480 (gcc_rich_location::add_fixit_insert_formatted): New function.
13482 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13484 * selftest.c (assert_streq): Rename "expected" and "actual" to
13485 "val1" and "val2". Extend NULL-handling to cover both inputs
13486 symmetrically, while still requiring both to be non-NULL for a pass.
13487 * selftest.h (assert_streq): Rename "expected" and "actual" to
13489 (ASSERT_EQ): Likewise.
13490 (ASSERT_EQ_AT): Likewise.
13491 (ASSERT_KNOWN_EQ): Likewise.
13492 (ASSERT_KNOWN_EQ_AT): Likewise.
13493 (ASSERT_NE): Likewise.
13494 (ASSERT_MAYBE_NE): Likewise.
13495 (ASSERT_MAYBE_NE_AT): Likewise.
13496 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13497 the assertion to pass.
13498 (ASSERT_STREQ_AT): Likewise.
13500 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13502 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13503 interaction with -pie.
13505 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13507 * selftest.h: Fix alphabetization of per-source-file selftest
13510 2018-04-30 Jason Merrill <jason@redhat.com>
13512 PR c++/61982 - dead stores to destroyed objects.
13513 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13516 2018-04-30 Jason Merrill <jason@redhat.com>
13518 * tree.c (build_clobber): New.
13519 * tree.h: Declare it.
13520 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13522 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13524 * diagnostic-show-locus.c (layout::layout): Update for
13525 location_get_source_line returning a char_span.
13526 (struct char_span): Move to input.h.
13527 (struct correction): Update for fields in char_span becoming
13529 (struct source_line): Update for location_get_source_line
13530 returning a char_span.
13531 (layout::print_line): Likewise.
13532 * edit-context.c (edited_file::print_content): Likewise.
13533 (edited_file::print_diff_hunk): Likewise.
13534 (edited_file::print_run_of_changed_lines): Likewise.
13535 (edited_file::get_num_lines): Likewise.
13536 (edited_line::edited_line): Likewise.
13537 * final.c (asm_show_source): Likewise.
13538 * input.c (location_get_source_line): Convert return type
13539 from const char * to char_span, losing the final "line_len"
13541 (dump_location_info): Update for the above.
13542 (get_substring_ranges_for_loc): Likewise. Use a char_span
13543 when handling the literal within the line.
13544 (test_reading_source_line): Update for location_get_source_line
13545 returning a char_span.
13546 * input.h (class char_span): Move here from
13547 diagnostic-show-locus.c, converting from a struct to a class.
13548 Make data members private.
13549 (char_span::operator bool): New.
13550 (char_span::length): New.
13551 (char_span::get_buffer): New.
13552 (char_span::operator[]): New.
13553 (char_span::subspan): Make const.
13554 (char_span::xstrdup): New.
13555 (location_get_source_line): Convert return type from const char *
13556 to char_span, losing the final "line_size" param.
13558 2018-04-30 Jan Hubicka <jh@suse.cz>
13560 * lto-wrapper.c (ltrans_priorities): New static var.
13561 (cmp_priority): New.
13562 (run_gcc): Read priorities and if doing parallel build order
13563 the Makefile by them.
13565 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13567 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13569 2018-04-30 Richard Biener <rguenther@suse.de>
13571 * tree-cfg.c (verify_address): Remove base argument, add
13572 flag whether to check TREE_ADDRESSABLE and do that.
13573 (verify_expr): Remove.
13574 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13575 (verify_gimple_assign_single): Likewise.
13576 (verify_gimple_switch): Likewise.
13577 (verify_expr_location_1): Dereference tp once. Add (disabled)
13578 piece from verify_expr.
13579 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13581 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13583 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13585 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13587 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13588 (small_data_pattern): Likewise.
13589 (arc_rewrite_small_data): Likewise.
13590 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13591 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13592 (get_symbol_alignment): New function.
13593 (legitimate_small_data_address_p): Likewise.
13594 (legitimate_scaled_address): Update, call
13595 legitimate_small_data_address_p.
13596 (output_sdata): New static variable.
13597 (arc_print_operand): Update how we handle small data operands.
13598 (arc_print_operand_address): Likewise.
13599 (arc_legitimate_address_p): Update, use
13600 legitimate_small_data_address_p.
13601 (arc_rewrite_small_data_p): Remove.
13602 (arc_rewrite_small_data_1): Likewise.
13603 (arc_rewrite_small_data): Likewise.
13604 (small_data_pattern): Likewise.
13605 (compact_sda_memory_operand): Update to use
13606 legitimate_small_data_address_p and get_symbol_alignment.
13607 (prepare_move_operands): Don't rewite sdata pattern.
13608 (prepare_extend_operands): Remove.
13609 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13611 (zero_extendqisi2): Likewise.
13612 (zero_extendhisi2): Likewise.
13613 (extendqihi2): Likewise.
13614 (extendqisi2): Likewise.
13615 (extendhisi2): Likewise.
13616 (addsi3): Likewise.
13617 (subsi3): Likewise.
13618 (andsi3): Likewise.
13619 * config/arc/constraints.md (Usd): Change it to memory constraint.
13621 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13623 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13624 as source of std instructions.
13625 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13626 allow 6-bit constants as source for store instructions.
13627 (movdi_insn): Update instruction pattern to allow 6-bit constants
13628 as source for store instructions.
13630 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13632 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13634 2018-04-30 Nathan Sidwell <nathan@acm.org>
13635 Sandra Loosemore <sandra@codesourcery.com>
13637 * dumpfile.c (dump_open): Allow '-' for stdout.
13638 * doc/invoke.texi (Developer Options): Document dump filename
13639 determination early. Document stdin/stdout selection.
13641 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13643 Microblaze Target: PIC data text relative
13645 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13646 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13648 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13649 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13650 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13651 New addressing mode for data-text relative position indepenedent code.
13652 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13653 'ADDRESS_SYMBOLIC_TXT_REL'.
13654 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13655 (microblaze_legitimate_pic_operand): Exclude function calls from
13656 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13657 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13659 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13660 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13661 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13662 for 'address + offset'.
13663 (microblaze_expand_prologue): Add new function prologue call for
13665 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13666 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13667 table in case of TARGET_PIC_DATA_TEXT_REL.
13668 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13669 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13670 Add new macros 'UNSPEC_TEXT',
13671 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13672 + exclude function calls from 'UNSPEC_PLT' in case of data text
13674 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13675 new target hook for generating address diff vector tables in case of
13677 * doc/tm.texi : Regenerate.
13678 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13679 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13680 of addr diff vector generation.
13681 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13682 target hook definition.
13683 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13684 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13685 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13686 option for data text relative.
13688 2018-04-30 Richard Biener <rguenther@suse.de>
13690 * tree-chrec.h (evolution_function_is_constant_p): Remove
13692 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13694 2018-04-30 Richard Biener <rguenther@suse.de>
13697 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13699 2018-04-30 Richard Biener <rguenther@suse.de>
13701 PR tree-optimization/28364
13702 PR tree-optimization/85275
13703 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13704 copying first exit test.
13706 2018-04-28 Mark Wielaard <mark@klomp.org>
13708 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13709 dwarf_version >= 5.
13710 (dwarf_AT): Handle DW_AT_addr_base.
13711 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13713 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13716 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13717 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13718 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13719 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13721 2018-04-28 Richard Biener <rguenther@suse.de>
13723 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13724 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13725 to reflect use. Only add interesting stmts.
13727 2018-04-27 Martin Jambor <mjambor@suse.cz>
13730 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13731 the jump function allows for passing through aggregate values.
13733 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13735 * input.h (in_system_header_at): Convert from macro to inline
13737 (from_macro_expansion_at): Likewise.
13738 (from_macro_definition_at): Likewise.
13740 2018-04-27 Jeff Law <law@redhat.com>
13742 * config.gcc: Mark tile* targets as deprecated/obsolete.
13744 2018-04-27 Richard Biener <rguenther@suse.de>
13746 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13749 2018-04-27 Richard Biener <rguenther@suse.de>
13751 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13753 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13755 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13756 with Yd constraint. Set "preferred_for_speed" attribute from
13757 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13758 with Yd constraint.
13759 (*movdi_internal): Ditto.
13760 (movti_interunit splitters): Remove
13761 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13762 (movdi_interunit splitters): Ditto.
13763 * config/i386/constraints.md (Ye): Remove.
13764 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13766 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13769 * config/aarch64/constraints.md (Usg): Limit to 31.
13770 (Usj): Limit to 63.
13772 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13774 PR tree-optimization/85529
13775 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13776 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13777 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13778 zero extension or masking of the MSB bit.
13779 (optimize_range_tests): Add FIRST_BB argument, pass it through
13780 to optimize_range_tests_var_bound.
13781 (maybe_optimize_range_tests, reassociate_bb): Adjust
13782 optimize_range_tests callers.
13784 2018-04-26 Richard Biener <rguenther@suse.de>
13785 Jakub Jelinek <jakub@redhat.com>
13787 * cgraph.h (symbol_table): Just declare debug method here.
13788 * symtab.c (symbol_table::debug): Define.
13790 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13792 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13794 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13796 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13797 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13798 (*movdi_internal): Substitute Yi and Yj constraint with x
13799 and Ym and Yn constraint with y constraint. Update "isa"
13800 attribute and set "preferred_for_speed" attribute from
13801 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13802 (*movsi_internal): Ditto.
13803 (*movdf_internal): Ditto.
13804 (*movsf_internal): Ditto.
13805 (*zero_extendsidi2): Ditto.
13806 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13807 (sse2_loadld): Ditto.
13808 (*vec_extract<ssevecmodelower>_0): Ditto.
13809 (*vec_extractv4si_0_zext_sse4): Ditto.
13810 (vec_concatv2di): Ditto.
13811 (*vec_dup<mode>): Ditto.
13812 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13813 * config/i386/constraints.md (Yi): Remove.
13818 2018-04-26 Nathan Sidwell <nathan@acm.org>
13820 * dumpfile.c (dump_open): New.
13821 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13822 (dump_finish): Detect stdio/stderr by value not name.
13824 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13826 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13828 2018-04-26 Tom de Vries <tom@codesourcery.com>
13831 * config/nvptx/nvptx.c (verify_neutering_jumps)
13832 (verify_neutering_labels): New function
13833 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13835 2018-04-26 Tom de Vries <tom@codesourcery.com>
13838 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13839 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13842 2018-04-26 Richard Biener <rguenther@suse.de>
13843 Tom de Vries <tom@codesourcery.com>
13846 * lto-streamer-out.c (output_function): Fixup loops if required to match
13847 discovery done in the reader.
13849 2018-04-26 Richard Biener <rguenther@suse.de>
13851 PR tree-optimization/85116
13852 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13853 have a loop exit from the single latch predecessor. Remove
13854 case of header with just condition.
13855 (ch_base::copy_headers): Exclude infinite loops from any
13857 (pass_ch::execute): Record exits.
13859 2018-04-26 Richard Biener <rguenther@suse.de>
13861 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13862 prologue cost vector and pass it to vect_get_load_cost.
13863 (vect_get_peeling_costs_all_drs): Likewise.
13864 (vect_peeling_hash_get_lowest_cost): Likewise.
13865 (vect_enhance_data_refs_alignment): Likewise.
13867 2018-04-26 Richard Biener <rguenther@suse.de>
13869 PR middle-end/85450
13870 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13871 checking of integer<->pointer conversions.
13872 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13873 sign-/zero-extending pointer types.
13874 (expand_omp_for_static_chunk): Likewise.
13876 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13877 Jean Lee <xiaoyur347@gmail.com>
13879 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13880 (TARGET_ASAN_SHADOW_OFFSET): Define.
13881 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13882 true for -fsanitize=address.
13884 2018-04-25 Mark Wielaard <mark@klomp.org>
13886 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13889 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13891 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13892 than "alu", remove explicit "memory" and "imm_disp" attributes.
13893 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13895 PR middle-end/85414
13896 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13897 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13898 gen_lowpart_no_emit.
13900 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13903 * config/i386/i386.c (ix86_expand_builtin): Change memory
13904 operand to XI, extend p0 to Pmode.
13905 * config/i386/i386.md: Change unspec volatile and operand
13906 1 mode to XI, change operand 0 mode to P.
13908 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13910 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13911 GET_MODE_MASK before any checking.
13912 (nds32_can_use_bset_p): Likewise.
13913 (nds32_can_use_btgl_p): Likewise.
13915 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13917 * config/nds32/nds32-doubleword.md: New define_split pattern for
13918 illegal register number.
13920 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13922 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13924 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13926 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13928 2018-04-25 Richard Biener <rguenther@suse.de>
13930 * lto-streamer.h (LTO_major_version): Bump to 8.
13932 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13934 * BASE-VER: Set to 9.0.0.
13936 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13938 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13939 in __abskf2 and __powikf2.
13941 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13944 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13945 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13946 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13947 Use the above on operand 2. Reindent.
13948 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13950 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13953 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13955 * config/i386/i386.opt (mcet): Removed.
13956 * doc/install.texi: Remove -mcet documentation.
13957 * doc/invoke.texi: Likewise.
13959 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13962 * doc/install.texi: Remove -mcet from bootstrap-cet.
13964 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13967 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13968 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13972 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13973 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13974 containing a CONST_VECTOR.
13976 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13978 * doc/install.texi: Update newlib dependency for nvptx.
13980 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13983 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13984 instead of INTVAL when shifting x left.
13986 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13988 PR tree-optimization/85478
13989 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13990 vect_grouped_store_supported for single element vectors.
13992 2018-04-24 Richard Biener <rguenther@suse.de>
13995 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13996 load cost increase to the case of non-constant step.
13998 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14001 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14002 destination if any_malformed_asm.
14004 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14006 PR middle-end/85496
14007 * expr.c (store_field): In the bitfield case, if the value comes from
14008 a function call and is returned in registers by means of a PARALLEL,
14009 do not change the mode of the temporary unless BLKmode and VOIDmode.
14011 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14013 PR rtl-optimization/85423
14014 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14015 dependencies to debug insns when the previous insn is non-debug.
14017 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14019 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14020 enums into a single definition.
14021 (fls): Fix predicates and printing.
14024 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14026 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14027 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14028 and short u6 immediate.
14029 (check_if_valid_sleep_operand): Remove.
14030 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14032 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14034 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14035 flag_always_save_lp condition.
14036 * config/nds32/nds32.opt (malways-save-lp): New option.
14038 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14040 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14041 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14042 * config/nds32/nds32.h
14043 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14044 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14046 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14048 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14049 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14051 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14052 Chung-Ju Wu <jasonwucj@gmail.com>
14054 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14056 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14057 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14059 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14061 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14063 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14065 * config/nds32/nds32-protos.h (nds32_data_alignment,
14066 nds32_local_alignment): Declare.
14067 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14068 nds32_local_alignment): New functions.
14069 (TARGET_CONSTANT_ALIGNMENT): Define.
14070 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14072 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14074 * config/nds32/nds32.c
14075 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14076 (TARGET_MODES_TIEABLE_P): Likewise.
14078 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14080 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14081 level Ofast and Og.
14083 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14084 Chung-Ju Wu <jasonwucj@gmail.com>
14086 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14087 for unaligned access.
14088 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14090 * config/nds32/nds32-intrinsic.md: Likewise.
14091 * config/nds32/nds32_intrinsic.h: Likewise.
14092 * config/nds32/nds32.h (nds32_builtins): Likewise.
14093 * config/nds32/nds32.opt (munaligned-access): New option.
14094 * config/nds32/nds32.c (nds32_asm_file_start): Display
14095 flag_unaligned_access status.
14097 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14099 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14100 -mno-relax is present.
14101 * config/riscv/linux.h (LINK_SPEC): Ditto.
14103 2018-04-20 Martin Sebor <msebor@redhat.com>
14106 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14108 (gimple_fold_builtin_stxcpy_chk): Same.
14109 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14111 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14114 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14115 __powikf2 when long double is IEEE 128-bit.
14117 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14119 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14120 step to make sure stack always aligned.
14122 2018-04-20 Carl Love <cel@us.ibm.com>
14125 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14126 size check for arg0.
14128 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14129 Tom de Vries <tom@codesourcery.com>
14132 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14133 Emit insns for calls too.
14134 (nvptx_find_par): Always look for worker-level predecessor insn.
14135 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14137 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14138 (nvptx_process_pars): Propagate frames for calls.
14140 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14143 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14145 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14146 (ix86_handle_option): Don't handle OPT_mibt.
14147 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14149 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14151 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14152 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14153 (ix86_target_macros): Define __CET__ with flag_cf_protection
14154 for -fcf-protection.
14155 * config/i386/i386.c (isa2_opts): Remove -mibt.
14156 * config/i386/i386.h (TARGET_IBT): Removed.
14157 (TARGET_IBT_P): Likewise.
14158 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14159 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14160 * config/i386/i386.opt (mcet): Update help message.
14161 (mshstk): Likewise.
14163 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14164 -mcet as an alias for -mshstk.
14166 2018-04-20 Richard Biener <rguenther@suse.de>
14168 PR middle-end/85475
14169 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14170 complexity by forcing a single use of the multiply operand.
14172 2018-04-20 Martin Jambor <mjambor@suse.cz>
14175 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14176 recursion dependency to only apply to non-clones.
14178 2018-04-20 Martin Jambor <mjambor@suse.cz>
14181 * ipa-cp.c (create_specialized_node): Check that clones of
14182 self-recursive edges exist during IPA-CP.
14184 2018-04-19 Toon Moene <toon@moene.org>
14186 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14189 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14191 PR tree-optimization/85467
14192 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14193 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14194 VECTOR_CST element to type.
14196 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14199 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14200 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14201 (builtin_longjmp): Likewise.
14202 (save_stack_nonlocal): New pattern.
14203 (restore_stack_nonlocal): Likewise.
14205 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14208 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14209 Replace ASM_OUTPUT_LABEL with fprintf.
14211 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14214 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14215 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14216 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14217 define __IBT__ and __SHSTK__ for -fcf-protection.
14218 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14220 (ix86_trampoline_init): Likewise.
14221 (x86_output_mi_thunk): Likewise.
14222 (ix86_notrack_prefixed_insn_p): Likewise.
14223 (ix86_option_override_internal): Don't disallow -fcf-protection.
14224 * config/i386/i386.md (rdssp<mode>): Also enable for
14226 (incssp<mode>): Likewise.
14227 (nop_endbr): Likewise.
14228 * config/i386/i386.opt (mcet): Change help message to built-in
14231 (mshstk): Likewise.
14232 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14233 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14234 enable CET built-in functions.
14236 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14238 * common/config/i386/i386-common.c
14239 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14240 OPTION_MASK_ISA_MOVDIRI_UNSET,
14241 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14242 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14243 * config.gcc (movdirintrin.h): New header.
14244 * config/i386/cpuid.h (bit_MOVDIRI,
14245 bit_MOVDIR64B): New bits.
14246 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14248 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14249 (VOID, PVOID, PCVOID)): New function types.
14250 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14251 __builtin_ia32_directstoreu_u64,
14252 __builtin_ia32_movdir64b): New builtins.
14253 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14254 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14256 (ix86_valid_target_attribute_inner_p): Ditto.
14257 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14258 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14259 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14260 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14261 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14262 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14263 (movdiri<mode>, movdir64b_<mode>): New.
14264 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14265 * config/i386/immintrin.h: Include movdirintrin.h.
14266 * config/i386/movdirintrin.h: New file.
14267 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14269 2018-04-19 Richard Biener <rguenther@suse.de>
14271 PR middle-end/85455
14272 * cfg.c (clear_bb_flags): When loop state says we have
14273 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14275 2018-04-19 Richard Biener <rguenther@suse.de>
14277 PR tree-optimization/84737
14278 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14279 copying restrict info.
14280 (vect_setup_realignment): Use it.
14281 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14282 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14283 the first DR to all generated stores.
14284 (vectorizable_load): Likewise for loads.
14286 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14288 PR tree-optimization/85446
14289 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14290 the integral and pointer types to have the same precision.
14292 * doc/install.texi: Document --disable-cet being the default and
14295 2018-04-18 Martin Liska <mliska@suse.cz>
14297 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14300 2018-04-18 Martin Liska <mliska@suse.cz>
14303 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14306 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14307 arguments if they are comparable.
14309 2018-04-18 Martin Liska <mliska@suse.cz>
14312 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14315 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14318 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14321 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14322 ENDBR after calling __morestack.
14324 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14327 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14328 by using gcc_base_ver to generate a gcc_driver_version, and use
14329 it when generating GCC_DRIVER_NAME.
14330 * configure: Regenerate.
14332 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14335 * config.gcc: Obsolete powerpc*-*-*spe*.
14337 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14340 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14341 (stabstr_D): Change type of unum from unsigned int to
14342 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14345 2018-04-17 Jim Wilson <jimw@sifive.com>
14348 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14349 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14350 Set arg_pointer_offset after using pretend_args_size.
14352 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14354 PR rtl-optimization/85431
14355 * dse.c (record_store): Ignore zero width stores.
14358 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14359 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14360 __builtin_stack_restore rather than after it.
14361 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14362 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14363 argument instead of virtual_dynamic_stack_rtx.
14365 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14367 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14369 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14370 Add note to error message to explain internal mapping of overloaded
14371 built-in function name to non-overloaded built-in function name.
14372 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14375 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14378 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14379 where the inputs overlap with the output.
14381 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14383 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14384 (=v, v) alternative and explicit "memory" attribute.
14385 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14386 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14388 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14389 "sselog1" type instead of "sselog".
14390 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14391 "sselog". Remove explicit "memory" attribute.
14392 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14393 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14395 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14396 "sselog1" type instead of "sselog". Remove explicit "memory"
14398 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14399 use "sselog1" type instead of "sselog". Remove explicit "memory"
14401 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14402 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14404 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14405 "sselog1" type instead of "sselog". Remove explicit "memory"
14407 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14408 use "sselog1" type instead of "sselog". Remove explicit "memory"
14412 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14414 PR middle-end/85414
14415 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14418 2018-04-17 Martin Jambor <mjambor@suse.cz>
14421 * ipa-cp.c (create_specialized_node): Call
14422 expand_all_artificial_thunks if necessary.
14424 2018-04-17 Martin Liska <mliska@suse.cz>
14427 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14428 in message, remote space in between '_G' and '('.
14430 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14433 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14434 avx512f_vmcmp<mode>3<round_saeonly_name>,
14435 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14436 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14437 avx512f_rndscale<mode><round_saeonly_name>,
14438 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14439 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14440 Use %<iptr>2 instead of %2 for -masm=intel.
14441 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14442 avx512f_vcvttss2usi<round_saeonly_name>,
14443 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14445 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14446 avx512f_vcvttsd2usi<round_saeonly_name>,
14447 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14448 Use %q1 instead of %1 for -masm=intel.
14449 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14450 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14451 of %3 for -masm=intel.
14452 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14454 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14456 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14458 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14459 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14461 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14463 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14464 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14465 %g1 and one with %0 and %1.
14466 (avx512er_vmrcp28<mode><round_saeonly_name>,
14467 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14468 %1 for -masm=intel.
14469 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14470 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14471 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14472 of %0 and %{%4%} for -masm=intel.
14473 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14474 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14475 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14476 order of %0 and %{%5%}%{z%} for -masm=intel.
14478 2018-04-17 Jan Hubicka <jh@suse.cz>
14481 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14483 2018-04-17 Martin Liska <mliska@suse.cz>
14486 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14487 for target_clone error message. Make default implementation
14488 clone to be a local declaration.
14489 (separate_attrs): Add new argument and check for an empty
14491 (expand_target_clones): Handle it.
14492 (ipa_target_clone): Make redirection just for target_clones
14495 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14496 Tom de Vries <tom@codesourcery.com>
14498 PR middle-end/84955
14499 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14500 tiled basic blocks without omp continue statements.
14502 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14505 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14506 vec_extract expression as having side effects to make sure it gets
14509 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14512 * config/i386/i386.c (get_builtin_code_for_version): Check
14515 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14518 * config.gcc: Support "skylake".
14519 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14521 * config/i386/i386.c (m_SKYLAKE): Define.
14522 (processor_target_table): Add "skylake".
14523 (ix86_option_override_internal): Add "skylake".
14524 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14525 PROCESSOR_CANNONLAKE.
14526 (get_builtin_code_for_version): Fix priority for
14527 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14528 PROCESSOR_SKYLAKE-AVX512.
14529 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14530 (processor_type): Add PROCESSOR_SKYLAKE.
14532 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14533 Jason Merrill <jason@redhat.com>
14536 * convert.c (convert_to_integer_1): Use direct recursion for
14537 enumeral types and types with a precision less than the number
14538 of bits in their mode.
14540 2018-04-16 Julia Koval <julia.koval@intel.com>
14543 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14544 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14546 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14549 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14550 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14551 and -mno-direct-move.
14553 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14556 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14557 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14558 Ensure negative shifts result in {0}.
14560 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14562 PR rtl-optimization/79916
14563 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14564 regs (if any) to define how to gnerate SD moves when LRA is in
14567 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14569 PR rtl-optimization/85393
14570 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14571 * except.c (expand_dw2_landing_pad_for_region): Make static.
14572 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14573 a label and unconditional jump to old_bb, rather than
14574 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14577 PR rtl-optimization/85376
14578 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14579 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14580 instead of a specific value.
14582 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14583 Bin Cheng <bin.cheng@arm.com>
14585 PR tree-optimization/82965
14586 PR tree-optimization/83991
14587 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14588 by_profile_only parameter.
14589 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14590 information if the loop was predicted to iterate too many times.
14591 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14593 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14596 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14599 2018-04-13 Martin Liska <mliska@suse.cz>
14600 Jakub Jelinek <jakub@redhat.com>
14602 PR middle-end/81657
14603 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14604 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14605 * builtins.c (expand_builtin_memory_copy_args): Use
14606 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14607 handle dest_addr == pc_rtx.
14609 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14612 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14613 asked to not generate direct moves.
14614 (fix_trunc<mode>si2_stfiwx): Similar.
14615 (fix_trunc<mode>si2_internal): Similar.
14617 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14620 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14621 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14622 lookup if dest in some wider mode is known to be const0_rtx and
14623 if so, record permanent equivalence for it to be ZERO_EXTEND of
14624 the narrower mode destination.
14626 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14628 * lto-streamer-out.c (output_function): Revert 259346.
14629 * omp-expand.c (expand_oacc_for): Likewise.
14631 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14633 PR rtl-optimization/85354
14634 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14635 * sel-sched.c (sel_global_init): ... here.
14637 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14640 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14641 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14642 mode for PE-COFF targets.
14643 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14644 (i386_pe_asm_lto_end): Likewise.
14645 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14646 (TARGET_ASM_LTO_END): Likewise.
14647 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14648 (i386_pe_asm_lto_start): New function.
14649 (i386_pe_asm_lto_end): Likewise.
14651 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14652 Richard Biener <rguenther@suse.de>
14654 PR middle-end/84955
14655 * lto-streamer-out.c (output_function): Fix CFG loop state before
14657 * omp-expand.c (expand_oacc_for): Handle calls to internal
14658 functions like regular functions.
14660 2018-04-12 Richard Biener <rguenther@suse.de>
14663 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14664 for the early LTO debug to properly generate references to it
14665 during DIE emission. Do not re-use that for the skeleton for
14667 (dwarf2out_early_finish): Likewise.
14669 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14672 * config/i386/sse.md
14673 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14674 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14675 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14676 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14677 and output is a reg, avoid creating invalid lowpart subreg, but
14678 instead split into a 512-bit move. Don't split if not AVX512VL,
14679 input is xmm16+ reg and output is a mem.
14680 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14681 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14682 xmm16+ reg and output is a mem.
14684 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14686 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14687 also for flag_dwarf2_cfi_asm.
14689 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14691 PR rtl-optimization/85342
14692 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14693 a bool scalar var inside of the loop instead. Don't try to update
14694 recog_data.operand after failed apply_change_group.
14696 2018-04-12 Tom de Vries <tom@codesourcery.com>
14699 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14700 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14701 array with flexible array member as array without given dimension.
14702 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14703 argument for undefined param to true.
14705 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14708 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14709 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14710 from PowerPC section.
14711 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14712 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14713 help text that is too long.
14714 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14715 help text that is too long.
14716 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14717 help text that is too long.
14719 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14721 * config/alpha/alpha.md (stack_probe_internal): Rename
14722 from "probe_stack". Update all callers.
14724 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14726 PR rtl-optimization/84566
14727 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14728 sched_macro_fuse_insns.
14730 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14733 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14734 (compute_block_dependences): ... from here.
14736 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14738 PR tree-optimization/85331
14739 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14740 from int to HOST_WIDE_INT.
14742 2018-04-11 Martin Jambor <mjambor@suse.cz>
14745 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14746 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14747 not the same as the source val.
14748 (cgraph_edge_brings_value_p): New parameter.
14749 (gather_edges_for_value): Pass destination value to
14750 cgraph_edge_brings_value_p.
14751 (perhaps_add_new_callers): Likewise.
14752 (get_info_about_necessary_edges): Likewise and exclude values brought
14753 only by self-recursive edges.
14754 (create_specialized_node): Redirect only clones of self-calling edges.
14755 (+self_recursive_pass_through_p): New function.
14756 (find_more_scalar_values_for_callers_subset): Use it.
14757 (find_aggregate_values_for_callers_subset): Likewise.
14758 (known_aggs_to_agg_replacement_list): Removed.
14759 (decide_whether_version_node): Re-calculate known constants for all
14760 remaining context clones.
14762 2018-04-11 Richard Biener <rguenther@suse.de>
14765 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14766 from early DWARF output.
14767 (dwarf2out_early_finish): Output line info unconditionally into
14768 early DWARF and add reference to it.
14770 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14773 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14774 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14775 other than V2DFmode using iptr mode attribute.
14776 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14778 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14780 PR rtl-optimization/84659
14781 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14783 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14786 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14788 (output_loc_list): Pass address of a dummy size variable even in the
14789 locview handling loop.
14790 (index_location_lists): Add comment on why skip_loc_list_entry can't
14793 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14796 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14799 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14802 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14803 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14804 and -mstring-compare-inline-limit.
14806 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14809 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14810 for stack clash protection in a register whenever we need it to be in
14813 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14815 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14816 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14818 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14821 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14823 (mlong-double-): Ditto.
14824 * config/rs6000/sysv4.opt (msdata=): Ditto.
14825 (mtls-size=): Ditto.
14827 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14829 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14830 erroneous entries for
14831 "vector int vec_ldl (int, long int *)", and
14832 "vector unsigned int vec_ldl (int, unsigned long int *)".
14833 Add comments and entries for
14834 "vector bool char vec_ldl (int, bool char *)",
14835 "vector bool short vec_ldl (int, bool short *)",
14836 "vector bool int vec_ldl (int, bool int *)",
14837 "vector bool long long vec_ldl (int, bool long long *)",
14838 "vector pixel vec_ldl (int, pixel *)",
14839 "vector long long vec_ldl (int, long long *)",
14840 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14841 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14842 type tree bool_long_long_type_node and correct definition of
14843 bool_V2DI_type_node to make reference to this new type tree.
14844 (rs6000_mangle_type): Replace erroneous reference to
14845 bool_long_type_node with bool_long_long_type_node.
14846 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14847 comments to emphasize sign distinctions for char and int types and
14848 replace RS6000_BTI_bool_long constant with
14849 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14850 use of RS6000_BTI_pixel.
14851 (bool_long_type_node): Remove this macro definition.
14852 (bool_long_long_type_node): New macro definition
14854 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14856 PR rtl-optimization/85300
14857 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14858 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14859 simplify_unary_operation fails.
14861 2018-04-10 Martin Liska <mliska@suse.cz>
14863 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14864 cgraph_edge and ipa_ref.
14866 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14870 * config/i386/sse.md
14871 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14872 computation of the VEC_MERGE selector from mask.
14873 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14874 Fix decoding of the VEC_MERGE selector into mask.
14876 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14878 PR tree-optimization/85286
14879 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14881 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14883 * final.c (final_1): Set insn_last_address as well as
14884 insn_current_address.
14886 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14889 * explow.c (emit_stack_probe): Call validize_mem on memory location
14890 before passing it to gen_probe_stack. Create address operand and
14891 legitimize it for the probe_stack_address case.
14893 2018-04-09 Jan Hubicka <jh@suse.cz>
14896 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14897 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14898 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14900 (free_lang_data): Rebuild type inheritance graph.
14902 2018-04-09 Martin Sebor <msebor@redhat.com>
14904 * invoke.texi (-finline-small-functions): Mention other optimization
14906 (-findirect-inlining, -fpartial-inlining): Same.
14907 (-finline-functions-called-once): Same.
14908 (-freorder-blocks-and-partition): Same.
14910 2018-04-09 Jan Hubicka <jh@suse.cz>
14913 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14914 jumps; choose last target that matches the criteria (i.e.
14915 no partition changes for non-crossing jumps).
14916 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14917 support for redirecting crossing jumps to non-crossing.
14919 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14921 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14922 also for naked functions.
14924 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14926 * config/arc/arc.md (add_shift): New pattern.
14927 (add_shift2): Likewise.
14928 (sub_shift): Likewise.
14929 (sub_shift_cmp0_noout): Likewise.
14930 (compare_si_ashiftsi): Likewise.
14931 (xbfu_cmp0_noout): New combine pattern.
14932 (xbfu_cmp0"): Likewise.
14933 (movsi_set_cc_insn): Place the predicable variant first.
14934 (commutative_binary_cmp0_noout): Remove clobber.
14935 (commutative_binary_cmp0): New pattern.
14936 (noncommutative_binary_cmp0): Likewise.
14937 (noncommutative_binary_cmp0_noout): Likewise.
14938 (noncommutative_binary_comparison_result_used): Removed.
14939 (rsub_cmp0): New pattern.
14940 (rsub_cmp0_noout): Likewise.
14941 (extzvsi): Changed, keep only meaningful variants.
14942 (SQH, SEZ): New iterators.
14943 (SQH_postfix): New mode attribute.
14944 (SEZ_prefix): New code attribute.
14945 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14946 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14947 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14948 of numerical value.
14949 (noncommutative_operator): Check the availability of barrel
14952 2018-04-09 Richard Biener <rguenther@suse.de>
14954 PR tree-optimization/85284
14955 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14956 Only use the niter constraining form of simple_iv when the exit
14957 is always executed.
14959 2018-04-09 Tom de Vries <tom@codesourcery.com>
14962 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14963 (define_expand "*memory_barrier"): New define_expand.
14964 (define_insn "memory_barrier"): New insn.
14966 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14968 PR rtl-optimization/80463
14969 PR rtl-optimization/83972
14970 PR rtl-optimization/83480
14972 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14973 correct producer for the insn.
14974 (tidy_control_flow): Fixup seqnos in case of debug insns.
14976 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14978 PR rtl-optimization/83913
14980 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14981 different sched-times when merging exprs.
14983 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14985 PR rtl-optimization/83962
14987 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14988 tidy_fallthru_edge and tidy_control_flow.
14990 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14992 PR rtl-optimization/83530
14994 * sel-sched.c (force_next_insn): New global variable.
14995 (remove_insn_for_debug): When force_next_insn is true, also leave only
14996 next insn in the ready list.
14997 (sel_sched_region): When the region wasn't scheduled, make another pass
14998 over it with force_next_insn set to 1.
15000 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15002 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15004 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15005 for interrupt control.
15006 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15007 functions for interrupt control.
15008 * config/nds32/nds32-intrinsic.md: Likewise.
15009 * config/nds32/nds32_intrinsic.h: Likewise.
15010 * config/nds32/nds32.h (nds32_builtins): Likewise.
15012 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15014 * config/nds32/nds32.c (nds32_init_machine_status,
15015 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15016 strict_aligned_p field.
15017 (nds32_expand_to_rtl_hook): New function.
15018 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15019 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15021 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15022 Chung-Ju Wu <jasonwucj@gmail.com>
15024 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15025 * config/nds32/nds32-n7.md: New file.
15026 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15027 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15029 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15030 * config/nds32/nds32.md (pipeline_model): Add n7.
15031 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15032 * config/nds32/pipelines.md: Include n7 settings.
15034 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15035 Chung-Ju Wu <jasonwucj@gmail.com>
15037 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15038 * config/nds32/nds32-e8.md: New file.
15039 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15040 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15042 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15043 * config/nds32/nds32.md (pipeline_model): Add e8.
15044 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15045 * config/nds32/pipelines.md: Include e8 settings.
15047 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15048 Chung-Ju Wu <jasonwucj@gmail.com>
15050 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15051 * config/nds32/nds32-n8.md: New file.
15052 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15053 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15055 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15056 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15057 * config/nds32/nds32.md (pipeline_model): Add n8.
15058 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15059 * config/nds32/pipelines.md: Include n8 settings.
15061 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15062 Chung-Ju Wu <jasonwucj@gmail.com>
15064 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15065 * config/nds32/nds32-n9-2r1w.md: New file.
15066 * config/nds32/nds32-n9-3r2w.md: New file.
15067 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15068 nds32_register_ports): New or modify for cpu n9.
15069 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15071 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15072 * config/nds32/nds32-utils.c: New file.
15073 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15074 TARGET_MUL_SLOW): Define.
15075 * config/nds32/nds32.md (pipeline_model): New attribute.
15076 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15077 New options that support cpu n9.
15078 * config/nds32/pipelines.md: Include n9 settings.
15079 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15081 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15083 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15084 information if necessary.
15085 (output_cond_branch_compare_zero): Likewise.
15086 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15087 (nds32_target_alignment): Refine for alignment.
15088 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15089 (FUNCTION_BOUNDARY): Modify.
15090 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15092 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15094 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15096 * config/nds32/constants.md (unspec_volatile_element): Add values for
15097 TLB operation and data prefetch.
15098 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15099 functions for TLB operation and data prefetch.
15100 * config/nds32/nds32-intrinsic.md: Likewise.
15101 * config/nds32/nds32_intrinsic.h: Likewise.
15102 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15103 (nds32_print_operand): Likewise.
15104 * config/nds32/nds32.h (nds32_builtins): Likewise.
15106 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15107 Andrew Pinski <pinsika@gcc.gnu.org>
15109 PR middle-end/82976
15110 * match.pd: Use constant_boolean_node of correct type instead of
15111 boolean_true_node or boolean_false_node for simplifying
15112 pointer comparisons to zero.
15114 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15116 PR tree-optimization/80021
15117 * tree.c (verify_type_variant): Make error call in verify_variant_match
15118 translatable and remove final full stop.
15120 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15122 * config/nds32/constants.md (unspec_volatile_element): Add
15123 UNSPEC_VOLATILE_EH_RETURN.
15124 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15125 nds32_output_stack_pop): Support dwarf exception handling process.
15126 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15127 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15128 exception handling process.
15129 (nds32_compute_stack_frame): Likewise.
15130 (nds32_return_addr_rtx): Likewise.
15131 (nds32_initial_elimination_offset): Likewise.
15132 (nds32_expand_prologue): Likewise.
15133 (nds32_expand_epilogue): Likewise.
15134 (nds32_dynamic_chain_address): New function.
15135 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15136 exception handling.
15137 (DYNAMIC_CHAIN_ADDRESS): Define.
15138 (EH_RETURN_DATA_REGNO): Define.
15139 (EH_RETURN_STACKADJ_RTX): Define.
15140 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15141 patterns for dwarf exception handling.
15143 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15145 * config/nds32/nds32.h: Clean up obsolete macros.
15147 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15149 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15150 Add enum values for particular instructions.
15151 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15152 particular intrinsic functions.
15153 * config/nds32/nds32-intrinsic.md: Likewise.
15154 * config/nds32/nds32_intrinsic.h: Likewise.
15155 * config/nds32/nds32.h (nds32_builtins): Likewise.
15156 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15157 (btst, ave): New patterns for particular instructions.
15159 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15161 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15162 Add enum values for atomic load/store and memory sync.
15163 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15165 * config/nds32/nds32-intrinsic.md: Likewise.
15166 * config/nds32/nds32_intrinsic.h: Likewise.
15167 * config/nds32/nds32.h (nds32_builtins): Likewise.
15169 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15171 PR tree-optimization/85257
15172 * fold-const.c (native_encode_vector): If not all elts could fit
15173 and off is -1, return 0 rather than offset.
15174 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15175 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15176 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15177 adjust buffer in native_interpret_expr call.
15179 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15181 * config/nds32/constants.md (unspec_volatile_element): Add cache
15182 control enum values.
15183 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15184 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15185 * config/nds32/nds32.c (nds32_cctl_names): New.
15186 (nds32_print_operand): Handle cache control register names.
15187 * config/nds32/nds32.h (nds32_builtins): New enum values.
15188 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15190 * config/nds32/nds32.md (type): Add mmu.
15191 * config/nds32/pipelines.md (simple_insn): Add mmu.
15193 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15195 * config/nds32/nds32.md (type): Remove call.
15196 * config/nds32/pipelines.md (simple_insn): Likewise.
15198 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15200 * config/nds32/constants.md (unspec_volatile_element): Add
15201 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15202 UNSPEC_VOLATILE_FMFCFG.
15203 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15204 description for fmfcfg and fmfcsr.
15205 (bdesc_1arg): Add fmtcsr.
15206 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15207 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15208 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15209 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15210 unspec_fmfcfg): New patterns.
15211 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15212 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15213 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15214 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15215 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15216 __nds32__fmfcfg): Define.
15218 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15220 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15221 intrinsic register names.
15222 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15223 intrinsic register enum values and macros.
15225 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15227 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15228 for load/store addressing form.
15229 (nds32_print_operand_address): Likewise.
15231 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15234 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15235 based on LABEL_REF. Remove useless assertion.
15236 (pic_address_needs_scratch): Fix formatting.
15237 (sparc_legitimize_pic_address): Minor tweaks.
15238 (sparc_delegitimize_address): Adjust assertion accordingly.
15239 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15240 into symbolic_operand.
15241 (movsi_high_pic_label_ref): Likewise.
15242 (movsi_lo_sum_pic_label_ref): Likewise.
15243 (movdi_pic_label_ref): Likewise.
15244 (movdi_high_pic_label_ref): Likewise.
15245 (movdi_lo_sum_pic_label_ref): Likewise.
15247 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15249 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15250 custom LIB_SPEC setup.
15252 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15253 Kito Cheng <kito.cheng@gmail.com>
15255 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15256 * config/riscv/freebsd.h: New.
15258 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15260 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15261 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15264 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15265 Kito Cheng <kito.cheng@gmail.com>
15267 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15268 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15269 * config/nds32/nds32-protos.h (nds32_output_call,
15270 nds32_output_return): Declare.
15271 * config/nds32/nds32.md: Refine all the call and return patterns.
15273 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15276 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15277 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15279 PR rtl-optimization/84872
15280 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15281 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15282 EDGE_CROSSING edge.
15284 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15286 * expr.c (copy_blkmode_to_reg): Revert 254862.
15287 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15289 2018-04-06 Richard Biener <rguenther@suse.de>
15291 PR middle-end/85244
15292 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15293 after seeing a component reference with an adjacent field. Treat
15294 refs to arrays at struct end of external decls similar to
15295 refs to unconstrained commons.
15297 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15300 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15301 look through SAVE_EXPRs with non-side-effects argument. Adjust
15303 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15306 2018-04-06 Richard Biener <rguenther@suse.de>
15308 PR middle-end/85180
15309 * alias.c (find_base_term): New wrapper around find_base_term
15310 unwinding CSELIB_VAL_PTR changes.
15311 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15314 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15316 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15318 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15319 constant definitions.
15320 ("nop"): lr 0,0 -> nopr r0
15321 ("nop_lr0", "nop_lr1"): New insn definitions.
15323 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15325 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15326 NDS32_V3PUSH_AVAILABLE_P macro.
15328 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15329 Chung-Ju Wu <jasonwucj@gmail.com>
15331 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15332 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15333 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15334 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15335 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15336 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15337 * config/nds32/constraints.md: New constraints and checking for hard
15338 float configuration.
15339 * config/nds32/iterators.md: New mode iterator and attribute for hard
15340 float configuration.
15341 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15343 * config/nds32/nds32-fpu.md: New file.
15344 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15345 deal with hard float code generation.
15346 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15348 (abi_type, float_reg_number): New enum type.
15349 * config/nds32/nds32-predicates.c: New predicates for hard float.
15350 * config/nds32/nds32-protos.h: Declare functions for hard float.
15351 * config/nds32/nds32.c: Implementation for hard float configuration.
15352 * config/nds32/nds32.h: Definitions for hard float configuration.
15353 * config/nds32/nds32.md: Include hard float machine description and
15354 modify patterns for hard float configuration.
15355 * config/nds32/nds32.opt: New options for hard float configuration.
15356 * config/nds32/predicates.md: New predicates for hard float
15359 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15361 * common/config/nds32/nds32-common.c
15362 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15364 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15366 PR middle-end/85195
15367 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15368 CONSTRUCTOR_ELT (ctor, ...)->value.
15370 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15373 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15375 2018-04-05 Tom de Vries <tom@codesourcery.com>
15378 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15381 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15382 Kito Cheng <kito.cheng@gmail.com>
15384 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15385 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15386 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15387 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15389 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15390 Kito Cheng <kito.cheng@gmail.com>
15392 * config/nds32/constraints.md (Ufe): New memory constraint.
15393 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15394 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15395 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15397 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15398 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15400 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15402 * config/nds32/nds32.md: Use optimize_size in the condition for
15403 alu-shift instructions.
15405 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15407 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15409 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15411 * config/nds32/nds32.md (negsi2): Refine pattern.
15413 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15414 Chung-Ju Wu <jasonwucj@gmail.com>
15416 * config/nds32/iterators.md (shift_rotate): New code iterator.
15417 (shift): New code attribute.
15418 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15419 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15420 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15421 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15422 bit-wise operations.
15423 (andsi3, *andsi3): Ditto.
15424 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15425 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15426 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15427 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15428 nds32_ior_operand, nds32_xor_operand): New predicates.
15430 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15432 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15433 (addsi3, subsi3): ... this.
15435 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15437 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15439 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15441 * config/nds32/nds32.md: Adjust indention.
15443 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15445 * config/nds32/nds32.md (feature): New attribute.
15447 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15449 * config/nds32/nds32.md (subtype): New attribute.
15451 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15454 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15455 expansion to perform a bitwise AND of the argument followed by a
15456 boolean negation of the result.
15458 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15460 PR rtl-optimization/84878
15461 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15462 the basic block. Assert the use reference is not artificial and that
15463 it has an associated insn.
15465 2018-04-04 Michael Matz <matz@suse.de>
15467 * builtins.c (compute_objsize): Pass correct operand
15468 to array_at_struct_end_p.
15470 2018-04-04 Richard Biener <rguenther@suse.de>
15473 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15474 from contexts for DINFO_LEVEL_TERSE and below.
15476 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15478 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15479 resiter_operand condition.
15480 * config/nds32/nds32.md (*move<mode>): Ditto.
15482 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15483 Monk Chiang <sh.chiang04@gmail.com>
15485 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15487 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15489 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15491 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15492 Kito Cheng <kito.cheng@gmail.com>
15494 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15495 nds32_cond_code_str, output_cond_branch,
15496 output_cond_branch_compare_zero, nds32_expand_cbranch,
15497 nds32_expand_cstore, nds32_expand_movcc,
15498 nds32_output_cbranchsi4_equality_zero,
15499 nds32_output_cbranchsi4_equality_reg,
15500 nds32_output_cbranchsi4_equality_reg_or_const_int,
15501 nds32_output_cbranchsi4_greater_less_zero: New functions.
15502 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15503 nds32_expand_cstore, nds32_expand_movcc,
15504 nds32_output_cbranchsi4_equality_zero,
15505 nds32_output_cbranchsi4_equality_reg,
15506 nds32_output_cbranchsi4_equality_reg_or_const_int,
15507 nds32_output_cbranchsi4_greater_less_zero): Declare.
15508 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15509 nds32_rimm11s_operand): New predicates.
15510 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15511 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15514 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15516 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15517 * config/nds32/nds32.md: Ditto.
15518 * config/nds32/pipelines.md: Ditto.
15520 2018-04-04 Richard Biener <rguenther@suse.de>
15522 PR tree-optimization/85168
15523 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15524 propagating abnormals.
15526 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15528 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15530 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15531 Kito Cheng <kito.cheng@gmail.com>
15533 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15534 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15535 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15536 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15537 * config/nds32/nds32.md (sibcall_internal): New.
15538 (sibcall_register): Remove.
15539 (sibcall_immediate): Remove.
15540 (sibcall_value_internal): New.
15541 (sibcall_value_register): Remove.
15542 (sibcall_value_immediate): Remove.
15543 * config/nds32/predicates.md (nds32_general_register_operand): New.
15544 (nds32_call_address_operand): New.
15546 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15548 PR rtl-optimization/85167
15549 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15550 bb_defs if *split_p, instead preinitialize it to NULL.
15552 PR tree-optimization/85156
15553 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15554 evaluating the argument multiple times.
15556 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15558 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15560 (_mm_cvtpd_ps): Likewise.
15561 (_mm_cvttpd_epi32): Likewise.
15562 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15563 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15564 vector, pixel, and bool following altivec.h include.
15566 2018-04-03 Martin Sebor <msebor@redhat.com>
15568 * doc/extend.texi (Common Function Attributes): Clarify.
15569 (const attribute): Likewise.
15570 (pure attribute): Likewise.
15572 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15575 * config/i386/i386.c (ix86_expand_vector_set): Use
15576 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15578 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15580 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15581 instructions when changing rounding bits to preserve precision bits
15582 in the x87 control word.
15584 2018-04-03 Martin Liska <mliska@suse.cz>
15586 PR tree-optimization/82491
15587 * rtl.h (strip_offset_and_add): Replace += suboffset with
15588 poly_uint64 () + suboffset.
15590 2018-03-29 Martin Liska <mliska@suse.cz>
15591 Martin Jambor <mjambor@suse.cz>
15594 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15595 param_type is not an integral or pointer type.
15597 2018-04-03 Richard Biener <rguenther@suse.de>
15599 * sese.h (recompute_all_dominators): Remove.
15601 2018-04-02 Martin Sebor <msebor@redhat.com>
15603 * doc/invoke.texi (-Wrestrict): Fix typos.
15605 2018-04-02 Jim Wilson <jimw@sifive.com>
15607 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15608 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15609 (<optab>di3, <optab>si3_extend): Likewise.
15610 (<optab>si3_mask, <optab>si3_mask_1): New.
15611 (<optab>di3_mask, <optab>di3_mask_1): New.
15612 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15613 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15614 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15616 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15618 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15621 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15623 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15624 (nds32_canonicalize_comparison): New function.
15626 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15627 Kito Cheng <kito.cheng@gmail.com>
15628 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15630 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15631 * config/nds32/constants.md (unspec_volatile_element): Add
15632 UNSPEC_VOLATILE_RELAX_GROUP.
15633 * config/nds32/nds32-relax-opt.c: New file.
15634 * config/nds32/nds32-predicates.c
15635 (nds32_symbol_load_store_p): New function.
15636 * config/nds32/nds32-protos.h
15637 (nds32_symbol_load_store_p): Declare function.
15638 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15639 * config/nds32/nds32.c
15640 (nds32_register_pass): New function to register pass.
15641 (nds32_register_passes): New function to register passes.
15642 * config/nds32/nds32.md (relax_group): New pattern.
15643 * config/nds32/nds32.opt (mrelax-hint): New option.
15644 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15646 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15648 * config/nds32/t-nds32: Modify files dependency.
15650 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15652 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15653 (PROFILE_HOOK): Define its implementation.
15655 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15657 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15658 type and 32-bit size.
15660 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15662 PR middle-end/85090
15663 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15664 (V_128_256): New mode iterator.
15665 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15666 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15667 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15669 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15670 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15672 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15675 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15676 NaN inputs correctly.
15678 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15681 * config/rs6000/vsx.md (??r): New mode attribute.
15682 (*vsx_mov<mode>_64bit): Use it.
15683 (*vsx_mov<mode>_32bit): Likewise.
15685 2018-03-30 Martin Sebor <msebor@redhat.com>
15687 PR tree-optimization/84818
15688 * builtins.c (check_access): Use warning_n.
15690 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15693 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15695 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15698 2018-03-30 Julia Koval <julia.koval@intel.com>
15701 * x86-tune.def (movx, partial_reg_dependency): Enable for
15704 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15706 PR inline-asm/84985
15707 * lra-constraints.c (process_alt_operands): Move setting
15708 this_alternative_matches below.
15710 2018-03-29 Martin Liska <mliska@suse.cz>
15713 * doc/invoke.texi: Document how LTO works with debug info.
15714 Describe auto-load support of binutils. Mention 'x86-64'
15715 as valid option value of -march option.
15717 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15719 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15722 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15723 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15724 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15727 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15730 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15731 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15732 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15733 for RS6000_BTM_POWERPC64.
15734 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15735 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15736 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15739 (DIVDEU): Likewise.
15741 2018-03-28 Carl Love <cel@us.ibm.com>
15744 2017-09-27 Carl Love <cel@us.ibm.com>
15746 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15747 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15748 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15751 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15753 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15754 instead of __vector bool.
15755 (_mm_max_pu8): Likewise.
15756 (_mm_min_pi16): Likewise.
15758 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15761 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15762 (DIVWEUO): Likewise.
15763 (DIVDEO): Likewise.
15764 (DIVDEUO): Likewise.
15765 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15766 DIVWEUO and DIVDEUO.
15767 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15768 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15769 (div_extend): Likewise.
15770 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15772 (__builtin_divweuo): Likewise.
15773 (__builtin_divdeo): Likewise.
15774 (__builtin_divdeuo): Likewise.
15776 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15779 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15780 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15782 PR tree-optimization/82004
15783 * gimple-match-head.c (optimize_pow_to_exp): New function.
15784 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15785 Don't fold to exp if optimize_pow_to_exp is false.
15787 2018-03-28 Martin Liska <mliska@suse.cz>
15790 * calls.c (initialize_argument_information): Fix trailing space.
15791 * common.opt: Fix typo and provide better explanation for
15792 -fsanitize-coverage option.
15793 * config/i386/i386.opt: Fix typo.
15795 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15796 Martin Liska <mliska@suse.cz>
15799 * gimplify.c (asan_poison_variable): Don't do the check for
15800 gimplify_omp_ctxp here.
15801 (gimplify_decl_expr): Do it here.
15802 (gimplify_target_expr): Likewise.
15804 2018-03-28 Martin Liska <mliska@suse.cz>
15807 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15808 chkp_type_bounds_count if MPX is not enabled.
15810 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15812 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15814 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15817 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15818 function to create the function decl for complex long double
15819 multiply and divide for -mabi=ieeelongdouble.
15820 (init_float128_ieee): Call it.
15822 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15825 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15826 -fcf-protection=branch -mibt.
15827 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15829 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15832 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15833 arm_word_relocations.
15835 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15838 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15839 extern array declarations.
15841 2018-03-27 Richard Biener <rguenther@suse.de>
15843 PR middle-end/84067
15844 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15845 explicit single_use checks.
15847 2018-03-27 Richard Biener <rguenther@suse.de>
15849 PR tree-optimization/85082
15850 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15853 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15855 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15856 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15857 Turn on fasynchronous-unwind-tables and funwind-tables.
15859 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15862 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15863 (*bmi_blsr_<mode>_ccz): Ditto.
15865 2018-03-26 Tom de Vries <tom@codesourcery.com>
15867 PR tree-optimization/85063
15868 * omp-general.c (offloading_function_p): New function. Factor out
15870 * omp-offload.c (pass_omp_target_link::gate): ... here.
15871 * omp-general.h (offloading_function_p): Declare.
15872 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15873 with attribute omp declare target for offloading functions.
15875 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15877 PR tree-optimization/84005
15878 * tree-data-ref.h (get_base_for_alignment): Declare.
15879 * tree-data-ref.c (get_base_for_alignment_1): New function.
15880 (get_base_for_alignment): Likewise.
15881 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15882 get_base_for_alignment to find a suitable base object, instead
15883 of always using drb->base_address.
15885 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15887 PR inline-asm/85022
15888 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15889 known size by default.
15891 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15893 PR inline-asm/85030
15894 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15895 and non BLKmode operands.
15897 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15900 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15901 Clean up attributes.
15903 2018-03-23 Richard Biener <rguenther@suse.de>
15906 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15907 we are going to emit early debug for LTO.
15909 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15911 PR inline-asm/85034
15912 * function.c (match_asm_constraints_1): Don't optimize if input
15913 doesn't satisfy general_operand predicate for output's mode.
15915 PR inline-asm/85022
15916 * alias.c (write_dependence_p): Don't require for x_canonicalized
15917 non-VOIDmode if x has VOIDmode.
15920 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15921 just don't try to optimize it rather than assert it never happens.
15923 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15925 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15926 macro expansions for definition of ST_INTERNAL_<mode> and
15927 LD_INTERNAL_<mode> builtins.
15928 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15930 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15932 (altivec_expand_st_builtin): Likewise.
15933 (altivec_expand_builtin): Remove calls to deleted functions.
15934 (rs6000_address_for_altivec): Delete this function.
15935 * config/rs6000/vector.md: Remove expands for
15936 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15938 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15941 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15942 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15943 re-computing once computed.
15944 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15945 (arm_init_machine_status): Initialize
15946 machine->static_chain_stack_bytes.
15948 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15951 * doc/extend.texi: Add four new prototypes for vec_ld.
15952 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15953 definitions for more logical presentation.
15954 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15955 entries for V1TI variants of __builtin_altivec_ld builtin.
15956 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15957 handling of V1TI variant of LVX icode pattern.
15958 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15959 (rs6000_gimple_fold_builtin): Likewise.
15960 (altivec_init_builtins): Add code to define
15961 __builtin_altivec_lvx_v1ti function.
15963 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15965 PR inline-asm/84941
15966 * function.c (match_asm_constraints_1): Don't do the optimization
15967 if input isn't a REG, SUBREG, MEM or constant.
15969 2018-03-22 Tom de Vries <tom@codesourcery.com>
15971 PR tree-optimization/84956
15972 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15973 bb_has_abnormal_pred.
15975 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15978 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15979 DECL_INITIAL (decl) to decl at the end.
15980 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15981 adjust the comment.
15983 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15985 * doc/extend.texi (__builtin_tgmath): Document when complex
15986 integer types are treated as _Complex _Float64.
15988 2018-03-21 Tom de Vries <tom@codesourcery.com>
15990 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15992 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15994 PR tree-optimization/84960
15995 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15996 if it is ENTRY block, move them into single succ of ENTRY in that case.
15998 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16000 PR tree-optimization/84811
16001 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16002 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16003 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16004 (known_subrange_p): Update accordingly. Cast each value involved
16005 in the size comparison, rather than casting the result of the
16008 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16010 PR tree-optimization/84982
16011 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16012 by flipping the least significant bit rather than all bits from
16013 bitpos to bitpos + bitsize - 1.
16015 2018-03-21 Nathan Sidwell <nathan@acm.org>
16017 * doc/extend.texi (Deprecated Features): Remove mention of
16018 long-deleted deprecations.
16020 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16023 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16024 * configure: Regenerate.
16026 2018-03-21 Tom de Vries <tom@codesourcery.com>
16028 PR tree-optimization/83126
16029 * tree-parloops.c (num_phis): New function.
16030 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16032 2018-03-21 Nathan Sidwell <nathan@acm.org>
16034 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16035 mention anon-struct/union members and trailing attributes.
16037 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16039 PR tree-optimization/84969
16040 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16041 builtin memset partitions if they set different rhs values.
16043 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16045 PR rtl-optimization/84989
16046 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16047 VEC_DUPLICATE with scalar result mode.
16049 2018-03-21 Martin Liska <mliska@suse.cz>
16052 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16053 not intended return statement.
16055 2018-03-21 Martin Liska <mliska@suse.cz>
16058 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16059 (chkp_find_bound_slots_1): Limit number of iterations.
16061 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16064 * Minor grammar fixes for x86 options.
16066 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16069 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16070 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16072 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16075 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16076 (altivec_lvx_<mode>_1op): Likewise.
16077 (altivec_stvx_<mode>_2op): Likewise.
16078 (altivec_stvx_<mode>_1op): Likewise.
16079 (altivec_lvx_<VM2:mode>): New define_expand.
16080 (altivec_stvx_<VM2:mode>): Likewise.
16081 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16082 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16083 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16084 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16085 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16086 (rs6000_gen_lvx): Likewise.
16087 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16088 (altivec_expand_stv_builtin): Likewise.
16089 (altivec_expand_builtin): Likewise.
16090 * config/rs6000/vector.md: Likewise.
16092 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16095 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16098 2018-03-20 Richard Biener <rguenther@suse.de>
16101 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16102 sign-conversions as zero, fall back to standard scalar_stmt
16105 2018-03-20 Martin Liska <mliska@suse.cz>
16108 * predict.c (rebuild_frequencies): Handle case when we have
16109 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16111 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16114 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16115 flag_section_anchors.
16116 * varasm.c (use_blocks_for_decl_p): Remove hack for
16117 dw2_force_const_mem.
16120 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16122 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16123 be created, use lowpart_subreg of operands[0] rather than operands[0]
16125 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16126 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16127 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16128 and n constraint instead of aarch64_shift_imm_di and Usd.
16129 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16130 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16132 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16135 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16136 to favor GPR over NEON registers.
16137 (<shift>di3_neon): Likewise.
16139 2018-03-20 Tom de Vries <tom@codesourcery.com>
16142 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16143 (nvptx_process_pars): Emit bar.sync asap and alap.
16145 2018-03-20 Tom de Vries <tom@codesourcery.com>
16148 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16149 seen_label if seen_label is already set.
16151 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16154 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16155 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16156 Use 1U instead of 1. Formatting fixes.
16159 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16160 instead of TREE_TYPE (s1) for the return value.
16162 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16164 PR tree-optimization/84946
16165 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16166 bitsize + bitsize in poly_uint64 rather than poly_int64.
16169 * dwarf2asm.c: Include fold-const.c.
16170 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16171 of decl rather than decl itself.
16173 PR rtl-optimization/84643
16174 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16176 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16179 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16180 calling assemble_variable.
16182 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16185 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16186 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16188 2018-03-19 Jim Wilson <jimw@sifive.com>
16191 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16192 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16193 (riscv_first_stack_step): Likewise.
16194 (riscv_option_override): Use STACK_BOUNDARY instead of
16195 MIN_STACK_BOUNDARY.
16196 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16197 MIN_STACK_BOUNDARY.
16198 (BIGGEST_ALIGNMENT): Set to 128.
16199 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16200 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16203 2018-03-19 Richard Biener <rguenther@suse.de>
16205 PR tree-optimization/84933
16206 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16207 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16209 2018-03-19 Richard Biener <rguenther@suse.de>
16211 PR tree-optimization/84859
16212 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16213 (cond_if_else_store_replacement): Perform sinking operation on
16214 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16215 Generalize what a BB with a single eligible store is.
16217 2018-03-19 Richard Biener <rguenther@suse.de>
16219 PR tree-optimization/84929
16220 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16221 chrec_is_positive against non-chrec arg.
16223 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16226 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16228 2018-03-18 Martin Liska <mliska@suse.cz>
16230 PR rtl-optimization/84635
16231 * regrename.c (build_def_use): Use matches_mode only when
16234 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16236 PR tree-optimization/84913
16237 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16238 vectorize chains of COND_EXPRs.
16240 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16242 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16244 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16246 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16248 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16250 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16252 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16253 Kito Cheng <kito.cheng@gmail.com>
16255 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16256 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16257 (nds32_adjust_reg_alloc_order): New function.
16258 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16260 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16262 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16263 nds32_print_operand, nds32_print_operand_address): Use
16264 HOST_WIDE_INT_PRINT_DEC instead.
16266 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16268 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16270 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16273 * config/i386/i386.c (initial_ix86_tune_features,
16274 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16275 unsigned long long.
16276 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16277 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16278 rather than 1u << ix86_tune. Formatting fix.
16279 (ix86_option_override_internal): Change ix86_arch_mask from
16280 unsigned int to unsigned HOST_WIDE_INT, initialize to
16281 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16282 (ix86_function_specific_restore): Likewise.
16284 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16287 * postreload.c (reload_combine_recognize_pattern): Perform
16288 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16289 truncate_int_for_mode the result for the destination's mode.
16292 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16293 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16295 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16298 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16301 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16302 regno_allocno_class_array and sorted_pseudos.
16303 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16304 insns where regno is used.
16306 2018-03-16 Martin Liska <mliska@suse.cz>
16309 * multiple_target.c (create_dispatcher_calls): Redirect
16310 reference in the symbol table.
16312 2018-03-16 Martin Liska <mliska@suse.cz>
16315 * multiple_target.c (create_dispatcher_calls): Redirect also
16318 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16322 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16323 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16324 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16326 2018-03-16 Julia Koval <julia.koval@intel.com>
16328 * doc/invoke.texi (Skylake Server): Add CLWB.
16329 Cannonlake): Remove CLWB.
16331 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16333 PR tree-optimization/84841
16334 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16336 (FLOAT_ONE_CONST_TYPE): Define.
16337 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16338 (sort_by_operand_rank): Put entries with higher constant_type last
16339 rather than first to match comments.
16341 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16343 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16346 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16349 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16350 check and use address of target always.
16352 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16355 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16356 (indirect_thunk_bnd_needed): Likewise.
16357 (indirect_thunks_used): Likewise.
16358 (indirect_thunks_bnd_used): Likewise.
16359 (indirect_return_needed): New.
16360 (indirect_return_bnd_needed): Likewise.
16361 (output_indirect_thunk_function): Add a bool argument for
16363 (output_indirect_thunk_function): Don't generate alias for
16364 function return thunk.
16365 (ix86_code_end): Call output_indirect_thunk_function to generate
16366 function return thunks.
16367 (ix86_output_function_return): Set indirect_return_bnd_needed
16368 and indirect_return_needed instead of indirect_thunk_bnd_needed
16369 and indirect_thunk_needed.
16371 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16373 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16374 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16375 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16377 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16378 Paul Hua <paul.hua.gm@gmail.com>
16381 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16383 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16385 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16386 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16387 resp. SFmode cases.
16389 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16392 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16393 instead of GET_MODE_SIZE when comparing Units.
16395 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16398 * varasm.c (hash_section): Return an unchangeble hash value
16399 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16400 Return !aarch64_can_use_per_function_literal_pools_p ().
16402 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16405 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16406 rather than address of cmode as last argument to prepare_cmp_insn.
16408 2018-03-15 Julia Koval <julia.koval@intel.com>
16410 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16411 F_AVX512VNNI, F_AVX512BITALG): New.
16413 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16416 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16417 insn for floating-point loads and stores.
16419 2018-03-14 Carl Love <cel@us.ibm.com>
16421 * config/rs6000/rs6000-c.c: Add macro definitions for
16422 ALTIVEC_BUILTIN_VEC_PERMXOR.
16423 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16424 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16425 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16426 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16428 * config/doc/extend.texi: Add prototypes for vec_permxor.
16430 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16433 * diagnostic-show-locus.c (class layout_point): Convert m_line
16434 from int to linenum_type.
16435 (line_span::comparator): Use linenum "compare" function when
16436 comparing line numbers.
16437 (test_line_span): New function.
16438 (layout_range::contains_point): Convert param "row" from int to
16440 (layout_range::intersects_line_p): Likewise.
16441 (layout::will_show_line_p): Likewise.
16442 (layout::print_source_line): Likewise.
16443 (layout::should_print_annotation_line_p): Likewise.
16444 (layout::print_annotation_line): Likewise.
16445 (layout::print_leading_fixits): Likewise.
16446 (layout::annotation_line_showed_range_p): Likewise.
16447 (struct line_corrections): Likewise for field m_row.
16448 (line_corrections::line_corrections): Likewise for param "row".
16449 (layout::print_trailing_fixits): Likewise.
16450 (layout::get_state_at_point): Likewise.
16451 (layout::get_x_bound_for_row): Likewise.
16452 (layout::print_line): Likewise.
16453 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16454 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16455 * input.c (selftest::test_linenum_comparisons): New function.
16456 (selftest::input_c_tests): Call it.
16457 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16458 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16459 * selftest.h (ASSERT_GT): New macro.
16460 (ASSERT_GT_AT): New macro.
16461 (ASSERT_LT): New macro.
16462 (ASSERT_LT_AT): New macro.
16464 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16466 PR rtl-optimization/84780
16467 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16469 2018-03-14 Martin Liska <mliska@suse.cz>
16471 * tree.c (record_node_allocation_statistics): Use
16472 get_stats_node_kind.
16473 (get_stats_node_kind): New function extracted from
16474 record_node_allocation_statistics.
16475 (free_node): Use get_stats_node_kind.
16477 2018-03-14 Richard Biener <rguenther@suse.de>
16479 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16480 that the value-set of ANTIC_IN doesn't grow.
16483 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16485 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16486 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16488 2018-03-14 Julia Koval <julia.koval@intel.com>
16490 * config.gcc (icelake-client, icelake-server): New.
16492 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16493 (initial_ix86_arch_features): Ditto.
16494 (PTA_SKYLAKE): Add SGX.
16495 (PTA_ICELAKE): Remove.
16496 (PTA_ICELAKE_CLIENT): New.
16497 (PTA_ICELAKE_SERVER): New.
16498 (ix86_option_override_internal): Split up icelake on icelake client and
16500 (get_builtin_code_for_version): Ditto.
16501 (fold_builtin_cpu): Ditto.
16502 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16503 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16504 * config/i386/i386.h (processor_type): Ditto.
16505 * doc/invoke.texi: Ditto.
16507 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16510 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16511 INTEGER_CST offset, add it together with bitpos / 8 and
16512 sign extend based on POINTER_SIZE.
16516 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16519 * config/i386/constraints.md (Yc): New register constraint.
16520 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16521 Use Yc constraint for alternative 2 of operand 0. Remove
16522 preferred_for_speed attribute.
16524 2018-03-14 Richard Biener <rguenther@suse.de>
16526 PR tree-optimization/84830
16527 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16528 with the old one to avoid oscillations.
16530 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16533 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16535 (assign_by_spills): Return a flag of reload assignment failure.
16536 Do not process the reload assignment failures. Do not spill other
16537 reload pseudos if they has the same reg class. Update n if
16539 (lra_assign): Add a return arg. Set up from the result of
16540 assign_by_spills call.
16541 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16542 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16543 usage_insns if it is not NULL.
16544 (spill_hard_reg_in_range): New function.
16545 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16546 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16547 function prototypes.
16548 (lra_assign): Change prototype.
16549 * lra.c (lra): Add code to deal with fails by splitting hard reg
16552 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16554 * config/riscv/riscv.opt (mrelax): New option.
16555 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16556 "norelax" when riscv_mrelax is disabled.
16557 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16559 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16562 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16563 reassociation for int modes.
16565 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16567 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16568 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16570 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16571 * config/aarch64/aarch64-sve.md
16572 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16573 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16574 (*extend<mode><Vwide>2): Rename to...
16575 (aarch64_sve_extend<mode><Vwide>2): ...this.
16576 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16577 renaming the old pattern to...
16578 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16580 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16581 define_expand, renaming the old pattern to...
16582 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16583 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16584 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16585 account when deciding which SVE instruction the optab should use.
16586 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16588 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16590 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16591 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16592 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16593 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16594 (tlsdesc_small_<mode>): Turn a define_expand and use
16595 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16596 (tlsdesc_small_advsimd_<mode>): ...this.
16597 (tlsdesc_small_sve_<mode>): New pattern.
16599 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16601 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16602 (UNSPEC_UMUL_HIGHPART): New constants.
16603 (MUL_HIGHPART): New int iteraor.
16604 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16605 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16607 (*<su>mul<mode>3_highpart): New define_insn.
16609 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16612 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16615 2018-03-13 Martin Liska <mliska@suse.cz>
16618 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16620 (sem_item_optimizer::~sem_item_optimizer): Release it.
16621 (sem_item_optimizer::merge_classes): Register variable aliases.
16622 (sem_item_optimizer::fixup_pt_set): New function.
16623 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16624 * ipa-icf.h: Declare new variables and functions.
16626 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16628 PR middle-end/84834
16629 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16630 integer_pow2p@2 and test integer_pow2p in condition.
16631 (A < 0 ? C : 0): Similarly for @1.
16633 PR middle-end/84831
16634 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16635 characters starting at p contain '\0' character, don't look beyond
16639 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16640 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16643 * reg-stack.c (change_stack): Change update_end var from int to
16644 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16645 also call set_block_for_insn on the newly added insns and rescan.
16648 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16649 on the last operand.
16652 * tree.c (stabilize_reference_1): Return save_expr (e) for
16653 STATEMENT_LIST even if it doesn't have side-effects.
16655 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16657 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16659 2018-03-12 Renlin Li <renlin.li@arm.com>
16661 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16662 aarch64_output_scalar_simd_mov_immediate.
16664 2018-03-12 Martin Sebor <msebor@redhat.com>
16666 PR tree-optimization/83456
16667 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16668 for perfectly overlapping calls to memcpy.
16669 (gimple_fold_builtin_memory_chk): Same.
16670 (gimple_fold_builtin_strcpy): Handle no-warning.
16671 (gimple_fold_builtin_stxcpy_chk): Same.
16672 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16674 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16676 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16677 parameter. Use it for SFmode.
16678 (rs6000_function_arg_advance_1): Adjust.
16679 (rs6000_function_arg): Adjust.
16680 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16682 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16684 PR rtl-optimization/84169
16685 PR rtl-optimization/84780
16686 * combine.c (can_combine_p): Check for a 2-insn combination whether
16687 the destination register is used between the two insns, too.
16689 2018-03-12 Richard Biener <rguenther@suse.de>
16691 PR tree-optimization/84803
16692 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16693 for refs DR analysis didn't process.
16695 2018-03-12 Richard Biener <rguenther@suse.de>
16697 PR tree-optimization/84777
16698 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16699 force-vectorize loops ignore whether we are optimizing for size.
16701 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16703 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16704 (TARGET_MD_ASM_ADJUST): Define.
16706 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16707 Kito Cheng <kito.cheng@gmail.com>
16708 Chung-Ju Wu <jasonwucj@gmail.com>
16710 * config/nds32/nds32.c (nds32_compute_stack_frame,
16711 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16712 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16713 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16714 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16715 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16716 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16717 * config/nds32/nds32.md (prologue, epilogue): Use macro
16718 NDS32_V3PUSH_AVAILABLE_P to do checking.
16720 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16723 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16724 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16725 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16726 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16727 addition of most attributes on !orig_type_die or the attribute not
16728 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16730 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16731 Chung-Ju Wu <jasonwucj@gmail.com>
16733 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16734 __NDS32_VH__ macro.
16735 * config/nds32/nds32.opt (mvh): New option.
16737 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16738 Chung-Ju Wu <jasonwucj@gmail.com>
16740 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16742 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16743 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16746 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16747 Chung-Ju Wu <jasonwucj@gmail.com>
16749 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16751 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16752 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16754 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16755 Kito Cheng <kito.cheng@gmail.com>
16756 Chung-Ju Wu <jasonwucj@gmail.com>
16758 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16759 UNSPEC_FFMISM and UNSPEC_FLMISM.
16760 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16761 for ffb, ffmism and flmism.
16762 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16763 (unspec_ffmism): Ditto.
16764 (unspec_flmism): Ditto.
16765 (nds32_expand_builtin_impl): Check if string extension is available.
16766 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16767 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16769 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16772 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16775 * lra-assigns.c (assign_by_spills): Return a flag of reload
16776 assignment failure. Do not process the reload assignment
16777 failures. Do not spill other reload pseudos if they has the same
16779 (lra_assign): Add a return arg. Set up from the result of
16780 assign_by_spills call.
16781 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16782 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16783 usage_insns if it is not NULL.
16784 (spill_hard_reg_in_range): New function.
16785 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16786 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16787 function prototypes.
16788 (lra_assign): Change prototype.
16789 * lra.c (lra): Add code to deal with fails by splitting hard reg
16792 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16795 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16797 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16800 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16801 (dw_val_node): Add val_symbolic_view.
16802 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16803 (symview_upper_bound): New.
16804 (new_line_info_table): Initialize symviews_since_reset.
16805 (dwarf2out_source_line): Count symviews_since_reset and set
16806 symview_upper_bound.
16807 (dw_val_equal_p): Handle symview.
16808 (add_AT_symview): New.
16809 (print_dw_val): Handle symview.
16810 (attr_checksum, attr_checksum_ordered): Likewise.
16811 (same_dw_val_p, size_of_die): Likewise.
16812 (value_format, output_die): Likewise.
16813 (add_high_low_attributes): Use add_AT_symview for entry_view.
16814 (dwarf2out_finish): Reset symview_upper_bound, clear
16817 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16820 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16821 Add strict argument and use it.
16822 (rs6000_split_multireg_move): Update for new strict argument.
16823 (mem_operand_gpr): Disallow all non-offsettable addresses.
16824 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16826 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16829 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16830 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16831 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16834 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16835 decl, use remap_type if we want to use the type.
16837 2018-03-09 Martin Sebor <msebor@redhat.com>
16839 PR tree-optimization/84526
16840 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16842 (builtin_access::generic_overlap): Be prepared to handle non-array
16845 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16847 PR rtl-optimization/84682
16848 * lra-constraints.c (process_address_1): Check is_address flag
16849 for address constraints.
16850 (process_alt_operands): Likewise.
16851 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16852 preprocess_constraints.
16853 * recog.h (preprocess_constraints): Add oploc parameter.
16855 * recog.c (preprocess_constraints): Test address_operand for
16856 CT_ADDRESS constraints.
16858 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16861 * lra-assigns.c (assign_by_spills): Return a flag of reload
16862 assignment failure. Do not process the reload assignment
16863 failures. Do not spill other reload pseudos if they has the same
16865 (lra_assign): Add a return arg. Set up from the result of
16866 assign_by_spills call.
16867 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16868 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16869 usage_insns if it is not NULL.
16870 (spill_hard_reg_in_range): New function.
16871 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16872 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16873 function prototypes.
16874 (lra_assign): Change prototype.
16875 * lra.c (lra): Add code to deal with fails by splitting hard reg
16878 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16881 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16882 Accept complain bool parameter. Only emit errors if it is true.
16883 (arm_parse_cpu_option_name): Likewise.
16884 (arm_target_thumb_only): Adjust callers of the above.
16885 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16886 prototype to take a default true bool parameter.
16887 (arm_parse_arch_option_name): Likewise.
16889 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16890 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16894 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16895 * configure: Regenerate.
16896 * configure.ac ("linker --version-script option"): New.
16897 ("linker soname option"): New.
16899 2018-03-09 Richard Biener <rguenther@suse.de>
16901 PR tree-optimization/84775
16902 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16903 immediate uses of predicate stmts and mark them modified.
16906 PR tree-optimization/84178
16907 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16909 (version_loop_for_if_conversion): Delay update_ssa call.
16910 (tree_if_conversion): Delay update_ssa until after predicate
16913 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16916 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16917 when the function accesses prior frames.
16919 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16922 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16923 gen_llsym, otherwise call maybe_gen_llsym.
16925 PR inline-asm/84742
16926 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16927 has ',' character inside of it.
16929 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16932 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16933 as clobbering CC_REGNUM.
16935 2018-03-08 Richard Biener <rguenther@suse.de>
16937 PR middle-end/84552
16938 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16939 (follow_copies_to_constant): Do not follow SSA names registered
16942 2018-03-08 Richard Biener <rguenther@suse.de>
16944 PR tree-optimization/84178
16945 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16947 (version_loop_for_if_conversion): Delay update_ssa call.
16948 (tree_if_conversion): Delay update_ssa until after predicate
16951 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16953 PR tree-optimization/84178
16954 * tree-if-conv.c (release_bb_predicate): Remove the
16955 the assertion that the stmts have NULL use_ops.
16956 Discard the statements, asserting that they haven't
16957 yet been added to a BB.
16959 2018-03-08 Richard Biener <rguenther@suse.de>
16961 PR tree-optimization/84746
16962 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16963 (phi_translate): Pass in destination ANTIC_OUT set.
16964 (phi_translate_1): Likewise. For a simplified result lookup
16965 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16966 (phi_translate_set): Adjust.
16967 (do_pre_regular_insertion): Likewise.
16968 (do_pre_partial_partial_insertion): Likewise.
16970 2018-03-08 Martin Liska <mliska@suse.cz>
16972 PR gcov-profile/84735
16973 * doc/gcov.texi: Document usage of profile files.
16974 * gcov-io.h: Document changes in the format.
16976 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16980 * dwarf2out.c (struct dw_line_info_table): Update comments for
16982 (FORCE_RESET_NEXT_VIEW): New.
16983 (FORCE_RESETTING_VIEW_P): New.
16984 (RESETTING_VIEW_P): Check for -1 too.
16985 (ZERO_VIEW_P): Likewise.
16986 (new_line_info_table): Force-reset next view.
16987 (dwarf2out_begin_function): Likewise.
16988 (dwarf2out_source_line): Simplify zero_view_p initialization.
16989 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16990 view directly. Omit view when omitting .loc at line 0.
16992 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16994 PR tree-optimization/84740
16995 * tree-switch-conversion.c (process_switch): Call build_constructors
16996 only if info.phi_count is non-zero.
16998 PR tree-optimization/84739
16999 * tree-tailcall.c (find_tail_calls): Check call arguments against
17000 DECL_ARGUMENTS (current_function_decl) rather than
17001 DECL_ARGUMENTS (func) when checking for tail recursion.
17003 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17005 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17006 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17007 Volker Reichelt's entry and add entries for people that perform
17008 GCC fuzzy testing and report numerous bugs.
17010 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17013 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17014 readonly data in sdata, if that is disabled.
17015 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17016 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17017 -mreadonly-in-sdata option.
17019 2018-03-07 Martin Sebor <msebor@redhat.com>
17021 PR tree-optimization/84468
17022 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17023 basic block when looking for nul assignment.
17025 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17028 * except.h (output_function_exception_table): Adjust prototype.
17029 * except.c (output_function_exception_table): Remove FNNAME parameter
17030 and add SECTION parameter. Ouput one part of the table at a time.
17031 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17032 the first part of the exception table and emit unwind directives.
17033 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17034 (i386_pe_seh_cold_init): Likewise.
17035 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17036 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17037 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17038 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17039 * config/i386/winnt.c: Include except.h.
17040 (struct seh_frame_state): Add reg_offset, after_prologue and
17041 in_cold_section fields.
17042 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17043 (i386_pe_seh_cold_init): New function.
17044 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17045 to seh->in_cold_section.
17046 (seh_emit_push): Record the offset of the push.
17047 (seh_emit_save): Record the offet of the save.
17048 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17049 Test seh->after_prologue to disregard the epilogue.
17050 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17051 (i386_pe_end_cold_function): New function.
17053 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17056 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17057 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17060 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17062 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17063 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17065 PR middle-end/84723
17066 * multiple_target.c: Include tree-inline.h and intl.h.
17067 (expand_target_clones): Diagnose and fail if node->definition and
17068 !tree_versionable_function_p (node->decl).
17070 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17072 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17074 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17075 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17076 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17078 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17081 * combine.c (try_combine): Use reg_or_subregno instead of handling
17082 just paradoxical SUBREGs and REGs.
17084 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17086 * config/arc/arc.c (arc_finalize_pic): Remove function.
17087 (arc_must_save_register): We use single base PIC register, remove
17088 checks to save/restore the PIC register.
17089 (arc_expand_prologue): Likewise.
17090 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17092 (arc_verify_short): Likewise.
17093 (arc_attr_type): Likewise.
17094 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17095 (walk_stores): Likewise.
17096 (arc_address_cost): Make it static.
17097 (arc_verify_short): Likewise.
17098 (branch_dest): Likewise.
17099 (arc_attr_type): Likewise.
17100 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17101 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17102 (arc_final_prescan_insn): Remove inserting the nops due to
17103 hardware hazards. It is done in reorg step.
17104 (insn_length_variant_t): Remove.
17105 (insn_length_parameters_t): Likewise.
17106 (arc_insn_length_parameters): Likewise.
17107 (arc_get_insn_variants): Likewise.
17108 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17110 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17112 PR inline-asm/84683
17113 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17116 PR tree-optimization/84687
17117 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17119 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17121 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17123 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17124 Rename to ppc_speculation_barrier.
17125 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17126 __builtin_ppc_speculation_barrier.
17128 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17131 * combine.c (combine_simplify_rtx): Don't try to simplify if
17132 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17135 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17137 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17138 to 32 bytes when compiling for POWER9.
17140 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17143 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17144 regparm >= 3 with no arg reg available also for calls with
17145 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17148 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17150 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17152 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17155 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17157 2018-03-05 Richard Biener <rguenther@suse.de>
17159 PR tree-optimization/84486
17160 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17161 When inserting a __builtin_assume_aligned call set the LHS
17162 SSA name alignment info accordingly.
17164 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17166 PR tree-optimization/84114
17167 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17168 Avoid reassociation of FLOAT_MODE addition.
17170 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17172 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17173 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17174 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17175 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17176 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17177 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17178 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17180 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17181 __builtin_ia32_wbinvd): New builtins.
17182 (SPECIAL_ARGS2): New.
17183 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17184 (SPECIAL_ARGS2): New.
17185 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17186 (ix86_valid_target_attribute_inner_p): Ditto.
17187 (ix86_init_mmx_sse_builtins): Add special_args2.
17188 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17189 TARGET_WBNOINVD_P): New.
17190 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17191 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17192 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17193 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17194 * config/i386/pconfigintrin.h: New file.
17195 * config/i386/wbnoinvdintrin.h: Ditto.
17196 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17198 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17200 2018-03-05 Richard Biener <rguenther@suse.de>
17202 PR tree-optimization/84670
17203 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17205 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17206 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17207 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17208 doesn't grow if all successors (recursively) were visited at least
17211 2018-03-05 Richard Biener <rguenther@suse.de>
17213 PR tree-optimization/84650
17214 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17215 if executed in the loop pipeline.
17217 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17219 * doc/configfiles.texi (Configuration Files): Move info about
17220 conditionalizing $target-protos.h to...
17221 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17222 differs from $target-protos.h.
17224 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17225 Chung-Ju Wu <jasonwucj@gmail.com>
17227 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17228 * config/nds32/nds32-multiple.md (setmemsi): Define.
17229 * config/nds32/nds32-memory-manipulation.c
17230 (nds32_gen_dup_4_byte_to_word_value): New.
17231 (emit_setmem_word_loop): New.
17232 (emit_setmem_byte_loop): New.
17233 (nds32_expand_setmem_loop): New.
17234 (nds32_expand_setmem_loop_v3m): New.
17235 (nds32_expand_setmem_unroll): New.
17236 (nds32_expand_setmem): New.
17238 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17239 Chung-Ju Wu <jasonwucj@gmail.com>
17241 * config/nds32/nds32-memory-manipulation.c
17242 (nds32_emit_load_store): New.
17243 (nds32_emit_post_inc_load_store): New.
17244 (nds32_emit_mem_move): New.
17245 (nds32_emit_mem_move_block): New.
17246 (nds32_expand_movmemsi_loop_unknown_size): New.
17247 (nds32_expand_movmemsi_loop_known_size): New.
17248 (nds32_expand_movmemsi_loop): New.
17249 (nds32_expand_movmemsi_unroll): New.
17250 (nds32_expand_movmemqi): Rename ...
17251 (nds32_expand_movmemsi): ... to this.
17252 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17253 (movmemsi): ... to this.
17254 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17255 (nds32_expand_movmemsi): ... to this.
17257 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17258 Monk Chiang <sh.chiang04@gmail.com>
17259 Chung-Ju Wu <jasonwucj@gmail.com>
17261 * config/nds32/nds32-protos.h
17262 (nds32_expand_load_multiple): New arguments.
17263 (nds32_expand_store_multiple): Ditto.
17264 (nds32_valid_multiple_load_store): Rename ...
17265 (nds32_valid_multiple_load_store_p): ... to this.
17266 * config/nds32/nds32-memory-manipulation.c
17267 (nds32_expand_load_multiple): Refine implementation.
17268 (nds32_expand_store_multiple): Ditto.
17269 * config/nds32/nds32-multiple.md
17270 (load_multiple): Update nds32_expand_load_multiple interface.
17271 (store_multiple): Update nds32_expand_store_multiple interface.
17272 * config/nds32/nds32-predicates.c
17273 (nds32_valid_multiple_load_store): Rename ...
17274 (nds32_valid_multiple_load_store_p): ... to this and refine
17276 * config/nds32/predicates.md
17277 (nds32_load_multiple_and_update_address_operation): New predicate.
17278 (nds32_store_multiple_and_update_address_operation): New predicate.
17280 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17281 Chung-Ju Wu <jasonwucj@gmail.com>
17283 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17284 (combo): New attribute.
17285 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17287 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17289 * config/nds32/nds32.opt: Change -mcmodel= default value.
17291 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17292 Monk Chiang <sh.chiang04@gmail.com>
17293 Chung-Ju Wu <jasonwucj@gmail.com>
17295 * config/nds32/constants.md (unspec_element): New enum.
17296 * config/nds32/constraints.md (Umw): New constraint.
17297 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17298 * config/nds32/nds32-intrinsic.md: Likewise.
17299 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17300 (nds32_valid_smw_lwm_base_p): New.
17301 (nds32_output_smw_single_word): New.
17302 (nds32_output_lmw_single_word): New.
17303 (nds32_expand_unaligned_load): New.
17304 (nds32_expand_unaligned_store): New.
17305 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17306 (nds32_output_smw_single_word): Declare.
17307 (nds32_output_lmw_single_word): Declare.
17308 (nds32_expand_unaligned_load): Declare.
17309 (nds32_expand_unaligned_store): Declare.
17310 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17311 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17312 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17313 NDS32_BUILTIN_UASTORE_DW.
17314 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17317 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17318 Kito Cheng <kito.cheng@gmail.com>
17319 Chung-Ju Wu <jasonwucj@gmail.com>
17321 * config/nds32/nds32-intrinsic.c
17322 (nds32_expand_builtin_null_ftype_reg): Delete.
17323 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17324 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17325 (nds32_read_argument): New.
17326 (nds32_legitimize_target): Ditto.
17327 (nds32_legitimize_argument): Ditto.
17328 (nds32_check_constant_argument): Ditto.
17329 (nds32_expand_unop_builtin): Ditto.
17330 (nds32_expand_unopimm_builtin): Ditto.
17331 (nds32_expand_binop_builtin): Ditto.
17332 (nds32_builtin_decl_impl): Ditto.
17333 (builtin_description): Ditto.
17334 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17335 (nds32_init_builtins_impl): Ditto.
17336 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17337 (nds32_builtin_decl): New.
17338 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17339 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17341 2018-03-02 Jeff Law <law@redhat.com>
17343 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17344 (redundant_insn, fill_simple_delay_slots): Likewise.
17345 (fill_slots_from_thread): Likewise.
17346 * resource.c (mark_referenced_resources): Likewise.
17347 (mark_set_resources, find_dead_or_set_registers): Likewise.
17349 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17351 * substring-locations.h (format_warning_va): Formatting fix for
17352 ATTRIBUTE_GCC_DIAG.
17353 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17355 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17356 * substring-locations.c: Include intl.h.
17357 (format_warning_va): Turned into small wrapper around
17358 format_warning_n_va, renamed to ...
17359 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17360 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17362 (format_warning_at_substring_n): New function.
17363 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17364 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17365 format_warning_at_substring with just a shorter name instead of
17366 const function pointer.
17367 (fmtwarn_n): New function.
17368 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17369 appropriate, get rid of all the fmtstr temporaries, move conditionals
17370 with G_() wrapped string literals directly into fmtwarn arguments,
17371 cast dir.len to (int), formatting fixes.
17373 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17375 * doc/invoke.texi: Remove "Cilk Plus" references.
17377 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17378 Richard Biener <rguenther@suse.de>
17381 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17382 for error or warning attributes if CALL_FROM_THUNK_P is set.
17385 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17388 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17389 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17392 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17393 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17395 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17396 instead of -1U in last predictors element's probability member.
17398 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17401 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17402 arguments if they are comparable.
17404 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17406 PR tree-optimization/84634
17407 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17408 masks and masked_loop_p with a single loop_masks, making sure it's
17409 null for bb vectorization.
17411 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17413 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17414 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17415 loop->force_vectorize to check whether there is no alias.
17417 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17420 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17422 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17424 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17425 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17426 instead of a loop around prev_real_insn.
17427 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17430 PR inline-asm/84625
17431 * config/i386/i386.c (ix86_print_operand): Use conditional
17432 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17435 2018-03-02 Richard Biener <rguenther@suse.de>
17437 PR tree-optimization/84427
17438 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17439 (bitmap_set_subtract_values): Rewrite to handle multiple
17442 (prune_clobbered_mems): Likewise.
17443 (phi_translate): Take edge instead of pred/phiblock.
17444 (phi_translate_1): Likewise.
17445 (phi_translate_set): Likewise. Insert all translated
17446 exprs for a value into the set, keeping possibly multiple
17447 expressions per value.
17448 (compute_antic_aux): Adjust for phi_translate changes.
17449 When intersecting union the expressions and prune those
17450 not in the final value set, keeping possibly multiple
17451 expressions per value. Do not use value-insertion
17452 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17453 all expressions. Add verification that the value-sets
17454 only shrink during iteration.
17455 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17456 (do_pre_regular_insertion): Likewise.
17457 (do_pre_partial_partial_insertion): Likewise.
17459 2018-03-02 Richard Biener <rguenther@suse.de>
17462 * config/darwin.c (saved_debug_info_level): New static global.
17463 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17464 (darwin_asm_lto_end): Restore debug info generation settings.
17466 2018-03-01 Martin Liska <mliska@suse.cz>
17469 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17470 volatile arguments.
17472 2018-03-01 Richard Biener <rguenther@suse.de>
17475 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17476 type annotation with LTO when debug was disabled at compile-time.
17478 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17480 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17482 (mips_final_postscan_insn): Likewise.
17484 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17486 PR rtl-optimization/84528
17487 * alias.c (init_alias_target): Add commentary.
17488 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17489 a unique base value if the frame pointer is not eliminated
17490 to the stack pointer.
17492 2018-03-01 Tom de Vries <tom@codesourcery.com>
17494 PR rtl-optimization/83327
17495 * lra-int.h (hard_regs_spilled_into): Declare.
17496 * lra.c (hard_regs_spilled_into): Define.
17497 (init_reg_info): Init hard_regs_spilled_into.
17498 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17499 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17500 (process_bb_lives): Handle hard_regs_spilled_into.
17501 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17502 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17504 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17506 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17507 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17508 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17509 * config/rs6000/aix72.h: New file.
17511 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17513 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17514 instead of warning_at with conditional singular and plural messages
17518 * stor-layout.c (update_alignment_for_field): For
17519 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17520 && !DECL_PACKED (field), do the alignment update, just use
17521 only desired_align instead of MAX (type_align, desired_align)
17523 (place_field): Don't do known_align < desired_align handling
17524 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17525 is non-NULL, instead do it after rli->prev_field handling and
17526 only if not within a bitfield word. For DECL_PACKED (field)
17527 use type_align of BITS_PER_UNIT.
17529 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17531 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17532 superfluous parentheses and trailing spaces.
17534 2018-02-28 Richard Biener <rguenther@suse.de>
17536 PR tree-optimization/84584
17537 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17538 SCoPs with fake exit edge.
17540 2018-02-28 Martin Liska <mliska@suse.cz>
17543 * timevar.c (timer::print): Fix format to properly print 100%
17546 2018-02-28 Richard Biener <rguenther@suse.de>
17548 PR middle-end/84607
17549 * genmatch.c (capture_info::walk_match): Do not mark
17550 captured expressions without operands as expr_p given
17551 they act more like predicates and should be subject to
17552 "lost tail" side-effect preserving.
17554 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17556 PR rtl-optimization/81611
17557 * auto-inc-dec.c (attempt_change): Move dead note from
17558 mem_insn if it's the next use of regno
17559 (find_address): Take address use of reg holding
17560 non-incremented value. Add parm to limit search to the named
17562 (merge_in_block): Attempt to use a mem insn that is the next
17563 use of the original regno.
17565 2018-02-27 Martin Sebor <msebor@redhat.com>
17568 * doc/invoke.texi (-Wmissing-attributes): New option.
17569 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17571 2018-02-27 Martin Sebor <msebor@redhat.com>
17573 PR translation/84207
17574 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17575 n argument to unsigned HOST_WIDE_INT.
17576 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17577 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17578 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17579 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17581 2018-02-27 Richard Biener <rguenther@suse.de>
17583 PR tree-optimization/84512
17584 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17585 Do not use the estimate returned from record_stmt_cost for
17586 the scalar iteration cost but sum properly using add_stmt_cost.
17588 2018-02-27 Richard Biener <rguenther@suse.de>
17590 PR tree-optimization/84466
17591 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17592 Adjust last change to less strictly validate use operands.
17594 2018-02-27 Martin Liska <mliska@suse.cz>
17596 PR gcov-profile/84548
17597 * gcov.c (process_file): Allow partial overlap and consider it
17598 also as group functions.
17599 (output_lines): Properly calculate range of lines for a group.
17601 2018-02-27 Martin Liska <mliska@suse.cz>
17603 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17604 'ggc' suffixes. Change first column width.
17605 (timer::print): Fix formatting of the column.
17607 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17609 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17610 preserve inline entry blocks for the sake of debug inline
17611 entry point markers alone.
17612 (remove_unused_locals): Suggest in comments a better place to
17613 force the preservation of inline entry blocks that are
17614 otherwise unused, but do not preserve them.
17616 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17618 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17620 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17623 * config/i386/constraints.md (Bs): Replace
17624 ix86_indirect_branch_register with
17625 TARGET_INDIRECT_BRANCH_REGISTER.
17627 * config/i386/i386.md (indirect_jump): Likewise.
17628 (tablejump): Likewise.
17629 (*sibcall_memory): Likewise.
17630 (*sibcall_value_memory): Likewise.
17631 Peepholes of indirect call and jump via memory: Likewise.
17632 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17633 (*sibcall_value_GOT_32): Likewise.
17634 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17635 (GOT_memory_operand): Likewise.
17636 (call_insn_operand): Likewise.
17637 (sibcall_insn_operand): Likewise.
17638 (GOT32_symbol_operand): Likewise.
17639 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17641 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17643 PR rtl-optimization/83496
17644 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17645 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17646 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17647 redundant insn, if any.
17648 (relax_delay_slots): Likewise.
17649 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17651 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17653 PR tree-optimization/83965
17654 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17655 that grouped statements are part of a reduction chain. Return
17656 true if the statement is not marked as a reduction itself but
17657 is part of a group.
17658 (vect_recog_dot_prod_pattern): Don't check whether the statement
17659 is part of a group here.
17660 (vect_recog_sad_pattern): Likewise.
17661 (vect_recog_widen_sum_pattern): Likewise.
17663 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17666 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17668 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17671 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17673 (ix86_output_indirect_function_return): New prototype.
17674 (ix86_split_simple_return_pop_internal): Likewise.
17675 * config/i386/i386.c (indirect_return_via_cx): New.
17676 (indirect_return_via_cx_bnd): Likewise.
17677 (indirect_thunk_name): Handle return va CX_REG.
17678 (output_indirect_thunk_function): Create alias for
17679 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17680 (ix86_output_indirect_jmp): Remove the bool argument.
17681 (ix86_output_indirect_function_return): New function.
17682 (ix86_split_simple_return_pop_internal): Likewise.
17683 * config/i386/i386.md (*indirect_jump): Don't pass false
17684 to ix86_output_indirect_jmp.
17685 (*tablejump_1): Likewise.
17686 (simple_return_pop_internal): Change it to define_insn_and_split.
17687 Call ix86_split_simple_return_pop_internal to split it for
17688 -mfunction-return=.
17689 (simple_return_indirect_internal): Call
17690 ix86_output_indirect_function_return instead of
17691 ix86_output_indirect_jmp.
17693 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17696 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17697 memset and value initialization afterwards.
17699 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17701 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17703 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17706 * common/config/aarch64/aarch64-common.c
17707 (aarch_option_optimization_table[]): Switch
17708 off fomit-frame-pointer
17710 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17711 Chung-Ju Wu <jasonwucj@gmail.com>
17713 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17715 (store_multiple): Ditto.
17717 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17719 * config.gcc: Add --with-cpu support for nds32 target.
17720 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17721 * config/nds32/nds32.opt: Add -mcpu= option.
17723 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17725 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17726 isel=yes): Warn for these deprecated options.
17728 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17730 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17731 ISA_2_5_MASKS_EMBEDDED.
17733 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17735 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17736 p->max as pointers rather than using iterative_hash_expr.
17738 2018-02-23 Carl Love <cel@us.ibm.com>
17740 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17741 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17743 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17744 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17745 P8V_BUILTIN_VEC_VUNSIGNED2.
17747 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17750 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17751 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17753 * lra-constraints.c (curr_insn_transform): Set up
17754 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17756 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17757 * lra-eliminations.c (spill_pseudos): Ditto.
17758 (process_insn_for_elimination): Ditto.
17759 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17760 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17761 LRA_NON_CLOBBERED_ALT.
17763 2018-02-22 Martin Sebor <msebor@redhat.com>
17765 PR tree-optimization/84480
17766 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17767 to maybe_diag_stxncpy_trunc. Call it.
17768 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17769 from gimple_fold_builtin_strcpy. Print inlining stack.
17770 (handle_builtin_stxncpy): Print inlining stack.
17771 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17773 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17776 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17777 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17778 and -fcheck-pointer-bounds are used together.
17779 (indirect_thunk_prefix): New enum.
17780 (indirect_thunk_need_prefix): New function.
17781 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17782 "_nt" instead of "_bnd" for NOTRACK prefix.
17783 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17784 (output_indirect_thunk_function): Likewise.
17786 (ix86_code_end): Update output_indirect_thunk_function calls.
17787 (ix86_output_indirect_branch_via_reg): Replace
17788 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17789 (ix86_output_indirect_branch_via_push): Likewise.
17790 (ix86_output_function_return): Likewise.
17791 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17792 incompatible with -fcf-protection=branch and
17793 -fcheck-pointer-bounds.
17795 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17798 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17799 Change gcc_assert call to output_operand_lossage.
17801 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17803 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17805 2018-02-22 DJ Delorie <dj@redhat.com>
17806 Sebastian Perta <sebastian.perta@renesas.com>
17807 Oleg Endo <olegendo@gcc.gnu.org>
17809 * config/rx/rx.c (rx_rtx_costs): New function.
17810 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17812 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17814 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17816 2018-02-22 Martin Liska <mliska@suse.cz>
17819 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17820 Add "native" as a possible value.
17822 2018-02-22 Martin Liska <mliska@suse.cz>
17825 * config/i386/i386.c (ix86_option_override_internal):
17826 Add "native" as a possible value for -march and -mtune.
17828 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17831 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17832 to all type variants.
17834 PR tree-optimization/84503
17835 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17836 width as info->bitpos + info->bitsize - start.
17837 (merged_store_group::merge_overlapping): Simplify width computation.
17838 (check_no_overlap): New function.
17839 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17840 start + width and last_order of the group, fail if check_no_overlap
17842 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17843 to group if check_no_overlap fails.
17845 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17847 * config/rs6000/altivec.md: Delete contraint arguments to
17848 define_expand, define_split, and define_peephole2, and in
17849 define_insn_and_split if always unused.
17850 * config/rs6000/darwin.md: Ditto.
17851 * config/rs6000/dfp.md: Ditto.
17852 * config/rs6000/rs6000.md: Ditto.
17853 * config/rs6000/sync.md: Ditto.
17854 * config/rs6000/vector.md: Ditto.
17855 * config/rs6000/vsx.md: Ditto.
17857 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17859 * config/rs6000/altivec.md: Write output control strings as braced
17860 blocks instead of double-quoted strings.
17861 * config/rs6000/darwin.md: Ditto.
17862 * config/rs6000/rs6000.md: Ditto.
17863 * config/rs6000/vector.md: Ditto.
17864 * config/rs6000/vsx.md: Ditto.
17866 2018-02-21 Jason Merrill <jason@redhat.com>
17868 PR c++/84314 - ICE with templates and fastcall attribute.
17869 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17871 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17873 * ipa-cp.c (determine_versionability): Fix comment typos.
17875 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17878 * ipa-cp.c (determine_versionability): Do not version functions caling
17881 2018-02-21 Martin Liska <mliska@suse.cz>
17884 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17885 Add "native" as a possible value.
17886 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17887 the macro when native cpu detection is available.
17889 2018-02-21 Martin Liska <mliska@suse.cz>
17892 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17893 Add "native" as a possible value.
17894 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17895 when native cpu detection is available.
17897 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17898 Martin Sebor <msebor@redhat.com>
17900 PR tree-optimization/84478
17901 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17903 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17904 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17905 support which is conservatively correct, for 2 only stay conservative
17906 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17907 argument to the 2 argument get_range_strlen, adjust 6 arg
17908 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17910 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17911 (gimple_fold_builtin_strlen): Pass true as last argument to
17914 2018-02-20 Martin Sebor <msebor@redhat.com>
17916 PR middle-end/84095
17917 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17918 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17919 (builtin_memref::builtin_memref): Factor out parts into
17920 set_base_and_offset and call it.
17922 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17924 PR middle-end/84406
17925 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17926 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17927 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17928 search at the associated MODE_INT.
17930 2018-02-20 Jeff Law <law@redhat.com>
17932 PR middle-end/82123
17933 PR tree-optimization/81592
17934 PR middle-end/79257
17935 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17936 for range data rather than using global data.
17937 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17938 range data rather than using global data.
17939 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17940 pass it to children as needed.
17941 (struct directive::fmtresult): Similarly.
17942 (struct directive::set_width): Similarly.
17943 (struct directive::set_precision): Similarly.
17944 (format_integer, format_directive, parse_directive): Similarly.
17945 (format_none): Accept unnamed vr_values parameter.
17946 (format_percent, format_floating, format_character): Similarly.
17947 (format_string, format_plain): Similarly.
17948 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17949 the EVRP range analyzer for range data rather than using global data.
17950 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17951 gimple-ssa-evrp-analyze.h
17952 (class sprintf_dom_walker): Add after_dom_children member function.
17953 Add evrp_range_analyzer member.
17954 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17955 range analyzer as needed.
17956 (sprintf_dom_walker::after_dom_children): New member function.
17957 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17959 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17960 (evrp_range_analyzer::pop_to_marker): Likewise.
17962 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17964 PR tree-optimization/84419
17965 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17966 with the required type if its current type is compatible but
17969 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17971 PR middle-end/82004
17972 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17973 after vectorization.
17975 2018-02-20 Martin Liska <mliska@suse.cz>
17978 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17979 possible values if we don't have a hint.
17981 2018-02-20 Martin Liska <mliska@suse.cz>
17985 * final.c (shorten_branches): Build align_tab array with one
17987 * opts.c (finish_options): Add alignment option limit check.
17988 (MAX_CODE_ALIGN): Likewise.
17989 (MAX_CODE_ALIGN_VALUE): Likewise.
17990 * doc/invoke.texi: Document maximum allowed option value for
17991 all -falign-* options.
17993 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17996 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17997 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17998 * var-tracking.c (emit_note_insn_var_location): Remove all references
17999 to NOTE_INSN_CALL_ARG_LOCATION.
18000 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18001 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18002 Use copy_rtx_if_shared.
18003 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18004 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18005 (dwarf2out_var_location): Remove handling of
18006 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18008 * final.c (final_scan_insn): Remove all references to
18009 NOTE_INSN_CALL_ARG_LOCATION.
18010 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18011 before dumping final insns.
18012 * except.c (emit_note_eh_region_end): Remove all references to
18013 NOTE_INSN_CALL_ARG_LOCATION.
18014 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18015 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18016 * config/arc/arc.c (hwloop_optimize): Likewise.
18017 * config/arm/arm.c (create_fix_barrier): Likewise.
18018 * config/s390/s390.c (s390_chunkify_start): Likewise.
18019 * config/sh/sh.c (find_barrier): Likewise.
18020 * config/i386/i386.c (rest_of_insert_endbranch,
18021 ix86_seh_fixup_eh_fallthru): Likewise.
18022 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18023 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18024 * config/frv/frv.c (frv_function_prologue): Likewise.
18025 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18027 (note_outside_basic_block_p): Remove all references to
18028 NOTE_INSN_CALL_ARG_LOCATION.
18029 * gengtype.c (adjust_field_rtx_def): Likewise.
18030 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18032 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18033 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18036 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18039 PR tree-optimization/84452
18040 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18041 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18044 2018-02-19 Martin Liska <mliska@suse.cz>
18047 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18049 2018-02-19 Martin Liska <mliska@suse.cz>
18050 Richard Sandiford <richard.sandiford@linaro.org>
18052 PR tree-optimization/82491
18053 * gimple-fold.c (get_base_constructor): Make earlier bail out
18056 2018-02-19 Carl Love <cel@us.ibm.com>
18058 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18059 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18061 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18062 P8V_BUILTIN_VEC_NEG.
18064 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18066 * config/rl78/rl78.md (movdf): New define expand.
18068 2018-02-19 Martin Liska <mliska@suse.cz>
18071 * doc/invoke.texi: Fix typo.
18072 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18074 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18076 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18077 handle rs6000_single_float and rs6000_double_float specially for
18080 2018-02-16 Jeff Law <law@redhat.com>
18082 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18083 (pop_regs): Use it.
18085 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18088 * ipa-inline.c (inline_small_functions): Fix a typo.
18090 2018-02-16 Nathan Sidwell <nathan@acm.org>
18092 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18094 2018-02-16 Carl Love <cel@us.ibm.com>
18096 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18097 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18098 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18099 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18100 expansion to P8V_BUILTIN_VEC_FLOAT2.
18102 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18104 PR rtl-optimization/70023
18105 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18106 src_regno into account.
18108 2018-02-16 Carl Love <cel@us.ibm.com>
18110 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18111 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18112 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18113 * config/rs6000/rs6000.c: Remove case statements for
18114 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18115 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18116 and P9V_BUILTIN_VEC_VINSERT4B.
18117 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18118 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18119 * config/rs6000/vsx.md:
18120 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18123 2018-02-16 Carl Love <cel@us.ibm.com>
18125 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18127 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18129 * config/rs6000/rs6000-c.c: Add the definitions for
18130 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18131 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18132 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18133 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18134 definition for insert4b and define insn *insert3b_internal.
18135 * doc/extend.texi: Add documentation for vec_extract4b.
18137 2018-02-16 Nathan Sidwell <nathan@acm.org>
18139 * doc/extend.texi (Backwards Compatibility): Mention friend
18140 injection. Note for-scope is deprecated.
18141 * doc/invoke.texi (-ffriend-injection): Deprecate.
18143 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18145 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18146 that moved to I2, also allow destinations that are a paradoxical
18147 subreg (instead of a normal reg).
18149 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18152 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18155 2018-02-16 Richard Biener <rguenther@suse.de>
18157 PR tree-optimization/84037
18158 PR tree-optimization/84016
18160 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18161 Adjust vec_construct for the fact we need additional higher latency
18162 128bit inserts for AVX256 and AVX512 vector builds.
18163 (ix86_add_stmt_cost): Scale vector construction cost for
18166 2018-02-16 Richard Biener <rguenther@suse.de>
18168 PR tree-optimization/84417
18169 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18170 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18171 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18173 2018-02-16 Martin Liska <mliska@suse.cz>
18176 * internal-fn.def (ASAN_CHECK): Set proper flags.
18177 (ASAN_MARK): Likewise.
18179 2018-02-16 Julia Koval <julia.koval@intel.com>
18181 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18182 from PTA_CANNONLAKE.
18184 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18187 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18188 Use ++iter rather than iter++ for std::list iterators.
18189 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18190 defer deleting them until all nodes in the forest are processed. Do
18191 free even leaf nodes. Change to_process into auto_vec.
18194 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18195 * vec.h (vec_default_construct): Use memset instead of placement new
18196 if BROKEN_VALUE_INITIALIZATION is defined.
18197 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18198 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18201 PR rtl-optimization/83723
18202 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18203 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18204 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18206 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18208 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18210 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18212 PR rtl-optimization/81443
18213 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18214 from inner REGs to paradoxical SUBREGs.
18216 2018-02-16 Richard Biener <rguenther@suse.de>
18218 PR tree-optimization/84399
18219 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18220 For operands we can analyze at their definition make sure we can
18221 analyze them at each use as well.
18223 2018-02-16 Richard Biener <rguenther@suse.de>
18225 PR tree-optimization/84190
18226 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18227 volatile accesses if the decl isn't volatile.
18229 2018-02-15 Jason Merrill <jason@redhat.com>
18231 PR c++/84314 - ICE with templates and fastcall attribute.
18232 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18233 TYPE_CANONICAL on an existing type.
18235 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18237 PR tree-optimization/84383
18238 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18239 dstoff nor call operand_equal_p if dstbase is NULL.
18241 PR tree-optimization/84334
18242 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18243 also a CONSTANT_CLASS_P, punt.
18245 2018-02-14 Jim Wilson <jimw@sifive.com>
18247 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18248 first SMALL_OPERAND check. New local min_second_step. Move assert
18249 to where locals are set. Add TARGET_RVC support.
18250 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18252 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18254 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18256 2018-02-14 Martin Sebor <msebor@redhat.com>
18258 PR tree-optimization/83698
18259 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18260 arrays constrain the offset range to their bounds.
18261 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18262 (builtin_access::overlap): Avoid setting the size of overlap if it's
18264 (maybe_diag_overlap): Also consider arrays when deciding what values
18265 of offsets to include in diagnostics.
18267 2018-02-14 Martin Sebor <msebor@redhat.com>
18270 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18271 that correspond to the kind of a declaration.
18273 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18276 * config/pa/pa.md: Load address of PIC label using the linkage table
18277 if the label is nonlocal.
18279 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18281 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18282 warning message if user requests -maltivec=be.
18283 * doc/invoke.texi: Document deprecation of -maltivec=be.
18285 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18288 * config/rs6000/rs6000-c.c: Update definitions for
18289 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18290 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18292 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18295 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18296 add _get_ssp intrinsics. Remove argument from
18297 __builtin_ia32_rdssp[d|q].
18298 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18299 * config/i386/i386-builtin.def: Remove argument from
18300 __builtin_ia32_rdssp[d|q].
18301 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18302 ix86_expand_special_args_builtin for _rdssp[d|q].
18303 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18304 Clear register before usage.
18305 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18306 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18308 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18310 PR tree-optimization/84357
18311 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18312 operand 1 of an ARRAY_REF too.
18314 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18317 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18318 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18320 (set_of_reg): New struct.
18321 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18322 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18323 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18325 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18326 Split into bitclr, bitset, bitinvert patterns if appropriate.
18327 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18328 use rx_fuse_in_memory_bitop.
18329 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18330 to named insn, correct maximum insn length.
18332 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18335 * machmode.def: Define a complex mode for PARTIAL_INT.
18336 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18338 * doc/rtl.texi: Document CSPImode.
18339 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18341 (msp430_hard_regno_nregs_with_padding): Likewise.
18343 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18346 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18348 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18350 PR rtl-optimization/84169
18351 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18352 we generated a parallel as new i3 and we split that to new i2 and i3
18353 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18354 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18355 those to i2, not i1. Partially rewrite this scan code.
18357 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18360 * stor-layout.c (place_field): For variable length fields, adjust
18361 offset_align afterwards not just based on the field's alignment,
18362 but also on the size.
18364 PR middle-end/84309
18365 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18366 of exps and logs in the use_exp2 case.
18368 2018-02-13 Jeff Law <law@redhat.com>
18370 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18371 entry for "vector".
18373 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18376 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18380 * common.opt (gas-loc-support, gas-locview-support): New.
18381 (ginline-points, ginternal-reset-location-views): New.
18382 * doc/invoke.texi: Document them. Use @itemx where intended.
18383 (gvariable-location-views): Adjust.
18384 * target.def (reset_location_view): New.
18385 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18386 (TARGET_RESET_LOCATION_VIEW): New.
18387 * doc/tm.texi: Rebuilt.
18388 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18389 (dwarf2out_default_as_locview_support): New.
18390 (output_asm_line_debug_info): Use option variables.
18391 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18392 (output_loc_list): Likewise.
18393 (add_high_low_attributes): Check option variables.
18394 Don't output entry view attribute in strict mode.
18395 (gen_inlined_subroutine_die): Check option variables.
18396 (dwarf2out_inline_entry): Likewise.
18397 (init_sections_and_labels): Likewise.
18398 (dwarf2out_early_finish): Likewise.
18399 (maybe_reset_location_view): New, from...
18400 (dwarf2out_var_location): ... here. Call it.
18401 * debug.h (dwarf2out_default_as_loc_support): Declare.
18402 (dwarf2out_default_as_locview_support): Declare.
18403 * hooks.c (hook_int_rtx_insn_0): New.
18404 * hooks.h (hook_int_rtx_insn_0): Declare.
18405 * toplev.c (process_options): Take -gas-loc-support and
18406 -gas-locview-support from dwarf2out. Enable
18407 -gvariable-location-views by default only with locview
18408 assembler support. Enable -ginternal-reset-location-views by
18409 default only if the target defines the corresponding hook.
18410 Enable -ginline-points by default if location views are
18411 enabled; force it disabled if statement frontiers are
18413 * tree-inline.c (expand_call_inline): Check option variables.
18414 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18416 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18418 PR tree-optimization/84321
18419 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18420 handling. Also check whether the anti-range contains any values
18421 that satisfy the mask; switch to a VR_RANGE if not.
18423 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18426 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18428 2018-02-13 Martin Jambor <mjambor@suse.cz>
18431 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18432 of call statements, also set location of a load to a temporary.
18434 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18436 * config/rl78/rl78.c (add_vector_labels): New function.
18437 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18438 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18439 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18440 which checks that no arguments are passed.
18441 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18442 * doc/extend.texi: Documentation for the new attribute.
18444 2018-02-13 Andreas Schwab <schwab@suse.de>
18446 * config/riscv/linux.h (CPP_SPEC): Define.
18448 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18451 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18452 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18453 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18454 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18455 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18456 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18457 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18458 temporarily for AES and PCLMUL builtins.
18460 PR tree-optimization/84339
18461 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18462 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18465 PR middle-end/84309
18466 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18467 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18468 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18470 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18472 * omp-simd-clone.h: New file.
18473 * omp-simd-clone.c: Include omp-simd-clone.h.
18474 (expand_simd_clones): No longer static.
18475 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18476 cgraph.h and omp-simd-clone.h.
18477 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18478 (vect_recog_widen_shift_pattern): Formatting fix.
18479 (vect_pattern_recog_1): Don't check optab for calls.
18482 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18483 operands[2] into a REG before using gen_lowpart on it.
18485 2018-02-12 Jeff Law <law@redhat.com>
18488 * config/sh/sh.c (find_barrier): Consider a sibling call
18491 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18492 successfully back substituting a reg.
18494 2018-02-12 Richard Biener <rguenther@suse.de>
18496 PR tree-optimization/84037
18497 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18498 parameter, move visited init to caller.
18499 (vect_slp_analyze_operations): Separate cost from validity
18500 check, initialize visited once for all instances.
18501 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18503 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18505 (vect_model_promotion_demotion_cost): Likewise.
18506 (vectorizable_bswap): Guard cost modeling with !slp_node
18507 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18509 (vectorizable_call): Likewise.
18510 (vectorizable_conversion): Likewise.
18511 (vectorizable_assignment): Likewise.
18512 (vectorizable_shift): Likewise.
18513 (vectorizable_operation): Likewise.
18514 (vectorizable_store): Likewise.
18515 (vectorizable_load): Likewise.
18516 (vectorizable_condition): Likewise.
18517 (vectorizable_comparison): Likewise.
18519 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18522 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18523 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18524 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18526 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18528 PR middle-end/83665
18529 * params.def (inline-min-speedup): Increase from 8 to 15.
18530 (max-inline-insns-auto): Decrease from 40 to 30.
18531 * ipa-split.c (consider_split): Add some buffer for function to
18532 be considered inlining candidate.
18533 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18536 2018-02-12 Richard Biener <rguenther@suse.de>
18538 PR tree-optimization/84037
18539 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18540 matched stmts if we cannot swap the non-matched ones.
18542 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18544 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18545 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18546 _mm_maskz_scalef_round_ss): New intrinsics.
18547 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18548 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18549 __builtin_ia32_scalefss_round): Remove.
18550 (__builtin_ia32_scalefsd_mask_round,
18551 __builtin_ia32_scalefss_mask_round): New intrinsics.
18552 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18553 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18554 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18555 "<round_constraint>")): Changed to ...
18556 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18557 "<round_scalar_constraint>")): ... this.
18558 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18559 %0, %1, %2<round_op3>}"): Changed to ...
18560 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18561 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18562 %2<round_scalar_mask_op3>}"): ... this.
18563 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18565 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18567 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18568 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18569 (_mm_maskz_sqrt_round_ss): New intrinsics.
18570 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18571 (__builtin_ia32_sqrtsd_mask_round)
18572 (__builtin_ia32_sqrtss_mask_round): New builtins.
18573 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18574 (__builtin_ia32_sqrtss_round): Remove.
18575 (__builtin_ia32_sqrtsd_mask_round)
18576 (__builtin_ia32_sqrtss_mask_round): New builtins.
18577 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18578 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18579 ((match_operand:VF_128 1 "vector_operand"
18580 "xBm,<round_constraint>")): Changed to ...
18581 ((match_operand:VF_128 1 "vector_operand"
18582 "xBm,<round_scalar_constraint>")): ... this.
18583 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18584 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18585 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18586 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18587 %<iptr>1<round_scalar_mask_op3>}): ... this.
18588 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18589 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18591 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18594 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18595 Cast vec_cmpeq result to correct type.
18596 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18597 Cast vec_cmpgt result to correct type.
18599 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18601 * final.c (final_scan_insn_1): Renamed from...
18602 (final_scan_insn): ... this. New wrapper, to recover
18603 seen from the outermost call in recursive ones.
18604 * config/sparc/sparc.c (output_return): Drop seen from call.
18605 (output_sibcall): Likewise.
18606 * config/visium/visium.c (output_branch): Likewise.
18608 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18610 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18613 2018-02-10 Alan Modra <amodra@gmail.com>
18616 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18617 Specify LR as an input.
18619 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18622 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18623 remove_member_access_dummy_vars): New functions.
18624 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18625 lower_omp_1, execute_lower_omp): Use them.
18627 PR rtl-optimization/84308
18628 * shrink-wrap.c (spread_components): Release todo vector.
18630 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18632 PR rtl-optimization/57193
18633 * ira-color.c (struct allocno_color_data): Add member
18634 conflict_allocno_hard_prefs.
18635 (update_conflict_allocno_hard_prefs): New.
18636 (bucket_allocno_compare_func): Add a preference based on
18637 conflict_allocno_hard_prefs.
18638 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18639 (color_allocnos): Remove a dead code. Initiate
18640 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18642 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18645 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18646 constraint from =wa to wa. Avoid a subreg on the output operand,
18647 instead use a pseudo and subreg it in a move.
18648 (p9_xxbrd_<mode>): Changed to ...
18649 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18650 (p9_xxbrd_v2df): New expander.
18651 (p9_xxbrw_<mode>): Changed to ...
18652 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18653 (p9_xxbrw_v4sf): New expander.
18655 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18657 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18659 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18662 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18663 multiply in 32-bit mode.
18664 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18665 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18668 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18670 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18671 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18672 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18673 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18675 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18678 * dwarf2out.c (is_trivial_indirect_ref): New function.
18679 (dwarf2out_late_global_decl): Do not generate a location
18680 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18681 and that are not defined in the current unit.
18683 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18685 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18686 instead of a libcall for UNORDERED.
18688 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18691 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18692 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18694 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18697 * config/s390/s390.c (s390_set_current_function): Invoke
18698 s390_indirect_branch_settings also if fndecl didn't change.
18700 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18702 * config/rs6000/rs6000.md (blockage): Set length to zero.
18704 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18706 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18708 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18711 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18712 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18716 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18717 PARALLEL incoming that failed vt_get_decl_and_offset check.
18719 PR middle-end/84237
18720 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18721 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18723 (get_variable_section): For decls in named .bss* sections pass true as
18724 second argument to bss_initializer_p.
18726 2018-02-09 Marek Polacek <polacek@redhat.com>
18727 Jakub Jelinek <jakub@redhat.com>
18730 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18731 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18732 Sync some changes from cxx_fold_indirect_ref.
18734 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18736 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18738 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18739 (BLOCK_INLINE_ENTRY_LABEL): New.
18740 (dwarf2out_var_location): Disregard inline entry markers.
18741 (inline_entry_data): New struct.
18742 (inline_entry_data_hasher): New hashtable type.
18743 (inline_entry_data_hasher::hash): New.
18744 (inline_entry_data_hasher::equal): New.
18745 (inline_entry_data_table): New variable.
18746 (add_high_low_attributes): Add DW_AT_entry_pc and
18747 DW_AT_GNU_entry_view attributes if a pending entry is found
18748 in inline_entry_data_table. Add old entry_pc attribute only
18749 if debug nonbinding markers are disabled.
18750 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18751 markers are enabled.
18752 (block_within_block_p, dwarf2out_inline_entry): New.
18753 (dwarf2out_finish): Check that no entries remained in
18754 inline_entry_data_table.
18755 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18756 (final_scan_insn, notice_source_line): Likewise.
18757 (rest_of_clean_state): Skip inline entry markers.
18758 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18760 * gimple.c (gimple_build_debug_inline_entry): New.
18761 * gimple.h (enum gimple_debug_subcode): Add
18762 GIMPLE_DEBUG_INLINE_ENTRY.
18763 (gimple_build_debug_inline_entry): Declare.
18764 (gimple_debug_inline_entry_p): New.
18765 (gimple_debug_nonbind_marker_p): Adjust.
18766 * insn-notes.def (INLINE_ENTRY): New.
18767 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18768 inline entry marker notes.
18769 (print_insn): Likewise.
18770 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18771 (INSN_DEBUG_MARKER_KIND): Likewise.
18772 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18773 * tree-inline.c (expand_call_inline): Build and insert
18774 debug_inline_entry stmt.
18775 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18776 inline entry blocks early, if nonbind markers are enabled.
18777 (dump_scope_block): Dump fragment info.
18778 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18779 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18780 (gimple_build_debug_inline_entry): New.
18781 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18782 Enable/disable inline entry points too.
18783 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18784 (DEBUG_INSN): Describe inline entry markers.
18786 * common.opt (gvariable-location-views): New.
18787 (gvariable-location-views=incompat5): New.
18788 * config.in: Rebuilt.
18789 * configure: Rebuilt.
18790 * configure.ac: Test assembler for view support.
18791 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18792 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18793 * dwarf2out.c (var_loc_view): New typedef.
18794 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18795 (dwarf2out_locviews_in_attribute): New.
18796 (dwarf2out_locviews_in_loclist): New.
18797 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18798 (enum dw_line_info_opcode): Add LI_adv_address.
18799 (struct dw_line_info_table): Add view.
18800 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18801 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18802 (zero_view_p): New variable.
18803 (ZERO_VIEW_P): New macro.
18804 (output_asm_line_debug_info): New.
18805 (struct var_loc_node): Add view.
18806 (add_AT_view_list, AT_loc_list): New.
18807 (add_var_loc_to_decl): Add view param. Test it against last.
18808 (new_loc_list): Add view params. Record them.
18809 (AT_loc_list_ptr): Handle loc and view lists.
18810 (view_list_to_loc_list_val_node): New.
18811 (print_dw_val): Handle dw_val_class_view_list.
18812 (size_of_die): Likewise.
18813 (value_format): Likewise.
18814 (loc_list_has_views): New.
18815 (gen_llsym): Set vl_symbol too.
18816 (maybe_gen_llsym, skip_loc_list_entry): New.
18817 (dwarf2out_maybe_output_loclist_view_pair): New.
18818 (output_loc_list): Output view list or entries too.
18819 (output_view_list_offset): New.
18820 (output_die): Handle dw_val_class_view_list.
18821 (output_dwarf_version): New.
18822 (output_compilation_unit_header): Use it.
18823 (output_skeleton_debug_sections): Likewise.
18824 (output_rnglists, output_line_info): Likewise.
18825 (output_pubnames, output_aranges): Update version comments.
18826 (output_one_line_info_table): Output view numbers in asm comments.
18827 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18828 Call maybe_gen_llsym.
18829 (loc_list_from_tree_1): Adjust.
18830 (add_AT_location_description): Create view list attribute if
18831 needed, check it's absent otherwise.
18832 (convert_cfa_to_fb_loc_list): Adjust.
18833 (maybe_emit_file): Call output_asm_line_debug_info for test.
18834 (dwarf2out_var_location): Reset views as needed. Precompute
18835 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18836 attribute. Set view.
18837 (new_line_info_table): Reset next view.
18838 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18839 (dwarf2out_source_line): Likewise. Output view resets and labels to
18840 the assembler, or select appropriate line info opcodes.
18841 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18842 (optimize_string_length): Catch it. Adjust.
18843 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18844 dw_val_class_view_list, and remove it if no longer needed.
18845 (hash_loc_list): Hash view numbers.
18846 (loc_list_hasher::equal): Compare them.
18847 (optimize_location_lists): Check whether a view list symbol is
18848 needed, and whether the locview attribute is present, and
18849 whether they match. Remove the locview attribute if no longer
18851 (index_location_lists): Call skip_loc_list_entry for test.
18852 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18853 Use output_dwarf_version.
18854 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18855 (struct dw_val_node): Add val_view_list.
18856 * final.c (SEEN_NEXT_VIEW): New.
18857 (set_next_view_needed): New.
18858 (clear_next_view_needed): New.
18859 (maybe_output_next_view): New.
18860 (final_start_function): Rename to...
18861 (final_start_function_1): ... this. Take pointer to FIRST,
18862 add SEEN parameter. Emit param bindings in the initial view.
18863 (final_start_function): Reintroduce SEEN-less interface.
18864 (final): Rename to...
18865 (final_1): ... this. Take SEEN parameter. Output final pending
18866 next view at the end.
18867 (final): Reintroduce seen-less interface.
18868 (final_scan_insn): Output pending next view before switching
18869 sections or ending a block. Mark the next view as needed when
18870 outputting variable locations. Notify debug backend of section
18871 changes, and of location view changes.
18872 (rest_of_handle_final): Adjust.
18873 * toplev.c (process_options): Autodetect value for debug variable
18874 location views option. Warn on incompat5 without -gdwarf-5.
18875 * doc/invoke.texi (gvariable-location-views): New.
18876 (gvariable-location-views=incompat5): New.
18877 (gno-variable-location-views): New.
18879 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18881 PR tree-optimization/84136
18882 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18883 that the result of find_edge is non-NULL.
18885 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18888 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18889 storing integer register in SImode. Fix cost of 256 and 512
18890 byte aligned SSE register store.
18892 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18894 * config/i386/i386.c (ix86_multiplication_cost): Fix
18895 multiplication cost for TARGET_AVX512DQ.
18897 2018-02-08 Marek Polacek <polacek@redhat.com>
18899 PR tree-optimization/84238
18900 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18903 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18905 PR tree-optimization/84265
18906 * tree-vect-stmts.c (vectorizable_store): Don't treat
18907 VMAT_CONTIGUOUS accesses as grouped.
18908 (vectorizable_load): Likewise.
18910 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18912 PR tree-optimization/81635
18913 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18914 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18915 (test_round_for_mask): New functions.
18916 (wide_int_cc_tests): Call test_round_for_mask.
18917 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18918 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18919 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18920 range returned by get_range_info.
18922 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18925 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18926 * symtab.c: Include builtins.h
18927 (symtab_node::output_to_lto_symbol_table_p): Move here
18928 from lto-streamer-out.c:output_symbol_p.
18929 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18930 (output_symbol_p): Move all logic to symtab.c
18931 (produce_symtab): Update.
18933 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18935 * config/s390/s390-opts.h (enum indirect_branch): Define.
18936 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18937 (s390_indirect_branch_via_thunk)
18938 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18939 (enum s390_indirect_branch_type): Define.
18940 * config/s390/s390.c (struct s390_frame_layout, struct
18941 machine_function): Remove.
18942 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18943 (indirect_branch_table_label_no, indirect_branch_table_name):
18945 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18946 (enum s390_indirect_branch_option): Define.
18947 (s390_return_addr_from_memory): New function.
18948 (s390_handle_string_attribute): New function.
18949 (s390_attribute_table): Add new attribute handler.
18950 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18951 (s390_indirect_branch_via_thunk): New function.
18952 (s390_indirect_branch_via_inline_thunk): New function.
18953 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18954 sibling call optimization for non z10 compiles.
18955 (s390_emit_call): Force indirect branch target to be a single
18956 register. Add r1 clobber for non-z10 compiles.
18957 (s390_emit_epilogue): Emit return jump via return_use expander.
18958 (s390_reorg): Handle JUMP_INSNs as execute targets.
18959 (s390_option_override_internal): Perform validity checks for the
18960 new command line options.
18961 (s390_indirect_branch_attrvalue): New function.
18962 (s390_indirect_branch_settings): New function.
18963 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18964 (s390_output_indirect_thunk_function): New function.
18965 (s390_code_end): Implement target hook.
18966 (s390_case_values_threshold): Implement target hook.
18967 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18969 * config/s390/s390.h (struct s390_frame_layout)
18970 (struct machine_function): Move here from s390.c.
18971 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18972 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18973 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18974 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18975 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18976 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18977 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18978 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18979 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18980 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18981 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18982 (mnemonic attribute): Add values which aren't recognized
18984 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18985 pattern for branch conversion. Fix mnemonic attribute.
18986 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18987 indirect branch via thunk if requested.
18988 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18989 ("*indirect_jump"): Disable for branch conversion using out of
18991 ("indirect_jump_via_thunk<mode>_z10")
18992 ("indirect_jump_via_thunk<mode>")
18993 ("indirect_jump_via_inlinethunk<mode>_z10")
18994 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18995 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18996 ("casesi_jump_via_inlinethunk<mode>_z10")
18997 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18998 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18999 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19000 ("*indirect2_jump"): Disable for branch conversion.
19001 ("casesi_jump"): Turn into expander and expand patterns for branch
19003 ("return_use"): New expander.
19004 ("*return"): Emit return via thunk and rename it to ...
19005 ("*return<mode>"): ... this one.
19006 * config/s390/s390.opt: Add new options and and enum for the
19009 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19011 * lra-constraints.c (match_reload): Unconditionally use
19012 gen_lowpart_SUBREG, rather than selecting between that
19013 and equivalent gen_rtx_SUBREG code.
19015 2018-02-08 Richard Biener <rguenther@suse.de>
19017 PR tree-optimization/84233
19018 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19019 changed flag instead of boguously re-using phi_inserted.
19021 2018-02-08 Martin Jambor <mjambor@suse.cz>
19023 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19024 static local variables.
19026 2018-02-08 Richard Biener <rguenther@suse.de>
19028 PR tree-optimization/84278
19029 * tree-vect-stmts.c (vectorizable_store): When looking for
19030 smaller vector types to perform grouped strided loads/stores
19031 make sure the mode is supported by the target.
19032 (vectorizable_load): Likewise.
19034 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19036 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19037 Increase LDP/STP opportunities by adding adjacent callee-saves.
19039 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19041 PR rtl-optimization/84068
19042 PR rtl-optimization/83459
19043 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19045 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19047 PR tree-optimization/84224
19048 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19049 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19050 non-zero arguments.
19052 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19055 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19056 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19057 count, remove one USE.
19059 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19061 * doc/install.texi (Configuration): Document the
19062 --with-long-double-format={ibm,ieee} PowerPC configuration
19066 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19067 Convert from define_expand to be define_insn_and_split. Rework
19068 float/double/_Float128 conversions to QI/HI/SImode to work with
19069 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19070 conversions to QI/HImode types did a store and then a load to
19071 truncate the value. For conversions to VSX registers, don't split
19072 the insn, instead emit the code directly. Use the code iterator
19073 any_fix to combine signed and unsigned conversions.
19074 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19075 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19076 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19077 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19078 (fix_<mode>di2_hw): Likewise.
19079 (fixuns_<mode>di2_hw): Likewise.
19080 (fix_<mode>si2_hw): Likewise.
19081 (fixuns_<mode>si2_hw): Likewise.
19082 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19083 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19084 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19085 fix<uns>_trunc<SFDF:mode>si2_p8.
19086 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19087 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19088 (fix<uns>_<mode>_mem): Likewise.
19089 (fctiw<u>z_<mode>_mem): Likewise.
19090 (fix<uns>_<mode>_mem): Likewise.
19091 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19092 the register allocator from doing a direct move to the GPRs to do
19093 a store, and instead use the ISA 3.0 store byte/half-word from
19094 vector register instruction. For IEEE 128-bit floating point,
19095 also optimize stores of 32-bit ints.
19096 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19098 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19100 * genextract.c (push_pathstr_operand): New function to support
19102 (walk_rtx): Call push_pathstr_operand.
19103 (print_path): Support [a-zA-Z].
19105 2018-02-07 Richard Biener <rguenther@suse.de>
19107 PR tree-optimization/84037
19108 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19109 (cse_and_gimplify_to_preheader): Declare.
19110 (vect_get_place_in_interleaving_chain): Likewise.
19111 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19113 (_loop_vec_info::~_loop_vec_info): Delete it.
19114 (cse_and_gimplify_to_preheader): New function.
19115 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19116 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19117 (vectorizable_load): Likewise. For grouped stores always base
19118 the IV on the first element.
19119 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19120 condition before gimplifying.
19122 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19124 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19125 *DIV_EXPR and *MOD_EXPR.
19127 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19130 * config/i386/i386.c (ix86_option_override_internal): Mask out
19131 the CF_SET bit when checking -fcf-protection.
19133 2018-02-07 Tom de Vries <tom@codesourcery.com>
19136 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19139 2018-02-07 Richard Biener <rguenther@suse.de>
19141 PR tree-optimization/84204
19142 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19145 PR tree-optimization/84205
19146 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19147 special-case isl_ast_op_zdiv_r.
19149 PR tree-optimization/84223
19150 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19151 Only add conditions from within the region.
19152 (gather_bbs::after_dom_children): Adjust.
19154 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19157 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19158 * config/avr/avr.md: Only post-reload split REG-REG moves if
19159 either register is GENERAL_REG_P.
19161 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19163 PR tree-optimization/84235
19164 * tree-ssa-scopedtables.c
19165 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19166 if the subtraction is performed in floating point type where NaNs are
19167 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19168 build 1. Formatting fix.
19170 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19173 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19174 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19175 and skip it regardless of bb boundaries. Use CALL_P macro,
19176 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19177 unnecessarily, formatting fix.
19179 2018-02-06 Michael Collison <michael.collison@arm.com>
19181 * config/arm/thumb2.md:
19182 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19183 (*thumb_mov_notscc): Ditto.
19185 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19188 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19189 unsigned_fix, not "s".
19191 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19193 * configure.ac (gcc_fn_eh_frame_ro): New function.
19194 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19195 correct .eh_frame permissions.
19196 * configure: Regenerate.
19198 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19200 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19201 irrelevant options.
19203 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19205 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19206 Display warning message for -mno-speculate-indirect-jumps.
19208 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19210 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19212 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19214 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19216 PR tree-optimization/84225
19217 * tree-eh.c (find_trapping_overflow): Only call
19218 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19220 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19223 * config/i386/i386.c: Reimplement the check of possible options
19224 -mibt/-mshstk conbination. Change error messages.
19225 * doc/invoke.texi: Fix a typo: remove extra '='.
19227 2018-02-06 Marek Polacek <polacek@redhat.com>
19229 PR tree-optimization/84228
19230 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19232 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19235 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19236 emitted arch directives.
19237 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19238 __ARM_FEATURE_COPROC before changing architectures.
19240 2018-02-06 Richard Biener <rguenther@suse.de>
19242 * config/i386/i386.c (print_reg): Fix typo.
19243 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19245 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19247 * configure: Regenerate.
19249 2018-02-05 Martin Sebor <msebor@redhat.com>
19251 PR tree-optimization/83369
19252 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19255 2018-02-05 Martin Liska <mliska@suse.cz>
19257 * doc/invoke.texi: Cherry-pick upstream r323995.
19259 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19261 * ira.c (ira_init_register_move_cost): Adjust comment.
19263 2018-02-05 Martin Liska <mliska@suse.cz>
19265 PR gcov-profile/84137
19266 * doc/gcov.texi: Fix typo in documentation.
19268 2018-02-05 Martin Liska <mliska@suse.cz>
19270 PR gcov-profile/83879
19271 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19272 using dlopen functionality.
19274 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19276 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19277 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19278 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19279 _mm_maskz_range_round_ss): New intrinsics.
19280 (__builtin_ia32_rangesd128_round)
19281 (__builtin_ia32_rangess128_round): Remove.
19282 (__builtin_ia32_rangesd128_mask_round,
19283 __builtin_ia32_rangess128_mask_round): New builtins.
19284 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19285 __builtin_ia32_rangess128_round): Remove.
19286 (__builtin_ia32_rangesd128_mask_round,
19287 __builtin_ia32_rangess128_mask_round): New builtins.
19288 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19289 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19290 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19291 "<round_saeonly_constraint>")): Changed to ...
19292 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19293 "<round_saeonly_scalar_constraint>")): ... this.
19294 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19295 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19296 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19297 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19298 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19300 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19302 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19304 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19305 Remove all values except native, 8540 and 8548.
19307 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19309 * config/i386/i386.c (ix86_output_function_return): Pass
19310 INVALID_REGNUM, instead of -1, as invalid register number to
19311 indirect_thunk_name and output_indirect_thunk.
19313 2018-02-02 Julia Koval <julia.koval@intel.com>
19315 * config.gcc: Add -march=icelake.
19316 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19317 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19318 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19319 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19320 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19321 (processor_target_table): Add icelake.
19322 (ix86_option_override_internal): Handle new PTAs.
19323 (get_builtin_code_for_version): Handle icelake.
19324 (M_INTEL_COREI7_ICELAKE): New.
19325 (fold_builtin_cpu): Handle icelake.
19326 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19327 * doc/invoke.texi: Add -march=icelake.
19329 2018-02-02 Julia Koval <julia.koval@intel.com>
19331 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19332 to wide_int_bitmask.
19333 * wide-int-bitmask.h: New.
19335 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19338 * config/i386/i386.md: Replace Pmode with word_mode in
19339 builtin_setjmp_setup and builtin_longjmp to support x32.
19341 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19345 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19347 (rs6000_supported_cpu_names): New static variable.
19348 (linux_cpu_translation_table): Likewise.
19349 (elf_platform) <cpu>: Define new static variable and use it.
19350 Translate kernel AT_PLATFORM name to canonical name if needed.
19351 Error if platform name is unknown.
19353 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19356 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19358 2018-02-01 Jeff Law <law@redhat.com>
19361 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19362 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19363 the scratch if RELEASE_VIA_POP is false.
19364 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19365 If we have to save a temporary register, decrement SIZE appropriately.
19366 Pass new arguments to release_scratch_register_on_entry.
19367 (ix86_adjust_stack_and_probe): Likewise.
19368 (ix86_emit_probe_stack_range): Pass new arguments to
19369 release_scratch_register_on_entry.
19371 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19373 PR rtl-optimization/84157
19374 * combine.c (change_zero_ext): Use REG_P predicate in
19375 front of HARD_REGISTER_P predicate.
19377 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19379 * config/avr/avr.c (avr_option_override): Move disabling of
19380 -fdelete-null-pointer-checks to...
19381 * common/config/avr/avr-common.c (avr_option_optimization_table):
19384 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19386 PR tree-optimization/81635
19387 * tree-data-ref.c (split_constant_offset_1): For types that
19388 wrap on overflow, try to use range info to prove that wrapping
19391 2018-02-01 Renlin Li <renlin.li@arm.com>
19394 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19395 TAILCALL_ADDR_REGS.
19396 (aarch64_register_move_cost): Likewise.
19397 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19398 TAILCALL_ADDR_REGS.
19399 (REG_CLASS_NAMES): Likewise.
19400 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19401 TAILCALL_ADDR_REGS. Remove IP registers.
19402 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19404 2018-02-01 Richard Biener <rguenther@suse.de>
19406 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19407 for specifying RPO order and allow NULL for that.
19408 * domwalk.c (dom_walker::dom_walker): Likewise.
19409 (dom_walker::walk): Handle NULL RPO order.
19410 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19412 (rewrite_update_dom_walker): Likewise.
19413 (mark_def_dom_walker): Likewise.
19415 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19417 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19418 (aarch64_maybe_expand_sve_subreg_move): Declare.
19419 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19420 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19422 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19423 that are semantically a reverse operation.
19424 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19425 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19426 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19428 (aarch64_can_change_mode_class): For big-endian, forbid changes
19429 between two SVE modes if they have different element sizes.
19431 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19433 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19434 the TImode handling for big-endian targets.
19436 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19438 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19439 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19441 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19442 Remove BSWAP handing for big-endian targets and use the form of
19443 LD1RQ appropariate for the mode.
19445 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19447 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19448 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19449 duplicated element.
19451 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19454 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19455 check for operands that need to go through aarch64_sve_reload_be.
19457 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19459 PR tree-optimization/81661
19460 PR tree-optimization/84117
19461 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19462 * tree-eh.c: Include gimplify.h.
19463 (find_trapping_overflow, replace_trapping_overflow,
19464 rewrite_to_non_trapping_overflow): New functions.
19465 * tree-vect-loop.c: Include tree-eh.h.
19466 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19467 * tree-data-ref.c: Include tree-eh.h.
19468 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19470 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19472 PR rtl-optimization/84123
19473 * combine.c (change_zero_ext): Check if hard register satisfies
19474 can_change_dest_mode before calling gen_lowpart_SUBREG.
19476 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19479 * ira.c (ira_init_register_move_cost): Remove assert.
19481 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19483 PR rtl-optimization/84071
19484 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19485 * doc/tm.texi: Regenerate.
19487 2018-01-31 Richard Biener <rguenther@suse.de>
19489 PR tree-optimization/84132
19490 * tree-data-ref.c (analyze_miv_subscript): Properly
19491 check whether evolution_function_is_affine_multivariate_p
19492 before calling gcd_of_steps_may_divide_p.
19494 2018-01-31 Julia Koval <julia.koval@intel.com>
19497 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19498 * config/i386/i386.md (rdpid_rex64) New.
19499 (rdpid): Make 32bit only.
19501 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19504 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19505 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19507 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19510 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19512 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19514 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19516 PR rtl-optimization/84071
19517 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19518 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19520 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19522 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19523 (arc_attribute_table): Add 'aux' attribute.
19524 (arc_in_small_data_p): Consider aux like variables.
19525 (arc_is_aux_reg_p): New function.
19526 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19527 (arc_get_aux_arg): New function.
19528 (prepare_move_operands): Handle aux-register access.
19529 (arc_handle_aux_attribute): New function.
19530 * doc/extend.texi (ARC Variable attributes): Add subsection.
19532 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19534 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19535 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19536 (arc_attribute_table): Add 'uncached' attribute.
19537 (arc_print_operand): Print '.di' flag for uncached memory
19539 (arc_in_small_data_p): Do not consider for small data the uncached
19541 (arc_is_uncached_mem_p): New function.
19542 * config/arc/predicates.md (compact_store_memory_operand): Check
19543 for uncached memory accesses.
19544 (nonvol_nonimm_operand): Likewise.
19545 * doc/extend.texi (ARC Type Attribute): New subsection.
19547 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19550 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19551 falign-loops=): Add Optimization flag.
19553 2018-01-30 Jeff Law <law@redhat.com>
19556 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19557 INT_REGISTERS_SAVED. Check it prior to calling
19558 get_scratch_register_on_entry.
19559 (ix86_adjust_stack_and_probe): Similarly.
19560 (ix86_emit_probe_stack_range): Similarly.
19561 (ix86_expand_prologue): Corresponding changes.
19563 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19566 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19567 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19569 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19572 * lra-constraints.c (curr_insn_transform): Process AND in the
19575 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19577 PR rtl-optimization/83986
19578 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19579 dependence against last_pending_memory_flush in addition to
19580 pending_jump_insns.
19582 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19584 PR tree-optimization/81611
19585 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19588 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19591 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19594 2018-01-30 Richard Biener <rguenther@suse.de>
19595 Jakub Jelinek <jakub@redhat.com>
19597 PR tree-optimization/84111
19598 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19599 inner loops added during recursion, as they don't have up-to-date
19602 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19605 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19606 (can_inline_edge_by_limits_p): ... here.
19607 (can_early_inline_edge_p, check_callers,
19608 update_caller_keys, update_callee_keys, recursive_inlining,
19609 add_new_edges_to_heap, speculation_useful_p,
19610 inline_small_functions,
19611 inline_small_functions, flatten_function,
19612 inline_to_all_callers_1): Update.
19614 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19616 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19619 2018-01-30 Richard Biener <rguenther@suse.de>
19621 PR tree-optimization/83008
19622 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19623 invariant and constant vector uses in stmts when they need
19624 more than one stmt.
19626 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19629 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19630 * configure: Regenerate.
19632 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19634 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19636 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19637 Use gen_rtx_REG rather than gen_lowpart.
19639 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19641 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19642 rather than 0 when creating partial subregs.
19644 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19646 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19649 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19652 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19653 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19654 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19655 flags. This restores the settings used before the 2017-07-24.
19656 Turning off pre increment/decrement/modify allows IVOPTS to
19657 optimize DF/SF loops where the index is an int.
19659 2018-01-29 Richard Biener <rguenther@suse.de>
19660 Kelvin Nilsen <kelvin@gcc.gnu.org>
19663 * tree-vect-stmts.c (vectorizable_call): Don't call
19664 targetm.vectorize_builtin_md_vectorized_function if callee is
19667 2018-01-22 Carl Love <cel@us.ibm.com>
19669 * doc/extend.tex: Fix typo in second arg in
19670 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19672 2018-01-29 Richard Biener <rguenther@suse.de>
19674 PR tree-optimization/84086
19675 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19676 (flush_ssaname_freelist): When SSA names were released reset
19677 the SCEV hash table.
19679 2018-01-29 Richard Biener <rguenther@suse.de>
19681 PR tree-optimization/84057
19682 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19683 removed paths when removing edges.
19685 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19687 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19688 -mfunction-return=@var{choice}.
19690 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19692 PR diagnostic/84034
19693 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19694 Handle CR like TAB.
19695 (layout::print_source_line): Likewise.
19696 (test_get_line_width_without_trailing_whitespace): Add test cases.
19698 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19700 PR middle-end/84040
19701 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19704 2018-01-26 Jim Wilson <jimw@sifive.com>
19706 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19708 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19711 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19713 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19714 and CMP + SUB-immediate -> SUBS.
19716 2018-01-26 Martin Sebor <msebor@redhat.com>
19718 PR tree-optimization/83896
19719 * tree-ssa-strlen.c (get_string_len): Rename...
19720 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19721 Avoid assuming length is constant.
19722 (handle_char_store): Use HOST_WIDE_INT for string length.
19724 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19727 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19728 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19730 2018-01-26 Richard Biener <rguenther@suse.de>
19732 PR rtl-optimization/84003
19733 * dse.c (record_store): Only record redundant stores when
19734 the earlier store aliases at least all accesses the later one does.
19736 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19738 PR rtl-optimization/83985
19739 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19740 REG_CFA_RESTORE insns.
19741 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19742 REG_CFA_RESTORE insns here.
19745 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19746 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19748 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19750 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19751 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19752 (arc_init): Likewise.
19753 (arc_override_options): Likewise.
19754 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19756 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19758 * config/arc/arc.h (TARGET_DBNZ): Define.
19759 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19760 properly set the tune attribute.
19761 (dbnz): Use TARGET_DBNZ guard.
19762 * config/arc/arc.opt (mtune): Add core3 option.
19764 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19766 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19767 recognize new pic like addresses.
19768 (arc_delegitimize_address): Clean up.
19770 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19772 * config/arc/arc-arches.def: Option mrf16 valid for all
19774 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19775 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19776 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19777 * config/arc/arc-tables.opt: Regenerate.
19778 * config/arc/arc.c (arc_conditional_register_usage): Handle
19779 reduced register file case.
19780 (arc_file_start): Set must have build attributes.
19781 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19782 mrf16 option value.
19783 * config/arc/arc.opt (mrf16): Add new option.
19784 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19785 * config/arc/genmultilib.awk: Handle new mrf16 option.
19786 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19787 * config/arc/t-multilib: Regenerate.
19788 * doc/invoke.texi (ARC Options): Document mrf16 option.
19790 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19792 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19793 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19794 (arc_attribute_table): Add 'secure_call' attribute.
19795 (arc_print_operand): Print secure call operand.
19796 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19798 (arc_is_secure_call_p): New function. * config/arc/arc.md
19799 (call_i): Add support for sjli instruction.
19800 (call_value_i): Likewise.
19801 * config/arc/constraints.md (Csc): New constraint.
19803 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19804 John Eric Martin <John.Martin@emmicro-us.com>
19806 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19807 * config/arc/arc.c (_arc_jli_section): New struct.
19808 (arc_jli_section): New type.
19809 (rc_jli_sections): New static variable.
19810 (arc_handle_jli_attribute): New function.
19811 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19812 (arc_file_end): New function.
19813 (TARGET_ASM_FILE_END): Define.
19814 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19815 (arc_add_jli_section): New function.
19816 (jli_call_scan): Likewise.
19817 (arc_reorg): Call jli_call_scan.
19818 (arc_output_addsi): Remove 'S' from printing asm operand.
19819 (arc_is_jli_call_p): New function.
19820 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19822 (movhi_insn): Likewise.
19823 (movsi_insn): Likewise.
19824 (movsi_set_cc_insn): Likewise.
19825 (loadqi_update): Likewise.
19826 (load_zeroextendqisi_update): Likewise.
19827 (load_signextendqisi_update): Likewise.
19828 (loadhi_update): Likewise.
19829 (load_zeroextendhisi_update): Likewise.
19830 (load_signextendhisi_update): Likewise.
19831 (loadsi_update): Likewise.
19832 (loadsf_update): Likewise.
19833 (movsicc_insn): Likewise.
19834 (bset_insn): Likewise.
19835 (bxor_insn): Likewise.
19836 (bclr_insn): Likewise.
19837 (bmsk_insn): Likewise.
19838 (bicsi3_insn): Likewise.
19839 (cmpsi_cc_c_insn): Likewise.
19840 (movsi_ne): Likewise.
19841 (movsi_cond_exec): Likewise.
19842 (clrsbsi2): Likewise.
19843 (norm_f): Likewise.
19853 (call_i): Remove 'S' asm letter, add jli instruction.
19854 (call_value_i): Likewise.
19855 * config/arc/arc.op (mjli-always): New option.
19856 * config/arc/constraints.md (Cji): New constraint.
19857 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19859 (subsf3_fpx): Likewise.
19860 (mulsf3_fpx): Likewise.
19861 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19863 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19864 function attrbutes.
19865 * doc/invoke.texi (ARC): Document mjli-always option.
19867 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19869 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19870 avoid addition with 0 and use incw and decw where possible.
19872 2018-01-26 Richard Biener <rguenther@suse.de>
19874 PR tree-optimization/81082
19875 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19876 association if it requires casting to unsigned.
19877 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19878 from fold_plusminus_mult_expr to catch important cases late when
19879 range info is available.
19881 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19883 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19884 * configure.ac (hidden_linkonce): New test.
19885 * configure: Regenerate.
19886 * config.in: Regenerate.
19888 2018-01-26 Julia Koval <julia.koval@intel.com>
19890 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19891 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19892 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19893 _mm_mask_bitshuffle_epi64_mask): Fix type.
19894 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19895 USI_FTYPE_V4DI_V4DI_USI): Remove.
19896 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19897 __builtin_ia32_vpshufbitqmb256_mask,
19898 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19899 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19900 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19902 2018-01-26 Alan Modra <amodra@gmail.com>
19905 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19906 UNSPEC_VBPERMQ. Sort other unspecs.
19908 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19910 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19912 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19914 PR middle-end/83055
19915 * predict.c (drop_profile): Do not push/pop cfun; update also
19917 (handle_missing_profiles): Fix logic looking for zero profiles.
19919 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19921 PR middle-end/83977
19922 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19923 on functions with #pragma omp declare simd or functions with simd
19925 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19926 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19927 Remove trailing \n from warning_at calls.
19929 2018-01-25 Tom de Vries <tom@codesourcery.com>
19932 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19933 for neutered workers.
19935 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19938 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19939 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19941 2018-01-24 Jeff Law <law@redhat.com>
19944 * i386.c (get_probe_interval): Move to earlier point.
19945 (ix86_compute_frame_layout): If -fstack-clash-protection and
19946 the frame is larger than the probe interval, then use pushes
19947 to save registers rather than reg->mem moves.
19948 (ix86_expand_prologue): Remove conditional for int_registers_saved
19951 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19954 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19955 min/max for never referenced object.
19957 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19959 PR middle-end/83977
19960 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19962 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19963 attributes from DECL_ATTRIBUTES (decl) without affecting
19964 DECL_ATTRIBUTES (current_function_decl).
19965 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19966 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19968 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19970 PR tree-optimization/83979
19971 * fold-const.c (fold_comparison): Use constant_boolean_node
19972 instead of boolean_{true,false}_node.
19974 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19976 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19979 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19981 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19982 Simplify the clause that sets the length attribute.
19983 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19984 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19985 clause that sets the length attribute.
19986 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19988 2018-01-24 Tom de Vries <tom@codesourcery.com>
19991 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19992 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19993 Add strict parameter.
19994 (prevent_branch_around_nothing): Insert dummy insn between branch to
19995 label and label with no ptx insn inbetween.
19996 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19998 2018-01-24 Tom de Vries <tom@codesourcery.com>
20001 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20002 for neutered threads in warp.
20003 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20005 2018-01-24 Richard Biener <rguenther@suse.de>
20007 PR tree-optimization/83176
20008 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20011 2018-01-24 Richard Biener <rguenther@suse.de>
20013 PR tree-optimization/82819
20014 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20015 code generating pluses that are no-ops in the target precision.
20017 2018-01-24 Richard Biener <rguenther@suse.de>
20019 PR middle-end/84000
20020 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20022 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20024 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20025 to merge probabilities.
20026 * predict.c (probably_never_executed): Also mark as cold functions
20027 with global 0 profile and guessed local profile.
20028 * profile-count.c (profile_probability::combine_with_count): New
20030 * profile-count.h (profile_probability::operator*,
20031 profile_probability::operator*=, profile_probability::operator/,
20032 profile_probability::operator/=): Reduce precision to adjusted
20033 and set value to guessed on contradictory divisions.
20034 (profile_probability::combine_with_freq): Remove.
20035 (profile_probability::combine_wiht_count): Declare.
20036 (profile_count::force_nonzero):: Set to adjusted.
20037 (profile_count::probability_in):: Set quality to adjusted.
20038 * tree-ssa-tail-merge.c (replace_block_by): Use
20039 combine_with_count.
20041 2018-01-23 Andrew Waterman <andrew@sifive.com>
20042 Jim Wilson <jimw@sifive.com>
20044 * config/riscv/riscv.c (riscv_stack_boundary): New.
20045 (riscv_option_override): Set riscv_stack_boundary. Handle
20046 riscv_preferred_stack_boundary_arg.
20047 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20048 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20049 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20050 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20051 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20052 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20054 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20057 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20058 of struct ix86_frame.
20059 (ix86_expand_epilogue): Likewise. Add a local variable for
20060 the reg_save_offset field in struct ix86_frame.
20062 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20064 PR tree-optimization/82604
20065 * tree-loop-distribution.c (enum partition_kind): New enum item
20066 PKIND_PARTIAL_MEMSET.
20067 (partition_builtin_p): Support above new enum item.
20068 (generate_code_for_partition): Ditto.
20069 (compute_access_range): Differentiate cases that equality can be
20070 proven at all loops, the innermost loops or no loops.
20071 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20072 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20073 (finalize_partitions, distribute_loop): Don't fuse partition of
20074 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20075 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20076 parloop is enabled.
20078 2018-01-23 Martin Liska <mliska@suse.cz>
20080 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20081 order to ignore the predictor.
20082 (PRED_POLYMORPHIC_CALL): Likewise.
20083 (PRED_RECURSIVE_CALL): Likewise.
20085 2018-01-23 Martin Liska <mliska@suse.cz>
20087 * tree-profile.c (tree_profiling): Print function header to
20088 aware reader which function we are working on.
20089 * value-prof.c (gimple_find_values_to_profile): Do not print
20090 not interesting value histograms.
20092 2018-01-23 Martin Liska <mliska@suse.cz>
20094 * profile-count.h (enum profile_quality): Add
20095 profile_uninitialized as the first value. Do not number values
20096 as they are zero based.
20097 (profile_count::verify): Update sanity check.
20098 (profile_probability::verify): Likewise.
20100 2018-01-23 Nathan Sidwell <nathan@acm.org>
20102 * doc/invoke.texi (ffor-scope): Deprecate.
20104 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20106 PR tree-optimization/83510
20107 * domwalk.c (set_all_edges_as_executable): New function.
20108 (dom_walker::dom_walker): Convert bool param
20109 "skip_unreachable_blocks" to enum reachability. Move setup of
20110 edge flags to set_all_edges_as_executable and only do it when
20111 reachability is REACHABLE_BLOCKS.
20112 * domwalk.h (enum dom_walker::reachability): New enum.
20113 (dom_walker::dom_walker): Convert bool param
20114 "skip_unreachable_blocks" to enum reachability.
20115 (set_all_edges_as_executable): New decl.
20116 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20117 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20119 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20120 but converting true to REACHABLE_BLOCKS.
20121 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20123 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20124 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20125 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20127 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20128 if check_all_array_refs will be called.
20130 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20132 * tree.c (selftest::test_location_wrappers): Add more test
20135 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20137 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20138 (selftest::test_bit_in_range): Likewise.
20140 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20143 * doc/sourcebuild.texi (vect_float): Say that the selector
20144 only describes the situation when -funsafe-math-optimizations is on.
20145 (vect_float_strict): Document.
20147 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20149 PR tree-optimization/83965
20150 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20151 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20152 instead of checking only for a reduction.
20153 (vect_recog_widen_sum_pattern): Likewise.
20155 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20157 * predict.c (probably_never_executed): Only use precise profile info.
20158 (compute_function_frequency): Skip after inlining hack since we now
20159 have quality checking.
20161 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20163 * profile-count.h (profile_probability::very_unlikely,
20164 profile_probability::unlikely, profile_probability::even): Set
20165 precision to guessed.
20167 2018-01-23 Richard Biener <rguenther@suse.de>
20169 PR tree-optimization/83963
20170 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20171 Properly terminate dominator walk when crossing the exit edge not
20172 when visiting its source block.
20174 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20177 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20178 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20180 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20182 PR tree-optimization/83957
20183 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20184 semicolon after for body surrounded by braces.
20186 PR tree-optimization/83081
20187 * profile-count.h (profile_probability::split): New method.
20188 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20189 Use profile_probability::split.
20190 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20191 when splitting a single conditional jump into 2.
20193 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20195 PR tree-optimization/69452
20196 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20199 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20201 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20202 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20203 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20205 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20207 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20209 * config/rl78/rl78.md (movdi): New define_expand.
20210 * config/rl78/rl78.c (rl78_split_movdi): New function.
20212 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20215 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20217 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20218 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20219 128-bit to produce an UNSPEC move to get the double word with the
20220 signbit and then a shift directly to do signbit.
20221 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20222 implementation with a new version that just does either a direct
20223 move or a regular move. Move memory interface to separate insns.
20224 Move insns so they are next to the expander.
20225 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20226 with signbit move. Split big and little endian case.
20227 (signbit<mode>2_dm_mem_le): Likewise.
20228 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20229 (signbit<mode>2_dm2): Likewise.
20231 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20233 * config/rl78/rl78.md (anddi3): New define_expand.
20235 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20237 * config/rl78/rl78.md (umindi3): New define_expand.
20239 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20241 * config/rl78/rl78.md (smindi3): New define_expand.
20243 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20245 * config/rl78/rl78.md (smaxdi3): New define_expand.
20247 2018-01-22 Carl Love <cel@us.ibm.com>
20249 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20250 LVX_V1TI): Add macro expansion.
20251 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20252 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20253 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20254 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20255 Change check to determine if the instruction is a byte reversing
20256 entry. Fix typo in comment.
20257 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20258 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20259 Add def_builtin calls for new builtins.
20260 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20261 Add define_insn expansion.
20263 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20265 * config/rl78/rl78.md (umaxdi3): New define_expand.
20267 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20269 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20270 for non-QImode registers.
20272 2018-01-22 Richard Biener <rguenther@suse.de>
20274 PR tree-optimization/83963
20275 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20276 including the loop exit block.
20277 (scop_detection::merge_sese): Likewise.
20278 (scop_detection::add_scop): Do it here instead.
20280 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20282 * doc/sourcebuild.texi (arm_softfloat): Document.
20284 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20287 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20288 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20289 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20291 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20292 David Edelsohn <dje.gcc@gmail.com>
20295 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20296 Change "crset eq" to "crset 2".
20297 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20298 (*call_indirect_aix<mode>_nospec): Likewise.
20299 (*call_value_indirect_aix<mode>_nospec): Likewise.
20300 (*call_indirect_elfv2<mode>_nospec): Likewise.
20301 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20302 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20303 change assembly output from . to $.
20304 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20305 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20306 (*tablejump<mode>_internal1_nospec): Likewise.
20308 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20311 * config/sh/sh_optimize_sett_clrt.cc:
20312 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20314 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20316 PR tree-optimization/83940
20317 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20318 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20319 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20320 use it to pass back the definition type.
20321 (vect_check_store_rhs): Likewise rhs_dt_out.
20322 (vect_build_gather_load_calls): Add a mask_dt argument and use
20323 it instead of a call to vect_is_simple_use.
20324 (vectorizable_store): Update calls to vect_check_load_store_mask
20325 and vect_check_store_rhs. Use the dt returned by the latter instead
20326 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20327 instead of calls to vect_is_simple_use. Pass the scalar rather
20328 than the vector operand to vect_is_simple_use when handling
20329 second and subsequent copies of an rhs value.
20330 (vectorizable_load): Update calls to vect_check_load_store_mask
20331 and vect_build_gather_load_calls. Use the cached mask_dt and
20332 gs_info.offset_dt instead of calls to vect_is_simple_use.
20334 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20336 PR middle-end/83945
20337 * tree-emutls.c: Include gimplify.h.
20338 (lower_emutls_2): New function.
20339 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20340 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20341 it before further processing.
20344 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20345 UINTVAL (trueop1) instead of INTVAL (op1).
20347 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20351 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20352 INCOMING_FRAME_SP_OFFSET if not defined.
20353 (scan_trace): Add ENTRY argument. If true and
20354 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20355 emit a note to adjust the CFA offset.
20356 (create_cfi_notes): Adjust scan_trace callers.
20357 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20358 INCOMING_FRAME_SP_OFFSET in the CIE.
20359 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20360 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20362 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20363 * doc/tm.texi: Regenerated.
20365 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20367 PR rtl-optimization/83147
20368 * lra-constraints.c (remove_inheritance_pseudos): Use
20369 lra_substitute_pseudo_within_insn.
20371 2018-01-19 Tom de Vries <tom@codesourcery.com>
20372 Cesar Philippidis <cesar@codesourcery.com>
20375 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20377 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20380 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20381 spaces for function labels.
20383 2018-01-19 Martin Liska <mliska@suse.cz>
20385 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20386 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20387 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20388 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20389 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20390 (PRED_CONST_RETURN): Change from 69 to 65.
20391 (PRED_NULL_RETURN): Change from 91 to 71.
20392 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20393 (PRED_LOOP_GUARD): Change from 66 to 73.
20395 2018-01-19 Martin Liska <mliska@suse.cz>
20397 * predict.c (predict_insn_def): Add new assert.
20398 (struct branch_predictor): Change type to signed integer.
20399 (test_prediction_value_range): Amend test to cover
20400 PROB_UNINITIALIZED.
20401 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20402 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20403 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20404 (PRED_LOOP_IV_COMPARE): Likewise.
20405 * predict.h (PROB_UNINITIALIZED): Define new constant.
20407 2018-01-19 Martin Liska <mliska@suse.cz>
20409 * predict.c (dump_prediction): Add new format for
20410 analyze_brprob.py script which is enabled with -details
20412 * profile-count.h (precise_p): New function.
20414 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20416 PR tree-optimization/83922
20417 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20418 there are no statements that need masking.
20419 (vect_active_double_reduction_p): New function.
20420 (vect_analyze_loop_operations): Use it when handling phis that
20421 are not in the loop header.
20423 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20425 PR tree-optimization/83914
20426 * tree-vect-loop.c (vectorizable_induction): Don't convert
20427 init_expr or apply the peeling adjustment for inductions
20428 that are nested within the vectorized loop.
20430 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20432 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20435 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20439 * function.h (gimplify_parameters): Add gimple_seq * argument.
20440 * function.c: Include gimple.h and options.h.
20441 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20442 for the added local temporaries if needed.
20443 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20444 if there are any parameter cleanups, wrap whole body into a
20445 try/finally with the cleanups.
20447 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20450 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20451 Use GET_MODE_CLASS for scalar floating point.
20453 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20457 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20458 Fix call of call_cgraph_insertion_hooks.
20460 2018-01-18 Martin Sebor <msebor@redhat.com>
20462 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20464 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20467 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20470 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20473 * common.opt: (-ffile-prefix-map): New option.
20474 * opts.c (common_handle_option): Defer it.
20475 * opts-global.c (handle_common_deferred_options): Handle it.
20476 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20477 * file-prefix-map.h: New file.
20478 (remap_debug_filename, add_debug_prefix_map): ...here.
20479 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20480 * final.c (debug_prefix_map, add_debug_prefix_map
20481 remap_debug_filename): Move to...
20482 * file-prefix-map.c: New file.
20483 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20484 generalize, get rid of alloca(), use strrchr() instead of strchr().
20485 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20486 Implement in terms of add_prefix_map().
20487 (remap_macro_filename, remap_debug_filename): Implement in term of
20489 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20490 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20491 * dbxout.c: Include file-prefix-map.h.
20492 * varasm.c: Likewise.
20493 * vmsdbgout.c: Likewise.
20494 * xcoffout.c: Likewise.
20495 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20496 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20497 * doc/invoke.texi (-ffile-prefix-map): Document.
20498 (-fdebug-prefix-map): Update description.
20500 2018-01-18 Martin Liska <mliska@suse.cz>
20502 * config/i386/i386.c (indirect_thunk_name): Document that also
20504 (output_indirect_thunk): Document why both instructions
20505 (pause and lfence) are generated.
20507 2018-01-18 Richard Biener <rguenther@suse.de>
20509 PR tree-optimization/83887
20510 * graphite-scop-detection.c
20511 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20512 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20513 (scop_detection::merge_sese): Re-implement with a flood-fill
20514 algorithm that properly finds a SESE region if it exists.
20516 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20519 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20520 pointer_diff optimizations use view_convert instead of convert.
20522 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20524 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20525 Generate different code for -mno-speculate-indirect-jumps.
20526 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20527 (*call_indirect_aix<mode>): Disable for
20528 -mno-speculate-indirect-jumps.
20529 (*call_indirect_aix<mode>_nospec): New define_insn.
20530 (*call_value_indirect_aix<mode>): Disable for
20531 -mno-speculate-indirect-jumps.
20532 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20533 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20534 -mno-speculate-indirect-jumps.
20535 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20537 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20539 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20540 long double type, set the flags for noting the default long double
20541 type, even if we don't pass or return a long double type.
20543 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20546 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20549 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20551 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20552 support for merge[hl].
20553 (fold_mergehl_helper): New helper function.
20554 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20555 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20556 (altivec_vmrglw_direct): Add xxmrglw insn.
20558 2018-01-17 Andrew Waterman <andrew@sifive.com>
20560 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20561 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20563 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20566 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20567 call the lto_location_cache before reading the
20568 DECL_SOURCE_LOCATION of the types.
20570 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20571 Richard Sandiford <richard.sandiford@linaro.org>
20573 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20574 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20575 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20576 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20577 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20579 * config/aarch64/constraints.md (aarch64_movti_operand):
20581 * config/aarch64/predicates.md (Uti): Add new constraint.
20583 2018-01-17 Carl Love <cel@us.ibm.com>
20585 * config/rs6000/vsx.md (define_expand xl_len_r,
20586 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20587 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20589 (define_expand, define_insn): Move the shift left from the
20590 define_insn to the define_expand for lxvl and stxvl instructions.
20591 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20592 and XL_LEN_R definitions to PURE.
20594 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20596 * config/i386/i386.c (indirect_thunk_name): Declare regno
20597 as unsigned int. Compare regno with INVALID_REGNUM.
20598 (output_indirect_thunk): Ditto.
20599 (output_indirect_thunk_function): Ditto.
20600 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20601 in the call to output_indirect_thunk_function.
20603 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20605 PR middle-end/83884
20606 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20607 rather than the size of inner_type to determine the stack slot size
20608 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20610 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20613 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20616 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20618 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20619 endian Linux systems to optionally enable multilibs for selecting
20620 the long double type if the user configured an explicit type.
20621 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20622 have no long double multilibs if not defined.
20623 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20624 warn if the user used -mabi={ieee,ibm}longdouble and we built
20625 multilibs for long double.
20626 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20627 appropriate multilib option.
20628 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20630 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20631 for building long double multilibs.
20632 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20634 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20636 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20639 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20641 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20644 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20647 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20650 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20652 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20653 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20655 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20657 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20658 different rtl trees depending on TARGET_64BIT.
20659 (rs6000_gen_lvx): Likewise.
20661 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20663 * config/visium/visium.md (nop): Tweak comment.
20664 (hazard_nop): Likewise.
20666 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20668 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20669 -mspeculate-indirect-jumps.
20670 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20671 for -mno-speculate-indirect-jumps.
20672 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20673 (*call_value_indirect_elfv2<mode>): Disable for
20674 -mno-speculate-indirect-jumps.
20675 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20676 (indirect_jump): Emit different RTL for
20677 -mno-speculate-indirect-jumps.
20678 (*indirect_jump<mode>): Disable for
20679 -mno-speculate-indirect-jumps.
20680 (*indirect_jump<mode>_nospec): New define_insn.
20681 (tablejump): Emit different RTL for
20682 -mno-speculate-indirect-jumps.
20683 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20684 (tablejumpsi_nospec): New define_expand.
20685 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20686 (tablejumpdi_nospec): New define_expand.
20687 (*tablejump<mode>_internal1): Disable for
20688 -mno-speculate-indirect-jumps.
20689 (*tablejump<mode>_internal1_nospec): New define_insn.
20690 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20693 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20695 * caller-save.c (insert_save): Drop unnecessary parameter. All
20698 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20699 Richard Biener <rguenth@suse.de>
20702 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20703 return early, inline manually is_gimple_sizepos. Make sure if we
20704 call gimplify_expr we don't end up with a gimple constant.
20705 * tree.c (variably_modified_type_p): Don't return true for
20706 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20707 * gimplify.h (is_gimple_sizepos): Remove.
20709 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20711 PR tree-optimization/83857
20712 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20713 vectorizable_live_operation for pure SLP statements.
20714 (vectorizable_live_operation): Handle PHIs.
20716 2018-01-16 Richard Biener <rguenther@suse.de>
20718 PR tree-optimization/83867
20719 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20720 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20722 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20725 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20726 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20727 If off is not INTEGER_CST, issue a may not be aligned warning
20728 rather than isn't aligned. Use isn%'t rather than isn't.
20729 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20731 <case MULT_EXPR>: Improve the case when bottom and one of the
20732 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20733 operand, in that case check if the other operand is multiple of
20734 bottom divided by the INTEGER_CST operand.
20736 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20739 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20740 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20741 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20742 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20743 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20744 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20745 (pa_function_arg_size): New function.
20747 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20749 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20750 in a separate statement.
20752 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20754 PR tree-optimization/83847
20755 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20756 group gathers and scatters.
20758 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20760 PR rtl-optimization/86620
20761 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20763 PR rtl-optimization/83213
20764 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20765 to last if both are JUMP_INSNs.
20767 PR tree-optimization/83843
20768 * gimple-ssa-store-merging.c
20769 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20770 store_immediate_info for bswap/nop orig_stores.
20772 2018-01-15 Andrew Waterman <andrew@sifive.com>
20774 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20776 <UDIV>: Increase cost if !TARGET_DIV.
20778 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20780 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20781 (define_attr "cr_logical_3op"): New.
20782 (cceq_ior_compare): Adjust.
20783 (cceq_ior_compare_complement): Adjust.
20784 (*cceq_rev_compare): Adjust.
20785 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20786 (is_cracked_insn): Adjust.
20787 (insn_must_be_first_in_group): Adjust.
20788 * config/rs6000/40x.md: Adjust.
20789 * config/rs6000/440.md: Adjust.
20790 * config/rs6000/476.md: Adjust.
20791 * config/rs6000/601.md: Adjust.
20792 * config/rs6000/603.md: Adjust.
20793 * config/rs6000/6xx.md: Adjust.
20794 * config/rs6000/7450.md: Adjust.
20795 * config/rs6000/7xx.md: Adjust.
20796 * config/rs6000/8540.md: Adjust.
20797 * config/rs6000/cell.md: Adjust.
20798 * config/rs6000/e300c2c3.md: Adjust.
20799 * config/rs6000/e500mc.md: Adjust.
20800 * config/rs6000/e500mc64.md: Adjust.
20801 * config/rs6000/e5500.md: Adjust.
20802 * config/rs6000/e6500.md: Adjust.
20803 * config/rs6000/mpc.md: Adjust.
20804 * config/rs6000/power4.md: Adjust.
20805 * config/rs6000/power5.md: Adjust.
20806 * config/rs6000/power6.md: Adjust.
20807 * config/rs6000/power7.md: Adjust.
20808 * config/rs6000/power8.md: Adjust.
20809 * config/rs6000/power9.md: Adjust.
20810 * config/rs6000/rs64.md: Adjust.
20811 * config/rs6000/titan.md: Adjust.
20813 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20815 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20816 ix86_indirect_branch_register logic.
20818 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20820 * config/i386/constraints.md (Bs): Update
20821 ix86_indirect_branch_register check. Don't check
20822 ix86_indirect_branch_register with GOT_memory_operand.
20824 * config/i386/predicates.md (GOT_memory_operand): Don't check
20825 ix86_indirect_branch_register here.
20826 (GOT32_symbol_operand): Likewise.
20828 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20830 * config/i386/predicates.md (constant_call_address_operand):
20831 Rewrite ix86_indirect_branch_register logic.
20832 (sibcall_insn_operand): Likewise.
20834 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20836 * config/i386/constraints.md (Bs): Replace
20837 ix86_indirect_branch_thunk_register with
20838 ix86_indirect_branch_register.
20840 * config/i386/i386.md (indirect_jump): Likewise.
20841 (tablejump): Likewise.
20842 (*sibcall_memory): Likewise.
20843 (*sibcall_value_memory): Likewise.
20844 Peepholes of indirect call and jump via memory: Likewise.
20845 * config/i386/i386.opt: Likewise.
20846 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20847 (GOT_memory_operand): Likewise.
20848 (call_insn_operand): Likewise.
20849 (sibcall_insn_operand): Likewise.
20850 (GOT32_symbol_operand): Likewise.
20852 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20854 PR middle-end/83837
20855 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20856 type rather than type addr's type points to.
20857 (expand_omp_atomic_mutex): Likewise.
20858 (expand_omp_atomic): Likewise.
20860 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20863 * config/i386/i386.c (output_indirect_thunk_function): Use
20864 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20865 for __x86_return_thunk.
20867 2018-01-15 Richard Biener <rguenther@suse.de>
20869 PR middle-end/83850
20870 * expmed.c (extract_bit_field_1): Fix typo.
20872 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20875 * config/arm/iterators.md (VF): New mode iterator.
20876 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20877 Remove integer-related logic from pattern.
20878 (neon_vabd<mode>_3): Likewise.
20880 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20882 PR middle-end/82694
20883 * common.opt (fstrict-overflow): No longer an alias.
20884 (fwrapv-pointer): New option.
20885 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20886 also for pointer types based on flag_wrapv_pointer.
20887 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20888 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20889 opts->x_flag_wrapv got set.
20890 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20891 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20892 POINTER_TYPE_OVERFLOW_UNDEFINED.
20893 * match.pd: Likewise in address comparison pattern.
20894 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20896 2018-01-15 Richard Biener <rguenther@suse.de>
20899 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20900 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20901 Reset type names to their identifier if their TYPE_DECL doesn't
20902 have linkage (and thus is used for ODR and devirt).
20903 (save_debug_info_for_decl): Remove.
20904 (save_debug_info_for_type): Likewise.
20905 (add_tree_to_fld_list): Adjust.
20906 * tree-pretty-print.c (dump_generic_node): Make dumping of
20907 type names more robust.
20909 2018-01-15 Richard Biener <rguenther@suse.de>
20911 * BASE-VER: Bump to 8.0.1.
20913 2018-01-14 Martin Sebor <msebor@redhat.com>
20916 * builtins.c (check_access): Avoid warning when the no-warning bit
20919 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20921 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20922 * ira-color (allocno_hard_regs_compare): Likewise.
20924 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20927 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20928 Use .pushsection/.popsection.
20930 2018-01-14 Martin Sebor <msebor@redhat.com>
20933 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20935 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20937 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20938 entry from extra_headers.
20939 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20940 extra_headers, make the list bitwise identical to the i?86-*-* one.
20942 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20944 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20945 -mcmodel=large with -mindirect-branch=thunk,
20946 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20947 -mfunction-return=thunk-extern.
20948 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20949 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20950 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20952 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20954 * config/i386/i386.c (print_reg): Print the name of the full
20955 integer register without '%'.
20956 (ix86_print_operand): Handle 'V'.
20957 * doc/extend.texi: Document 'V' modifier.
20959 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20961 * config/i386/constraints.md (Bs): Disallow memory operand for
20962 -mindirect-branch-register.
20964 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20965 (GOT_memory_operand): Likewise.
20966 (call_insn_operand): Likewise.
20967 (sibcall_insn_operand): Likewise.
20968 (GOT32_symbol_operand): Likewise.
20969 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20970 for -mindirect-branch-register.
20971 (tablejump): Likewise.
20972 (*sibcall_memory): Likewise.
20973 (*sibcall_value_memory): Likewise.
20974 Disallow peepholes of indirect call and jump via memory for
20975 -mindirect-branch-register.
20976 (*call_pop): Replace m with Bw.
20977 (*call_value_pop): Likewise.
20978 (*sibcall_pop_memory): Replace m with Bs.
20979 * config/i386/i386.opt (mindirect-branch-register): New option.
20980 * doc/invoke.texi: Document -mindirect-branch-register option.
20982 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20984 * config/i386/i386-protos.h (ix86_output_function_return): New.
20985 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20986 set function_return_type.
20987 (indirect_thunk_name): Add ret_p to indicate thunk for function
20989 (output_indirect_thunk_function): Pass false to
20990 indirect_thunk_name.
20991 (ix86_output_indirect_branch_via_reg): Likewise.
20992 (ix86_output_indirect_branch_via_push): Likewise.
20993 (output_indirect_thunk_function): Create alias for function
20994 return thunk if regno < 0.
20995 (ix86_output_function_return): New function.
20996 (ix86_handle_fndecl_attribute): Handle function_return.
20997 (ix86_attribute_table): Add function_return.
20998 * config/i386/i386.h (machine_function): Add
20999 function_return_type.
21000 * config/i386/i386.md (simple_return_internal): Use
21001 ix86_output_function_return.
21002 (simple_return_internal_long): Likewise.
21003 * config/i386/i386.opt (mfunction-return=): New option.
21004 (indirect_branch): Mention -mfunction-return=.
21005 * doc/extend.texi: Document function_return function attribute.
21006 * doc/invoke.texi: Document -mfunction-return= option.
21008 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21010 * config/i386/i386-opts.h (indirect_branch): New.
21011 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21012 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21013 with local indirect jump when converting indirect call and jump.
21014 (ix86_set_indirect_branch_type): New.
21015 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21016 (indirectlabelno): New.
21017 (indirect_thunk_needed): Likewise.
21018 (indirect_thunk_bnd_needed): Likewise.
21019 (indirect_thunks_used): Likewise.
21020 (indirect_thunks_bnd_used): Likewise.
21021 (INDIRECT_LABEL): Likewise.
21022 (indirect_thunk_name): Likewise.
21023 (output_indirect_thunk): Likewise.
21024 (output_indirect_thunk_function): Likewise.
21025 (ix86_output_indirect_branch_via_reg): Likewise.
21026 (ix86_output_indirect_branch_via_push): Likewise.
21027 (ix86_output_indirect_branch): Likewise.
21028 (ix86_output_indirect_jmp): Likewise.
21029 (ix86_code_end): Call output_indirect_thunk_function if needed.
21030 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21032 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21033 (ix86_attribute_table): Add indirect_branch.
21034 * config/i386/i386.h (machine_function): Add indirect_branch_type
21035 and has_local_indirect_jump.
21036 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21038 (tablejump): Likewise.
21039 (*indirect_jump): Use ix86_output_indirect_jmp.
21040 (*tablejump_1): Likewise.
21041 (simple_return_indirect_internal): Likewise.
21042 * config/i386/i386.opt (mindirect-branch=): New option.
21043 (indirect_branch): New.
21046 (thunk-inline): Likewise.
21047 (thunk-extern): Likewise.
21048 * doc/extend.texi: Document indirect_branch function attribute.
21049 * doc/invoke.texi: Document -mindirect-branch= option.
21051 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21054 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21056 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21058 * ipa-inline.c (want_inline_small_function_p): Return false if
21059 inlining has already failed with CIF_FINAL_ERROR.
21060 (update_caller_keys): Call want_inline_small_function_p before
21062 (update_callee_keys): Likewise.
21064 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21066 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21068 (rs6000_quadword_masked_address_p): Likewise.
21069 (quad_aligned_load_p): Likewise.
21070 (quad_aligned_store_p): Likewise.
21071 (const_load_sequence_p): Add comment to describe the outer-most loop.
21072 (mimic_memory_attributes_and_flags): New function.
21073 (rs6000_gen_stvx): Likewise.
21074 (replace_swapped_aligned_store): Likewise.
21075 (rs6000_gen_lvx): Likewise.
21076 (replace_swapped_aligned_load): Likewise.
21077 (replace_swapped_load_constant): Capitalize argument name in
21078 comment describing this function.
21079 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21080 and stores that access quad-word aligned addresses and replace
21081 with stvx or lvx instructions when appropriate.
21082 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21083 New function prototype.
21084 (rs6000_quadword_masked_address_p): Likewise.
21085 (rs6000_gen_lvx): Likewise.
21086 (rs6000_gen_stvx): Likewise.
21087 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21088 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21089 when memory address is aligned.
21090 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21091 this split to select lvx instruction when memory address is aligned.
21092 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21093 instruction when memory address is aligned.
21094 (*vsx_le_perm_load_v16qi): Likewise.
21095 (four unnamed splitters): Modify to select the stvx instruction
21096 when memory is aligned.
21098 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21100 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21101 which appears in the queue multiple times.
21103 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21104 Alan Hayward <alan.hayward@arm.com>
21105 David Sherwood <david.sherwood@arm.com>
21107 * tree-vectorizer.h (vec_lower_bound): New structure.
21108 (_loop_vec_info): Add check_nonzero and lower_bounds.
21109 (LOOP_VINFO_CHECK_NONZERO): New macro.
21110 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21111 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21112 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21113 fields. Make seg_len the distance travelled, not including the
21115 (dr_direction_indicator): Declare.
21116 (dr_zero_step_indicator): Likewise.
21117 (dr_known_forward_stride_p): Likewise.
21118 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21120 (runtime_alias_check_p): Allow runtime alias checks with
21122 (operator ==): Compare access_size and align.
21123 (prune_runtime_alias_test_list): Rework for new distinction between
21124 the access_size and seg_len.
21125 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21127 (get_segment_min_max): New function.
21128 (create_intersect_range_checks): Use it.
21129 (dr_step_indicator): New function.
21130 (dr_direction_indicator): Likewise.
21131 (dr_zero_step_indicator): Likewise.
21132 (dr_known_forward_stride_p): Likewise.
21133 * tree-loop-distribution.c (data_ref_segment_size): Return
21134 DR_STEP * (niters - 1).
21135 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21137 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21138 (vect_preserves_scalar_order_p): New function, split out from...
21139 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21140 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21141 (vect_vfa_access_size): New function.
21142 (vect_vfa_align): Likewise.
21143 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21144 (dump_lower_bound): New function.
21145 (vect_check_lower_bound): Likewise.
21146 (vect_small_gap_p): Likewise.
21147 (vectorizable_with_step_bound_p): Likewise.
21148 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21149 depencies if the vectorization factor is 1. Convert the checks
21150 for nonzero steps into checks on the bounds of DR_STEP. Try using
21151 a bunds check for variable steps if the minimum required step is
21152 relatively small. Update calls to the dr_with_seg_len
21153 constructor and to vect_compile_time_alias.
21154 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21156 (vect_loop_versioning): Call it.
21157 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21159 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21162 Alan Hayward <alan.hayward@arm.com>
21163 David Sherwood <david.sherwood@arm.com>
21165 * doc/sourcebuild.texi (vect_scatter_store): Document.
21166 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21168 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21170 * genopinit.c (main): Add supports_vec_scatter_store and
21171 supports_vec_scatter_store_cached to target_optabs.
21172 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21173 IFN_MASK_SCATTER_STORE.
21174 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21176 * internal-fn.h (internal_store_fn_p): Declare.
21177 (internal_fn_stored_value_index): Likewise.
21178 * internal-fn.c (scatter_store_direct): New macro.
21179 (expand_scatter_store_optab_fn): New function.
21180 (direct_scatter_store_optab_supported_p): New macro.
21181 (internal_store_fn_p): New function.
21182 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21183 IFN_MASK_SCATTER_STORE.
21184 (internal_fn_mask_index): Likewise.
21185 (internal_fn_stored_value_index): New function.
21186 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21187 for scatter stores.
21188 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21189 * optabs-query.c (supports_vec_scatter_store_p): New function.
21190 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21191 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21192 true for scatter stores.
21193 (vect_gather_scatter_fn_p): Handle scatter stores too.
21194 (vect_check_gather_scatter): Consider using scatter stores if
21195 supports_vec_scatter_store_p.
21196 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21197 scatter stores too.
21198 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21199 internal_fn_stored_value_index.
21200 (check_load_store_masking): Handle scatter stores too.
21201 (vect_get_store_rhs): Make public.
21202 (vectorizable_call): Use internal_store_fn_p.
21203 (vectorizable_store): Handle scatter store internal functions.
21204 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21205 when deciding whether the end of the group has been reached.
21206 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21207 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21208 (mask_scatter_store<mode>): New insns.
21210 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21211 Alan Hayward <alan.hayward@arm.com>
21212 David Sherwood <david.sherwood@arm.com>
21214 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21215 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21216 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21218 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21219 Use vect_truncate_gather_scatter_offset if we can't treat the
21220 operation as a normal gather load or scatter store.
21221 (get_group_load_store_type): Take the gather_scatter_info
21222 as argument. Try using a gather load or scatter store for
21223 single-element groups.
21224 (get_load_store_type): Update calls to get_group_load_store_type
21225 and vect_use_strided_gather_scatters_p.
21227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21228 Alan Hayward <alan.hayward@arm.com>
21229 David Sherwood <david.sherwood@arm.com>
21231 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21232 optional tree argument.
21233 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21235 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21236 but continue to use the current value as a fallback.
21237 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21238 to compare the updates.
21239 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21240 (get_load_store_type): Use it when handling a strided access.
21241 (vect_get_strided_load_store_ops): New function.
21242 (vect_get_data_ptr_increment): Likewise.
21243 (vectorizable_load): Handle strided gather loads. Always pass
21244 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21247 Alan Hayward <alan.hayward@arm.com>
21248 David Sherwood <david.sherwood@arm.com>
21250 * doc/md.texi (gather_load@var{m}): Document.
21251 (mask_gather_load@var{m}): Likewise.
21252 * genopinit.c (main): Add supports_vec_gather_load and
21253 supports_vec_gather_load_cached to target_optabs.
21254 * optabs-tree.c (init_tree_optimization_optabs): Use
21255 ggc_cleared_alloc to allocate target_optabs.
21256 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21257 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21259 * internal-fn.h (internal_load_fn_p): Declare.
21260 (internal_gather_scatter_fn_p): Likewise.
21261 (internal_fn_mask_index): Likewise.
21262 (internal_gather_scatter_fn_supported_p): Likewise.
21263 * internal-fn.c (gather_load_direct): New macro.
21264 (expand_gather_load_optab_fn): New function.
21265 (direct_gather_load_optab_supported_p): New macro.
21266 (direct_internal_fn_optab): New function.
21267 (internal_load_fn_p): Likewise.
21268 (internal_gather_scatter_fn_p): Likewise.
21269 (internal_fn_mask_index): Likewise.
21270 (internal_gather_scatter_fn_supported_p): Likewise.
21271 * optabs-query.c (supports_at_least_one_mode_p): New function.
21272 (supports_vec_gather_load_p): Likewise.
21273 * optabs-query.h (supports_vec_gather_load_p): Declare.
21274 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21275 and memory_type field.
21276 (NUM_PATTERNS): Bump to 15.
21277 * tree-vect-data-refs.c: Include internal-fn.h.
21278 (vect_gather_scatter_fn_p): New function.
21279 (vect_describe_gather_scatter_call): Likewise.
21280 (vect_check_gather_scatter): Try using internal functions for
21281 gather loads. Recognize existing calls to a gather load function.
21282 (vect_analyze_data_refs): Consider using gather loads if
21283 supports_vec_gather_load_p.
21284 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21285 (vect_get_gather_scatter_offset_type): Likewise.
21286 (vect_convert_mask_for_vectype): Likewise.
21287 (vect_add_conversion_to_patterm): Likewise.
21288 (vect_try_gather_scatter_pattern): Likewise.
21289 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21290 (vect_vect_recog_func_ptrs): Add it.
21291 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21292 internal_fn_mask_index and internal_gather_scatter_fn_p.
21293 (check_load_store_masking): Take the gather_scatter_info as an
21294 argument and handle gather loads.
21295 (vect_get_gather_scatter_ops): New function.
21296 (vectorizable_call): Check internal_load_fn_p.
21297 (vectorizable_load): Likewise. Handle gather load internal
21299 (vectorizable_store): Update call to check_load_store_masking.
21300 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21301 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21302 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21303 (aarch64_gather_scale_operand_d): New predicates.
21304 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21305 (mask_gather_load<mode>): New insns.
21307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21308 Alan Hayward <alan.hayward@arm.com>
21309 David Sherwood <david.sherwood@arm.com>
21311 * optabs.def (fold_left_plus_optab): New optab.
21312 * doc/md.texi (fold_left_plus_@var{m}): Document.
21313 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21314 * internal-fn.c (fold_left_direct): Define.
21315 (expand_fold_left_optab_fn): Likewise.
21316 (direct_fold_left_optab_supported_p): Likewise.
21317 * fold-const-call.c (fold_const_fold_left): New function.
21318 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21319 * tree-parloops.c (valid_reduction_p): New function.
21320 (gather_scalar_reductions): Use it.
21321 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21322 (vect_finish_replace_stmt): Declare.
21323 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21324 (needs_fold_left_reduction_p): New function, split out from...
21325 (vect_is_simple_reduction): ...here. Accept reductions that
21326 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21327 (vect_force_simple_reduction): Also store the reduction type in
21328 the assignment's STMT_VINFO_REDUC_TYPE.
21329 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21330 (merge_with_identity): New function.
21331 (vect_expand_fold_left): Likewise.
21332 (vectorize_fold_left_reduction): Likewise.
21333 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21334 scalar phi in place for it. Check for target support and reject
21335 cases that would reassociate the operation. Defer the transform
21336 phase to vectorize_fold_left_reduction.
21337 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21338 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21339 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21341 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21343 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21344 call to ifc_temp_var.
21346 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21347 Alan Hayward <alan.hayward@arm.com>
21348 David Sherwood <david.sherwood@arm.com>
21350 * target.def (legitimize_address_displacement): Take the original
21351 offset as a poly_int.
21352 * targhooks.h (default_legitimize_address_displacement): Update
21354 * targhooks.c (default_legitimize_address_displacement): Likewise.
21355 * doc/tm.texi: Regenerate.
21356 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21357 as an argument, moving assert of ad->disp == ad->disp_term to...
21358 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21359 Try calling targetm.legitimize_address_displacement before expanding
21360 the address rather than afterwards, and adjust for the new interface.
21361 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21362 Match the new hook interface. Handle SVE addresses.
21363 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21364 new hook interface.
21366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21368 * Makefile.in (OBJS): Add early-remat.o.
21369 * target.def (select_early_remat_modes): New hook.
21370 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21371 * doc/tm.texi: Regenerate.
21372 * targhooks.h (default_select_early_remat_modes): Declare.
21373 * targhooks.c (default_select_early_remat_modes): New function.
21374 * timevar.def (TV_EARLY_REMAT): New timevar.
21375 * passes.def (pass_early_remat): New pass.
21376 * tree-pass.h (make_pass_early_remat): Declare.
21377 * early-remat.c: New file.
21378 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21380 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21382 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21383 Alan Hayward <alan.hayward@arm.com>
21384 David Sherwood <david.sherwood@arm.com>
21386 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21387 vfm1 with a bound_epilog parameter.
21388 (vect_do_peeling): Update calls accordingly, and move the prologue
21389 call earlier in the function. Treat the base bound_epilog as 0 for
21390 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21391 this base when peeling for gaps.
21392 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21393 with fully-masked loops.
21394 (vect_estimate_min_profitable_iters): Handle the single peeled
21395 iteration in that case.
21397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21398 Alan Hayward <alan.hayward@arm.com>
21399 David Sherwood <david.sherwood@arm.com>
21401 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21402 single-element interleaving even if the size is not a power of 2.
21403 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21404 accesses for single-element interleaving if the group size is
21407 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21408 Alan Hayward <alan.hayward@arm.com>
21409 David Sherwood <david.sherwood@arm.com>
21411 * doc/md.texi (fold_extract_last_@var{m}): Document.
21412 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21413 * optabs.def (fold_extract_last_optab): New optab.
21414 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21415 * internal-fn.c (fold_extract_direct): New macro.
21416 (expand_fold_extract_optab_fn): Likewise.
21417 (direct_fold_extract_optab_supported_p): Likewise.
21418 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21419 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21420 EXTRACT_LAST_REDUCTION.
21421 (get_initial_def_for_reduction): Do not create an initial vector
21422 for EXTRACT_LAST_REDUCTION reductions.
21423 (vectorizable_reduction): Leave the scalar phi in place for
21424 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21425 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21426 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21427 transform phase to vectorizable_condition.
21428 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21430 (vect_finish_stmt_generation): ...here.
21431 (vect_finish_replace_stmt): New function.
21432 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21433 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21435 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21437 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21438 Alan Hayward <alan.hayward@arm.com>
21439 David Sherwood <david.sherwood@arm.com>
21441 * doc/md.texi (extract_last_@var{m}): Document.
21442 * optabs.def (extract_last_optab): New optab.
21443 * internal-fn.def (EXTRACT_LAST): New internal function.
21444 * internal-fn.c (cond_unary_direct): New macro.
21445 (expand_cond_unary_optab_fn): Likewise.
21446 (direct_cond_unary_optab_supported_p): Likewise.
21447 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21448 loops using EXTRACT_LAST.
21449 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21450 (extract_last_<mode>): ...this optab.
21451 (vec_extract<mode><Vel>): Update accordingly.
21453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21454 Alan Hayward <alan.hayward@arm.com>
21455 David Sherwood <david.sherwood@arm.com>
21457 * target.def (empty_mask_is_expensive): New hook.
21458 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21459 * doc/tm.texi: Regenerate.
21460 * targhooks.h (default_empty_mask_is_expensive): Declare.
21461 * targhooks.c (default_empty_mask_is_expensive): New function.
21462 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21463 if the target says that empty masks are expensive.
21464 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21466 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21468 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21469 Alan Hayward <alan.hayward@arm.com>
21470 David Sherwood <david.sherwood@arm.com>
21472 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21473 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21474 (vect_use_loop_mask_for_alignment_p): New function.
21475 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21476 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21477 niters_skip argument. Make sure that the first niters_skip elements
21478 of the first iteration are inactive.
21479 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21480 Update call to vect_set_loop_masks_directly.
21481 (get_misalign_in_elems): New function, split out from...
21482 (vect_gen_prolog_loop_niters): ...here.
21483 (vect_update_init_of_dr): Take a code argument that specifies whether
21484 the adjustment should be added or subtracted.
21485 (vect_update_init_of_drs): Likewise.
21486 (vect_prepare_for_masked_peels): New function.
21487 (vect_do_peeling): Skip prologue peeling if we're using a mask
21488 instead. Update call to vect_update_inits_of_drs.
21489 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21491 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21492 alignment. Do not include the number of peeled iterations in
21493 the minimum threshold in that case.
21494 (vectorizable_induction): Adjust the start value down by
21495 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21496 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21497 Take the number of skipped iterations into account when calculating
21499 * tree-vect-stmts.c (vect_gen_while_not): New function.
21501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21502 Alan Hayward <alan.hayward@arm.com>
21503 David Sherwood <david.sherwood@arm.com>
21505 * doc/sourcebuild.texi (vect_fully_masked): Document.
21506 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21507 default value to 0.
21508 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21510 (vect_analyze_loop_2): ...here. Don't check the vectorization
21511 factor against the number of loop iterations if the loop is
21514 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21515 Alan Hayward <alan.hayward@arm.com>
21516 David Sherwood <david.sherwood@arm.com>
21518 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21519 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21520 (dump_groups): Update accordingly.
21521 (iv_use::mem_type): New member variable.
21522 (address_p): New function.
21523 (record_use): Add a mem_type argument and initialize the new
21525 (record_group_use): Add a mem_type argument. Use address_p.
21526 Remove obsolete null checks of base_object. Update call to record_use.
21527 (find_interesting_uses_op): Update call to record_group_use.
21528 (find_interesting_uses_cond): Likewise.
21529 (find_interesting_uses_address): Likewise.
21530 (get_mem_type_for_internal_fn): New function.
21531 (find_address_like_use): Likewise.
21532 (find_interesting_uses_stmt): Try find_address_like_use before
21533 calling find_interesting_uses_op.
21534 (addr_offset_valid_p): Use the iv mem_type field as the type
21535 of the addressed memory.
21536 (add_autoinc_candidates): Likewise.
21537 (get_address_cost): Likewise.
21538 (split_small_address_groups_p): Use address_p.
21539 (split_address_groups): Likewise.
21540 (add_iv_candidate_for_use): Likewise.
21541 (autoinc_possible_for_pair): Likewise.
21542 (rewrite_groups): Likewise.
21543 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21544 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21545 (get_alias_ptr_type_for_ptr_address): New function.
21546 (rewrite_use_address): Rewrite address uses in calls that were
21547 identified by find_address_like_use.
21549 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21550 Alan Hayward <alan.hayward@arm.com>
21551 David Sherwood <david.sherwood@arm.com>
21553 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21555 * gimple-expr.h (is_gimple_addressable: Likewise.
21556 * gimple-expr.c (is_gimple_address): Likewise.
21557 * internal-fn.c (expand_call_mem_ref): New function.
21558 (expand_mask_load_optab_fn): Use it.
21559 (expand_mask_store_optab_fn): Likewise.
21561 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21562 Alan Hayward <alan.hayward@arm.com>
21563 David Sherwood <david.sherwood@arm.com>
21565 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21566 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21567 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21568 (cond_umax@var{mode}): Document.
21569 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21570 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21571 (cond_umin_optab, cond_umax_optab): New optabs.
21572 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21573 (COND_IOR, COND_XOR): New internal functions.
21574 * internal-fn.h (get_conditional_internal_fn): Declare.
21575 * internal-fn.c (cond_binary_direct): New macro.
21576 (expand_cond_binary_optab_fn): Likewise.
21577 (direct_cond_binary_optab_supported_p): Likewise.
21578 (get_conditional_internal_fn): New function.
21579 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21580 Cope with reduction statements that are vectorized as calls rather
21582 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21583 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21584 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21585 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21586 (UNSPEC_COND_EOR): New unspecs.
21587 (optab): Add mappings for them.
21588 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21589 (sve_int_op, sve_fp_op): New int attributes.
21591 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21592 Alan Hayward <alan.hayward@arm.com>
21593 David Sherwood <david.sherwood@arm.com>
21595 * optabs.def (while_ult_optab): New optab.
21596 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21597 * internal-fn.def (WHILE_ULT): New internal function.
21598 * internal-fn.h (direct_internal_fn_supported_p): New override
21599 that takes two types as argument.
21600 * internal-fn.c (while_direct): New macro.
21601 (expand_while_optab_fn): New function.
21602 (convert_optab_supported_p): Likewise.
21603 (direct_while_optab_supported_p): New macro.
21604 * wide-int.h (wi::udiv_ceil): New function.
21605 * tree-vectorizer.h (rgroup_masks): New structure.
21606 (vec_loop_masks): New typedef.
21607 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21608 and fully_masked_p.
21609 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21610 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21611 (vect_max_vf): New function.
21612 (slpeel_make_loop_iterate_ntimes): Delete.
21613 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21614 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21615 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21616 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21617 internal-fn.h, stor-layout.h and optabs-query.h.
21618 (vect_set_loop_mask): New function.
21619 (add_preheader_seq): Likewise.
21620 (add_header_seq): Likewise.
21621 (interleave_supported_p): Likewise.
21622 (vect_maybe_permute_loop_masks): Likewise.
21623 (vect_set_loop_masks_directly): Likewise.
21624 (vect_set_loop_condition_masked): Likewise.
21625 (vect_set_loop_condition_unmasked): New function, split out from
21626 slpeel_make_loop_iterate_ntimes.
21627 (slpeel_make_loop_iterate_ntimes): Rename to..
21628 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21629 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21630 (vect_do_peeling): Update call accordingly.
21631 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21633 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21634 mask_compare_type, can_fully_mask_p and fully_masked_p.
21635 (release_vec_loop_masks): New function.
21636 (_loop_vec_info): Use it to free the loop masks.
21637 (can_produce_all_loop_masks_p): New function.
21638 (vect_get_max_nscalars_per_iter): Likewise.
21639 (vect_verify_full_masking): Likewise.
21640 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21641 retries, and free the mask rgroups before retrying. Check loop-wide
21642 reasons for disallowing fully-masked loops. Make the final decision
21643 about whether use a fully-masked loop or not.
21644 (vect_estimate_min_profitable_iters): Do not assume that peeling
21645 for the number of iterations will be needed for fully-masked loops.
21646 (vectorizable_reduction): Disable fully-masked loops.
21647 (vectorizable_live_operation): Likewise.
21648 (vect_halve_mask_nunits): New function.
21649 (vect_double_mask_nunits): Likewise.
21650 (vect_record_loop_mask): Likewise.
21651 (vect_get_loop_mask): Likewise.
21652 (vect_transform_loop): Handle the case in which the final loop
21653 iteration might handle a partial vector. Call vect_set_loop_condition
21654 instead of slpeel_make_loop_iterate_ntimes.
21655 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21656 (check_load_store_masking): New function.
21657 (prepare_load_store_mask): Likewise.
21658 (vectorizable_store): Handle fully-masked loops.
21659 (vectorizable_load): Likewise.
21660 (supportable_widening_operation): Use vect_halve_mask_nunits for
21662 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21663 (vect_gen_while): New function.
21664 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21665 (aarch64_uqdec<mode>): New insn.
21667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21668 Alan Hayward <alan.hayward@arm.com>
21669 David Sherwood <david.sherwood@arm.com>
21671 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21672 (reduc_xor_scal_optab): New optabs.
21673 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21674 (reduc_xor_scal_@var{m}): Document.
21675 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21676 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21677 internal functions.
21678 * fold-const-call.c (fold_const_call): Handle them.
21679 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21680 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21681 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21682 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21683 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21684 (UNSPEC_XORV): New unspecs.
21685 (optab): Add entries for them.
21686 (BITWISEV): New int iterator.
21687 (bit_reduc_op): New int attributes.
21689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21690 Alan Hayward <alan.hayward@arm.com>
21691 David Sherwood <david.sherwood@arm.com>
21693 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21694 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21695 * optabs.def (vec_shl_insert_optab): New optab.
21696 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21697 (duplicate_and_interleave): Likewise.
21698 * tree-vect-loop.c: Include internal-fn.h.
21699 (neutral_op_for_slp_reduction): New function, split out from
21700 get_initial_defs_for_reduction.
21701 (get_initial_def_for_reduction): Handle option 2 for variable-length
21702 vectors by loading the neutral value into a vector and then shifting
21703 the initial value into element 0.
21704 (get_initial_defs_for_reduction): Replace the code argument with
21705 the neutral value calculated by neutral_op_for_slp_reduction.
21706 Use gimple_build_vector for constant-length vectors.
21707 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21708 but the first group_size elements have a neutral value.
21709 Use duplicate_and_interleave otherwise.
21710 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21711 Update call to get_initial_defs_for_reduction. Handle SLP
21712 reductions for variable-length vectors by creating one vector
21713 result for each scalar result, with the elements associated
21714 with other scalar results stubbed out with the neutral value.
21715 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21716 Require IFN_VEC_SHL_INSERT for double reductions on
21717 variable-length vectors, or SLP reductions that have
21718 a neutral value. Require can_duplicate_and_interleave_p
21719 support for variable-length unchained SLP reductions if there
21720 is no neutral value, such as for MIN/MAX reductions. Also require
21721 the number of vector elements to be a multiple of the number of
21722 SLP statements when doing variable-length unchained SLP reductions.
21723 Update call to vect_create_epilog_for_reduction.
21724 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21725 and remove initial values.
21726 (duplicate_and_interleave): Make public.
21727 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21728 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21731 Alan Hayward <alan.hayward@arm.com>
21732 David Sherwood <david.sherwood@arm.com>
21734 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21735 (can_duplicate_and_interleave_p): New function.
21736 (vect_get_and_check_slp_defs): Take the vector of statements
21737 rather than just the current one. Remove excess parentheses.
21738 Restriction rejectinon of vect_constant_def and vect_external_def
21739 for variable-length vectors to boolean types, or types for which
21740 can_duplicate_and_interleave_p is false.
21741 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21742 (duplicate_and_interleave): New function.
21743 (vect_get_constant_vectors): Use gimple_build_vector for
21744 constant-length vectors and suitable variable-length constant
21745 vectors. Use duplicate_and_interleave for other variable-length
21746 vectors. Don't defer the update when inserting new statements.
21748 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21749 Alan Hayward <alan.hayward@arm.com>
21750 David Sherwood <david.sherwood@arm.com>
21752 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21753 min_profitable_iters doesn't go negative.
21755 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21756 Alan Hayward <alan.hayward@arm.com>
21757 David Sherwood <david.sherwood@arm.com>
21759 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21760 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21761 * optabs.def (vec_mask_load_lanes_optab): New optab.
21762 (vec_mask_store_lanes_optab): Likewise.
21763 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21764 (MASK_STORE_LANES): Likewise.
21765 * internal-fn.c (mask_load_lanes_direct): New macro.
21766 (mask_store_lanes_direct): Likewise.
21767 (expand_mask_load_optab_fn): Handle masked operations.
21768 (expand_mask_load_lanes_optab_fn): New macro.
21769 (expand_mask_store_optab_fn): Handle masked operations.
21770 (expand_mask_store_lanes_optab_fn): New macro.
21771 (direct_mask_load_lanes_optab_supported_p): Likewise.
21772 (direct_mask_store_lanes_optab_supported_p): Likewise.
21773 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21775 (vect_load_lanes_supported): Likewise.
21776 * tree-vect-data-refs.c (strip_conversion): New function.
21777 (can_group_stmts_p): Likewise.
21778 (vect_analyze_data_ref_accesses): Use it instead of checking
21779 for a pair of assignments.
21780 (vect_store_lanes_supported): Take a masked_p parameter.
21781 (vect_load_lanes_supported): Likewise.
21782 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21783 vect_store_lanes_supported and vect_load_lanes_supported.
21784 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21785 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21786 parameter. Don't allow gaps for masked accesses.
21787 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21788 and vect_load_lanes_supported.
21789 (get_load_store_type): Take a masked_p parameter and update
21790 call to get_group_load_store_type.
21791 (vectorizable_store): Update call to get_load_store_type.
21792 Handle IFN_MASK_STORE_LANES.
21793 (vectorizable_load): Update call to get_load_store_type.
21794 Handle IFN_MASK_LOAD_LANES.
21796 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21797 Alan Hayward <alan.hayward@arm.com>
21798 David Sherwood <david.sherwood@arm.com>
21800 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21802 * config/aarch64/aarch64-protos.h
21803 (aarch64_sve_struct_memory_operand_p): Declare.
21804 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21805 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21806 (VPRED, vpred): Handle SVE structure modes.
21807 * config/aarch64/constraints.md (Utx): New constraint.
21808 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21809 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21810 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21811 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21812 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21813 structure modes. Split into pieces after RA.
21814 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21815 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21817 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21818 SVE structure modes.
21819 (aarch64_classify_address): Likewise.
21820 (sizetochar): Move earlier in file.
21821 (aarch64_print_operand): Handle SVE register lists.
21822 (aarch64_array_mode): New function.
21823 (aarch64_sve_struct_memory_operand_p): Likewise.
21824 (TARGET_ARRAY_MODE): Redefine.
21826 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21827 Alan Hayward <alan.hayward@arm.com>
21828 David Sherwood <david.sherwood@arm.com>
21830 * target.def (array_mode): New target hook.
21831 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21832 * doc/tm.texi: Regenerate.
21833 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21834 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21835 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21836 targetm.array_mode.
21837 * stor-layout.c (mode_for_array): Likewise. Support polynomial
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 * fold-const.c (fold_binary_loc): Check the argument types
21845 rather than the result type when testing for a vector operation.
21847 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21849 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21850 * doc/tm.texi: Regenerate.
21852 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21853 Alan Hayward <alan.hayward@arm.com>
21854 David Sherwood <david.sherwood@arm.com>
21856 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21857 (sve): Document new AArch64 extension.
21858 * doc/md.texi (w): Extend the description of the AArch64
21859 constraint to include SVE vectors.
21860 (Upl, Upa): Document new AArch64 predicate constraints.
21861 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21863 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21864 (msve-vector-bits=): New option.
21865 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21866 SVE when these are disabled.
21867 (sve): New extension.
21868 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21869 modes. Adjust their number of units based on aarch64_sve_vg.
21870 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21871 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21872 aarch64_addr_query_type.
21873 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21874 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21875 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21876 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21877 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21878 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21879 (aarch64_simd_imm_zero_p): Delete.
21880 (aarch64_check_zero_based_sve_index_immediate): Declare.
21881 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21882 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21883 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21884 (aarch64_sve_float_mul_immediate_p): Likewise.
21885 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21886 rather than an rtx.
21887 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21888 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21889 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21890 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21891 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21892 (aarch64_regmode_natural_size): Likewise.
21893 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21894 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21896 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21897 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21898 for VG and the SVE predicate registers.
21899 (V_ALIASES): Add a "z"-prefixed alias.
21900 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21901 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21902 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21903 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21904 (REG_CLASS_NAMES): Add entries for them.
21905 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21906 and the predicate registers.
21907 (aarch64_sve_vg): Declare.
21908 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21909 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21910 (REGMODE_NATURAL_SIZE): Define.
21911 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21913 * config/aarch64/aarch64.c: Include cfgrtl.h.
21914 (simd_immediate_info): Add a constructor for series vectors,
21915 and an associated step field.
21916 (aarch64_sve_vg): New variable.
21917 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21918 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21919 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21920 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21921 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21922 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21923 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21924 (aarch64_get_mask_mode): New functions.
21925 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21926 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21927 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21928 predicate modes and predicate registers. Explicitly restrict
21929 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21930 to store a vector mode if it is recognized by
21931 aarch64_classify_vector_mode.
21932 (aarch64_regmode_natural_size): New function.
21933 (aarch64_hard_regno_caller_save_mode): Return the original mode
21935 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21936 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21937 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21938 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21940 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21941 does not overlap dest if the function is frame-related. Handle
21943 (aarch64_split_add_offset): New function.
21944 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21945 them aarch64_add_offset.
21946 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21947 and update call to aarch64_sub_sp.
21948 (aarch64_add_cfa_expression): New function.
21949 (aarch64_expand_prologue): Pass extra temporary registers to the
21950 functions above. Handle the case in which we need to emit new
21951 DW_CFA_expressions for registers that were originally saved
21952 relative to the stack pointer, but now have to be expressed
21953 relative to the frame pointer.
21954 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21956 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21957 IP0 and IP1 values for SVE frames.
21958 (aarch64_expand_vec_series): New function.
21959 (aarch64_expand_sve_widened_duplicate): Likewise.
21960 (aarch64_expand_sve_const_vector): Likewise.
21961 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21962 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21963 into the register, rather than emitting a SET directly.
21964 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21965 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21966 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21967 (offset_9bit_signed_scaled_p): New functions.
21968 (aarch64_replicate_bitmask_imm): New function.
21969 (aarch64_bitmask_imm): Use it.
21970 (aarch64_cannot_force_const_mem): Reject expressions involving
21971 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21972 (aarch64_classify_index): Handle SVE indices, by requiring
21973 a plain register index with a scale that matches the element size.
21974 (aarch64_classify_address): Handle SVE addresses. Assert that
21975 the mode of the address is VOIDmode or an integer mode.
21976 Update call to aarch64_classify_symbol.
21977 (aarch64_classify_symbolic_expression): Update call to
21978 aarch64_classify_symbol.
21979 (aarch64_const_vec_all_in_range_p): New function.
21980 (aarch64_print_vector_float_operand): Likewise.
21981 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21982 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21983 and the FP immediates 1.0 and 0.5.
21984 (aarch64_print_address_internal): Handle SVE addresses.
21985 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21986 (aarch64_regno_regclass): Handle predicate registers.
21987 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21989 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21990 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21991 (aarch64_convert_sve_vector_bits): New function.
21992 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21993 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21994 rather than an rtx.
21995 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21996 Handle SVE vector and predicate modes. Accept VL-based constants
21997 that need only one temporary register, and VL offsets that require
21998 no temporary registers.
21999 (aarch64_conditional_register_usage): Mark the predicate registers
22000 as fixed if SVE isn't available.
22001 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22002 Return true for SVE vector and predicate modes.
22003 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22004 rather than an unsigned int. Handle SVE modes.
22005 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22007 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22009 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22010 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22011 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22012 (aarch64_sve_float_mul_immediate_p): New functions.
22013 (aarch64_sve_valid_immediate): New function.
22014 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22015 Explicitly reject structure modes. Check for INDEX constants.
22016 Handle PTRUE and PFALSE constants.
22017 (aarch64_check_zero_based_sve_index_immediate): New function.
22018 (aarch64_simd_imm_zero_p): Delete.
22019 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22020 vector modes. Accept constants in the range of CNT[BHWD].
22021 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22022 ask for an Advanced SIMD mode.
22023 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22024 (aarch64_simd_vector_alignment): Handle SVE predicates.
22025 (aarch64_vectorize_preferred_vector_alignment): New function.
22026 (aarch64_simd_vector_alignment_reachable): Use it instead of
22028 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22029 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22031 (MAX_VECT_LEN): Delete.
22032 (expand_vec_perm_d): Add a vec_flags field.
22033 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22034 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22035 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22037 (aarch64_evpc_rev): Rename to...
22038 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22039 (aarch64_evpc_rev_global): New function.
22040 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22041 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22043 (aarch64_evpc_sve_tbl): New function.
22044 (aarch64_expand_vec_perm_const_1): Update after rename of
22045 aarch64_evpc_rev. Handle SVE permutes too, trying
22046 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22047 than aarch64_evpc_tbl.
22048 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22049 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22050 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22051 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22052 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22053 (aarch64_expand_sve_vcond): New functions.
22054 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22055 of aarch64_vector_mode_p.
22056 (aarch64_dwarf_poly_indeterminate_value): New function.
22057 (aarch64_compute_pressure_classes): Likewise.
22058 (aarch64_can_change_mode_class): Likewise.
22059 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22060 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22061 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22062 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22063 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22064 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22065 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22066 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22068 (Dn, Dl, Dr): Accept const as well as const_vector.
22069 (Dz): Likewise. Compare against CONST0_RTX.
22070 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22071 of "vector" where appropriate.
22072 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22073 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22074 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22075 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22076 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22077 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22078 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22079 (v_int_equiv): Extend to SVE modes.
22080 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22082 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22083 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22084 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22085 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22086 (SVE_COND_FP_CMP): New int iterators.
22087 (perm_hilo): Handle the new unpack unspecs.
22088 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22090 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22091 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22092 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22093 (aarch64_equality_operator, aarch64_constant_vector_operand)
22094 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22095 (aarch64_sve_nonimmediate_operand): Likewise.
22096 (aarch64_sve_general_operand): Likewise.
22097 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22098 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22099 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22100 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22101 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22102 (aarch64_sve_float_arith_immediate): Likewise.
22103 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22104 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22105 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22106 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22107 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22108 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22109 (aarch64_sve_float_arith_operand): Likewise.
22110 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22111 (aarch64_sve_float_mul_operand): Likewise.
22112 (aarch64_sve_vec_perm_operand): Likewise.
22113 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22114 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22115 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22116 as well as const_vector.
22117 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22118 in file. Use CONST0_RTX and CONSTM1_RTX.
22119 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22120 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22121 Use aarch64_simd_imm_zero.
22122 * config/aarch64/aarch64-sve.md: New file.
22123 * config/aarch64/aarch64.md: Include it.
22124 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22125 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22126 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22127 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22128 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22129 (sve): New attribute.
22130 (enabled): Disable instructions with the sve attribute unless
22132 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22133 aarch64_expand_mov_immediate.
22134 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22135 CNT[BHSD] immediates.
22136 (movti): Split CONST_POLY_INT moves into two halves.
22137 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22138 Split additions that need a temporary here if the destination
22139 is the stack pointer.
22140 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22141 (*add<mode>3_poly_1): New instruction.
22142 (set_clobber_cc): New expander.
22144 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22146 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22147 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22148 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22149 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22150 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22151 Change innermode from fixed_mode_size to machine_mode.
22152 (simplify_subreg): Update call accordingly. Handle a constant-sized
22153 subreg of a variable-length CONST_VECTOR.
22155 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22156 Alan Hayward <alan.hayward@arm.com>
22157 David Sherwood <david.sherwood@arm.com>
22159 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22160 (add_offset_to_base): New function, split out from...
22161 (create_mem_ref): ...here. When handling a scale other than 1,
22162 check first whether the address is valid without the offset.
22163 Add it into the base if so, leaving the index and scale as-is.
22165 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22168 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22169 fold_for_warn before checking if arg2 is INTEGER_CST.
22171 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22173 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22174 (store_multiple_operation): Delete.
22175 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22176 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22177 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22178 guarded by TARGET_STRING.
22179 (rs6000_output_load_multiple): Delete.
22180 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22181 OPTION_MASK_STRING / TARGET_STRING handling.
22182 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22183 (const rs6000_opt_masks) <"string">: Change mask to 0.
22184 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22185 (MASK_STRING): Delete.
22186 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22188 (load_multiple): Delete.
22195 (store_multiple): Delete.
22202 (movmemsi_8reg): Delete.
22203 (corresponding unnamed define_insn): Delete.
22204 (movmemsi_6reg): Delete.
22205 (corresponding unnamed define_insn): Delete.
22206 (movmemsi_4reg): Delete.
22207 (corresponding unnamed define_insn): Delete.
22208 (movmemsi_2reg): Delete.
22209 (corresponding unnamed define_insn): Delete.
22210 (movmemsi_1reg): Delete.
22211 (corresponding unnamed define_insn): Delete.
22212 * config/rs6000/rs6000.opt (mno-string): New.
22213 (mstring): Replace by deprecation warning stub.
22214 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22216 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22218 * regrename.c (regrename_do_replace): If replacing the same
22219 reg multiple times, try to reuse last created gen_raw_REG.
22222 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22223 main to workaround a bug in GDB.
22225 2018-01-12 Tom de Vries <tom@codesourcery.com>
22228 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22230 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22232 PR rtl-optimization/80481
22233 * ira-color.c (get_cap_member): New function.
22234 (allocnos_conflict_by_live_ranges_p): Use it.
22235 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22236 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22238 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22241 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22242 (*saddl_se_1): Ditto.
22243 (*ssubsi_1): Ditto.
22244 (*ssubl_se_1): Ditto.
22246 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22248 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22249 rather than wi::to_widest for DR_INITs.
22250 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22251 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22252 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22254 (vect_analyze_group_access_1): Note that here.
22256 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22258 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22259 polynomial type sizes.
22261 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22263 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22264 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22265 (gimple_add_tmp_var): Likewise.
22267 2018-01-12 Martin Liska <mliska@suse.cz>
22269 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22270 (gimple_alloc_sizes): Likewise.
22271 (dump_gimple_statistics): Use PRIu64 in printf format.
22272 * gimple.h: Change uint64_t to int.
22274 2018-01-12 Martin Liska <mliska@suse.cz>
22276 * tree-core.h: Use uint64_t instead of int.
22277 * tree.c (tree_node_counts): Likewise.
22278 (tree_node_sizes): Likewise.
22279 (dump_tree_statistics): Use PRIu64 in printf format.
22281 2018-01-12 Martin Liska <mliska@suse.cz>
22283 * Makefile.in: As qsort_chk is implemented in vec.c, add
22284 vec.o to linkage of gencfn-macros.
22285 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22286 passing the info to record_node_allocation_statistics.
22287 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22289 * ggc-common.c (struct ggc_usage): Add operator== and use
22290 it in operator< and compare function.
22291 * mem-stats.h (struct mem_usage): Likewise.
22292 * vec.c (struct vec_usage): Remove operator< and compare
22293 function. Can be simply inherited.
22295 2018-01-12 Martin Jambor <mjambor@suse.cz>
22298 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22299 * tree-ssa-math-opts.c: Include domwalk.h.
22300 (convert_mult_to_fma_1): New function.
22301 (fma_transformation_info): New type.
22302 (fma_deferring_state): Likewise.
22303 (cancel_fma_deferring): New function.
22304 (result_of_phi): Likewise.
22305 (last_fma_candidate_feeds_initial_phi): Likewise.
22306 (convert_mult_to_fma): Added deferring logic, split actual
22307 transformation to convert_mult_to_fma_1.
22308 (math_opts_dom_walker): New type.
22309 (math_opts_dom_walker::after_dom_children): New method, body moved
22310 here from pass_optimize_widening_mul::execute, added deferring logic
22312 (pass_optimize_widening_mul::execute): Moved most of code to
22313 math_opts_dom_walker::after_dom_children.
22314 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22315 * config/i386/i386.c (ix86_option_override_internal): Added
22316 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22318 2018-01-12 Richard Biener <rguenther@suse.de>
22321 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22322 inline instance vars.
22324 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22327 * config/rx/rx.c (rx_is_restricted_memory_address):
22328 Handle SUBREG case.
22330 2018-01-12 Richard Biener <rguenther@suse.de>
22332 PR tree-optimization/80846
22333 * target.def (split_reduction): New target hook.
22334 * targhooks.c (default_split_reduction): New function.
22335 * targhooks.h (default_split_reduction): Declare.
22336 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22337 target requests first reduce vectors by combining low and high
22339 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22340 (get_vectype_for_scalar_type_and_size): Export.
22341 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22342 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22343 * doc/tm.texi: Regenerate.
22344 * config/i386/i386.c (ix86_split_reduction): Implement
22345 TARGET_VECTORIZE_SPLIT_REDUCTION.
22347 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22350 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22351 in PIC mode except for TARGET_VXWORKS_RTP.
22352 * config/sparc/sparc.c: Include cfgrtl.h.
22353 (TARGET_INIT_PIC_REG): Define.
22354 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22355 (sparc_pic_register_p): New predicate.
22356 (sparc_legitimate_address_p): Use it.
22357 (sparc_legitimize_pic_address): Likewise.
22358 (sparc_delegitimize_address): Likewise.
22359 (sparc_mode_dependent_address_p): Likewise.
22360 (gen_load_pcrel_sym): Remove 4th parameter.
22361 (load_got_register): Adjust call to above. Remove obsolete stuff.
22362 (sparc_expand_prologue): Do not call load_got_register here.
22363 (sparc_flat_expand_prologue): Likewise.
22364 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22365 (sparc_use_pseudo_pic_reg): New function.
22366 (sparc_init_pic_reg): Likewise.
22367 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22368 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22370 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22372 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22373 Add item for branch_cost.
22375 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22377 PR rtl-optimization/83565
22378 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22379 not extend the result to a larger mode for rotate operations.
22380 (num_sign_bit_copies1): Likewise.
22382 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22385 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22387 Use values-Xc.o for -pedantic.
22388 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22390 2018-01-12 Martin Liska <mliska@suse.cz>
22393 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22395 (possible_polymorphic_call_targets): Use it.
22396 (ipa_devirt): Likewise.
22398 2018-01-12 Martin Liska <mliska@suse.cz>
22400 * profile-count.h (enum profile_quality): Use 0 as invalid
22401 enum value of profile_quality.
22403 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22405 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22406 -mext-string options.
22408 2018-01-12 Richard Biener <rguenther@suse.de>
22410 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22411 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22412 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22414 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22416 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22418 * configure.ac (--with-long-double-format): Add support for the
22419 configuration option to change the default long double format on
22421 * config.gcc (powerpc*-linux*-*): Likewise.
22422 * configure: Regenerate.
22423 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22424 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22425 used without modification.
22427 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22429 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22430 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22431 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22432 MISC_BUILTIN_SPEC_BARRIER.
22433 (rs6000_init_builtins): Likewise.
22434 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22436 (speculation_barrier): New define_insn.
22437 * doc/extend.texi: Document __builtin_speculation_barrier.
22439 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22442 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22443 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22444 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22446 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22447 integral modes instead of "ss" and "sd".
22448 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22449 vectors with 32-bit and 64-bit elements.
22450 (vecdupssescalarmodesuffix): New mode attribute.
22451 (vec_dup<mode>): Use it.
22453 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22456 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22457 frame if argument is passed on stack.
22459 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22462 * ree.c (combine_reaching_defs): Optimize also
22463 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22464 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22466 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22468 PR middle-end/83189
22469 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22471 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22473 PR middle-end/83718
22474 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22475 after they are computed.
22477 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22479 PR tree-optimization/83695
22480 * gimple-loop-linterchange.cc
22481 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22482 reset cached scev information after interchange.
22483 (pass_linterchange::execute): Remove call to scev_reset_htab.
22485 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22487 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22488 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22489 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22490 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22491 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22492 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22493 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22494 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22495 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22496 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22497 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22498 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22499 (V_lane_reg): Likewise.
22500 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22502 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22503 (vfmal_lane_low<mode>_intrinsic,
22504 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22505 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22506 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22507 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22508 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22509 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22511 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22513 * config/arm/arm-cpus.in (fp16fml): New feature.
22514 (ALL_SIMD): Add fp16fml.
22515 (armv8.2-a): Add fp16fml as an option.
22516 (armv8.3-a): Likewise.
22517 (armv8.4-a): Add fp16fml as part of fp16.
22518 * config/arm/arm.h (TARGET_FP16FML): Define.
22519 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22521 * config/arm/arm-modes.def (V2HF): Define.
22522 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22523 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22524 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22525 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22526 vfmsl_low, vfmsl_high): New set of builtins.
22527 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22528 (vfml_op): New code attribute.
22529 (VFMLHALVES): New int iterator.
22530 (VFML, VFMLSEL): New mode attributes.
22531 (V_reg): Define mapping for V2HF.
22532 (V_hi, V_lo): New mode attributes.
22533 (VF_constraint): Likewise.
22534 (vfml_half, vfml_half_selector): New int attributes.
22535 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22537 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22538 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22540 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22541 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22542 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22543 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22545 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22546 Document new effective target and option set.
22548 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22550 * config/arm/arm-cpus.in (armv8_4): New feature.
22551 (ARMv8_4a): New fgroup.
22552 (armv8.4-a): New arch.
22553 * config/arm/arm-tables.opt: Regenerate.
22554 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22555 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22556 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22557 Add matching rules for -march=armv8.4-a and extensions.
22558 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22560 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22563 * config/rx/rx.md (BW): New mode attribute.
22564 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22566 2018-01-11 Richard Biener <rguenther@suse.de>
22568 PR tree-optimization/83435
22569 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22570 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22571 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22573 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22574 Alan Hayward <alan.hayward@arm.com>
22575 David Sherwood <david.sherwood@arm.com>
22577 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22579 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22580 (aarch64_print_address_internal): Use it to check for a zero offset.
22582 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22583 Alan Hayward <alan.hayward@arm.com>
22584 David Sherwood <david.sherwood@arm.com>
22586 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22587 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22588 Return a poly_int64 rather than a HOST_WIDE_INT.
22589 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22590 rather than a HOST_WIDE_INT.
22591 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22592 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22593 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22594 final_offset from HOST_WIDE_INT to poly_int64.
22595 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22596 to_constant when getting the number of units in an Advanced SIMD
22598 (aarch64_builtin_vectorized_function): Check for a constant number
22600 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22602 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22603 attribute instead of GET_MODE_NUNITS.
22604 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22605 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22606 GET_MODE_SIZE for fixed-size registers.
22607 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22608 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22609 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22610 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22611 (aarch64_print_operand, aarch64_print_address_internal)
22612 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22613 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22614 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22615 Handle polynomial GET_MODE_SIZE.
22616 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22617 wider than SImode without modification.
22618 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22619 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22620 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22621 passing and returning SVE modes.
22622 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22623 rather than GEN_INT.
22624 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22625 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22626 (aarch64_allocate_and_probe_stack_space): Likewise.
22627 (aarch64_layout_frame): Cope with polynomial offsets.
22628 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22629 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22630 polynomial offsets.
22631 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22632 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22633 poly_int64 rather than a HOST_WIDE_INT.
22634 (aarch64_get_separate_components, aarch64_process_components)
22635 (aarch64_expand_prologue, aarch64_expand_epilogue)
22636 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22637 (aarch64_anchor_offset): New function, split out from...
22638 (aarch64_legitimize_address): ...here.
22639 (aarch64_builtin_vectorization_cost): Handle polynomial
22640 TYPE_VECTOR_SUBPARTS.
22641 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22643 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22644 number of elements from the PARALLEL rather than the mode.
22645 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22646 rather than GET_MODE_BITSIZE.
22647 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22648 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22649 (aarch64_expand_vec_perm_const_1): Handle polynomial
22650 d->perm.length () and d->perm elements.
22651 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22652 Apply to_constant to d->perm elements.
22653 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22654 polynomial CONST_VECTOR_NUNITS.
22655 (aarch64_move_pointer): Take amount as a poly_int64 rather
22657 (aarch64_progress_pointer): Avoid temporary variable.
22658 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22659 the mode attribute instead of GET_MODE.
22661 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22662 Alan Hayward <alan.hayward@arm.com>
22663 David Sherwood <david.sherwood@arm.com>
22665 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22666 x exists before using it.
22667 (aarch64_add_constant_internal): Rename to...
22668 (aarch64_add_offset_1): ...this. Replace regnum with separate
22669 src and dest rtxes. Handle the case in which they're different,
22670 including when the offset is zero. Replace scratchreg with an rtx.
22671 Use 2 additions if there is no spare register into which we can
22672 move a 16-bit constant.
22673 (aarch64_add_constant): Delete.
22674 (aarch64_add_offset): Replace reg with separate src and dest
22675 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22676 Use aarch64_add_offset_1.
22677 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22678 an rtx rather than an int. Take the delta as a poly_int64
22679 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22680 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22681 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22682 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22683 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22684 and aarch64_add_sp.
22685 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22686 aarch64_add_constant.
22688 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22690 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22691 Use scalar_float_mode.
22693 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22695 * config/aarch64/aarch64-simd.md
22696 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22697 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22698 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22699 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22700 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22701 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22702 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22703 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22704 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22705 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22707 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22710 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22711 targ_options->x_arm_arch_string is non NULL.
22713 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22715 * config/aarch64/aarch64.h
22716 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22718 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22721 * expmed.c (emit_store_flag_force): Swap if const op0
22722 and change VOIDmode to mode of op0.
22724 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22726 PR rtl-optimization/83761
22727 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22728 than bytes to mode_for_size.
22730 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22732 PR middle-end/83189
22733 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22734 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22737 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22739 PR middle-end/83575
22740 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22741 when in layout mode.
22742 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22743 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22746 2018-01-10 Michael Collison <michael.collison@arm.com>
22748 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22749 * config/aarch64/aarch64-option-extension.def: Add
22750 AARCH64_OPT_EXTENSION of 'fp16fml'.
22751 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22752 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22753 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22754 * config/aarch64/constraints.md (Ui7): New constraint.
22755 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22756 (VFMLA_SEL_W): Ditto.
22759 (VFMLA16_LOW): New int iterator.
22760 (VFMLA16_HIGH): Ditto.
22761 (UNSPEC_FMLAL): New unspec.
22762 (UNSPEC_FMLSL): Ditto.
22763 (UNSPEC_FMLAL2): Ditto.
22764 (UNSPEC_FMLSL2): Ditto.
22765 (f16mac): New code attribute.
22766 * config/aarch64/aarch64-simd-builtins.def
22767 (aarch64_fmlal_lowv2sf): Ditto.
22768 (aarch64_fmlsl_lowv2sf): Ditto.
22769 (aarch64_fmlalq_lowv4sf): Ditto.
22770 (aarch64_fmlslq_lowv4sf): Ditto.
22771 (aarch64_fmlal_highv2sf): Ditto.
22772 (aarch64_fmlsl_highv2sf): Ditto.
22773 (aarch64_fmlalq_highv4sf): Ditto.
22774 (aarch64_fmlslq_highv4sf): Ditto.
22775 (aarch64_fmlal_lane_lowv2sf): Ditto.
22776 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22777 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22778 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22779 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22780 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22781 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22782 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22783 (aarch64_fmlal_lane_highv2sf): Ditto.
22784 (aarch64_fmlsl_lane_highv2sf): Ditto.
22785 (aarch64_fmlal_laneq_highv2sf): Ditto.
22786 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22787 (aarch64_fmlalq_lane_highv4sf): Ditto.
22788 (aarch64_fmlsl_lane_highv4sf): Ditto.
22789 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22790 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22791 * config/aarch64/aarch64-simd.md:
22792 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22793 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22794 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22795 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22796 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22797 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22798 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22799 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22800 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22801 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22802 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22803 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22804 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22805 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22806 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22807 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22808 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22809 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22810 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22811 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22812 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22813 (vfmlsl_low_u32): Ditto.
22814 (vfmlalq_low_u32): Ditto.
22815 (vfmlslq_low_u32): Ditto.
22816 (vfmlal_high_u32): Ditto.
22817 (vfmlsl_high_u32): Ditto.
22818 (vfmlalq_high_u32): Ditto.
22819 (vfmlslq_high_u32): Ditto.
22820 (vfmlal_lane_low_u32): Ditto.
22821 (vfmlsl_lane_low_u32): Ditto.
22822 (vfmlal_laneq_low_u32): Ditto.
22823 (vfmlsl_laneq_low_u32): Ditto.
22824 (vfmlalq_lane_low_u32): Ditto.
22825 (vfmlslq_lane_low_u32): Ditto.
22826 (vfmlalq_laneq_low_u32): Ditto.
22827 (vfmlslq_laneq_low_u32): Ditto.
22828 (vfmlal_lane_high_u32): Ditto.
22829 (vfmlsl_lane_high_u32): Ditto.
22830 (vfmlal_laneq_high_u32): Ditto.
22831 (vfmlsl_laneq_high_u32): Ditto.
22832 (vfmlalq_lane_high_u32): Ditto.
22833 (vfmlslq_lane_high_u32): Ditto.
22834 (vfmlalq_laneq_high_u32): Ditto.
22835 (vfmlslq_laneq_high_u32): Ditto.
22836 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22837 (AARCH64_FL_FOR_ARCH8_4): New.
22838 (AARCH64_ISA_F16FML): New ISA flag.
22839 (TARGET_F16FML): New feature flag for fp16fml.
22840 (doc/invoke.texi): Document new fp16fml option.
22842 2018-01-10 Michael Collison <michael.collison@arm.com>
22844 * config/aarch64/aarch64-builtins.c:
22845 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22846 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22847 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22848 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22849 (AARCH64_ISA_SHA3): New ISA flag.
22850 (TARGET_SHA3): New feature flag for sha3.
22851 * config/aarch64/iterators.md (sha512_op): New int attribute.
22852 (CRYPTO_SHA512): New int iterator.
22853 (UNSPEC_SHA512H): New unspec.
22854 (UNSPEC_SHA512H2): Ditto.
22855 (UNSPEC_SHA512SU0): Ditto.
22856 (UNSPEC_SHA512SU1): Ditto.
22857 * config/aarch64/aarch64-simd-builtins.def
22858 (aarch64_crypto_sha512hqv2di): New builtin.
22859 (aarch64_crypto_sha512h2qv2di): Ditto.
22860 (aarch64_crypto_sha512su0qv2di): Ditto.
22861 (aarch64_crypto_sha512su1qv2di): Ditto.
22862 (aarch64_eor3qv8hi): Ditto.
22863 (aarch64_rax1qv2di): Ditto.
22864 (aarch64_xarqv2di): Ditto.
22865 (aarch64_bcaxqv8hi): Ditto.
22866 * config/aarch64/aarch64-simd.md:
22867 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22868 (aarch64_crypto_sha512su0qv2di): Ditto.
22869 (aarch64_crypto_sha512su1qv2di): Ditto.
22870 (aarch64_eor3qv8hi): Ditto.
22871 (aarch64_rax1qv2di): Ditto.
22872 (aarch64_xarqv2di): Ditto.
22873 (aarch64_bcaxqv8hi): Ditto.
22874 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22875 (vsha512h2q_u64): Ditto.
22876 (vsha512su0q_u64): Ditto.
22877 (vsha512su1q_u64): Ditto.
22878 (veor3q_u16): Ditto.
22879 (vrax1q_u64): Ditto.
22880 (vxarq_u64): Ditto.
22881 (vbcaxq_u16): Ditto.
22882 * config/arm/types.md (crypto_sha512): New type attribute.
22883 (crypto_sha3): Ditto.
22884 (doc/invoke.texi): Document new sha3 option.
22886 2018-01-10 Michael Collison <michael.collison@arm.com>
22888 * config/aarch64/aarch64-builtins.c:
22889 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22890 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22891 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22892 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22893 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22894 (AARCH64_ISA_SM4): New ISA flag.
22895 (TARGET_SM4): New feature flag for sm4.
22896 * config/aarch64/aarch64-simd-builtins.def
22897 (aarch64_sm3ss1qv4si): Ditto.
22898 (aarch64_sm3tt1aq4si): Ditto.
22899 (aarch64_sm3tt1bq4si): Ditto.
22900 (aarch64_sm3tt2aq4si): Ditto.
22901 (aarch64_sm3tt2bq4si): Ditto.
22902 (aarch64_sm3partw1qv4si): Ditto.
22903 (aarch64_sm3partw2qv4si): Ditto.
22904 (aarch64_sm4eqv4si): Ditto.
22905 (aarch64_sm4ekeyqv4si): Ditto.
22906 * config/aarch64/aarch64-simd.md:
22907 (aarch64_sm3ss1qv4si): Ditto.
22908 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22909 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22910 (aarch64_sm4eqv4si): Ditto.
22911 (aarch64_sm4ekeyqv4si): Ditto.
22912 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22913 (sm3part_op): Ditto.
22914 (CRYPTO_SM3TT): Ditto.
22915 (CRYPTO_SM3PART): Ditto.
22916 (UNSPEC_SM3SS1): New unspec.
22917 (UNSPEC_SM3TT1A): Ditto.
22918 (UNSPEC_SM3TT1B): Ditto.
22919 (UNSPEC_SM3TT2A): Ditto.
22920 (UNSPEC_SM3TT2B): Ditto.
22921 (UNSPEC_SM3PARTW1): Ditto.
22922 (UNSPEC_SM3PARTW2): Ditto.
22923 (UNSPEC_SM4E): Ditto.
22924 (UNSPEC_SM4EKEY): Ditto.
22925 * config/aarch64/constraints.md (Ui2): New constraint.
22926 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22927 * config/arm/types.md (crypto_sm3): New type attribute.
22928 (crypto_sm4): Ditto.
22929 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22930 (vsm3tt1aq_u32): Ditto.
22931 (vsm3tt1bq_u32): Ditto.
22932 (vsm3tt2aq_u32): Ditto.
22933 (vsm3tt2bq_u32): Ditto.
22934 (vsm3partw1q_u32): Ditto.
22935 (vsm3partw2q_u32): Ditto.
22936 (vsm4eq_u32): Ditto.
22937 (vsm4ekeyq_u32): Ditto.
22938 (doc/invoke.texi): Document new sm4 option.
22940 2018-01-10 Michael Collison <michael.collison@arm.com>
22942 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22943 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22944 (AARCH64_FL_FOR_ARCH8_4): New.
22945 (AARCH64_FL_V8_4): New flag.
22946 (doc/invoke.texi): Document new armv8.4-a option.
22948 2018-01-10 Michael Collison <michael.collison@arm.com>
22950 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22951 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22952 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22953 * config/aarch64/aarch64-option-extension.def: Add
22954 AARCH64_OPT_EXTENSION of 'sha2'.
22955 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22956 (crypto): Disable sha2 and aes if crypto disabled.
22957 (crypto): Enable aes and sha2 if enabled.
22958 (simd): Disable sha2 and aes if simd disabled.
22959 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22961 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22962 (TARGET_SHA2): New feature flag for sha2.
22963 (TARGET_AES): New feature flag for aes.
22964 * config/aarch64/aarch64-simd.md:
22965 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22966 conditional on TARGET_AES.
22967 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22968 (aarch64_crypto_sha1hsi): Make pattern conditional
22970 (aarch64_crypto_sha1hv4si): Ditto.
22971 (aarch64_be_crypto_sha1hv4si): Ditto.
22972 (aarch64_crypto_sha1su1v4si): Ditto.
22973 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22974 (aarch64_crypto_sha1su0v4si): Ditto.
22975 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22976 (aarch64_crypto_sha256su0v4si): Ditto.
22977 (aarch64_crypto_sha256su1v4si): Ditto.
22978 (doc/invoke.texi): Document new aes and sha2 options.
22980 2018-01-10 Martin Sebor <msebor@redhat.com>
22982 PR tree-optimization/83781
22983 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22986 2018-01-11 Martin Sebor <msebor@gmail.com>
22987 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22989 PR tree-optimization/83501
22990 PR tree-optimization/81703
22992 * tree-ssa-strlen.c (get_string_cst): Rename...
22993 (get_string_len): ...to this. Handle global constants.
22994 (handle_char_store): Adjust.
22996 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22997 Jim Wilson <jimw@sifive.com>
22999 * config/riscv/riscv-protos.h (riscv_output_return): New.
23000 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23001 (riscv_attribute_table, riscv_output_return),
23002 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23003 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23004 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23006 (riscv_expand_prologue): Add early return for naked function.
23007 (riscv_expand_epilogue): Likewise.
23008 (riscv_function_ok_for_sibcall): Return false for naked function.
23009 (riscv_set_current_function): New.
23010 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23011 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23012 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23013 * doc/extend.texi (RISC-V Function Attributes): New.
23015 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23017 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23018 check for 128-bit long double before checking TCmode.
23019 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23020 128-bit long doubles before checking TFmode or TCmode.
23021 (FLOAT128_IBM_P): Likewise.
23023 2018-01-10 Martin Sebor <msebor@redhat.com>
23025 PR tree-optimization/83671
23026 * builtins.c (c_strlen): Unconditionally return zero for the empty
23028 Use -Warray-bounds for warnings.
23029 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23030 for non-constant array indices with COMPONENT_REF, arrays of
23031 arrays, and pointers to arrays.
23032 (gimple_fold_builtin_strlen): Determine and set length range for
23033 non-constant character arrays.
23035 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23037 PR middle-end/81897
23038 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23041 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23043 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23045 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23048 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23049 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23050 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23051 indexed_or_indirect_operand predicate.
23052 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23053 (*vsx_le_perm_load_v8hi): Likewise.
23054 (*vsx_le_perm_load_v16qi): Likewise.
23055 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23056 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23057 (*vsx_le_perm_store_v8hi): Likewise.
23058 (*vsx_le_perm_store_v16qi): Likewise.
23059 (eight unnamed splitters): Likewise.
23061 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23063 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23064 * config/rs6000/emmintrin.h: Likewise.
23065 * config/rs6000/mmintrin.h: Likewise.
23066 * config/rs6000/xmmintrin.h: Likewise.
23068 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23071 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23073 * tree.c (tree_nop_conversion): Return true for location wrapper
23075 (maybe_wrap_with_location): New function.
23076 (selftest::check_strip_nops): New function.
23077 (selftest::test_location_wrappers): New function.
23078 (selftest::tree_c_tests): Call it.
23079 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23080 (maybe_wrap_with_location): New decl.
23081 (EXPR_LOCATION_WRAPPER_P): New macro.
23082 (location_wrapper_p): New inline function.
23083 (tree_strip_any_location_wrapper): New inline function.
23085 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23088 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23089 stack_realign_offset for the largest alignment of stack slot
23091 (ix86_find_max_used_stack_alignment): New function.
23092 (ix86_finalize_stack_frame_flags): Use it. Set
23093 max_used_stack_alignment if we don't realign stack.
23094 * config/i386/i386.h (machine_function): Add
23095 max_used_stack_alignment.
23097 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23099 * config/arm/arm.opt (-mbranch-cost): New option.
23100 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23103 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23106 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23107 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23109 2018-01-10 Richard Biener <rguenther@suse.de>
23112 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23113 early out so it also covers the case where we have a non-NULL
23116 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23118 PR tree-optimization/83753
23119 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23120 for non-strided grouped accesses if the number of elements is 1.
23122 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23125 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23126 * i386.h (TARGET_USE_GATHER): Define.
23127 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23129 2018-01-10 Martin Liska <mliska@suse.cz>
23132 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23133 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23135 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23136 CLEANUP_NO_PARTITIONING is not set.
23138 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23140 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23141 for vectors, as a partial revert of r254296.
23142 * rtl.h (const_vec_p): Delete.
23143 (const_vec_duplicate_p): Don't test for vector CONSTs.
23144 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23145 * expmed.c (make_tree): Likewise.
23148 * common.md (E, F): Use CONSTANT_P instead of checking for
23150 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23151 checking for CONST_VECTOR.
23153 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23155 PR middle-end/83575
23156 * predict.c (force_edge_cold): Handle in more sane way edges
23157 with no prediction.
23159 2018-01-09 Carl Love <cel@us.ibm.com>
23161 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23163 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23164 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23165 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23166 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23167 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23168 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23169 * config/rs6000/rs6000-protos.h: Add extern defition for
23170 rs6000_generate_float2_double_code.
23171 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23173 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23174 (float2_v2df): Add define_expand.
23176 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23179 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23180 op_mode in the force_to_mode call.
23182 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23184 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23185 instead of checking each element individually.
23186 (aarch64_evpc_uzp): Likewise.
23187 (aarch64_evpc_zip): Likewise.
23188 (aarch64_evpc_ext): Likewise.
23189 (aarch64_evpc_rev): Likewise.
23190 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23191 instead of checking each element individually. Return true without
23193 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23194 whether all selected elements come from the same input, instead of
23195 checking each element individually. Remove calls to gen_rtx_REG,
23196 start_sequence and end_sequence and instead assert that no rtl is
23199 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23201 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23202 order of HIGH and CONST checks.
23204 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23206 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23207 if the destination isn't an SSA_NAME.
23209 2018-01-09 Richard Biener <rguenther@suse.de>
23211 PR tree-optimization/83668
23212 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23214 (canonicalize_loop_form): ... here, renamed from ...
23215 (canonicalize_loop_closed_ssa_form): ... this and amended to
23216 swap successor edges for loop exit blocks to make us use
23217 the RPO order we need for initial schedule generation.
23219 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23221 PR tree-optimization/64811
23222 * match.pd: When optimizing comparisons with Inf, avoid
23223 introducing or losing exceptions from comparisons with NaN.
23225 2018-01-09 Martin Liska <mliska@suse.cz>
23228 * asan.c (shadow_mem_size): Add gcc_assert.
23230 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23232 Don't save registers in main().
23235 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23236 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23237 * config/avr/avr.c (avr_set_current_function): Don't error if
23238 naked, OS_task or OS_main are specified at the same time.
23239 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23241 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23243 * common/config/avr/avr-common.c (avr_option_optimization_table):
23244 Switch on -mmain-is-OS_task for optimizing compilations.
23246 2018-01-09 Richard Biener <rguenther@suse.de>
23248 PR tree-optimization/83572
23249 * graphite.c: Include cfganal.h.
23250 (graphite_transform_loops): Connect infinite loops to exit
23251 and remove fake edges at the end.
23253 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23255 * ipa-inline.c (edge_badness): Revert accidental checkin.
23257 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23260 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23261 symbols; not inline clones.
23263 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23266 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23267 hard registers. Formatting fixes.
23269 PR preprocessor/83722
23270 * gcc.c (try_generate_repro): Pass
23271 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23272 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23275 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23276 Kito Cheng <kito.cheng@gmail.com>
23278 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23279 (riscv_leaf_function_p): Delete.
23280 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23282 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23284 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23286 (do_ifelse): New function.
23287 (do_isel): New function.
23288 (do_sub3): New function.
23289 (do_add3): New function.
23290 (do_load_mask_compare): New function.
23291 (do_overlap_load_compare): New function.
23292 (expand_compare_loop): New function.
23293 (expand_block_compare): Call expand_compare_loop() when appropriate.
23294 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23295 option description.
23296 (-mblock-compare-inline-loop-limit): New option.
23298 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23301 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23302 Reverse order of second and third operands in first alternative.
23303 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23304 of first and second elements in UNSPEC_VPERMR vector.
23305 (altivec_expand_vec_perm_le): Likewise.
23307 2018-01-08 Jeff Law <law@redhat.com>
23309 PR rtl-optimizatin/81308
23310 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23311 (process_switch): If group_case_labels makes a change, then set
23313 (pass_convert_switch::execute): If a switch is converted, then
23314 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23316 PR rtl-optimization/81308
23317 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23320 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23322 PR target/83663 - Revert r255946
23323 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23324 generation for cases where splatting a value is not useful.
23325 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23326 across a vec_duplicate and a paradoxical subreg forming a vector
23327 mode to a vec_concat.
23329 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23331 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23332 -march=armv8.3-a variants.
23333 * config/arm/t-multilib: Likewise.
23334 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23336 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23338 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23340 (cceq_ior_compare_complement): Give it a name so I can use it, and
23341 change boolean_or_operator predicate to boolean_operator so it can
23342 be used to generate a crand.
23343 (eqne): New code iterator.
23344 (bd/bd_neg): New code_attrs.
23345 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23346 a single define_insn.
23347 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23348 decrement (bdnzt/bdnzf/bdzt/bdzf).
23349 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23350 with the new names of the branch decrement patterns, and added the
23351 names of the branch decrement conditional patterns.
23353 2018-01-08 Richard Biener <rguenther@suse.de>
23355 PR tree-optimization/83563
23356 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23359 2018-01-08 Richard Biener <rguenther@suse.de>
23361 PR middle-end/83713
23362 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23364 2018-01-08 Richard Biener <rguenther@suse.de>
23366 PR tree-optimization/83685
23367 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23368 references to abnormals.
23370 2018-01-08 Richard Biener <rguenther@suse.de>
23373 * dwarf2out.c (output_indirect_strings): Handle empty
23374 skeleton_debug_str_hash.
23375 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23377 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23379 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23380 (emit_store_direct): Likewise.
23381 (arc_trampoline_adjust_address): Likewise.
23382 (arc_asm_trampoline_template): New function.
23383 (arc_initialize_trampoline): Use asm_trampoline_template.
23384 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23385 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23386 * config/arc/arc.md (flush_icache): Delete pattern.
23388 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23390 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23391 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23394 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23397 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23398 by not USED_FOR_TARGET.
23399 (make_pass_resolve_sw_modes): Likewise.
23401 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23403 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23406 2018-01-08 Richard Biener <rguenther@suse.de>
23408 PR middle-end/83580
23409 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23411 2018-01-08 Richard Biener <rguenther@suse.de>
23413 PR middle-end/83517
23414 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23416 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23418 PR middle-end/81897
23419 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23420 basic blocks with a small number of successors.
23421 (convert_control_dep_chain_into_preds): Improve handling of
23423 (dump_predicates): Split apart into...
23424 (dump_pred_chain): ...here...
23425 (dump_pred_info): ...and here.
23426 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23427 (can_chain_union_be_invalidated_p): Improve check for invalidation
23429 (uninit_uses_cannot_happen): Avoid unnecessary if
23430 convert_control_dep_chain_into_preds yielded nothing.
23432 2018-01-06 Martin Sebor <msebor@redhat.com>
23434 PR tree-optimization/83640
23435 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23436 subtracting negative offset from size.
23437 (builtin_access::overlap): Adjust offset bounds of the access to fall
23438 within the size of the object if possible.
23440 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23442 PR rtl-optimization/83699
23443 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23444 extract_bit_field_as_subreg to cases in which the extracted
23445 value is also a vector.
23447 * lra-constraints.c (process_alt_operands): Test for the equivalence
23448 substitutions when detecting a possible reload cycle.
23450 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23453 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23454 by default if flag_selective_schedling{,2}. Formatting fixes.
23456 PR rtl-optimization/83682
23457 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23458 if it has non-VECTOR_MODE element mode.
23459 (vec_duplicate_p): Likewise.
23461 PR middle-end/83694
23462 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23463 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23465 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23468 * config/i386/i386-builtin.def
23469 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23470 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23471 Require also OPTION_MASK_ISA_AVX512F in addition to
23472 OPTION_MASK_ISA_GFNI.
23473 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23474 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23475 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23476 to OPTION_MASK_ISA_GFNI.
23477 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23478 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23479 OPTION_MASK_ISA_AVX512BW.
23480 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23481 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23482 addition to OPTION_MASK_ISA_GFNI.
23483 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23484 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23485 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23486 to OPTION_MASK_ISA_GFNI.
23487 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23488 a requirement for all ISAs rather than any of them with a few
23490 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23492 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23493 bitmasks to be enabled with 3 exceptions, instead of requiring any
23494 enabled ISA with lots of exceptions.
23495 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23496 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23497 Change avx512bw in isa attribute to avx512f.
23498 * config/i386/sgxintrin.h: Add license boilerplate.
23499 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23500 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23501 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23502 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23504 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23505 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23506 temporarily sse2 rather than sse if not enabled already.
23509 * config/i386/sse.md (VI248_VLBW): Rename to ...
23510 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23511 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23512 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23513 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23514 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23515 mode iterator instead of VI248_VLBW.
23517 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23519 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23520 (record_modified): Skip clobbers; add debug output.
23521 (param_change_prob): Use sreal frequencies.
23523 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23525 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23526 punt for user-aligned variables.
23528 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23530 * tree-chrec.c (chrec_contains_symbols): Return true for
23533 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23536 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23537 of (x|y) == x for BICS pattern.
23539 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23541 PR tree-optimization/83605
23542 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23543 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23546 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23548 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23549 * config/epiphany/rtems.h: New file.
23551 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23552 Uros Bizjak <ubizjak@gmail.com>
23555 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23556 QIreg_operand instead of register_operand predicate.
23557 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23558 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23559 comments instead of -fmitigate[-_]rop.
23561 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23564 * cgraphunit.c (symbol_table::compile): Switch to text_section
23565 before calling assembly_start debug hook.
23566 * run-rtl-passes.c (run_rtl_passes): Likewise.
23569 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23571 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23572 range_int_cst_p rather than !symbolic_range_p before calling
23573 extract_range_from_multiplicative_op_1.
23575 2018-01-04 Jeff Law <law@redhat.com>
23577 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23578 redundant test in assertion.
23580 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23582 * doc/rtl.texi: Document machine_mode wrapper classes.
23584 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23586 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23587 using tree_to_uhwi.
23589 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23591 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23592 the VEC_PERM_EXPR fold to fail.
23594 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23597 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23598 to switched_sections.
23600 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23603 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23604 test for d.testing.
23606 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23609 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23610 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23612 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23615 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23616 is BLKmode and bitpos not zero or mode change is needed.
23618 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23621 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23624 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23627 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23628 instead of MULT rtx. Update all corresponding splitters.
23629 (*saddl_se): Ditto.
23630 (*ssub<modesuffix>): Ditto.
23631 (*ssubl_se): Ditto.
23632 (*cmp_sadd_di): Update split patterns.
23633 (*cmp_sadd_si): Ditto.
23634 (*cmp_sadd_sidi): Ditto.
23635 (*cmp_ssub_di): Ditto.
23636 (*cmp_ssub_si): Ditto.
23637 (*cmp_ssub_sidi): Ditto.
23638 * config/alpha/predicates.md (const23_operand): New predicate.
23639 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23640 Look for ASHIFT, not MULT inner operand.
23641 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23643 2018-01-04 Martin Liska <mliska@suse.cz>
23645 PR gcov-profile/83669
23646 * gcov.c (output_intermediate_file): Add version to intermediate
23648 * doc/gcov.texi: Document new field 'version' in intermediate
23649 file format. Fix location of '-k' option of gcov command.
23651 2018-01-04 Martin Liska <mliska@suse.cz>
23654 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23656 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23658 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23660 2018-01-03 Martin Sebor <msebor@redhat.com>
23662 PR tree-optimization/83655
23663 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23664 checking calls with invalid arguments.
23666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23668 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23669 (vectorizable_mask_load_store): Delete.
23670 (vectorizable_call): Return false for masked loads and stores.
23671 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23672 instead of gimple_assign_rhs1.
23673 (vectorizable_load): Handle IFN_MASK_LOAD.
23674 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23678 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23680 (vectorizable_mask_load_store): ...here.
23681 (vectorizable_load): ...and here.
23683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23685 * tree-vect-stmts.c (vect_build_all_ones_mask)
23686 (vect_build_zero_merge_argument): New functions, split out from...
23687 (vectorizable_load): ...here.
23689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23691 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23693 (vectorizable_mask_load_store): ...here.
23694 (vectorizable_store): ...and here.
23696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23698 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23700 (vectorizable_mask_load_store): ...here.
23702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23704 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23705 (vect_model_store_cost): Take a vec_load_store_type instead of a
23707 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23708 (vect_model_store_cost): Take a vec_load_store_type instead of a
23710 (vectorizable_mask_load_store): Update accordingly.
23711 (vectorizable_store): Likewise.
23712 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23716 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23717 IFN_MASK_LOAD calls here rather than...
23718 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23721 Alan Hayward <alan.hayward@arm.com>
23722 David Sherwood <david.sherwood@arm.com>
23724 * expmed.c (extract_bit_field_1): For vector extracts,
23725 fall back to extract_bit_field_as_subreg if vec_extract
23728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23729 Alan Hayward <alan.hayward@arm.com>
23730 David Sherwood <david.sherwood@arm.com>
23732 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23733 they are variable or constant sized.
23734 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23735 slots for constant-sized data.
23737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23738 Alan Hayward <alan.hayward@arm.com>
23739 David Sherwood <david.sherwood@arm.com>
23741 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23742 handling COND_EXPRs with boolean comparisons, try to find a better
23743 basis for the mask type than the boolean itself.
23745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23747 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23748 is calculated and how it can be overridden.
23749 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23750 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23752 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23756 Alan Hayward <alan.hayward@arm.com>
23757 David Sherwood <david.sherwood@arm.com>
23759 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23760 Remove the mode argument.
23761 (aarch64_simd_valid_immediate): Remove the mode and inverse
23763 * config/aarch64/iterators.md (bitsize): New iterator.
23764 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23765 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23766 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23767 aarch64_simd_valid_immediate.
23768 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23769 (aarch64_reg_or_bic_imm): Likewise.
23770 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23771 with an insn_type enum and msl with a modifier_type enum.
23772 Replace element_width with a scalar_mode. Change the shift
23773 to unsigned int. Add constructors for scalar_float_mode and
23774 scalar_int_mode elements.
23775 (aarch64_vect_float_const_representable_p): Delete.
23776 (aarch64_can_const_movi_rtx_p)
23777 (aarch64_simd_scalar_immediate_valid_for_move)
23778 (aarch64_simd_make_constant): Update call to
23779 aarch64_simd_valid_immediate.
23780 (aarch64_advsimd_valid_immediate_hs): New function.
23781 (aarch64_advsimd_valid_immediate): Likewise.
23782 (aarch64_simd_valid_immediate): Remove mode and inverse
23783 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23784 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23785 and aarch64_float_const_representable_p on the result.
23786 (aarch64_output_simd_mov_immediate): Remove mode argument.
23787 Update call to aarch64_simd_valid_immediate and use of
23788 simd_immediate_info.
23789 (aarch64_output_scalar_simd_mov_immediate): Update call
23792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23793 Alan Hayward <alan.hayward@arm.com>
23794 David Sherwood <david.sherwood@arm.com>
23796 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23797 (mode_nunits): Likewise CONST_MODE_NUNITS.
23798 * machmode.def (ADJUST_NUNITS): Document.
23799 * genmodes.c (mode_data::need_nunits_adj): New field.
23800 (blank_mode): Update accordingly.
23801 (adj_nunits): New variable.
23802 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23804 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23805 listed in adj_nunits.
23806 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23807 listed in adj_nunits. Don't emit case statements for such modes.
23808 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23809 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23810 nothing if adj_nunits is nonnull.
23811 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23812 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23813 (emit_mode_fbit): Update use of print_maybe_const_decl.
23814 (emit_move_size): Likewise. Treat the array as non-const
23816 (emit_mode_adjustments): Handle adj_nunits.
23818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23820 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23821 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23822 (VECTOR_MODES): Use it.
23823 (make_vector_modes): Take the prefix as an argument.
23825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23826 Alan Hayward <alan.hayward@arm.com>
23827 David Sherwood <david.sherwood@arm.com>
23829 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23830 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23831 for MODE_VECTOR_BOOL.
23832 * machmode.def (VECTOR_BOOL_MODE): Document.
23833 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23834 (make_vector_bool_mode): New function.
23835 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23837 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23838 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23840 * stor-layout.c (int_mode_for_mode): Likewise.
23841 * tree.c (build_vector_type_for_mode): Likewise.
23842 * varasm.c (output_constant_pool_2): Likewise.
23843 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23844 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23845 for MODE_VECTOR_BOOL.
23846 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23847 of mode class checks.
23848 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23849 instead of a list of mode class checks.
23850 (expand_vector_scalar_condition): Likewise.
23851 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23854 Alan Hayward <alan.hayward@arm.com>
23855 David Sherwood <david.sherwood@arm.com>
23857 * machmode.h (mode_size): Change from unsigned short to
23859 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23860 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23861 or if measurement_type is not polynomial.
23862 (fixed_size_mode::includes_p): Check for constant-sized modes.
23863 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23864 return a poly_uint16 rather than an unsigned short.
23865 (emit_mode_size): Change the type of mode_size from unsigned short
23866 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23867 (emit_mode_adjustments): Cope with polynomial vector sizes.
23868 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23870 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23872 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23873 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23874 * caller-save.c (setup_save_areas): Likewise.
23875 (replace_reg_with_saved_mem): Likewise.
23876 * calls.c (emit_library_call_value_1): Likewise.
23877 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23878 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23879 (gen_lowpart_for_combine): Likewise.
23880 * convert.c (convert_to_integer_1): Likewise.
23881 * cse.c (equiv_constant, cse_insn): Likewise.
23882 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23883 (cselib_subst_to_values): Likewise.
23884 * dce.c (word_dce_process_block): Likewise.
23885 * df-problems.c (df_word_lr_mark_ref): Likewise.
23886 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23887 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23888 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23889 (rtl_for_decl_location): Likewise.
23890 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23891 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23892 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23893 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23894 (expand_expr_real_1): Likewise.
23895 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23896 (pad_below): Likewise.
23897 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23898 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23899 * ira.c (get_subreg_tracking_sizes): Likewise.
23900 * ira-build.c (ira_create_allocno_objects): Likewise.
23901 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23902 (ira_sort_regnos_for_alter_reg): Likewise.
23903 * ira-costs.c (record_operand_costs): Likewise.
23904 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23905 (resolve_simple_move): Likewise.
23906 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23907 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23908 (lra_constraints): Likewise.
23909 (CONST_POOL_OK_P): Reject variable-sized modes.
23910 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23911 (add_pseudo_to_slot, lra_spill): Likewise.
23912 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23913 * optabs-query.c (get_best_extraction_insn): Likewise.
23914 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23915 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23916 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23917 * recog.c (offsettable_address_addr_space_p): Likewise.
23918 * regcprop.c (maybe_mode_change): Likewise.
23919 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23920 * regrename.c (build_def_use): Likewise.
23921 * regstat.c (dump_reg_info): Likewise.
23922 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23923 (find_reloads, find_reloads_subreg_address): Likewise.
23924 * reload1.c (eliminate_regs_1): Likewise.
23925 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23926 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23927 (simplify_binary_operation_1, simplify_subreg): Likewise.
23928 * targhooks.c (default_function_arg_padding): Likewise.
23929 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23930 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23931 (verify_gimple_assign_ternary): Likewise.
23932 * tree-inline.c (estimate_move_cost): Likewise.
23933 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23934 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23935 (get_address_cost_ainc): Likewise.
23936 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23937 (vect_supportable_dr_alignment): Likewise.
23938 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23939 (vectorizable_reduction): Likewise.
23940 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23941 (vectorizable_operation, vectorizable_load): Likewise.
23942 * tree.c (build_same_sized_truth_vector_type): Likewise.
23943 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23944 * var-tracking.c (emit_note_insn_var_location): Likewise.
23945 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23946 (ADDR_VEC_ALIGN): Likewise.
23948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23949 Alan Hayward <alan.hayward@arm.com>
23950 David Sherwood <david.sherwood@arm.com>
23952 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23954 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23955 or if measurement_type is polynomial.
23956 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23957 * combine.c (make_extraction): Likewise.
23958 * dse.c (find_shift_sequence): Likewise.
23959 * dwarf2out.c (mem_loc_descriptor): Likewise.
23960 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23961 (extract_bit_field, extract_low_bits): Likewise.
23962 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23963 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23964 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23965 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23966 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23967 * reload.c (find_reloads): Likewise.
23968 * reload1.c (alter_reg): Likewise.
23969 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23970 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23971 * tree-if-conv.c (predicate_mem_writes): Likewise.
23972 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23973 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23974 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23975 * valtrack.c (dead_debug_insert_temp): Likewise.
23976 * varasm.c (mergeable_constant_section): Likewise.
23977 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23980 Alan Hayward <alan.hayward@arm.com>
23981 David Sherwood <david.sherwood@arm.com>
23983 * expr.c (expand_assignment): Cope with polynomial mode sizes
23984 when assigning to a CONCAT.
23986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23987 Alan Hayward <alan.hayward@arm.com>
23988 David Sherwood <david.sherwood@arm.com>
23990 * machmode.h (mode_precision): Change from unsigned short to
23992 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23994 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23995 or if measurement_type is not polynomial.
23996 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23997 in which the mode is already known to be a scalar_int_mode.
23998 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23999 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24001 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24002 for GET_MODE_PRECISION.
24003 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24004 for GET_MODE_PRECISION.
24005 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24007 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24008 (expand_field_assignment, make_extraction): Likewise.
24009 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24010 (get_last_value): Likewise.
24011 * convert.c (convert_to_integer_1): Likewise.
24012 * cse.c (cse_insn): Likewise.
24013 * expr.c (expand_expr_real_1): Likewise.
24014 * lra-constraints.c (simplify_operand_subreg): Likewise.
24015 * optabs-query.c (can_atomic_load_p): Likewise.
24016 * optabs.c (expand_atomic_load): Likewise.
24017 (expand_atomic_store): Likewise.
24018 * ree.c (combine_reaching_defs): Likewise.
24019 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24020 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24021 * tree.h (type_has_mode_precision_p): Likewise.
24022 * ubsan.c (instrument_si_overflow): Likewise.
24024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24025 Alan Hayward <alan.hayward@arm.com>
24026 David Sherwood <david.sherwood@arm.com>
24028 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24029 polynomial numbers of units.
24030 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24031 (valid_vector_subparts_p): New function.
24032 (build_vector_type): Remove temporary shim and take the number
24033 of units as a poly_uint64 rather than an int.
24034 (build_opaque_vector_type): Take the number of units as a
24035 poly_uint64 rather than an int.
24036 * tree.c (build_vector_from_ctor): Handle polynomial
24037 TYPE_VECTOR_SUBPARTS.
24038 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24039 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24040 (build_vector_from_val): If the number of units is variable,
24041 use build_vec_duplicate_cst for constant operands and
24042 VEC_DUPLICATE_EXPR otherwise.
24043 (make_vector_type): Remove temporary is_constant ().
24044 (build_vector_type, build_opaque_vector_type): Take the number of
24045 units as a poly_uint64 rather than an int.
24046 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24048 * cfgexpand.c (expand_debug_expr): Likewise.
24049 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24050 (store_constructor, expand_expr_real_1): Likewise.
24051 (const_scalar_mask_from_tree): Likewise.
24052 * fold-const-call.c (fold_const_reduction): Likewise.
24053 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24054 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24055 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24056 (fold_relational_const): Likewise.
24057 (native_interpret_vector): Likewise. Change the size from an
24058 int to an unsigned int.
24059 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24060 TYPE_VECTOR_SUBPARTS.
24061 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24062 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24063 duplicating a non-constant operand into a variable-length vector.
24064 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24065 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24066 * ipa-icf.c (sem_variable::equals): Likewise.
24067 * match.pd: Likewise.
24068 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24069 * print-tree.c (print_node): Likewise.
24070 * stor-layout.c (layout_type): Likewise.
24071 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24072 * tree-cfg.c (verify_gimple_comparison): Likewise.
24073 (verify_gimple_assign_binary): Likewise.
24074 (verify_gimple_assign_ternary): Likewise.
24075 (verify_gimple_assign_single): Likewise.
24076 * tree-pretty-print.c (dump_generic_node): Likewise.
24077 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24078 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24079 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24080 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24081 (vect_shift_permute_load_chain): Likewise.
24082 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24083 (expand_vector_condition, optimize_vector_constructor): Likewise.
24084 (lower_vec_perm, get_compute_type): Likewise.
24085 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24086 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24087 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24088 (vect_recog_mask_conversion_pattern): Likewise.
24089 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24090 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24091 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24092 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24093 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24094 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24095 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24096 (supportable_widening_operation): Likewise.
24097 (supportable_narrowing_operation): Likewise.
24098 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24100 * varasm.c (output_constant): Likewise.
24102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24103 Alan Hayward <alan.hayward@arm.com>
24104 David Sherwood <david.sherwood@arm.com>
24106 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24107 so that both the length == 3 and length != 3 cases set up their
24108 own permute vectors. Add comments explaining why we know the
24109 number of elements is constant.
24110 (vect_permute_load_chain): Likewise.
24112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24113 Alan Hayward <alan.hayward@arm.com>
24114 David Sherwood <david.sherwood@arm.com>
24116 * machmode.h (mode_nunits): Change from unsigned char to
24118 (ONLY_FIXED_SIZE_MODES): New macro.
24119 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24120 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24121 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24123 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24124 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24125 or if measurement_type is not polynomial.
24126 * genmodes.c (ZERO_COEFFS): New macro.
24127 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24129 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24130 Use ZERO_COEFFS when emitting initializers.
24131 * data-streamer.h (bp_pack_poly_value): New function.
24132 (bp_unpack_poly_value): Likewise.
24133 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24134 for GET_MODE_NUNITS.
24135 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24136 for GET_MODE_NUNITS.
24137 * tree.c (make_vector_type): Remove temporary shim and make
24138 the real function take the number of units as a poly_uint64
24139 rather than an int.
24140 (build_vector_type_for_mode): Handle polynomial nunits.
24141 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24142 * emit-rtl.c (const_vec_series_p_1): Likewise.
24143 (gen_rtx_CONST_VECTOR): Likewise.
24144 * fold-const.c (test_vec_duplicate_folding): Likewise.
24145 * genrecog.c (validate_pattern): Likewise.
24146 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24147 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24148 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24149 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24150 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24151 * rtlanal.c (subreg_get_info): Likewise.
24152 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24153 (vect_grouped_load_supported): Likewise.
24154 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24155 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24156 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24157 (simplify_const_unary_operation, simplify_binary_operation_1)
24158 (simplify_const_binary_operation, simplify_ternary_operation)
24159 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24160 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24161 instead of CONST_VECTOR_NUNITS.
24162 * varasm.c (output_constant_pool_2): Likewise.
24163 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24164 explicit-encoded elements in the XVEC for variable-length vectors.
24166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24168 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24171 Alan Hayward <alan.hayward@arm.com>
24172 David Sherwood <david.sherwood@arm.com>
24174 * coretypes.h (fixed_size_mode): Declare.
24175 (fixed_size_mode_pod): New typedef.
24176 * builtins.h (target_builtins::x_apply_args_mode)
24177 (target_builtins::x_apply_result_mode): Change type to
24178 fixed_size_mode_pod.
24179 * builtins.c (apply_args_size, apply_result_size, result_vector)
24180 (expand_builtin_apply_args_1, expand_builtin_apply)
24181 (expand_builtin_return): Update accordingly.
24183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24185 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24186 * cselib.c (cselib_hash_rtx): Likewise.
24187 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24188 CONST_VECTOR encoding.
24190 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24191 Jeff Law <law@redhat.com>
24194 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24195 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24196 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24197 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24200 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24201 explicitly probe *sp in a noreturn function if there were any callee
24202 register saves or frame pointer is needed.
24204 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24207 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24208 BLKmode for ternary, binary or unary expressions.
24211 * var-tracking.c (delete_vta_debug_insn): New inline function.
24212 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24213 insns from get_insns () to NULL instead of each bb separately.
24214 Use delete_vta_debug_insn. No longer static.
24215 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24216 delete_vta_debug_insns callers.
24217 * rtl.h (delete_vta_debug_insns): Declare.
24218 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24219 instead of variable_tracking_main.
24221 2018-01-03 Martin Sebor <msebor@redhat.com>
24223 PR tree-optimization/83603
24224 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24225 arguments past the endof the argument list in functions declared
24226 without a prototype.
24227 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24228 Avoid checking when arguments are null.
24230 2018-01-03 Martin Sebor <msebor@redhat.com>
24233 * doc/extend.texi (attribute const): Fix a typo.
24234 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24235 issuing -Wsuggest-attribute for void functions.
24237 2018-01-03 Martin Sebor <msebor@redhat.com>
24239 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24240 offset_int::from instead of wide_int::to_shwi.
24241 (maybe_diag_overlap): Remove assertion.
24242 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24243 * gimple-ssa-sprintf.c (format_directive): Same.
24244 (parse_directive): Same.
24245 (sprintf_dom_walker::compute_format_length): Same.
24246 (try_substitute_return_value): Same.
24248 2018-01-03 Jeff Law <law@redhat.com>
24250 PR middle-end/83654
24251 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24252 non-constant residual for zero at runtime and avoid probing in
24253 that case. Reorganize code for trailing problem to mirror handling
24256 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24258 PR tree-optimization/83501
24259 * tree-ssa-strlen.c (get_string_cst): New.
24260 (handle_char_store): Call get_string_cst.
24262 2018-01-03 Martin Liska <mliska@suse.cz>
24264 PR tree-optimization/83593
24265 * tree-ssa-strlen.c: Include tree-cfg.h.
24266 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24267 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24268 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24270 (strlen_dom_walker::before_dom_children): Call
24271 gimple_purge_dead_eh_edges. Dump tranformation with details
24273 (strlen_dom_walker::before_dom_children): Update call by adding
24274 new argument cleanup_eh.
24275 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24277 2018-01-03 Martin Liska <mliska@suse.cz>
24280 * cif-code.def (VARIADIC_THUNK): New enum value.
24281 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24284 2018-01-03 Jan Beulich <jbeulich@suse.com>
24286 * sse.md (mov<mode>_internal): Tighten condition for when to use
24287 vmovdqu<ssescalarsize> for TI and OI modes.
24289 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24291 Update copyright years.
24293 2018-01-03 Martin Liska <mliska@suse.cz>
24296 * ipa-visibility.c (function_and_variable_visibility): Skip
24297 functions with noipa attribure.
24299 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24301 * gcc.c (process_command): Update copyright notice dates.
24302 * gcov-dump.c (print_version): Ditto.
24303 * gcov.c (print_version): Ditto.
24304 * gcov-tool.c (print_version): Ditto.
24305 * gengtype.c (create_file): Ditto.
24306 * doc/cpp.texi: Bump @copying's copyright year.
24307 * doc/cppinternals.texi: Ditto.
24308 * doc/gcc.texi: Ditto.
24309 * doc/gccint.texi: Ditto.
24310 * doc/gcov.texi: Ditto.
24311 * doc/install.texi: Ditto.
24312 * doc/invoke.texi: Ditto.
24314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24316 * vector-builder.h (vector_builder::m_full_nelts): Change from
24317 unsigned int to poly_uint64.
24318 (vector_builder::full_nelts): Update prototype accordingly.
24319 (vector_builder::new_vector): Likewise.
24320 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24321 (vector_builder::operator ==): Likewise.
24322 (vector_builder::finalize): Likewise.
24323 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24324 Take the number of elements as a poly_uint64 rather than an
24326 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24327 from unsigned int to poly_uint64.
24328 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24329 (vec_perm_indices::new_vector): Likewise.
24330 (vec_perm_indices::length): Likewise.
24331 (vec_perm_indices::nelts_per_input): Likewise.
24332 (vec_perm_indices::input_nelts): Likewise.
24333 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24334 number of elements per input as a poly_uint64 rather than an
24335 unsigned int. Use the original encoding for variable-length
24336 vectors, rather than clamping each individual element.
24337 For the second and subsequent elements in each pattern,
24338 clamp the step and base before clamping their sum.
24339 (vec_perm_indices::series_p): Handle polynomial element counts.
24340 (vec_perm_indices::all_in_range_p): Likewise.
24341 (vec_perm_indices_to_tree): Likewise.
24342 (vec_perm_indices_to_rtx): Likewise.
24343 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24344 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24345 (tree_vector_builder::new_binary_operation): Handle polynomial
24346 element counts. Return false if we need to know the number
24347 of elements at compile time.
24348 * fold-const.c (fold_vec_perm): Punt if the number of elements
24349 isn't known at compile time.
24351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24353 * vec-perm-indices.h (vec_perm_builder): Change element type
24354 from HOST_WIDE_INT to poly_int64.
24355 (vec_perm_indices::element_type): Update accordingly.
24356 (vec_perm_indices::clamp): Handle polynomial element_types.
24357 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24358 (vec_perm_indices::all_in_range_p): Likewise.
24359 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24361 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24362 polynomial vec_perm_indices element types.
24363 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24364 * fold-const.c (fold_vec_perm): Likewise.
24365 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24366 * tree-vect-generic.c (lower_vec_perm): Likewise.
24367 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24368 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24369 element type to HOST_WIDE_INT.
24371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24372 Alan Hayward <alan.hayward@arm.com>
24373 David Sherwood <david.sherwood@arm.com>
24375 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24376 rather than an int. Use plus_constant.
24377 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24378 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24381 Alan Hayward <alan.hayward@arm.com>
24382 David Sherwood <david.sherwood@arm.com>
24384 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24385 a HOST_WIDE_INT to a poly_int64.
24387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24388 Alan Hayward <alan.hayward@arm.com>
24389 David Sherwood <david.sherwood@arm.com>
24391 * calls.c (load_register_parameters): Cope with polynomial
24392 mode sizes. Require a constant size for BLKmode parameters
24393 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24394 forces a parameter to be padded at the lsb end in order to
24395 fill a complete number of words, require the parameter size
24396 to be ordered wrt UNITS_PER_WORD.
24398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24399 Alan Hayward <alan.hayward@arm.com>
24400 David Sherwood <david.sherwood@arm.com>
24402 * reload1.c (spill_stack_slot_width): Change element type
24403 from unsigned int to poly_uint64_pod.
24404 (alter_reg): Treat mode sizes as polynomial.
24406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24407 Alan Hayward <alan.hayward@arm.com>
24408 David Sherwood <david.sherwood@arm.com>
24410 * reload.c (complex_word_subreg_p): New function.
24411 (reload_inner_reg_of_subreg, push_reload): Use it.
24413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24414 Alan Hayward <alan.hayward@arm.com>
24415 David Sherwood <david.sherwood@arm.com>
24417 * lra-constraints.c (process_alt_operands): Reject matched
24418 operands whose sizes aren't ordered.
24419 (match_reload): Refer to this check here.
24421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24422 Alan Hayward <alan.hayward@arm.com>
24423 David Sherwood <david.sherwood@arm.com>
24425 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24426 that the mode size is in the set {1, 2, 4, 8, 16}.
24428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24429 Alan Hayward <alan.hayward@arm.com>
24430 David Sherwood <david.sherwood@arm.com>
24432 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24433 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24440 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24441 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24442 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24443 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24444 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24445 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24446 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24447 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24448 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24450 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24451 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24452 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24453 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24454 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24455 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24456 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24457 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24458 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24459 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24461 * expr.c (emit_move_resolve_push): Treat the input and result
24462 of PUSH_ROUNDING as a poly_int64.
24463 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24464 (emit_push_insn): Likewise.
24465 * lra-eliminations.c (mark_not_eliminable): Likewise.
24466 * recog.c (push_operand): Likewise.
24467 * reload1.c (elimination_effects): Likewise.
24468 * rtlanal.c (nonzero_bits1): Likewise.
24469 * calls.c (store_one_arg): Likewise. Require the padding to be
24470 known at compile time.
24472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24473 Alan Hayward <alan.hayward@arm.com>
24474 David Sherwood <david.sherwood@arm.com>
24476 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24477 Use plus_constant instead of gen_rtx_PLUS.
24479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24480 Alan Hayward <alan.hayward@arm.com>
24481 David Sherwood <david.sherwood@arm.com>
24483 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24484 rather than an int.
24486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24487 Alan Hayward <alan.hayward@arm.com>
24488 David Sherwood <david.sherwood@arm.com>
24490 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24491 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24492 via stack temporaries. Treat the mode size as polynomial too.
24494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24495 Alan Hayward <alan.hayward@arm.com>
24496 David Sherwood <david.sherwood@arm.com>
24498 * expr.c (expand_expr_real_2): When handling conversions involving
24499 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24500 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24501 as a poly_uint64 too.
24503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24504 Alan Hayward <alan.hayward@arm.com>
24505 David Sherwood <david.sherwood@arm.com>
24507 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24510 Alan Hayward <alan.hayward@arm.com>
24511 David Sherwood <david.sherwood@arm.com>
24513 * combine.c (can_change_dest_mode): Handle polynomial
24514 REGMODE_NATURAL_SIZE.
24515 * expmed.c (store_bit_field_1): Likewise.
24516 * expr.c (store_constructor): Likewise.
24517 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24518 and polynomial REGMODE_NATURAL_SIZE.
24519 (gen_lowpart_common): Likewise.
24520 * reginfo.c (record_subregs_of_mode): Likewise.
24521 * rtlanal.c (read_modify_subreg_p): Likewise.
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 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24528 numbers of elements.
24530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24531 Alan Hayward <alan.hayward@arm.com>
24532 David Sherwood <david.sherwood@arm.com>
24534 * match.pd: Cope with polynomial numbers of vector elements.
24536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24537 Alan Hayward <alan.hayward@arm.com>
24538 David Sherwood <david.sherwood@arm.com>
24540 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24541 in a POINTER_PLUS_EXPR.
24543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24544 Alan Hayward <alan.hayward@arm.com>
24545 David Sherwood <david.sherwood@arm.com>
24547 * omp-simd-clone.c (simd_clone_subparts): New function.
24548 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24549 (ipa_simd_modify_function_body): Likewise.
24551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24552 Alan Hayward <alan.hayward@arm.com>
24553 David Sherwood <david.sherwood@arm.com>
24555 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24556 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24557 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24558 (expand_vector_condition, vector_element): Likewise.
24559 (subparts_gt): New function.
24560 (get_compute_type): Use subparts_gt.
24561 (count_type_subparts): Delete.
24562 (expand_vector_operations_1): Use subparts_gt instead of
24563 count_type_subparts.
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-data-refs.c (vect_no_alias_p): Replace with...
24570 (vect_compile_time_alias): ...this new function. Do the calculation
24571 on poly_ints rather than trees.
24572 (vect_prune_runtime_alias_test_list): Update call accordingly.
24574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24575 Alan Hayward <alan.hayward@arm.com>
24576 David Sherwood <david.sherwood@arm.com>
24578 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24580 (vect_schedule_slp_instance): Likewise.
24582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24583 Alan Hayward <alan.hayward@arm.com>
24584 David Sherwood <david.sherwood@arm.com>
24586 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24587 constant and extern definitions for variable-length vectors.
24588 (vect_get_constant_vectors): Note that the number of units
24589 is known to be constant.
24591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24592 Alan Hayward <alan.hayward@arm.com>
24593 David Sherwood <david.sherwood@arm.com>
24595 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24596 of units as polynomial. Choose between WIDE and NARROW based
24599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24600 Alan Hayward <alan.hayward@arm.com>
24601 David Sherwood <david.sherwood@arm.com>
24603 * tree-vect-stmts.c (simd_clone_subparts): New function.
24604 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24607 Alan Hayward <alan.hayward@arm.com>
24608 David Sherwood <david.sherwood@arm.com>
24610 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24611 vectors as polynomial. Use build_index_vector for
24612 IFN_GOMP_SIMD_LANE.
24614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24615 Alan Hayward <alan.hayward@arm.com>
24616 David Sherwood <david.sherwood@arm.com>
24618 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24619 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24620 for variable-length vectors.
24621 (vectorizable_mask_load_store): Treat the number of units as
24622 polynomial, asserting that it is constant if the condition has
24623 already been enforced.
24624 (vectorizable_store, vectorizable_load): Likewise.
24626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24627 Alan Hayward <alan.hayward@arm.com>
24628 David Sherwood <david.sherwood@arm.com>
24630 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24631 of units as polynomial. Punt if we can't tell at compile time
24632 which vector contains the final result.
24634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24635 Alan Hayward <alan.hayward@arm.com>
24636 David Sherwood <david.sherwood@arm.com>
24638 * tree-vect-loop.c (vectorizable_induction): Treat the number
24639 of units as polynomial. Punt on SLP inductions. Use an integer
24640 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24641 cast of such a series for variable-length floating-point
24644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24645 Alan Hayward <alan.hayward@arm.com>
24646 David Sherwood <david.sherwood@arm.com>
24648 * tree.h (build_index_vector): Declare.
24649 * tree.c (build_index_vector): New function.
24650 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24651 of units as polynomial, forcibly converting it to a constant if
24652 vectorizable_reduction has already enforced the condition.
24653 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24654 to create a {1,2,3,...} vector.
24655 (vectorizable_reduction): Treat the number of units as polynomial.
24656 Choose vectype_in based on the largest scalar element size rather
24657 than the smallest number of units. Enforce the restrictions
24660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24661 Alan Hayward <alan.hayward@arm.com>
24662 David Sherwood <david.sherwood@arm.com>
24664 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24665 number of units as polynomial.
24667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24668 Alan Hayward <alan.hayward@arm.com>
24669 David Sherwood <david.sherwood@arm.com>
24671 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24672 * target.def (autovectorize_vector_sizes): Return the vector sizes
24673 by pointer, using vector_sizes rather than a bitmask.
24674 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24675 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24676 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24678 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24679 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24680 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24681 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24682 * omp-general.c (omp_max_vf): Likewise.
24683 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24684 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24685 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24686 * tree-vect-slp.c (vect_slp_bb): Likewise.
24687 * doc/tm.texi: Regenerate.
24688 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24690 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24691 the vector size as a poly_uint64 rather than an unsigned int.
24692 (current_vector_size): Change from an unsigned int to a poly_uint64.
24693 (get_vectype_for_scalar_type): Update accordingly.
24694 * tree.h (build_truth_vector_type): Take the size and number of
24695 units as a poly_uint64 rather than an unsigned int.
24696 (build_vector_type): Add a temporary overload that takes
24697 the number of units as a poly_uint64 rather than an unsigned int.
24698 * tree.c (make_vector_type): Likewise.
24699 (build_truth_vector_type): Take the number of units as a poly_uint64
24700 rather than an unsigned int.
24702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24703 Alan Hayward <alan.hayward@arm.com>
24704 David Sherwood <david.sherwood@arm.com>
24706 * target.def (get_mask_mode): Take the number of units and length
24707 as poly_uint64s rather than unsigned ints.
24708 * targhooks.h (default_get_mask_mode): Update accordingly.
24709 * targhooks.c (default_get_mask_mode): Likewise.
24710 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24711 * doc/tm.texi: Regenerate.
24713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24714 Alan Hayward <alan.hayward@arm.com>
24715 David Sherwood <david.sherwood@arm.com>
24717 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24718 * omp-general.c (omp_max_vf): Likewise.
24719 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24720 (expand_omp_simd): Handle polynomial safelen.
24721 * omp-low.c (omplow_simd_context): Add a default constructor.
24722 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24723 (lower_rec_simd_input_clauses): Update accordingly.
24724 (lower_rec_input_clauses): Likewise.
24726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24727 Alan Hayward <alan.hayward@arm.com>
24728 David Sherwood <david.sherwood@arm.com>
24730 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24731 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24732 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24733 (vect_analyze_slp_cost): Likewise.
24734 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24735 (vect_model_load_cost): Likewise.
24737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24738 Alan Hayward <alan.hayward@arm.com>
24739 David Sherwood <david.sherwood@arm.com>
24741 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24742 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24743 from an unsigned int * to a poly_uint64_pod *.
24744 (calculate_unrolling_factor): New function.
24745 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24748 Alan Hayward <alan.hayward@arm.com>
24749 David Sherwood <david.sherwood@arm.com>
24751 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24752 from an unsigned int to a poly_uint64.
24753 (_loop_vec_info::slp_unrolling_factor): Likewise.
24754 (_loop_vec_info::vectorization_factor): Change from an int
24756 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24757 (vect_get_num_vectors): New function.
24758 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24759 (vect_get_num_copies): Use vect_get_num_vectors.
24760 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24761 to an unsigned int *.
24762 (vect_analyze_data_refs): Change min_vf from an int * to a
24764 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24765 than an unsigned HOST_WIDE_INT.
24766 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24767 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24768 to an unsigned int *.
24769 (vect_analyze_data_ref_dependences): Likewise.
24770 (vect_compute_data_ref_alignment): Handle polynomial vf.
24771 (vect_enhance_data_refs_alignment): Likewise.
24772 (vect_prune_runtime_alias_test_list): Likewise.
24773 (vect_shift_permute_load_chain): Likewise.
24774 (vect_supportable_dr_alignment): Likewise.
24775 (dependence_distance_ge_vf): Take the vectorization factor as a
24776 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24777 (vect_analyze_data_refs): Change min_vf from an int * to a
24779 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24780 vfm1 as a poly_uint64 rather than an int. Make the same change
24781 for the returned bound_scalar.
24782 (vect_gen_vector_loop_niters): Handle polynomial vf.
24783 (vect_do_peeling): Likewise. Update call to
24784 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24785 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24787 * tree-vect-loop.c (vect_determine_vectorization_factor)
24788 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24789 (vect_get_known_peeling_cost): Likewise.
24790 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24791 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24792 (vect_transform_loop): Likewise. Use the lowest possible VF when
24793 updating the upper bounds of the loop.
24794 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24795 rather than an int.
24796 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24797 polynomial unroll factors.
24798 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24799 (vect_make_slp_decision): Likewise.
24800 (vect_supported_load_permutation_p): Likewise, and polynomial
24802 (vect_analyze_slp_cost): Handle polynomial vf.
24803 (vect_slp_analyze_node_operations): Likewise.
24804 (vect_slp_analyze_bb_1): Likewise.
24805 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24806 than an unsigned HOST_WIDE_INT.
24807 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24808 (vectorizable_load): Handle polynomial vf.
24809 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24811 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24814 Alan Hayward <alan.hayward@arm.com>
24815 David Sherwood <david.sherwood@arm.com>
24817 * match.pd: Handle bit operations involving three constants
24818 and try to fold one pair.
24820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24822 * tree-vect-loop-manip.c: Include gimple-fold.h.
24823 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24824 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24825 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24826 Add a path that uses a step of VF instead of 1, but disable it
24828 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24829 and niters_no_overflow parameters. Update calls to
24830 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24831 Create a new SSA name if the latter choses to use a ste other
24832 than zero, and return it via niters_vector_mult_vf_var.
24833 * tree-vect-loop.c (vect_transform_loop): Update calls to
24834 vect_do_peeling, vect_gen_vector_loop_niters and
24835 slpeel_make_loop_iterate_ntimes.
24836 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24837 (vect_gen_vector_loop_niters): Update declarations after above changes.
24839 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24841 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24842 128-bit round to integer instructions.
24843 (ceil<mode>2): Likewise.
24844 (btrunc<mode>2): Likewise.
24845 (round<mode>2): Likewise.
24847 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24849 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24850 unaligned VSX load/store on P8/P9.
24851 (expand_block_clear): Allow the use of unaligned VSX
24852 load/store on P8/P9.
24854 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24856 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24858 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24859 swap associated with both a load and a store.
24861 2018-01-02 Andrew Waterman <andrew@sifive.com>
24863 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24864 * config/riscv/riscv.md (clear_cache): Use it.
24866 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24868 * web.c: Remove out-of-date comment.
24870 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24872 * expr.c (fixup_args_size_notes): Check that any existing
24873 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24874 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24875 (emit_single_push_insn): ...here.
24877 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24879 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24880 (const_vector_encoded_nelts): New function.
24881 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24882 (const_vector_int_elt, const_vector_elt): Declare.
24883 * emit-rtl.c (const_vector_int_elt_1): New function.
24884 (const_vector_elt): Likewise.
24885 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24886 of CONST_VECTOR_ELT.
24888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24890 * expr.c: Include rtx-vector-builder.h.
24891 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24892 directly on the tree encoding.
24893 (const_vector_from_tree): Likewise.
24894 * optabs.c: Include rtx-vector-builder.h.
24895 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24896 sequence of "u" values.
24897 * vec-perm-indices.c: Include rtx-vector-builder.h.
24898 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24899 directly on the vec_perm_indices encoding.
24901 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24903 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24904 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24905 * rtx-vector-builder.h: New file.
24906 * rtx-vector-builder.c: Likewise.
24907 * rtl.h (rtx_def::u2): Add a const_vector field.
24908 (CONST_VECTOR_NPATTERNS): New macro.
24909 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24910 (CONST_VECTOR_DUPLICATE_P): Likewise.
24911 (CONST_VECTOR_STEPPED_P): Likewise.
24912 (CONST_VECTOR_ENCODED_ELT): Likewise.
24913 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24914 (unwrap_const_vec_duplicate): Likewise.
24915 (const_vec_series_p): Check for a non-duplicated vector encoding.
24916 Say that the function only returns true for integer vectors.
24917 * emit-rtl.c: Include rtx-vector-builder.h.
24918 (gen_const_vec_duplicate_1): Delete.
24919 (gen_const_vector): Call gen_const_vec_duplicate instead of
24920 gen_const_vec_duplicate_1.
24921 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24922 (gen_const_vec_duplicate): Use rtx_vector_builder.
24923 (gen_const_vec_series): Likewise.
24924 (gen_rtx_CONST_VECTOR): Likewise.
24925 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24926 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24927 Build a new vector rather than modifying a CONST_VECTOR in-place.
24928 (handle_special_swappables): Update call accordingly.
24929 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24930 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24931 Build a new vector rather than modifying a CONST_VECTOR in-place.
24932 (handle_special_swappables): Update call accordingly.
24934 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24936 * simplify-rtx.c (simplify_const_binary_operation): Use
24937 CONST_VECTOR_ELT instead of XVECEXP.
24939 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24941 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24942 the selector elements to be different from the data elements
24943 if the selector is a VECTOR_CST.
24944 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24945 ssizetype for the selector.
24947 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24949 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24950 before testing each element individually.
24951 * tree-vect-generic.c (lower_vec_perm): Likewise.
24953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24955 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24956 * selftest-run-tests.c (selftest::run_tests): Call it.
24957 * vector-builder.h (vector_builder::operator ==): New function.
24958 (vector_builder::operator !=): Likewise.
24959 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24960 (vec_perm_indices::all_from_input_p): New function.
24961 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24962 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24963 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24964 instead of reading the VECTOR_CST directly. Detect whether both
24965 vector inputs are the same before constructing the vec_perm_indices,
24966 and update the number of inputs argument accordingly. Use the
24967 utility functions added above. Only construct sel2 if we need to.
24969 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24971 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24972 the broadcast of the low byte.
24973 (expand_mult_highpart): Use an explicit encoding for the permutes.
24974 * optabs-query.c (can_mult_highpart_p): Likewise.
24975 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24976 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24977 (vectorizable_bswap): Likewise.
24978 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24979 explicit encoding for the power-of-2 permutes.
24980 (vect_permute_store_chain): Likewise.
24981 (vect_grouped_load_supported): Likewise.
24982 (vect_permute_load_chain): Likewise.
24984 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24986 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24987 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24988 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24989 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24990 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24991 (vect_gen_perm_mask_any): Likewise.
24993 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24995 * int-vector-builder.h: New file.
24996 * vec-perm-indices.h: Include int-vector-builder.h.
24997 (vec_perm_indices): Redefine as an int_vector_builder.
24998 (auto_vec_perm_indices): Delete.
24999 (vec_perm_builder): Redefine as a stand-alone class.
25000 (vec_perm_indices::vec_perm_indices): New function.
25001 (vec_perm_indices::clamp): Likewise.
25002 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25003 (vec_perm_indices::new_vector): New function.
25004 (vec_perm_indices::new_expanded_vector): Update for new
25005 vec_perm_indices class.
25006 (vec_perm_indices::rotate_inputs): New function.
25007 (vec_perm_indices::all_in_range_p): Operate directly on the
25008 encoded form, without computing elided elements.
25009 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25010 encoding. Update for new vec_perm_indices class.
25011 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25012 the given vec_perm_builder.
25013 (expand_vec_perm_var): Update vec_perm_builder constructor.
25014 (expand_mult_highpart): Use vec_perm_builder instead of
25015 auto_vec_perm_indices.
25016 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25017 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25018 or double series encoding as appropriate.
25019 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25020 vec_perm_indices instead of auto_vec_perm_indices.
25021 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25022 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25023 (vect_permute_store_chain): Likewise.
25024 (vect_grouped_load_supported): Likewise.
25025 (vect_permute_load_chain): Likewise.
25026 (vect_shift_permute_load_chain): Likewise.
25027 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25028 (vect_transform_slp_perm_load): Likewise.
25029 (vect_schedule_slp_instance): Likewise.
25030 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25031 (vectorizable_mask_load_store): Likewise.
25032 (vectorizable_bswap): Likewise.
25033 (vectorizable_store): Likewise.
25034 (vectorizable_load): Likewise.
25035 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25036 vec_perm_indices instead of auto_vec_perm_indices. Use
25037 tree_to_vec_perm_builder to read the vector from a tree.
25038 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25039 vec_perm_builder instead of a vec_perm_indices.
25040 (have_whole_vector_shift): Use vec_perm_builder and
25041 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25042 truncation to calc_vec_perm_mask_for_shift.
25043 (vect_create_epilog_for_reduction): Likewise.
25044 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25045 from auto_vec_perm_indices to vec_perm_indices.
25046 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25047 instead of changing individual elements.
25048 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25049 the vector in d.perm.
25050 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25051 from auto_vec_perm_indices to vec_perm_indices.
25052 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25053 instead of changing individual elements.
25054 (arm_vectorize_vec_perm_const): Use new_vector to install
25055 the vector in d.perm.
25056 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25057 Update vec_perm_builder constructor.
25058 (rs6000_expand_interleave): Likewise.
25059 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25060 (rs6000_expand_interleave): Likewise.
25062 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25064 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25065 to qimode could truncate the indices.
25066 * optabs.c (expand_vec_perm_var): Likewise.
25068 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25070 * Makefile.in (OBJS): Add vec-perm-indices.o.
25071 * vec-perm-indices.h: New file.
25072 * vec-perm-indices.c: Likewise.
25073 * target.h (vec_perm_indices): Replace with a forward class
25075 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25076 * optabs.h: Include vec-perm-indices.h.
25077 (expand_vec_perm): Delete.
25078 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25079 (expand_vec_perm_const): Declare.
25080 * target.def (vec_perm_const_ok): Replace with...
25081 (vec_perm_const): ...this new hook.
25082 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25083 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25084 * doc/tm.texi: Regenerate.
25085 * optabs.def (vec_perm_const): Delete.
25086 * doc/md.texi (vec_perm_const): Likewise.
25087 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25088 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25089 expand_vec_perm for constant permutation vectors. Assert that
25090 the mode of variable permutation vectors is the integer equivalent
25091 of the mode that is being permuted.
25092 * optabs-query.h (selector_fits_mode_p): Declare.
25093 * optabs-query.c: Include vec-perm-indices.h.
25094 (selector_fits_mode_p): New function.
25095 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25096 is defined, instead of checking whether the vec_perm_const_optab
25097 exists. Use targetm.vectorize.vec_perm_const instead of
25098 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25099 fit in the vector mode before using a variable permute.
25100 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25101 vec_perm_indices instead of an rtx.
25102 (expand_vec_perm): Replace with...
25103 (expand_vec_perm_const): ...this new function. Take the selector
25104 as a vec_perm_indices rather than an rtx. Also take the mode of
25105 the selector. Update call to shift_amt_for_vec_perm_mask.
25106 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25107 Use vec_perm_indices::new_expanded_vector to expand the original
25108 selector into bytes. Check whether the indices fit in the vector
25109 mode before using a variable permute.
25110 (expand_vec_perm_var): Make global.
25111 (expand_mult_highpart): Use expand_vec_perm_const.
25112 * fold-const.c: Includes vec-perm-indices.h.
25113 * tree-ssa-forwprop.c: Likewise.
25114 * tree-vect-data-refs.c: Likewise.
25115 * tree-vect-generic.c: Likewise.
25116 * tree-vect-loop.c: Likewise.
25117 * tree-vect-slp.c: Likewise.
25118 * tree-vect-stmts.c: Likewise.
25119 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25121 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25122 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25123 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25124 (aarch64_vectorize_vec_perm_const): ...this new function.
25125 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25126 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25127 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25128 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25129 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25130 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25131 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25133 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25134 check for NEON modes.
25135 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25136 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25137 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25138 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25140 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25141 the old VEC_PERM_CONST conditions.
25142 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25143 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25144 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25145 (ia64_vectorize_vec_perm_const_ok): Merge into...
25146 (ia64_vectorize_vec_perm_const): ...this new function.
25147 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25148 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25149 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25150 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25151 * config/mips/mips.c (mips_expand_vec_perm_const)
25152 (mips_vectorize_vec_perm_const_ok): Merge into...
25153 (mips_vectorize_vec_perm_const): ...this new function.
25154 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25155 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25156 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25157 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25158 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25159 (rs6000_expand_vec_perm_const): Delete.
25160 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25162 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25163 (altivec_expand_vec_perm_const_le): Take each operand individually.
25164 Operate on constant selectors rather than rtxes.
25165 (altivec_expand_vec_perm_const): Likewise. Update call to
25166 altivec_expand_vec_perm_const_le.
25167 (rs6000_expand_vec_perm_const): Delete.
25168 (rs6000_vectorize_vec_perm_const_ok): Delete.
25169 (rs6000_vectorize_vec_perm_const): New function.
25170 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25171 an element count and rtx array.
25172 (rs6000_expand_extract_even): Update call accordingly.
25173 (rs6000_expand_interleave): Likewise.
25174 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25175 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25176 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25177 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25178 (rs6000_expand_vec_perm_const): Delete.
25179 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25180 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25181 (altivec_expand_vec_perm_const_le): Take each operand individually.
25182 Operate on constant selectors rather than rtxes.
25183 (altivec_expand_vec_perm_const): Likewise. Update call to
25184 altivec_expand_vec_perm_const_le.
25185 (rs6000_expand_vec_perm_const): Delete.
25186 (rs6000_vectorize_vec_perm_const_ok): Delete.
25187 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25188 reference to the SPE evmerge intructions.
25189 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25190 an element count and rtx array.
25191 (rs6000_expand_extract_even): Update call accordingly.
25192 (rs6000_expand_interleave): Likewise.
25193 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25194 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25196 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25198 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25200 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25201 vector mode and that that mode matches the mode of the data
25203 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25204 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25205 directly using expand_vec_perm_1 when forcing selectors into
25207 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25209 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25211 * optabs-query.h (can_vec_perm_p): Delete.
25212 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25213 * optabs-query.c (can_vec_perm_p): Split into...
25214 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25215 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25216 particular selector is valid.
25217 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25218 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25219 (vect_grouped_load_supported): Likewise.
25220 (vect_shift_permute_load_chain): Likewise.
25221 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25222 (vect_transform_slp_perm_load): Likewise.
25223 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25224 (vectorizable_bswap): Likewise.
25225 (vect_gen_perm_mask_checked): Likewise.
25226 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25227 implementations of variable permutation vectors into account
25228 when deciding which selector to use.
25229 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25230 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25231 with a false third argument.
25232 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25233 to test whether the constant selector is valid and can_vec_perm_var_p
25234 to test whether a variable selector is valid.
25236 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25238 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25239 * optabs-query.c (can_vec_perm_p): Likewise.
25240 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25241 instead of vec_perm_indices.
25242 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25243 (vect_gen_perm_mask_checked): Likewise,
25244 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25245 (vect_gen_perm_mask_checked): Likewise,
25247 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25249 * optabs-query.h (qimode_for_vec_perm): Declare.
25250 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25251 (qimode_for_vec_perm): ...this new function.
25252 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25254 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25256 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25257 does not have a conditional at the top.
25259 2018-01-02 Richard Biener <rguenther@suse.de>
25261 * ipa-inline.c (big_speedup_p): Fix expression.
25263 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25266 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25269 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25273 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25274 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25275 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25276 cond_taken_branch_cost 3->4.
25278 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25280 PR tree-optimization/83581
25281 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25282 TODO_cleanup_cfg if any changes have been made.
25284 PR middle-end/83608
25285 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25286 convert_modes if target mode has the right side, but different mode
25289 PR middle-end/83609
25290 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25291 last argument when extracting from CONCAT. If either from_real or
25292 from_imag is NULL, use expansion through memory. If result is not
25293 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25294 the parts directly to inner mode, if even that fails, use expansion
25297 PR middle-end/83623
25298 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25299 check for bswap in mode rather than HImode and use that in expand_unop
25302 Copyright (C) 2018 Free Software Foundation, Inc.
25304 Copying and distribution of this file, with or without modification,
25305 are permitted in any medium without royalty provided the copyright
25306 notice and this notice are preserved.