]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
PR target/85666
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2
3 PR target/85666
4 * config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't
5 call leaf_function_p, instead use has_hard_reg_initial_val.
6
7 2018-09-09 Nathan Sidwell <nathan@acm.org>
8
9 * gcc.h (pfatal_with_name): Don't declare here.
10 * gcc.c (pfatal_with_name): Make static.
11
12 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
13
14 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
15 earlyclobber.
16
17 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
18
19 PR rtl-optimization/85458
20 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
21 priority hook to reduce the priority of EXPR.
22
23 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
24
25 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
26 DImode for x87 on 32bit targets. Conditionally disable x87 modes
27 with X87_ENABLE_FLOAT. Remove preparation code.
28 (*float<SWI48:mode><MODEF:mode>2): Rename from
29 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
30 math using "enabled" attribute.
31 (*floatdi<MODEF:mode>2_i387): Rename from
32 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
33 enable for 32bit targets only.
34 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
35 splitter.
36 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
37 as operand 1 predicate. Rewrite as define_insn_and_split.
38 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
39
40 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
41
42 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
43 to fallthru to FLOAT case.
44
45 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
46
47 PR target/86731
48 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
49 around folding of vec_sl to handle out of range shift values.
50
51 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
52
53 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
54 Update callers to gen_fix_trunc<mode>_i387_fisttp
55 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
56 nonimmediate_operand.
57 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
58 and corresponding splitters.
59 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
60 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
61 (fix_truncdi_i387_with_temp): Remove insn pattern
62 and corresponding splitters.
63 (fix_trunc<mode>_i387): Change operand 0 predicate to
64 nonimmediate_operand.
65 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
66 and corresponding splitters.
67 (*fistdi2_1): Remove.
68 (fistdi2): Ditto.
69 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
70 (lrintxfdi2): Remove expander. Reimplement as define_insn.
71 (*fist<mode>2_1): Remove.
72 (fist<mode>2): Ditto.
73 (fist<mode>2_with_temp): Remove insn pattern and corresponding
74 splitters.
75 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
76 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
77 (fistdi2_<rounding>): Change operand 0 predicate to
78 nonimmediate_operand.
79 (fistdi2_<rounding>_with_temp): Remove insn pattern
80 and corresponding splitters.
81 (fist<mode>2_<rounding>): Change operand 0 predicate to
82 nonimmediate_operand.
83 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
84 and corresponding splitters.
85
86 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
87
88 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
89
90 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
91 the init value.
92
93 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
94
95 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
96 early gimple folding of vec_splat().
97 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
98 * gimple-fold.h: Add an extern define for tree_vec_extract().
99
100 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
101
102 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
103 wrappers around TREE_TYPE comparisons.
104
105 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
106
107 PR target/80080
108 * config/s390/predicates.md: Add nonsym_memory_operand.
109 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
110 contains a SYMBOL_REF, load it into an intermediate pseudo.
111 (s390_emit_compare_and_swap): Legitimize operand.
112 * config/s390/s390.md: Use the new nonsym_memory_operand
113 with UNSPECV_CAS patterns.
114
115 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
116
117 PR target/80080
118 * config/s390/s390-passes.def: New file.
119 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
120 declaration.
121 (make_pass_s390_early_mach): Add declaration.
122 * config/s390/s390.c (make_pass_s390_early_mach):
123 (s390_option_override): Remove dynamic registration.
124 * config/s390/t-s390: Add s390-passes.def.
125
126 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
127
128 * config/s390/s390.c (s390_decompose_constant_pool_ref):
129 Remove UNSPEC_LTREL_BASE check.
130 (annotate_constant_pool_refs): Likewise.
131 (find_constant_pool_ref): Likewise.
132 (find_ltrel_base): Removed.
133 (replace_ltrel_base): Removed.
134 (s390_mainpool_finish): Remove replace_ltrel_base call.
135 (s390_chunkify_start): Remove pending LTREL_BASE logic.
136 (s390_chunkify_finish): Remove replace_ltrel_base call.
137 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
138
139 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
140
141 PR target/86779
142 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
143 to speculation_safe_value_not_needed.
144
145 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
146 Bernd Schmidt <bernds_cb1@t-online.de>
147
148 * config/nvptx/nvptx-opts.h: New file.
149 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
150 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
151 (ASM_SPEC): Define.
152 (TARGET_SM35): New macro.
153 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
154 correct predicate.
155 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
156 values.
157 (misa=): New option.
158 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
159
160 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
161
162 * config/i386/i386.md (truncdfsf2): Remove expander.
163 (truncdfsf2_with_temp): Ditto.
164 (truncxf<mode>2): Ditto.
165 (*truncdfsf_fast_mixed): Remove insn pattern.
166 (*truncdfsf_fast_i387): Ditto.
167 (*truncdfsf_mixed): Ditto.
168 (*truncdfsf_i387): Ditto.
169 (*truncdfsf2_i387_1): Ditto.
170 (*truncxfsf2_mixed): Ditto.
171 (*truncxfdf2_mixed): Ditto.
172 (*truncxf<mode>2_i387_noop): Ditto. Update callers
173 to call gen_truncxf<mode>2 instead.
174 (*truncxf<mode>2_i387): Remove.
175 (reg->reg splitters): Remove splitter pattern.
176 (reg->mem splitters): Ditto.
177
178 (truncdfsf2): New insn pattern.
179 (truncxf<mode>2): Ditto.
180
181 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
182
183 * tree-ssa-math-opts.c (is_mult_by): New function.
184 (is_square_of): Use the above.
185 (optimize_recip_sqrt): New function.
186 (pass_cse_reciprocals::execute): Use the above.
187
188 2018-09-05 Richard Biener <rguenther@suse.de>
189
190 PR bootstrap/87134
191 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
192 to zero-init the emplaced vec.
193
194 2018-09-05 Martin Liska <mliska@suse.cz>
195
196 PR tree-optimization/87205
197 * tree-switch-conversion.c (pass_lower_switch::execute):
198 Group cases for switch statements.
199
200 2018-09-05 Richard Biener <rguenther@suse.de>
201
202 PR tree-optimization/87217
203 * tree-ssa-sccvn.c (vuse_valueize): New.
204 (vn_reference_lookup_pieces): Use it.
205 (vn_reference_lookup): Likewise.
206
207 2018-09-05 Nathan Sidwell <nathan@acm.org>
208
209 PR c++/87137
210 * stor-layout.c (place_field): Scan forwards to check last
211 bitfield when ms_bitfield_placement is in effect.
212
213 2018-09-05 Richard Biener <rguenther@suse.de>
214
215 PR bootstrap/87225
216 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
217 return.
218
219 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
220 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
221
222 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
223 * config.gcc (extra_objs): Build it.
224 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
225 Likewise.
226 * config/aarch64/aarch64-passes.def
227 (pass_tag_collision_avoidance): New pass.
228 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
229 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
230 (aarch64_classify_address): Remove static qualifier.
231 (aarch64_address_info, aarch64_address_type): Move to...
232 * config/aarch64/aarch64-protos.h: ... here.
233 (make_pass_tag_collision_avoidance): New function.
234 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
235 New tuning flag.
236
237 2018-09-05 Martin Liska <mliska@suse.cz>
238
239 * doc/gcov.texi: Update documentation of humar
240 readable mode.
241 * gcov.c (format_count): Print one decimal place, it provides
242 more fine number of situations like '1G' vs. '1.4G'.
243
244 2018-09-05 Martin Liska <mliska@suse.cz>
245
246 PR target/87164
247 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
248 * optc-gen.awk: Allow 'Var' for Deprecated options in order
249 to generate a MASK value.
250
251 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
252
253 PR debug/86593
254 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
255 if frame pointer isn't used.
256 (compute_frame_pointer_to_fb_displacement): Likewise.
257
258 2018-09-04 Jakub Jelinek <jakub@redhat.com>
259
260 PR target/87198
261 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
262 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
263 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
264 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
265 and OPTION_MASK_ISA_XSAVEC_UNSET.
266
267 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
268
269 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
270 XOR operations in NAND case.
271
272 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
273
274 * wide-int-range.cc (wide_int_range_convert): New.
275 * wide-int-range.h (wide_int_range_convert): New.
276 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
277 code into wide_int_range_convert.
278 (extract_range_into_wide_ints): Do not munge anti range constants
279 into the entire domain. Just return the range back.
280
281 2018-09-04 Martin Liska <mliska@suse.cz>
282
283 * genmatch.c (output_line_directive): Add new argument
284 fnargs.
285 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
286
287 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
288
289 * doc/invoke.texi (Option Summary): Add whitespace.
290
291 * doc/invoke.texi (Option Summary): Add -Waligned-new.
292
293 2018-09-04 Richard Biener <rguenther@suse.de>
294
295 PR tree-optimization/87211
296 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
297 backedge value we're supposed to treat as VARYING also number
298 the PHI to VARYING in case it got a different value-number already.
299
300 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
301
302 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
303 (extract_range_from_binary_expr_1): Do not call
304 vrp_can_optimize_bit_op.
305 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
306 static.
307 (wide_int_range_get_mask_and_bounds): New.
308 (wide_int_range_optimize_bit_op): New.
309 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
310 (wide_int_range_bit_and): Same.
311 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
312 (wide_int_range_optimize_bit_op): New.
313 (wide_int_range_get_mask_and_bounds): New.
314
315 2018-09-04 Richard Biener <rguenther@suse.de>
316
317 PR tree-optimization/87176
318 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
319 variable. When value-numbering a virtual PHI node make sure
320 to not value-number to the backedge value.
321
322 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
323
324 * doc/extend.texi (Long Long, Hex Floats): Document support for
325 long long and hex floats in more recent versions of ISO C++.
326
327 2018-09-03 Richard Biener <rguenther@suse.de>
328
329 PR tree-optimization/87177
330 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
331 cleanup.
332
333 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
334
335 * bb-reorder.c (edge_order): Convert to C-qsort-style
336 tri-state comparator.
337 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
338
339 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
340
341 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
342 tri-state comparator.
343 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
344
345 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
346
347 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
348 (mergesort): ... here as maximum count for using netsort.
349 (gcc_qsort): Set nlim to 3 if stable sort is requested.
350 (gcc_stablesort): New.
351 * system.h (gcc_stablesort): Declare.
352
353 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
354
355 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
356 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
357 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
358
359 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
360
361 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
362 lxsdx and stxsdx alternatives.
363 (*mov<mode>_hardfloat64): Ditto.
364 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
365
366 2018-09-03 Richard Biener <rguenther@suse.de>
367
368 PR tree-optimization/87200
369 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
370 simplify result.
371
372 2018-09-03 Martin Liska <mliska@suse.cz>
373
374 PR tree-optimization/87201
375 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
376 Fix parenthesis in an expression.
377
378 2018-09-03 Richard Biener <rguenther@suse.de>
379
380 PR tree-optimization/87197
381 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
382 visited. CSE the VN_INFO hashtable lookup.
383
384 PR tree-optimization/87169
385 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
386 iterating make sure there's no extra backedges from irreducible
387 regions feeding the header. Mark the destination block
388 executable.
389
390 2018-09-03 Martin Liska <mliska@suse.cz>
391
392 PR driver/83193
393 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
394 * common/common-targhooks.c (default_get_valid_option_values):
395 New function.
396 * common/common-targhooks.h (default_get_valid_option_values):
397 Likewise.
398 * common/config/i386/i386-common.c: Move processor_target_table
399 from i386.c.
400 (ix86_get_valid_option_values): New function.
401 (TARGET_GET_VALID_OPTION_VALUES): New macro.
402 * config/i386/i386.c (struct ptt): Move to i386-common.c.
403 (PTA_*): Move all defined masks into i386-common.c.
404 (ix86_function_specific_restore): Use new processor_cost_table.
405 * config/i386/i386.h (struct ptt): Moved from i386.c.
406 (struct pta): Likewise.
407 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
408 * doc/tm.texi.in: Likewise.
409 * opt-suggestions.c (option_proposer::suggest_option):
410 Pass prefix to build_option_suggestions.
411 (option_proposer::get_completions): Likewise.
412 (option_proposer::build_option_suggestions): Use the new target
413 hook.
414 * opts.c (struct option_help_tuple): New struct.
415 (print_filtered_help): Use the new target hook.
416
417 2018-09-03 Martin Liska <mliska@suse.cz>
418
419 PR middle-end/59521
420 * predict.c (set_even_probabilities): Add likely_edges
421 argument and handle cases where we have precisely one
422 likely edge.
423 (combine_predictions_for_bb): Catch also likely_edges.
424 (tree_predict_by_opcode): Handle gswitch statements.
425 * tree-cfg.h (find_case_label_for_value): New declaration.
426 (find_taken_edge_switch_expr): Likewise.
427 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
428 Find pivot in decision tree based on probabily, not by number of
429 nodes.
430
431 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
432
433 * doc/standards.texi (Standards): Update Objective-C reference.
434
435 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
436
437 * doc/install.texi (Prerequisites): Update link for MPC.
438
439 2018-09-01 Michael Matz <matz@suse.de>
440
441 PR tree-optimization/87074
442 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
443 PHIs for outer-loop uses.
444
445 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
446
447 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
448 * doc/invoke.texi (C Dialect Options): Ditto.
449
450 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
451
452 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
453
454 2018-08-31 Richard Biener <rguenther@suse.de>
455
456 PR tree-optimization/87168
457 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
458 (rpo_elim::eliminate_avail): When OP was not visited it must
459 be available.
460
461 2018-08-31 David Malcolm <dmalcolm@redhat.com>
462
463 * tree-vrp.c (copy_value_range): Convert param "from" from
464 "value_range *" to "const value_range *".
465 (range_is_null): Likewise for param "vr".
466 (range_int_cst_p): Likewise.
467 (range_int_cst_singleton_p): Likewise.
468 (symbolic_range_p): Likewise.
469 (value_ranges_intersect_p): Likewise for both params.
470 (value_range_nonnegative_p): Likewise for param "vr".
471 (value_range_constant_singleton): Likewise.
472 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
473 (extract_range_into_wide_ints): Likewise for param "vr".
474 (extract_range_from_multiplicative_op): Likewise for params "vr0"
475 and "vr1".
476 (vrp_can_optimize_bit_op): Likewise.
477 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
478 "vr1_".
479 (extract_range_from_unary_expr): Likewise.
480 (debug_value_range): Likewise for param "vr".
481 (value_range::dump): Add "const" qualifier.
482 (vrp_prop::check_array_ref): Convert local "vr" from
483 "value_range *" to "const value_range *".
484 (vrp_prop::check_mem_ref): Likewise.
485 (vrp_prop::visit_stmt): Likewise for local "old_vr".
486 (vrp_intersect_ranges_1): Likewise for param "vr_1".
487 (vrp_intersect_ranges): Likewise.
488 (simplify_stmt_for_jump_threading): Likewise for local "vr".
489 (vrp_prop::vrp_finalize): Likewise.
490 * tree-vrp.h (value_range::dump): Add "const" qualifier.
491 (vrp_intersect_ranges): Add "const" qualifier to params as above.
492 (extract_range_from_unary_expr): Likewise.
493 (value_range_constant_singleton): Likewise.
494 (symbolic_range_p): Likewise.
495 (copy_value_range): Likewise.
496 (extract_range_from_binary_expr_1): Likewise.
497 (range_int_cst_p): Likewise.
498 (vrp_set_zero_nonzero_bits): Likewise.
499 (range_int_cst_singleton_p): Likewise.
500
501 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
502
503 * config/aarch64/arm_neon.h (vabsd_s64): New.
504 (vnegd_s64): Likewise.
505
506 2018-08-31 Martin Jambor <mjambor@suse.cz>
507
508 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
509
510 2018-08-31 Martin Liska <mliska@suse.cz>
511
512 * ipa-icf.c (sem_item::add_type): Use
513 sem_item::m_type_hash_cache.
514 * ipa-icf.h: Move the cache from sem_item_optimizer
515 to sem_item.
516
517 2018-08-31 Nathan Sidwell <nathan@acm.org>
518
519 * doc/extend.texi (Backwards Compatibility): Remove implicit
520 extern C leeway of () being (...).
521
522 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
523
524 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
525
526 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
527
528 PR target/86684
529 PR target/87149
530 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
531
532 2018-08-31 Jakub Jelinek <jakub@redhat.com>
533
534 PR middle-end/87138
535 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
536 gen_int_mode. Formatting fixes.
537
538 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
539
540 * target.def (custom_function_descriptors): Improve documentation.
541 * doc/tm.texi.in (Trampolines): Expand discussion of function
542 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
543 beginning of the section.
544 * doc/tm.texi: Regenerated.
545
546 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
547
548 * cfg.h (class auto_edge_flag): Spell out the template-id of the
549 base class in the initializer list. This is a workaround for
550 building with older GCC.
551 (class auto_bb_flag): Likewise.
552
553 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
554
555 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
556 (altivec_vcmpequ<VI_char>_p): Remove star.
557 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
558 vector load modes.
559 (expand_strncmp_vec_sequence): New function.
560 (emit_final_str_compare_vec): New function.
561 (expand_strn_compare): Add support for vector strncmp.
562 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
563 length specification to bytes.
564 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
565 (vcmpnezb_p): New pattern.
566 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
567 for option -mstring-compare-inline-limit.
568
569 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
570
571 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
572 (PTA_SKYLAKE): Add PTA_AES.
573 (PTA_GOLDMONT): Likewise.
574
575 2018-08-29 Jan Hubicka <jh@suse.cz>
576
577 PR lto/86517
578 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
579 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
580
581 2018-08-29 Jan Hubicka <jh@suse.cz>
582
583 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
584 TYPE_STUB_DECL.
585 (hash_tree): Do not visit TYPE_STUB_DECL.
586 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
587 stream TYPE_STUB_DECL.
588 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
589 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
590 after free_lang_data.
591 (type_in_anonymous_namespace_p): Likewise.
592
593 2018-08-29 Jan Hubicka <jh@suse.cz>
594
595 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
596 comment that it has to be even number.
597 (class sreal): Change m_sig type to int32_t.
598 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
599 int64_t for temporary calculations.
600 (sreal_verify_basics): Drop one bit from minimum and maximum.
601
602 2018-08-30 Richard Biener <rguenther@suse.de>
603
604 PR tree-optimization/87147
605 * tree-ssa-sccvn.c (SSA_VISITED): New function.
606 (visit_phi): When the degenerate result is from the backedge and
607 we didn't visit its definition yet drop to VARYING.
608 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
609
610 2018-08-29 Jan Hubicka <jh@suse.cz>
611
612 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
613 DECL_VINDEX.
614 (hash_tree): Likewise.
615
616 2018-08-29 Jan Hubicka <jh@suse.cz>
617
618 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
619 and TYPE_NEXT_REF_TO.
620
621 2018-08-29 Jan Hubicka <jh@suse.cz>
622
623 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
624 comment that it has to be even number.
625 (class sreal): Change m_sig type to int32_t.
626 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
627 int64_t for temporary calculations.
628 (sreal_verify_basics): Drop one bit from minimum and maximum.
629
630 2018-08-30 Tamar Christina <tamar.christina@arm.com>
631
632 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
633
634 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
635
636 PR middle-end/86995
637 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
638 if to_add is negative.
639
640 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
641
642 PR middle-end/87053
643 * builtins.c (c_strlen): Improve range checks.
644
645 2018-08-29 Martin Sebor <msebor@redhat.com>
646 Jeff Law <law@redhat.com>
647
648 PR tree-optimization/86714
649 PR tree-optimization/86711
650 * builtins.c (c_strlen): Add arguments to call to string_constant.
651 * expr.c (string_constant): Add argument. Detect missing nul
652 terminator and outermost declaration it's missing in.
653 * expr.h (string_constant): Add argument.
654 * fold-const.c (read_from_constant_string): Add arguments to call to
655 string_constant.
656 (c_getstr): Likewise.
657 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
658 to string_constant.
659 * tree-ssa-strlen.c (get_stridx): Likewise.
660
661 2018-08-29 Jan Hubicka <jh@suse.cz>
662
663 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
664 Do not stream DECL_VINDEX.
665 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
666 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
667 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
668
669 2018-08-29 Richard Biener <rguenther@suse.de>
670
671 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
672 virtual operands that are not default defs to honor region
673 boundaries.
674 (rpo_vn_valueize): Remove ineffective code here.
675
676 2018-08-29 Richard Biener <rguenther@suse.de>
677
678 PR tree-optimization/87132
679 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
680 when skipping defs reachable over backedges.
681
682 2018-08-29 Richard Biener <rguenther@suse.de>
683
684 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
685 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
686 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
687 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
688 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
689 (vn_reference_lookup_3): Remove use of const_parms.
690 (free_rpo_vn): Do not free const_parms.
691 (do_rpo_vn): Do not call init_const_parms.
692 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
693 SSA_NAME_POINTS_TO_READONLY_MEMORY.
694 (call_may_clobber_ref_p_1): Likewise.
695
696 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
697
698 PR other/86726
699 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
700 (-O): Ditto.
701 (-ftree-scev-cprop): Document.
702
703 2018-08-29 Jan Hubicka <jh@suse.cz>
704
705 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
706 parameters.
707 (sreal constructor): Update.
708 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
709 sreal:operator/): Update.
710
711 2018-08-29 Martin Liska <mliska@suse.cz>
712
713 * tree-switch-conversion.c (switch_conversion::expand):
714 Strenghten assumption about gswitch statements.
715
716 2018-08-29 Richard Biener <rguenther@suse.de>
717
718 PR tree-optimization/87117
719 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
720 re-value-number released SSA VDEFs.
721
722 2018-08-29 Richard Biener <rguenther@suse.de>
723
724 PR tree-optimization/87126
725 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
726
727 2018-08-28 Jim Wilson <jimw@sifive.com>
728
729 * config/riscv/pic.md: Rewrite.
730 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
731 invalid address.
732 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
733 (SOFTF, default_load, softload, softstore): New.
734
735 2018-08-28 Jeff Law <law@redhat.com>
736
737 * fold-const.c (fold_binary_loc): Remove recently added assert.
738
739 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
740
741 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
742 to OP parmeter of generated function.
743
744 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
745
746 PR tree-optimization/87009
747 * match.pd: Add boolean optimizations.
748
749 2018-08-28 Martin Sebor <msebor@redhat.com>
750
751 PR middle-end/86631
752 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
753 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
754 (pass_walloca::gate): Use it.
755 (alloca_call_type): Same.
756 (pass_walloca::execute): Same.
757 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
758
759 2018-08-28 David Malcolm <dmalcolm@redhat.com>
760
761 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
762 GCC_VERSION for usage of "__gcc_dump_printf__" format from
763 >= 3005 to >= 9000.
764
765 2018-08-28 Richard Biener <rguenther@suse.de>
766
767 PR tree-optimization/87124
768 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
769 constants before looking up avail.
770
771 2018-08-28 Jakub Jelinek <jakub@redhat.com>
772
773 PR middle-end/87099
774 * calls.c (maybe_warn_nonstring_arg): Punt early if
775 warn_stringop_overflow is zero. Don't call get_range_strlen
776 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
777 Swap comparison operands to have constants on rhs. Only use
778 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
779 increment lenrng[0].
780
781 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
782
783 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
784 use of tree_to_shwi. Remove duplicated test for the size being
785 a whole number of bytes.
786
787 2018-08-28 Richard Biener <rguenther@suse.de>
788
789 PR tree-optimization/87117
790 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
791 Handle removed stmt without LHS (GIMPLE_NOP).
792
793 2018-08-28 Richard Biener <rguenther@suse.de>
794
795 PR tree-optimization/87117
796 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
797 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
798
799 2018-08-28 Richard Biener <rguenther@suse.de>
800
801 PR tree-optimization/87117
802 * tree-ssa-pre.c (compute_avail): Do not make expressions
803 with predicated values available.
804 (get_expr_value_id): Assert we do not run into predicated value
805 expressions.
806
807 2018-08-28 Richard Biener <rguenther@suse.de>
808
809 PR tree-optimization/87117
810 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
811 get virtual operands.
812 (get_expr_operands): Handle STRING_CST like other decls.
813
814 2018-08-28 Martin Liska <mliska@suse.cz>
815
816 * tree.h: Update documentation of fndecl_built_in_p
817 functions.
818
819
820 2018-08-27 Jeff Law <law@redhat.com>
821 PR tree-optimization/87110
822 * tree-ssa-dse.c (compute_trims): Handle non-constant
823 TYPE_SIZE_UNIT.
824
825 2018-08-27 Martin Sebor <msebor@redhat.com>
826
827 PR tree-optimization/86914
828 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
829
830 2018-08-27 Martin Sebor <msebor@redhat.com>
831
832 PR tree-optimization/87112
833 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
834 the type of the bound argument.
835
836 2018-08-27 Jeff Law <law@redhat.com>
837
838 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
839 type does not have a TYPE_SIZE_UNIT.
840
841 2018-08-27 Steve Ellcey <sellcey@cavium.com>
842
843 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
844 with include of backend.h.
845
846 2018-08-27 Richard Biener <rguenther@suse.de>
847
848 PR tree-optimization/86927
849 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
850 use const cond reduction code.
851
852 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
853
854 PR tree-optimization/85758
855 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
856
857 2018-08-27 David Malcolm <dmalcolm@redhat.com>
858
859 PR c++/87091
860 * diagnostic-show-locus.c (class layout_range): Update for
861 conversion of show_caret_p to a tri-state.
862 (layout_range::layout_range): Likewise.
863 (make_range): Likewise.
864 (layout::maybe_add_location_range): Likewise.
865 (layout::should_print_annotation_line_p): Don't show annotation
866 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
867 (layout::get_state_at_point): Update for conversion of
868 show_caret_p to a tri-state. Bail out early for
869 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
870 underlining or source colorization.
871 (gcc_rich_location::add_location_if_nearby): Update for conversion
872 of show_caret_p to a tri-state.
873 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
874 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
875 Likewise.
876 (selftest::test_one_liner_labels): Likewise.
877 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
878 conversion of show_caret_p to a tri-state.
879 * pretty-print.c (text_info::set_location): Likewise.
880 * pretty-print.h (text_info::set_location): Likewise.
881 * substring-locations.c (format_warning_n_va): Likewise.
882 * tree-diagnostic.c (default_tree_printer): Likewise.
883 * tree-pretty-print.c (newline_and_indent): Likewise.
884
885 2018-08-27 David Malcolm <dmalcolm@redhat.com>
886
887 PR c++/87091
888 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
889 line above for line-insertion fix-it hints.
890 (selftest::test_fixit_insert_containing_newline): Update the
891 expected results, and add a test with line-numbering enabled.
892
893 2018-08-27 Martin Liska <mliska@suse.cz>
894
895 PR sanitizer/86962
896 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
897 params with DECL_HAS_VALUE_EXPR_P.
898
899 2018-08-27 Martin Liska <mliska@suse.cz>
900
901 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
902 selected expansion strategy.
903
904 2018-08-27 Martin Liska <mliska@suse.cz>
905
906 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
907 * builtins.c (is_builtin_fn): Likewise.
908 * attribs.c (diag_attr_exclusions): Use new function
909 fndecl_built_in_p and remove check for FUNCTION_DECL if
910 possible.
911 (builtin_mathfn_code): Likewise.
912 (fold_builtin_expect): Likewise.
913 (fold_call_expr): Likewise.
914 (fold_builtin_call_array): Likewise.
915 (fold_call_stmt): Likewise.
916 (set_builtin_user_assembler_name): Likewise.
917 (is_simple_builtin): Likewise.
918 * calls.c (gimple_alloca_call_p): Likewise.
919 (maybe_warn_nonstring_arg): Likewise.
920 * cfgexpand.c (expand_call_stmt): Likewise.
921 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
922 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
923 (cgraph_node::verify_node): Likewise.
924 * cgraphclones.c (build_function_decl_skip_args): Likewise.
925 (cgraph_node::create_clone): Likewise.
926 * config/arm/arm.c (arm_insert_attributes): Likewise.
927 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
928 * dse.c (scan_insn): Likewise.
929 * expr.c (expand_expr_real_1): Likewise.
930 * fold-const.c (operand_equal_p): Likewise.
931 (fold_binary_loc): Likewise.
932 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
933 * gimple-low.c (lower_stmt): Likewise.
934 * gimple-pretty-print.c (dump_gimple_call): Likewise.
935 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
936 * gimple.c (gimple_build_call_from_tree): Likewise.
937 (gimple_call_builtin_p): Likewise.
938 (gimple_call_combined_fn): Likewise.
939 * gimplify.c (gimplify_call_expr): Likewise.
940 (gimple_boolify): Likewise.
941 (gimplify_modify_expr): Likewise.
942 (gimplify_addr_expr): Likewise.
943 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
944 * ipa-cp.c (determine_versionability): Likewise.
945 * ipa-fnsummary.c (compute_fn_summary): Likewise.
946 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
947 * ipa-split.c (visit_bb): Likewise.
948 (split_function): Likewise.
949 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
950 * lto-cgraph.c (input_node): Likewise.
951 * lto-streamer-out.c (write_symbol): Likewise.
952 * omp-low.c (setjmp_or_longjmp_p): Likewise.
953 (lower_omp_1): Likewise.
954 * predict.c (strip_predict_hints): Likewise.
955 * print-tree.c (print_node): Likewise.
956 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
957 * trans-mem.c (is_tm_irrevocable): Likewise.
958 (is_tm_load): Likewise.
959 (is_tm_simple_load): Likewise.
960 (is_tm_store): Likewise.
961 (is_tm_simple_store): Likewise.
962 (is_tm_abort): Likewise.
963 (tm_region_init_1): Likewise.
964 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
965 * tree-cfg.c (verify_gimple_call): Likewise.
966 (move_stmt_r): Likewise.
967 (stmt_can_terminate_bb_p): Likewise.
968 * tree-eh.c (lower_eh_constructs_2): Likewise.
969 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
970 * tree-inline.c (remap_gimple_stmt): Likewise.
971 (copy_bb): Likewise.
972 (estimate_num_insns): Likewise.
973 (fold_marked_statements): Likewise.
974 * tree-sra.c (scan_function): Likewise.
975 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
976 (optimize_stack_restore): Likewise.
977 (pass_fold_builtins::execute): Likewise.
978 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
979 (mark_all_reaching_defs_necessary_1): Likewise.
980 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
981 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
982 (pass_forwprop::execute): Likewise.
983 * tree-ssa-loop-im.c (stmt_cost): Likewise.
984 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
985 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
986 * tree-ssa-strlen.c (get_string_length): Likewise.
987 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
988 (find_func_aliases_for_call): Likewise.
989 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
990 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
991 * tree-tailcall.c (find_tail_calls): Likewise.
992 * tree.c (need_assembler_name_p): Likewise.
993 (free_lang_data_in_decl): Likewise.
994 (get_call_combined_fn): Likewise.
995 * ubsan.c (is_ubsan_builtin_p): Likewise.
996 * varasm.c (incorporeal_function_p): Likewise.
997 * tree.h (DECL_BUILT_IN): Remove and replace with
998 fndecl_built_in_p.
999 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1000 (fndecl_built_in_p): New.
1001
1002 2018-08-27 Martin Liska <mliska@suse.cz>
1003
1004 PR tree-optimization/86847
1005 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1006 Dump also subtree probability.
1007 (switch_decision_tree::do_jump_if_equal): New function.
1008 (switch_decision_tree::emit_case_nodes): Handle special
1009 situations in balanced tree that can be emitted much simpler.
1010 Fix calculation of probabilities that happen in tree expansion.
1011 * tree-switch-conversion.h (struct cluster): Add
1012 is_single_value_p.
1013 (struct simple_cluster): Likewise.
1014 (struct case_tree_node): Add new function has_child.
1015 (do_jump_if_equal): New.
1016
1017 2018-08-27 Martin Liska <mliska@suse.cz>
1018
1019 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1020 Add new argument to bit_test_cluster constructor.
1021 (bit_test_cluster::emit): Set bits really number of values
1022 handlel by a test.
1023 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1024 probability argument.
1025 * tree-switch-conversion.h (struct bit_test_cluster):
1026 Add m_handles_entire_switch.
1027
1028 2018-08-27 Martin Liska <mliska@suse.cz>
1029
1030 PR tree-optimization/86702
1031 * tree-switch-conversion.c (jump_table_cluster::emit):
1032 Make probabilities even for values in jump table
1033 according to number of cases handled.
1034 (switch_decision_tree::compute_cases_per_edge): Pass
1035 argument to reset_out_edges_aux function.
1036 (switch_decision_tree::analyze_switch_statement): Likewise.
1037 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1038 Make it static.
1039
1040 2018-08-27 Martin Liska <mliska@suse.cz>
1041
1042 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1043 cfun argument explicitly.
1044 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1045 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1046 function gimple_switch_default_bb.
1047 (convert_switch_statements):
1048 (expand_builtins):
1049 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1050 * stmt.c (label_to_block_fn): Use label_to_block and pass
1051 cfun argument explicitly and use gimple_switch_label_bb.
1052 (expand_case): Likewise.
1053 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1054 cfun argument explicitly. Likewise.
1055 (make_edges_bb): Likewise.
1056 (make_cond_expr_edges): Likewise.
1057 (get_cases_for_edge): Likewise.
1058 (make_gimple_switch_edges): Likewise.
1059 (label_to_block_fn): Likewise.
1060 (label_to_block): Likewise.
1061 (make_goto_expr_edges): Likewise.
1062 (make_gimple_asm_edges): Likewise.
1063 (main_block_label): Likewise.
1064 (group_case_labels_stmt): Likewise.
1065 (find_taken_edge_computed_goto): Likewise.
1066 (find_taken_edge_switch_expr): Likewise.
1067 (gimple_verify_flow_info): Likewise.
1068 (gimple_redirect_edge_and_branch): Likewise.
1069 (gimple_switch_label_bb): New function.
1070 (gimple_switch_default_bb): Likewise.
1071 (gimple_switch_edge): Likewise.
1072 (gimple_switch_default_edge): Likewise.
1073 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1074 (label_to_block): ... with this.
1075 (gimple_switch_label_bb): New.
1076 (gimple_switch_default_bb): Likewise.
1077 (gimple_switch_edge): Likewise.
1078 (gimple_switch_default_edge): Likewise.
1079 * tree-cfgcleanup.c (convert_single_case_switch): Use
1080 new gimple functions and pass new argument to label_to_block.
1081 (cleanup_control_flow_bb):
1082 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1083 cfun argument explicitly.
1084 (make_eh_edges): Likewise.
1085 (redirect_eh_dispatch_edge): Likewise.
1086 (lower_resx): Likewise.
1087 (lower_eh_dispatch): Likewise.
1088 (maybe_remove_unreachable_handlers): Likewise.
1089 (unsplit_eh): Likewise.
1090 (cleanup_empty_eh): Likewise.
1091 (verify_eh_edges): Likewise.
1092 (verify_eh_dispatch_edge): Likewise.
1093 * tree-ssa-dom.c (record_edge_info): Likewise.
1094 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1095 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1096 (thread_through_normal_block): Likewise.
1097 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1098 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1099 * tree-switch-conversion.c (switch_conversion::collect): Use new
1100 gimple functions.
1101 (switch_conversion::check_final_bb): Likewise.
1102 (switch_conversion::gather_default_values): Pass new argument
1103 to label_to_block.
1104 (switch_conversion::build_constructors): Likewise.
1105 (switch_decision_tree::compute_cases_per_edge): Use new
1106 gimple_switch_edge function.
1107 (switch_decision_tree::analyze_switch_statement): Pass new argument
1108 to label_to_block.
1109 (switch_decision_tree::try_switch_expansion): Use
1110 gimple_switch_default_edge.
1111 * tree-vrp.c (find_switch_asserts): Pass new argument
1112 to label_to_block.
1113 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1114 (vr_values::simplify_switch_using_ranges): Likewise.
1115
1116 2018-08-27 Richard Biener <rguenther@suse.de>
1117
1118 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1119 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1120
1121 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1122 (struct vn_nary_op_s): Add unwind_to member. Add
1123 predicated_values flag and put result into a union together
1124 with a linked list of vn_pval.
1125 (struct vn_ssa_aux): Add name member to make maintaining
1126 a map of SSA name to vn_ssa_aux possible. Remove no longer
1127 needed info, dfsnum, low, visited, on_sccstack, use_processed
1128 and range_info_anti_range_p members.
1129 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1130 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1131 New functions.
1132 (vn_valueize): New global.
1133 (vn_context_bb): Likewise.
1134 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1135 VN_INFO_PTR_INFO): Remove.
1136 * tree-ssa-sccvn.c: ... (rewrite)
1137 (pass_fre::execute): For -O2+ initialize loops and run
1138 RPO VN in optimistic mode (iterating). For -O1 and -Og
1139 run RPO VN in non-optimistic mode.
1140 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1141 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1142 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1143 (rpo-vn-max-loop-depth): Document.
1144 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1145 when valuezing the VUSE signals we walked out of the region.
1146 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1147 (phi_translate): Set VN context block to use for availability
1148 lookup.
1149 (compute_avail): Likewise.
1150 (pre_valueize): New function.
1151 (pass_pre::execute): Adjust to the RPO VN API.
1152
1153 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1154 (propagate_constants_for_unrolling): Remove.
1155 (tree_unroll_loops_completely): Perform value-numbering
1156 on the unrolled bodies loop parent.
1157
1158 2018-08-27 Richard Biener <rguenther@suse.de>
1159
1160 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1161 for partial antic compute.
1162
1163 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR rtl-optimization/87065
1166 * combine.c (simplify_if_then_else): Formatting fix.
1167 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1168 check.
1169 (known_cond): Don't return const_true_rtx for vector modes. Use
1170 CONST0_RTX instead of const0_rtx. Formatting fixes.
1171
1172 2018-08-27 Martin Liska <mliska@suse.cz>
1173
1174 PR gcov-profile/87069
1175 * gcov.c (process_file): Record files already processed
1176 and warn about a file being processed multiple times.
1177
1178 2018-08-27 Martin Liska <mliska@suse.cz>
1179
1180 PR driver/83193
1181 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1182 Set default values for x_aarch64_*_string strings.
1183 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1184 prefix. For -mabi do not print '=ABI' in help and use
1185 <option_value> format for -msve-vector-bits and -moverride
1186 options.
1187
1188 2018-08-26 Jeff Law <law@redhat.com>
1189
1190 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1191 "cfg.h"
1192
1193 2018-08-26 Marek Polacek <polacek@redhat.com>
1194
1195 PR c++/87029, Implement -Wredundant-move.
1196 * doc/invoke.texi: Document -Wredundant-move.
1197
1198 2018-08-25 Martin Sebor <msebor@redhat.com>
1199
1200 PR tree-optimization/87059
1201 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1202 to the same type as the other.
1203 * fold-const.c (fold_binary_loc): Assert expectation.
1204
1205 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1206
1207 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1208 extraneous parentheses, dead code section and formatting.
1209
1210 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1211
1212 PR c++/87091
1213 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1214 wide enough for jumps in the line-numbering to be visible.
1215 (layout::print_gap_in_line_numbering): New member function.
1216 (layout::calculate_line_spans): When using line numbering, merge
1217 line spans that are only 1 line apart.
1218 (diagnostic_show_locus): When printing line numbers, show gaps in
1219 line numbering directly, rather than printing headers.
1220 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1221 line-numbering with multiple line spans.
1222 (selftest::test_fixit_insert_containing_newline_2): Add test of
1223 line-numbering, in which the spans are close enough to be merged.
1224
1225 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1226
1227 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1228 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1229 * tree-vrp.c (range_is_nonnull): Remove.
1230 (range_includes_zero_p): Accept value_range instead of min/max.
1231 (extract_range_from_binary_expr_1): Do not early bail on
1232 POINTER_PLUS_EXPR.
1233 Use range_includes_zero_p instead of range_is_nonnull.
1234 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1235 of range_is_nonnull.
1236 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1237 special case VR_ANTI_RANGE.
1238 (vrp_finalize): Same.
1239 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1240 instead of min/max.
1241 (range_is_nonnull): Remove.
1242 * vr-values.c (vrp_stmt_computes_nonzero): Use
1243 range_includes_zero_p instead of range_is_nonnull.
1244 (extract_range_basic): Pass value_range to range_includes_zero_p
1245 instead of range_is_nonnull.
1246
1247 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1248
1249 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1250 * emit-rtl.h (rtl_data): Remove return_bnd.
1251 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1252 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1253 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1254 (POINTER_BOUNDS_MODE): Remove definition.
1255 (make_pointer_bounds_mode): Remove.
1256 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1257 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1258 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1259 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1260 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1261 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1262 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1263
1264 * config/i386/i386-modes.def (BND32, BND64): Remove.
1265 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1266 (dbx64_register_map): Ditto.
1267 (svr4_dbx_register_map): Ditto.
1268 (indirect_thunk_bnd_needed): Remove.
1269 (indirect_thunks_bnd_used): Ditto.
1270 (indirect_return_bnd_needed): Ditto.
1271 (indirect_return_via_cx_bnd): Ditto.
1272 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1273 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1274 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1275 (output_indirect_thunk_function): Remove handling of
1276 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1277 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1278 (ix86_save_reg): Remove handling of crtl->return_bnd.
1279 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1280 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1281 and UNSPEC_BNDLX_ADDR.
1282 (ix86_output_indirect_branch_via_reg): Remove handling of
1283 indirect_thunk_prefix_bnd.
1284 (ix86_output_indirect_branch_via_push): Ditto.
1285 (ix86_output_function_return): Ditto.
1286 (ix86_output_indirect_function_return): Ditto.
1287 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1288 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1289 (CALL_USED_REGISTERS): Ditto.
1290 (REG_ALLOC_ORDER): Update for removal of bound registers.
1291 (HI_REGISTER_NAMES): Ditto.
1292 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1293 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1294 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1295 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1296 (FIRST_PSEUDO_REG): Update.
1297 (BND): Remove mode iterator.
1298 * config/i386/predicates.md (bnd_mem_operator): Remove.
1299
1300 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1301
1302 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1303 vectors.
1304
1305 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1306
1307 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1308 the case in which the permute needs only a single element and
1309 repeats for every vector of the result. Extend that case to
1310 handle variable-length vectors.
1311 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1312
1313 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 PR debug/79342
1316 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1317 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1318
1319 2018-08-24 Richard Biener <rguenther@suse.de>
1320
1321 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1322 bb_flags_allocated members.
1323 (auto_flag): New RAII class for allocating flags.
1324 (auto_edge_flag): New RAII class for allocating edge flags.
1325 (auto_bb_flag): New RAII class for allocating bb flags.
1326 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1327 flag dynamically.
1328 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1329 in favor of temporarily allocated BB flag.
1330 * hsa-brig.c: Re-order includes.
1331 * hsa-dump.c: Likewise.
1332 * hsa-regalloc.c: Likewise.
1333 * print-rtl.c: Likewise.
1334 * profile-count.c: Likewise.
1335
1336 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1337
1338 PR target/86989
1339 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1340 the TOC register.
1341
1342 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1343
1344 PR 87073/bootstrap
1345 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1346 from wide_int_range_multiplicative_op.
1347
1348 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1349
1350 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1351 "permutaion".
1352
1353 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1354
1355 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1356 to 'expanded'.
1357
1358 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1359
1360 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1361 full GENERIC expression used for replacement.
1362
1363 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1364
1365 * tree-vrp.c (abs_extent_range): Remove.
1366 (extract_range_into_wide_ints): Pass wide ints by reference.
1367 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1368 Pass wide ints by reference in all calls to
1369 extract_range_into_wide_ints.
1370 * wide-int-range.cc (wide_int_range_div): New.
1371 * wide-int-range.h (wide_int_range_div): New.
1372 (wide_int_range_includes_zero_p): New.
1373 (wide_int_range_zero_p): New.
1374
1375 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1376
1377 * config/aarch64/aarch64.md (arches): New enum.
1378 (arch): New enum attr.
1379 (arch_enabled): New attr.
1380 (enabled): Now uses arch_enabled only.
1381 (simd, sve, fp16): Removed attribute.
1382 (fp): Attr now defined in terms of 'arch'.
1383 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1384 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1385 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1386 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1387 attributes into 'arch'.
1388 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1389 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1390 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1391 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1392 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1393 'simd' attribute into 'arch'.
1394 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1395 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1396 Convert use of 'fp' attribute to 'arch'.
1397 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1398 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1399 into 'arch'.
1400 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1401 (different modes) Merge 'fp' and 'simd' into 'arch'.
1402 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1403 'simd' into 'arch'.
1404
1405 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1406
1407 PR rtl-optimization/87026
1408 * expmed.c (canonicalize_comparison): If we can no longer create
1409 pseudoregisters, don't.
1410
1411 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1412
1413 PR target/86951
1414 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1415 prototype.
1416 * config/arm/arm.c (speculation_barrier_libfunc): New static
1417 variable.
1418 (arm_init_libfuncs): Initialize it.
1419 (arm_emit_speculation_barrier): New function.
1420 * config/arm/arm.md (speculation_barrier): Call
1421 arm_emit_speculation_barrier for architectures that do not have
1422 DSB or ISB.
1423 (speculation_barrier_insn): Only match on Armv7 or later.
1424
1425 2018-08-23 Richard Biener <rguenther@suse.de>
1426
1427 PR middle-end/87024
1428 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1429 calls.
1430
1431 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1432
1433 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1434 of single-vector TBLs.
1435 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1436 one input is given.
1437
1438 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1439
1440 PR target/85910
1441 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1442 aarch64_evpc_tbl guard.
1443
1444 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1445
1446 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1447 behaviour.
1448
1449 2018-08-22 Martin Sebor <msebor@redhat.com>
1450
1451 PR middle-end/87052
1452 * tree-pretty-print.c (pretty_print_string): Add argument.
1453 (dump_generic_node): Call to pretty_print_string with string size.
1454
1455 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1456
1457 PR rtl-optimization/86771
1458 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1459 of two SETs into those two SETs, one to be placed at i2, if that SETs
1460 destination is modified between i2 and i3.
1461
1462 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1463
1464 PR tree-optimization/86725
1465 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1466 function.
1467 (vect_analyze_scalar_cycles_1): Check it.
1468
1469 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1470
1471 PR tree-optimization/86725
1472 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1473 an outer loop phi as a double reduction, make sure that the
1474 single user of the phi result is an inner loop phi.
1475
1476 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1477
1478 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1479 grouped stores with gaps to a strided group.
1480
1481 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1482
1483 * tree-vect-stmts.c (get_group_load_store_type)
1484 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1485 first statement in a group.
1486
1487 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1488
1489 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1490 the sequence used in gcc/gcc.c.
1491
1492 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1493
1494 PR other/704
1495 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1496 building it.
1497
1498 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1499
1500 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1501 Darwin10-specific unwinder-shim.
1502 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1503 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1504 New to cater for Darwin10 Rosetta.
1505
1506 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1507
1508 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1509 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1510
1511 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1512
1513 PR bootstrap/81033
1514 PR target/81733
1515 PR target/52795
1516 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1517 (dwarf2out_switch_text_section): Generate a local label for the
1518 second function sub-section and apply it as the second FDE start
1519 label.
1520 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1521 second sub-section start.
1522
1523 2018-08-22 Richard Biener <rguenther@suse.de>
1524
1525 PR tree-optimization/86988
1526 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1527
1528 2018-08-22 Richard Biener <rguenther@suse.de>
1529
1530 PR tree-optimization/86945
1531 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1532
1533 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1534
1535 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1536 a comment about how uses of r2 for .sdata2 come about.
1537
1538 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1539
1540 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1541
1542 2018-08-21 Marek Polacek <polacek@redhat.com>
1543
1544 PR c++/86981, Implement -Wpessimizing-move.
1545 * doc/invoke.texi: Document -Wpessimizing-move.
1546
1547 2018-08-21 Jan Hubicka <jh@suse.cz>
1548
1549 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1550 * tree.h (is_redundant_typedef): Remove.
1551 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1552
1553 2018-08-21 Jan Hubicka <jh@suse.cz>
1554
1555 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1556 when possible.
1557
1558 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1559
1560 * expmed.c (extract_low_bits): Reject invalid subregs early.
1561
1562 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1563
1564 PR middle-end/86121
1565 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1566 behaviour.
1567
1568 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1569
1570 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1571 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1572 * config/vxworks.c: Likewise.
1573
1574 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1575
1576 * config/vxworks.c: Set targetm.have_ctors_dtors
1577 if HAVE_INITFINI_ARRAY_SUPPORT.
1578 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1579 if HAVE_INITFINI_ARRAY_SUPPORT.
1580
1581 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1582
1583 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1584 default search path for VxWorks < 7.
1585
1586 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1587
1588 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1589 (get_format_string): Refer to c_getstr.
1590
1591 2018-08-21 Tom de Vries <tdevries@suse.de>
1592
1593 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1594 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1595 (debuginfo_early_stop): Declare.
1596 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1597 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1598 (debuginfo_early_stop): New function.
1599 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1600 and debuginfo_early_stop.
1601 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1602 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1603 (general_init): Call debuginfo_early_init.
1604 (finalize): Call debuginfo_fini.
1605 (do_compile): Call debuginfo_init.
1606 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1607 -fdump-early-debug.
1608 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1609
1610 2018-08-21 Tom de Vries <tdevries@suse.de>
1611
1612 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1613 flag_dump_noaddr and flag_dump_unnumbered.
1614
1615 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1616
1617 * wide-int-range.cc (wide_int_range_abs): New.
1618 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1619 * wide-int-range.h (wide_int_range_abs): New.
1620 (wide_int_range_min_max): New.
1621 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1622 case to call wide_int_range_abs.
1623 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1624 (extract_range_from_abs_expr): Delete.
1625
1626 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1627
1628 PR target/87033
1629 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1630 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1631 for indexed loads.
1632
1633 2018-08-20 Nathan Sidwell <nathan@acm.org>
1634 Jeff Law <law@redhat.com>
1635
1636 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1637 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1638
1639 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1640
1641 PR other/84889
1642 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1643 (decl_attributes): Likewise.
1644 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1645 instance.
1646 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1647 * diagnostic-core.h (class auto_diagnostic_group): New class.
1648 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1649 (diagnostic_report_diagnostic): Handle the first diagnostics within
1650 a group.
1651 (emit_diagnostic): Add auto_diagnostic_group instance.
1652 (inform): Likewise.
1653 (inform_n): Likewise.
1654 (warning): Likewise.
1655 (warning_at): Likewise.
1656 (warning_n): Likewise.
1657 (pedwarn): Likewise.
1658 (permerror): Likewise.
1659 (error): Likewise.
1660 (error_n): Likewise.
1661 (error_at): Likewise.
1662 (sorry): Likewise.
1663 (fatal_error): Likewise.
1664 (internal_error): Likewise.
1665 (internal_error_no_backtrace): Likewise.
1666 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1667 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1668 * diagnostic.h (struct diagnostic_context): Add fields
1669 "diagnostic_group_nesting_depth",
1670 "diagnostic_group_emission_count", "begin_group_cb",
1671 "end_group_cb".
1672 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1673 Add auto_diagnostic_group instance(s).
1674 (find_explicit_erroneous_behavior): Likewise.
1675 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1676 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1677 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1678 (gimplify_va_arg_expr): Likewise.
1679 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1680 (HSA_SORRY_AT): Likewise.
1681 * ipa-devirt.c (compare_virtual_tables): Likewise.
1682 (warn_odr): Likewise.
1683 * multiple_target.c (expand_target_clones): Likewise.
1684 * opts-common.c (cmdline_handle_error): Likewise.
1685 * reginfo.c (globalize_reg): Likewise.
1686 * substring-locations.c (format_warning_n_va): Likewise.
1687 * tree-inline.c (expand_call_inline): Likewise.
1688 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1689 * tree-ssa-loop-niter.c
1690 (do_warn_aggressive_loop_optimizations): Likewise.
1691 * tree-ssa-uninit.c (warn_uninit): Likewise.
1692 * tree.c (warn_deprecated_use): Likewise.
1693
1694 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1695
1696 PR target/87014
1697 * config/i386/i386.md (eh_return): Always update EH return
1698 address in word_mode.
1699
1700 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1701
1702 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1703 TARGET_SPLIT_COMPLEX_ARG is defined.
1704
1705 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1706
1707 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1708
1709 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1710
1711 PR target/86984
1712 * expr.c (expand_assignment): Assert that bitpos is positive.
1713 (store_field): Likewise
1714 (expand_expr_real_1): Make sure that bitpos is positive.
1715 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1716 integer overflow.
1717
1718 2018-08-20 Nathan Sidwell <nathan@acm.org>
1719
1720 * Makefile.in (CPP_ID_DATA_H): Delete.
1721 (CPP_INTERNAL_H): Don't add it.
1722 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1723 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1724
1725 2018-08-20 Richard Biener <rguenther@suse.de>
1726
1727 PR tree-optimization/78655
1728 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1729 pointer + offset nonnull if either operand is nonnull work.
1730
1731 2018-08-20 Tom de Vries <tdevries@suse.de>
1732
1733 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1734 unless the referenced die describes the added property using
1735 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1736 Otherwise, add a DW_AT_location to the referenced die.
1737
1738 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1739
1740 PR target/86994
1741 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1742 register_operand when calling ix86_set_reg_reg_cost.
1743 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1744 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1745 predicate and to 1 otherwise.
1746
1747 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1748
1749 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1750 emit a diagnostic that it is not supported and reset the option.
1751 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1752 supported and consume the option. (ASM_FINAL_SPEC): New.
1753
1754 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1755
1756 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1757 a sentence.
1758
1759 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1760
1761 C-SKY port: Documentation
1762
1763 * doc/extend.texi (C-SKY Function Attributes): New section.
1764 * doc/invoke.texi (Option Summary): Add C-SKY options.
1765 (C-SKY Options): New section.
1766 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1767
1768 2018-08-17 Jojo <jijie_rong@c-sky.com>
1769 Huibin Wang <huibin_wang@c-sky.com>
1770 Sandra Loosemore <sandra@codesourcery.com>
1771 Chung-Lin Tang <cltang@codesourcery.com>
1772
1773 C-SKY port: Backend implementation
1774
1775 * config/csky/*: New.
1776 * common/config/csky/*: New.
1777
1778 2018-08-17 Jojo <jijie_rong@c-sky.com>
1779 Huibin Wang <huibin_wang@c-sky.com>
1780 Sandra Loosemore <sandra@codesourcery.com>
1781 Chung-Lin Tang <cltang@codesourcery.com>
1782 Andrew Jenner <andrew@codesourcery.com>
1783
1784 C-SKY port: Configury
1785
1786 * config.gcc (csky-*-*): New.
1787 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1788 * configure: Regenerated.
1789
1790 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1791
1792 * dump-context.h: Include "dumpfile.h".
1793 (dump_context::dump_printf_va): Convert final param from va_list
1794 to va_list *. Convert from ATTRIBUTE_PRINTF to
1795 ATTRIBUTE_GCC_DUMP_PRINTF.
1796 (dump_context::dump_printf_loc_va): Likewise.
1797 * dumpfile.c: Include "stringpool.h".
1798 (make_item_for_dump_printf_va): Delete.
1799 (make_item_for_dump_printf): Delete.
1800 (class dump_pretty_printer): New class.
1801 (dump_pretty_printer::dump_pretty_printer): New ctor.
1802 (dump_pretty_printer::emit_items): New member function.
1803 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1804 function.
1805 (dump_pretty_printer::emit_item): New member function.
1806 (dump_pretty_printer::stash_item): New member function.
1807 (dump_pretty_printer::format_decoder_cb): New member function.
1808 (dump_pretty_printer::decode_format): New member function.
1809 (dump_context::dump_printf_va): Reimplement in terms of
1810 dump_pretty_printer.
1811 (dump_context::dump_printf_loc_va): Convert final param from va_list
1812 to va_list *.
1813 (dump_context::begin_scope): Reimplement call to
1814 make_item_for_dump_printf.
1815 (dump_printf): Update for change to dump_printf_va.
1816 (dump_printf_loc): Likewise.
1817 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1818 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1819 with %T, %E, and %G.
1820 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1821 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1822 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1823 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1824 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1825 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1826 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1827 within a dump_printf_loc call to "%wu".
1828 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1829 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1830 missing space after "=".
1831 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1832 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1833 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1834 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1835 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1836 duplicate "vectorized" from message.
1837
1838 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1839
1840 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1841 polyNxK_t element's TYPE_STRING_FLAG.
1842
1843 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1844
1845 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1846 (they were unnamed before). Fix comments.
1847
1848 2018-08-17 Nathan Sidwell <nathan@acm.org>
1849
1850 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1851
1852 2018-08-17 Richard Biener <rguenther@suse.de>
1853
1854 PR tree-optimization/86841
1855 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1856
1857 2018-08-17 Martin Liska <mliska@suse.cz>
1858
1859 * common.opt: Remove Warn, Init and Report for options with
1860 Ignore/Deprecated flag. Warning is done automatically for
1861 Deprecated flags.
1862 * config/i386/i386.opt: Likewise.
1863 * config/ia64/ia64.opt: Likewise.
1864 * config/rs6000/rs6000.opt: Likewise.
1865 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1866 Remove usage of flag_check_pointer_bounds.
1867 * lto-wrapper.c (merge_and_complain): Do not handle
1868 OPT_fcheck_pointer_bounds.
1869 (append_compiler_options): Likewise.
1870 * opt-functions.awk: Do not handle Deprecated.
1871 * optc-gen.awk: Check that Var, Report and Init are not
1872 used for an option with Ignore/Deprecated flag.
1873 * opts-common.c (decode_cmdline_option): Do not report
1874 CL_ERR_DEPRECATED.
1875 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1876 options.
1877 * opts.h (struct cl_option): Remove cl_deprecated flag.
1878 (CL_ERR_DEPRECATED): Remove error enum value.
1879
1880 2018-08-17 Richard Biener <rguenther@suse.de>
1881
1882 PR middle-end/86505
1883 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1884 across a va-arg-pack using call adjust its return value accordingly.
1885
1886 2018-08-16 Martin Sebor <msebor@redhat.com>
1887
1888 PR tree-optimization/86853
1889 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1890 (struct fmtresult): Add member and initialize it in ctors.
1891 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1892 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1893 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1894 (parse_directive): Handle %C same as %c.
1895 (sprintf_dom_walker::compute_format_length): Adjust.
1896 (is_call_safe): Adjust.
1897
1898 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1899
1900 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1901 for determining how to count the elements.
1902 * builtins.h (c_strlen): Adjust prototype.
1903 * expr.c (string_constant): Add new parameter mem_size.
1904 Set *mem_size appropriately.
1905 * expr.h (string_constant): Adjust protoype.
1906 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1907 * gimple-fold.h (get_range_strlen): Adjust prototype.
1908 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1909 (format_string): Call get_string_length with eltsize.
1910
1911 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1912
1913 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1914 to emit the span, rather than setting it as the prefix.
1915
1916 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1917
1918 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1919 "margin_char" parameter, defaulting to space. Use it in place
1920 of pp_space for the initial part of the margin.
1921 (layout::print_leading_fixits): Use '+' when filling the margin
1922 of line-insertion fix-it hints.
1923
1924 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1925
1926 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1927 Delete.
1928
1929 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1930
1931 * config/rs6000/altivec.md: Don't set length attribute to the default
1932 value.
1933 * config/rs6000/darwin.md: Ditto.
1934 * config/rs6000/dfp.md: Ditto.
1935 * config/rs6000/htm.md: Ditto.
1936 * config/rs6000/rs6000.md: Ditto.
1937 * config/rs6000/sync.md: Ditto.
1938 * config/rs6000/vsx.md: Ditto.
1939
1940 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1941
1942 * config/rs6000/altivec.md: Don't set length attribute to the default
1943 value, for branch instructions.
1944 * config/rs6000/darwin.md: Ditto.
1945 * config/rs6000/rs6000.md: Ditto.
1946
1947 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1948
1949 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1950 (unnamed conditional branch define_insn): Set length to 4 or 8
1951 depending on offset.
1952 (<bd>_<mode>): Similar, for alternative 0.
1953 (<bd>tf_<mode>): Ditto.
1954
1955 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1956
1957 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1958
1959 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1960
1961 * doc/rtl.texi: Replace old RTX class names with new names.
1962
1963
1964 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1965
1966 * expmed.h (canonicalize_comparison): New declaration.
1967 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1968 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1969 * optabs.c (prepare_cmp_insn): Likewise.
1970 * rtl.h (unsigned_condition_p): New function which checks if a
1971 comparison operator is unsigned.
1972
1973 2018-08-16 Nathan Sidwell <nathan@acm.org>
1974
1975 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1976 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1977
1978 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1979
1980 PR target/84711
1981 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1982 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1983 (mov<mov>): ..this and enable unconditionally.
1984
1985 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1986
1987 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1988
1989 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1990
1991 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1992 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1993 "Common" with "Target".
1994
1995 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1996
1997 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1998 * doc/invoke.texi (mmitigate-rop): Remove.
1999 * config/i386/i386.c: Do not include "regrename.h".
2000 (ix86_rop_should_change_byte_p, reg_encoded_number)
2001 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2002 Remove.
2003 (ix86_reorg): Remove call to ix86_mitigate_rop.
2004 * config/i386/i386.md (attr "modrm_class"): Remove.
2005 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2006 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2007 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2008
2009 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2010
2011 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2012 allow folding of mergeh() and mergel() for the float and double types.
2013 (fold_mergehl_helper): Rework to handle building a permute tree
2014 for float vectors.
2015
2016 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2017
2018 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2019 for TARGET_SSE.
2020
2021 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2022
2023 * common.opt (fdiagnostics-show-labels): New option.
2024 * diagnostic-show-locus.c (class layout_range): Add field
2025 "m_label".
2026 (class layout): Add field "m_show_labels_p".
2027 (layout_range::layout_range): Add param "label" and use it to
2028 initialize m_label.
2029 (make_range): Pass in NULL for new "label" param of layout_range's
2030 ctor.
2031 (layout::layout): Initialize m_show_labels_p.
2032 (layout::maybe_add_location_range): Pass in loc_range->m_label
2033 when constructing layout_range instances.
2034 (struct line_label): New struct.
2035 (layout::print_any_labels): New member function.
2036 (layout::print_line): Call it if label-printing is enabled.
2037 (selftest::test_one_liner_labels): New test.
2038 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2039 * diagnostic.c (diagnostic_initialize): Initialize
2040 context->show_labels_p.
2041 * diagnostic.h (struct diagnostic_context): Add field
2042 "show_labels_p".
2043 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2044 -fno-diagnostics-show-labels.
2045 * dwarf2out.c (gen_producer_string): Add
2046 OPT_fdiagnostics_show_labels to the ignored options.
2047 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2048 param.
2049 (gcc_rich_location::maybe_add_expr): Likewise.
2050 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2051 label" param, defaulting to NULL.
2052 (gcc_rich_location::add_expr): Add "label" param.
2053 (gcc_rich_location::maybe_add_expr): Likewise.
2054 (class text_range_label): New class.
2055 (class range_label_for_type_mismatch): New class.
2056 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2057 of format_warning_va.
2058 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2059 * lto-wrapper.c (merge_and_complain): Add
2060 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2061 (append_compiler_options): Likewise to the dropped options.
2062 (append_diag_options): Likewise to the passed-on options.
2063 * opts.c (common_handle_option): Handle the new option.
2064 * selftest-diagnostic.c
2065 (test_diagnostic_context::test_diagnostic_context): Enable
2066 show_labels_p.
2067 * substring-locations.c: Include "gcc-rich-location.h".
2068 (format_warning_n_va): Add "fmt_label" and "param_label" params
2069 and use them as appropriate.
2070 (format_warning_va): Add "fmt_label" and "param_label" params,
2071 passing them on to format_warning_n_va.
2072 (format_warning_at_substring): Likewise.
2073 (format_warning_at_substring_n): Likewise.
2074 * substring-locations.h (format_warning_va): Add "fmt_label" and
2075 "param_label" params.
2076 (format_warning_n_va): Likewise.
2077 (format_warning_at_substring): Likewise.
2078 (format_warning_at_substring_n): Likewise.
2079 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2080
2081 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2082
2083 PR testsuite/86519
2084 * builtins.c (expand_builtin_memcmp): Do not expand the call
2085 when overflow is detected.
2086
2087 2018-08-15 Martin Sebor <msebor@redhat.com>
2088
2089 PR tree-optimization/71625
2090 * config/aarch64/aarch64-builtins.c
2091 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2092
2093 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2094
2095 * config/s390/s390.c (s390_reorg): Remove loop.
2096
2097 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2098
2099 * config/darwin.c
2100 (darwin_function_switched_text_sections): Delete.
2101 * gcc/config/darwin.h
2102 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2103
2104 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2105
2106 PR target/81685
2107 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2108 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2109 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2110
2111 2018-08-15 Martin Liska <mliska@suse.cz>
2112
2113 PR tree-optimization/86925
2114 * predict.c (expr_expected_value_1): When taking
2115 later predictor, assign also probability.
2116 Use fold_build2_initializer_loc in order to fold
2117 the expression in -frounding-math.
2118
2119 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2120
2121 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2122 patterns.
2123 (expand_vec_perm_1): Try the new method.
2124
2125 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2126
2127 PR target/86547
2128 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2129 Check whether lra_live_max_point is 0 before dividing.
2130
2131 2018-08-14 Martin Sebor <msebor@redhat.com>
2132
2133 PR tree-optimization/86650
2134 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2135 (vrp_prop::check_mem_ref): Same.
2136
2137 2018-08-13 Liu Hao <lh_mouse@126.com>
2138
2139 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2140 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2141 and clear it thereafter, as it only works for DBCS.
2142
2143 2018-08-13 Liu Hao <lh_mouse@126.com>
2144
2145 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2146 handle returned by _get_osf_handle().
2147
2148 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2149
2150 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2151 for folding vec_perm.
2152
2153 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2154
2155 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2156 Add support for gimple-folding of vec_pack() and vec_unpack()
2157 intrinsics.
2158
2159 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2160
2161 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2162 vec_xst variants to the list.
2163 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2164 vector loads and stores.
2165
2166 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2167
2168 * config.gcc (rs6000-ibm-aix4.x): Delete.
2169 (rs6000-ibm-aix5.1): Delete.
2170 (rs6000-ibm-aix5.2): Delete.
2171 (rs6000-ibm-aix5.3): Delete.
2172 * config/rs6000/aix43.h: Delete.
2173 * config/rs6000/aix51.h: Delete.
2174 * config/rs6000/aix52.h: Delete.
2175 * config/rs6000/t-aix43: Delete.
2176
2177 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2178
2179 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2180 New function.
2181 (s390_decompose_address): Factor out constant pool ref
2182 decomposition.
2183
2184 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2185
2186 * config/nds32/nds32-predicates.c
2187 (nds32_can_use_bclr_p): Change return type as bool.
2188 (nds32_can_use_bset_p): Ditto.
2189 (nds32_can_use_btgl_p): Ditto.
2190 (nds32_can_use_bitci_p): Ditto.
2191 * config/nds32/nds32-protos.h
2192 (nds32_can_use_bclr_p): Change declaration.
2193 (nds32_can_use_bset_p): Ditto.
2194 (nds32_can_use_btgl_p): Ditto.
2195 (nds32_can_use_bitci_p): Ditto.
2196
2197 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2198
2199 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2200 Support -msched-prolog-epilog option.
2201 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2202
2203 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2204
2205 * common/config/nds32/nds32-common.c
2206 (nds32_option_optimization_table): Enalbe -malways-align.
2207
2208 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2209
2210 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2211 extra_headers.
2212 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2213 OPT_misr_secure_ case.
2214 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2215 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2216 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2217 secure attribute.
2218 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2219 (nds32_isr_info): New field security_level.
2220 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2221 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2222 * config/nds32/nds32.opt (misr-secure): New option.
2223 * config/nds32/nds32_init.inc: New file.
2224 * config/nds32/nds32_isr.h: New file.
2225
2226 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2227
2228 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2229 Update comment for atomic instructions.
2230 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2231 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2232 Remove.
2233 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2234 load for __ATOMIC_SEQ_CST model.
2235 (atomic_loaddi_1): Remove float register target.
2236 (atomic_storedi): Handle CONST_INT values.
2237 (atomic_storedi_1): Remove float register source. Add special case
2238 for zero value.
2239 (memory_barrier): New expander and insn.
2240
2241 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR tree-optimization/86835
2244 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2245 new_stmt after def_gsi, make sure to insert new_square_stmt after
2246 that stmt, not 2 stmts before it.
2247
2248 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2249
2250 PR target/82418
2251 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2252 instead of SWI48.
2253
2254 2018-08-10 Martin Liska <mliska@suse.cz>
2255
2256 PR target/83610
2257 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2258 function type.
2259 * builtins.c (expand_builtin_expect_with_probability):
2260 New function.
2261 (expand_builtin_expect_with_probability): New function.
2262 (build_builtin_expect_predicate): Add new argumnet probability
2263 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2264 (fold_builtin_expect):
2265 (fold_builtin_2):
2266 (fold_builtin_3):
2267 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2268 * builtins.h (fold_builtin_expect): Set new argument.
2269 * doc/extend.texi: Document __builtin_expect_with_probability.
2270 * doc/invoke.texi: Likewise.
2271 * gimple-fold.c (gimple_fold_call): Pass new argument.
2272 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2273 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2274 * predict.c (get_predictor_value): New function.
2275 (expr_expected_value): Add new argument probability. Assume
2276 that predictor and probability are always non-null.
2277 (expr_expected_value_1): Likewise. For __builtin_expect and
2278 __builtin_expect_with_probability set probability. Handle
2279 combination in binary expressions.
2280 (tree_predict_by_opcode): Simplify code by simply calling
2281 get_predictor_value.
2282 (pass_strip_predict_hints::execute): Add handling of
2283 BUILT_IN_EXPECT_WITH_PROBABILITY.
2284 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2285 new predictor.
2286 * tree.h (DECL_BUILT_IN_P): New function.
2287
2288 2018-08-10 Martin Liska <mliska@suse.cz>
2289
2290 PR tree-optimization/85799
2291 * passes.def: Add argument for pass_strip_predict_hints.
2292 * predict.c (class pass_strip_predict_hints): Add new argument
2293 early_p.
2294 (strip_predictor_early): New function.
2295 (pass_strip_predict_hints::execute): Call the function to
2296 strip predictors.
2297 (strip_predict_hints): New function.
2298 * predict.def: Fix comment.
2299
2300 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2301
2302 * Makefile.in: Clarify which tm.texi to copy over to assert the
2303 right to grant a GFDL license for all.
2304
2305 2018-08-09 Jeff Law <law@redhat.com>
2306
2307 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2308 unused variable.
2309
2310 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2311
2312 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2313 prototype.
2314
2315 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2316
2317 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2318 reductions for variable-length vectors.
2319
2320 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2321
2322 PR other/84889
2323 * common.opt (fdiagnostics-show-line-numbers): New option.
2324 * diagnostic-show-locus.c (class layout): Add fields
2325 "m_show_line_numbers_p" and "m_linenum_width";
2326 (num_digits): New function.
2327 (test_num_digits): New function.
2328 (layout::layout): Initialize new fields. Update m_x_offset
2329 logic to handle any left margin.
2330 (layout::print_source_line): Print line number when requested.
2331 (layout::start_annotation_line): New member function.
2332 (layout::print_annotation_line): Call it.
2333 (layout::print_leading_fixits): Likewise.
2334 (layout::print_trailing_fixits): Likewise. Update calls to
2335 move_to_column for new parameter.
2336 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2337 it to potentially call start_annotation_line.
2338 (layout::show_ruler): Call start_annotation_line.
2339 (selftest::test_line_numbers_multiline_range): New selftest.
2340 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2341 and selftest::test_line_numbers_multiline_range.
2342 * diagnostic.c (diagnostic_initialize): Initialize
2343 show_line_numbers_p.
2344 * diagnostic.h (struct diagnostic_context): Add field
2345 "show_line_numbers_p".
2346 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2347 -fno-diagnostics-show-line-numbers.
2348 * dwarf2out.c (gen_producer_string): Add
2349 OPT_fdiagnostics_show_line_numbers to the ignored options.
2350 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2351 one setting" options.
2352 (append_compiler_options): Likewise to the dropped options.
2353 (append_diag_options): Likewise to the passed-on options.
2354 * opts.c (common_handle_option): Handle the new option.
2355 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2356
2357 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2358
2359 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2360 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2361 third argument of type "const signed char" to descriptions of
2362 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2363 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2364 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2365 __builtin_bcdsub_ov functions.
2366
2367 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2368
2369 PR tree-optimization/86858
2370 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2371 flow_bb_inside_loop_p calls.
2372
2373 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2374
2375 PR tree-optimization/86871
2376 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2377 instead of gimple_assign_lhs.
2378
2379 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2380
2381 PR target/86887
2382 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2383 register constraint to operand 0.
2384 (add<mode>3_carryinC): Likewise.
2385 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2386
2387 2018-08-09 Martin Liska <mliska@suse.cz>
2388
2389 PR c/86895
2390 * common.opt: Remove extra line.
2391
2392 2018-08-09 Martin Liska <mliska@suse.cz>
2393
2394 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2395 at the end of a line, make first letter capital and end up
2396 a sentence with a dot.
2397 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2398 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2399 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2400 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2401 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2402 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2403 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2404 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2405 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2406 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2407 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2408 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2409 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2410 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2411 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2412 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2413 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2414 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2415
2416 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2417
2418 PR target/84332
2419 * config/s390/s390.c (s390_option_override_internal): Reduce the
2420 stack-clash-protection-probe-interval param if it would be too big
2421 for z900.
2422
2423 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2424
2425 PR target/46179
2426 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2427 * config/m68k/m68k.c (handle_move_double): Don't call
2428 m68k_final_prescan_insn.
2429 (m68k_adjust_decorated_operand): Renamed from
2430 m68k_final_prescan_insn, remove first and third operand and
2431 simplify.
2432 (print_operand): Call it.
2433 (print_operand_address): Call it.
2434
2435 2018-08-08 Nathan Sidwell <nathan@acm.org>
2436
2437 * diagnostic.c (diagnostic_report_current_module): Use
2438 linemap_included_from & linemap_included_from_linemap.
2439
2440 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2441
2442 * config/aarch64/aarch64-cores.def: Add phecda core.
2443 * config/aarch64/aarch64-tune.md: Regenerate.
2444 * doc/invoke.texi: Add phecda core.
2445
2446 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2447
2448 PR target/85295
2449 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2450 definitions.
2451 * config/s390/s390.md ("movti"): Add more alternatives for
2452 constant to GPR copies.
2453
2454 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2455
2456 * config/s390/s390.c: Fix whitespace damage throughout the file.
2457 * config/s390/s390.h: Likewise.
2458 * config/s390/tpf.h: Likewise.
2459
2460 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2461
2462 * config/s390/s390.c (s390_loadrelative_operand_p):
2463 Remove TARGET_CPU_ZARCH usages.
2464 (s390_rtx_costs): Likewise.
2465 (s390_legitimate_constant_p): Likewise.
2466 (s390_cannot_force_const_mem): Likewise.
2467 (legitimate_reload_constant_p): Likewise.
2468 (s390_preferred_reload_class): Likewise.
2469 (legitimize_pic_address): Likewise.
2470 (legitimize_tls_address): Likewise.
2471 (s390_split_branches): Removed.
2472 (s390_add_execute): Removed.
2473 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2474 (s390_mainpool_start): Likewise.
2475 (s390_mainpool_finish): Likewise.
2476 (s390_mainpool_cancel): Removed.
2477 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2478 (s390_chunkify_cancel): Likewise.
2479 (s390_return_addr_rtx): Likewise.
2480 (s390_register_info): Remove split_branches_pending_p uages.
2481 (s390_optimize_register_info): Likewise.
2482 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2483 split_branches_pending_p usages.
2484 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2485 (s390_load_got): Likewise.
2486 (s390_expand_split_stack_prologue): Likewise.
2487 (output_asm_nops): Likewise.
2488 (s390_function_profiler): Likewise.
2489 (s390_emit_call): Likewise.
2490 (s390_conditional_register_usage): Likewise.
2491 (s390_optimize_prologue): Likewise.
2492 (s390_reorg): Remove TARGET_CPU_ZARCH and
2493 split_branches_pending_p usages.
2494 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2495 usages.
2496 (s390_output_indirect_thunk_function): Likewise.
2497 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2498 (TARGET_CPU_ZARCH_P): Removed.
2499 (struct machine_function): Remove split_branches_pending_p.
2500 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2501
2502 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2503
2504 * common/config/s390/s390-common.c (processor_flags_table):
2505 Remove flags.
2506 * config.gcc: Remove with_arch/with_tune support.
2507 * config/s390/2064.md: Remove cpu attribute comparisons.
2508 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2509 Remove MTN.
2510 * config/s390/linux.h (ASM_SPEC):
2511 Remove -march support.
2512 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2513 Use a table to get an arch level.
2514 * config/s390/s390-opts.h (enum processor_type):
2515 Remove enum values.
2516 * config/s390/s390.c
2517 (processor_table): Remove entries, add arch_level values.
2518 (s390_issue_rate): Remove cases.
2519 (s390_option_override): Adjust
2520 s390_option_override_internal() call.
2521 (s390_option_override_internal): Remove deprecation warning.
2522 (s390_valid_target_attribute_tree): Adjust
2523 s390_option_override_internal() call.
2524 * config/s390/s390.h (struct s390_processor):
2525 Share with s390-c.c, add arch_level field.
2526 * config/s390/s390.md:
2527 Remove occurrences in cpu attribute.
2528 * config/s390/s390.opt: Remove -march/-mtune support.
2529 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2530 * doc/invoke.texi: Remove deprecation warning.
2531
2532 2018-08-08 Luis Machado <luis.machado@linaro.org>
2533
2534 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2535 global.
2536 (qdf24xx_tunings): Set vector cost structure to
2537 qdf24xx_vector_cost.
2538
2539 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2540 <register_sextend>: Set to 3.
2541
2542 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2543
2544 PR target/86838
2545 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2546 * config/aarch64/aarch64-simd.md
2547 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2548 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2549 (aarch64_frecpx<mode>): ...this new pattern.
2550 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2551 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2552
2553 2018-08-07 Martin Liska <mliska@suse.cz>
2554
2555 PR middle-end/83023
2556 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2557 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2558 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2559 * doc/extend.texi: Document that malloc attribute adds
2560 hit to compiler.
2561
2562 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2563
2564 PR target/86785
2565 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2566 Define to speculation_safe_value_not_needed.
2567
2568 2018-08-06 Jeff Law <law@redhat.com>
2569
2570 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2571 the vr_values instance to cprop_into_stmt.
2572 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2573 (cprop_operand): Also query EVRP to determine if OP is a constant.
2574
2575 2018-08-06 Nathan Sidwell <nathan@acm.org>
2576
2577 * diagnostic.c (diagnostic_report_current_module): Reroll
2578 included-at loop. Translate text.
2579
2580 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2581
2582 * function-tests.c (selftest::test_expansion_to_rtl): Call
2583 free_after_compilation.
2584
2585 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2586
2587 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2588
2589 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2590
2591 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2592 loops with memory block operations from getting unrolled.
2593
2594 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2595
2596 PR target/86807
2597 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2598 Define to speculation_safe_value_not_needed.
2599
2600 2018-08-06 Jeff Law <law@redhat.com>
2601
2602 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2603 assert.
2604
2605 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2606
2607 PR target/86662
2608 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2609 with all enabled __intN types.
2610
2611 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2612
2613 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2614
2615 * alias.c (record_set): Check for clobber high.
2616 * cfgexpand.c (expand_gimple_stmt): Likewise.
2617 * combine-stack-adj.c (single_set_for_csa): Likewise.
2618 * combine.c (find_single_use_1): Likewise.
2619 (set_nonzero_bits_and_sign_copies): Likewise.
2620 (get_combine_src_dest): Likewise.
2621 (is_parallel_of_n_reg_sets): Likewise.
2622 (try_combine): Likewise.
2623 (record_dead_and_set_regs_1): Likewise.
2624 (reg_dead_at_p_1): Likewise.
2625 (reg_dead_at_p): Likewise.
2626 * dce.c (deletable_insn_p): Likewise.
2627 (mark_nonreg_stores_1): Likewise.
2628 (mark_nonreg_stores_2): Likewise.
2629 * df-scan.c (df_find_hard_reg_defs): Likewise.
2630 (df_uses_record): Likewise.
2631 (df_get_call_refs): Likewise.
2632 * dwarf2out.c (mem_loc_descriptor): Likewise.
2633 * haifa-sched.c (haifa_classify_rtx): Likewise.
2634 * ira-build.c (create_insn_allocnos): Likewise.
2635 * ira-costs.c (scan_one_insn): Likewise.
2636 * ira.c (equiv_init_movable_p): Likewise.
2637 (rtx_moveable_p): Likewise.
2638 (interesting_dest_for_shprep): Likewise.
2639 * jump.c (mark_jump_label_1): Likewise.
2640 * postreload-gcse.c (record_opr_changes): Likewise.
2641 * postreload.c (reload_cse_simplify): Likewise.
2642 (struct reg_use): Add source expr.
2643 (reload_combine): Check for clobber high.
2644 (reload_combine_note_use): Likewise.
2645 (reload_cse_move2add): Likewise.
2646 (move2add_note_store): Likewise.
2647 * print-rtl.c (print_pattern): Likewise.
2648 * recog.c (decode_asm_operands): Likewise.
2649 (store_data_bypass_p): Likewise.
2650 (if_test_bypass_p): Likewise.
2651 * regcprop.c (kill_clobbered_value): Likewise.
2652 (kill_set_value): Likewise.
2653 * reginfo.c (reg_scan_mark_refs): Likewise.
2654 * reload1.c (maybe_fix_stack_asms): Likewise.
2655 (eliminate_regs_1): Likewise.
2656 (elimination_effects): Likewise.
2657 (mark_not_eliminable): Likewise.
2658 (scan_paradoxical_subregs): Likewise.
2659 (forget_old_reloads_1): Likewise.
2660 * reorg.c (find_end_label): Likewise.
2661 (try_merge_delay_insns): Likewise.
2662 (redundant_insn): Likewise.
2663 (own_thread_p): Likewise.
2664 (fill_simple_delay_slots): Likewise.
2665 (fill_slots_from_thread): Likewise.
2666 (dbr_schedule): Likewise.
2667 * resource.c (update_live_status): Likewise.
2668 (mark_referenced_resources): Likewise.
2669 (mark_set_resources): Likewise.
2670 * rtl.c (copy_rtx): Likewise.
2671 * rtlanal.c (reg_referenced_p): Likewise.
2672 (single_set_2): Likewise.
2673 (noop_move_p): Likewise.
2674 (note_stores): Likewise.
2675 * sched-deps.c (sched_analyze_reg): Likewise.
2676 (sched_analyze_insn): Likewise.
2677
2678 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2679
2680 * cse.c (invalidate_reg): New function extracted from...
2681 (invalidate): ...here.
2682 (canonicalize_insn): Check for clobber high.
2683 (invalidate_from_clobbers): invalidate clobber highs.
2684 (invalidate_from_sets_and_clobbers): Likewise.
2685 (count_reg_usage): Check for clobber high.
2686 (insn_live_p): Likewise.
2687 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2688 (cselib_invalidate_regno): Check for clobber in setter.
2689 (cselib_invalidate_rtx): Pass through setter.
2690 (cselib_invalidate_rtx_note_stores):
2691 (cselib_process_insn): Check for clobber high.
2692 * cselib.h (cselib_invalidate_rtx): Add operand.
2693
2694 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2695
2696 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2697 (mark_not_eliminable): Likewise.
2698 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2699 * lra-lives.c (process_bb_lives): Check for clobber high.
2700 * lra.c (new_insn_reg): Remember clobber highs.
2701 (collect_non_operand_hard_regs): Check for clobber high.
2702 (lra_set_insn_recog_data): Likewise.
2703 (add_regs_to_insn_regno_info): Likewise.
2704 (lra_update_insn_regno_info): Likewise.
2705
2706 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2707
2708 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2709 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2710
2711 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2712
2713 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2714 (copy_insn_1): Likewise.
2715 (gen_hard_reg_clobber_high): New gen function.
2716 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2717 * genemit.c (gen_exp): Likewise.
2718 (gen_emit_seq): Pass through info.
2719 (gen_insn): Check for CLOBBER_HIGH.
2720 (gen_expand): Pass through info.
2721 (gen_split): Likewise.
2722 (output_add_clobbers): Likewise.
2723 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2724 (remove_clobbers): Likewise.
2725 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2726
2727 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2728
2729 * doc/rtl.texi (clobber_high): Add.
2730 (parallel): Add in clobber high
2731 * rtl.c (rtl_check_failed_code3): Add function.
2732 * rtl.def (CLOBBER_HIGH): Add expression.
2733 * rtl.h (RTL_CHECKC3): Add macro.
2734 (rtl_check_failed_code3): Add declaration.
2735 (XC3EXP): Add macro.
2736
2737 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2738
2739 PR target/86386
2740 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2741 cfun->machine->max_used_stack_alignment if needed.
2742
2743 2018-08-04 Martin Sebor <msebor@redhat.com>
2744
2745 PR tree-optimization/86571
2746 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2747 NaN output to 4.
2748
2749 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2750
2751 PR target/86799
2752 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2753 Define.
2754
2755 2018-08-03 Jeff Law <law@redhat.com>
2756
2757 PR target/86795
2758 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2759 Define to speculation_safe_value_not_needed.
2760
2761 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2762
2763 * doc/gcov.texi (-x): Remove duplicate "to".
2764 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2765 (-Wif-not-aligned): Remove duplicate "is".
2766 (-flto): Remove duplicate "the".
2767 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2768 duplicate "v5.00.b".
2769 (MSP430 Options): Remove duplicate "and" from the description
2770 of "-mgprel-sec=regexp".
2771 (x86 Options): Remove duplicate copies of "vmldLog102" and
2772 vmlsLog104 from description of "-mveclibabi=type".
2773
2774 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2775
2776 * internal-fn.h (first_commutative_argument): Declare.
2777 * internal-fn.c (first_commutative_argument): New function.
2778 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2779 restrictions for pattern statements. Use first_commutative_argument
2780 to look for commutative operands in calls to internal functions.
2781
2782 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2783
2784 * Makefile.in (wide-int-range.o): New.
2785 * tree-vrp.c: Move all the wide_int_* functions to...
2786 * wide-int-range.cc: ...here.
2787 * tree-vrp.h: Move all the wide_int_* prototypes to...
2788 * wide-int-range.h: ...here.
2789
2790 2018-08-03 Tom de Vries <tdevries@suse.de>
2791
2792 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2793 UI_NONE.
2794 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2795 * except.c (output_function_exception_table): Do early exit if
2796 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2797
2798 2018-08-03 Martin Liska <mliska@suse.cz>
2799
2800 * predict.c (dump_prediction): Change to 2 digits
2801 in fraction part.
2802
2803 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2804
2805 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2806 neon_dup_q to...
2807 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2808
2809 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2810
2811 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2812 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2813 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2814 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2815 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2816
2817 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2818
2819 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2820 pp_take_prefix when saving the existing prefix.
2821 * diagnostic.c (diagnostic_append_note): Likewise.
2822 * langhooks.c (lhd_print_error_function): Likewise.
2823 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2824 param's type. Free the existing prefix.
2825 (pp_take_prefix): New function.
2826 (pretty_printer::pretty_printer): Drop the prefix parameter.
2827 Rename the length parameter to match the comment.
2828 (pretty_printer::~pretty_printer): Free the prefix.
2829 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2830 parameter.
2831 (struct pretty_printer): Drop the "const" from "prefix" field's
2832 type and clarify memory management.
2833 (pp_set_prefix): Drop the "const" from the 2nd param.
2834 (pp_take_prefix): New decl.
2835
2836 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2837
2838 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2839 for word_mode_ok here instead of passing as argument.
2840 (expand_block_compare): Change select_block_compare_mode() call.
2841 (expand_strncmp_gpr_sequence): New function.
2842 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2843
2844 2018-08-02 Jeff Law <law@redhat.com>
2845
2846 PR target/86790
2847 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2848 Define to speculation_safe_value_not_needed.
2849
2850 PR target/86784
2851 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2852 Define to speculation_safe_value_not_needed.
2853
2854 2018-08-02 Tom de Vries <tdevries@suse.de>
2855
2856 PR target/86660
2857 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2858 function. Return UI_TARGET unconditionally.
2859 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2860 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2861
2862 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2863
2864 * genemit.c (print_overload_test): Fix typo.
2865
2866 2018-08-02 Richard Biener <rguenther@suse.de>
2867
2868 PR tree-optimization/86816
2869 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2870 which checks for value availability before querying it.
2871 (gvn_uses_equal): Use it.
2872 (same_succ_hash): Likewise.
2873 (gimple_equal_p): Likewise.
2874
2875 2018-08-02 Nick Clifton <nickc@redhat.com>
2876
2877 PR target/86813
2878 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2879 Define to speculation_safe_value_not_needed.
2880
2881 PR target/86810
2882 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2883 Define to speculation_safe_value_not_needed.
2884
2885 PR target/86810
2886 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2887 Define to speculation_safe_value_not_needed.
2888
2889 PR target/86803
2890 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2891 Define to speculation_safe_value_not_needed.
2892
2893 PR target/86797
2894 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2895 Define to speculation_safe_value_not_needed.
2896
2897 PR target/86791
2898 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2899 Define to speculation_safe_value_not_needed.
2900
2901 PR target/86789
2902 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2903 Define to speculation_safe_value_not_needed.
2904
2905 PR target/86787
2906 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2907 Define to speculation_safe_value_not_needed.
2908
2909 PR target/86782
2910 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2911 speculation_safe_value_not_needed.
2912
2913 PR target/86781
2914 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2915 to speculation_safe_value_not_needed.
2916
2917 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2918
2919 * doc/md.texi: Expand the documentation of instruction names
2920 to mention port-local uses. Document '@' in pattern names.
2921 * read-md.h (overloaded_instance, overloaded_name): New structs.
2922 (mapping): Declare.
2923 (md_reader::handle_overloaded_name): New member function.
2924 (md_reader::get_overloads): Likewise.
2925 (md_reader::m_first_overload): New member variable.
2926 (md_reader::m_next_overload_ptr): Likewise.
2927 (md_reader::m_overloads_htab): Likewise.
2928 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2929 m_next_overload_ptr and m_overloads_htab.
2930 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2931 (get_mode_token, get_code_token, get_int_token): New functions.
2932 (map_attr_string): Add an optional argument that passes back
2933 the associated iterator.
2934 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2935 (md_reader::handle_overloaded_name, add_overload_instance): New
2936 functions.
2937 (apply_iterators): Handle '@' names. Report an error if '@'
2938 is used without iterators.
2939 (initialize_iterators): Initialize the new iterator_group fields.
2940 * genopinit.c (handle_overloaded_code_for)
2941 (handle_overloaded_gen): New functions.
2942 (main): Use them to print declarations of maybe_code_for_* and
2943 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2944 * genemit.c (print_overload_arguments, print_overload_test)
2945 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2946 (main): Use it to print definitions of maybe_code_for_* and
2947 maybe_gen_* functions.
2948 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2949 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2950 instead of explicit mode checks.
2951 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2952 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2953 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2954 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2955 (aarch64_expand_compare_and_swap): Likewise
2956 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2957 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2958 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2959 (aarch64_constant_pool_reload_icode): Delete.
2960 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2961 instead of aarch64_constant_pool_reload_icode. Use
2962 code_for_aarch64_reload_mov instead of explicit mode checks.
2963 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2964 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2965 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2966 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2967 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2968 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2969 (aarch64_atomic_load_op_code): Delete.
2970 (aarch64_emit_atomic_load_op): Likewise.
2971 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2972 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2973 instead of aarch64_emit_atomic_load_op.
2974 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2975 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2976 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2977 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2978 character before the pattern name.
2979 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2980 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2981 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2982 (aarch64_frecps<mode>): Likewise.
2983 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2984 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2985 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2986 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2987 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2988
2989 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2990
2991 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2992 Allow HFmode constants if TARGET_FP_F16INST.
2993
2994 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2995
2996 PR target/86014
2997 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2998 No longer check last store for clobber of address register.
2999
3000 2018-08-02 Martin Liska <mliska@suse.cz>
3001
3002 PR gcov-profile/86817
3003 * gcov.c (process_all_functions): New function.
3004 (main): Call it.
3005 (process_file): Move functions processing to
3006 process_all_functions.
3007
3008 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3009
3010 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3011 "const" to the "gimple *" and "rtx_insn *" parameters.
3012 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3013 Likewise.
3014 (dump_location_t::dump_location_t): Likewise.
3015
3016 2018-08-01 Martin Sebor <msebor@redhat.com>
3017
3018 PR tree-optimization/86650
3019 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3020 rather than a "gcall *". Directly pass the data of interest
3021 to percent_K_format, rather than building a temporary CALL_EXPR
3022 to hold it.
3023 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3024 (gimple_fold_builtin_strncat): Adjust.
3025 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3026 gcall* argument with gimple*.
3027 * gimple-ssa-warn-restrict.c (check_call): Same.
3028 (wrestrict_dom_walker::before_dom_children): Same.
3029 (builtin_access::builtin_access): Same.
3030 (check_bounds_or_overlap): Same
3031 (maybe_diag_overlap): Same.
3032 (maybe_diag_offset_bounds): Same.
3033 * tree-diagnostic.c (default_tree_printer): Move usage of
3034 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3035 to this callsite.
3036 * tree-pretty-print.c (percent_K_format): Add argument.
3037 * tree-pretty-print.h: Add argument.
3038 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3039 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3040 (maybe_diag_stxncpy_trunc): Same.
3041 (handle_builtin_stxncpy): Same.
3042 (handle_builtin_strcat): Same.
3043
3044 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3045
3046 * match.pd: Optimise pointer range checks.
3047
3048 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3049
3050 PR tree-optimization/86758
3051 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3052 to remove pattern statements.
3053
3054 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3055
3056 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3057 result of dfs_enumerate_from when constructing stmt_vec_infos,
3058 instead of additionally calling get_loop_body.
3059
3060 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3061
3062 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3063 parameter.
3064 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3065 When creating an iv, assert that the step is not known to be zero.
3066 (vect_setup_realignment): Update call accordingly.
3067 * tree-vect-stmts.c (vectorizable_store): Likewise.
3068 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3069
3070 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3071
3072 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3073 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3074 (vectorizable_reduction): Likewise.
3075 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3076 (vect_detect_hybrid_slp_stmts): Likewise.
3077 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3078
3079 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3080
3081 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3082 (wide_int_set_zero_nonzero_bits): ...this.
3083 (zero_nonzero_bits_from_vr): Rename to...
3084 (vrp_set_zero_nonzero_bits): ...this.
3085 (extract_range_from_multiplicative_op_1): Abstract wide int
3086 code...
3087 (wide_int_range_multiplicative_op): ...here.
3088 (extract_range_from_binary_expr_1): Extract wide int binary
3089 operations into their own functions.
3090 (wide_int_range_lshift): New.
3091 (wide_int_range_can_optimize_bit_op): New.
3092 (wide_int_range_shift_undefined_p): New.
3093 (wide_int_range_bit_xor): New.
3094 (wide_int_range_bit_ior): New.
3095 (wide_int_range_bit_and): New.
3096 (wide_int_range_trunc_mod): New.
3097 (extract_range_into_wide_ints): New.
3098 (vrp_shift_undefined_p): New.
3099 (extract_range_from_multiplicative_op): New.
3100 (vrp_can_optimize_bit_op): New.
3101 * tree-vrp.h (value_range::dump): New.
3102 (wide_int_range_multiplicative_op): New.
3103 (wide_int_range_lshift):New.
3104 (wide_int_range_shift_undefined_p): New.
3105 (wide_int_range_bit_xor): New.
3106 (wide_int_range_bit_ior): New.
3107 (wide_int_range_bit_and): New.
3108 (wide_int_range_trunc_mod): New.
3109 (zero_nonzero_bits_from_bounds): Rename to...
3110 (wide_int_set_zero_nonzero_bits): ...this.
3111 (zero_nonzero_bits_from_vr): Rename to...
3112 (vrp_set_zero_nonzero_bits): ...this.
3113 (range_easy_mask_min_max): Rename to...
3114 (wide_int_range_can_optimize_bit_op): this.
3115 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3116 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3117
3118 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3119
3120 * tree-vectorizer.h (vect_orig_stmt): New function.
3121 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3122 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3123 (vect_create_epilog_for_reduction): Likewise.
3124 (vectorizable_live_operation): Likewise.
3125 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3126 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3127 * tree-vect-stmts.c (vectorizable_call): Likewise.
3128 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3129
3130 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3131
3132 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3133 argument.
3134 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3135 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3136 (vect_transform_loop): Likewise.
3137 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3138
3139 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3140
3141 * tree-vectorizer.h (vect_schedule_slp): Return void.
3142 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3143 (vect_schedule_slp): Likewise.
3144
3145 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3146
3147 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3148 argument.
3149 (vect_transform_loop): Update calls accordingly. Schedule SLP
3150 instances before the main loop, if any exist.
3151
3152 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3153
3154 PR tree-optimization/86749
3155 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3156 If the lhs is used in a COND_EXPR, check that it is being used
3157 as the "then" or "else" value.
3158
3159 2018-08-01 Tom de Vries <tdevries@suse.de>
3160
3161 PR target/86800
3162 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3163 speculation_safe_value_not_needed.
3164
3165 2018-08-01 Richard Biener <rguenther@suse.de>
3166
3167 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3168 as base and offset.
3169
3170 2018-08-01 Martin Liska <mliska@suse.cz>
3171
3172 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3173 format how successful transformation is dumped.
3174 (gimple_mod_pow2_value_transform): Likewise.
3175 (gimple_mod_subtract_transform): Likewise.
3176 (gimple_stringops_transform): Likewise.
3177
3178 2018-08-01 Martin Liska <mliska@suse.cz>
3179
3180 PR value-prof/35543
3181 * value-prof.c (interesting_stringop_to_profile_p):
3182 Simplify the code and add BUILT_IN_MEMMOVE.
3183 (gimple_stringops_transform): Likewise.
3184
3185 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3186
3187 * config/aarch64/aarch64-simd.md
3188 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3189 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3190 use GPI iterator instead of SI mode.
3191
3192 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3193
3194 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3195 rs6000_speculation_barrier.
3196 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3197 new barrier pattern name.
3198
3199 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3200
3201 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3202 (speculation_barrier): New insn.
3203
3204 2018-08-01 Richard Biener <rguenther@suse.de>
3205
3206 PR bootstrap/86724
3207 * graphite.h: Include isl/id.h and isl/space.h to allow build
3208 with ISL 0.20.
3209
3210 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3211
3212 PR target/86651
3213 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3214 mode for COFF targets.
3215 * defaults.h (TARGET_COFF): Define.
3216 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3217 TARGET_COFF): Define.
3218 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3219 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3220 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3221
3222 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3223
3224 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3225 * gimple-streamer-out.c (output_bb): Save it.
3226 * lto-streamer-in.c (input_struct_function_base): Restore
3227 instance discriminator if available. Create map on demand.
3228 * lto-streamer-out.c (output_struct_function_base): Save it if
3229 available.
3230 * final.c (decl_to_instance_map): Document LTO strategy.
3231
3232 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3233 Olivier Hainque <hainque@adacore.com>
3234
3235 * debug.h (decl_to_instance_map_t): New type.
3236 (decl_to_instance_map): Declare.
3237 (maybe_create_decl_to_instance_map): New inline function.
3238 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3239 to track basic block discriminators.
3240 (final_start_function_1): Initialize them.
3241 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3242 bb_discriminator.
3243 (decl_to_instance_map): New variable.
3244 (map_decl_to_instance, maybe_set_discriminator): New functions.
3245 (notice_source_line): Set discriminator.
3246
3247 2018-07-31 Ian Lance Taylor <iant@golang.org>
3248
3249 * targhooks.c (default_have_speculation_safe_value): Add
3250 ATTRIBUTE_UNUSED.
3251
3252 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3253
3254 * dump-context.h: Include "pretty-print.h".
3255 (dump_context::refresh_dumps_are_enabled): New decl.
3256 (dump_context::emit_item): New decl.
3257 (class dump_context): Add fields "m_test_pp" and
3258 "m_test_pp_flags".
3259 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3260 (temp_dump_context::get_dumped_text): New decl.
3261 (class temp_dump_context): Add field "m_pp".
3262 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3263 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3264 m_test_pp.
3265 (set_dump_file): Update for above change.
3266 (set_alt_dump_file): Likewise.
3267 (dump_loc): New overload, taking a pretty_printer *.
3268 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3269 to any test pretty-printer.
3270 (make_item_for_dump_gimple_stmt): New function, adapted from
3271 optinfo::add_gimple_stmt.
3272 (dump_context::dump_gimple_stmt): Call it, and use the result,
3273 eliminating the direct usage of dump_file and alt_dump_file in
3274 favor of indirectly using them via emit_item.
3275 (make_item_for_dump_gimple_expr): New function, adapted from
3276 optinfo::add_gimple_expr.
3277 (dump_context::dump_gimple_expr): Call it, and use the result,
3278 eliminating the direct usage of dump_file and alt_dump_file in
3279 favor of indirectly using them via emit_item.
3280 (make_item_for_dump_generic_expr): New function, adapted from
3281 optinfo::add_tree.
3282 (dump_context::dump_generic_expr): Call it, and use the result,
3283 eliminating the direct usage of dump_file and alt_dump_file in
3284 favor of indirectly using them via emit_item.
3285 (make_item_for_dump_printf_va): New function, adapted from
3286 optinfo::add_printf_va.
3287 (make_item_for_dump_printf): New function.
3288 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3289 and use the result, eliminating the direct usage of dump_file and
3290 alt_dump_file in favor of indirectly using them via emit_item.
3291 (make_item_for_dump_dec): New function.
3292 (dump_context::dump_dec): Call it, and use the result,
3293 eliminating the direct usage of dump_file and alt_dump_file in
3294 favor of indirectly using them via emit_item.
3295 (make_item_for_dump_symtab_node): New function, adapted from
3296 optinfo::add_symtab_node.
3297 (dump_context::dump_symtab_node): Call it, and use the result,
3298 eliminating the direct usage of dump_file and alt_dump_file in
3299 favor of indirectly using them via emit_item.
3300 (dump_context::begin_scope): Reimplement, avoiding direct usage
3301 of dump_file and alt_dump_file in favor of indirectly using them
3302 via emit_item.
3303 (dump_context::emit_item): New member function.
3304 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3305 Set up test pretty-printer on the underlying context. Call
3306 refresh_dumps_are_enabled.
3307 (temp_dump_context::~temp_dump_context): Call
3308 refresh_dumps_are_enabled.
3309 (temp_dump_context::get_dumped_text): New member function.
3310 (selftest::verify_dumped_text): New function.
3311 (ASSERT_DUMPED_TEXT_EQ): New macro.
3312 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3313 and then without optinfo enabled. Add uses of
3314 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3315 * dumpfile.h: Update comment for the dump_* API.
3316 * optinfo-emit-json.cc
3317 (selftest::test_building_json_from_dump_calls): Update for new
3318 param for temp_dump_context ctor.
3319 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3320 and "m_owned" field.
3321 (optinfo_item::~optinfo_item): Likewise.
3322 (optinfo::add_item): New member function.
3323 (optinfo::emit): Update comment.
3324 (optinfo::add_string): Delete.
3325 (optinfo::add_printf): Delete.
3326 (optinfo::add_printf_va): Delete.
3327 (optinfo::add_gimple_stmt): Delete.
3328 (optinfo::add_gimple_expr): Delete.
3329 (optinfo::add_tree): Delete.
3330 (optinfo::add_symtab_node): Delete.
3331 (optinfo::add_dec): Delete.
3332 * optinfo.h (class dump_context): New forward decl.
3333 (optinfo::add_item): New decl.
3334 (optinfo::add_string): Delete.
3335 (optinfo::add_printf): Delete.
3336 (optinfo::add_printf_va): Delete.
3337 (optinfo::add_gimple_stmt): Delete.
3338 (optinfo::add_gimple_expr): Delete.
3339 (optinfo::add_tree): Delete.
3340 (optinfo::add_symtab_node): Delete.
3341 (optinfo::add_dec): Delete.
3342 (optinfo::add_poly_int): Delete.
3343 (optinfo_item::optinfo_item): Remove "owned" param.
3344 (class optinfo_item): Remove field "m_owned".
3345
3346 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3347
3348 PR middle-end/86705
3349 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3350 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3351 requested variable alignment.
3352 (expand_one_ssa_partition): Likewise.
3353 (expand_one_var): Likewise.
3354
3355 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3356
3357 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3358 to speculation_safe_value_not_needed.
3359
3360 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3361
3362 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3363 * targhooks.c (speculation_safe_value_not_needed): New function.
3364 * target.def (have_speculation_safe_value): Update documentation.
3365 * doc/tm.texi: Regenerated.
3366
3367 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3368
3369 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3370 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3371 expand.
3372 (despeculate_copy<ALLI:mode>_insn): New insn.
3373 (despeculate_copyti_insn): New insn.
3374 (despeculate_simple<ALLI:mode>): New insn
3375 (despeculate_simpleti): New insn.
3376 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3377 function.
3378 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3379 aarch64_speculation_safe_value.
3380 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3381
3382 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3383
3384 * config/aarch64/aarch64-speculation.cc: New file.
3385 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3386 before pass_reorder_blocks.
3387 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3388 prototype.
3389 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3390 X14 and X15 when tracking speculation.
3391 * config/aarch64/aarch64.md (register name constants): Add
3392 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3393 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3394 (speculation_barrier): New insn attribute.
3395 (cmp<mode>): Allow SP in comparisons.
3396 (speculation_tracker): New insn.
3397 (speculation_barrier): Add speculation_barrier attribute.
3398 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3399 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3400 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3401
3402 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3403
3404 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3405 aarch64_track_speculation is true.
3406 (tb<optab><mode>1): Likewise.
3407 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3408 generate CB[N]Z when tracking speculation.
3409 (aarch64_split_compare_and_swap): Likewise.
3410 (aarch64_split_atomic_op): Likewise.
3411
3412 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3413
3414 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3415
3416 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3417
3418 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3419 (speculation_barrier): New insn.
3420
3421 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3422
3423 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3424 * config/arm/arm.md (speculation_barrier): New expand.
3425 (speculation_barrier_insn): New pattern.
3426
3427 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3428
3429 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3430 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3431 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3432 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3433 list.
3434 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3435 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3436 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3437 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3438 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3439 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3440 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3441 * builtins.c (expand_speculation_safe_value): New function.
3442 (expand_builtin): Call it.
3443 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3444 * doc/extend.texi: Document __builtin_speculation_safe_value.
3445 * doc/md.texi: Document "speculation_barrier" pattern.
3446 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3447 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3448 * doc/tm.texi: Regenerated.
3449 * target.def (have_speculation_safe_value, speculation_safe_value): New
3450 hooks.
3451 * targhooks.c (default_have_speculation_safe_value): New function.
3452 (default_speculation_safe_value): New function.
3453 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3454 (default_speculation_safe_value): Add prototype.
3455
3456 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3457
3458 * dump-context.h (dump_context::dump_loc): New decl.
3459 * dumpfile.c (dump_context::dump_loc): New member function.
3460 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3461 and dump_gimple_stmt.
3462 (dump_context::dump_gimple_expr_loc): Likewise, using
3463 dump_gimple_expr.
3464 (dump_context::dump_generic_expr_loc): Likewise, using
3465 dump_generic_expr.
3466 (dump_context::dump_printf_loc_va): Likewise, using
3467 dump_printf_va.
3468 (dump_context::begin_scope): Explicitly using the global function
3469 "dump_loc", rather than the member function.
3470
3471 2018-07-31 Martin Sebor <msebor@redhat.com>
3472
3473 PR tree-optimization/86741
3474 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3475
3476 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3477
3478 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3479 depend on whether prefetch instructions will be emitted or not.
3480 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3481 will be emitted or not.
3482 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3483 (TARGET_SETMEM_PFD): New macros.
3484
3485 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3486
3487 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3488 (NULL_STMT_VEC_INFO): Delete.
3489 (stmt_vec_info::operator*): Likewise.
3490 (stmt_vec_info::operator gimple *): Likewise.
3491 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3492 of NULL_STMT_VEC_INFO.
3493 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3494 (vect_reassociating_reduction_p): Likewise.
3495 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3496 (vectorizable_store): Likewise.
3497 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3498 (vec_info::free_stmt_vec_infos): Likewise.
3499
3500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3501
3502 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3503 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3504
3505 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3506
3507 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3508 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3509 (vec_info::free_stmt_vec_info): New private member functions.
3510 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3511 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3512 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3513 set_stmt_vec_info_vec and free_stmt_vec_infos.
3514 * tree-vect-loop.c (_loop_vec_info): Remove call to
3515 set_stmt_vec_info_vec.
3516 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3517 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3518 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3519 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3520 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3521 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3522 with the clearing in the xcalloc.
3523 (stmt_vec_info_vec): Delete.
3524 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3525 (vectorize_loops): Likewise.
3526 (vec_info::~vec_info): Remove argument from call to
3527 free_stmt_vec_infos.
3528 (vec_info::add_stmt): Remove vinfo argument from call to
3529 new_stmt_vec_info.
3530
3531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3532
3533 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3534 rather than a gimple stmt.
3535 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3536 information for pattern statements when passed the original
3537 statement; instead wait to be passed the pattern statement itself.
3538 Don't call set_vinfo_for_stmt here.
3539 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3540 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3541 stmt_vec_infos here.
3542 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3543 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3544 stmt_vec_infos entry.
3545
3546 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3547
3548 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3549 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3550 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3551 * tree-vect-stmts.c (vectorizable_call): Likewise.
3552 (vectorizable_simd_clone_call): Likewise.
3553
3554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3555
3556 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3557 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3558 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3559 * tree-vect-loop.c (vect_transform_loop): Likewise.
3560 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3561 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3562
3563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3564
3565 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3566 (vect_dr_stmt): Delete.
3567 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3568 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3569 of DR_VECT_AUX.
3570 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3571 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3572 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3573 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3574 (vect_analyze_data_refs): Likewise.
3575 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3576 argument.
3577 (vect_find_same_alignment_drs): Likewise.
3578 (vect_slp_analyze_node_dependences): Update calls accordingly.
3579 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3580 instead of DR_VECT_AUX.
3581 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3582 of a vector data references. Use vec_info::lookup_dr instead of
3583 DR_VECT_AUX.
3584 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3585 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3586 instead of DR_VECT_AUX.
3587
3588 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3589
3590 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3591 dr_vec_info.
3592 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3593 accordingly.
3594 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3595 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3596 (vect_gen_prolog_loop_niters): Likewise.
3597
3598 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3599
3600 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3601 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3602 (vect_known_alignment_in_bytes, vect_dr_behavior)
3603 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3604 instead of data_references. Update calls to other routines for
3605 which the same change has been made.
3606 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3607 dr_vec_infos instead of stmt_vec_infos.
3608 (vect_analyze_data_ref_dependence): Update call accordingly.
3609 (vect_slp_analyze_data_ref_dependence)
3610 (vect_record_base_alignments): Use DR_VECT_AUX.
3611 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3612 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3613 (vector_alignment_reachable_p, vect_get_data_access_cost)
3614 (vect_peeling_supportable, vect_analyze_group_access_1)
3615 (vect_analyze_group_access, vect_analyze_data_ref_access)
3616 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3617 (vect_compile_time_alias, vect_small_gap_p)
3618 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3619 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3620 instead of data_references. Update calls to other routines for
3621 which the same change has been made.
3622 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3623 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3624 (vect_slp_analyze_and_verify_node_alignment)
3625 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3626 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3627 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3628 above changes.
3629 (_vect_peel_info::dr): Replace with...
3630 (_vect_peel_info::dr_info): ...this new field.
3631 (vect_peeling_hash_get_most_frequent)
3632 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3633 (vect_peeling_hash_get_lowest_cost):
3634 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3635 routines for which the same change has been made.
3636 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3637 data_reference.
3638 * tree-vect-loop-manip.c (get_misalign_in_elems)
3639 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3640 above changes.
3641 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3642 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3643 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3644 (get_group_load_store_type, get_negative_load_store_type)
3645 (vect_get_data_ptr_increment, vectorizable_store)
3646 (vectorizable_load): Likewise.
3647 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3648 Update calls to other routines for which the same change has been made.
3649
3650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3651
3652 * tree-vectorizer.h (vec_info::move_dr): New member function.
3653 (dataref_aux): Rename to...
3654 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3655 (_stmt_vec_info::dr_aux): Update accordingly.
3656 (_stmt_vec_info::data_ref_info): Delete.
3657 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3658 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3659 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3660 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3661 of data_ref.
3662 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3663 (STMT_VINFO_DR_INFO): New macro.
3664 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3665 (set_dr_misalignment): Update after rename of dataref_aux.
3666 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3667 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3668 initialization of STMT_VINFO_DATA_REF.
3669 * tree-vectorizer.c (vec_info::move_dr): New function.
3670 * tree-vect-patterns.c (vect_recog_bool_pattern)
3671 (vect_recog_mask_conversion_pattern)
3672 (vect_recog_gather_scatter_pattern): Use it.
3673 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3674 the "dr" and "stmt" fields of dr_vec_info instead of
3675 STMT_VINFO_DATA_REF.
3676
3677 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3678
3679 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3680 (is_pattern_stmt_p): Use it.
3681 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3682 on pattern statements.
3683
3684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3685
3686 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3687 original stmt as a stmt_vec_info rather than a gimple stmt.
3688 (vect_pattern_recog_1): Take the statement directly as a
3689 stmt_vec_info, rather than via a gimple_stmt_iterator.
3690 Update call to vect_mark_pattern_stmts.
3691 (vect_pattern_recog): Update calls accordingly.
3692
3693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3694
3695 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3696 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3697 a vect_def_type for the first argument.
3698 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3699 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3700 operand if it isn't defined by a vectorized statement.
3701 (vect_build_gather_load_calls): Remove the mask_dt argument and
3702 update calls to vect_get_vec_def_for_stmt_copy.
3703 (vectorizable_bswap): Likewise the dt argument.
3704 (vectorizable_call): Update calls to vectorizable_bswap and
3705 vect_get_vec_def_for_stmt_copy.
3706 (vectorizable_simd_clone_call, vectorizable_assignment)
3707 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3708 (vectorizable_comparison): Update calls to
3709 vect_get_vec_def_for_stmt_copy.
3710 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3711 vect_is_simple_use.
3712 (vect_get_loop_based_defs): Remove dt argument and update call
3713 to vect_get_vec_def_for_stmt_copy.
3714 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3715 and vect_get_vec_def_for_stmt_copy.
3716 (vectorizable_load): Update calls to vect_build_gather_load_calls
3717 and vect_get_vec_def_for_stmt_copy.
3718 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3719 (vectorizable_reduction, vectorizable_live_operation): Update calls
3720 to vect_get_vec_def_for_stmt_copy.
3721
3722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3723
3724 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3725 and gimple stmt arguments with a stmt_vec_info.
3726 (vect_record_base_alignments): Update calls accordingly.
3727 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3728 and gimple stmt arguments with a stmt_vec_info.
3729 (vect_build_slp_tree_1): Remove vinfo argument and update call
3730 to vect_record_max_nunits.
3731 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3732 and vect_record_max_nunits.
3733
3734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3735
3736 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3737 file and take a stmt_vec_info instead of a gimple stmt.
3738 (supportable_widening_operation, vect_finish_replace_stmt)
3739 (vect_finish_stmt_generation, vect_get_store_rhs)
3740 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3741 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3742 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3743 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3744 (vect_create_data_ref_ptr, bump_vector_ptr)
3745 (vect_permute_store_chain, vect_setup_realignment)
3746 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3747 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3748 (vectorizable_reduction, vectorizable_induction)
3749 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3750 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3751 than gimple stmts as arguments.
3752 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3753 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3754 (can_group_stmts_p, vect_check_gather_scatter)
3755 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3756 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3757 (vect_permute_load_chain, vect_shift_permute_load_chain)
3758 (vect_transform_grouped_load)
3759 (vect_record_grouped_load_vectors): Likewise.
3760 * tree-vect-loop.c (vect_fixup_reduc_chain)
3761 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3762 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3763 (vectorizable_reduction, vectorizable_induction)
3764 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3765 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3766 (vect_get_load_store_mask): Likewise.
3767 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3768 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3769 * tree-vect-stmts.c (vect_mark_relevant)
3770 (is_simple_and_all_uses_invariant)
3771 (exist_non_indexing_operands_for_use_p, process_use)
3772 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3773 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3774 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3775 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3776 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3777 (get_negative_load_store_type, get_load_store_type)
3778 (vect_check_load_store_mask, vect_check_store_rhs)
3779 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3780 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3781 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3782 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3783 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3784 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3785 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3786 (supportable_widening_operation): Likewise.
3787
3788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3789
3790 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3791 a stmt_vec_info instead of a gcall.
3792 (vect_check_gather_scatter): Update call accordingly.
3793 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3794 of a gphi.
3795 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3796 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3797 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3798 instead of a gimple stmt.
3799 (vect_transform_loop): Update calls accordingly.
3800 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3801 stmt_vec_infos instead of gimple stmts.
3802 (vect_analyze_slp_instance): Update use accordingly.
3803 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3804 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3805 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3806 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3807 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3808 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3809 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3810 down to subroutines.
3811
3812 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3813
3814 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3815 of the worklist from a vector of gimple stmts to a vector of
3816 stmt_vec_infos.
3817 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3818 (vect_mark_stmts_to_be_vectorized): Likewise
3819
3820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3821
3822 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3823 statement before passing it to vect_analyze_stmt.
3824 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3825 the chain of phi vector definitions. Track the exit phi via its
3826 stmt_vec_info.
3827 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3828 STMT_VINFO_REDUC_DEF.
3829 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3830 stmt_vec_infos to handle the statement chains.
3831 (vect_get_slp_defs): Record the first statement in the node
3832 using a stmt_vec_info.
3833 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3834 statements here and pass their stmt_vec_info down to subroutines.
3835 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3836 down to vect_finish_stmt_generation.
3837 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3838 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3839 stmt_vec_infos to subroutines.
3840 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3841 chains.
3842
3843 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3844
3845 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3846 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3847 (vect_permute_store_chain, vect_setup_realignment)
3848 (vect_permute_load_chain, vect_shift_permute_load_chain)
3849 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3850 stmts internally, and when passing values to other vectorizer routines.
3851 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3852 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3853 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3854 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3855 (vectorizable_reduction, vectorizable_induction)
3856 (vectorizable_live_operation, vect_transform_loop_stmt)
3857 (vect_transform_loop): Likewise.
3858 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3859 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3860 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3861 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3862 (vect_slp_analyze_node_operations_1): Likewise.
3863 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3864 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3865 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3866 (vect_finish_stmt_generation_1, get_group_load_store_type)
3867 (get_load_store_type, vect_build_gather_load_calls)
3868 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3869 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3870 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3871 (vectorizable_store, vectorizable_load, vectorizable_condition)
3872 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3873 (supportable_widening_operation): Likewise.
3874 (vect_get_vector_types_for_stmt): Likewise.
3875 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3876
3877 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3878
3879 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3880 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3881 (vect_permute_store_chain, vect_permute_load_chain)
3882 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3883 repeated stmt_vec_info lookups.
3884 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3885 (vect_update_ivs_after_vectorizer): Likewise.
3886 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3887 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3888 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3889 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3890 (vect_bb_slp_scalar_cost): Likewise.
3891 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3892
3893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3894
3895 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3896 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3897 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3898 to get gassigns and gcalls, rather than operating on generc gimple
3899 stmts.
3900 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3901 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3902 (vectorizable_load, vect_analyze_stmt): Likewise.
3903 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3904
3905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3906
3907 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3908 return stmt_vec_infos rather than gimple stmts. Do not accept
3909 null arguments.
3910 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3911 of a gimple stmt.
3912 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3913 Update use of get_later_stmt.
3914 (vect_get_constant_vectors): Update call accordingly.
3915 (vect_schedule_slp_instance): Likewise
3916 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3917 (vect_slp_analyze_instance_dependence): Likewise.
3918 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3919
3920 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3921
3922 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3923 (stmt_info_for_cost::stmt_info): ...this new field.
3924 (add_stmt_costs): Update accordingly.
3925 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3926 (vect_get_known_peeling_cost): Likewise.
3927 (vect_estimate_min_profitable_iters): Likewise.
3928 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3929
3930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3931
3932 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3933 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3934 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3935 accordingly.
3936 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3937
3938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3939
3940 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3941 a gimple stmt to a stmt_vec_info.
3942 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3943
3944 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3945
3946 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3947 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3948 (_loop_vec_info::reduction_chains): Likewise.
3949 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3950 accordingly.
3951 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3952
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3954
3955 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3956 a gimple stmt to a stmt_vec_info.
3957 (_stmt_vec_info::next_element): Likewise.
3958 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3959 (vect_slp_analyze_and_verify_node_alignment)
3960 (vect_analyze_group_access_1, vect_analyze_group_access)
3961 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3962 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3963 (vect_supportable_dr_alignment): Update accordingly.
3964 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3965 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3966 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3967 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3968 * tree-vect-slp.c (vect_build_slp_tree_1)
3969 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3970 (vect_split_slp_store_group, vect_analyze_slp_instance)
3971 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3972 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3973 (get_group_load_store_type, get_load_store_type)
3974 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3975 (vect_transform_stmt, vect_remove_stores): Likewise.
3976
3977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3978
3979 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3980 than a gimple stmt.
3981 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3982 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3983 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3984 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3985 (vector_alignment_reachable_p, vect_get_data_access_cost)
3986 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3987 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3988 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3989 (vect_analyze_group_access_1, vect_analyze_group_access)
3990 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3991 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3992 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3993 result of vect_dr_stmt and use the stmt_vec_info instead of
3994 the associated gimple stmt.
3995 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3996 (vect_gen_prolog_loop_niters): Likewise.
3997 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3998
3999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4000
4001 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4002 to a vec<stmt_vec_info>.
4003 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4004 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4005 vec<stmt_vec_info>.
4006 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4007 to a vec<stmt_vec_info>.
4008 (bst_traits::value_type, bst_traits::value_type): Likewise.
4009 (bst_traits::hash): Update accordingly.
4010 (vect_get_and_check_slp_defs): Change the stmts parameter from
4011 a vec<gimple *> to a vec<stmt_vec_info>.
4012 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4013 (vect_build_slp_tree): Likewise.
4014 (vect_build_slp_tree_2): Likewise. Update uses of
4015 SLP_TREE_SCALAR_STMTS.
4016 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4017 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4018 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4019 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4020 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4021 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4022 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4023 (vect_get_constant_vectors, vect_get_slp_defs)
4024 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4025 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4026 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4027 instead of gimple stmts.
4028 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4029 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4030 (vect_slp_analyze_instance_dependence): Update uses of
4031 SLP_TREE_SCALAR_STMTS.
4032 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4033 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4034 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4035 (get_initial_defs_for_reduction): Likewise.
4036 (vect_create_epilog_for_reduction): Likewise.
4037 (vectorize_fold_left_reduction): Likewise.
4038 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4039 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4040 (can_vectorize_live_stmts): Likewise.
4041
4042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4043
4044 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4045 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4046 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4047 than gimple stmts.
4048 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4049 of a gimple stmt.
4050 (gather_scalar_reductions): Update after above interface changes.
4051 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4052 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4053 than gimple stmts.
4054 (vect_force_simple_reduction): Likewise.
4055 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4056 LOOP_VINFO_REDUCTIONS.
4057 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4058
4059 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4060
4061 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4062 a gimple stmt to a stmt_vec_info.
4063 * tree-vect-loop.c (vect_active_double_reduction_p)
4064 (vect_force_simple_reduction, vectorizable_reduction): Update
4065 accordingly.
4066
4067 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4068
4069 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4070 vec<gimple *> to a vec<stmt_vec_info>.
4071 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4072 the reduction_phis argument from a vec<gimple *> to a
4073 vec<stmt_vec_info>.
4074 (vectorizable_reduction): Likewise the phis local variable that
4075 is passed to vect_create_epilog_for_reduction. Update for new type
4076 of SLP_TREE_VEC_STMTS.
4077 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4078 (vectorizable_live_operation): Likewise.
4079 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4080 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4081
4082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4083
4084 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4085 a gimple stmt to a stmt_vec_info.
4086 (vectorizable_condition, vectorizable_live_operation)
4087 (vectorizable_reduction, vectorizable_induction): Pass back the
4088 vectorized statement as a stmt_vec_info.
4089 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4090 use of STMT_VINFO_VEC_STMT.
4091 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4092 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4093 as stmt_vec_infos rather than gimple stmts.
4094 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4095 to a stmt_vec_info.
4096 (vectorizable_live_operation): Likewise.
4097 (vectorizable_reduction, vectorizable_induction): Likewise,
4098 updating use of STMT_VINFO_VEC_STMT.
4099 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4100 of STMT_VINFO_VEC_STMT.
4101 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4102 (vectorizable_simd_clone_call, vectorizable_conversion)
4103 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4104 (vectorizable_store, vectorizable_load, vectorizable_condition)
4105 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4106 from a gimple stmt to a stmt_vec_info.
4107 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4108 pointer to a stmt_vec_info to the vectorizable_* routines.
4109
4110 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4111
4112 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4113 a gimple stmt to a stmt_vec_info.
4114 (is_pattern_stmt_p): Update accordingly.
4115 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4116 (vect_record_grouped_load_vectors): Likewise.
4117 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4118 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4119 (vect_model_reduction_cost): Likewise.
4120 (vect_create_epilog_for_reduction): Likewise.
4121 (vectorizable_reduction, vectorizable_induction): Likewise.
4122 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4123 Return the stmt_vec_info for the pattern statement.
4124 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4125 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4126 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4127 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4128 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4129 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4130 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4131 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4132
4133 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4134
4135 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4136 (vect_finish_stmt_generation): Likewise.
4137 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4138 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4139 (vect_build_gather_load_calls): Use the return value of the above
4140 functions instead of a separate call to vinfo_for_stmt. Use narrow
4141 scopes for the input gimple stmt and wider scopes for the associated
4142 stmt_vec_info. Use vec_info::lookup_def when setting these
4143 stmt_vec_infos from an SSA_NAME definition.
4144 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4145 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4146 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4147 (vectorizable_store, vectorizable_load, vectorizable_condition)
4148 (vectorizable_comparison): Likewise.
4149 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4150 (vectorizable_reduction): Likewise.
4151
4152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4153
4154 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4155 stmt_vec_info * parameter before the optional gimple **.
4156 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4157 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4158 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4159 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4160 (vectorizable_live_operation): Likewise.
4161 * tree-vect-patterns.c (type_conversion_p): Likewise.
4162 (vect_look_through_possible_promotion): Likewise.
4163 (vect_recog_rotate_pattern): Likewise.
4164 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4165
4166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4167
4168 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4169 a typedef to a wrapper class.
4170 (NULL_STMT_VEC_INFO): New macro.
4171 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4172 (stmt_vec_info::operator*): New function.
4173 (stmt_vec_info::operator gimple *): Likewise.
4174 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4175 (add_stmt_costs): Likewise.
4176 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4177 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4178 (vect_get_known_peeling_cost): Likewise.
4179 (vect_estimate_min_profitable_iters): Likewise.
4180 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4181 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4182 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4183 (vectorizable_store, free_stmt_vec_infos): Likewise.
4184 (new_stmt_vec_info): Change return type of xcalloc to
4185 _stmt_vec_info *.
4186
4187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4188
4189 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4190 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4191 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4192 a single_imm_use-based sequence.
4193 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4194
4195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4196
4197 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4198 * tree-vectorizer.c (vec_info::lookup_def): New function.
4199 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4200 (vect_widened_op_tree): Likewise.
4201 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4202 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4203 (vectorizable_reduction): Likewise.
4204 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4205 of a gimple *.
4206 (vect_is_slp_reduction): Update calls accordingly. Use
4207 vec_info::lookup_def.
4208 (vect_is_simple_reduction): Likewise
4209 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4210
4211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4212
4213 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4214 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4215 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4216 of vinfo_for_stmt.
4217 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4218 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4219 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4220 (vect_is_slp_reduction, vectorizable_induction)
4221 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4222 * tree-vect-patterns.c (vect_init_pattern_stmt):
4223 (vect_determine_min_output_precision_1, vect_determine_precisions)
4224 (vect_pattern_recog): Likewise.
4225 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4226 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4227 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4228 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4229 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4230 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4231 info field from a loop to a loop_vec_info.
4232
4233 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4234
4235 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4236 (vec_info::add_stmt): Declare.
4237 * tree-vectorizer.c (vec_info::add_stmt): New function.
4238 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4239 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4240 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4241 (vectorizable_induction): Likewise.
4242 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4243 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4244 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4245 (vectorizable_load): Likewise.
4246 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4247 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4248 (vect_recog_gather_scatter_pattern): Likewise.
4249 (append_pattern_def_seq): Likewise. Remove a check that is
4250 performed by add_stmt itself.
4251
4252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4253
4254 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4255 which make_ssa_name was called with new_stmt before new_stmt
4256 had been created.
4257
4258 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4259
4260 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4261 split out from...
4262 (vect_is_slp_reduction): ...here...
4263 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4264 that are already known to be false.
4265
4266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4267
4268 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4269 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4270 STMT_VINFO_NUM_SLP_USES when it's true.
4271 (vect_free_slp_instance): Add a final_p parameter and pass it to
4272 vect_free_slp_tree.
4273 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4274 (vect_analyze_slp_instance): Likewise.
4275 (vect_slp_analyze_operations): Likewise.
4276 (vect_slp_analyze_bb_1): Likewise.
4277 * tree-vectorizer.c (vec_info): Likewise.
4278 * tree-vect-loop.c (vect_transform_loop): Likewise.
4279
4280 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4281
4282 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4283 function is not called for second and subsequent members of
4284 a reduction group.
4285
4286 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4287
4288 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4289 cases for nested loops from here to ...
4290 (vect_create_epilog_for_reduction): ...here. Only call
4291 vect_is_simple_use for inner-loop reductions.
4292
4293 2018-07-31 Martin Liska <mliska@suse.cz>
4294
4295 PR gcov-profile/85338
4296 PR gcov-profile/85350
4297 PR gcov-profile/85372
4298 * profile.c (struct location_triplet): New.
4299 (struct location_triplet_hash): Likewise.
4300 (output_location): Do not output a BB that
4301 is already recorded for a line.
4302 (branch_prob): Use streamed_locations.
4303
4304 2018-07-31 Martin Liska <mliska@suse.cz>
4305
4306 PR gcov-profile/85370
4307 * coverage.c (coverage_begin_function): Do not mark target
4308 clones as artificial functions.
4309
4310 2018-07-31 Martin Liska <mliska@suse.cz>
4311
4312 PR gcov-profile/83813
4313 PR gcov-profile/84758
4314 PR gcov-profile/85217
4315 PR gcov-profile/85332
4316 * profile.c (branch_prob): Do not record GOTO expressions
4317 for GIMPLE statements which locations are already streamed.
4318
4319 2018-07-31 Olivier Hainque <hainque@adacore.com>
4320
4321 * gcc.c (handle_spec_function): Accept a soft_matched_part
4322 argument, as do_spec_1. Pass it down to ...
4323 (eval_spec_function): Accept a soft_matched_part argument,
4324 and pass it down to ...
4325 (do_spec_2): Accept a soft_matched_part argument, and pass
4326 it down to do_spec_1.
4327 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4328 (handle_braces): Update call to handle_spec_function.
4329 (driver::set_up_specs): Update calls to do_spec_2.
4330 (compare_debug_dump_opt_spec_function): Likewise.
4331 (compare_debug_self_opt_spec_function): Likewise.
4332
4333 2018-07-31 Olivier Hainque <hainque@adacore.com>
4334
4335 * common.opt (nolibc): New option.
4336 * doc/invoke.texi (Link Options): Document it.
4337 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4338 * config/alpha/linux.h: Likewise.
4339 * config/arc/elf.h: Likewise.
4340 * config/arm/uclinux-elf.h: Likewise.
4341 * config/arm/unknown-elf.h: Likewise.
4342 * config/avr/avrlibc.h: Likewise.
4343 * config/bfin/bfin.h: Likewise.
4344 * config/bfin/linux.h: Likewise.
4345 * config/bfin/uclinux.h: Likewise.
4346 * config/darwin.h: Likewise.
4347 * config/darwin10.h: Likewise.
4348 * config/darwin12.h: Likewise.
4349 * config/gnu-user.h: Likewise.
4350 * config/lm32/uclinux-elf.h: Likewise.
4351 * config/pa/pa-hpux11.h: Likewise.
4352 * config/pa/pa64-hpux.h: Likewise.
4353 * config/sparc/sparc.h: Likewise.
4354
4355 2018-07-31 Olivier Hainque <hainque@adacore.com>
4356
4357 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4358 undefined variables.
4359
4360 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4361
4362 PR target/86640
4363 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4364 instead of GEN_INT.
4365
4366 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4367
4368 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4369 terminated string literal.
4370
4371 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4372
4373 PR rtl-optimization/85160
4374 * combine.c (is_just_move): New function.
4375 (try_combine): Allow combining two instructions into two if neither of
4376 the original instructions was a move.
4377
4378 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4379
4380 PR target/86673
4381 * doc/extend.texi (Global Register Variables): Discourage use of type
4382 qualifiers.
4383 (Local Register Variables): Likewise.
4384
4385 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4386
4387 PR tree-optimization/86506
4388 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4389
4390 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4391
4392 PR target/86547
4393 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4394 hard_regno, make sure no insn between `from` and `to` clobbers it.
4395
4396 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4397 Tom de Vries <tdevries@suse.de>
4398
4399 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4400 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4401 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4402 PTX_DEFAULT_RUNTIME_DIM.
4403 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4404
4405 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4406
4407 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4408 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4409 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4410
4411 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4412
4413 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4414 used.
4415 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4416 predicate to reflect toc fusion has been deleted.
4417 (toc_fusion_mem_raw): Delete, no longer used.
4418 (toc_fusion_mem_wrapped): Likewise.
4419 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4420 fusion mask bit.
4421 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4422 Delete, no longer used.
4423 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4424 meant to be used for toc fusion.
4425 (rs6000_debug_print_mode): Delete toc fusion debugging.
4426 (rs6000_debug_reg_global): Likewise.
4427 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4428 fusion and secondary reload support that were never used.
4429 (rs6000_option_override_internal): Delete TOC fusion, that was only
4430 partially defined, and it did not work unless you also used the
4431 -mcmodel= switch.
4432 (rs6000_legitimate_address_p): Delete TOC fusion support.
4433 (rs6000_opt_masks): Likewise.
4434 (fusion_wrap_memory_address): Delete function, no longer used.
4435 (fusion_split_address); Delete TOC fusion support.
4436 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4437 longer used with toc fusion being deleted.
4438 (TARGET_TOC_FUSION_FP): Likewise.
4439 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4440 UNSPEC.
4441 (toc fusion spliter): Delete TOC fusion support.
4442 (toc_fusionload_<mode>): Likewise.
4443 (toc_fusionload_di): Likewise.
4444 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4445 longer needs to be named. Rename predicate to delete TOC fusion.
4446 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4447 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4448 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4449 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4450 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4451
4452 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4453
4454 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4455 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4456 __int128 in built-in function prototypes.
4457 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4458 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4459
4460 2018-07-27 Martin Sebor <msebor@redhat.com>
4461
4462 PR tree-optimization/86696
4463 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4464 types, including enums.
4465 (handle_char_store): Be prepared for the above function to fail.
4466
4467 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4468
4469 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4470 when optimization level is lower than 2 or optimize for size.
4471
4472 2018-07-26 Martin Sebor <msebor@redhat.com>
4473
4474 PR tree-optimization/86043
4475 PR tree-optimization/86042
4476 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4477 (get_string_cst_length): Rename...
4478 (get_min_string_length): ...to this. Add argument.
4479 (handle_char_store): Extend to handle multi-character stores by
4480 MEM_REF.
4481 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4482 * tree.h (initializer_zerop): Add argument.
4483
4484 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4485
4486 PR middle-end/86660
4487 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4488 declare target to variables if they have always,{to,from,tofrom} map
4489 kinds.
4490
4491 2018-07-26 Martin Liska <mliska@suse.cz>
4492
4493 PR lto/86548
4494 * lto-wrapper.c: Add linker_output as prefix
4495 for ltrans_output_file.
4496
4497 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4498
4499 PR rtl-optimization/85805
4500 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4501 value for hard registers if that was written in the same mode.
4502
4503 2018-07-26 Martin Liska <mliska@suse.cz>
4504
4505 PR gcov-profile/86536
4506 * gcov.c (format_gcov): Use printf format %.*f directly
4507 and do not handle special values.
4508
4509 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4510
4511 * common/config/arc/arc-common.c (arc_option_optimization_table):
4512 Update default optimizations for size.
4513
4514 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4515
4516 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4517 * config/arc/constraints.md (CfZ): New constraint.
4518 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4519 (subsf3_fpu): Likewise.
4520 (cmpsf_fpu): Likewise.
4521 (cmpsf_fpu_uneq): Likewise.
4522
4523 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4524
4525 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4526 accesses as well.
4527 (arc_is_uncached_mem_p): uncached applies to both the variable and
4528 the pointer.
4529
4530 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4531
4532 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4533 register names.
4534
4535 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4536
4537 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4538 field "m_scopes" from vec to auto_vec.
4539
4540 2018-07-25 Martin Liska <mliska@suse.cz>
4541
4542 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4543 return type.
4544
4545 2018-07-25 Richard Biener <rguenther@suse.de>
4546
4547 PR debug/86654
4548 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4549 special wrt context_die late.
4550 (gen_subprogram_die): Re-use DIEs in local scope.
4551
4552 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4553
4554 PR tree-optimization/86644
4555 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4556
4557 2018-07-25 Martin Liska <mliska@suse.cz>
4558
4559 PR middle-end/86645
4560 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4561 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4562
4563 2018-07-25 Martin Liska <mliska@suse.cz>
4564
4565 PR sanitizer/79635
4566 * params.def: Explain ASan abbreviation and provide
4567 a documentation link.
4568
4569 2018-07-24 Martin Sebor <msebor@redhat.com>
4570
4571 PR tree-optimization/86622
4572 PR tree-optimization/86532
4573 * builtins.h (string_length): Declare.
4574 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4575 (check_access): Be prepared for non-constant length ranges.
4576 (string_length): Make extern.
4577 * expr.c (string_constant): Only handle the minor non-constant
4578 array index. Use string_constant to compute the length of
4579 a generic string constant.
4580
4581 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4582
4583 PR tree-optimization/86618
4584 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4585 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4586
4587 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4588
4589 PR tree-optimization/86636
4590 * json.cc (json::object::set): Fix comment. Add assertions.
4591 (json::array::append): Move here from json.h. Add comment and an
4592 assertion.
4593 (json::string::string): Likewise.
4594 * json.h (json::array::append): Move to json.cc.
4595 (json::string::string): Likewise.
4596 * optinfo-emit-json.cc
4597 (optrecord_json_writer::impl_location_to_json): Assert that we
4598 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4599 wrapper around it. Expand the location once, rather than three
4600 times.
4601 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4602 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4603 wrappers.
4604 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4605 places. Fix some overlong lines.
4606
4607 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4608
4609 * config/aarch64/aarch64-simd.md
4610 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4611 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4612 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4613 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4614 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4615 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4616 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4617 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4618 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4619
4620 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4621
4622 PR middle-end/86627
4623 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4624 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4625 and abs_d == d, do the power of two handling if profitable.
4626
4627 2018-07-24 Richard Biener <rguenther@suse.de>
4628
4629 * match.pd: Add BIT_FIELD_REF canonicalizations.
4630
4631 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4632
4633 PR c/86617
4634 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4635
4636 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4637
4638 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4639 terminated STRING_CST object.
4640
4641 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4642
4643 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4644
4645 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4646
4647 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4648 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4649 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4650 the elements into a register.
4651 (rs6000_split_v4si_init_di_reg): Delete.
4652 (rs6000_split_v4si_init): Delete.
4653 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4654 (vsx_init_v4si): Rewrite as a define_expand.
4655
4656 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4657
4658 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4659 zero_extend argument from memory): New.
4660
4661 2018-07-22 Martin Sebor <msebor@redhat.com>
4662
4663 PR bootstrap/86621
4664 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4665 diagnosing calls with unknown arguments unless -Walloca-larger-than
4666 is restricted to less than PTRDIFF_MAX bytes.
4667
4668 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4669
4670 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4671
4672 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4673
4674 * pretty-print.c (text_info::set_location): Remove redundant
4675 "line_table" parameter from call to rich_location::set_range.
4676
4677 2018-07-20 Martin Sebor <msebor@redhat.com>
4678
4679 PR middle-end/82063
4680 * builtins.c (expand_builtin_alloca): Adjust.
4681 * calls.c (alloc_max_size): Simplify.
4682 * cgraphunit.c (cgraph_node::expand): Adjust.
4683 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4684 variables.
4685 (frame_larger_than_size): Same.
4686 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4687 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4688 Initialize.
4689 * doc/invoke.texi (GCC Command Options): Document option arguments.
4690 Explain byte-size arguments and suffixes.
4691 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4692 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4693 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4694 * doc/options.texi (UInteger): Expand.
4695 (Host_Wide_Int, ByteSize): Document new properties.
4696 * final.c (final_start_function_1): Include sizes in an error message.
4697 * function.c (frame_offset_overflow): Same.
4698 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4699 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4700 Diagnose unbounded alloca calls only for limits of less than
4701 PTRDIFF_MAX.
4702 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4703 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4704 for alloca(0).
4705 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4706 only for limits of less than PTRDIFF_MAX.
4707 * langhooks-def.h (lhd_handle_option): Change function argument
4708 to HOST_WIDE_INT.
4709 * langhooks.c (lhd_handle_option): Same.
4710 * langhooks.h (handle_option): Same.
4711 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4712 ByteSize flags.
4713 (var_type, var_type_struct): Same.
4714 (var_set): Handle ByteSize flag.
4715 * optc-gen.awk: Add comments to output to ease debugging. Make
4716 use of HOST_WIDE_INT where appropriate.
4717 * opts-gen-save.awk: Use %lx to format unsigned long.
4718 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4719 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4720 arguments. Parse bytes-size suffixes.
4721 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4722 (enum_value_to_arg): Same.
4723 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4724 (handle_option): Adjust.
4725 (generate_option): Change function argument to HOST_WIDE_INT.
4726 (cmdline_handle_error): Adjust.
4727 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4728 (set_option): Change function argument to HOST_WIDE_INT.
4729 (option_enabled): Handle cl_host_wide_int.
4730 (get_option_state): Handle CLVC_SIZE.
4731 (control_warning_option): Same.
4732 * opts.c (common_handle_option): Change function argument to
4733 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4734 OPT_Wvla_larger_than_.
4735 * opts.h (enum cl_var_type): Add an enumerator.
4736 * stor-layout.c (layout_decl): Print a more meaningful warning.
4737 * toplev.c (output_stack_usage): Adjust.
4738
4739 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4740
4741 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4742 call to inline_expand_builtin_string_cmp.
4743 (expand_builtin_strcmp): Likewise.
4744 (expand_builtin_strncmp): Likewise.
4745 (inline_string_cmp): Delete the last parameter, change char_type_node
4746 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4747 two operands.
4748 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4749 the inlining expansion on target where the type of the call has same or
4750 narrower precision than unsigned char.
4751
4752 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4753
4754 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4755 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4756 * common.opt (fsave-optimization-record): New option.
4757 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4758 * doc/invoke.texi (-fsave-optimization-record): New option.
4759 * dumpfile.c: Include "optinfo-emit-json.h".
4760 (struct kv_pair): Move to coretypes.h.
4761 (optgroup_options): Make non-static.
4762 (dump_context::end_scope): Call
4763 optimization_records_maybe_pop_dump_scope.
4764 * dumpfile.h (optgroup_options): New decl.
4765 * json.cc: New file.
4766 * json.h: New file.
4767 * optinfo-emit-json.cc: New file.
4768 * optinfo-emit-json.h: New file.
4769 * optinfo.cc: Include "optinfo-emit-json.h".
4770 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4771 (optinfo_enabled_p): Check optimization_records_enabled_p.
4772 (optinfo_wants_inlining_info_p): Likewise.
4773 * optinfo.h: Update comment.
4774 * profile-count.c (profile_quality_as_string): New function.
4775 * profile-count.h (profile_quality_as_string): New decl.
4776 (profile_count::quality): New accessor.
4777 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4778 and optinfo_emit_json_cc_tests.
4779 * selftest.h (selftest::json_cc_tests): New decl.
4780 (selftest::optinfo_emit_json_cc_tests): New decl.
4781 * toplev.c: Include "optinfo-emit-json.h".
4782 (compile_file): Call optimization_records_finish.
4783 (do_compile): Call optimization_records_start.
4784 * tree-ssa-live.c: Include optinfo.h.
4785 (remove_unused_scope_block_p): Retain inlining information if
4786 optinfo_wants_inlining_info_p returns true.
4787
4788 2018-07-20 Richard Biener <rguenther@suse.de>
4789
4790 PR debug/86585
4791 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4792 to cover -flto-partition=none.
4793
4794 2018-07-20 Martin Liska <mliska@suse.cz>
4795
4796 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4797 (get_decl_source_range): Remove unused function.
4798
4799 2018-07-20 Richard Biener <rguenther@suse.de>
4800
4801 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4802 (struct vn_phi_s): Likewise.
4803 (struct vn_reference_s): Likewise.
4804 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4805 for searching the slot of an entry known to be in the hash itself.
4806 (vn_phi_hasher::equal): Likewise.
4807 (vn_reference_hasher::equal): Likewise.
4808 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4809 globals.
4810 (optimistic_info, current_info): Remove, keeping only valid_info.
4811 (vn_reference_lookup_1): Remove fallback lookup.
4812 (vn_reference_lookup_2): Likewise.
4813 (vn_nary_op_lookup_1): Likewise.
4814 (vn_phi_lookup): Likewise.
4815 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4816 hash element.
4817 (vn_reference_insert): Adjust, chain the inserted hash element
4818 at last_inserted_ref.
4819 (vn_reference_insert_pieces): Likewise.
4820 (visit_reference_op_call): Likewise.
4821 (vn_nary_op_insert_into): Chain the inserted hash element at
4822 last_inserted_nary.
4823 (vn_nary_op_insert_pieces): Adjust.
4824 (vn_nary_op_insert): Likewise.
4825 (vn_nary_op_insert_stmt): Likewise.
4826 (vn_phi_insert): Adjust, chain the inserted hash element at
4827 last_inserted_phi.
4828 (process_scc): Remove clearing and copying the optimistic
4829 table. Instead remove elements inserted during an optimistic
4830 iteration from the single table we maintain.
4831 (init_scc_vn): Adjust.
4832 (free_scc_vn): Likewise.
4833 (sccvn_dom_walker::record_cond): Likewise.
4834 (sccvn_dom_walker::after_dom_children): Likewise.
4835
4836 2018-07-19 Martin Sebor <msebor@redhat.com>
4837
4838 PR tree-optimization/84047
4839 PR tree-optimization/83776
4840 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4841 (check_array_bounds): Call it.
4842
4843 2018-07-19 Martin Sebor <msebor@redhat.com>
4844
4845 * align.h (align_flags): Use member initialization.
4846
4847 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4848
4849 * Makefile.in (OBJS): Add optinfo.o.
4850 * coretypes.h (class symtab_node): New forward decl.
4851 (struct cgraph_node): New forward decl.
4852 (class varpool_node): New forward decl.
4853 * dump-context.h: New file.
4854 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4855 "tree-pass.h".
4856 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4857 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4858 (set_alt_dump_file): Likewise.
4859 (dump_context::~dump_context): New dtor.
4860 (dump_gimple_stmt): Move implementation to...
4861 (dump_context::dump_gimple_stmt): ...this new member function.
4862 Add the stmt to any pending optinfo, creating one if need be.
4863 (dump_gimple_stmt_loc): Move implementation to...
4864 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4865 Start a new optinfo and add the stmt to it.
4866 (dump_gimple_expr): Move implementation to...
4867 (dump_context::dump_gimple_expr): ...this new member function.
4868 Add the stmt to any pending optinfo, creating one if need be.
4869 (dump_gimple_expr_loc): Move implementation to...
4870 (dump_context::dump_gimple_expr_loc): ...this new member function.
4871 Start a new optinfo and add the stmt to it.
4872 (dump_generic_expr): Move implementation to...
4873 (dump_context::dump_generic_expr): ...this new member function.
4874 Add the tree to any pending optinfo, creating one if need be.
4875 (dump_generic_expr_loc): Move implementation to...
4876 (dump_context::dump_generic_expr_loc): ...this new member
4877 function. Add the tree to any pending optinfo, creating one if
4878 need be.
4879 (dump_printf): Move implementation to...
4880 (dump_context::dump_printf_va): ...this new member function. Add
4881 the text to any pending optinfo, creating one if need be.
4882 (dump_printf_loc): Move implementation to...
4883 (dump_context::dump_printf_loc_va): ...this new member function.
4884 Start a new optinfo and add the stmt to it.
4885 (dump_dec): Move implementation to...
4886 (dump_context::dump_dec): ...this new member function. Add the
4887 value to any pending optinfo, creating one if need be.
4888 (dump_context::dump_symtab_node): New member function.
4889 (dump_context::get_scope_depth): New member function.
4890 (dump_context::begin_scope): New member function.
4891 (dump_context::end_scope): New member function.
4892 (dump_context::ensure_pending_optinfo): New member function.
4893 (dump_context::begin_next_optinfo): New member function.
4894 (dump_context::end_any_optinfo): New member function.
4895 (dump_context::s_current): New global.
4896 (dump_context::s_default): New global.
4897 (dump_scope_depth): Delete global.
4898 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4899 (dump_symtab_node): New function.
4900 (get_dump_scope_depth): Reimplement in terms of dump_context.
4901 (dump_begin_scope): Likewise.
4902 (dump_end_scope): Likewise.
4903 (selftest::temp_dump_context::temp_dump_context): New ctor.
4904 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4905 (selftest::verify_item): New function.
4906 (ASSERT_IS_TEXT): New macro.
4907 (ASSERT_IS_TREE): New macro.
4908 (ASSERT_IS_GIMPLE): New macro.
4909 (selftest::test_capture_of_dump_calls): New test.
4910 (selftest::dumpfile_c_tests): Call it.
4911 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4912 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4913 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4914 descriptive comment.
4915 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4916 (dump_node, dump_bb): Move these unrelated decls.
4917 (class dump_manager): Add leading comment.
4918 * optinfo.cc: New file.
4919 * optinfo.h: New file.
4920
4921 2018-07-19 Michael Collison <michael.collison@arm.com>
4922 Richard Henderson <rth@redhat.com>
4923
4924 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4925 (subti): Handle op1 zero.
4926 (subvti4, usub4ti4): New.
4927 (*sub<GPI>3_compare1_imm): New.
4928 (sub<GPI>3_carryinCV): New.
4929 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4930 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4931
4932 2018-07-19 Michael Collison <michael.collison@arm.com>
4933 Richard Henderson <rth@redhat.com>
4934
4935 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4936 (addti3): Create simpler code if low part is already known to be 0.
4937 (addvti4, uaddvti4): New.
4938 (*add<GPI>3_compareC_cconly_imm): New.
4939 (*add<GPI>3_compareC_cconly): New.
4940 (*add<GPI>3_compareC_imm): New.
4941 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4942 handle constants within this pattern..
4943 (*add<GPI>3_compareV_cconly_imm): New.
4944 (*add<GPI>3_compareV_cconly): New.
4945 (*add<GPI>3_compareV_imm): New.
4946 (add<GPI>3_compareV): New.
4947 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4948 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4949 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4950 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4951 with 'comparison' operator.
4952 (*add<GPI>3_compareV_cconly_imm): Ditto.
4953 (*add<GPI>3_compareV_cconly): Ditto.
4954 (*add<GPI>3_compareV_imm): Ditto.
4955 (add<GPI>3_compareV): Ditto.
4956 (add<mode>3_carryinC): Ditto.
4957 (*add<mode>3_carryinC_zero): Ditto.
4958 (*add<mode>3_carryinC): Ditto.
4959 (add<mode>3_carryinV): Ditto.
4960 (*add<mode>3_carryinV_zero): Ditto.
4961 (*add<mode>3_carryinV): Ditto.
4962
4963 2018-07-19 Michael Collison <michael.collison@arm.com>
4964 Richard Henderson <rth@redhat.com>
4965
4966 * config/aarch64/aarch64-modes.def (CC_V): New.
4967 * config/aarch64/aarch64-protos.h
4968 (aarch64_addti_scratch_regs): Declare
4969 (aarch64_subvti_scratch_regs): Declare.
4970 (aarch64_expand_subvti): Declare.
4971 (aarch64_gen_unlikely_cbranch): Declare
4972 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4973 for signed overflow using CC_Vmode.
4974 (aarch64_get_condition_code_1): Handle CC_Vmode.
4975 (aarch64_gen_unlikely_cbranch): New function.
4976 (aarch64_addti_scratch_regs): New function.
4977 (aarch64_subvti_scratch_regs): New function.
4978 (aarch64_expand_subvti): New function.
4979
4980 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4981
4982 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4983 extension.
4984 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4985 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4986 extension.
4987
4988 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4989
4990 PR target/83009
4991 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4992 address check not strict.
4993
4994 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4995
4996 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4997 Umq with Umn.
4998 (store_pair_lanes<mode>): Likewise.
4999 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5000 enum value 'ADDR_QUERY_LDP_STP_N'.
5001 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5002 (aarch64_print_address_internal): Add declaration.
5003 (aarch64_print_ldpstp_address): Remove.
5004 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5005 (aarch64_print_operand): Change printing of 'y'.
5006 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5007 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5008 'true' rather than '1'.
5009 * config/aarch64/constraints.md (Uml): Likewise.
5010 (Uml): Rename to Umn.
5011 (Umq): Remove.
5012
5013 2018-07-19 Richard Biener <rguenther@suse.de>
5014
5015 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5016 a trailing array.
5017 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5018 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5019 (vn_reference_hasher): Likewise.
5020 (struct vn_tables_s): Remove obstack and alloc-pool members.
5021 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5022 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5023 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5024 (vn_reference_insert_pieces): Likewise.
5025 (alloc_vn_nary_op_noinit): Adjust.
5026 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5027 (vn_phi_eq): Adjust.
5028 (shared_lookup_phiargs): Remove.
5029 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5030 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5031 (visit_reference_op_call): Likewise.
5032 (copy_nary, copy_phi, copy_reference): Remove.
5033 (process_scc): Rewind the obstack when iterating. Do not
5034 copy the elements to valid_info but just move them from one
5035 hashtable to the other.
5036 (allocate_vn_table): Adjust.
5037 (free_vn_table): Likewise.
5038 (init_scc_vn): Likewise.
5039 (free_scc_vn): Likewise.
5040
5041 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5042
5043 PR target/86560
5044 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5045 indirect_return as function type attribute.
5046 (ix86_attribute_table): Change indirect_return to function
5047 type attribute.
5048 * doc/extend.texi: Update indirect_return attribute.
5049
5050 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5051
5052 * wide-int.h (widest2_int): New.
5053 * gimple-fold.c (arith_overflowed_p): Use it.
5054 * tree.h (widest2_int_cst): New.
5055 * tree-vrp.c (wide_int_binop_overflow): Rename from
5056 vrp_int_const_binop.
5057 Rewrite to work on trees.
5058 (extract_range_from_multiplicative_op_1): Abstract code to...
5059 (wide_int_range_min_max): ...here.
5060 (wide_int_range_cross_product): ...and here.
5061 (extract_range_from_binary_expr_1): Abstract overflow code to...
5062 (wide_int_range_mult_wrapping): ...here.
5063 * tree-vrp.h (wide_int_range_cross_product): New.
5064 (wide_int_range_mult_wrapping): New.
5065
5066 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5067 Julia Koval <julia.koval@intel.com>
5068
5069 * config/i386/x86-tune-costs.h (skylake_memcpy,
5070 skylake_memset): Replace rep_prefix with unrolling for size 512.
5071
5072 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5073
5074 PR middle-end/86544
5075 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5076 comparision with EQ_EXPR in last stmt.
5077
5078 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5079
5080 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5081 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5082 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5083 previously known as "PowerPC AltiVec Built-in Functions". Move
5084 some material to new subsubsections "PowerPC AltiVec Built-in
5085 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5086 ISA 2.07".
5087 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5088 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5089 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5090 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5091
5092 2018-07-18 Richard Biener <rguenther@suse.de>
5093
5094 PR tree-optimization/86557
5095 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5096 EXACT_DIV_EXPR.
5097
5098 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5099
5100 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5101
5102 2018-07-17 Jeff Law <law@redhat.com>
5103
5104 * config/arm/arm.c (get_label_padding): Update for recent
5105 changes to label_to_alignment.
5106
5107 PR tree-optimization/86010
5108 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5109
5110 * config/mips/mips.c (vr4130_align_insns): Update for recent
5111 changes to label_to_alignment.
5112
5113 * config/frv/frv.c (frv_label_align): Update for recent changes
5114 to label_to_alignment.
5115
5116 * config/nios2/nios2.c (nios2_label_align): Update for recent
5117 changes which dropped ALIGN_LABELS_LOG.
5118
5119 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5120
5121 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5122 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5123
5124 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5125
5126 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5127 deprecated align_labels_log.
5128
5129 2018-07-17 Richard Biener <rguenther@suse.de>
5130
5131 PR lto/86456
5132 * dwarf2out.c (init_sections_and_labels): Always generate
5133 a debug_line_str_section for early LTO debug.
5134 (dwarf2out_finish): Reset debug_line_str_hash output early.
5135 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5136 with fat LTO part.
5137 (dwarf2out_early_finish): Output debug_line_str.
5138
5139 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5140
5141 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5142 index register on z196 or later.
5143
5144 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5145
5146 * config/s390/s390.c (s390_default_align): Set default function
5147 alignment to 16.
5148 (s390_override_options_after_change): Call s390_default align.
5149 (s390_option_override_internal): Call s390_default_align.
5150 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5151
5152 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5153
5154 PR middle-end/86542
5155 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5156 to _looptemp_ clauses, other than the first two.
5157
5158 2018-07-17 Martin Liska <mliska@suse.cz>
5159
5160 * opts.c: Do not enable OPT_falign_* for -Os.
5161
5162 2018-07-17 Martin Liska <mliska@suse.cz>
5163
5164 * align.h (MAX_CODE_ALIGN): New.
5165 (MAX_CODE_ALIGN_VALUE): New.
5166 * common/config/i386/i386-common.c (ix86_handle_option):
5167 (MAX_CODE_ALIGN): Moved to align.h.
5168 * final.c (MAX_CODE_ALIGN): Likewise.
5169 * opts.c (parse_and_check_align_values):
5170 (MAX_CODE_ALIGN): Likewise.
5171 (MAX_CODE_ALIGN_VALUE): Likewise.
5172
5173 2018-07-17 Martin Liska <mliska@suse.cz>
5174
5175 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5176 in order to fulfil coding style.
5177 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5178 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5179 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5180 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5181 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5182 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5183 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5184 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5185 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5186
5187 2018-07-17 Martin Liska <mliska@suse.cz>
5188
5189 * align.h: New file.
5190 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5191 directly.
5192 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5193 align_flags of label_to_alignment.
5194 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5195 align_flags class.
5196 * config/m68k/m68k.c: Do not use removed align_labels_value and
5197 align_loops_value.
5198 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5199 (LOOP_ALIGN): Likewise.
5200 (LABEL_ALIGN): Likewise.
5201 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5202 Remove not used macro.
5203 (rs6000_loop_align): Change return type to align_flags.
5204 (rs6000_loop_align_max_skip): Remove.
5205 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5206 Change return type to align_flags.
5207 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5208 Remove not used macro.
5209 (rs6000_loop_align): Change return type to align_flags.
5210 (rs6000_loop_align_max_skip): Remove.
5211 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5212 * config/rx/rx-protos.h (rx_align_for_label): Make it
5213 static function.
5214 * config/rx/rx.c (rx_align_for_label): Change return type
5215 to align_flags.
5216 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5217 macro definitions.
5218 into align_flags class.
5219 (LABEL_ALIGN): Likewise.
5220 (LOOP_ALIGN): Likewise.
5221 * config/s390/s390.c (s390_label_align): Use align_flags
5222 class member.
5223 (s390_asm_output_function_label): Likewise.
5224 * config/sh/sh.c (sh_override_options_after_change):
5225 Use align_flags class directly without macros.
5226 (find_barrier): Likewise.
5227 (barrier_align): Likewise.
5228 (sh_loop_align): Likewise.
5229 * config/spu/spu.c (spu_option_override):
5230 Use align_flags_tuple::get_value instead of removed macros.
5231 (spu_sched_init): Likewise.
5232 * config/spu/spu.h (GTY): Likewise.
5233 * config/visium/visium.c (visium_option_override):
5234 Set "8" as default secondary alignment.
5235 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5236 in order to guarantee secondary alignment of 8.
5237 * coretypes.h: Include align.h header file.
5238 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5239 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5240 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5241 * doc/tm.texi.in: Likewise.
5242 * final.c (struct label_alignment): Remove not used structure.
5243 (LABEL_ALIGN): Change type to align_flags.
5244 (LOOP_ALIGN): Likewise.
5245 (JUMP_ALIGN): Likewise.
5246 (default_loop_align_max_skip): Remove.
5247 (default_label_align_max_skip): Likewise.
5248 (default_jump_align_max_skip): Likewise.
5249 (default_label_align_after_barrier_max_skip):
5250 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5251 (LABEL_TO_MAX_SKIP): Remove.
5252 (label_to_alignment): Return align_flags type instead of integer.
5253 (label_to_max_skip): Remove.
5254 (align_fuzz): Use align_flags type.
5255 (compute_alignments): Use align_flags type and use align_flags::max
5256 to combine multiple alignments.
5257 (grow_label_align): Grow vec instead of C array.
5258 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5259 (shorten_branches): Use align_flags type and use align_flags::max
5260 to combine multiple alignments.
5261 (final_scan_insn_1): Remove usage of secondary alignment that comes
5262 from label alignment, but instead use proper secondary alignment
5263 which is computed in grow_label_align.
5264 * flags.h (struct align_flags_tuple): Move to align.h.
5265 (struct align_flags): Likewise.
5266 (state_align_loops): Rename to align_loops.
5267 (state_align_jumps): Rename to align_jumps.
5268 (state_align_labels): Rename to align_labels.
5269 (state_align_functions): Rename to align_functions.
5270 (align_loops_log): Remove.
5271 (align_jumps_log): Remove.
5272 (align_labels_log): Remove.
5273 (align_functions_log): Remove.
5274 (align_loops_max_skip): Remove.
5275 (align_jumps_max_skip): Remove.
5276 (align_labels_max_skip): Remove.
5277 (align_functions_max_skip): Remove.
5278 (align_loops_value): Remove.
5279 (align_jumps_value): Remove.
5280 (align_labels_value): Remove.
5281 (align_functions_value): Remove.
5282 * output.h (label_to_alignment): Change return type to align_flags.
5283 (label_to_max_skip): Remove.
5284 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5285 jump_align_max_skip macros.
5286 * targhooks.h (default_loop_align_max_skip): Remove.
5287 (default_label_align_max_skip): Likewise.
5288 (default_jump_align_max_skip): Likewise.
5289 (default_label_align_after_barrier_max_skip): Remove.
5290 * toplev.c (read_log_maxskip): Use ::normalize function.
5291 (parse_N_M): Remove not used argument and also call ::normalize.
5292 (parse_alignment_opts): Do not pass unused arguments.
5293 * varasm.c (assemble_start_function): Use directly align_functions
5294 instead of removed macros.
5295 * system.h: Do not poison removed macros.
5296
5297 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5298
5299 PR middle-end/86539
5300 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5301 and cond temporaries don't have reference type if iterator has
5302 pointer type. For init use &for_pre_body instead of pre_p if
5303 for_pre_body is non-empty.
5304
5305 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5306
5307 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5308 double-double modes to SFmode directly directly.
5309 (trunc<mode>sf2_fprs): Delete.
5310
5311 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5312
5313 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5314 for conversions between IFmode and the decimal floating point modes.
5315 (init_float128_ieee): Use the correct names for conversions between
5316 KFmode and the decimal floating point modes.
5317
5318 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5319
5320 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5321 for the conversions between TDmode and IFmode.
5322 (init_float128_ieee): Use more correct names for the conversions
5323 between TDmode and KFmode.
5324
5325 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5326
5327 PR tree-optimization/86526
5328 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5329 (inline_expand_builtin_string_cmp): Likewise.
5330 (inline_string_cmp): Likewise. Use c_readstr instead of
5331 builtin_memcpy_read_str. Add unit_mode temporary.
5332
5333 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5334
5335 PR middle-end/86528
5336 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5337 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5338
5339 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5340
5341 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5342 Alphabetize prototypes of built-in functions, separating out
5343 built-in functions that are listed in this section but should be
5344 described elsewhere.
5345
5346 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5347
5348 PR target/86511
5349 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5350 conditional move when trapping comparison was split to a
5351 non-trapping one (and vice versa).
5352
5353 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5354
5355 * config/s390/s390.c (s390_function_profiler): Generate nops
5356 instead of profiler call sequences.
5357 * config/s390/s390.opt: Add the new option.
5358
5359 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5360
5361 * config/s390/s390.c (s390_function_profiler): Generate
5362 __mcount_loc section.
5363 * config/s390/s390.opt: Add the new option.
5364
5365 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5366
5367 * common.opt: Add the new warning.
5368 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5369 %r0,__fentry__" when -mfentry is specified.
5370 (s390_option_override_internal): Disallow -mfentry for 31-bit
5371 CPUs.
5372 * config/s390/s390.opt: Add the new option.
5373
5374 2018-07-16 Richard Biener <rguenther@suse.de>
5375
5376 PR lto/86523
5377 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5378 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5379
5380 2018-07-16 Martin Liska <mliska@suse.cz>
5381
5382 PR ipa/86529
5383 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5384 to ::get_create.
5385
5386 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5387
5388 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5389
5390 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5391
5392 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5393 for ARCHS4x.
5394 * config/arc/arc-cpus.def (hs4x): New cpu.
5395 (hs4xd): Likewise.
5396 * config/arc/arc-tables.opt: Regenerate.
5397 * config/arc/arc.c (arc_sched_issue_rate): New function.
5398 (TARGET_SCHED_ISSUE_RATE): Define.
5399 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5400 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5401 fpu_cvt.
5402 (attr tune): Add ARCHS4x tune values.
5403 (attr tune_dspmpy): Define.
5404 (*tst): Correct instruction type.
5405 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5406 * config/arc/arcHS4x.md: New file.
5407 * config/arc/fpu.md: Update instruction type attributes.
5408 * config/arc/t-multilib: Regenerate.
5409
5410 2018-07-16 Tom de Vries <tdevries@suse.de>
5411
5412 PR debug/86455
5413 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5414
5415 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5416
5417 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5418 early clobber.
5419
5420 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5421
5422 PR tree-optimization/86514
5423 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5424 conversion to a boolean type from a type with greater precision.
5425
5426 2018-07-16 Tom de Vries <tdevries@suse.de>
5427
5428 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5429 dump_flags request TDF_SLIM.
5430
5431 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5432
5433 * fold-const.c (int_const_binop_1): Abstract...
5434 (wide_int_binop): ...wide int code here.
5435 (poly_int_binop): ...poly int code here.
5436 Abstract the rest of int_const_binop_1 into int_const_binop.
5437 * fold-const.h (wide_int_binop): New.
5438 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5439 Remove useless PLUS/MINUS_EXPR case.
5440 (zero_nonzero_bits_from_vr): Move wide int code...
5441 (zero_nonzero_bits_from_bounds): ...here.
5442 (extract_range_from_binary_expr_1): Move mask optimization code...
5443 (range_easy_mask_min_max): ...here.
5444 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5445 (range_easy_mask_min_max): New.
5446
5447 2018-07-15 Jeff Law <law@redhat.com>
5448
5449 PR target/85993
5450 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5451 block.
5452
5453 2018-07-14 Jim Wilson <jimw@sifive.com>
5454
5455 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5456
5457 2018-07-14 Paul Koning <ni1d@arrl.net>
5458
5459 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5460
5461 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5462
5463 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5464 copying section.
5465
5466 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5467 Steve Munroe <munroesj52@gmail.com>
5468
5469 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5470 (_mm_andnot_si128): Likewise.
5471 (_mm_or_si128): Likewise.
5472 (_mm_xor_si128): Likewise.
5473
5474 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5475
5476 PR middle-end/78809
5477 * builtins.c (expand_builtin_memcmp): Inline the calls first
5478 when result_eq is false.
5479 (expand_builtin_strcmp): Inline the calls first.
5480 (expand_builtin_strncmp): Likewise.
5481 (inline_string_cmp): New routine. Expand a string compare
5482 call by using a sequence of char comparison.
5483 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5484 a call to str(n)cmp/memcmp.
5485 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5486 New option.
5487 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5488
5489 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5490
5491 * config/arm/driver-arm.c: Include arm-native.h.
5492 (host_detect_local_cpu): Use auto-generated data tables.
5493 (vendors, arm_cpu_table): Delete. Move part information to ...
5494 * config/arm/arm-cpus.in: ... here.
5495 * config/arm/parsecpu.awk (gen_native): New function.
5496 (vendor, part): New CPU fields.
5497 (END): Add support for building the native CPU detection tables.
5498 * config/arm/t-arm (arm-native.h): Add build rule.
5499 (driver-arm.o): Add dependency on arm-native.h.
5500
5501 2018-07-13 Richard Biener <rguenther@suse.de>
5502
5503 PR middle-end/85974
5504 * match.pd (addr1 - addr2): Allow either of the operand to
5505 have a conversion.
5506
5507 2018-07-13 Tom de Vries <tdevries@suse.de>
5508
5509 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5510 in remap_ssa_name.
5511
5512 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5513
5514 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5515 arrays instead of numbered variables.
5516
5517 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5518
5519 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5520 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5521
5522 2018-07-13 Richard Biener <rguenther@suse.de>
5523
5524 PR debug/86452
5525 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5526 instead of get_context_die.
5527
5528 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5529 Richard Biener <rguenther@suse.de>
5530
5531 PR middle-end/86489
5532 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5533 that the loop latch destination where phi is defined.
5534
5535 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5536
5537 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5538 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5539 (riscv_set_current_function): Extract getting interrupt type to new
5540 function.
5541 (riscv_get_interrupt_type): New function.
5542 (riscv_merge_decl_attributes): New function, checking interrupt type is
5543 same.
5544 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5545
5546 2018-07-12 Paul Koning <ni1d@arrl.net>
5547
5548 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5549 directive.
5550
5551 2018-07-12 Paul Koning <ni1d@arrl.net>
5552
5553 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5554 zero reference, add doloop_end instead.
5555 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5556 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5557 detail for doloop_end.
5558
5559 2018-07-12 Martin Sebor <msebor@redhat.com>
5560
5561 PR c/86453
5562 * attribs.c (decl_attributes): Reject conflicting attributes before
5563 calling attribute handlers.
5564
5565 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5566
5567 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5568 parameter.
5569 (gcc::dump_manager::get_dump_file_name): likewise.
5570 (dump_begin): Likewise.
5571 * dumpfile.h (dump_begin): Update prototype.
5572 (gcc::dump_manager::get_dump_file_name,
5573 gcc::dump_manager::get_dump_file_name): Update prototype.
5574
5575 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5576
5577 * internal-fn.h (vectorizable_internal_fn_p): New function.
5578 * tree-vect-slp.c (compatible_calls_p): Likewise.
5579 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5580 to internal functions.
5581 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5582
5583 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5584
5585 * fold-const.h (inverse_conditions_p): Declare.
5586 * fold-const.c (inverse_conditions_p): New function.
5587 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5588 that test the inverse condition of a conditional internal function.
5589 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5590 * internal-fn.c (internal_fn_mask_index): Handle conditional
5591 internal functions.
5592 (vectorized_internal_fn_supported_p): New function.
5593 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5594 (any_pred_load_store): Replace with...
5595 (need_to_predicate): ...this new variable.
5596 (redundant_ssa_names): New variable.
5597 (ifcvt_can_use_mask_load_store): Move initial checks to...
5598 (ifcvt_can_predicate): ...this new function. Handle tree codes
5599 for which a conditional internal function exists.
5600 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5601 instead of ifcvt_can_use_mask_load_store. Update after variable
5602 name change.
5603 (predicate_load_or_store): New function, split out from
5604 predicate_mem_writes.
5605 (check_redundant_cond_expr): New function.
5606 (value_available_p): Likewise.
5607 (predicate_rhs_code): Likewise.
5608 (predicate_mem_writes): Rename to...
5609 (predicate_statements): ...this. Use predicate_load_or_store
5610 and predicate_rhs_code.
5611 (combine_blocks, tree_if_conversion): Update after above name changes.
5612 (ifcvt_local_dce): Handle redundant_ssa_names.
5613 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5614 general conditional functions.
5615 * tree-vect-stmts.c (vectorizable_call): Likewise.
5616
5617 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5618 Alan Hayward <alan.hayward@arm.com>
5619 David Sherwood <david.sherwood@arm.com>
5620
5621 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5622 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5623 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5624 plus and minus and convert them into IFN_COND_FMA-based sequences.
5625 (convert_mult_to_fma): Handle conditional plus and minus.
5626
5627 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5628
5629 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5630 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5631 (cond_fnms_optab): New optabs.
5632 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5633 internal functions.
5634 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5635 * internal-fn.h (get_conditional_internal_fn): Declare.
5636 (get_unconditional_internal_fn): Likewise.
5637 * internal-fn.c (cond_ternary_direct): New macro.
5638 (expand_cond_ternary_optab_fn): Likewise.
5639 (direct_cond_ternary_optab_supported_p): Likewise.
5640 (FOR_EACH_COND_FN_PAIR): Likewise.
5641 (get_conditional_internal_fn): New function.
5642 (get_unconditional_internal_fn): Likewise.
5643 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5644 (gimple_match_op::gimple_match_op): Add a new overload for 5
5645 operands.
5646 (gimple_match_op::set_op): Likewise.
5647 (gimple_resimplify5): Declare.
5648 * genmatch.c (decision_tree::gen): Generate simplifications for
5649 5 operands.
5650 * gimple-match-head.c (gimple_simplify): Define an overload for
5651 5 operands. Handle calls with 5 arguments in the top-level overload.
5652 (convert_conditional_op): Handle conversions from unconditional
5653 internal functions to conditional ones.
5654 (gimple_resimplify5): New function.
5655 (build_call_internal): Pass a fifth operand.
5656 (maybe_push_res_to_seq): Likewise.
5657 (try_conditional_simplification): Try converting conditional
5658 internal functions to unconditional internal functions.
5659 Handle 3-operand unconditional forms.
5660 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5661 Define ternary equivalents of the current rules for binary conditional
5662 internal functions.
5663 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5664 ternary operations.
5665 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5666 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5667 (optab): Handle them.
5668 (SVE_COND_FP_TERNARY): New int iterator.
5669 (sve_fmla_op, sve_fmad_op): New int attributes.
5670 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5671 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5672 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5673
5674 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5675
5676 * target.def (preferred_else_value): New target hook.
5677 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5678 * doc/tm.texi: Regenerate.
5679 * targhooks.h (default_preferred_else_value): Declare.
5680 * targhooks.c (default_preferred_else_value): New function.
5681 * internal-fn.h (conditional_internal_fn_code): Declare.
5682 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5683 (get_conditional_internal_fn): Use it.
5684 (conditional_internal_fn_code): New function.
5685 * gimple-match.h (gimple_match_cond): New struct.
5686 (gimple_match_op): Add a cond member function.
5687 (gimple_match_op::gimple_match_op): Update all forms to take a
5688 gimple_match_cond.
5689 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5690 for the suboperation, but don't specify a particular else_value.
5691 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5692 (visit_nary_op, visit_reference_op_load): Pass
5693 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5694 * gimple-match-head.c: Include tree-eh.h
5695 (convert_conditional_op): New function.
5696 (maybe_resimplify_conditional_op): Likewise.
5697 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5698 (gimple_resimplify2): Likewise.
5699 (gimple_resimplify3): Likewise.
5700 (gimple_resimplify4): Likewise.
5701 (maybe_push_res_to_seq): Return null for conditional operations.
5702 (try_conditional_simplification): New function.
5703 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5704 constructor.
5705 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5706 IFN_COND_* call.
5707 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5708 function.
5709 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5710
5711 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5712
5713 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5714 DECL_FCONTEXT
5715 (hash_tree): Do not hash DECL_FCONTEXT
5716 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5717 Do not stream DECL_FCONTEXT.
5718 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5719 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5720
5721 2018-07-12 Richard Biener <rguenther@suse.de>
5722
5723 PR debug/86462
5724 * dwarf2out.c (gen_block_die): Only output blocks when they have
5725 at least one !DECL_IGNORED_P variable.
5726
5727 2018-07-12 Richard Biener <rguenther@suse.de>
5728
5729 PR target/84829
5730 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5731 Remove -mieee-fp handling.
5732
5733 2018-07-12 Richard Biener <rguenther@suse.de>
5734
5735 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5736 left-over from last patch.
5737
5738 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5739
5740 PR tree-optimization/86492
5741 * gimple-ssa-store-merging.c
5742 (imm_store_chain_info::coalesce_immediate_stores): Call
5743 check_no_overlap even for the merge_overlapping case. Formatting fix.
5744
5745 2018-07-12 Richard Biener <rguenther@suse.de>
5746
5747 PR middle-end/86479
5748 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5749 move possibly trapping operations into the conditional.
5750
5751 2018-07-12 Richard Biener <rguenther@suse.de>
5752
5753 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5754 (vn_lookup_simplify_result): Remove recursion limit applied
5755 here.
5756 (vn_nary_build_or_lookup_1): Adjust.
5757 (try_to_simplify): Likewise.
5758 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5759 here.
5760 (gimple_resimplify2): Likewise.
5761 (gimple_resimplify3): Likewise.
5762 (gimple_resimplify4): Likewise.
5763
5764 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5765
5766 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5767 Use __mmask64 type instead of __mmask8 for __M argument.
5768 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5769 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5770 __U argument.
5771 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5772 __mmask16 for __M argument.
5773 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5774 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5775 to __mmask16 instead of __mmask8.
5776 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5777 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5778 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5779 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5780 instead of __mmask16 for __U argument.
5781 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5782 __mmask16 instead of __mmask8 for __U argument.
5783 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5784 __U argument.
5785 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5786 __mmask16.
5787 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5788 argument.
5789 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5790 __U argument.
5791 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5792 __mmask16.
5793 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5794 of __mmask16.
5795 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5796 __U argument.
5797 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5798 __U argument.
5799 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5800 __U argument.
5801 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5802 __U argument.
5803 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5804 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5805 return type as well as __M argument type and all casts from __mmask8
5806 to __mmask32.
5807 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5808 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5809 return type as well as __M argument type and all casts from __mmask8
5810 to __mmask16.
5811 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5812 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5813 return type as well as __M argument type and all casts from __mmask8
5814 to __mmask32.
5815 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5816 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5817 return type as well as __M argument type and all casts from __mmask8
5818 to __mmask16.
5819 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5820 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5821 __mmask16.
5822
5823 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5824
5825 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5826 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5827 for __U argument.
5828
5829 2018-07-11 Paul Koning <ni1d@arrl.net>
5830
5831 * doc/md.texi (define_subst): Document how multiple occurrences of
5832 the same argument in the replacement pattern are handled.
5833
5834 2018-07-11 Paul Koning <ni1d@arrl.net>
5835
5836 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5837 alphabetical order.
5838 (Common Type Attributes): Add "mode" attribute.
5839
5840 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5841
5842 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5843 stream DECL_ORIGINAL_TYPE.
5844 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5845 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5846 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5847 Do not walk original type.
5848 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5849 external decls.
5850 (write_ts_decl_non_common_tree_pointers): Do not stream
5851 DECL_ORIGINAL_TYPE
5852 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5853 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5854
5855 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5856
5857 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5858 thread twice from the same starting edge.
5859
5860 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5861
5862 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5863 * gimple.c (gimple_call_nonnull_result_p): ...here...
5864 (gimple_call_nonnull_arg): ...and here.
5865 * gimple.h (gimple_call_nonnull_result_p): New.
5866 (gimple_call_nonnull_arg): New.
5867
5868 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5869
5870 * config/arm/arm-cpus.in: Move information from fpu field of each
5871 cpu definition to the isa field.
5872 * config/arm/parsecpu.awk (fpu): Delete match rule.
5873 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5874
5875 2018-07-11 Richard Biener <rguenther@suse.de>
5876
5877 PR debug/86457
5878 * dwarf2out.c (init_sections_and_labels): Use
5879 output_asm_line_debug_info consistently.
5880 (dwarf2out_early_finish): Likewise.
5881 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5882 type units.
5883
5884 2018-07-11 Richard Biener <rguenther@suse.de>
5885
5886 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5887 Rework father_bb setting in a way to avoid propagating constants
5888 multiple times on a loop body.
5889
5890 2018-07-10 Mark Wielaard <mark@klomp.org>
5891
5892 PR debug/86459
5893 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5894
5895 2018-07-10 Richard Biener <rguenther@suse.de>
5896
5897 * hash-map.h (hash_map::iterator::operator*): Return
5898 references to key and value.
5899
5900 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5901
5902 PR c++/86443
5903 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5904 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5905 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5906 (gimplify_omp_for): For composite loops, move outer
5907 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5908 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5909 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5910 TREE_LIST for both the original class iterator and the "last" helper
5911 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5912 loop, remember has_decl_expr from outer composite loops for the
5913 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5914
5915 2018-07-09 Martin Sebor <msebor@redhat.com>
5916
5917 PR middle-end/77357
5918 PR middle-end/86428
5919 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5920 accessing implicitly initialized array elements.
5921 * expr.c (string_constant): Handle string initializers of
5922 character arrays within aggregates.
5923 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5924 Store element offset. As a special case, handle zero size.
5925 (fold_nonarray_ctor_reference): Same.
5926 (fold_ctor_reference): Add argument. Store subobject offset.
5927 * gimple-fold.h (fold_ctor_reference): Add argument.
5928
5929 2018-07-09 Paul Koning <ni1d@arrl.net>
5930
5931 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5932 (pdp11_insn_cost): New function.
5933 (pdp11_md_asm_adjust): New function.
5934 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5935 (pdp11_rtx_costs): Update to match machine better.
5936 (output_addr_const_pdp11): Correct format mismatch warnings.
5937 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5938 * config/pdp11/pdp11.md: General change to add base_cost and/or
5939 length attributes for use by new pdp11_insn_cost function.
5940 (MIN_BRANCH): Correct definition.
5941 (MIN_SOB): Ditto.
5942 (doloop_end): Use standard pattern name for looping pattern.
5943 (doloop_end_nocc): New.
5944 (movsf): Add another constraint alternative.
5945 (zero_extendqihi2): Add constraint alternatives for not in place
5946 extend.
5947 (zero_extendhisi2): Remove.
5948 (shift patterns): Add CC handling variants.
5949 (bswaphi2): New.
5950 (bswapsi2): New.
5951 (rothi3): New.
5952 (define_peephole2): New peephole to recognize mov that sets CC for
5953 subsequent test.
5954
5955 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5956
5957 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5958 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5959 wi::add.
5960
5961 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5962
5963 PR c/86420
5964 * real.c (real_nextafter): Return true if result is denormal.
5965
5966 2018-07-09 Martin Liska <mliska@suse.cz>
5967
5968 * common.opt: Add back wrongly removed attribute.
5969
5970 2018-07-09 Richard Biener <rguenther@suse.de>
5971
5972 PR debug/86413
5973 * dwarf2out.c (gen_block_die): For an early generated DIE
5974 always output high/low PC attributes.
5975
5976 2018-07-09 Tom de Vries <tdevries@suse.de>
5977
5978 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5979 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5980 onto VAR_DECL with abstract origin.
5981
5982 2018-07-07 Jim Wilson <jimw@sifive.com>
5983
5984 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5985
5986 2018-07-07 Tom de Vries <tdevries@suse.de>
5987
5988 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5989
5990 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5991
5992 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5993 overflow_type.
5994 (combine_bound): Use wide-int overflow calculation instead of
5995 rolling our own.
5996 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5997 overflow_type.
5998 * fold-const.c (int_const_binop_2): Same.
5999 (extract_muldiv_1): Same.
6000 (fold_div_compare): Same.
6001 (fold_abs_const): Same.
6002 * match.pd: Same.
6003 * poly-int.h (add): Same.
6004 (sub): Same.
6005 (neg): Same.
6006 (mul): Same.
6007 * predict.c (predict_iv_comparison): Same.
6008 * profile-count.c (slow_safe_scale_64bit): Same.
6009 * simplify-rtx.c (simplify_const_binary_operation): Same.
6010 * tree-chrec.c (tree_fold_binomial): Same.
6011 * tree-data-ref.c (split_constant_offset_1): Same.
6012 * tree-if-conv.c (idx_within_array_bound): Same.
6013 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6014 * tree-ssa-phiopt.c (minmax_replacement): Same.
6015 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6016 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6017 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6018 * wide-int.cc (wi::add_large): Same.
6019 (wi::mul_internal): Same.
6020 (wi::sub_large): Same.
6021 (wi::divmod_internal): Same.
6022 * wide-int.h: Change overflow type to overflow_type for neg, add,
6023 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6024 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6025 mul_internal, divmod_internal.
6026 (overflow_type): New enum.
6027 (accumulate_overflow): New.
6028
6029 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6030
6031 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6032 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6033
6034 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6035
6036 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6037 argument is checked for zero before entering loop, avoid checking again.
6038
6039 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6040
6041 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6042 * gimplify.h (generic_expr_could_trap_p): Likwise.
6043 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6044
6045 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6046
6047 PR tree-optimization/86401
6048 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6049 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6050 (fold_bit_and_mask): ... here. New helper function for match.pd.
6051 * fold-const.h (fold_bit_and_mask): Declare.
6052 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6053
6054 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6055
6056 PR target/86324
6057 * target.def (translate_mode_attribute): New hook.
6058 * targhooks.h (default_translate_mode_attribute): Declare.
6059 * targhooks.c (default_translate_mode_attribute): New function.
6060 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6061 * doc/tm.texi: Regenerate.
6062 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6063 (rs6000_translate_mode_attribute): New function.
6064
6065 2018-07-06 Paul Koning <ni1d@arrl.net>
6066
6067 * doc/md.texi (define_split): Document DONE and FAIL.
6068 (define_peephole2): Ditto.
6069
6070 2018-07-05 Jeff Law <law@redhat.com>
6071
6072 PR tree-optimization/86010
6073 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6074 both the head and tail of mem* and str* calls.
6075
6076 2018-07-05 Jim Wilson <jimw@sifive.com>
6077
6078 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6079
6080 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6081
6082 * config/aarch64/aarch64-simd.md: correct flags text for
6083 MIN_EXPR replacement.
6084
6085 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6086
6087 * configure: Regenerated.
6088
6089 2018-07-05 Carl Love <cel@us.ibm.com>
6090
6091 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6092 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6093 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6094 VSX_BUILTIN_DOUBLEL_V4SF.
6095
6096 2018-07-05 Martin Sebor <msebor@redhat.com>
6097
6098 PR c++/86400
6099 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6100 than its domain to compute its the upper bound of a char array.
6101
6102 2018-07-05 Nathan Sidwell <nathan@acm.org>
6103
6104 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6105 * doc/cpp.texi: Update comment.
6106 * doc/tm.texi: Rebuilt.
6107 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6108 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6109 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6110 headers affected by extern "C".
6111 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6112 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6113 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6114 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6115 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6116 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6117 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6118 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6119 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6120 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6121 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6122 config/sparc/sp64-elf.h, config/spu/spu.h,
6123 config/stormy16/stormy16.h, config/v850/v850.h,
6124 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6125 define NO_IMPLICIT_EXTERN_C.
6126 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6127
6128 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6129
6130 PR target/84711
6131 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6132 instead of GET_MODE_SIZE when comparing Units.
6133
6134 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6135
6136 PR target/84711
6137 * rtlanal.c (set_noop_p): Constrain on mode change,
6138 include hard-reg-set.h
6139
6140 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6141
6142 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6143
6144 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6145
6146 Revert
6147 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6148
6149 PR sanitizer/84250
6150 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6151 libasan.
6152 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6153
6154 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6155
6156 PR sanitizer/84250
6157 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6158 libasan.
6159 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6160
6161 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6162
6163 PR middle-end/86380
6164 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6165
6166 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6167
6168 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6169 neg_*_op* variables.
6170
6171 2018-07-04 Martin Liska <mliska@suse.cz>
6172
6173 * tree-switch-conversion.c: Define
6174 max_ratio_for_speed and max_ratio_for_size constants.
6175
6176 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6177 Martin Liska <mliska@suse.cz>
6178
6179 PR middle-end/66240
6180 PR target/45996
6181 PR c/84100
6182 * common.opt: Rename align options with 'str_' prefix.
6183 * common/config/i386/i386-common.c (set_malign_value): New
6184 function.
6185 (ix86_handle_option): Use it to set -falign-* options/
6186 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6187 type from int to string.
6188 * config/aarch64/aarch64.c: Update default values from int
6189 to string.
6190 * config/alpha/alpha.c (alpha_override_options_after_change):
6191 Likewise.
6192 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6193 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6194 max skip conditionally.
6195 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6196 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6197 max skip conditionally.
6198 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6199 max skip conditionally.
6200 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6201 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6202 max skip conditionally.
6203 * config/i386/i386.c (struct ptt): Change type from int to
6204 string.
6205 (ix86_default_align): Set default values.
6206 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6207 max skip conditionally.
6208 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6209 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6210 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6211 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6212 max skip conditionally.
6213 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6214 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6215 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6216 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6217 max skip conditionally.
6218 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6219 * config/ia64/ia64.c (ia64_option_override): Set default values
6220 for alignment options.
6221 * config/m68k/m68k.c: Handle new str_align_* options.
6222 * config/mips/mips.c (mips_set_compression_mode): Change
6223 type of constants.
6224 (mips_option_override): Set default values for options.
6225 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6226 Likewise.
6227 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6228 Likewise.
6229 * config/rx/rx.c (rx_option_override): Likewise.
6230 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6231 (LABEL_ALIGN): Use align_labels_log.
6232 (LOOP_ALIGN): Use align_loops_align.
6233 * config/s390/s390.c (s390_asm_output_function_label): Use new
6234 macros.
6235 * config/sh/sh.c (sh_override_options_after_change):
6236 Change type of constants.
6237 * config/spu/spu.c (spu_sched_init): Likewise.
6238 * config/sparc/sparc.c (sparc_option_override): Set default
6239 values for options.
6240 * config/visium/visium.c (visium_option_override): Likewise.
6241 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6242 emit p2align format with last argument if it's not needed.
6243 * doc/invoke.texi: Document extended format of -falign-*.
6244 * final.c: Use align_labels alignment.
6245 * flags.h (struct target_flag_state): Change type to use
6246 align_flags.
6247 (struct align_flags_tuple): New.
6248 (struct align_flags): Likewise.
6249 (align_loops_log): Redefine macro to use new types.
6250 (align_loops_max_skip): Redefine macro to use new types.
6251 (align_jumps_log): Redefine macro to use new types.
6252 (align_jumps_max_skip): Redefine macro to use new types.
6253 (align_labels_log): Redefine macro to use new types.
6254 (align_labels_max_skip): Redefine macro to use new types.
6255 (align_functions_log): Redefine macro to use new types.
6256 (align_loops): Redefine macro to use new types.
6257 (align_jumps): Redefine macro to use new types.
6258 (align_labels): Redefine macro to use new types.
6259 (align_functions): Redefine macro to use new types.
6260 (align_functions_max_skip): Redefine macro to use new types.
6261 (align_loops_value): New macro.
6262 (align_jumps_value): New macro.
6263 (align_labels_value): New macro.
6264 (align_functions_value): New macro.
6265 * function.c (invoke_set_current_function_hook): Propagate
6266 alignment values from flags to global variables default in
6267 topleev.h.
6268 * ipa-icf.c (sem_function::equals_wpa): Use
6269 cl_optimization_option_eq instead of memcmp.
6270 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6271 of string types.
6272 (cl_optimization_stream_in): Likewise.
6273 * optc-save-gen.awk: Support strings in cl_optimization.
6274 * opth-gen.awk: Likewise.
6275 * opts.c (finish_options): Remove error checking of invalid
6276 value ranges.
6277 (MAX_CODE_ALIGN): Remove.
6278 (MAX_CODE_ALIGN_VALUE): Likewise.
6279 (parse_and_check_align_values): New function.
6280 (check_alignment_argument): Likewise.
6281 (common_handle_option): Use check_alignment_argument.
6282 * opts.h (parse_and_check_align_values): Declare.
6283 * toplev.c (init_alignments): Remove.
6284 (read_log_maxskip): New.
6285 (parse_N_M): Likewise.
6286 (parse_alignment_opts): Likewise.
6287 (backend_init_target): Remove usage of init_alignments.
6288 * toplev.h (parse_alignment_opts): Declare.
6289 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6290 argument.
6291 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6292 * tree.c (cl_option_hasher::equal): New.
6293 * varasm.c: Use new global macros.
6294
6295 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6296
6297 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6298 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6299 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6300 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6301 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6302 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6303 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6304 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6305 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6306 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6307 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6308 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6309 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6310
6311 2018-07-04 Martin Liska <mliska@suse.cz>
6312 Jonathan Wakely <jwakely@redhat.com>
6313
6314 * coverage.c: Use correct type.
6315 * doc/invoke.texi: Language correction.
6316
6317 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6318
6319 PR target/85620
6320 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6321 ENDBRANCH for non-tail call which may return via indirect branch.
6322 * doc/extend.texi: Document indirect_return attribute.
6323
6324 2018-07-03 Martin Sebor <msebor@redhat.com>
6325
6326 PR tree-optimization/86274
6327 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6328 precondition.
6329 (format_floating): Correct handling of infinities and NaNs.
6330
6331 2018-07-03 Martin Sebor <msebor@redhat.com>
6332
6333 * print-tree.c (print_real_cst): New function.
6334 (print_node_brief): Call it.
6335 (print_node): Ditto.
6336
6337 2018-07-03 Jeff Law <law@redhat.com>
6338
6339 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6340 into a single pattern.
6341
6342 * config/h8300/h8300.md (ors code_iterator): New.
6343 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6344 a single pattern and single splitter.
6345 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6346 (iorqi3_1, xorqi3_1): Likewise.
6347 (iorqi3, xorqi3 expanders): Similarly.
6348
6349 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6350 (movmd_internal) into a single pattern using the P mode iterator.
6351 (movmd splitters): Similarly.
6352 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6353 (movsd splitters): Similarly.
6354
6355 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6356 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6357 right table based on the size of the operand.
6358 * config/h8300/h8300.md (length_table): Corresponding changes. All
6359 references to "addb", "addw" and "addl" changed to "add".
6360 (btst patterns): Merge two variants into a single pattern.
6361 (tstqi, tsthi): Likewise.
6362 (addhi3_incdec, addsi3_incdec): Likewise.
6363 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6364 (mulhi3, mulsi3): Likewise.
6365 (udivhi3, udivsi3): Likewise.
6366 (divhi3, divsi3): Likewise.
6367 (andorqi3, andorhi3, andorsi3): Likewise.
6368
6369 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6370
6371 PR target/85694
6372 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6373 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6374
6375 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6376
6377 PR tree-optimization/85694
6378 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6379 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6380 UNSPEC_URHADD.
6381 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6382 (<u>avg<mode>3_ceil): New patterns.
6383
6384 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6385
6386 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6387 scan-tree-dump directive.
6388 * gcc.dg/vect/slp-perm-2.c: Likewise.
6389 * gcc.dg/vect/slp-perm-3.c: Likewise.
6390 * gcc.dg/vect/slp-perm-5.c: Likewise.
6391 * gcc.dg/vect/slp-perm-6.c: Likewise.
6392 * gcc.dg/vect/slp-perm-7.c: Likewise.
6393 * gcc.dg/vect/slp-perm-8.c: Likewise.
6394
6395 2018-07-03 Marek Polacek <polacek@redhat.com>
6396
6397 PR middle-end/86202
6398 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6399
6400 2018-07-03 Richard Biener <rguenther@suse.de>
6401
6402 PR ipa/86389
6403 * tree-ssa-structalias.c (find_func_clobbers): Properly
6404 handle indirect calls.
6405
6406 2018-07-03 Jeff Law <law@redhat.com>
6407
6408 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6409 (shifts): New code iterator.
6410 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6411 expander. Fix HImode handling on H8/SX.
6412 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6413 (subqi3, subhi3, subsi3 expanders): Likewise.
6414 (andqi3, andhi3, andsi3 expanders): Likewise.
6415 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6416 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6417 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6418 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6419 (zero_extendqihi2, zero_extendqisi2): Likewise.
6420 (extendqihi2, extendqisi2): Likewise.
6421 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6422 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6423 (rotlqi3_1, rotlhi3_1): Likewise.
6424 (logicalhi3_sn, logicalsi3_sn): Likewise.
6425 (logicalhi3, logicalsi3): Likewise.
6426
6427 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6428
6429 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6430 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6431 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6432 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6433 type to append_pattern_def_seq instead of creating a stmt_vec_info
6434 directly.
6435 (build_mask_conversion): Likewise. Remove vinfo argument.
6436 (vect_add_conversion_to_patterm): Likewise, renaming to...
6437 (vect_add_conversion_to_pattern): ...this.
6438 (vect_recog_mask_conversion_pattern): Update call to
6439 build_mask_conversion. Pass the vector type to
6440 append_pattern_def_seq here too.
6441 (vect_recog_gather_scatter_pattern): Update call to
6442 vect_add_conversion_to_pattern.
6443
6444 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6445
6446 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6447 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6448 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6449 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6450 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6451 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6452 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6453 append_pattern_def_seq instead of new_pattern_def_seq.
6454 (vect_recog_divmod_pattern): Do both of the above.
6455 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6456 is null.
6457
6458 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6459
6460 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6461 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6462 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6463 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6464 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6465 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6466 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6467 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6468 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6469 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6470 parameter with a single stmt_vec_info.
6471 (vect_recog_func_ptr): Likewise.
6472 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6473 (vect_try_gather_scatter_pattern): ...this.
6474 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6475 the stmt_vec_info of the statement to be matched. Don't clear
6476 STMT_VINFO_RELATED_STMT.
6477 (vect_pattern_recog): Update call accordingly.
6478
6479 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6480
6481 PR tree-optimization/85694
6482 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6483 (uavgM3_ceil): Document new optabs.
6484 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6485 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6486 functions.
6487 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6488 (savg_ceil_optab): New optabs.
6489 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6490 (vect_vect_recog_func_ptrs): Add it.
6491 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6492 constant directly from the associated lhs.
6493
6494 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6495
6496 * tree-vect-patterns.c (vect_split_statement): New function.
6497 (vect_convert_input): Use it to try to split an existing cast.
6498
6499 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6500
6501 * poly-int.h (print_hex): New function.
6502 * dumpfile.h (dump_dec, dump_hex): Declare.
6503 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6504 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6505 min_input_precision, operation_precision and operation_sign.
6506 * tree-vect-patterns.c (vect_get_range_info): New function.
6507 (vect_same_loop_or_bb_p, vect_single_imm_use)
6508 (vect_operation_fits_smaller_type): Delete.
6509 (vect_look_through_possible_promotion): Add an optional
6510 single_use_p parameter.
6511 (vect_recog_over_widening_pattern): Rewrite to use new
6512 stmt_vec_info infomration. Handle one operation at a time.
6513 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6514 (vect_truncatable_operation_p, vect_set_operation_type)
6515 (vect_set_min_input_precision): New functions.
6516 (vect_determine_min_output_precision_1): Likewise.
6517 (vect_determine_min_output_precision): Likewise.
6518 (vect_determine_precisions_from_range): Likewise.
6519 (vect_determine_precisions_from_users): Likewise.
6520 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6521 (vect_vect_recog_func_ptrs): Put over_widening first.
6522 Add cast_forwprop.
6523 (vect_pattern_recog): Call vect_determine_precisions.
6524
6525 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6526
6527 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6528 statements that have been replaced by further pattern statements.
6529 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6530
6531 2018-07-03 Richard Biener <rguenther@suse.de>
6532
6533 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6534 always set *dt. Dump vectype in vectype overload.
6535 * dumpfile.h (dump_gimple_expr): New function.
6536 (dump_gimple_expr_loc): Likewise.
6537 * dumpfile.c (dump_gimple_expr): New function.
6538 (dump_gimple_expr_loc): Likewise.
6539
6540 2018-07-02 Jeff Law <law@redhat.com>
6541
6542 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6543 the H8/300, H8/300H and H8/S variants into a single pattern.
6544 (movhi_h8300, movqi_h8300hs): Similarly.
6545 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6546 (QHI mode iterator): New.
6547
6548 * config/h8300/h8300.md: Remove trailing whitespace.
6549
6550 2018-07-02 Jim Wilson <jimw@sifive.com>
6551
6552 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6553 instead of emit_insn for interrupt returns.
6554 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6555 (riscv_sret, riscv_uret): Likewise.
6556
6557 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6558
6559 * pretty-print.c (selftest::test_pp_format): Move save and restore
6560 of quotes to class auto_fix_quotes, and add an instance.
6561 * selftest.c: Include "intl.h".
6562 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6563 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6564 * selftest.h (selftest::auto_fix_quotes): New class.
6565
6566 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6567
6568 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6569 (aarch64_sve_prepare_conditional_op): Remove.
6570 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6571 Allow aarch64_simd_reg_or_zero as select operand; remove
6572 the aarch64_sve_prepare_conditional_op call.
6573 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6574 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6575 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6576 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6577 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6578 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6579 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6580 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6581 and a splitters to match all of the *_any patterns.
6582 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6583
6584 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6585 (SVE_COND_FP_BINARY_REV): Remove.
6586 (sve_int_op_rev, sve_fp_op_rev): New.
6587 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6588 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6589 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6590 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6591 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6592 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6593 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6594 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6595 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6596
6597 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6598 Remove match_dup 1 from the inner unspec.
6599 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6600
6601 * config/aarch64/aarch64.md (movprfx): New attr.
6602 (length): Default movprfx to 8.
6603 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6604 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6605 (*<su>mul<SVE_I>3_highpart): Likewise.
6606 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6607 (*v<ASHIFT><SVE_I>3): Likewise.
6608 (*<su><MAXMIN><SVE_I>3): Likewise.
6609 (*<su><MAXMIN><SVE_F>3): Likewise.
6610 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6611 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6612 (*div<SVE_F>4): Likewise.
6613
6614 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6615
6616 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6617 in dump string.
6618
6619 2018-07-02 Richard Biener <rguenther@suse.de>
6620
6621 PR tree-optimization/86363
6622 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6623 memset argument refers to a non-variable address.
6624
6625 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6626
6627 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6628 {PLUS,MINUS}_EXPR code to...
6629 (adjust_symbolic_bound): ...here,
6630 (combine_bound): ...here,
6631 (set_value_range_with_overflow): ...and here.
6632
6633 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6634
6635 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6636 code...
6637 (extract_range_from_abs_expr): ...here.
6638
6639 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6640
6641 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6642 -fno-omit-frame-pointer when not optimizing.
6643
6644 2018-07-02 Martin Liska <mliska@suse.cz>
6645
6646 PR ipa/86279
6647 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6648 (propagate_nothrow): Likewise.
6649
6650 2018-07-02 Martin Liska <mliska@suse.cz>
6651
6652 PR ipa/86323
6653 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6654
6655 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6656
6657 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6658 function in r262149, changing "loc" param from source_location to
6659 const dump_location_t &.
6660 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6661 declaration, as above.
6662
6663 2018-07-01 Paul Koning <ni1d@arrl.net>
6664
6665 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6666 -munit-asm, -mgnu-asm, -mdec-asm.
6667 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6668 (pdp11_output_labelref): New.
6669 (pdp11_output_def): New.
6670 (pdp11_output_addr_vec_elt): New.
6671 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6672 %# and %@ format codes.
6673 (pdp11_option_override): New.
6674 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6675 (pdp11_output_ident): New.
6676 (pdp11_asm_named_section): New.
6677 (pdp11_asm_init_sections): New.
6678 (pdp11_file_start): New.
6679 (pdp11_file_end): New.
6680 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6681 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6682 %o, like %c but octal.
6683 (pdp11_option_override): New.
6684 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6685 -mdec-asm.
6686 (DATA_SECTION_ASM_OP): Ditto.
6687 (READONLY_DATA_SECTION_ASM_OP): New.
6688 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6689 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6690 (ASM_OUTPUT_LABELREF): Ditto.
6691 (ASM_OUTPUT_DEF): Ditto.
6692 (ASM_OUTPUT_EXTERNAL): New.
6693 (ASM_OUTPUT_SOURCE_FILENAME): New.
6694 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6695 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6696 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6697 %# and %@ format codes.
6698 * config/pdp11/pdp11.opt (mgnu-asm): New.
6699 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6700 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6701 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6702
6703 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6704
6705 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6706 dereferencing path[] beyond its length.
6707 (debug_path): New.
6708 (debug_all_paths): New.
6709 (rewire_first_differing_edge): New.
6710 (adjust_paths_after_duplication): New.
6711 (duplicate_thread_path): Call adjust_paths_after_duplication.
6712 Add new argument.
6713 (thread_through_all_blocks): Add new argument to
6714 duplicate_thread_path.
6715
6716 2018-06-30 Jim Wilson <jimw@sifive.com>
6717
6718 * config/riscv/predicates.md (p2m1_shift_operand): New.
6719 (high_mask_shift_operand): New.
6720 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6721 pattern using p2m1_shift_operand.
6722 (lshsi3_zero_extend_3+2): New combiner pattern using
6723 high_mask_shift_operand.
6724
6725 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6726
6727 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6728 split out from...
6729 (vect_recog_rotate_pattern): ...here.
6730 (vect_convert_input): Try to insert casts of invariants in the
6731 preheader.
6732 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6733 preheader to be empty.
6734
6735 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6736
6737 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6738 vector type. If given, install it in the new statement's
6739 STMT_VINFO_VECTYPE.
6740 (vect_element_precision): New function.
6741 (vect_unpromoted_value): New struct.
6742 (vect_unpromoted_value::vect_unpromoted_value): New function.
6743 (vect_unpromoted_value::set_op): Likewise.
6744 (vect_look_through_possible_promotion): Likewise.
6745 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6746 (vect_widened_op_tree, vect_convert_input): Likewise.
6747 (vect_convert_inputs, vect_convert_output): Likewise.
6748 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6749 to handle the optional cast of the multiplication result and
6750 vect_widened_op_tree to detect the widened multiplication itself.
6751 Do not require the input and output of promotion casts to have
6752 the same sign, but base the signedness of the operation on the
6753 input rather than the result. If the pattern includes two
6754 promotions, check that those promotions have the same sign.
6755 Do not restrict the MULT_EXPR handling to a double-width result;
6756 handle quadruple-width results and wider. Use vect_convert_inputs
6757 to convert the inputs to the common type.
6758 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6759 to handle the optional cast of the ABS result. Also allow a sign
6760 change or a sign extension between the ABS and MINUS.
6761 Use vect_widened_op_tree to detect the widened subtraction and use
6762 vect_convert_inputs to convert the inputs to the common type.
6763 (vect_handle_widen_op_by_const): Delete.
6764 (vect_recog_widen_op_pattern): New function.
6765 (vect_recog_widen_mult_pattern): Use it.
6766 (vect_recog_widen_shift_pattern): Likewise.
6767 (vect_recog_widen_sum_pattern): Use
6768 vect_look_through_possible_promotion to handle the promoted
6769 PLUS_EXPR operand.
6770
6771 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6772
6773 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6774 the containing gimple_seq *.
6775 * gimple-iterator.h (gsi_for_stmt): Declare it.
6776 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6777 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6778 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6779 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6780 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6781 checks.
6782 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6783 split out from...
6784 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6785 statement being replaced is part of an existing pattern
6786 definition sequence, inserting the new pattern statements before
6787 the original one.
6788 (vect_pattern_recog_1): Don't return a bool. If the statement
6789 is already part of a pattern, instead apply pattern matching
6790 to the pattern definition statements. Don't clear the
6791 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6792 (vect_pattern_recog): Don't break after the first match;
6793 continue processing the pattern definition statements instead.
6794 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6795
6796 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6797
6798 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6799 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6800 (vect_recog_widen_sum_pattern): Use it.
6801
6802 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6803
6804 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6805 phi is not a pattern statement and has not been replaced by
6806 a pattern statement.
6807 * tree-vect-patterns.c (type_conversion_p): Don't check
6808 STMT_VINFO_IN_PATTERN_P.
6809 (vect_recog_vector_vector_shift_pattern): Likewise.
6810 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6811 the pattern statement rather than the original statement; check
6812 directly for a WIDEN_MULT_EXPR here.
6813 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6814 vect_is_simple_use to return the pattern statement rather
6815 than the original statement; use is_pattern_stmt_p to check
6816 for such a pattern statement.
6817 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6818 to return the pattern statement rather than the original statement;
6819 don't do the same transformation here.
6820 (vect_is_simple_use): If the defining statement has been replaced
6821 by a pattern statement, return the pattern statement instead.
6822 Remove the corresponding (local) transformation from the vectype
6823 overload.
6824
6825 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6826
6827 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6828 end and default to null.
6829 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6830 (vectorizable_reduction): Update calls accordingly, dropping the
6831 gimple ** argument if the passed-back statement isn't needed.
6832 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6833 (vect_recog_rotate_pattern): Likewise.
6834 (vect_recog_mask_conversion_pattern): Likewise.
6835 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6836 (vect_mask_constant_operand_p): Likewise.
6837 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6838 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6839 (get_group_load_store_type, get_load_store_type): Likewise.
6840 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6841 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6842 (vectorizable_conversion, vectorizable_assignment): Likewise.
6843 (vectorizable_shift, vectorizable_operation): Likewise.
6844 (vectorizable_store, vect_is_simple_cond): Likewise.
6845 (vectorizable_condition, vectorizable_comparison): Likewise.
6846 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6847 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6848 and move it to the end. Cope with null def_stmt_outs.
6849
6850 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6851
6852 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6853
6854 2018-06-29 Jeff Law <law@redhat.com>
6855
6856 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6857 displacements for TARGET_V850E2V3 and newer.
6858 (TARGET_LRA_P): Remove. Defaults to LRA now.
6859 * config/v850/v850.md (sign23byte_load): Remove.
6860 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6861 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6862
6863 2018-06-29 Martin Liska <mliska@suse.cz>
6864
6865 PR lto/85759
6866 * coverage.c (coverage_init): Mangle full path name.
6867 * doc/invoke.texi: Document the change.
6868 * gcov-io.c (mangle_path): New.
6869 * gcov-io.h (mangle_path): Likewise.
6870 * gcov.c (mangle_name): Use mangle_path for path mangling.
6871
6872 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6873
6874 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6875 if starting source register is not even.
6876
6877 2018-06-29 Martin Liska <mliska@suse.cz>
6878
6879 PR tree-optimization/86263
6880 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6881 Make edge redirection.
6882
6883 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6884
6885 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6886 (dump_scope_depth): New variable.
6887 (get_dump_scope_depth): New function.
6888 (dump_begin_scope): New function.
6889 (dump_end_scope): New function.
6890 * dumpfile.h (get_dump_scope_depth): New declaration.
6891 (dump_begin_scope): New declaration.
6892 (dump_end_scope): New declaration.
6893 (class auto_dump_scope): New class.
6894 (AUTO_DUMP_SCOPE): New macro.
6895 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6896 AUTO_DUMP_SCOPE.
6897
6898 2018-06-29 Richard Biener <rguenther@suse.de>
6899
6900 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6901 compute_all_dependences succeeds.
6902 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6903 exceed --param loop-max-datarefs-for-datadeps.
6904
6905 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6906
6907 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6908
6909 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6910
6911 PR target/86348
6912 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6913 alternative 0 in preferred_for_speed attribute.
6914
6915 2018-06-28 Paul Koning <ni1d@arrl.net>
6916
6917 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6918 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6919 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6920 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6921 for shift insn patterns.
6922
6923 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6924
6925 * cgraph.c (cgraph_node::get_body): Replace assignments to
6926 "dump_file" with calls to set_dump_file.
6927 * dumpfile.c (alt_dump_file): Make static, and group with...
6928 (alt_flags): ...this definition.
6929 (dumps_are_enabled): New variable.
6930 (refresh_dumps_are_enabled): New function.
6931 (set_dump_file): New function.
6932 (set_alt_dump_file): New function.
6933 (gcc::dump_manager::dump_start): Replace assignments to
6934 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6935 set_alt_dump_file.
6936 (gcc::dump_manager::dump_finish): Likewise.
6937 * dumpfile.h (alt_dump_file): Delete decl.
6938 (dumps_are_enabled): New variable decl.
6939 (set_dump_file): New function decl.
6940 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6941 global.
6942 * tree-nested.c (lower_nested_functions): Replace assignments to
6943 "dump_file" with calls to set_dump_file.
6944
6945 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6946
6947 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6948 goto_locus of each outgoing edge of each basic block.
6949
6950 2018-06-28 Richard Biener <rguenther@suse.de>
6951
6952 * dwarf2out.c (decl_scope_table): Remove.
6953 (push_decl_scope): Likewise.
6954 (pop_decl_scope): Likewise.
6955 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6956 (gen_struct_or_union_type_die): Likewise.
6957 (gen_tagged_type_die): Likewise.
6958 (dwarf2out_init): Do not initialize decl_scope_table.
6959 (dwarf2out_c_finalize): Do not free it.
6960
6961 2018-06-28 Richard Biener <rguenther@suse.de>
6962
6963 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6964 deciding whether to not re-use a DIE.
6965
6966 2018-06-28 Richard Biener <rguenther@suse.de>
6967
6968 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6969 DW_AT_abstract_origin attribute.
6970
6971 2018-06-28 Martin Liska <mliska@suse.cz>
6972
6973 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6974 Use newly introduced constants.
6975 * tree-switch-conversion.h (struct jump_table_cluster):
6976 Define max_ratio_for_size and max_ratio_for_speed.
6977
6978 2018-06-28 Martin Liska <mliska@suse.cz>
6979
6980 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6981 Add new checking assert to catch invalid state.
6982 (jump_table_cluster::can_be_handled): Handle single case
6983 clusters.
6984 (jump_table_cluster::is_beneficial): Bail out for such case.
6985 (bit_test_cluster::find_bit_tests):
6986 Add new checking assert to catch invalid state.
6987 (bit_test_cluster::can_be_handled): Handle single case
6988 clusters.
6989 (bit_test_cluster::is_beneficial): Bail out for such case.
6990 (switch_decision_tree::analyze_switch_statement):
6991 Fix comment.
6992
6993 2018-06-28 Martin Liska <mliska@suse.cz>
6994
6995 * common.opt: Introduce -completion option.
6996 * gcc.c (driver_handle_option): Handle it.
6997 (driver::main): Print completions if completion
6998 is set.
6999 * opt-suggestions.c (option_proposer::get_completions):
7000 New function.
7001 (option_proposer::suggest_completion): Likewise.
7002 (option_proposer::find_param_completions): Likewise.
7003 (verify_autocompletions): Likewise.
7004 (test_completion_valid_options): Likewise.
7005 (test_completion_valid_params): Likewise.
7006 (in_completion_p): Likewise.
7007 (empty_completion_p): Likewise.
7008 (test_completion_partial_match): Likewise.
7009 (test_completion_garbage): Likewise.
7010 (opt_proposer_c_tests): Likewise.
7011 * opt-suggestions.h: Declare new functions.
7012 * opts.c (common_handle_option): Handle OPT__completion_.
7013 * selftest-run-tests.c (selftest::run_tests): Add
7014 opt_proposer_c_tests.
7015 * selftest.c (assert_str_startswith): New.
7016 * selftest.h (assert_str_startswith): Likewise.
7017 (opt_proposer_c_tests): New.
7018 (ASSERT_STR_STARTSWITH): Likewise.
7019
7020 2018-06-28 Martin Liska <mliska@suse.cz>
7021
7022 * Makefile.in: Add opt-suggestions.o.
7023 * gcc-main.c: Include opt-suggestions.h.
7024 * gcc.c (driver::driver): Likewise.
7025 (driver::~driver): Remove m_option_suggestions.
7026 (driver::build_option_suggestions): Moved to option_proposer.
7027 (driver::suggest_option): Likewise.
7028 (driver::handle_unrecognized_options): Use option_proposer.
7029 * gcc.h (class driver): Add new memver m_option_proposer.
7030 * opt-suggestions.c: New file.
7031 * opt-suggestions.h: New file.
7032
7033 2018-06-28 Martin Liska <mliska@suse.cz>
7034
7035 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7036 (auto_string_vec::~auto_string_vec): Likewise.
7037
7038 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7039
7040 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7041 prevent_decl_creation_for_types fields up and add reset_location field.
7042 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7043 statement if id->reset_location is true.
7044 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7045 id->reset_location is true.
7046 (copy_phis_for_bb): Force input_location on the arguments if
7047 id->reset_location is true.
7048 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7049 is set on the function to be inlined.
7050
7051 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7052
7053 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7054
7055 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7056
7057 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7058 registers for Pmode.
7059 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7060 hard registers for the clobbered pseudo.
7061
7062 2018-06-27 Paul Koning <ni1d@arrl.net>
7063
7064 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7065 mutually exclusive options.
7066 * config/pdp11/constraints.md (h): New constraint.
7067 (O): Update definition to match shift code generation.
7068 (D): New constraint.
7069 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7070 (CCFP): Remove.
7071 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7072 function.
7073 (output_jump): Change arguments.
7074 (pdp11_fixed_cc_regs): New function.
7075 (pdp11_cc_mode): Ditto.
7076 (pdp11_expand_shift): Ditto.
7077 (pdp11_assemble_shift): Ditto.
7078 (pdp11_small_shift): Ditto.
7079 (pdp11_branch_cost): Remove.
7080 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7081 from output.
7082 (pdp11_register_move_cost): Update for CC registers.
7083 (pdp11_rtx_costs): Add case for LSHIFTRT.
7084 (pdp11_output_jump): Add CCNZ mode conditional branches.
7085 (notice_update_cc_on_set): Remove.
7086 (pdp11_cc_mode): New function.
7087 (simple_memory_operand): Correct pre/post decrement case.
7088 (no_side_effect_operand): New function.
7089 (pdp11_regno_reg_class): Add CC_REGS class.
7090 (pdp11_fixed_cc_regs): New function.
7091 (pdp11_small_shift): New function.
7092 (pdp11_expand_shift): New function to expand shift insns.
7093 (pdp11_assemble_shift): New function to output shifts.
7094 (pdp11_branch_cost): Remove.
7095 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7096 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7097 (WCHAR_TYPE): Ditto.
7098 (PTRDIFF_TYPE): Ditto.
7099 (ADJUST_INSN_LENGTH): New macro.
7100 (FIXED_REGISTERS): Add CC registers.
7101 (CALL_USED_REGISTERS): Ditto.
7102 (reg_class): Ditto.
7103 (REG_CLASS_NAMES): Ditto.
7104 (REG_CLASS_CONTENTS): Ditto.
7105 (SELECT_CC_MODE): Use new function.
7106 (TARGET_FLAGS_REGNUM): New macro.
7107 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7108 (cc0_reg_rtx): Remove.
7109 (CC_STATUS_MDEP): Remove.
7110 (CC_STATUS_MDEFP_INIT): Remove.
7111 (CC_IN_FPU): Remove.
7112 (NOTICE_UPDATE_CC): Remove.
7113 (REGISTER_NAMES): Add CC registers.
7114 (BRANCH_COST): Change to constant 1.
7115 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7116 handling.
7117 * config/pdp11/pdp11.opt (mbcopy): Remove.
7118 (mbcopy-builtin): Remove.
7119 (mbranch-cheap): Remove.
7120 (mbranch-expensive): Remove.
7121 * config/pdp11/predicates.md (expand_shift_operand): Update to
7122 match shift code generation.
7123 (ccnz_operator): New predicate.
7124 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7125 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7126 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7127 exclusive options.
7128 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7129 description of O constraint.
7130
7131 2018-06-27 Jeff Law <law@redhat.com>
7132 Austin Law <austinklaw@gmail.com>
7133
7134 * config/v850/v850.md (addsi3_set_flags): New pattern.
7135 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7136 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7137 (zero_extendhisi2_v850_set_flags): Likewise.
7138 (zero_extendqisi2_v850_set_flags): Likewise.
7139 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7140 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7141 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7142
7143 * config/v850/v850-protos.h (notice_update_cc): Remove.
7144 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7145 (v850_print_operand): Handle 'D' and "d".
7146 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7147 Add handling of arithmetic/logical operations compared against zero.
7148 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7149 Do not look at v850_compare_op, instead get mode from last argument.
7150 (v850_gen_compare): Remove
7151 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7152 after reload for prologue insns.
7153 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7154 patterns.
7155 (construct_save_jarl): Likewise.
7156 (TARGET_FLAGS_REGNUM): Define.
7157 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7158 (NOTICE_UPDATE_CC): Remove.
7159 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7160 than cc0. Conditionalize on reload_completed.
7161 (cmpsi_insn, setfcc_insn): Likewise.
7162 (tst1 splitter): Turn into define_and_split which sets the flags
7163 after reload.
7164 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7165 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7166 (cstoresf4, cstoredf4): Clobber the flags.
7167 (cmpsi, cmpsf, cmpdf): Remove expanders.
7168 (setf_insn): Remove pattern.
7169 (addsi3): Turn into define_and_split which clobbers the flags after
7170 reload and a suitable pattern (addsi3_clobber_flags) for use after
7171 reload.
7172 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7173 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7174 (ashrsi3, ashrsi3_v850e2): Likewise.
7175 (bins): Clobber the flags.
7176 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7177 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7178 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7179 (call_value_internal_short, call_value_internal_long): Likewise.
7180 (callt_save_interrupt, callt_return_interrupt): Likewise.
7181 (save_interrupt, return_interrupt): Likewise.
7182 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7183 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7184 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7185 (All FP comparisons): Only allow after reload has completed.
7186 (trfsr): Likewise.
7187 (divh, divhu): Tweak output template.
7188 (branch_z_normal, branch_z_invert): Remove
7189 (branch_nz_normal, branch_nz_invert): Likewise.
7190 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7191
7192 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7193 * config/v850/v850.c (notice_update_cc): Remove.
7194 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7195 (CC_NO_CARRY): Likewise.
7196 (NOTICE_UPDATE_CC): Define to nothing.
7197 * config/v850/v850.md: Remove block comment on cc0 handling
7198 Remove "cc" attribute from all patterns. Remove cc_status handling
7199 from all patterns. Minor formatting fixes.
7200
7201 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7202
7203 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7204 (cortex-a76.cortex-a55): Likewise.
7205 * config/aarch64/aarch64-tune.md: Regenerate.
7206 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7207 cortex-a76.cortex-a55.
7208
7209 2018-06-27 Jeff Law <law@redhat.com>
7210
7211 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7212 (MULTILIB_DIRNAMES): Similarly.
7213
7214 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7215
7216 * gimple.h (gimple_return_retbnd): Delete.
7217 (gimple_return_set_retbnd): Likewise.
7218 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7219 gimple_return_set_retbnd.
7220 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7221 gimple_return_retbnd and adjust.
7222 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7223 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7224 Explicitly return NULL in a couple more cases. Move assertion
7225 on debug statements and remove unreachable code.
7226 (reset_debug_binding): Do not test id->retbnd.
7227 (expand_call_inline): Do not set it.
7228
7229 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7230
7231 * configure.ac: Add --disable-gcov option.
7232 * configure: Regenerate.
7233 * Makefile.in: Honour @enable_gcov@.
7234 * doc/install.texi: Document --disable-gcov.
7235
7236 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7237
7238 * config/arm/arm-cpus.in (cortex-a76): New entry.
7239 (cortex-a76.cortex-a55): Likewise.
7240 * config/arm/arm-tables.opt: Regenerate.
7241 * config/arm/arm-tune.md: Likewise.
7242 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7243 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7244 cortex-a76.cortex-a55.
7245
7246 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7247
7248 PR target/85769
7249 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7250
7251 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7252
7253 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7254 comment.
7255 (EPILOGUE_USES): Likewise.
7256
7257 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7258
7259 * tree-inline.c (remap_location): New function extracted from...
7260 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7261 (copy_phis_for_bb): ...here. Call remap_location.
7262 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7263
7264 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7265
7266 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7267 unaligned vsx for 16B memset.
7268
7269 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7270
7271 PR target/86285
7272 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7273 ieee128_float_type_node to long_double_type_node unless
7274 TARGET_LONG_DOUBLE_128 is set.
7275
7276 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7277
7278 * cfgloop.c (get_loop_location): Convert return type from
7279 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7280 by implicit construction from rtx_insn *, and using
7281 dump_user_location_t::from_function_decl for the fallback case.
7282 * cfgloop.h (get_loop_location): Convert return type from
7283 location_t to dump_user_location_t.
7284 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7285 dump_printf_loc to pass in a dump_location_t rather than a
7286 location_t, via the gimple stmt.
7287 * coverage.c (get_coverage_counts): Update calls to
7288 dump_printf_loc to pass in dump_location_t rather than a
7289 location_t.
7290 * doc/optinfo.texi (Dump types): Convert example of
7291 dump_printf_loc from taking "locus" to taking "insn". Update
7292 description of the "_loc" calls to cover dump_location_t.
7293 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7294 "selftest.h".
7295 (dump_user_location_t::dump_user_location_t): New constructors,
7296 from gimple *stmt and rtx_insn *.
7297 (dump_user_location_t::from_function_decl): New function.
7298 (dump_loc): Make static.
7299 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7300 const dump_location_t &.
7301 (dump_generic_expr_loc): Delete.
7302 (dump_printf_loc): Convert param "loc" from location_t to
7303 const dump_location_t &.
7304 (selftest::test_impl_location): New function.
7305 (selftest::dumpfile_c_tests): New function.
7306 * dumpfile.h: Include "profile-count.h".
7307 (class dump_user_location_t): New class.
7308 (struct dump_impl_location_t): New struct.
7309 (class dump_location_t): New class.
7310 (dump_printf_loc): Convert 2nd param from source_location to
7311 const dump_location_t &.
7312 (dump_generic_expr_loc): Delete.
7313 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7314 const dump_location_t &.
7315 * gimple-fold.c (fold_gimple_assign): Update call to
7316 dump_printf_loc to pass in a dump_location_t rather than a
7317 location_t, via the gimple stmt.
7318 (gimple_fold_call): Likewise.
7319 * gimple-loop-interchange.cc
7320 (loop_cand::analyze_iloop_reduction_var): Update for change to
7321 check_reduction_path.
7322 (tree_loop_interchange::interchange): Update for change to
7323 find_loop_location.
7324 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7325 change in return-type of find_loop_location.
7326 (graphite_regenerate_ast_isl): Likewise.
7327 * graphite-optimize-isl.c (optimize_isl): Likewise.
7328 * graphite.c (graphite_transform_loops): Likewise.
7329 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7330 pass in a dump_location_t rather than a location_t, via the
7331 gimple stmt.
7332 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7333 * ipa.c (walk_polymorphic_call_targets): Likewise.
7334 * loop-unroll.c (report_unroll): Convert "locus" param from
7335 location_t to dump_location_t.
7336 (decide_unrolling): Update for change to get_loop_location's
7337 return type.
7338 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7339 location_t to dump_user_location_t.
7340 (grid_find_single_omp_among_assignments_1): Updates calls to
7341 dump_printf_loc to pass in a dump_location_t rather than a
7342 location_t, via the gimple stmt.
7343 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7344 location_t to dump_location_t. Updates calls to dump_printf_loc
7345 to pass in a dump_location_t rather than a location_t, via the
7346 gimple stmt.
7347 (grid_inner_loop_gridifiable_p): Likewise.
7348 (grid_dist_follows_simple_pattern): Likewise.
7349 (grid_gfor_follows_tiling_pattern): Likewise.
7350 (grid_target_follows_gridifiable_pattern): Likewise.
7351 (grid_attempt_target_gridification): Convert initialization
7352 of local "grid" from memset to zero-initialization; FIXME: does
7353 this require C++11? Update call to dump_printf_loc to pass in a
7354 optinfo_location rather than a location_t, via the gimple stmt.
7355 * profile.c (read_profile_edge_counts): Updates call to
7356 dump_printf_loc to pass in a dump_location_t rather than a
7357 location_t
7358 (compute_branch_probabilities): Likewise.
7359 * selftest-run-tests.c (selftest::run_tests): Call
7360 dumpfile_c_tests.
7361 * selftest.h (dumpfile_c_tests): New decl.
7362 * tree-loop-distribution.c (pass_loop_distribution::execute):
7363 Update for change in return type of find_loop_location.
7364 * tree-parloops.c (parallelize_loops): Likewise.
7365 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7366 "locus" from location_t to dump_user_location_t.
7367 (canonicalize_loop_induction_variables): Likewise.
7368 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7369 for change in return type of find_loop_location.
7370 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7371 to dump_printf_loc to pass in a dump_location_t rather than a
7372 location_t, via the stmt.
7373 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7374 Likewise.
7375 * tree-vect-loop-manip.c (find_loop_location): Convert return
7376 type from source_location to dump_user_location_t.
7377 (vect_do_peeling): Update for above change.
7378 (vect_loop_versioning): Update for change in type of
7379 vect_location.
7380 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7381 from location_t to dump_user_location_t.
7382 (vect_estimate_min_profitable_iters): Update for change in type
7383 of vect_location.
7384 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7385 location_t to dump_location_t.
7386 (vect_slp_bb): Update for change in type of vect_location.
7387 * tree-vectorizer.c (vect_location): Convert from source_location
7388 to dump_user_location_t.
7389 (try_vectorize_loop_1): Update for change in vect_location's type.
7390 (vectorize_loops): Likewise.
7391 (increase_alignment): Likewise.
7392 * tree-vectorizer.h (vect_location): Convert from source_location
7393 to dump_user_location_t.
7394 (find_loop_location): Convert return type from source_location to
7395 dump_user_location_t.
7396 (check_reduction_path): Convert 1st param from location_t to
7397 dump_user_location_t.
7398 * value-prof.c (check_counter): Update call to dump_printf_loc to
7399 pass in a dump_user_location_t rather than a location_t; update
7400 call to error_at for change in type of "locus".
7401 (check_ic_target): Update call to dump_printf_loc to
7402 pass in a dump_user_location_t rather than a location_t, via the
7403 call_stmt.
7404
7405 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7406
7407 * config/s390/s390.h (enum processor_flags): Do not use
7408 default tune parameter when -march was specified.
7409
7410 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7411
7412 PR target/86314
7413 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7414 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7415 operands.
7416
7417 2018-06-26 Richard Biener <rguenther@suse.de>
7418
7419 PR tree-optimization/86287
7420 PR bootstrap/86316
7421 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7422 (vect_analyze_loop): Initialize n_stmts.
7423
7424 2018-06-26 Richard Biener <rguenther@suse.de>
7425
7426 PR middle-end/86271
7427 * fold-const.c (fold_convertible_p): Pointer extension
7428 isn't valid.
7429
7430 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7431
7432 PR debug/86064
7433 * dwarf2out.c (loc_list_has_views): Adjust comments.
7434 (dw_loc_list): Split single cross-partition range with
7435 nonzero locview.
7436
7437 2018-06-25 Jeff Law <law@redhat.com>
7438
7439 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7440 on -mbig-switch by default.
7441
7442 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7443 test.
7444 (const_float_0_operand): Remove unused predicate.
7445 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7446 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7447 (recipsf2): New expander. Original pattern now called
7448 (recipsf2_insn).
7449 (recipdf2, recipdf2_insn): Similarly.
7450 (rsqrtsf2, rsqrtsf2_insn): Similarly
7451 (rsqrtdf2, rsqrtdf2_insn): Similarly
7452
7453 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7454
7455 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7456 Simplify logic for FreeBSD (twice).
7457
7458 2018-06-25 Martin Sebor <msebor@redhat.com>
7459
7460 PR tree-optimization/86204
7461 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7462 a strnlen result if it's less than the length of the string.
7463
7464 2018-06-25 Martin Sebor <msebor@redhat.com>
7465
7466 PR tree-optimization/85700
7467 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7468 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7469 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7470
7471 2018-06-25 Martin Sebor <msebor@redhat.com>
7472
7473 * doc/extend.texi (Zero-length arrays): Update and clarify.
7474
7475 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7476
7477 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7478 added IEEE/IBM long double multilib support on PowerPC little
7479 endian Linux systems.
7480 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7481 (MULTILIB_DEFAULTS): Likewise.
7482 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7483 Likewise.
7484 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7485 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7486 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7487
7488 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7489
7490 PR middle-end/86311
7491 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7492 (REORDER_45): Likewise.
7493
7494 2018-06-25 Jeff Law <law@redhat.com>
7495
7496 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7497 dividend to 32 bits. Adjust length.
7498 (udivmodhi4): Cleanup output template. Fix length.
7499
7500 2018-06-25 Carl Love <cel@us.ibm.com>
7501
7502 * config/rs6000/vsx.md: Change word selector to prefered location.
7503
7504 2018-06-25 Richard Biener <rguenther@suse.de>
7505
7506 PR tree-optimization/86304
7507 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7508 epilogue-if-converted loops as well.
7509
7510 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7511
7512 * lto-section-out.c (lto_begin_section): Do not print section
7513 name for noaddr and unnumbered dumps.
7514
7515 2018-06-25 Richard Biener <rguenther@suse.de>
7516
7517 * tree-vectorizer.h (struct vec_info_shared): New structure
7518 with parts split out from struct vec_info and loop_nest from
7519 struct _loop_vec_info.
7520 (struct vec_info): Adjust accordingly.
7521 (struct _loop_vec_info): Likewise.
7522 (LOOP_VINFO_LOOP_NEST): Adjust.
7523 (LOOP_VINFO_DATAREFS): Likewise.
7524 (LOOP_VINFO_DDRS): Likewise.
7525 (struct _bb_vec_info): Likewise.
7526 (BB_VINFO_DATAREFS): Likewise.
7527 (BB_VINFO_DDRS): Likewise.
7528 (struct _stmt_vec_info): Add dr_aux member.
7529 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7530 (DR_MISALIGNMENT_UNINITIALIZED): New.
7531 (set_dr_misalignment): Adjust.
7532 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7533 (vect_analyze_loop): Adjust prototype.
7534 (vect_analyze_loop_form): Likewise.
7535 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7536 Compute dependences lazily.
7537 (vect_record_base_alignments): Use shared datarefs/ddrs.
7538 (vect_verify_datarefs_alignment): Likewise.
7539 (vect_analyze_data_refs_alignment): Likewise.
7540 (vect_analyze_data_ref_accesses): Likewise.
7541 (vect_analyze_data_refs): Likewise.
7542 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7543 constructor parameter for shared part.
7544 (vect_analyze_loop_form): Pass in shared part and adjust.
7545 (vect_analyze_loop_2): Pass in storage for the number of
7546 stmts. Move loop nest finding to the caller. Compute
7547 datarefs lazily.
7548 (vect_analyze_loop): Pass in shared part.
7549 (vect_transform_loop): Verify shared datarefs are unchanged.
7550 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7551 constructor parameter for shared part.
7552 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7553 (vect_slp_bb): Verify shared datarefs are unchanged before
7554 transform.
7555 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7556 change.
7557 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7558 DR_MISALIGNMENT_UNINITIALIZED.
7559 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7560 parameter for shared part.
7561 (vec_info::~vec_info): Adjust.
7562 (vec_info_shared::vec_info_shared): New.
7563 (vec_info_shared::~vec_info_shared): Likewise.
7564 (vec_info_shared::save_datarefs): Likewise.
7565 (vec_info_shared::check_datarefs): Likewise.
7566 (try_vectorize_loop_1): Construct shared part live for analyses
7567 of a single loop for multiple vector sizes.
7568 * tree-parloops.c (gather_scalar_reductions): Adjust.
7569
7570 2018-06-25 Richard Biener <rguenther@suse.de>
7571
7572 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7573 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7574 (vect_analyze_data_refs): Remove similar code from here and
7575 simplify accordingly.
7576
7577 2018-06-25 Richard Biener <rguenther@suse.de>
7578
7579 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7580 for reverse storage order accesses rather than asserting
7581 they cannot happen here.
7582
7583 2018-06-25 Tom de Vries <tdevries@suse.de>
7584
7585 PR debug/86257
7586 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7587 Use data16 instead of .byte for insn prefix.
7588
7589 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7590
7591 PR C++/86082
7592 * parser.c (make_char_string_pack): Pass this literal chars
7593 through cpp_interpret_string.
7594 (cp_parser_userdef_numeric_literal): Check the result of
7595 make_char_string_pack.
7596
7597 2018-06-24 Maya Rashish <coypu@sdf.org>
7598
7599 * ginclude/stddef.h: Simplify conditions around avoiding
7600 re-definition of __size_t.
7601
7602 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7603
7604 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7605 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7606
7607 2018-06-22 Maya Rashish <coypu@sdf.org>
7608
7609 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7610 made to OpenBSD and NetBSD through the years.
7611
7612 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7613
7614 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7615 behavior of vec_pack (vector double, vector double) to match
7616 behavior of vec_float2 (vector double, vector double).
7617
7618 2018-06-22 Olivier Hainque <hainque@adacore.com>
7619
7620 * gimplify.c (gimplify_function_tree): Prevent creation
7621 of a trampoline for the address of the current function
7622 passed to entry/exit instrumentation hooks.
7623
7624 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7625
7626 PR target/86222
7627 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7628 correctly.
7629
7630 2018-06-22 Martin Liska <mliska@suse.cz>
7631
7632 PR tree-optimization/86263
7633 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7634 Bail out if is_enabled is false.
7635 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7636 New declaration.
7637 (jump_table_cluster::is_enabled): New function.
7638
7639 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7640
7641 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7642 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7643 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7644 (lto_input_ts_binfo_tree_pointers): Likewise.
7645 * tree-streamer-out.c (streamer_write_tree_bitfields,
7646 write_ts_binfo_tree_pointers): Likewise.
7647 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7648
7649 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7650
7651 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7652
7653 2018-06-22 Martin Liska <mliska@suse.cz>
7654
7655 * symbol-summary.h (get): Make it pure and inline move
7656 functionality from ::get function.
7657 (get): Remove and inline into ::get and ::get_create.
7658 (get_create): Move code from ::get function.
7659
7660 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7661
7662 PR target/85994
7663 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7664 -x assembler-with-cpp.
7665
7666 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7667
7668 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7669 _FILE_OFFSET_BITS=64 for C++.
7670
7671 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7672
7673 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7674 conversion insn that shows up when pr85657-3.c is compiled using
7675 IEEE 128-bit long double.
7676 (neg<mode>2_internal): Use the correct mode to check whether the
7677 mode is IBM extended.
7678 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7679 multiply and divide external functions from being created more
7680 than once.
7681
7682 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7683
7684 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7685 functions.
7686 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7687 the edge can be forwarded.
7688 (cfg_layout_merge_blocks): Likewise.
7689
7690 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7691
7692 * except.c (finish_eh_generation): Commit edge insertions only after
7693 the EH edges have been redirected from post-landing to landing pads.
7694
7695 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7696
7697 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7698 create_tmp_var_for to create the FRAME decl.
7699 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7700
7701 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7702
7703 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7704 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7705 debug statement when resetting its value.
7706 (expand_call_inline): Copy the locus of the call onto the assignment
7707 of the return value, if any. Use local variable in more cases.
7708
7709 2018-06-21 Martin Liska <mliska@suse.cz>
7710
7711 * ipa-pure-const.c (propagate_nothrow): Use
7712 funct_state_summaries->get.
7713 (dump_malloc_lattice): Likewise.
7714 (propagate_malloc): Likewise.
7715
7716 2018-06-21 Richard Biener <rguenther@suse.de>
7717
7718 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7719 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7720 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7721 comment.
7722 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7723 BLOCK_ABSTRACT_ORIGIN unconditionally.
7724
7725 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7726
7727 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7728 deleting it.
7729 * ipa-reference.c (ipa_reference_c_finalize): Delete
7730 ipa_ref_opt_sum_summaries and set it to NULL.
7731
7732 2018-06-21 Tom de Vries <tdevries@suse.de>
7733
7734 PR tree-optimization/85859
7735 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7736 test with comment from bb_no_side_effects_p.
7737
7738 2018-06-21 Richard Biener <rguenther@suse.de>
7739
7740 PR tree-optimization/86232
7741 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7742 max for constant niter.
7743
7744 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7745
7746 * config/aarch64/aarch64-simd.md
7747 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7748
7749 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7750
7751 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7752 Make opernads of the unspec commutative.
7753
7754 2018-06-21 Richard Biener <rguenther@suse.de>
7755
7756 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7757 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7758 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7759 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7760 NULL DR_STEP.
7761 (vect_record_base_alignments): Do not record base alignment
7762 for gathers or scatters.
7763 (vect_compute_data_ref_alignment): Drop return value that is always
7764 true. Bail out early for gathers or scatters.
7765 (vect_enhance_data_refs_alignment): Bail out early for gathers
7766 or scatters.
7767 (vect_find_same_alignment_drs): Likewise.
7768 (vect_analyze_data_refs_alignment): Remove dead code.
7769 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7770 (vect_analyze_data_refs): For possible gathers or scatters do
7771 not create an alternate DR, just check their possible validity
7772 and mark them. Adjust DECL_NONALIASED handling to not rely
7773 on DR_BASE_ADDRESS.
7774 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7775 update inits of gathers or scatters.
7776 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7777 Also copy gather/scatter flag to pattern vinfo.
7778
7779 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7780
7781 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7782 behavior of vec_packsu (vector unsigned long long, vector unsigned
7783 long long) to match behavior of vec_packs with same signature.
7784
7785 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7786 Thomas Schwinge <thomas@codesourcery.com>
7787 Cesar Philippidis <cesar@codesourcery.com>
7788
7789 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7790 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7791 (gimplify_adjust_omp_clauses): Likewise.
7792 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7793 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7794 (gimplify_omp_target_update): Update handling of acc update and
7795 enter/exit data.
7796 * omp-low.c (install_var_field): Remove unused parameter
7797 base_pointers_restrict.
7798 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7799 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7800 FINALIZE}
7801 (omp_target_base_pointers_restrict_p): Delete.
7802 (scan_omp_target): Update call to scan_sharing_clauses.
7803 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7804 FINALIZE}.
7805 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7806 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7807 (convert_local_omp_clauses): Likewise.
7808 * tree-pretty-print.c (dump_omp_clause): Likewise.
7809 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7810 FINALIZE}.
7811 (omp_clause_code_name): Likewise.
7812
7813 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7814
7815 PR debug/86194
7816 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7817 be narrowed.
7818
7819 PR tree-optimization/86231
7820 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7821 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7822
7823 2018-06-20 Tom de Vries <tdevries@suse.de>
7824
7825 PR tree-optimization/86097
7826 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7827 iv type if signedness of iv type is not the same as that of *nit.
7828
7829 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7830
7831 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7832 EDGE_EH edges, verify they are all EDGE_EH.
7833
7834 2018-06-20 Maya Rashish <coypu@sdf.org>
7835
7836 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7837
7838 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7839
7840 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7841 * config/aarch64/aarch64.c (xgene1_tunings): Add
7842 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7843 (aarch64_mode_valid_for_sched_fusion_p):
7844 Allow 16-byte modes.
7845 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7846 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7847 128-bit modes.
7848 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7849 New pattern.
7850 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7851 * config/aarch64/iterators.md (VQ2): New mode iterator.
7852
7853 2018-06-20 Martin Liska <mliska@suse.cz>
7854
7855 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7856 Change default ratio from 10 to 8.
7857
7858 2018-06-20 Martin Liska <mliska@suse.cz>
7859
7860 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7861 New.
7862 (bit_test_cluster::find_bit_tests): Likewise.
7863 (switch_decision_tree::analyze_switch_statement): Find clusters.
7864 * tree-switch-conversion.h (struct jump_table_cluster): Document
7865 hierarchy.
7866
7867 2018-06-20 Martin Liska <mliska@suse.cz>
7868
7869 * tree-switch-conversion.c (switch_conversion::collect):
7870 Record m_uniq property.
7871 (switch_conversion::expand): Bail out for special conditions.
7872 (group_cluster::~group_cluster): New.
7873 (group_cluster::group_cluster): Likewise.
7874 (group_cluster::dump): Likewise.
7875 (jump_table_cluster::emit): New.
7876 (switch_decision_tree::fix_phi_operands_for_edges): New.
7877 (struct case_node): Remove struct.
7878 (jump_table_cluster::can_be_handled): New.
7879 (case_values_threshold): Moved to header.
7880 (reset_out_edges_aux): Likewise.
7881 (jump_table_cluster::is_beneficial): New.
7882 (bit_test_cluster::can_be_handled): Likewise.
7883 (add_case_node): Remove.
7884 (bit_test_cluster::is_beneficial): New.
7885 (case_bit_test::cmp): New.
7886 (bit_test_cluster::emit): New.
7887 (expand_switch_as_decision_tree_p): Remove.
7888 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7889 (fix_phi_operands_for_edge): Likewise.
7890 (switch_decision_tree::analyze_switch_statement): New.
7891 (compute_cases_per_edge): Move ...
7892 (switch_decision_tree::compute_cases_per_edge): ... here.
7893 (try_switch_expansion): Likewise.
7894 (switch_decision_tree::try_switch_expansion): Likewise.
7895 (record_phi_operand_mapping): Likewise.
7896 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7897 (emit_case_decision_tree): Likewise.
7898 (switch_decision_tree::emit): Likewise.
7899 (balance_case_nodes): Likewise.
7900 (switch_decision_tree::balance_case_nodes): Likewise.
7901 (dump_case_nodes): Likewise.
7902 (switch_decision_tree::dump_case_nodes): Likewise.
7903 (emit_jump): Likewise.
7904 (switch_decision_tree::emit_jump): Likewise.
7905 (emit_cmp_and_jump_insns): Likewise.
7906 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7907 (emit_case_nodes): Likewise.
7908 (switch_decision_tree::emit_case_nodes): Likewise.
7909 (conditional_probability): Remove.
7910 * tree-switch-conversion.h (enum cluster_type): New.
7911 (PRINT_CASE): New.
7912 (struct cluster): Likewise.
7913 (cluster::cluster): Likewise.
7914 (struct simple_cluster): Likewise.
7915 (simple_cluster::simple_cluster): Likewise.
7916 (struct group_cluster): Likewise.
7917 (struct jump_table_cluster): Likewise.
7918 (struct bit_test_cluster): Likewise.
7919 (struct min_cluster_item): Likewise.
7920 (struct case_tree_node): Likewise.
7921 (case_tree_node::case_tree_node): Likewise.
7922 (jump_table_cluster::case_values_threshold): Likewise.
7923 (struct case_bit_test): Likewise.
7924 (struct switch_decision_tree): Likewise.
7925 (struct switch_conversion): Likewise.
7926 (switch_decision_tree::reset_out_edges_aux): Likewise.
7927
7928 2018-06-20 Martin Liska <mliska@suse.cz>
7929
7930 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7931 (hoist_edge_and_branch_if_true): Likewise.
7932 (expand_switch_using_bit_tests_p): Likewise.
7933 (struct case_bit_test): Likewise.
7934 (case_bit_test_cmp): Likewise.
7935 (emit_case_bit_tests): Likewise.
7936 (switch_conversion::switch_conversion): New class.
7937 (struct switch_conv_info): Remove old struct.
7938 (collect_switch_conv_info): More to ...
7939 (switch_conversion::collect): ... this.
7940 (check_range): Likewise.
7941 (switch_conversion::check_range): Likewise.
7942 (check_all_empty_except_final): Likewise.
7943 (switch_conversion::check_all_empty_except_final): Likewise.
7944 (check_final_bb): Likewise.
7945 (switch_conversion::check_final_bb): Likewise.
7946 (create_temp_arrays): Likewise.
7947 (switch_conversion::create_temp_arrays): Likewise.
7948 (free_temp_arrays): Likewise.
7949 (gather_default_values): Likewise.
7950 (switch_conversion::gather_default_values): Likewise.
7951 (build_constructors): Likewise.
7952 (switch_conversion::build_constructors): Likewise.
7953 (constructor_contains_same_values_p): Likewise.
7954 (switch_conversion::contains_same_values_p): Likewise.
7955 (array_value_type): Likewise.
7956 (switch_conversion::array_value_type): Likewise.
7957 (build_one_array): Likewise.
7958 (switch_conversion::build_one_array): Likewise.
7959 (build_arrays): Likewise.
7960 (switch_conversion::build_arrays): Likewise.
7961 (gen_def_assigns): Likewise.
7962 (switch_conversion::gen_def_assigns): Likewise.
7963 (prune_bbs): Likewise.
7964 (switch_conversion::prune_bbs): Likewise.
7965 (fix_phi_nodes): Likewise.
7966 (switch_conversion::fix_phi_nodes): Likewise.
7967 (gen_inbound_check): Likewise.
7968 (switch_conversion::gen_inbound_check): Likewise.
7969 (process_switch): Use the newly created class.
7970 (switch_conversion::expand): New.
7971 (switch_conversion::~switch_conversion): New.
7972 * tree-switch-conversion.h: New file.
7973
7974 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7975
7976 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7977 tree-vect-patterns.c.
7978 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7979 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7980 (vect_recog_sad_pattern): Likewise.
7981 (vect_recog_widen_sum_pattern): Likewise.
7982 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7983 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7984 (vect_recog_rotate_pattern): Likewise.
7985 (vect_recog_mult_pattern): Likewise.
7986 (vect_recog_vector_vector_shift_pattern): Likewise.
7987 (vect_recog_divmod_pattern): Likewise.
7988 (vect_recog_mixed_size_cond_pattern): Likewise.
7989 (vect_recog_bool_pattern): Likewise.
7990 (vect_recog_mask_conversion_pattern): Likewise.
7991 (vect_try_gather_scatter_pattern): Likewise.
7992 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7993 (vect_recog_over_widening_pattern): Likewise.
7994 (vect_recog_gather_scatter_pattern): Likewise.
7995 (vect_recog_func_ptr): Move from tree-vectorizer.h
7996 (vect_vect_recog_func_ptrs): Move further down the file.
7997 (vect_recog_func): Likewise. Remove the third argument.
7998 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7999 (vect_pattern_recog_1): Expect the pattern function to do any
8000 necessary target tests. Also expect it to provide a vector type.
8001 Remove the type_in handling.
8002
8003 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8004
8005 * tree-vect-patterns.c (vect_pattern_detected): New function.
8006 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8007 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8008 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8009 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8010 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8011 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8012 (vect_recog_mask_conversion_pattern)
8013 (vect_try_gather_scatter_pattern): Likewise.
8014
8015 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8016
8017 * tree-vect-patterns.c (vect_get_internal_def): New function.
8018 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8019 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8020 (search_type_for_mask_1): Use it.
8021
8022 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8023
8024 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8025 redundant WIDEN_SUM_EXPR handling.
8026 (vect_recog_sad_pattern): Likewise.
8027
8028 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8029
8030 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8031 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8032 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8033 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8034 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8035
8036 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8037
8038 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8039 use the stmt_vec_info of the original bb statement for the
8040 new zero assignment, even if the call is part of a pattern.
8041
8042 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8043
8044 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8045 that the sequence is attached to the original statement rather
8046 than the pattern statement.
8047 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8048 PATTERN_DEF_SEQ from the original statement rather than
8049 the main pattern statement.
8050 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8051 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8052 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8053
8054 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8055
8056 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8057 definition statements before the early exit for statements that aren't
8058 live or relevant.
8059 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8060 split out from...
8061 (vect_transform_loop): ...here. Process pattern definition
8062 statements without first checking whether the main pattern
8063 statement is live or relevant.
8064
8065 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8066
8067 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8068 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8069
8070 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8071
8072 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8073 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8074 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8075 (expand_block_compare): Change select_block_compare_mode call.
8076 (expand_strncmp_align_check): Use new functions, fix comment.
8077 (emit_final_str_compare_gpr): New function.
8078 (expand_strn_compare): Refactor and clean up code.
8079 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8080
8081 2018-06-19 Tony Reix <tony.reix@atos.com>
8082 Damien Bergamini <damien.bergamini@atos.com>
8083 David Edelsohn <dje.gcc@gmail.com>
8084
8085 * collect2.c (static_obj): New variable.
8086 (static_libs): New variable.
8087 (is_in_list): Uncomment declaration.
8088 (main): Track AIX libraries linked statically.
8089 (is_in_list): Uncomment definition.
8090 (scan_prog_file): Don't add AIX shared libraries initializer
8091 to constructor list if linking statically.
8092
8093 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8094
8095 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8096 constant.
8097 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8098
8099 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8100
8101 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8102 blocks.
8103
8104 2018-06-19 Martin Liska <mliska@suse.cz>
8105
8106 * config/i386/i386.c (ix86_can_inline_p): Do not use
8107 ipa_fn_summaries::get_create.
8108 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8109 get.
8110 (devirtualization_time_bonus): Likewise.
8111 (ipcp_propagate_stage): Likewise.
8112 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8113 (edge_set_predicate): Likewise.
8114 (evaluate_conditions_for_known_args): Likewise.
8115 (evaluate_properties_for_edge): Likewise.
8116 (ipa_call_summary::reset): Tranform to ...
8117 (ipa_call_summary::~ipa_call_summary): ... this.
8118 (ipa_fn_summary::reset): Transform to ...
8119 (ipa_fn_summary::~ipa_fn_summary): ... this.
8120 (ipa_fn_summary_t::remove): Rename to ...
8121 (ipa_fn_summary_t::remove_callees): ... this.
8122 (ipa_fn_summary_t::duplicate): Use placement new
8123 instead of memory copy.
8124 (ipa_call_summary_t::duplicate): Likewise.
8125 (ipa_call_summary_t::remove): Remove.
8126 (dump_ipa_call_summary): Change get_create to get.
8127 (ipa_dump_fn_summary): Dump only when summary exists.
8128 (analyze_function_body): Use symbol_summary::get instead
8129 of get_create.
8130 (compute_fn_summary): Likewise.
8131 (estimate_edge_devirt_benefit): Likewise.
8132 (estimate_edge_size_and_time): Likewise.
8133 (inline_update_callee_summaries): Likewise.
8134 (remap_edge_change_prob): Likewise.
8135 (remap_edge_summaries): Likewise.
8136 (ipa_merge_fn_summary_after_inlining): Likewise.
8137 (write_ipa_call_summary): Likewise.
8138 (ipa_fn_summary_write): Likewise.
8139 (ipa_free_fn_summary): Likewise.
8140 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8141 (struct ipa_call_summary): Likewise.
8142 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8143 of get_create.
8144 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8145 (estimate_size_after_inlining): Likewise.
8146 (estimate_growth): Likewise.
8147 (growth_likely_positive): Likewise.
8148 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8149 (inline_call): Likewise.
8150 * ipa-inline.c (caller_growth_limits): Likewise.
8151 (can_inline_edge_p): Likewise.
8152 (can_inline_edge_by_limits_p): Likewise.
8153 (compute_uninlined_call_time): Likewise.
8154 (compute_inlined_call_time): Likewise.
8155 (want_inline_small_function_p): Likewise.
8156 (edge_badness): Likewise.
8157 (update_caller_keys): Likewise.
8158 (update_callee_keys): Likewise.
8159 (inline_small_functions): Likewise.
8160 (inline_to_all_callers_1): Likewise.
8161 (dump_overall_stats): Likewise.
8162 (early_inline_small_functions): Likewise.
8163 (early_inliner): Likewise.
8164 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8165 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8166 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8167 * ipa-split.c (execute_split_functions): Likewise.
8168 * symbol-summary.h: Likewise.
8169 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8170
8171 2018-06-19 Richard Biener <rguenther@suse.de>
8172
8173 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8174 (vectorize_loops): ... here. Fix dbgcnt handling.
8175 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8176
8177 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8178
8179 PR target/86197
8180 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8181 ieee128 argument takes up only one (vector) register, not two (floating
8182 point) registers.
8183
8184 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8185
8186 * gimplify.c (gimplify_init_constructor): Really never clear for an
8187 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8188
8189 2018-06-19 Richard Biener <rguenther@suse.de>
8190
8191 PR tree-optimization/86179
8192 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8193 after failed recognition.
8194
8195 2018-06-18 Martin Sebor <msebor@redhat.com>
8196
8197 PR middle-end/85602
8198 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8199 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8200 Handle integer subtraction.
8201 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8202 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8203
8204 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8205
8206 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8207 param from rtx to rtx_insn *.
8208 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8209 param.
8210 (frv_ifcvt_modify_insn): Likwise.
8211 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8212 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8213 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8214 as_a <rtx_insn *> cast to local "unprotected_region" once
8215 it's been established that it's not NULL or pc_rtx.
8216 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8217 param "sethi" from rtx to rtx_insn *.
8218 (nds32_group_float_insns): Likewise for param "insn".
8219 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8220 param.
8221 (vax_output_int_subtract): Likewise.
8222 * config/vax/vax.c (vax_output_int_add): Likewise for param
8223 "insn".
8224 (vax_output_int_subtract): Likewise.
8225 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8226 (emit_pattern_after): Likewise for param "after".
8227 (emit_insn_after): Likewise.
8228 (emit_jump_insn_after): Likewise.
8229 (emit_call_insn_after): Likewise.
8230 (emit_debug_insn_after): Likewise.
8231 (emit_pattern_before): Likewise for param "before".
8232 (emit_insn_before): Likewise.
8233 (emit_jump_insn_before): Likewise.
8234 * final.c (get_insn_template): Likewise for param "insn", removing
8235 a cast.
8236 * output.h (get_insn_template): Likewise for 2nd param.
8237 * rtl.h (emit_insn_before): Likewise.
8238 (emit_jump_insn_before): Likewise.
8239 (emit_debug_insn_before_noloc): Likewise.
8240 (emit_insn_after): Likewise.
8241 (emit_jump_insn_after): Likewise.
8242 (emit_call_insn_after): Likewise.
8243 (emit_debug_insn_after): Likewise.
8244 (set_insn_deleted): Likewise for param.
8245
8246 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8247
8248 PR target/85358
8249 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8250 floating point modes, so that IFmode is numerically greater than
8251 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8252 to declare the ordering. This prevents IFmode from being
8253 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8254 machine. Include rs6000-modes.h to share the fractional values
8255 between genmodes* and the rest of the compiler.
8256 (IFmode): Likewise.
8257 (KFmode): Likewise.
8258 (TFmode): Likewise.
8259 * config/rs6000/rs6000-modes.h: New file.
8260 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8261 meaning of rs6000_long_double_size so that 126..128 selects an
8262 appropriate 128-bit floating point type.
8263 (rs6000_option_override_internal): Likewise.
8264 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8265 (TARGET_LONG_DOUBLE_128): Change the meaning of
8266 rs6000_long_double_size so that 126..128 selects an appropriate
8267 128-bit floating point type.
8268 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8269 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8270 source and destination to match the standard usage.
8271 (truncifkf2): Likewise.
8272 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8273 ISA 2.07 to use an explicit clobber, instead of passing in a
8274 temporary.
8275 (copysign<mode>3_soft): Likewise.
8276
8277 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8278
8279 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8280 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8281 (vect_slp_analyze_instance_dependence): Likewise.
8282 (vect_enhance_data_refs_alignment): Likewise.
8283 (vect_analyze_data_refs_alignment): Likewise.
8284 (vect_slp_analyze_and_verify_instance_alignment
8285 (vect_analyze_data_ref_accesses): Likewise.
8286 (vect_prune_runtime_alias_test_list): Likewise.
8287 (vect_analyze_data_refs): Likewise.
8288 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8289 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8290 (vect_analyze_scalar_cycles_1): Likewise.
8291 (vect_get_loop_niters): Likewise.
8292 (vect_analyze_loop_form_1): Likewise.
8293 (vect_update_vf_for_slp): Likewise.
8294 (vect_analyze_loop_operations): Likewise.
8295 (vect_analyze_loop): Likewise.
8296 (vectorizable_induction): Likewise.
8297 (vect_transform_loop): Likewise.
8298 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8299 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8300 (vect_make_slp_decision): Likewise.
8301 (vect_detect_hybrid_slp): Likewise.
8302 (vect_slp_analyze_operations): Likewise.
8303 (vect_slp_bb): Likewise.
8304 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8305 (vectorizable_bswap): Likewise.
8306 (vectorizable_call): Likewise.
8307 (vectorizable_simd_clone_call): Likewise.
8308 (vectorizable_conversion): Likewise.
8309 (vectorizable_assignment): Likewise.
8310 (vectorizable_shift): Likewise.
8311 (vectorizable_operation): Likewise.
8312 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8313
8314 2018-06-18 Martin Sebor <msebor@redhat.com>
8315
8316 PR tree-optimization/81384
8317 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8318 * builtins.c (expand_builtin_strnlen): New function.
8319 (expand_builtin): Call it.
8320 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8321 * builtins.def (BUILT_IN_STRNLEN): New.
8322 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8323 Warn for bounds in excess of maximum object size.
8324 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8325 single-value ranges. Handle strnlen.
8326 (handle_builtin_strlen): Handle strnlen.
8327 (strlen_check_and_optimize_stmt): Same.
8328 * doc/extend.texi (Other Builtins): Document strnlen.
8329
8330 2018-06-18 Maya Rashish <coypu@sdf.org>
8331
8332 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8333 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8334 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8335
8336 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8337 here to ...
8338 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8339
8340 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8341
8342 * tree.c (escaped_string::escape): Replace cast to char * by
8343 const_cast<char *> (unescaped).
8344
8345 2018-06-18 Nick Clifton <nickc@redhat.com>
8346
8347 PR 84195
8348 * tree.c (escaped_string): New class. Converts an unescaped
8349 string into its escaped equivalent.
8350 (warn_deprecated_use): Use the new class to convert the
8351 deprecation message, if present.
8352 (test_escaped_strings): New self test.
8353 (test_c_tests): Add test_escaped_strings.
8354 * doc/extend.texi (deprecated): Add a note that the
8355 deprecation message is affected by the -fmessage-length
8356 option, and that control characters will be escaped.
8357 (#pragma GCC error): Document this pragma.
8358 (#pragma GCC warning): Likewise.
8359 * doc/invoke.texi (-fmessage-length): Document this option's
8360 effect on the #warning and #error preprocessor directives and
8361 the deprecated attribute.
8362
8363 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8364
8365 * tree.c (decl_value_expr_lookup): Revert latest change.
8366 (decl_value_expr_insert): Likewise.
8367
8368 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8369
8370 * gimplify.c (nonlocal_vlas): Delete.
8371 (nonlocal_vla_vars): Likewise.
8372 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8373 referenced VLAs.
8374 (gimplify_body): Do not create and destroy nonlocal_vlas.
8375 * tree-nested.c: Include diagnostic.h.
8376 (use_pointer_in_frame): Tweak.
8377 (lookup_field_for_decl): Add assertion and declare the transformation.
8378 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8379 internal error when the reference is in a wrong context. Do not
8380 create a debug decl by default.
8381 (note_nonlocal_block_vlas): Delete.
8382 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8383 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8384 create a debug decl by default.
8385 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8386 call is in a wrong context.
8387 (fixup_vla_decls): New function.
8388 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8389 debug variables were created.
8390 * tree.c (decl_value_expr_lookup): Add checking assertion.
8391 (decl_value_expr_insert): Likewise.
8392
8393 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8394
8395 PR middle-end/82479
8396 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8397 * tree-scalar-evolution.c (interpret_expr): Likewise.
8398 (expression_expensive_p): Likewise.
8399 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8400 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8401 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8402 (ssa_defined_by_minus_one_stmt_p): New.
8403
8404 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8405
8406 PR middle-end/64946
8407 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8408 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8409 * dojump.c (do_jump): Likewise.
8410 * expr.c (expand_expr_real_2): Check operand type's sign.
8411 * fold-const.c (const_unop): Handle ABSU_EXPR.
8412 (fold_abs_const): Likewise.
8413 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8414 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8415 (strip_sign_op_1): Likesise.
8416 * match.pd: Add new pattern to generate ABSU_EXPR.
8417 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8418 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8419 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8420 * tree-inline.c (estimate_operator_cost): Likewise.
8421 * tree-pretty-print.c (dump_generic_node): Likewise.
8422 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8423 * tree.def (ABSU_EXPR): New.
8424
8425 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8426
8427 PR middle-end/86095
8428 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8429 documented as preserved for backward compatibility only.
8430 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8431
8432 PR rtl-optimization/86108
8433 * bb-reorder.c (create_forwarder_block): Renamed to ...
8434 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8435 jump from new landing pad to the second part.
8436 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8437 Adjust callers.
8438
8439 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8440
8441 PR middle-end/85878
8442 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8443 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8444 Only call store_expr for halves if the mode is the same.
8445
8446 PR middle-end/86123
8447 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8448 Fix up comment formatting.
8449
8450 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8451
8452 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8453 (typed_splay_tree::closure,
8454 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8455 (typed_splay_tree::typed_splay_tree,
8456 typed_splay_tree::operator =): Declared private.
8457 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8458 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8459 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8460 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8461 typed_splay_tree::splay_tree_splay,
8462 typed_splay_tree::splay_tree_foreach_helper,
8463 typed_splay_tree::splay_tree_insert,
8464 typed_splay_tree::splay_tree_remove,
8465 typed_splay_tree::splay_tree_lookup,
8466 typed_splay_tree::splay_tree_predecessor,
8467 typed_splay_tree::splay_tree_successor,
8468 typed_splay_tree::splay_tree_min,
8469 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8470 (typed_splay_tree::root, typed_splay_tree::comp,
8471 typed_splay_tree::delete_key,
8472 typed_splay_tree::delete_value): New data members.
8473 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8474 typed_splay_tree::remove.
8475
8476 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8477
8478 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8479 -mginv and -mno-ginv to the assembler.
8480 * config/mips/mips.opt (-mcrc): New option.
8481 (-mginv): Likewise.
8482 * doc/invoke.text (-mcrc): Document.
8483 (-mginv): Likewise.
8484
8485 2018-06-15 Nick Clifton <nickc@redhat.com>
8486
8487 PR 84195
8488 * tree.c (escaped_string): New class. Converts an unescaped
8489 string into its escaped equivalent.
8490 (warn_deprecated_use): Use the new class to convert the
8491 deprecation message, if present.
8492 (test_escaped_strings): New self test.
8493 (test_c_tests): Add test_escaped_strings.
8494 * doc/extend.texi (deprecated): Add a note that the
8495 deprecation message is affected by the -fmessage-length
8496 option, and that control characters will be escaped.
8497 (#pragma GCC error): Document this pragma.
8498 (#pragma GCC warning): Likewise.
8499 * doc/invoke.texi (-fmessage-length): Document this option's
8500 effect on the #warning and #error preprocessor directives and
8501 the deprecated attribute.
8502
8503 2018-06-15 Richard Biener <rguenther@suse.de>
8504
8505 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8506 here, also noting vector size used.
8507 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8508 size used in MSG_OPTIMIZED_LOCATIONS dump.
8509 (pass_slp_vectorize::execute): Adjust.
8510
8511 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8512
8513 PR target/85968
8514 * config/arc/arc.c (arc_return_address_register): Fix
8515 if-condition.
8516
8517 2018-06-15 Richard Biener <rguenther@suse.de>
8518
8519 PR middle-end/86159
8520 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8521 leave useless conversion stripping to force_gimple_operand_gsi.
8522 (gimplify_build2): Likewise.
8523 (gimplify_build1): Likewise.
8524
8525 2018-06-15 Richard Biener <rguenther@suse.de>
8526
8527 PR middle-end/86076
8528 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8529 before adjusting their block.
8530
8531 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8532
8533 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8534 multilibs for *-*-rtems*.
8535 * config/riscv/t-rtems: New file.
8536
8537 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8538
8539 PR middle-end/86122
8540 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8541 unsigned_type_for returns NULL.
8542
8543 PR target/85945
8544 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8545 subregs of multi-word pseudos unless the float mode has word size.
8546
8547 2018-06-14 Richard Biener <rguenther@suse.de>
8548
8549 PR middle-end/86139
8550 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8551 duplicate and harmful type_hash_canon.
8552 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8553
8554 2018-06-14 Richard Biener <rguenther@suse.de>
8555
8556 PR ipa/86124
8557 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8558 NULL cgraph_node.
8559
8560 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8561
8562 * config/rtems.h (STDINT_LONG32): Define.
8563
8564 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8565 Prachi Godbole <prachi.godbole@imgtec.com>
8566
8567 * config/mips/mips-cpus.def: Define P6600.
8568 * config/mips/mips-tables.opt: Regenerate.
8569 * config/mips/mips.c (mips_ucbranch_type): New enum.
8570 (mips_rtx_cost_data): Add support for P6600.
8571 (mips_issue_rate): Likewise.
8572 (mips_multipass_dfa_lookahead): Likewise.
8573 (mips_avoid_hazard): Likewise.
8574 (mips_reorg_process_insns): Likewise.
8575 (mips_classify_branch_p6600): New function.
8576 * config/mips/mips.h (TUNE_P6600): New define.
8577 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8578 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8579 * config/mips/mips.md: Include p6600.md.
8580 (processor): Add p6600.
8581 * config/mips/p6600.md: New file.
8582 * doc/invoke.texi: Add p6600 to supported architectures.
8583
8584 2018-06-13 Martin Sebor <msebor@redhat.com>
8585
8586 PR tree-optimization/86114
8587 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8588 of integer types.
8589 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8590
8591 2018-06-13 Richard Biener <rguenther@suse.de>
8592
8593 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8594 Properly set vector type of the intermediate stmt.
8595 * tree-vect-stmts.c (vectorizable_operation): The destination
8596 var always has vectype_out type.
8597
8598 2018-06-13 Jeff Law <law@redhat.com>
8599
8600 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8601 integer 0 for argument to print_rtl_with_bb.
8602 (rl78_reorg): Likewise.
8603
8604 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8605
8606 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8607 from rtx to rtx_insn *.
8608 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8609 "label".
8610 (add_sched_insns_for_speculation): Likewise for local "target",
8611 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8612 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8613 from rtx_insn ** to rtx_code_label **.
8614 (reorg_emit_nops): Likewise.
8615 (c6x_reorg): Likewise for local "call_labels".
8616 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8617 rtx to rtx_insn *.
8618 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8619 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8620 the loops over LABEL_REFS.
8621 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8622 braf_label.
8623 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8624 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8625 (split_branches): Strengthen local "olabel" from rtx to
8626 rtx_insn *, adding a safe_as_a cast.
8627 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8628 to "rtx_insn *".
8629 (add_insn_after): Likewise for first two params.
8630 (add_insn_before): Likewise.
8631 (remove_insn): Likewise for param.
8632 (emit_pattern_before_noloc): Likewise for second and third params.
8633 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8634 (emit_call_insn_before_noloc): Likewise.
8635 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8636 to "rtx_insn *".
8637 (emit_barrier_before): Likewise.
8638 (emit_label_before): Strengthen "label" param from "rtx" to
8639 "rtx_code_label *". Strengthen "before" param from "rtx" to
8640 "rtx_insn *".
8641 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8642 "rtx_insn *".
8643 (emit_pattern_after_noloc): Likewise.
8644 (emit_insn_after_noloc): Likewise.
8645 (emit_jump_insn_after_noloc): Likewise.
8646 (emit_call_insn_after_noloc): Likewise.
8647 (emit_debug_insn_after_noloc): Likewise.
8648 (emit_barrier_after): Likewise.
8649 (emit_label_after): Likewise for both params.
8650 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8651 "loc" param from "int" to "location_t".
8652 (emit_insn_after_setloc): Likewise.
8653 (emit_jump_insn_after_setloc): Likewise.
8654 (emit_call_insn_after_setloc): Likewise.
8655 (emit_debug_insn_after_setloc): Likewise.
8656 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8657 "loc" param from "int" to "location_t".
8658 (emit_pattern_before): Convert NULL_RTX to NULL.
8659 (emit_insn_before_setloc): Convert "loc" param from "int" to
8660 "location_t".
8661 (emit_jump_insn_before_setloc): Likewise.
8662 (emit_call_insn_before_setloc): Likewise.
8663 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8664 rtx_insn *. Convert "loc" param from "int" to "location_t".
8665 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8666 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8667 Convert 3rd param from "int" to "location_t".
8668 (emit_barrier_before, emit_barrier_after, next_real_insn):
8669 Strengthen param from rtx to rtx_insn *.
8670 (emit_label_before): Strengthen 1st param from "rtx" to
8671 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8672 "rtx_insn *".
8673 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8674 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8675 Strengthen 2nd param from "rtx" to "rtx_insn *".
8676 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8677 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8678 Likewise. Convert 3rd param from "int" to "location_t".
8679 (emit_label_after): Strengthen 1st param from "rtx" to
8680 "rtx_code_label *".
8681 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8682 "rtx_insn *".
8683 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8684 from "rtx" to "rtx_insn *".
8685
8686 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8687
8688 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8689 bodies streamed in with -Q.
8690 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8691 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8692 * gimple-streamer-out.c: Include gimple-pretty-print.h
8693 (output_bb): Dump stmts streamed.
8694 * lto-section-out.c: Include print-tree.h
8695 (lto_begin_section): Dump sections created.
8696 (lto_output_decl_index): Dump decl encoded.
8697 * lto-streamer-out.c: Include print-tree.h
8698 (create_output_block): Dump output block created.
8699 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8700 (output_function): Dump function output.
8701 (output_constructor): Dump constructor streamed.
8702 (write_global_stream): Output indexes encoded.
8703 (produce_asm_for_decls): Dump streams encoded.
8704 * lto-streamer.c (streamer_dump_file): New global var.
8705 * lto-streamer.h (streamer_dump_file): Declare.
8706 * passes.c (ipa_write_summaries): Initialize streamer dump.
8707 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8708 in.
8709
8710 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8711
8712 PR target/86048
8713 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8714 offsets for register save directives. Emit a second batch of save
8715 directives, if need be, when the function accesses prior frames.
8716
8717 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8718
8719 * config/arc/fpu.md (fmasf4): Force operand to register.
8720 (fnmasf4): Likewise.
8721
8722 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8723
8724 * config/arc/arc-protos.h (arc_pad_return): Remove.
8725 * config/arc/arc.c (machine_function): Remove force_short_suffix
8726 and size_reason.
8727 (arc_print_operand): Adjust printing of '&'.
8728 (arc_verify_short): Remove conditional printing of short suffix.
8729 (arc_final_prescan_insn): Remove reference to size_reason.
8730 (pad_return): New function.
8731 (arc_reorg): Call pad_return.
8732 (arc_pad_return): Remove.
8733 (arc_init_machine_status): Remove reference to force_short_suffix.
8734 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8735 (attr length): When attribute iscompact is true force to 2
8736 regardless; in the case of maybe check if we want to force the
8737 instruction to have 4 bytes length.
8738 (nopv): Change it to generate 4 byte long nop as well.
8739 (blockage): New pattern.
8740 (simple_return): Remove call to arc_pad_return.
8741 (p_return_i): Likewise.
8742
8743 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8744
8745 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8746
8747 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8748
8749 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8750 ARC cores.
8751
8752 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8753
8754 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8755 for ARC700 and ARCv2.
8756
8757 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8758
8759 PR target/86076
8760 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8761 operands[2] instead of operands[1].
8762
8763
8764 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8765
8766 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8767 case, check whether the outer register overlaps an unallocatable
8768 register, not just whether it fits the required class.
8769
8770 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8771
8772 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8773 are poly_ints.
8774 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8775 (memrefs_conflict_p): Likewise.
8776 (init_alias_analysis): Likewise.
8777 * cfgexpand.c (expand_debug_expr): Likewise.
8778 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8779 * cse.c (fold_rtx): Likewise.
8780 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8781 * expr.c (emit_block_move_hints): Likewise.
8782 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8783 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8784 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8785 (emit_group_store): Likewise.
8786 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8787 to read the PRE/POST_MODIFY increment.
8788 * calls.c (store_one_arg): Use strip_offset.
8789 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8790 poly_int_rtx_p.
8791 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8792 by a VEC_SELECT.
8793 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8794 (simplify_binary_operation_1): Extend CONST_INT handling to
8795 poly_int_rtx_p.
8796 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8797 than a HOST_WIDE_INT.
8798 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8799 poly_int64.
8800 (adjust_mems, add_stores): Update accodingly.
8801 (vt_canonicalize_addr): Track polynomial offsets.
8802 (emit_note_insn_var_location): Likewise.
8803 (vt_add_function_parameter): Likewise.
8804 (vt_initialize): Likewise.
8805
8806 2018-06-12 Jeff Law <law@redhat.com>
8807
8808 * config.gcc (alpha*-*-freebsd*): Remove.
8809 * config/alpha/freebsd.h: Remove.
8810
8811 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8812
8813 PR other/69968
8814 * spellcheck-tree.c (levenshtein_distance): Rename to...
8815 (get_edit_distance): ...this, and update for underlying renaming.
8816 * spellcheck-tree.h (levenshtein_distance): Rename to...
8817 (get_edit_distance): ...this.
8818 * spellcheck.c (levenshtein_distance): Rename to...
8819 (get_edit_distance): ...this. Convert from Levenshtein distance
8820 to Damerau-Levenshtein distance by supporting transpositions of
8821 adjacent characters. Rename "v1" to "v_next" and "v0" to
8822 "v_one_ago".
8823 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8824 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8825 update for underlying renaming.
8826 (selftest::levenshtein_distance_unit_test): Rename to...
8827 (selftest::test_get_edit_distance_unit): ...this, and update for
8828 underlying renaming.
8829 (selftest::test_find_closest_string): Add example from PR 69968
8830 where transposition helps
8831 (selftest::test_metric_conditions): Update for renaming.
8832 (selftest::test_metric_conditions): Likewise.
8833 (selftest::spellcheck_c_tests): Likewise.
8834 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8835 (get_edit_distance): ...this.
8836 (best_match::consider): Update for renaming.
8837
8838 2018-06-12 Martin Sebor <msebor@redhat.com>
8839
8840 PR tree-optimization/85259
8841 * builtins.c (compute_objsize): Handle constant offsets.
8842 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8843 true iff a warning has been issued.
8844 * gimple.h (gimple_nonartificial_location): New function.
8845 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8846 gimple_nonartificial_location and handle -Wno-system-headers.
8847 (handle_builtin_stxncpy): Same.
8848
8849 2018-06-12 Martin Sebor <msebor@redhat.com>
8850
8851 PR c/85931
8852 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8853
8854 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8855
8856 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8857 BUILTIN_VEC_XST entries for pointer to double and long long.
8858
8859 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8860
8861 PR target/85990
8862 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8863 Update comments.
8864 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8865 Likewise.
8866
8867 2018-06-12 Martin Liska <mliska@suse.cz>
8868
8869 * doc/options.texi: Document IntegerRange.
8870
8871 2018-06-12 Martin Liska <mliska@suse.cz>
8872
8873 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8874 * opt-functions.awk: Handle Deprecated flag.
8875 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8876 and report error.
8877 (read_cmdline_option): Report warning for a deprecated option.
8878 * opts.h (struct cl_option): Add new field cl_deprecated.
8879 (CL_ERR_DEPRECATED): New.
8880
8881 2018-06-12 Martin Liska <mliska@suse.cz>
8882
8883 * doc/options.texi: Document Deprecated option flag.
8884
8885 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8886
8887 * config/arc/arc-arch.h (arc_extras): New enum.
8888 (arc_cpu_t):Add field extra.
8889 (arc_cpu_types): Consider the extras.
8890 * config/arc/arc-cpus.def: Add extras info.
8891 * config/arc/arc-opts.h (processor_type): Consider extra field.
8892 * config/arc/arc.c (arc_override_options): Handle extra field.
8893
8894 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8895
8896 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8897 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8898 field.
8899 * config/arc/arc.c (arc_init): Update pic warning.
8900 (irq_range): Update irq range parsing warnings.
8901 (arc_override_options): Update various warning messages.
8902 (arc_handle_aux_attribute): Likewise.
8903
8904 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8905
8906 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8907
8908 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8909
8910 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8911 compiler messages directives.
8912
8913 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8914
8915 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8916 * config/mips/mips-tables.opt: Regenerate.
8917 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8918 mips64r6.
8919 * doc/invoke.texi: Document -march=i6500.
8920
8921 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8922
8923 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8924 (i6400_gpmul): Add cpu_unit.
8925 (i6400_gpdiv): Likewise.
8926 (i6400_msa_add_d): Update reservations.
8927 (i6400_msa_int_add) Likewise.
8928 (i6400_msa_short_logic3) Likewise.
8929 (i6400_msa_short_logic2) Likewise.
8930 (i6400_msa_short_logic) Likewise.
8931 (i6400_msa_move) Likewise.
8932 (i6400_msa_cmp) Likewise.
8933 (i6400_msa_short_float2) Likewise.
8934 (i6400_msa_div_d) Likewise.
8935 (i6400_msa_long_logic1) Likewise.
8936 (i6400_msa_long_logic2) Likewise.
8937 (i6400_msa_mult) Likewise.
8938 (i6400_msa_long_float2) Likewise.
8939 (i6400_msa_long_float4) Likewise.
8940 (i6400_msa_long_float5) Likewise.
8941 (i6400_msa_long_float8) Likewise.
8942 (i6400_fpu_fadd): Include frint type.
8943 (i6400_fpu_store): New define_insn_reservation.
8944 (i6400_fpu_load): Likewise.
8945 (i6400_fpu_move): Likewise.
8946 (i6400_fpu_fcmp): Likewise.
8947 (i6400_fpu_fmadd): Likewise.
8948 (i6400_int_mult): Include imul3nc type and update reservation.
8949 (i6400_int_div): Include idiv3 type and update reservation.
8950 (i6400_int_load): Update to check type not move_type.
8951 (i6400_int_store): Likewise.
8952 (i6400_int_prefetch): Set zero latency.
8953
8954 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8955
8956 * gcc.c: Document new %@{...} sequence.
8957 (LINK_COMMAND_SPEC): Use it for the -L switches.
8958 (cpp_unique_options): Use it for the -I switches.
8959 (at_file_argbuf): New global variable.
8960 (in_at_file): Likewise.
8961 (alloc_args): Create at_file_argbuf.
8962 (clear_args): Truncate at_file_argbuf.
8963 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8964 (open_at_file): New function.
8965 (close_at_file): Likewise.
8966 (create_at_file): Delete.
8967 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8968 <'o'>: Likewise.
8969 <'@'>: New case.
8970 (validate_switches_from_spec): Deal with %@{...} sequence.
8971 (validate_switches): Likewise.
8972 (driver::finalize): Call clear_args.
8973
8974 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8975
8976 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8977
8978 2018-06-11 Martin Sebor <msebor@redhat.com>
8979
8980 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8981 (Wno-class-memaccess): Add @opindex.
8982 (Wno-templates, Wno-multiple-inheritance): Same.
8983 (Wno-virtual-inheritance, Wno-namespaces): Same.
8984 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8985 (Wno-format-overflow, Wno-format-truncation): Same.
8986 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8987 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8988 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8989 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8990 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8991 (Wno-misspelled-isr): Same.
8992
8993 2018-06-11 Martin Sebor <msebor@redhat.com>
8994
8995 * PR tree-optimization/86083
8996 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8997
8998 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8999
9000 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9001
9002 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9003
9004 PR target/85755
9005 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9006 on the correct operand.
9007 (*movdi_internal64): Ditto.
9008
9009 2018-06-11 Martin Liska <mliska@suse.cz>
9010
9011 PR tree-optimization/86089
9012 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9013
9014 2018-06-11 Julia Koval <julia.koval@intel.com>
9015
9016 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9017 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9018 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9019
9020 2018-06-11 Olivier Hainque <hainque@adacore.com>
9021
9022 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9023 for Ada with strict dwarf2.
9024
9025 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9026
9027 PR target/85755
9028 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9029 addresses.
9030
9031 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9032
9033 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9034
9035 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9036
9037 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9038 TARGET_ELF.
9039
9040 2018-06-08 Martin Liska <mliska@suse.cz>
9041
9042 * tree-cfg.h (debug_function): Fix argument type to match
9043 implementation.
9044
9045 2018-06-08 Martin Liska <mliska@suse.cz>
9046
9047 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9048 Remove usage of MPX-related (and removed) fields.
9049 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9050
9051 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9052
9053 * cfg.c (debug): Use TDF_NONE rather than 0.
9054 * cfghooks.c (debug): Likewise.
9055 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9056 (struct dump_option_value_info): Convert to...
9057 (struct kv_pair): ...this template type.
9058 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9059 rather than 0.
9060 (optinfo_verbosity_options): Likewise.
9061 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9062 OPTGROUP_NONE.
9063 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9064 than int for "optgroup_flags" param.
9065 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9066 "dump_kind" param.
9067 (dump_dec): Likewise.
9068 (dump_finish): Use TDF_NONE rather than 0.
9069 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9070 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9071 than 0. Update for change to option_ptr.
9072 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9073 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9074 0. Update for changes to optinfo_verbosity_options and
9075 optgroup_options.
9076 (opt_info_switch_p): Convert optgroup_flags from int to
9077 optgroup_flags_t.
9078 (dump_basic_block): Use dump_flags_t rather than int
9079 for "dump_kind" param.
9080 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9081 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9082 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9083 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9084 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9085 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9086 TDF_NONE): Convert from macros to...
9087 (enum dump_flag): ...this new enum.
9088 (dump_flags_t): Update to use enum.
9089 (operator|, operator&, operator~, operator|=, operator&=):
9090 Implement for dump_flags_t.
9091 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9092 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9093 Convert from macros to...
9094 (enum optgroup_flag): ...this new enum.
9095 (optgroup_flags_t): New typedef.
9096 (operator|, operator|=): Implement for optgroup_flags_t.
9097 (struct dump_file_info): Convert field "alt_flags" to
9098 dump_flags_t. Convert field "optgroup_flags" to
9099 optgroup_flags_t.
9100 (dump_basic_block): Use dump_flags_t rather than int for param.
9101 (dump_generic_expr_loc): Likewise.
9102 (dump_dec): Likewise.
9103 (dump_register): Convert param "optgroup_flags" to
9104 optgroup_flags_t.
9105 (opt_info_enable_passes): Likewise.
9106 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9107 than 0.
9108 * gimple-pretty-print.c (debug): Likewise.
9109 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9110 (merged_store_group::apply_stores): Likewise.
9111 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9112 * gimple.c (verify_gimple_pp): Likewise.
9113 * graphite-poly.c (print_pbb_body): Likewise.
9114 * passes.c (pass_manager::register_one_dump_file): Convert
9115 local "optgroup_flags" to optgroup_flags_t.
9116 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9117 (debug): Likewise.
9118 (debug_body): Likewise.
9119 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9120 to optgroup_flags_t.
9121 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9122 than 0.
9123 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9124 (convert_mult_to_fma): Likewise.
9125 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9126 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9127 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9128 "dump_kind" to dump_flags_t.
9129
9130 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9131
9132 * config/rs6000/rs6000.c (min, max): Delete.
9133
9134 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9135
9136 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9137 -mabi=spe and -mabi=no-spe.
9138
9139 2018-06-08 Martin Liska <mliska@suse.cz>
9140
9141 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9142 where we expect an existing summary.
9143
9144 2018-06-08 Martin Liska <mliska@suse.cz>
9145
9146 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9147 * ipa-inline.h (estimate_edge_growth): Likewise.
9148
9149 2018-06-08 Martin Liska <mliska@suse.cz>
9150
9151 * cgraph.c (function_version_hasher::hash): Use
9152 cgraph_node::get_uid ().
9153 (function_version_hasher::equal):
9154 * cgraph.h (cgraph_node::get_uid): New method.
9155 * ipa-inline.c (update_caller_keys): Use
9156 cgraph_node::get_uid ().
9157 (update_callee_keys): Likewise.
9158 * ipa-utils.c (searchc): Likewise.
9159 (ipa_reduced_postorder): Likewise.
9160 * lto-cgraph.c (input_node): Likewise.
9161 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9162 * symbol-summary.h (symtab_insertion): Likewise.
9163 (symtab_removal): Likewise.
9164 (symtab_duplication): Likewise.
9165 * tree-pretty-print.c (dump_function_header): Likewise.
9166 * tree-sra.c (convert_callers_for_node): Likewise.
9167
9168 2018-06-08 Martin Liska <mliska@suse.cz>
9169
9170 * cgraph.c (symbol_table::create_edge): Always assign a new
9171 unique number.
9172 (symbol_table::free_edge): Do not recycle numbers.
9173 * cgraph.h (cgraph_edge::get): New method.
9174 * symbol-summary.h (symtab_removal): Use it.
9175 (symtab_duplication): Likewise.
9176 (call_summary::hashable_uid): Remove.
9177
9178 2018-06-08 Martin Liska <mliska@suse.cz>
9179
9180 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9181 (initialize_growth_caches): Remove.
9182 (free_growth_caches): Likewise.
9183 (do_estimate_edge_time): Use edge_growth_cache.
9184 (do_estimate_edge_size): Likewise.
9185 (do_estimate_edge_hints): Likewise.
9186 * ipa-inline.c (reset_edge_caches): Likewise.
9187 (recursive_inlining): Likewise.
9188 (inline_small_functions): Likewise.
9189 * ipa-inline.h (initialize_growth_caches): Remove.
9190 (estimate_edge_size): Likewise.
9191 (estimate_edge_time): Likewise.
9192 (estimate_edge_hints): Likewise.
9193 (reset_edge_growth_cache): Likewise.
9194 * symbol-summary.h (call_summary::remove): New method.
9195
9196 2018-06-08 Martin Liska <mliska@suse.cz>
9197
9198 * ipa-cp.c (class edge_clone_summary): New summary.
9199 (grow_edge_clone_vectors): Remove.
9200 (ipcp_edge_duplication_hook): Remove.
9201 (class edge_clone_summary_t): New call_summary class.
9202 (ipcp_edge_removal_hook): Remove.
9203 (edge_clone_summary_t::duplicate): New function.
9204 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9205 (create_specialized_node): Likewise.
9206 (ipcp_driver): Initialize edge_clone_summaries and do not
9207 register hooks.
9208
9209 2018-06-08 Martin Liska <mliska@suse.cz>
9210
9211 * symbol-summary.h (get): New function.
9212 (call_summary::m_initialize_when_cloning): New class member.
9213
9214 2018-06-08 Martin Liska <mliska@suse.cz>
9215
9216 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9217 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9218 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9219 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9220 (remove_cgraph_node_from_order): Use the removed_nodes set.
9221 (do_per_function_toporder): Likwise.
9222 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9223 instead of summary_uid.
9224 (symtab_removal): Likewise.
9225 (symtab_duplication): Likewise.
9226
9227 2018-06-08 Martin Liska <mliska@suse.cz>
9228
9229 * ipa-cp.c (ipcp_store_bits_results): Use
9230 ipcp_transformation_sum.
9231 (ipcp_store_vr_results): Likewise.
9232 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9233 to ...
9234 (ipcp_transformation_initialize): ... this.
9235 (ipa_set_node_agg_value_chain):
9236 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9237 (write_ipcp_transformation_info): Likewise.
9238 (read_ipcp_transformation_info): Likewise.
9239 (ipcp_update_bits): Likewise.
9240 (ipcp_update_vr): Likewise.
9241 (ipcp_transform_function): Likewise.
9242 * ipa-prop.h: Rename ipcp_transformation_summary to
9243 ipcp_transformation.
9244 (class ipcp_transformation_t): New function summary.
9245 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9246 (ipa_get_agg_replacements_for_node): Likewise.
9247
9248 2018-06-08 Martin Liska <mliska@suse.cz>
9249
9250 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9251 of struct.
9252 (class funct_state_summary_t): New function_summary class.
9253 (has_function_state): Remove.
9254 (get_function_state): Likewise.
9255 (set_function_state): Likewise.
9256 (add_new_function): Likewise.
9257 (funct_state_summary_t::insert): New function.
9258 (duplicate_node_data): Remove.
9259 (remove_node_data): Remove.
9260 (funct_state_summary_t::duplicate): New function.
9261 (register_hooks): Create new funct_state_summaries.
9262 (pure_const_generate_summary): Use it.
9263 (pure_const_write_summary): Likewise.
9264 (pure_const_read_summary): Likewise.
9265 (propagate_pure_const): Likewise.
9266 (propagate_nothrow): Likewise.
9267 (dump_malloc_lattice): Likewise.
9268 (propagate_malloc): Likewise.
9269 (execute): Do not register hooks, just remove summary
9270 instead.
9271 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9272 constructor.
9273
9274 2018-06-08 Martin Liska <mliska@suse.cz>
9275
9276 * ipa-reference.c (remove_node_data): Remove.
9277 (duplicate_node_data): Likewise.
9278 (class ipa_ref_var_info_summary_t): New class.
9279 (class ipa_ref_opt_summary_t): Likewise.
9280 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9281 (get_reference_optimization_summary): Use
9282 ipa_ref_opt_sum_summaries.
9283 (set_reference_vars_info): Remove.
9284 (set_reference_optimization_summary): Likewise.
9285 (ipa_init): Create summaries.
9286 (init_function_info): Use function summary.
9287 (ipa_ref_opt_summary_t::duplicate): New function.
9288 (ipa_ref_opt_summary_t::remove): New function.
9289 (get_read_write_all_from_node): Fix GNU coding style.
9290 (propagate): Use function summary.
9291 (write_node_summary_p): Fix GNU coding style.
9292 (stream_out_bitmap): Likewise.
9293 (ipa_reference_read_optimization_summary): Use function summary.
9294 (ipa_reference_c_finalize): Do not release hooks.
9295
9296 2018-06-08 Martin Liska <mliska@suse.cz>
9297
9298 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9299 (analyze_function_body): Extract multiple calls of get_create.
9300 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9301 * ipa-inline.c (recursive_inlining): Use ::get method.
9302 * ipa-inline.h (estimate_edge_growth): Likewise.
9303
9304 2018-06-08 Martin Liska <mliska@suse.cz>
9305
9306 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9307 HSA_INVALID.
9308 (hsa_function_summary::hsa_function_summary): Use the new enum
9309 value.
9310 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9311 * hsa-gen.c (hsa_get_host_function): Likewise.
9312 (get_brig_function_name): Likewise.
9313 * ipa-hsa.c (process_hsa_functions): Likewise.
9314 (ipa_hsa_write_summary): Likewise.
9315 * symbol-summary.h (symtab_duplication): Use ::get function/
9316 (get): New function.
9317
9318 2018-06-08 Martin Liska <mliska@suse.cz>
9319
9320 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9321 of get.
9322 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9323 (hsa_register_kernel): Likewise.
9324 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9325 * hsa-gen.c (hsa_get_host_function): Likewise.
9326 (get_brig_function_name): Likewise.
9327 (generate_hsa): Likewise.
9328 (pass_gen_hsail::execute): Likewise.
9329 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9330 (devirtualization_time_bonus): Likewise.
9331 (ipcp_propagate_stage): Likewise.
9332 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9333 (edge_set_predicate): Likewise.
9334 (evaluate_conditions_for_known_args): Likewise.
9335 (evaluate_properties_for_edge): Likewise.
9336 (ipa_fn_summary::reset): Likewise.
9337 (ipa_fn_summary_t::duplicate): Likewise.
9338 (dump_ipa_call_summary): Likewise.
9339 (ipa_dump_fn_summary): Likewise.
9340 (analyze_function_body): Likewise.
9341 (compute_fn_summary): Likewise.
9342 (estimate_edge_devirt_benefit): Likewise.
9343 (estimate_edge_size_and_time): Likewise.
9344 (estimate_calls_size_and_time): Likewise.
9345 (estimate_node_size_and_time): Likewise.
9346 (inline_update_callee_summaries): Likewise.
9347 (remap_edge_change_prob): Likewise.
9348 (remap_edge_summaries): Likewise.
9349 (ipa_merge_fn_summary_after_inlining): Likewise.
9350 (ipa_update_overall_fn_summary): Likewise.
9351 (read_ipa_call_summary): Likewise.
9352 (inline_read_section): Likewise.
9353 (write_ipa_call_summary): Likewise.
9354 (ipa_fn_summary_write): Likewise.
9355 (ipa_free_fn_summary): Likewise.
9356 * ipa-hsa.c (process_hsa_functions): Likewise.
9357 (ipa_hsa_write_summary): Likewise.
9358 (ipa_hsa_read_section): Likewise.
9359 * ipa-icf.c (sem_function::merge): Likewise.
9360 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9361 (do_estimate_edge_time): Likewise.
9362 (estimate_size_after_inlining): Likewise.
9363 (estimate_growth): Likewise.
9364 (growth_likely_positive): Likewise.
9365 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9366 (inline_call): Likewise.
9367 * ipa-inline.c (caller_growth_limits): Likewise.
9368 (can_inline_edge_p): Likewise.
9369 (can_inline_edge_by_limits_p): Likewise.
9370 (compute_uninlined_call_time): Likewise.
9371 (compute_inlined_call_time): Likewise.
9372 (want_inline_small_function_p): Likewise.
9373 (edge_badness): Likewise.
9374 (update_caller_keys): Likewise.
9375 (update_callee_keys): Likewise.
9376 (recursive_inlining): Likewise.
9377 (inline_small_functions): Likewise.
9378 (inline_to_all_callers_1): Likewise.
9379 (dump_overall_stats): Likewise.
9380 (early_inline_small_functions): Likewise.
9381 (early_inliner): Likewise.
9382 * ipa-inline.h (estimate_edge_growth): Likewise.
9383 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9384 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9385 * ipa-prop.h (IPA_NODE_REF): Likewise.
9386 (IPA_EDGE_REF): Likewise.
9387 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9388 (propagate_malloc): Likewise.
9389 * ipa-split.c (execute_split_functions): Likewise.
9390 * symbol-summary.h: Rename get to get_create.
9391 (get): Likewise.
9392 (get_create): Likewise.
9393 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9394
9395 2018-06-08 Martin Liska <mliska@suse.cz>
9396
9397 * symbol-summary.h (release): Move definition out of class
9398 declaration.
9399 (symtab_removal): Likewise.
9400 (symtab_duplication): Likewise.
9401
9402 2018-06-08 Martin Liska <mliska@suse.cz>
9403
9404 * symbol-summary.h (function_summary): Move constructor
9405 implementation out of class declaration.
9406 (release): Likewise.
9407 (symtab_insertion): Likewise.
9408 (symtab_removal): Likewise.
9409 (symtab_duplication): Likewise.
9410 (get): Likewise.
9411
9412 2018-06-08 Martin Liska <mliska@suse.cz>
9413
9414 * Makefile.in: Remove support for MPX (macros, related functions,
9415 fields in cgraph_node, ...).
9416 * builtin-types.def (BT_BND): Likewise.
9417 (BT_FN_BND_CONST_PTR): Likewise.
9418 (BT_FN_CONST_PTR_BND): Likewise.
9419 (BT_FN_VOID_PTR_BND): Likewise.
9420 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9421 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9422 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9423 (expand_builtin_mempcpy_with_bounds): Likewise.
9424 (expand_builtin_memset_with_bounds): Likewise.
9425 (expand_builtin_memset_args): Likewise.
9426 (std_expand_builtin_va_start): Likewise.
9427 (expand_builtin): Likewise.
9428 (expand_builtin_with_bounds): Likewise.
9429 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9430 (DEF_LIB_BUILTIN_CHKP): Likewise.
9431 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9432 (DEF_CHKP_BUILTIN): Likewise.
9433 (BUILT_IN_MEMCPY): Likewise.
9434 (BUILT_IN_MEMMOVE): Likewise.
9435 (BUILT_IN_MEMPCPY): Likewise.
9436 (BUILT_IN_MEMSET): Likewise.
9437 (BUILT_IN_STPCPY): Likewise.
9438 (BUILT_IN_STRCAT): Likewise.
9439 (BUILT_IN_STRCHR): Likewise.
9440 (BUILT_IN_STRCPY): Likewise.
9441 (BUILT_IN_STRLEN): Likewise.
9442 (BUILT_IN_MEMCPY_CHK): Likewise.
9443 (BUILT_IN_MEMMOVE_CHK): Likewise.
9444 (BUILT_IN_MEMPCPY_CHK): Likewise.
9445 (BUILT_IN_MEMSET_CHK): Likewise.
9446 (BUILT_IN_STPCPY_CHK): Likewise.
9447 (BUILT_IN_STRCAT_CHK): Likewise.
9448 (BUILT_IN_STRCPY_CHK): Likewise.
9449 * calls.c (store_bounds): Likewise.
9450 (emit_call_1): Likewise.
9451 (special_function_p): Likewise.
9452 (maybe_warn_nonstring_arg): Likewise.
9453 (initialize_argument_information): Likewise.
9454 (finalize_must_preallocate): Likewise.
9455 (compute_argument_addresses): Likewise.
9456 (expand_call): Likewise.
9457 * cfgexpand.c (expand_call_stmt): Likewise.
9458 (expand_return): Likewise.
9459 (expand_gimple_stmt_1): Likewise.
9460 (pass_expand::execute): Likewise.
9461 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9462 (cgraph_node::remove): Likewise.
9463 (cgraph_node::dump): Likewise.
9464 (cgraph_node::verify_node): Likewise.
9465 * cgraph.h (chkp_function_instrumented_p): Likewise.
9466 (symtab_node::get_alias_target): Likewise.
9467 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9468 (cgraph_local_p): Likewise.
9469 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9470 (cgraph_edge::rebuild_references): Likewise.
9471 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9472 (walk_polymorphic_call_targets): Likewise.
9473 (cgraph_node::expand_thunk): Likewise.
9474 (symbol_table::output_weakrefs): Likewise.
9475 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9476 (ix86_handle_option): Likewise.
9477 * config/i386/constraints.md: Likewise.
9478 * config/i386/i386-builtin-types.def (BND): Likewise.
9479 (VOID): Likewise.
9480 (PVOID): Likewise.
9481 (ULONG): Likewise.
9482 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9483 (BDESC_FIRST): Likewise.
9484 (BDESC): Likewise.
9485 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9486 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9487 * config/i386/i386.c (enum reg_class): Likewise.
9488 (ix86_target_string): Likewise.
9489 (ix86_option_override_internal): Likewise.
9490 (ix86_conditional_register_usage): Likewise.
9491 (ix86_valid_target_attribute_inner_p): Likewise.
9492 (ix86_set_indirect_branch_type): Likewise.
9493 (ix86_set_current_function): Likewise.
9494 (ix86_function_arg_regno_p): Likewise.
9495 (init_cumulative_args): Likewise.
9496 (ix86_function_arg_advance): Likewise.
9497 (ix86_function_arg): Likewise.
9498 (ix86_pass_by_reference): Likewise.
9499 (ix86_function_value_regno_p): Likewise.
9500 (ix86_function_value_1): Likewise.
9501 (ix86_function_value_bounds): Likewise.
9502 (ix86_return_in_memory): Likewise.
9503 (ix86_setup_incoming_vararg_bounds): Likewise.
9504 (ix86_va_start): Likewise.
9505 (indirect_thunk_need_prefix): Likewise.
9506 (print_reg): Likewise.
9507 (ix86_print_operand): Likewise.
9508 (ix86_expand_call): Likewise.
9509 (ix86_output_function_return): Likewise.
9510 (reg_encoded_number): Likewise.
9511 (BDESC_VERIFYS): Likewise.
9512 (ix86_init_mpx_builtins): Likewise.
9513 (ix86_init_builtins): Likewise.
9514 (ix86_emit_cmove): Likewise.
9515 (ix86_emit_move_max): Likewise.
9516 (ix86_expand_builtin): Likewise.
9517 (ix86_builtin_mpx_function): Likewise.
9518 (ix86_get_arg_address_for_bt): Likewise.
9519 (ix86_load_bounds): Likewise.
9520 (ix86_store_bounds): Likewise.
9521 (ix86_load_returned_bounds): Likewise.
9522 (ix86_store_returned_bounds): Likewise.
9523 (ix86_class_likely_spilled_p): Likewise.
9524 (ix86_hard_regno_mode_ok): Likewise.
9525 (x86_order_regs_for_local_alloc): Likewise.
9526 (ix86_mitigate_rop): Likewise.
9527 (ix86_bnd_prefixed_insn_p): Likewise.
9528 (ix86_mpx_bound_mode): Likewise.
9529 (ix86_make_bounds_constant): Likewise.
9530 (ix86_initialize_bounds): Likewise.
9531 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9532 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9533 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9534 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9535 (TARGET_CHKP_BOUND_MODE): Likewise.
9536 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9537 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9538 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9539 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9540 * config/i386/i386.h (TARGET_MPX): Likewise.
9541 (TARGET_MPX_P): Likewise.
9542 (VALID_BND_REG_MODE): Likewise.
9543 (FIRST_BND_REG): Likewise.
9544 (LAST_BND_REG): Likewise.
9545 (enum reg_class): Likewise.
9546 (BND_REG_P): Likewise.
9547 (BND_REGNO_P): Likewise.
9548 (BNDmode): Likewise.
9549 (ADJUST_INSN_LENGTH): Likewise.
9550 * config/i386/i386.md: Likewise.
9551 * config/i386/i386.opt: Likewise.
9552 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9553 (defined): Likewise.
9554 (LINK_MPX): Likewise.
9555 (MPX_SPEC): Likewise.
9556 (LIBMPX_SPEC): Likewise.
9557 (LIBMPXWRAPPERS_SPEC): Likewise.
9558 (CHKP_SPEC): Likewise.
9559 * config/i386/predicates.md: Likewise.
9560 * dbxout.c (dbxout_type): Likewise.
9561 * doc/extend.texi: Likewise.
9562 * doc/invoke.texi: Likewise.
9563 * doc/md.texi: Likewise.
9564 * doc/tm.texi: Likewise.
9565 * doc/tm.texi.in: Likewise.
9566 * dwarf2out.c (is_base_type): Likewise.
9567 (gen_formal_types_die): Likewise.
9568 (gen_subprogram_die): Likewise.
9569 (gen_type_die_with_usage): Likewise.
9570 (gen_decl_die): Likewise.
9571 (dwarf2out_late_global_decl): Likewise.
9572 * expr.c (expand_assignment): Likewise.
9573 (emit_storent_insn): Likewise.
9574 (store_expr_with_bounds): Likewise.
9575 (store_expr): Likewise.
9576 (expand_expr_real_1): Likewise.
9577 * expr.h (store_expr_with_bounds): Likewise.
9578 * function.c (use_register_for_decl): Likewise.
9579 (struct bounds_parm_data): Likewise.
9580 (assign_parms_augmented_arg_list): Likewise.
9581 (assign_parm_find_entry_rtl): Likewise.
9582 (assign_parm_is_stack_parm): Likewise.
9583 (assign_parm_load_bounds): Likewise.
9584 (assign_bounds): Likewise.
9585 (assign_parms): Likewise.
9586 (expand_function_start): Likewise.
9587 * gcc.c (CHKP_SPEC): Likewise.
9588 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9589 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9590 (wrestrict_dom_walker::check_call): Likewise.
9591 * gimple.c (gimple_build_call_from_tree): Likewise.
9592 * gimple.h (enum gf_mask): Likewise.
9593 (gimple_call_with_bounds_p): Likewise.
9594 (gimple_call_set_with_bounds): Likewise.
9595 * gimplify.c (gimplify_init_constructor): Likewise.
9596 * ipa-cp.c (initialize_node_lattices): Likewise.
9597 (propagate_constants_across_call): Likewise.
9598 (find_more_scalar_values_for_callers_subset): Likewise.
9599 * ipa-hsa.c (process_hsa_functions): Likewise.
9600 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9601 * ipa-icf.c (sem_function::merge): Likewise.
9602 * ipa-inline.c (early_inliner): Likewise.
9603 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9604 (warn_function_cold): Likewise.
9605 (propagate_pure_const): Likewise.
9606 * ipa-ref.h (enum GTY): Likewise.
9607 * ipa-split.c (find_retbnd): Likewise.
9608 (consider_split): Likewise.
9609 (split_function): Likewise.
9610 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9611 * ipa.c (walk_polymorphic_call_targets): Likewise.
9612 (symbol_table::remove_unreachable_nodes): Likewise.
9613 (process_references): Likewise.
9614 (cgraph_build_static_cdtor_1): Likewise.
9615 * lto-cgraph.c (lto_output_node): Likewise.
9616 (output_refs): Likewise.
9617 (compute_ltrans_boundary): Likewise.
9618 (input_overwrite_node): Likewise.
9619 (input_node): Likewise.
9620 (input_cgraph_1): Likewise.
9621 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9622 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9623 (class pass_chkp_instrumentation_passes): Likewise.
9624 (make_pass_chkp_instrumentation_passes): Likewise.
9625 * passes.def: Likewise.
9626 * rtl.h (struct GTY): Likewise.
9627 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9628 * stor-layout.c (layout_type): Likewise.
9629 * symtab.c: Likewise.
9630 * target.def: Likewise.
9631 * targhooks.c (default_chkp_bound_type): Likewise.
9632 (default_chkp_bound_mode): Likewise.
9633 (default_builtin_chkp_function): Likewise.
9634 (default_chkp_function_value_bounds): Likewise.
9635 (default_chkp_make_bounds_constant): Likewise.
9636 (default_chkp_initialize_bounds): Likewise.
9637 * targhooks.h (default_chkp_bound_type): Likewise.
9638 (default_chkp_bound_mode): Likewise.
9639 (default_builtin_chkp_function): Likewise.
9640 (default_chkp_function_value_bounds): Likewise.
9641 (default_chkp_make_bounds_constant): Likewise.
9642 (default_chkp_initialize_bounds): Likewise.
9643 * toplev.c (compile_file): Likewise.
9644 (process_options): Likewise.
9645 * tree-core.h (DEF_BUILTIN): Likewise.
9646 (DEF_BUILTIN_CHKP): Likewise.
9647 * tree-inline.c (declare_return_variable): Likewise.
9648 (remap_gimple_stmt): Likewise.
9649 (copy_bb): Likewise.
9650 (initialize_inlined_parameters): Likewise.
9651 (expand_call_inline): Likewise.
9652 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9653 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9654 (make_pass_ipa_chkp_produce_thunks): Likewise.
9655 (make_pass_chkp): Likewise.
9656 (make_pass_chkp_opt): Likewise.
9657 (make_pass_chkp_instrumentation_passes): Likewise.
9658 * tree-pretty-print.c (dump_generic_node): Likewise.
9659 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9660 * tree-ssa-dce.c (propagate_necessity): Likewise.
9661 (eliminate_unnecessary_stmts): Likewise.
9662 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9663 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9664 * tree-ssa-sccvn.h: Likewise.
9665 * tree-ssa-strlen.c (get_string_length): Likewise.
9666 (valid_builtin_call): Likewise.
9667 (adjust_last_stmt): Likewise.
9668 (handle_builtin_strchr): Likewise.
9669 (handle_builtin_strcpy): Likewise.
9670 (handle_builtin_stxncpy): Likewise.
9671 (handle_builtin_memcpy): Likewise.
9672 (handle_builtin_strcat): Likewise.
9673 (strlen_check_and_optimize_stmt): Likewise.
9674 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9675 * tree-streamer-in.c: Likewise.
9676 * tree-streamer.c (record_common_node): Likewise.
9677 * tree.c (tree_code_size): Likewise.
9678 (wide_int_to_tree_1): Likewise.
9679 (type_contains_placeholder_1): Likewise.
9680 (build_common_tree_nodes): Likewise.
9681 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9682 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9683 (POINTER_BOUNDS_P): Likewise.
9684 (BOUNDED_TYPE_P): Likewise.
9685 (BOUNDED_P): Likewise.
9686 (CALL_WITH_BOUNDS_P): Likewise.
9687 (pointer_bounds_type_node): Likewise.
9688 * value-prof.c (gimple_ic): Likewise.
9689 * var-tracking.c (vt_add_function_parameters): Likewise.
9690 * varasm.c (make_decl_rtl): Likewise.
9691 (assemble_start_function): Likewise.
9692 (output_constant): Likewise.
9693 (maybe_assemble_visibility): Likewise.
9694 * varpool.c (ctor_for_folding): Likewise.
9695 * chkp-builtins.def: Remove.
9696 * ipa-chkp.c: Remove.
9697 * ipa-chkp.h: Remove.
9698 * rtl-chkp.c: Remove.
9699 * rtl-chkp.h: Remove.
9700 * tree-chkp-opt.c: Remove.
9701 * tree-chkp.c: Remove.
9702 * tree-chkp.h: Remove.
9703
9704 2018-06-07 Carl Love <cel@us.ibm.com>
9705
9706 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9707 vextract_fp_from_shortl): Add BE support.
9708
9709 2018-06-07 Paul Koning <ni1d@arrl.net>
9710
9711 * compare-elim.c (try_merge_compare): Don't merge compare if
9712 address contains a side effect.
9713 (try_eliminate_compare): Likewise.
9714
9715 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9716
9717 * config.gcc: Support "tremont".
9718 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9719 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9720 PROCESSOR_TREMONT.
9721 * config/i386/i386.c (m_TREMONT): Define.
9722 (processor_target_table): Add "tremont".
9723 (PTA_TREMONT): Define.
9724 (ix86_lea_outperforms): Add TARGET_TREMONT.
9725 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9726 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9727 and M_INTEL_GOLDMONT_PLUS.
9728 (fold_builtin_cpu): Add "tremont".
9729 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9730 (ix86_option_override_internal): Add "tremont".
9731 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9732 (processor_type): Add PROCESSOR_TREMONT.
9733 * config/i386/x86-tune.def: Add m_TREMONT.
9734 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9735
9736 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9737
9738 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9739 symbol defined for msp430i* devices to be lower case.
9740
9741 2018-06-07 Richard Biener <rguenther@suse.de>
9742
9743 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9744 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9745 Properly wrap signed arithmetic if overflow wraps.
9746
9747 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9748
9749 PR tree-optimization/69615
9750 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9751 of a cast from a same precision integral SSA_NAME in a bb dominated
9752 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9753 cast to utype if rhs2 has already a compatible type.
9754
9755 2018-06-07 Richard Biener <rguenther@suse.de>
9756
9757 PR tree-optimization/85935
9758 * graphite-scop-detection.c (find_params_in_bb): Analyze
9759 condition operands with respect to the correct loop. Assert
9760 the analysis doesn't fail.
9761
9762 2018-06-04 Carl Love <cel@us.ibm.com>
9763
9764 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9765 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9766 as it is slightly cheaper.
9767 (first_match_or_eos_index_<mode>):
9768 Calculate index using natural element order.
9769 (first_match_index_<mode>):
9770 Calculate index using natural element order.
9771 (first_match_or_eos_index_<mode>):
9772 Calculate index using natural order.
9773 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9774 for BE and LE modes.
9775 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9776 P9V_BUILTIN_VCLZLSBB_V16QI.
9777 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9778 specific.
9779
9780 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9781
9782 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9783 indentation and line wrap for many prototypes. Add missing
9784 @smallexample directives around block of prototypes for vec_xl and
9785 vec_xst.
9786
9787 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9788
9789 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9790 track if we pass or return IEEE 128-bit floating point.
9791 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9792 C++ mangling that is compatible with GCC 8.1.
9793 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9794 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9795 floating point types.
9796 (rs6000_function_arg_advance_1): Likewise.
9797 (rs6000_mangle_type): Optionally generate mangled names that match
9798 what GCC 8.1 generated for IEEE 128-bit floating point types.
9799 (rs6000_globalize_decl_name): If we have an external function that
9800 passes or returns IEEE 128-bit types, generate a weak reference
9801 from the mangled name used in GCC 8.1 to the current mangled
9802 name.
9803 (rs6000_init_builtins): Make __ibm128 use the long double type if
9804 long double is IBM extended double. Make __float128 use the long
9805 double type if long double is IEEE 128-bit.
9806
9807 PR target/85657
9808 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9809 macro for __ibm128 built-in functions.
9810 (PACK_IF): Add __ibm128 pack/unpack functions.
9811 (UNPACK_IF): Likewise.
9812 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9813 enable long double built-in functions if long double is IEEE
9814 128-bit floating point.
9815 (rs6000_invalid_builtin): Update long double built-in function
9816 error message.
9817 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9818 functions, adjust the built-in function to use the long double
9819 built-in function if __ibm128 and long double are the same type.
9820 * doc/extend.texi (PowerPC builtins): Update documention for
9821 __builtin_{,un}pack_longdouble. Add documentation for
9822 __builtin_{,un}pack_ibm128.
9823
9824 2018-06-06 Jim Wilson <jimw@sifive.com>
9825
9826 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9827 (struct machine_function): New field interrupt_mode.
9828 (riscv_handle_type_attribute): New function. Add forward declaration.
9829 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9830 (riscv_expand_epilogue): Check interrupt_mode field.
9831 (riscv_set_current_function): Check interrupt attribute args and
9832 set interrupt_mode field.
9833 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9834 (riscv_sret, riscv_uret): New.
9835 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9836 new arguments to interrupt attribute.
9837
9838 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9839
9840 PR target/63177
9841 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9842 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9843
9844 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9845
9846 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9847 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9848 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9849 several redundant entries.
9850
9851 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9852
9853 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9854 type from "rtx" to "rtx_insn *".
9855 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9856 for local "call_insn", removing cast.
9857 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9858
9859 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9860
9861 PR tree-optimization/86066
9862 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9863 for BIT_INSERT_EXPR stores.
9864
9865 2018-06-06 Richard Biener <rguenther@suse.de>
9866
9867 PR tree-optimization/86062
9868 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9869 component refs ontop
9870 of to be offsetted base.
9871
9872 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9873
9874 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9875 to be static and remove check on interrupt attribute name.
9876
9877 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9878
9879 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9880 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9881
9882 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9883
9884 PR target/79924
9885 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9886 second argument.
9887 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9888 Remove second argument, change how error is called.
9889 (aarch64_layout_arg): Remove second argument from
9890 aarch64_err_no_fpadvsimd call.
9891 (aarch64_init_cumulative_args): Ditto.
9892 (aarch64_gimplify_va_arg_expr): Ditto.
9893 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9894
9895 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9896
9897 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9898 (*simple_return_indirect_internal<mode>): Rename from
9899 simple_return_indirect_internal. Use W mode iterator.
9900 (rstorssp): New expander.
9901 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9902 (clrssbsy): New expander.
9903 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9904
9905 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9906
9907 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9908 __typeof__.
9909 (cmse_check_pointed_object): Likewise.
9910
9911 2018-06-05 Martin Liska <mliska@suse.cz>
9912
9913 PR gcov-profile/47618
9914 * doc/invoke.texi: Document how -fprofile-dir format
9915 is extended.
9916
9917 2018-06-05 Richard Biener <rguenther@suse.de>
9918
9919 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9920 removal pretend DOM info isn't available so we do not update
9921 it and only remove edges, not dominated blocks. Actually free
9922 DOM info in case we removed something. Remove unreachable blocks.
9923 (mfb_keep_latches): Work with either DOM info or marked backedges.
9924 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9925 first. Mark backedges if DOM info isn't available.
9926 (Re-)compute DOM info after cleanup_control_flow_pre.
9927
9928 2018-06-05 Richard Biener <rguenther@suse.de>
9929
9930 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9931 (locus_discrim_hasher::hash): Adjust.
9932 (locus_discrim_hasher::equal): Likewise.
9933 (next_discriminator_for_locus): Work on line directly.
9934 (same_line_p): Pass in expanded locus1 as well.
9935 (assign_discriminators): Avoid redundant location expansions.
9936
9937 2018-06-05 Richard Biener <rguenther@suse.de>
9938
9939 PR tree-optimization/86046
9940 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9941 if required after clearing TREE_ADDRESSABLE.
9942
9943 2018-06-05 Richard Biener <rguenther@suse.de>
9944
9945 PR tree-optimization/86047
9946 * tree-ssa-loop.c (for_each_index): Glob handling of all
9947 decls and constants and really handle all of them.
9948
9949 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9950
9951 PR target/81497
9952 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9953 qualifier_void_pointer and qualifier_const_void_pointer.
9954 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9955 (arm_init_builtins): Handle the above.
9956 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9957 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9958 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9959 void intrinsics.
9960
9961 2018-06-05 Martin Liska <mliska@suse.cz>
9962
9963 * auto-profile.c (read_autofdo_file): Do not use
9964 gcov_ctr_summary struct.
9965 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9966 * coverage.c (struct counts_entry): Likewise.
9967 (read_counts_file): Read just single summary entry.
9968 (get_coverage_counts): Use gcov_summary struct.
9969 * coverage.h (get_coverage_counts): Likewise.
9970 * gcov-dump.c (dump_working_sets): Likewise.
9971 (tag_summary): Dump just single summary.
9972 * gcov-io.c (gcov_write_summary): Write just histogram
9973 summary.
9974 (gcov_read_summary): Read just single summary.
9975 (compute_working_sets): Use gcov_summary struct.
9976 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9977 of GCOV_COUNTERS_SUMMABLE.
9978 (GCOV_COUNTERS_SUMMABLE): Remove.
9979 (GCOV_FIRST_VALUE_COUNTER): Replace with
9980 GCOV_COUNTER_V_INTERVAL.
9981 (struct gcov_ctr_summary): Remove.
9982 (struct gcov_summary): Directly use fields of former
9983 gcov_ctr_summary.
9984 (compute_working_sets): Use gcov_summary struct.
9985 * gcov.c (read_count_file): Do not use ctrs fields.
9986 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9987 struct.
9988 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9989 struct.
9990 * profile.c: Likewise.
9991 * profile.h: Likewise.
9992
9993 2018-06-05 Martin Liska <mliska@suse.cz>
9994
9995 PR gcov-profile/84846
9996 * gcov.c (output_lines): Print working directory only
9997 in intermediate format.
9998
9999 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10000
10001 * config/s390/s390-builtin-types.def: Add void function type.
10002 * config/s390/s390-builtins.def: Use the function type for the
10003 tbeginc builtin.
10004
10005 2018-06-04 Jim Wilson <jimw@sifive.com>
10006
10007 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10008 to int.
10009 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10010 and maybe_eh_return. Change regno to unsigned int. Use new args to
10011 handle EH_RETURN_DATA_REGNO registers properly.
10012 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10013 (riscv_expand_epilogue): Update comment. Change argument name and
10014 type. Update code to use new name and type. Pass new args to
10015 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10016 EXCEPTION_RETURN.
10017 * config/riscv/riscv.md (NORMAL_RETURN): New.
10018 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10019 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10020 (eh_return): Call gen_eh_return_internal and emit barrier.
10021 (eh_return_internal): Call riscv_expand_epilogue.
10022
10023 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10024
10025 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10026 bit_insertion field and declare can_be_merged_into method.
10027 (merged_store_group::can_be_merged_into): New method.
10028 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10029 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10030 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10031
10032 2018-06-04 Richard Biener <rguenther@suse.de>
10033
10034 PR tree-optimization/85955
10035 * builtins.c (fold_builtin_sincos): Convert pointers to
10036 destination to appropriate type before dereferencing.
10037
10038 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10039
10040 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10041
10042 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10043
10044 * expr.c (expand_expr_real_1): Force the operand into memory if
10045 its TYPE_MODE is BLKmode and if there is no integer mode for
10046 the number of bits being extracted.
10047
10048 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10049
10050 PR target/85832
10051 PR target/86036
10052 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10053 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10054
10055 2018-06-04 Richard Biener <rguenther@suse.de>
10056
10057 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10058 (cleanup_tree_cfg_noloop): ... single caller. Do
10059 start_recording_case_labels later.
10060
10061 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10062
10063 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10064 to _IMMINTRIN_H_INCLUDED.
10065 * config/i386/pconfigintrin.h: Ditto.
10066 * config/i386/waitpkgintrin.h: Ditto.
10067 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10068 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10069 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10070 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10071 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10072 waitpkgintrin.h and cldemoteintrin.h.
10073
10074 2018-06-04 Richard Biener <rguenther@suse.de>
10075
10076 PR tree-optimization/86038
10077 * tracer.c (find_best_successor): Check probability for
10078 being initialized, bail out if not.
10079
10080 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10081
10082 PR target/86003
10083 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10084 of bits to ignore when comparing architectures.
10085
10086 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10087
10088 PR tree-optimization/69615
10089 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10090 maximum or minimum of the type, try to merge it also as if
10091 range1 is + [-, x - 1] or + [x + 1, -].
10092
10093 PR c++/86025
10094 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10095
10096 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10097
10098 PR tree-optimization/86034
10099 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10100 the unsigned bitfield type in a bit insertion sequence if it does not
10101 have a larger precision than the bitfield size.
10102 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10103
10104 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10105
10106 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10107
10108 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10109
10110 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10111 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10112 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10113 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10114
10115 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10116
10117 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10118 Disable -fdelete-null-pointer-checks for ELF toolchain.
10119
10120 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10121 Kito Cheng <kito.cheng@gmail.com>
10122
10123 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10124 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10125 (nds32*-*-*): Add glibc and uclibc conditions.
10126 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10127 (TARGET_EXCEPT_UNWIND_INFO): Define.
10128 * config/nds32/elf.h: New file.
10129 * config/nds32/linux.h: New file.
10130 * config/nds32/nds32-elf.opt: New file.
10131 * config/nds32/nds32-linux.opt: New file.
10132 * config/nds32/nds32-fp-as-gp.c
10133 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10134 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10135 TARGET_LINUX_ABI.
10136 (nds32_asm_file_end): Ditto.
10137 (nds32_print_operand): Ditto.
10138 (nds32_insert_attributes): Ditto.
10139 (nds32_init_libfuncs): New function.
10140 (TARGET_HAVE_TLS): Define.
10141 (TARGET_INIT_LIBFUNCS): Define.
10142 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10143 spec content.
10144 (TARGET_ELF): Apply different mcmodel setting.
10145 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10146 been migrated into elf.h and linux.h files.
10147 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10148 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10149 (mcmodel): The content has been migrated into nds32-elf.opt and
10150 nds32-linux.opt files.
10151 * config/nds32/t-elf: New file.
10152 * config/nds32/t-linux: New file.
10153
10154 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10155 Shiva Chen <shiva0217@gmail.com>
10156
10157 * config/nds32/constants.md (unspec_volatile_element): Add
10158 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10159 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10160 optimization.
10161 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10162 (make_pass_nds32_fp_as_gp): Declare.
10163 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10164 optmization pass.
10165 (nds32_asm_function_end_prologue): Remove unused asm output.
10166 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10167 (nds32_asm_file_start): Output necessary fp_as_gp information.
10168 (nds32_option_override): Adjust register usage.
10169 (nds32_expand_prologue): Consider fp_as_gp situation.
10170 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10171 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10172 (epilogue): Ditto.
10173 (return): Ditto.
10174 (simple_return): Ditto.
10175 (omit_fp_begin): Output special directive for fp_as_gp.
10176 (omit_fp_end): Output special directive for fp_as_gp.
10177 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10178 mforbid-fp-as-gp): New options.
10179
10180 2018-06-01 Mark Wielaard <mark@klomp.org>
10181
10182 * dwarf2out.c (dwarf2out_finish): Remove generation of
10183 DW_AT_loclists_base.
10184
10185 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10186
10187 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10188 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10189 (struct merged_store_group): Add bit_insertion field.
10190 (dump_char_array): Use standard hexadecimal format.
10191 (merged_store_group::merged_store_group): Set bit_insertion to false.
10192 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10193 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10194 also print the mask in the dump file.
10195 (pass_store_merging::gate): Minor tweak.
10196 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10197 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10198 stores with INTEGER_CST stores.
10199 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10200 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10201 and use it throughout. Generate bit insertion sequences if need be.
10202 (pass_store_merging::process_store): Remove redundant condition.
10203 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10204
10205 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10206
10207 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10208 the 128-bit floating point types. Fix function comment.
10209
10210 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10211
10212 * config/aarch64/aarch64-simd.md
10213 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10214 mnemonics.
10215 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10216 mnemonics.
10217
10218 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10219
10220 PR tree-optimization/85989
10221 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10222 variable.
10223 (backprop::intersect_uses): Check it when deciding whether this
10224 is a backedge reference.
10225 (backprop::process_block): Add each phi to m_visited_phis
10226 after visiting it, then clear it at the end.
10227
10228 2018-06-01 Richard Biener <rguenther@suse.de>
10229
10230 * tree-vectorizer.h (vect_dr_stmt): New function.
10231 (vect_get_load_cost): Adjust.
10232 (vect_get_store_cost): Likewise.
10233 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10234 Use vect_dr_stmt instead of DR_SMTT.
10235 (vect_record_base_alignments): Likewise.
10236 (vect_calculate_target_alignment): Likewise.
10237 (vect_compute_data_ref_alignment): Likewise and make static.
10238 (vect_update_misalignment_for_peel): Likewise.
10239 (vect_verify_datarefs_alignment): Likewise.
10240 (vector_alignment_reachable_p): Likewise.
10241 (vect_get_data_access_cost): Likewise. Pass down
10242 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10243 (vect_get_peeling_costs_all_drs): Likewise.
10244 (vect_peeling_hash_get_lowest_cost): Likewise.
10245 (vect_enhance_data_refs_alignment): Likewise.
10246 (vect_find_same_alignment_drs): Likewise.
10247 (vect_analyze_data_refs_alignment): Likewise.
10248 (vect_analyze_group_access_1): Likewise.
10249 (vect_analyze_group_access): Likewise.
10250 (vect_analyze_data_ref_access): Likewise.
10251 (vect_analyze_data_ref_accesses): Likewise.
10252 (vect_vfa_segment_size): Likewise.
10253 (vect_small_gap_p): Likewise.
10254 (vectorizable_with_step_bound_p): Likewise.
10255 (vect_prune_runtime_alias_test_list): Likewise.
10256 (vect_analyze_data_refs): Likewise.
10257 (vect_supportable_dr_alignment): Likewise.
10258 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10259 (vect_gen_prolog_loop_niters): Likewise.
10260 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10261 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10262 modify DR_STMT.
10263 (vect_recog_mask_conversion_pattern): Likewise.
10264 (vect_try_gather_scatter_pattern): Likewise.
10265 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10266 to vect_get_store_cost.
10267 (vect_get_store_cost): Get stmt_info instead of DR.
10268 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10269 (vect_get_load_cost): Get stmt_info instead of DR.
10270
10271 2018-06-01 Richard Biener <rguenther@suse.de>
10272
10273 PR middle-end/86017
10274 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10275 vars wrapped in MEM_REFs.
10276
10277 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10278
10279 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10280 Fix subreg tests so that we only return a choice between
10281 GENERAL_REGS and FP_REGS if the original classes included both.
10282
10283 2018-06-01 Richard Biener <rguenther@suse.de>
10284
10285 PR ipa/85960
10286 * tree-ssa-structalias.c (get_function_part_constraint):
10287 Handle NULL fi->decl.
10288 (find_func_aliases_for_call): Properly handle indirect
10289 fi from direct call.
10290 (find_func_clobbers): Likewise.
10291 (ipa_pta_execute): Likewise.
10292 (create_variable_info_for): For functions that are ifunc_resolver
10293 resolve to a varinfo that contains the result of the resolver call.
10294 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10295 aliases.
10296
10297 2018-05-31 Michael Collison <michael.collison@arm.com>
10298
10299 * config/aarch64/aarch64.md:
10300 (*fix_to_zero_extenddfdi2): New pattern.
10301 * gcc.target/aarch64/fix_extend1.c: New testcase.
10302
10303 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10304
10305 PR middle-end/78809
10306 PR middle-end/83026
10307 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10308 and BUILT_IN_STRNCMP_EQ.
10309 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10310 BUILT_IN_STRNCMP_EQ.
10311 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10312 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10313 (gimple_fold_builtin): Likewise.
10314 * tree-ssa-strlen.c (compute_string_length): New function.
10315 (determine_min_obsize): New function.
10316 (handle_builtin_string_cmp): New function to handle calls to
10317 string compare functions.
10318 (strlen_optimize_stmt): Add handling to builtin string compare
10319 calls.
10320 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10321 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10322 * tree.c (build_common_builtin_nodes): Add new defines of
10323 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10324
10325 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10326
10327 PR target/85984
10328 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10329 functions with naked attribute.
10330
10331 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10332
10333 * config/i386/sse.md (avx_vec_concat<mode>):
10334 Substitute concat_tg_mode mode attribute with xtg_mode.
10335 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10336 (concat_tg_mode): Remove mode attribute.
10337
10338 2018-05-31 Martin Sebor <msebor@redhat.com>
10339
10340 PR c/82063
10341 * calls.c (alloc_max_size): Correct a logic error/typo.
10342 Treat excessive arguments as infinite. Warn for invalid arguments.
10343 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10344
10345 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10346
10347 PR target/85829
10348 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10349 and movx for Haswell.
10350
10351 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10352 Cesar Philippidis <cesar@codesourcery.com>
10353
10354 PR middle-end/85879
10355 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10356 when emitting error on private/firstprivate reductions.
10357 * omp-low.c (lower_omp_target): Avoid reference-type processing
10358 on pointers for firstprivate clause.
10359
10360 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10361
10362 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10363 (st1x2): Likewise.
10364 (st1x3): Likewise.
10365 * config/aarch64/aarch64-simd.md
10366 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10367 (aarch64_ld1_x3_<mode>): Likewise
10368 (aarch64_st1x2<VALLDIF:mode>): Likewise
10369 (aarch64_st1_x2_<mode>): Likewise
10370 (aarch64_st1x3<VALLDIF:mode>): Likewise
10371 (aarch64_st1_x3_<mode>): Likewise
10372 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10373 (vld1_s8_x3): Likewise.
10374 (vld1_u16_x3): Likewise.
10375 (vld1_s16_x3): Likewise.
10376 (vld1_u32_x3): Likewise.
10377 (vld1_s32_x3): Likewise.
10378 (vld1_u64_x3): Likewise.
10379 (vld1_s64_x3): Likewise.
10380 (vld1_f16_x3): Likewise.
10381 (vld1_f32_x3): Likewise.
10382 (vld1_f64_x3): Likewise.
10383 (vld1_p8_x3): Likewise.
10384 (vld1_p16_x3): Likewise.
10385 (vld1_p64_x3): Likewise.
10386 (vld1q_u8_x3): Likewise.
10387 (vld1q_s8_x3): Likewise.
10388 (vld1q_u16_x3): Likewise.
10389 (vld1q_s16_x3): Likewise.
10390 (vld1q_u32_x3): Likewise.
10391 (vld1q_s32_x3): Likewise.
10392 (vld1q_u64_x3): Likewise.
10393 (vld1q_s64_x3): Likewise.
10394 (vld1q_f16_x3): Likewise.
10395 (vld1q_f32_x3): Likewise.
10396 (vld1q_f64_x3): Likewise.
10397 (vld1q_p8_x3): Likewise.
10398 (vld1q_p16_x3): Likewise.
10399 (vld1q_p64_x3): Likewise.
10400 (vst1_s64_x2): Likewise.
10401 (vst1_u64_x2): Likewise.
10402 (vst1_f64_x2): Likewise.
10403 (vst1_s8_x2): Likewise.
10404 (vst1_p8_x2): Likewise.
10405 (vst1_s16_x2): Likewise.
10406 (vst1_p16_x2): Likewise.
10407 (vst1_s32_x2): Likewise.
10408 (vst1_u8_x2): Likewise.
10409 (vst1_u16_x2): Likewise.
10410 (vst1_u32_x2): Likewise.
10411 (vst1_f16_x2): Likewise.
10412 (vst1_f32_x2): Likewise.
10413 (vst1_p64_x2): Likewise.
10414 (vst1q_s8_x2): Likewise.
10415 (vst1q_p8_x2): Likewise.
10416 (vst1q_s16_x2): Likewise.
10417 (vst1q_p16_x2): Likewise.
10418 (vst1q_s32_x2): Likewise.
10419 (vst1q_s64_x2): Likewise.
10420 (vst1q_u8_x2): Likewise.
10421 (vst1q_u16_x2): Likewise.
10422 (vst1q_u32_x2): Likewise.
10423 (vst1q_u64_x2): Likewise.
10424 (vst1q_f16_x2): Likewise.
10425 (vst1q_f32_x2): Likewise.
10426 (vst1q_f64_x2): Likewise.
10427 (vst1q_p64_x2): Likewise.
10428 (vst1_s64_x3): Likewise.
10429 (vst1_u64_x3): Likewise.
10430 (vst1_f64_x3): Likewise.
10431 (vst1_s8_x3): Likewise.
10432 (vst1_p8_x3): Likewise.
10433 (vst1_s16_x3): Likewise.
10434 (vst1_p16_x3): Likewise.
10435 (vst1_s32_x3): Likewise.
10436 (vst1_u8_x3): Likewise.
10437 (vst1_u16_x3): Likewise.
10438 (vst1_u32_x3): Likewise.
10439 (vst1_f16_x3): Likewise.
10440 (vst1_f32_x3): Likewise.
10441 (vst1_p64_x3): Likewise.
10442 (vst1q_s8_x3): Likewise.
10443 (vst1q_p8_x3): Likewise.
10444 (vst1q_s16_x3): Likewise.
10445 (vst1q_p16_x3): Likewise.
10446 (vst1q_s32_x3): Likewise.
10447 (vst1q_s64_x3): Likewise.
10448 (vst1q_u8_x3): Likewise.
10449 (vst1q_u16_x3): Likewise.
10450 (vst1q_u32_x3): Likewise.
10451 (vst1q_u64_x3): Likewise.
10452 (vst1q_f16_x3): Likewise.
10453 (vst1q_f32_x3): Likewise.
10454 (vst1q_f64_x3): Likewise.
10455 (vst1q_p64_x3): Likewise.
10456
10457 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10458
10459 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10460 user_label_prefix to name.
10461
10462 * tree-core.h: Update comment about the format of NAME string
10463 passed to handler in attribute_spec.
10464
10465 * config/msp430/msp430.md: Remove erroneous subreg expression from
10466 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10467 zero_extend{q,h}isi2.
10468
10469 2018-05-30 Borislav Petkov <bp@suse.de>
10470
10471 * doc/extend.texi: Document some architecture specific
10472 constraints and sort entries.
10473
10474 2018-05-30 Martin Sebor <msebor@redhat.com>
10475
10476 PR middle-end/85369
10477 * builtins.c (expand_builtin_stpcpy_1): New function.
10478 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10479 only if the former succeeds.
10480
10481 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10482
10483 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10484 in saphira.
10485
10486 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10487
10488 * doc/invoke.texi (-flinker-output): Document
10489
10490 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10491
10492 * passes.c (ipa_write_summaries): Only modify statements if body
10493 is in memory.
10494 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10495 incrementally linking.
10496 (ipa_passes): Likewise.
10497 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10498 pass down resolution info.
10499 * common.opt (flag_incremental_link): Update info.
10500 * gcc.c (plugin specs): Turn flinker-output=* to
10501 -plugin-opt=-linker-output-known
10502 * toplev.c (compile_file): Also cut compilation when doing incremental
10503 link.
10504 * flag-types. (enum lto_partition_model): Add
10505 LTO_LINKER_OUTPUT_NOLTOREL.
10506 (invoke.texi): Add -flinker-output docs.
10507 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10508 link same way as WPA; do not stream in dead initializers.
10509
10510 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10511 darf2out_register_external_decl): Support incremental link.
10512
10513 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10514
10515 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10516
10517 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10518
10519 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10520 it down to simple_object_copy_lto_debug_sections.
10521 (run_gcc): Determine incremental LTO link time and configure
10522 lto1 into non-wpa mode, disable renaming of debug sections.
10523
10524 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10525
10526 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10527 descriptions of various incorrectly documented functions.
10528
10529 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10530
10531 Revert:
10532 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10533 address check not strict.
10534
10535 2018-05-30 Richard Biener <rguenther@suse.de>
10536
10537 PR tree-optimization/85964
10538 * tracer.c (better_p): Drop initialized count check, we only
10539 call the function with initialized counts now.
10540 (find_best_successor): Do find a best edge if one
10541 has uninitialized count.
10542 (find_best_predecessor): Likewise. Do BB frequency check only
10543 if count is initialized.
10544
10545 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10546
10547 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10548 (aarch64_ldrstr_offset_compare): New.
10549 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10550 load/store orderings.
10551 (aarch64_gen_adjusted_ldpstp): Likewise.
10552
10553 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10554
10555 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10556 Check for subset of GENERAL_REGS and FP_REGS.
10557 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10558 r=w alternative.
10559
10560 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10561
10562 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10563 and wi::to_poly_offset. Add the current offset and then check
10564 whether the sum fits, rather than using an unchecked addition of
10565 a checked term. Check for a shwi rather than a uhwi.
10566 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10567 (store_constructor): Use poly_int_tree_p.
10568 (expand_expr_real_1): Likewise.
10569 * function.c (assign_temp): Likewise.
10570 * fold-const.c (const_binop): Use poly_int_tree_p and
10571 wi::to_poly_offset.
10572 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10573 division.
10574 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10575 to_poly_offset for MEM offsets.
10576 * ipa-icf.c (sem_variable::equals): Likewise.
10577 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10578 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10579 wi::to_poly_offset for BIT_FIELD_REF offsets.
10580 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10581 wi::to_poly_offset.
10582 * var-tracking.c (emit_note_insn_var_location): Use
10583 tree_to_poly_uint64.
10584
10585 2018-05-29 Jim Wilson <jimw@sifive.com>
10586
10587 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10588
10589 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10590
10591 PR target/85950
10592 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10593 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10594 sequence.
10595 (sse4_1_round<mode>2): Use nonimmediate_operand
10596 for operand 1 predicate.
10597
10598 2018-05-29 Martin Sebor <msebor@redhat.com>
10599 Richard Biener <rguenther@suse.de>
10600
10601 PR testsuite/85888
10602 * calls.c (get_size_range): Call determine_value_range instead
10603 of get_value_range..
10604 * tree-vrp.h (determine_value_range): Declared new function.
10605 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10606
10607 2018-05-29 Richard Biener <rguenther@suse.de>
10608
10609 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10610 sure to use non-pattern stmts for get_earlier_stmt arguments.
10611 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10612 called on pattern stmts.
10613 (get_later_stmt): Likewise.
10614
10615 2018-05-29 Martin Liska <mliska@suse.cz>
10616
10617 PR gcov-profile/85759
10618 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10619 env variables.
10620
10621 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10622
10623 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10624 VEC_UNPACK_*_EXPR.
10625 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10626 VEC_PACK_*_EXPR.
10627
10628 PR target/85918
10629 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10630 VEC_PACK_FLOAT_EXPR): New tree codes.
10631 * tree-pretty-print.c (op_code_prio): Handle
10632 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10633 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10634 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10635 * tree-inline.c (estimate_operator_cost): Likewise.
10636 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10637 * fold-const.c (const_binop): Likewise.
10638 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10639 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10640 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10641 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10642 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10643 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10644 * expr.c (expand_expr_real_2): Likewise.
10645 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10646 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10647 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10648 optabs.
10649 * optabs.c (expand_widen_pattern_expr): For
10650 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10651 sign from result type rather than operand's type.
10652 (expand_binop_directly): For vec_packu_float_optab and
10653 vec_packs_float_optab allow result type to be different from operand's
10654 type.
10655 * optabs-tree.c (optab_for_tree_code): Handle
10656 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10657 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10658 * tree-vect-generic.c (expand_vector_operations_1): Handle
10659 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10660 VEC_PACK_FLOAT_EXPR.
10661 * tree-vect-stmts.c (supportable_widening_operation): Handle
10662 FIX_TRUNC_EXPR.
10663 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10664 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10665 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10666 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10667 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10668 mode attributes.
10669 (vec_pack<floatprefix>_float_<mode>): New expander.
10670 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10671 attributes.
10672 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10673 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10674 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10675 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10676 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10677 Document.
10678 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10679 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10680 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10681 VEC_PACK_FLOAT_EXPR): Document.
10682
10683 2018-05-29 Richard Biener <rguenther@suse.de>
10684
10685 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10686 member.
10687 (stmt_vec_info_vec): Make pointer.
10688 (init_stmt_vec_info_vec): Remove.
10689 (free_stmt_vec_info_vec): Likewise.
10690 (set_stmt_vec_info_vec): New function.
10691 (free_stmt_vec_infos): Likewise.
10692 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10693 (set_vinfo_for_stmt): Likewise.
10694 (get_earlier_stmt): Likewise.
10695 (get_later_stmt): Likewise.
10696 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10697 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10698 (vec_info::~vec_info): Free stmt_vec_infos.
10699 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10700 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10701 (pass_slp_vectorize::execute): Likewise.
10702 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10703 (free_stmt_vec_info_vec): Likewise.
10704 (set_stmt_vec_info_vec): New function.
10705 (free_stmt_vec_infos): Likewise.
10706 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10707 the global stmt_vec_info_vec.
10708 * tree-parloops.c (gather_scalar_reductions): Use
10709 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10710 vector.
10711
10712 2018-05-29 Richard Biener <rguenther@suse.de>
10713
10714 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10715
10716 2018-05-29 Martin Liska <mliska@suse.cz>
10717 David Malcolm <dmalcolm@redhat.com>
10718
10719 * vec.c (test_reverse): New.
10720 (vec_c_tests): Add new test.
10721 * vec.h (vl_ptr>::reverse): New function.
10722
10723 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10724
10725 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10726
10727 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10728 and later.
10729
10730 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10731
10732 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10733
10734 2018-05-28 Richard Biener <rguenther@suse.de>
10735
10736 PR tree-optimization/85933
10737 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10738 look at stmts marked as vectorizable.
10739
10740 2018-05-28 Richard Biener <rguenther@suse.de>
10741
10742 PR tree-optimization/85934
10743 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10744 vector boolean check before scalar optimization.
10745
10746 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10747
10748 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10749 for armv5te.
10750
10751 2018-05-28 Mark Wielaard <mark@klomp.org>
10752
10753 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10754 if it is an expression containing a minus sign.
10755
10756 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10757
10758 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10759
10760 2018-05-27 Paul Koning <ni1d@arrl.net>
10761
10762 * config/pdp11/pdp11.md (truncsihi2): Remove.
10763
10764 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10765 Chung-Ju Wu <jasonwucj@gmail.com>
10766
10767 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10768 implementation.
10769 (unaligned_store_dw): Ditto.
10770 * config/nds32/nds32-memory-manipulation.c
10771 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10772 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10773 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10774 (emit_setmem_word_loop): Rename to ...
10775 (emit_setmem_doubleword_loop): ... this.
10776 (nds32_gen_dup_4_byte_to_word_value): New function.
10777 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10778 (nds32_expand_setmem_loop): Refine implementation.
10779 (nds32_expand_setmem_loop_v3m): Ditto.
10780 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10781 pattern.
10782
10783 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10784
10785 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10786
10787 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10788
10789 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10790 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10791 machine->attr_no_prologue_p.
10792 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10793 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10794 (nds32_expand_epilogue): Consider attr_naked_p.
10795 (nds32_expand_epilogue_v3pop): Likewise.
10796 (nds32_can_use_return_insn): Likewise.
10797 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10798 attr_no_prologue_p fields.
10799 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10800
10801 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10802
10803 PR target/85918
10804 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10805 attributes.
10806 * config/i386/sse.md
10807 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10808 Rename to ...
10809 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10810 ... this.
10811 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10812 Rename to ...
10813 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10814 ... this.
10815 (*<floatsuffix>floatv2div2sf2): Rename to ...
10816 (*float<floatunssuffix>v2div2sf2): ... this.
10817 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10818 (float<floatunssuffix>v2div2sf2_mask): ... this.
10819 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10820 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10821 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10822 to ...
10823 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10824 ... this.
10825 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10826 Rename to ...
10827 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10828 ... this.
10829 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10830 Rename to ...
10831 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10832 ... this.
10833 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10834 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10835 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10836 gen_ufix_truncv8dfv8si2.
10837 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10838 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10839 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10840 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10841 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10842 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10843 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10844 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10845
10846 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10847
10848 PR target/85900
10849 PR target/85345
10850 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10851
10852 2018-05-25 Jim Wilson <jimw@sifive.com>
10853
10854 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10855 * config/riscv/riscv.c (struct machine_function): Add
10856 interrupt_handler_p and attribute_checked_p fields.
10857 (riscv_attribute_table): Add interrupt.
10858 (riscv_interrupt_type_p): New.
10859 (riscv_save_reg_p): Save extra regs for interrupt handler.
10860 (riscv_use_save_libcall): Return false for interrupt handler.
10861 (riscv_first_stack_step): Add forward declaration.
10862 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10863 for interrupt handler with large frame. Use it for saved reg list.
10864 (riscv_expand_prologue): Move flag_stack_usage_info support to
10865 eliminate duplication.
10866 (riscv_expand_epilogue): Generate mret for interrupt handler.
10867 (riscv_epilogue_uses): New.
10868 (riscv_can_use_return_insn): Return false for interrupt handler.
10869 (riscv_function_ok_for_sibcall): Likewise.
10870 (riscv_set_current_function): Add interrupt handler support.
10871 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10872 * config/riscv/riscv.md (UNSPECV_MRET): New.
10873 (GP_REGNUM): New.
10874 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10875 (riscv_mret): New.
10876 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10877
10878 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10879
10880 PR tree-optimization/85712
10881 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10882 this candidate has already been replaced in-situ by a copy.
10883
10884 2018-05-25 Jason Merrill <jason@redhat.com>
10885
10886 PR c++/80485 - inline function non-zero address.
10887 * symtab.c (nonzero_address): Check DECL_COMDAT.
10888
10889 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10890
10891 PR target/83628
10892 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10893 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10894 extension of SImode operation. Use const123_operand predicate.
10895 (*saddsi_1): Remove.
10896 (*saddl_se_1): Ditto.
10897 (*ssubsi_1): Ditto.
10898 (*ssubl_se_1): Ditto.
10899 * config/alpha/predicates.md (const123_operand): New predicate.
10900 * config/alpha/constraints.md (P): Use IN_RANGE.
10901
10902 2018-05-25 Richard Biener <rguenther@suse.de>
10903
10904 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10905 defaulted to true.
10906 (ref_maybe_used_by_stmt_p): Likewise.
10907 (stmt_may_clobber_ref_p): Likewise.
10908 (stmt_may_clobber_ref_p_1): Likewise.
10909 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10910 and pass it along.
10911 (ref_maybe_used_by_stmt_p): Likewise.
10912 (stmt_may_clobber_ref_p): Likewise.
10913 (stmt_may_clobber_ref_p_1): Likewise.
10914 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10915 the alias oracle to disambiguate DRs with stmts DR analysis
10916 couldn't handle.
10917 (vect_analyze_data_refs): Do not give up on not analyzable
10918 DRs for BB vectorization. Remove code truncating the dataref
10919 vector.
10920
10921 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10922
10923 PR target/85832
10924 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10925 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10926 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10927
10928 2018-05-25 Richard Biener <rguenther@suse.de>
10929
10930 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10931 function, combining stmt data ref gathering and fatal analysis
10932 parts.
10933 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10934 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10935 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10936 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10937 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10938
10939 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10940
10941 PR tree-optimization/85720
10942 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10943 SCC if all partitions are builtins.
10944 (version_loop_by_alias_check): New parameter. Generate cancelable
10945 runtime alias check if all partitions are builtins.
10946 (distribute_loop): Update call to above function.
10947
10948 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10949
10950 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10951 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10952 (parm_default_def_partition_arg): Ditto.
10953 (set_parm_default_def_partition): Ditto.
10954 (get_parm_default_def_partitions): Ditto and make it static.
10955 (get_undefined_value_partitions): Ditto and make it static.
10956 (remove_ssa_form): Refactor call to init_var_map here.
10957 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10958 computation for loop region.
10959 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10960 (register_default_def): Delete.
10961 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10962 (parm_default_def_partition_arg): Ditto.
10963 (set_parm_default_def_partition): Ditto.
10964 (get_parm_default_def_partitions): Ditto and make it static.
10965 (get_undefined_value_partitions): Ditto and make it static.
10966 (coalesce_with_default, coalesce_with_default): Update comment.
10967 (create_coalesce_list_for_region): New func factored out from
10968 create_outofssa_var_map.
10969 (populate_coalesce_list_for_outofssa): New func factored out from
10970 create_outofssa_var_map and coalesce_ssa_name.
10971 (create_outofssa_var_map): Delete.
10972 (coalesce_ssa_name): Refactor to support live range computation.
10973 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10974 (get_parm_default_def_partitions): Delete.
10975 (get_undefined_value_partitions): Ditto.
10976 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10977 computation for loop region.
10978 (new_tree_live_info, loe_visit_block): Ditto.
10979 (live_worklist, set_var_live_on_entry): Ditto.
10980 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10981 * tree-ssa-live.h (struct _var_map): New fields.
10982 (init_var_map): Change decl.
10983 (region_contains_p): New.
10984
10985 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10986
10987 * tree-ssa-live.h (live_merge_and_clear): Delete.
10988
10989 2018-05-25 Richard Biener <rguenther@suse.de>
10990
10991 PR c++/85912
10992 * tree-dump.c (dequeue_and_dump): Remove access to removed
10993 operand 2 of a SWITCH_EXPR.
10994
10995 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10996
10997 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10998 multiplication and division.
10999 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11000 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11001 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11002 (cond_udiv_optab, cond_umod_optab): New optabs.
11003 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11004 (IFN_COND_RDIV): New internal functions.
11005 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11006 TRUNC_MOD_EXPR and RDIV_EXPR.
11007 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11008 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11009 New unspecs.
11010 (SVE_INT_BINARY): Include mult.
11011 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11012 (optab, sve_int_op): Handle mult.
11013 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11014 UNSPEC_COND_DIV.
11015 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11016 for SVE_INT_BINARY_SD.
11017
11018 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11019
11020 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11021 (optab, sve_int_op): Handle div and udiv.
11022 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11023 for SVE_INT_BINARY_SD.
11024 (*<optab><mode>3): New insn for the same.
11025
11026 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11027
11028 * tree-vect-patterns.c: Include predict.h.
11029 (vect_recog_divmod_pattern): Restrict check for division support
11030 to when optimizing for size.
11031
11032 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11033
11034 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11035 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11036 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11037 (gimple_match_op::set_op): Likewise.
11038 (gimple_resimplify4): Declare.
11039 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11040 (expr::gen_transform): Likewise.
11041 (decision_tree::gen): Generate a simplification routine for 4 operands.
11042 * gimple-match-head.c (gimple_simplify): Add an overload for
11043 4 operands. In the top-level function, handle up to 4 call
11044 arguments and call gimple_resimplify4.
11045 (gimple_resimplify4): New function.
11046 (build_call_internal): Pass a fourth operand.
11047 (maybe_push_to_seq): Likewise.
11048 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11049 Fold VEC_COND_EXPRs of an operation and a default value into
11050 an IFN_COND_* function if possible.
11051 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11052 New unspecs.
11053 (SVE_COND_FP_BINARY): Include them.
11054 (optab, sve_fp_op): Handle them.
11055 (SVE_INT_BINARY_REV): New code iterator.
11056 (SVE_COND_FP_BINARY_REV): New int iterator.
11057 (commutative): New int attribute.
11058 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11059 Declare.
11060 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11061 function.
11062 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11063 (*cond_<optab><mode>): New patterns for reversed operands.
11064
11065 2018-05-25 Richard Biener <rguenther@suse.de>
11066
11067 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11068 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11069 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11070 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11071 * tree-vect-data-refs.c (everywhere): Adjust users.
11072 * tree-vect-loop.c (everywhere): Likewise.
11073 * tree-vect-slp.c (everywhere): Likewise.
11074 * tree-vect-stmts.c (everywhere): Likewise.
11075 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11076
11077 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11078
11079 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11080 Rename to...
11081 (gcc_cv_as_section_exclude): ... this.
11082 Try Solaris as #exclude syntax.
11083 * configure: Regenerate.
11084 * config.in: Regenerate.
11085 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11086 SECTION_EXCLUDE.
11087 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11088 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11089
11090 * varasm.c (default_elf_asm_named_section): Don't check if
11091 HAVE_GAS_SECTION_EXCLUDE is defined.
11092
11093 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11094
11095 * doc/md.texi: Update the documentation of the cond_* optabs
11096 to mention the new final operand. Fix GET_MODE_NUNITS call.
11097 Describe the scalar case too.
11098 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11099 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11100 instead of 2.
11101 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11102 (get_conditional_internal_fn): Update comment.
11103 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11104 accumulator value as a final argument to conditional functions.
11105 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11106 a define_expand and add an "else" operand. Assert for now that
11107 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11108 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11109 (*cond_<optab><mode>): New patterns.
11110 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11111 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11112 (UNSPEC_COND_EOR): Delete.
11113 (optab): Remove associated mappings.
11114 (SVE_INT_BINARY): New code iterator.
11115 (sve_int_op): Remove int attribute and add "minus" to the code
11116 attribute.
11117 (SVE_COND_INT_OP): Delete.
11118 (SVE_COND_FP_OP): Rename to...
11119 (SVE_COND_FP_BINARY): ...this.
11120
11121 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11122
11123 * optabs.c (can_reuse_operands_p): New function.
11124 (maybe_legitimize_operands): Try to reuse the results for
11125 earlier operands.
11126
11127 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11128
11129 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11130 Add {q} suffix to insn mnemonic.
11131
11132 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11133
11134 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11135 (msp430_warn_func_return): New.
11136
11137 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11138
11139 * fold-const.c (tree_nonzero_bits): New function.
11140 * fold-const.h (tree_nonzero_bits): Likewise.
11141 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11142 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11143
11144 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11145
11146 PR target/85900
11147 PR target/85345
11148 * varasm.c (assemble_alias): Check ifunc_resolver only on
11149 FUNCTION_DECL.
11150
11151 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11152
11153 PR target/85903
11154 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11155 when memory input operand is handled.
11156
11157 2018-05-24 Luis Machado <luis.machado@linaro.org>
11158
11159 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11160 global.
11161 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11162
11163 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11164
11165 * match.pd: Delay FMA folds until after vectorization.
11166
11167 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11168
11169 PR target/83009
11170 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11171 address check not strict.
11172
11173 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11174
11175 * gimple-match.h (gimple_match_op): New class.
11176 (mprts_hook): Replace parameters with a gimple_match_op *.
11177 (maybe_build_generic_op): Likewise.
11178 (gimple_simplified_result_is_gimple_val): Replace parameters with
11179 a const gimple_match_op *.
11180 (gimple_simplify): Replace code_helper * and tree * parameters with
11181 a gimple_match_op * parameter.
11182 (gimple_resimplify1): Replace code_helper *, tree and tree *
11183 parameters with a gimple_match_op * parameter.
11184 (gimple_resimplify2): Likewise.
11185 (gimple_resimplify3): Likewise.
11186 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11187 parameters with a gimple_match_op * parameter.
11188 * gimple-match-head.c (gimple_simplify): Change prototypes of
11189 auto-generated functions to take a gimple_match_op * instead of
11190 separate code_helper * and tree * parameters. Make the same
11191 change in the top-level overload and update calls to the
11192 gimple_resimplify routines. Update calls to the auto-generated
11193 functions and to maybe_push_res_to_seq in the publicly-facing
11194 operation-specific gimple_simplify overloads.
11195 (gimple_match_op::MAX_NUM_OPS): Define.
11196 (gimple_resimplify1): Replace rcode and ops with a single res_op
11197 parameter. Update call to gimple_simplify.
11198 (gimple_resimplify2): Likewise.
11199 (gimple_resimplify3): Likewise.
11200 (mprts_hook): Replace parameters with a gimple_match_op *.
11201 (maybe_build_generic_op): Likewise.
11202 (build_call_internal): Replace type, nargs and ops with
11203 a gimple_match_op *.
11204 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11205 with a single gimple_match_op *. Update calls to mprts_hook,
11206 build_call_internal and gimple_simplified_result_is_gimple_val.
11207 Factor out code that is common to the tree_code and combined_fn cases.
11208 * genmatch.c (expr::gen_transform): Replace tem_code and
11209 tem_ops with a gimple_match_op called tem_op. Update calls
11210 to the gimple_resimplify functions and maybe_push_res_to_seq.
11211 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11212 res_ops. Update call to the gimple_resimplify functions.
11213 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11214 (decision_tree::gen): Make the functions take a gimple_match_op *
11215 called res_op instead of separate res_code and res_ops parameters.
11216 Update call accordingly.
11217 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11218 and ops with a single res_op parameter. Update calls to
11219 maybe_build_generic_op and maybe_push_res_to_seq.
11220 (fold_stmt_1): Update calls to gimple_simplify and
11221 replace_stmt_with_simplification.
11222 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11223 and gimple_simplified_result_is_gimple_val.
11224 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11225 gimple_simplify.
11226 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11227 with a gimple_match_op *.
11228 (vn_nary_build_or_lookup): Likewise. Update call to
11229 vn_nary_build_or_lookup_1.
11230 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11231 gimple_match_op *. Update calls to the gimple_resimplify routines
11232 and to gimple_simplified_result_is_gimple_val.
11233 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11234 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11235 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11236 (visit_nary_op): Likewise.
11237 (visit_reference_op_load): Likewise.
11238
11239 2018-05-23 Luis Machado <luis.machado@linaro.org>
11240
11241 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11242 modifier for printing the step amount.
11243
11244 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11245
11246 PR target/78849
11247 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11248 types.
11249
11250 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11251
11252 * doc/sourcebuild.texi (Endianness): New subsubsection.
11253
11254 2018-05-23 Luis Machado <luis.machado@linaro.org>
11255
11256 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11257 <prefetch_dynamic_strides>: New const bool field.
11258 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11259 prefetch_dynamic_strides.
11260 (exynosm1_prefetch_tune): Likewise.
11261 (thunderxt88_prefetch_tune): Likewise.
11262 (thunderx_prefetch_tune): Likewise.
11263 (thunderx2t99_prefetch_tune): Likewise.
11264 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11265 false.
11266 (aarch64_override_options_internal): Update to set
11267 PARAM_PREFETCH_DYNAMIC_STRIDES.
11268 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11269 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11270 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11271 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11272 prefetch-dynamic-strides setting.
11273
11274 2018-05-23 Luis Machado <luis.machado@linaro.org>
11275
11276 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11277 <minimum_stride>: New const int field.
11278 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11279 minimum_stride field defaulting to -1.
11280 (exynosm1_prefetch_tune): Likewise.
11281 (thunderxt88_prefetch_tune): Likewise.
11282 (thunderx_prefetch_tune): Likewise.
11283 (thunderx2t99_prefetch_tune): Likewise.
11284 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11285 <default_opt_level>: Set to 3.
11286 (aarch64_override_options_internal): Update to set
11287 PARAM_PREFETCH_MINIMUM_STRIDE.
11288 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11289 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11290 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11291 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11292 stride is constant and is below the minimum stride threshold.
11293
11294 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11295
11296 * config/arm/arm-cpus.in (mode26): Delete.
11297 (armv4): Delete mode26 reference.
11298 * config/arm/arm.c (arm_configure_build_target): Delete use of
11299 isa_bit_mode26.
11300
11301 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11302
11303 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11304 New insn pattern.
11305 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11306 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11307 for non-SSE modes.
11308 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11309 (floatunsdidf2): Ditto.
11310
11311 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11312
11313 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11314 (fixuns_trunc<mode>si2_avx512f): Ditto.
11315 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11316 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11317 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11318
11319 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11320
11321 PR rtl-optimization/79985
11322 * df-scan.c (df_insn_refs_collect): Remove special case for
11323 global registers and asm statements.
11324
11325 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11326
11327 * extend.texi (Global Register Variables): Rewrite the bullet list.
11328 Note that the register is available for allocation. Note that access
11329 via inline asm must use constraints. Add note about async-signal
11330 handlers. Remove paragraph about automagic register selection.
11331
11332 2018-05-23 Richard Biener <rguenther@suse.de>
11333
11334 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11335 of fixed offset from memset VN.
11336
11337 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11338
11339 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11340 first_interp field.
11341 (alloc_cand_and_find_basis): Initialize first_interp field.
11342 (slsr_process_mul): Modify first_interp field.
11343 (slsr_process_add): Likewise.
11344 (slsr_process_cast): Modify first_interp field for each new
11345 interpretation.
11346 (slsr_process_copy): Likewise.
11347 (dump_candidate): Dump first_interp field.
11348 (replace_mult_candidate): Process all interpretations, not just
11349 subsequent ones.
11350 (replace_rhs_if_not_dup): Likewise.
11351 (replace_one_candidate): Likewise.
11352
11353 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11354
11355 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11356 Add new boolean.
11357 (aarch64_needs_frame_chain): New function.
11358 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11359
11360 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11361
11362 PR target/84882
11363 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11364 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11365 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11366 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11367 as true for strict-align.
11368 (aarch64_can_inline_p): Perform checks even when callee has no
11369 attributes to check for strict alignment.
11370 * doc/extend.texi (AArch64 Function Attributes): Document
11371 no-strict-align.
11372 * doc/invoke.texi: (AArch64 Options): Likewise.
11373
11374 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11375
11376 PR tree-optimization/85853
11377 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11378 the handling of the root of the node to...
11379 (vect_slp_analyze_node_operations_1): ...this new function,
11380 and run the whole thing with the child nodes' def types
11381 set according to their SLP node's def type.
11382
11383 2018-05-23 Richard Biener <rguenther@suse.de>
11384
11385 PR middle-end/85874
11386 * tree-data-ref.c (create_runtime_alias_checks): Defer
11387 and ignore overflow warnings.
11388
11389 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11390
11391 PR tree-optimization/85822
11392 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11393 constants.
11394
11395 2018-05-23 Richard Biener <rguenther@suse.de>
11396
11397 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11398 memset constants via native_interpret_expr.
11399
11400 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11401
11402 PR target/85345
11403 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11404 attribute.
11405 (cgraph_node::create_alias): Likewise.
11406 (cgraph_node::get_availability): Check ifunc_resolver instead
11407 of looking up ifunc attribute.
11408 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11409 * varasm.c (do_assemble_alias): Likewise.
11410 (assemble_alias): Likewise.
11411 (default_binds_local_p_3): Likewise.
11412 * cgraph.h (cgraph_node): Add ifunc_resolver.
11413 (cgraph_node::only_called_directly_or_aliased_p): Return false
11414 for IFUNC resolver.
11415 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11416 attribute.
11417 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11418 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11419 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11420 instead of looking up ifunc attribute.
11421
11422 2018-05-22 Luis Machado <luis.machado@linaro.org>
11423
11424 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11425
11426 2018-05-22 Martin Sebor <msebor@redhat.com>
11427
11428 PR middle-end/85359
11429 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11430 only when expasion succeeds.
11431 (expand_builtin_strcmp): Same.
11432 (expand_builtin_strncmp): Same.
11433
11434 2018-05-22 Martin Sebor <msebor@redhat.com>
11435
11436 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11437
11438 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11439 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11440
11441 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11442 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11443 code.
11444 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11445 Add check for legitimate_address.
11446 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11447 (aarch64_swap_ldrstr_operands): New.
11448 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11449 Define prototype.
11450
11451 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11452 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11453
11454 * config/aarch64/aarch64.md: New patterns to generate stp
11455 and ldp.
11456 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11457 single words and double words.
11458 (load_pair_sw, load_pair_dw): Likewise.
11459 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11460 Delete.
11461 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11462 Delete.
11463 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11464 for different mode ldpstp and add peephole for merged zero stores.
11465 Likewise for loads.
11466 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11467 Add size check.
11468 (aarch64_gen_store_pair): Rename calls to match new patterns.
11469 (aarch64_gen_load_pair): Rename calls to match new patterns.
11470 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11471 (load_pair<DREG:mode><DREG2:mode>): ... This.
11472 (store_pair<mode>): Rename to...
11473 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11474 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11475 New mode iterators.
11476 (V_INT_EQUIV): Handle SImode.
11477 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11478 New predicate.
11479
11480 2018-05-22 Martin Sebor <msebor@redhat.com>
11481
11482 PR c/85623
11483 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11484 or ajust the presumed bound on an operation to avoid unnecessary
11485 warnings.
11486
11487 2018-05-22 Martin Sebor <msebor@redhat.com>
11488
11489 PR tree-optimization/85826
11490 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11491 assuming that a DECL necesarily has a constant size.
11492
11493 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11494
11495 PR middle-end/85862
11496 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11497
11498 2018-05-22 Richard Biener <rguenther@suse.de>
11499
11500 PR tree-optimization/85834
11501 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11502 non-constant and non-zero memset arguments.
11503
11504 2018-05-22 Martin Liska <mliska@suse.cz>
11505
11506 PR ipa/85607
11507 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11508
11509 2018-05-22 Richard Biener <rguenther@suse.de>
11510
11511 PR tree-optimization/85863
11512 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11513 comparisons when vectype is specified.
11514 (vectorizable_condition): Do not specify vectype for
11515 vect_is_simple_cond when SLP vectorizing.
11516
11517 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11518
11519 PR target/85657
11520 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11521 define __ibm128 as long double.
11522 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11523 as a distinct type when IEEE 128-bit support is enabled.
11524 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11525 128-bit types to use the correct functions.
11526 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11527 convert between 128-bit floating point types that have different
11528 modes but the same representation, instead of using gen_lowpart to
11529 makean alias.
11530 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11531 KFmode.
11532 (IFKF_reg): New attributes to give the register constraints for
11533 IFmode and KFmode.
11534 (extend<mode>tf2_internal): New insns to mark an explicit
11535 conversion between 128-bit floating point types that have a
11536 different mode but share the same representation.
11537
11538 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11539
11540 PR tree-optimization/85814
11541 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11542 a null return from get_strinfo when unsharing the next
11543 strinfo in the chain.
11544
11545 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11546
11547 PR gcc/84923
11548 * varasm.c (weak_finish): Clean up weak_decls.
11549
11550 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11551
11552 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11553 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11554 UNSPEC_UADALP values.
11555 * config/aarch64/iterators.md (ABAL): New int iterator.
11556 (ABDL2): Likewise.
11557 (ADALP): Likewise.
11558 (sur): Add mappings for the above.
11559 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11560 New define_insn.
11561 (aarch64_<sur>abal<mode>_4): Likewise.
11562 (aarch64_<sur>adalp<mode>_3): Likewise.
11563 (<sur>sadv16qi): New define_expand.
11564
11565 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11566
11567 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11568 (*movdf_internal): Ditto.
11569 (*rcpsf2_sse): Ditto.
11570 (*rsqrtsf2_sse): Ditto.
11571 (*sqrt<mode>2_sse): Ditto.
11572
11573 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11574
11575 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11576 eor3q<mode>4.
11577 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11578 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11579 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11580 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11581 vbcaxq_s64): New.
11582 * config/aarch64/arm_neon.h: Likewise.
11583 * config/aarch64/iterators.md (VQ_I): New.
11584
11585 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11586
11587 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11588 arc*-*-linux*.
11589 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11590 MULTILIB_DIRNAMES
11591
11592 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11593
11594 * config/nds32/constraints.md (S): New constraint.
11595 * config/nds32/nds32.md (call_internal): Use constraint S.
11596 (call_value_internal): Likewise.
11597 (sibcall_internal): Likewise.
11598 (sibcall_value_internal): Likewise.
11599
11600 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11601 Chung-Ju Wu <jasonwucj@gmail.com>
11602
11603 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11604 into consideration.
11605
11606 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11607 Chung-Ju Wu <jasonwucj@gmail.com>
11608
11609 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11610 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11611 (nds32_rtx_costs_impl): Simplify.
11612 (nds32_address_cost_impl): Simplify.
11613 (nds32_init_rtx_costs): New function.
11614 (nds32_rtx_costs_speed_prefer): Likewise.
11615 (nds32_rtx_costs_size_prefer): Likewise.
11616 (nds32_address_cost_speed_prefer): Likewise.
11617 (nds32_address_cost_speed_fwprop): Likewise.
11618 (nds32_address_cost_size_prefer): Likewise.
11619 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11620 * config/nds32/nds32.c (nds32_option_override): Use
11621 nds32_init_rtx_costs function.
11622
11623 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11624
11625 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11626 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11627 (TARGET_PIPELINE_N8): Likewise.
11628 (TARGET_PIPELINE_N10): Likewise.
11629 (TARGET_PIPELINE_N13): Likewise.
11630 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11631
11632 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11633
11634 * config/nds32/nds32-fpu.md: Update copyright year.
11635
11636 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11637
11638 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11639
11640 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11641
11642 * config/nds32/nds32.c
11643 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11644 * config/nds32/nds32.opt (minline-asm-r15): New option.
11645
11646 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11647
11648 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11649 MASK_HW_ABS.
11650 * config/nds32/nds32.md (abssi2): New pattern.
11651
11652 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11653
11654 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11655 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11656 Merge insn pattern from sse_cvtsi2ss<round_name> and
11657 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11658 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11659 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11660 using SWI48 mode iterator.
11661 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11662 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11663 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11664 pattern from sse_cvttss2si<round_saeonly_name>
11665 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11666 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11667 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11668 using SWI48 mode iterator.
11669 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11670 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11671 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11672 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11673 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11674 using SWI48 mode iterator.
11675 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11676 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11677 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11678 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11679 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11680 SWI48 mode iterator.
11681 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11682 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11683 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11684 pattern from sse_cvttsd2si<round_saeonly_name>
11685 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11686
11687 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11688
11689 * config/nds32/nds32-md-auxiliary.c
11690 (nds32_valid_smw_lwm_base_p): Refine.
11691 (nds32_output_smw_single_word): Refine.
11692 (nds32_output_smw_double_word): New.
11693 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11694
11695 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11696
11697 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11698 (nds32_output_stack_pop): Refine.
11699 (nds32_expand_unaligned_load): Refine.
11700 (nds32_expand_unaligned_store): Refine.
11701
11702 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11703 Chung-Ju Wu <jasonwucj@gmail.com>
11704
11705 * config/nds32/constants.md: Add TP_REGNUM constant.
11706 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11707 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11708 UNSPEC_ADD32.
11709 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11710 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11711 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11712 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11713 and PIC code generation.
11714 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11715 code generation.
11716 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11717 optimization.
11718 * config/nds32/nds32.md: Support TLS and PIC.
11719 * config/nds32/nds32.c: Support TLS and PIC.
11720 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11721 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11722 predicate.
11723
11724 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11725
11726 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11727 mode with E_ prefix.
11728
11729 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11730 Chung-Ju Wu <jasonwucj@gmail.com>
11731
11732 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11733 * config/nds32/nds32-md-auxiliary.c
11734 (symbolic_reference_mentioned_p): New.
11735 (nds32_legitimize_ict_address): New.
11736 (nds32_expand_ict_move): New.
11737 (nds32_indirect_call_referenced_p): New.
11738 (nds32_symbol_binds_local_p): Delete.
11739 (nds32_long_call_p): Modify.
11740 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11741 * config/nds32/nds32-protos.h
11742 (symbolic_reference_mentioned_p): Declare.
11743 (nds32_legitimize_ict_address): Declare.
11744 (nds32_expand_ict_move): Declare.
11745 (nds32_indirect_call_referenced_p): Declare.
11746 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11747 (nds32_relax_group): Use nds32_ict_const_p as condition.
11748 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11749 (nds32_asm_file_start): Output ict_model directive in asm code.
11750 (nds32_legitimate_address_p): Consider indirect call.
11751 (nds32_print_operand): Consider indirect call.
11752 (nds32_print_operand_address): Consider indirect call.
11753 (nds32_insert_attributes): Handle "indirect_call" attribute.
11754 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11755 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11756 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11757 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11758 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11759 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11760 (TARGET_ICT_MODEL_SMALL): Define.
11761 (TARGET_ICT_MODEL_LARGE): Define.
11762 * config/nds32/nds32.md (movsi): Consider ict model.
11763 (call, call_value): Consider ict model.
11764 (sibcall, sibcall_value): Consider ict model.
11765 * config/nds32/nds32.opt (mict-model): New option.
11766 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11767 model.
11768
11769 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11770 Monk Chiang <sh.chiang04@gmail.com>
11771 Jim Wilson <jimw@sifive.com>
11772
11773 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11774 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11775 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11776 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11777 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11778 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11779 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11780 compute save_libcall_adjustment properly.
11781 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11782 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11783 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11784 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11785 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11786 (ABI_SPEC): Handle mabi=ilp32e.
11787 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11788 (RVE): Add RVE mask.
11789 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11790 <-march>: Add rv32e as an example.
11791
11792 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11793
11794 PR c++/82899
11795 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11796 (intra_create_variable_infos): Handle C++ constructors.
11797
11798 2018-05-18 Martin Liska <mliska@suse.cz>
11799
11800 * passes.def: Remove a redundant pass.
11801
11802 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11803
11804 PR bootstrap/85838
11805 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11806
11807 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11808
11809 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11810 (ARMv4): Update.
11811 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11812 (ARMv6m): Update.
11813 (armv2, armv2a, armv3, armv3m): Delete architectures.
11814 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11815 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11816 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11817 Delete cpus.
11818 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11819 (*mulsidi3adddi): Likewise.
11820 (mulsidi3): Likewise.
11821 (*mulsidi3_nov6): Likewise.
11822 (umulsidi3): Likewise.
11823 (umulsidi3_nov6): Likewise.
11824 (umaddsidi4): Likewise.
11825 (*umulsidi3adddi): Likewise.
11826 (smulsi3_highpart): Likewise.
11827 (*smulsi3_highpart_nov6): Likewise.
11828 (umulsi3_highpart): Likewise.
11829 (*umulsi3_highpart_nov6): Likewise.
11830 * config/arm/arm.h (arm_arch3m): Delete.
11831 * config/arm/arm.c (arm_arch3m): Delete.
11832 (arm_option_override_internal): Update armv3-related comment.
11833 (arm_configure_build_target): Delete use of isa_bit_mode32.
11834 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11835 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11836 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11837 (mulsa3): Likewise.
11838 (mulusa3): Likewise.
11839 * config/arm/arm-protos.h (arm_arch3m): Delete.
11840 * config/arm/arm-tables.opt: Regenerate.
11841 * config/arm/arm-tune.md: Likewise.
11842 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11843 deleted architectures.
11844
11845 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11846
11847 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11848 (armv5t, armv5te): New features.
11849 (ARMv5, ARMv5e): Delete fgroups.
11850 (ARMv5t, ARMv5te): Adjust for above changes.
11851 (ARMv6m): Likewise.
11852 (armv5, armv5e): Delete arches.
11853 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11854 arm_arch5.
11855 (*call_reg_arm): Likewise.
11856 (*call_value_reg_armv5): Likewise.
11857 (*call_value_reg_arm): Likewise.
11858 (*call_symbol): Likewise.
11859 (*call_value_symbol): Likewise.
11860 (*sibcall_insn): Likewise.
11861 (*sibcall_value_insn): Likewise.
11862 (clzsi2): Likewise.
11863 (prefetch): Likewise.
11864 (define_split and define_peephole2 dependent on arm_arch5):
11865 Likewise.
11866 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11867 arm_arch5e.
11868 (TARGET_ARM_QBIT): Likewise.
11869 (TARGET_DSP_MULTIPLY): Likewise.
11870 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11871 (arm_arch5, arm_arch5e): Delete.
11872 (arm_arch5t, arm_arch5te): Declare.
11873 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11874 (arm_arch5t): Declare.
11875 (arm_option_reconfigure_globals): Update for the above.
11876 (arm_options_perform_arch_sanity_checks): Update comment, replace
11877 use of arm_arch5 with arm_arch5t.
11878 (use_return_insn): Likewise.
11879 (arm_emit_call_insn): Likewise.
11880 (output_return_instruction): Likewise.
11881 (arm_final_prescan_insn): Likewise.
11882 (arm_coproc_builtin_available): Likewise.
11883 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11884 arm_arch5e with arm_arch5t and arm_arch5te.
11885 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11886 (arm_arch5t, arm_arch5te): Declare.
11887 * config/arm/arm-tables.opt: Regenerate.
11888 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11889 * config/arm/t-multilib: Likewise.
11890 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11891 instead of arm_arch5.
11892 (*call_reg_thumb1): Likewise.
11893 (*call_value_reg_thumb1_v5): Likewise.
11894 (*call_value_reg_thumb1): Likewise.
11895 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11896 unreachable path.
11897 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11898
11899 2018-05-18 Martin Liska <mliska@suse.cz>
11900
11901 PR gcov-profile/84846
11902 * doc/gcov.texi: Document -t option of gcov tool.
11903
11904 2018-05-18 Martin Liska <mliska@suse.cz>
11905
11906 PR gcov-profile/84846
11907 * gcov.c (print_usage): Add new -t option.
11908 (process_args): Handle the option.
11909 (generate_results): Use stdout as output when requested by
11910 the option.
11911
11912 2018-05-18 Martin Liska <mliska@suse.cz>
11913
11914 PR gcov-profile/84846
11915 * coverage.c (coverage_init): Write PWD to .gcno file.
11916 * doc/gcov.texi: Document how working directory is printed.
11917 * gcov-dump.c (dump_gcov_file): Print PWD.
11918 * gcov.c (output_intermediate_file): Likewise.
11919 (read_graph_file): Read PWD string.
11920 (output_lines): Print PWD.
11921
11922 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11923
11924 PR middle-end/85817
11925 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11926 for retval and return false if all args to phi are zero.
11927
11928 2018-05-18 Richard Biener <rguenther@suse.de>
11929
11930 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11931 method.
11932 (evrp_dom_walker::before_dom_children): Call it.
11933
11934 2018-05-18 Richard Biener <rguenther@suse.de>
11935
11936 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11937 results when processing array refs with variable index.
11938
11939 2018-05-18 Toon Moene <toon@moene.org>
11940
11941 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11942 directly after that of -floop-interchange. Indicate that both
11943 options are enabled by default when specifying -O3.
11944
11945 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11946
11947 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11948 iterator. Delete separate integer-mode vec_set<mode> expander.
11949 (aarch64_simd_vec_setv2di): Delete.
11950 (vec_setv2di): Delete.
11951 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11952 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11953 the "w, r" alternative.
11954
11955 2018-05-18 Martin Liska <mliska@suse.cz>
11956
11957 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11958 * tree-pass.h (make_pass_lower_switch_O0): New function.
11959 * tree-switch-conversion.c (node_has_low_bound): Remove.
11960 (node_has_high_bound): Likewise.
11961 (node_is_bounded): Likewise.
11962 (class pass_lower_switch): Make it a template type and create
11963 two instances.
11964 (pass_lower_switch::execute): Add template argument.
11965 (make_pass_lower_switch): New function.
11966 (make_pass_lower_switch_O0): New function.
11967 (do_jump_if_equal): Remove.
11968 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11969 all the hard work to tree optimization passes.
11970
11971 2018-05-18 Martin Liska <mliska@suse.cz>
11972
11973 * dbgcnt.c (limit_low): Renamed from limit.
11974 (limit_high): New variable.
11975 (dbg_cnt_is_enabled): Check for upper limit.
11976 (dbg_cnt): Adjust dumping.
11977 (dbg_cnt_set_limit_by_index): Add new argument for high
11978 value.
11979 (dbg_cnt_set_limit_by_name): Likewise.
11980 (dbg_cnt_process_single_pair): Parse new format.
11981 (dbg_cnt_process_opt): Use strtok.
11982 (dbg_cnt_list_all_counters): Remove 'value' and add
11983 'limit_high'.
11984 * doc/invoke.texi: Document changes.
11985
11986 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11987
11988 * doc/sourcebuild.texi (scalar_all_fma): Document.
11989 * tree.def (FMA_EXPR): Delete.
11990 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11991 * internal-fn.c (ternary_direct): New macro.
11992 (expand_ternary_optab_fn): Likewise.
11993 (direct_ternary_optab_supported_p): Likewise.
11994 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11995 * builtins.c (fold_builtin_fma): Delete.
11996 (fold_builtin_3): Don't call it.
11997 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11998 * expr.c (expand_expr_real_2): Likewise.
11999 * fold-const.c (operand_equal_p): Likewise.
12000 (fold_ternary_loc): Likewise.
12001 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12002 * gimple.c (DEFTREECODE): Likewise.
12003 * gimplify.c (gimplify_expr): Likewise.
12004 * optabs-tree.c (optab_for_tree_code): Likewise.
12005 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12006 * tree-eh.c (operation_could_trap_p): Likewise.
12007 (stmt_could_throw_1_p): Likewise.
12008 * tree-inline.c (estimate_operator_cost): Likewise.
12009 * tree-pretty-print.c (dump_generic_node): Likewise.
12010 (op_code_prio): Likewise.
12011 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12012 * tree-ssa-operands.c (get_expr_operands): Likewise.
12013 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12014 * fold-const-call.h (fold_fma): Delete.
12015 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12016 CFN_FNMA and CFN_FNMS.
12017 (fold_fma): Delete.
12018 * genmatch.c (combined_fn): New enum.
12019 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12020 (commutative_op): New function.
12021 (commutate): Use it. Handle more than 2 operands.
12022 (dt_operand::gen_gimple_expr): Use commutative_op.
12023 (parser::parse_expr): Allow :c to be used with non-binary
12024 operators if the commutative operand is known.
12025 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12026 CFN_FMS, CFN_FNMA and CFN_FNMS.
12027 (backprop::process_assign_use): Remove FMA_EXPR handling.
12028 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12029 (gen_hsa_fma): New function.
12030 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12031 IFN_FNMA and IFN_FNMS.
12032 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12033 * gimple-fold.h (follow_all_ssa_edges): Declare.
12034 * gimple-fold.c (follow_all_ssa_edges): New function.
12035 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12036 gimple_build interface and use follow_all_ssa_edges to fold the result.
12037 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12038 instead of checking for optabs directly.
12039 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12040 rather than FMA_EXPRs.
12041 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12042 call to IFN_FMA instead of an FMA_EXPR.
12043
12044 2018-05-17 Jim Wilson <jimw@sifive.com>
12045
12046 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12047 sign extended promoted subreg, and the range does not have the sign bit
12048 set, then do a sign extend.
12049
12050 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12051 test, check for sign extended subreg and/or constant operands, and
12052 do a sign extend in that case.
12053
12054 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12055
12056 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12057 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12058 Add untyped.
12059 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12060 Change logics_shift_reg to logics_shift_imm.
12061 (thunderx2t99_fp_loadpair_basic): Delete.
12062 (thunderx2t99_fp_storepair_basic): Delete.
12063 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12064 (thunderx2t99_asimd_polynomial): Delete.
12065 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12066 and neon_fp_mul_d_scalar_q.
12067 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12068 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12069 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12070 (thunderx2t99_asimd_lut): Add missing tbl types.
12071 (thunderx2t99_asimd_ext): Delete.
12072 (thunderx2t99_asimd_load1_1_mult): Delete.
12073 (thunderx2t99_asimd_load1_2_mult): Delete.
12074 (thunderx2t99_asimd_load1_ldp): New.
12075 (thunderx2t99_asimd_load1): New.
12076 (thunderx2t99_asimd_load2): Add missing *load2* types.
12077 (thunderx2t99_asimd_load3): New.
12078 (thunderx2t99_asimd_load4): New.
12079 (thunderx2t99_asimd_store1_1_mult): Delete.
12080 (thunderx2t99_asimd_store1_2_mult): Delete.
12081 (thunderx2t99_asimd_store2_mult): Delete.
12082 (thunderx2t99_asimd_store2_onelane): Delete.
12083 (thunderx2t99_asimd_store_stp): New.
12084 (thunderx2t99_asimd_store1): New.
12085 (thunderx2t99_asimd_store2): New.
12086 (thunderx2t99_asimd_store3): New.
12087 (thunderx2t99_asimd_store4): New.
12088
12089 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12090
12091 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12092 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12093
12094 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12095 Segher Boessenkool <segher@kernel.crashing.org>
12096
12097 PR target/85698
12098 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12099 operand.
12100
12101 2018-05-17 Richard Biener <rguenther@suse.de>
12102
12103 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12104 for pruning loop and prune defs feeding only already visited PHIs.
12105
12106 2018-05-17 Richard Biener <rguenther@suse.de>
12107
12108 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12109
12110 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12111 Richard Biener <rguenther@suse.de>
12112
12113 PR tree-optimization/85793
12114 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12115 for VMAT_ELEMENTWISE.
12116
12117 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12118
12119 * internal-fn.h (lookup_internal_fn): Declare
12120 * internal-fn.c (lookup_internal_fn): New function.
12121 * gimple.c (gimple_build_call_from_tree): Handle calls to
12122 internal functions.
12123 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12124 internal function names.
12125 * tree-pretty-print.c (dump_generic_node): Likewise.
12126 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12127
12128 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12129
12130 * gimple-fold.h (gimple_build): Make the function forms take
12131 combined_fn rather than built_in_function.
12132 (gimple_simplify): Likewise.
12133 * gimple-match-head.c (gimple_simplify): Likewise.
12134 * gimple-fold.c (gimple_build): Likewise.
12135 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12136 rather than gimple_build_call_internal.
12137 (get_initial_defs_for_reduction): Likewise.
12138 (vect_create_epilog_for_reduction): Likewise.
12139 (vectorizable_live_operation): Likewise.
12140
12141 2018-05-17 Martin Liska <mliska@suse.cz>
12142
12143 * gimple-ssa-sprintf.c (format_directive): Do not use
12144 space in between 'G_' and '('.
12145
12146 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12147
12148 PR target/85323
12149 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12150 even if the mask is not all ones.
12151
12152 PR target/85323
12153 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12154 vector.
12155 (ix86_gimple_fold_builtin): Likewise.
12156
12157 PR target/85323
12158 * config/i386/i386.c: Include tree-vector-builder.h.
12159 (ix86_vector_shift_count): New function.
12160 (ix86_fold_builtin): Fold shift builtins by scalar count.
12161 (ix86_gimple_fold_builtin): Likewise.
12162
12163 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12164 _mm512_setzero): New intrinsics.
12165
12166 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12167 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12168
12169 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12170 code generation for cases where splatting a value is not useful.
12171 * simplify-rtx.c (simplify_ternary_operation): Simplify
12172 vec_merge across a vec_duplicate and a paradoxical subreg forming
12173 a vector mode to a vec_concat.
12174
12175 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12176
12177 * config.gcc: Support "goldmont-plus".
12178 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12179 "goldmont-plus".
12180 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12181 PROCESSOR_GOLDMONT_PLUS.
12182 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12183 (processor_target_table): Add "goldmont-plus".
12184 (PTA_GOLDMONT_PLUS): Define.
12185 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12186 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12187 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12188 (fold_builtin_cpu): Add "goldmont-plus".
12189 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12190 (ix86_option_override_internal): Add "goldmont-plus".
12191 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12192 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12193 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12194 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12195
12196 2018-05-17 Richard Biener <rguenther@suse.de>
12197
12198 PR tree-optimization/85757
12199 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12200 remove defs that only feed that PHI from further processing.
12201
12202 2018-05-16 Jim Wilson <jimw@sifive.com>
12203
12204 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12205 asterisk to name.
12206 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12207
12208 2018-05-16 Mark Wielaard <mark@klomp.org>
12209
12210 * dwarf2out.c (count_index_strings): New function.
12211 (output_indirect_strings): Call count_index_strings and generate
12212 header for dwarf_version >= 5.
12213
12214 2018-05-16 Mark Wielaard <mark@klomp.org>
12215
12216 * dwarf2out.c (dwarf_FORM): New function.
12217 (set_indirect_string): Use dwarf_FORM.
12218 (reset_indirect_string): Likewise.
12219 (size_of_die): Likewise.
12220 (value_format): Likewise.
12221 (output_die): Likewise.
12222 (add_skeleton_AT_string): Likewise.
12223 (output_macinfo_op): Likewise.
12224 (index_string): Likewise.
12225 (output_index_string_offset): Likewise.
12226 (output_index_string): Likewise.
12227 (count_index_strings): Likewise.
12228
12229 2018-05-16 Carl Love <cel@us.ibm.com>
12230
12231 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12232 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12233
12234 2018-05-16 Martin Jambor <mjambor@suse.cz>
12235
12236 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12237 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12238
12239 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12240
12241 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12242 (fnma<mode>4): Likewise.
12243 (fms<mode>4): Likewise.
12244 (fnms<mode>4): Likewise.
12245 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12246 (aarch64_fnma<mode>4): Likewise.
12247 (aarch64_fms<mode>4): Likewise.
12248 (aarch64_fnms<mode>4): Likewise.
12249 (aarch64_fnmadd<mode>4): Likewise.
12250
12251 2018-05-16 Jason Merrill <jason@redhat.com>
12252
12253 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12254
12255 2018-05-16 Richard Biener <rguenther@suse.de>
12256
12257 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12258 (dump_stmt_cost): Declare.
12259 (add_stmt_cost): Dump cost we add.
12260 (add_stmt_costs): New function.
12261 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12262 No longer exported.
12263 (vect_analyze_stmt): Adjust prototype.
12264 (vectorizable_condition): Likewise.
12265 (vectorizable_live_operation): Likewise.
12266 (vectorizable_reduction): Likewise.
12267 (vectorizable_induction): Likewise.
12268 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12269 cost vector to pass to vectorizable_ and record afterwards.
12270 (vect_model_reduction_cost): Take cost vector argument and adjust.
12271 (vect_model_induction_cost): Likewise.
12272 (vectorizable_reduction): Likewise.
12273 (vectorizable_induction): Likewise.
12274 (vectorizable_live_operation): Likewise.
12275 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12276 SLP_TREE_NUMBER_OF_VEC_STMTS.
12277 (vect_analyze_slp_cost_1): Remove.
12278 (vect_analyze_slp_cost): Likewise.
12279 (vect_slp_analyze_node_operations): Take visited args and
12280 a target cost vector. Avoid processing already visited stmt sets.
12281 (vect_slp_analyze_operations): Use a local cost vector to gather
12282 costs and register those of non-discarded instances.
12283 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12284 (vect_schedule_slp_instance): Remove copying of
12285 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12286 zero.
12287 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12288 adding cost. Record cost entry location.
12289 (vect_prologue_cost_for_slp_op): Function to compute cost of
12290 a constant or invariant generated for SLP vect in the prologue,
12291 split out from vect_analyze_slp_cost_1.
12292 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12293 (vect_model_promotion_demotion_cost): Likewise.
12294 (vect_model_store_cost): Likewise, make static.
12295 (vect_model_load_cost): Likewise.
12296 (vectorizable_bswap): Add cost vector arg and adjust.
12297 (vectorizable_call): Likewise.
12298 (vectorizable_simd_clone_call): Likewise.
12299 (vectorizable_conversion): Likewise.
12300 (vectorizable_assignment): Likewise.
12301 (vectorizable_shift): Likewise.
12302 (vectorizable_operation): Likewise.
12303 (vectorizable_store): Likewise.
12304 (vectorizable_load): Likewise.
12305 (vectorizable_condition): Likewise.
12306 (vectorizable_comparison): Likewise.
12307 (can_vectorize_live_stmts): Likewise.
12308 (vect_analyze_stmt): Likewise.
12309 (vect_transform_stmt): Adjust calls to vectorizable_*.
12310 * tree-vectorizer.c: Include gimple-pretty-print.h.
12311 (dump_stmt_cost): New function.
12312
12313 2018-05-16 Richard Biener <rguenther@suse.de>
12314
12315 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12316 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12317 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12318 (check_name): New callback.
12319 (dse_classify_store): Track cycles via a visited bitmap of PHI
12320 defs and simplify handling of in-loop and across loop dead stores
12321 and properly fail for loop-variant refs. Handle byte-tracking with
12322 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12323 limiting the walk.
12324
12325 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12326
12327 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12328 (vect_get_mask_type_for_stmt): Likewise.
12329 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12330 split out from...
12331 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12332 to determine the statement's vector type and the vector type that
12333 should be used for calculating nunits. Deal with cases in which
12334 the type has to be deferred.
12335 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12336 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12337 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12338 (vect_determine_vf_for_stmt): New functions, split out from...
12339 (vect_determine_vectorization_factor): ...here.
12340 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12341 (vect_get_mask_type_for_stmt): New functions, split out from
12342 vect_determine_vectorization_factor.
12343
12344 2018-05-16 Richard Biener <rguenther@suse.de>
12345
12346 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12347 verify the [VEC_]COND_EXPR embedded comparison.
12348
12349 2018-05-15 Martin Sebor <msebor@redhat.com>
12350
12351 PR tree-optimization/85753
12352 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12353 RECORD_TYPE in addition to ARRAY_TYPE.
12354
12355 2018-05-15 Martin Sebor <msebor@redhat.com>
12356
12357 PR middle-end/85643
12358 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12359
12360 2018-05-15 Richard Biener <rguenther@suse.de>
12361
12362 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12363 add by_clobber_p one. Change algorithm to collect all defs
12364 representing uses we need to walk and try reducing them to
12365 a single one before failing.
12366 (dse_dom_walker::dse_optimize_stmt): Adjust.
12367
12368 2018-05-13 Mark Wielaard <mark@klomp.org>
12369
12370 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12371 (size_of_loc_descr): Likewise.
12372 (output_loc_operands): Likewise.
12373 (output_loc_operands_raw): Likewise.
12374 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12375 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12376 (hash_loc_operands): Likewise.
12377 (compare_loc_operands): Likewise.
12378
12379 2018-05-14 Mark Wielaard <mark@klomp.org>
12380
12381 * dwarf2out.c (count_index_addrs): New function.
12382 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12383
12384 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12385
12386 PR tree-optimization/83648
12387 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12388 return value as malloc candidate.
12389
12390 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12391
12392 PR ipa/85734
12393 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12394 param as true in call to suggest_attribute.
12395
12396 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12397
12398 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12399 -mreadonly-in-sdata.
12400
12401 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12402
12403 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12404 New pattern.
12405 (aarch64_crypto_aesd_fused): Likewise.
12406
12407 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12408
12409 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12410 (movsi_aarch64): Likewise.
12411 (load_pairsi): Likewise.
12412 (load_pairdi): Likewise.
12413 (store_pairsi): Likewise.
12414 (store_pairdi): Likewise.
12415 (load_pairsf): Likewise.
12416 (load_pairdf): Likewise.
12417 (store_pairsf): Likewise.
12418 (store_pairdf): Likewise.
12419 (zero_extend): Likewise.
12420 (trunc): Swap alternatives.
12421 (fcvt_target): Add '?' to prefer w over r.
12422
12423 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12424
12425 PR target/85756
12426 * config/i386/i386.md: Disallow non-commutative arithmetics in
12427 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12428 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12429 in the peephole2 before it.
12430
12431 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12432
12433 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12434 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12435 (ix86_handle_option): Handle -mcldemote.
12436 * config.gcc: New header.
12437 * config/i386/cldemoteintrin.h: New file.
12438 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12439 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12440 -mcldemote.
12441 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12442 OPTION_MASK_ISA_CLDEMOTE.
12443 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12444 (ix86_valid_target_attribute_inner_p): Ditto.
12445 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12446 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12447 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12448 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12449 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12450 (cldemote): New.
12451 * config/i386/i386.opt: Add -mcldemote.
12452 * config/i386/x86intrin.h: New header.
12453 * doc/invoke.texi: Add -mcldemote.
12454
12455 2018-05-14 Richard Biener <rguenther@suse.de>
12456
12457 * doc/match-and-simplify.texi: Adjust :s documentation.
12458
12459 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12460
12461 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12462 intended memcpy size.
12463 (REORDER_45): Likewise.
12464
12465 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12466
12467 * sort.cc: New file.
12468 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12469 * vec.c (qsort_chk): Use gcc_qsort.
12470 * Makefile.in (OBJS-libcommon): Add sort.o.
12471 (build/sort.o): New target. Use it...
12472 (BUILD_RTL): ... here, and...
12473 (build/gencfn-macros): ... here, and...
12474 (build/genmatch): ... here.
12475
12476 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12477 Chung-Ju Wu <jasonwucj@gmail.com>
12478
12479 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12480 * config/nds32/nds32-graywolf.md: New file.
12481 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12482 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12483 pipeline.
12484 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12485 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12486 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12487 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12488 * config/nds32/pipelines.md: Include n15 settings.
12489
12490 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12491 Chung-Ju Wu <jasonwucj@gmail.com>
12492
12493 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12494 * config/nds32/nds32-n13.md: New file.
12495 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12496 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12497 pipeline.
12498 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12499 * config/nds32/nds32.md (pipeline_model): Add n13.
12500 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12501 * config/nds32/pipelines.md: Include n13 settings.
12502
12503 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12504 Chung-Ju Wu <jasonwucj@gmail.com>
12505
12506 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12507 * config/nds32/nds32-n10.md: New file.
12508 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12509 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12510 pipeline.
12511 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12512 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12513 * config/nds32/nds32.md (pipeline_model): Add n10.
12514 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12515 * config/nds32/pipelines.md: Include n10 settings.
12516
12517 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12518 Kito Cheng <kito.cheng@gmail.com>
12519 Chung-Ju Wu <jasonwucj@gmail.com>
12520
12521 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12522 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12523 Add enum values for DSP extension instructions.
12524 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12525 New constraints.
12526 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12527 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12528 New code iterators.
12529 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12530 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12531 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12532 * config/nds32/nds32-intrinsic.md: Likewise.
12533 * config/nds32/nds32_intrinsic.h: Likewise.
12534 * config/nds32/nds32-md-auxiliary.c: Likewise.
12535 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12536 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12537 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12538 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12539 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12540 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12541 TYPE_DMAC in switch statement.
12542 * config/nds32/nds32.c: New checking and implementation for DSP
12543 extension instructions.
12544 * config/nds32/nds32.h: Likewise.
12545 * config/nds32/nds32.md: Likewise.
12546 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12547 * config/nds32/predicates.md: Implement new predicates for DSP
12548 extension.
12549
12550 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12551
12552 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12553 Reformat alternatives and attributes so it is easier to identify
12554 which constraints/attributes go with which instruction.
12555 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12556 (mov<mode>_softfloat32, FMOVE64): Likewise.
12557 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12558 (mov<mode>_softfloat64, FMOVE64): Likewise.
12559
12560 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12561
12562 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12563 subsection.
12564 (Basic PowerPC Built-in Functions): The new name of the
12565 subsection previously known as "PowerPC Built-in Functions".
12566 (Basic PowerPC Built-in Functions Available on all Configurations):
12567 New subsubsection.
12568 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12569 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12570 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12571 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12572
12573 2018-05-11 Martin Jambor <mjambor@suse.cz>
12574
12575 PR ipa/85655
12576 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12577 single const.
12578
12579 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12580
12581 PR target/85733
12582 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12583
12584 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12585
12586 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12587 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12588 (ix86_handle_option): Handle -mwaitpkg.
12589 * config.gcc: New header.
12590 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12591 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12592 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12593 function type.
12594 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12595 OPTION_MASK_ISA_WAITPKG.
12596 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12597 (ix86_option_override_internal): Add PTA_WAITPKG.
12598 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12599 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12600 IX86_BUILTIN_TPAUSE.
12601 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12602 __builtin_ia32_umwait and __builtin_ia32_tpause.
12603 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12604 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12605 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12606 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12607 UNSPECV_TPAUSE): New.
12608 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12609 * config/i386/i386.opt: Add -mwaitpkg.
12610 * config/i386/waitpkgintrin.h: New file.
12611 * config/i386/x86intrin.h: New header.
12612 * doc/invoke.texi: Add -mwaitpkg.
12613
12614 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12615
12616 PR target/85606
12617 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12618 equivalent.
12619 (cortex-m0): Use armv6s-m isa.
12620 (cortex-m0plus): Likewise.
12621 (cortex-m1): Likewise.
12622 (cortex-m0.small-multiply): Likewise.
12623 (cortex-m0plus.small-multiply): Likewise.
12624 (cortex-m1.small-multiply): Likewise.
12625
12626 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12627 Jakub Jelinek <jakub@redhat.com>
12628
12629 PR tree-optimization/85692
12630 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12631 source permute as well.
12632
12633 2018-05-11 Martin Liska <mliska@suse.cz>
12634
12635 PR sanitizer/85556
12636 * doc/extend.texi: Document LLVM style format for no_sanitize
12637 attribute.
12638
12639 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12640
12641 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12642 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12643 (mode_supports_vsx_dform_quad): Likewise.
12644 (mode_supports_vmx_dform): Move these functions to be next to the
12645 other mode_supports functions.
12646 (mode_supports_dq_form): Likewise.
12647 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12648 mode_supports_dq_form.
12649 (reg_offset_addressing_ok_p): Likewise.
12650 (offsettable_ok_by_alignment): Likewise.
12651 (rs6000_legitimate_offset_address_p): Likewise.
12652 (legitimate_lo_sum_address_p): Likewise.
12653 (rs6000_legitimize_address): Likewise.
12654 (rs6000_legitimize_reload_address): Likewise.
12655 (rs6000_secondary_reload_inner): Likewise.
12656 (rs6000_preferred_reload_class): Likewise.
12657 (rs6000_output_move_128bit): Likewise.
12658
12659 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12660
12661 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12662 Generate SImode target register for null target.
12663 <case IX86_BUILTIN_XGETBV>: Ditto.
12664 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12665 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12666
12667 2018-05-10 Carl Love <cel@us.ibm.com>
12668
12669 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12670 dcbtt and dcbtstt if operands[2] is 0.
12671
12672 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12673
12674 PR target/85693
12675 * config/i386/sse.md (usadv64qi): New expander.
12676
12677 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12678
12679 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12680 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12681 -maltivec=be support.
12682 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12683 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12684 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12685 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12686 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12687 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12688 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12689 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12690 altivec_vsumsws): Adjust.
12691 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12692 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12693 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12694 support.
12695 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12696 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12697 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12698 (altivec_lve<VI_char>x): Delete expand.
12699 (*altivec_lve<VI_char>x_internal): Rename to...
12700 (altivec_lve<VI_char>x): ... this.
12701 (altivec_lvxl_<mode>): Delete expand.
12702 (*altivec_lvxl_<mode>_internal): Rename to ...
12703 (altivec_lvxl_<mode>): ... this.
12704 (altivec_stvxl_<mode>): Delete expand.
12705 (*altivec_stvxl_<mode>_internal): Rename to ...
12706 (altivec_stvxl_<mode>): ... this.
12707 (altivec_stve<VI_char>x): Delete expand.
12708 (*altivec_stve<VI_char>x_internal): Rename to ...
12709 (altivec_stve<VI_char>x): ... this.
12710 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12711 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12712 reduc_plus_scal_<mode>): Adjust.
12713 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12714 comment.
12715 (rs6000_cpu_cpp_builtins): Adjust.
12716 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12717 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12718 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12719 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12720 -maltivec=be support.
12721 (rs6000_split_vec_extract_var): Adjust.
12722 (rs6000_split_v4si_init): Adjust.
12723 (swap_selector_for_mode): Delete.
12724 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12725 altivec_expand_stvex_be): Delete.
12726 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12727 -maltivec=be support.
12728 (rs6000_gimple_fold_builtin): Ditto.
12729 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12730 Adjust.
12731 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12732 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12733 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12734 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12735 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12736 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12737 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12738 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12739 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12740 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12741 anonymous split): Adjust.
12742 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12743 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12744
12745 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12746
12747 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12748 when --with-gxx-include-dir is also specified.
12749 * configure: Regenerate.
12750
12751 2018-05-09 Jim Wilson <jimw@sifive.com>
12752
12753 PR target/84797
12754 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12755 * config/riscv/t-withmultilib: New.
12756 * config/riscv/withmultilib.h: New.
12757 * doc/install.texi: Document RISC-V --with-multilib-list support.
12758
12759 2018-05-09 Richard Biener <rguenther@suse.de>
12760
12761 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12762 vector.
12763 (vect_bb_vectorization_profitable_p): Adjust. Compute
12764 actual scalar cost using the cost vector and the add_stmt_cost
12765 machinery.
12766
12767 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12768
12769 PR rtl-optimization/85645
12770 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12771 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12772
12773 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12774
12775 PR rtl-optimization/85645
12776 * shrink-wrap.c (spread_components): Return a boolean saying if
12777 anything was changed.
12778 (try_shrink_wrapping_separate): Iterate spread_components until
12779 nothing changes anymore.
12780
12781 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12782
12783 PR rtl-optimization/85645
12784 * regrename.c (build_def_use): Also kill the chains that include the
12785 destination of a REG_CFA_REGISTER note.
12786
12787 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12788
12789 PR rtl-optimization/85645
12790 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12791 insn that has a REG_CFA_REGISTER note.
12792
12793 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12794
12795 * cfgexpand.c (expand_clobber): New function.
12796 (expand_gimple_stmt_1): Use it.
12797 * tree-vect-stmts.c (vect_clobber_variable): New function,
12798 split out from...
12799 (vectorizable_simd_clone_call): ...here.
12800 (vectorizable_store): Emit a clobber either side of an
12801 IFN_STORE_LANES sequence.
12802 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12803
12804 2018-05-09 Tom de Vries <tom@codesourcery.com>
12805
12806 PR target/85626
12807 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12808 (define_insn "trap_if_false"): Add exit after trap.
12809
12810 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12811
12812 PR rtl-optimization/85638
12813 * bb-reorder.c: Include common/common-target.h.
12814 (create_forwarder_block): New function extracted from...
12815 (fix_up_crossing_landing_pad): ...here. Rename into...
12816 (dw2_fix_up_crossing_landing_pad): ...this.
12817 (sjlj_fix_up_crossing_landing_pad): New function.
12818 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12819 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12820 from both partitions and exit the loop after one iteration.
12821
12822 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12823
12824 Revert:
12825 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12826 subsection.
12827 (Basic PowerPC Built-in Functions): The new name of the
12828 subsection previously known as "PowerPC Built-in Functions".
12829 (Basic PowerPC Built-in Functions Available on all Configurations):
12830 New subsubsection.
12831 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12832 subsubsection.
12833 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12834 subsubsection.
12835 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12836 subsubsection.
12837 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12838 subsubsection.
12839
12840 2018-05-08 Jim Wilson <jimw@sifive.com>
12841
12842 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12843 (LD_EMUL_SUFFIX): New.
12844 (LINK_SPEC): Use it.
12845
12846 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12847
12848 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12849 subsection.
12850 (Basic PowerPC Built-in Functions): The new name of the
12851 subsection previously known as "PowerPC Built-in Functions".
12852 (Basic PowerPC Built-in Functions Available on all Configurations):
12853 New subsubsection.
12854 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12855 subsubsection.
12856 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12857 subsubsection.
12858 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12859 subsubsection.
12860 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12861 subsubsection.
12862
12863 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12864
12865 PR target/85683
12866 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12867 after cmpelim optimization.
12868
12869 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12870
12871 * config.gcc: Support "goldmont".
12872 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12873 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12874 PROCESSOR_GOLDMONT.
12875 * config/i386/i386.c (m_GOLDMONT): Define.
12876 (processor_target_table): Add "goldmont".
12877 (PTA_GOLDMONT): Define.
12878 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12879 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12880 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12881 (fold_builtin_cpu): Add "goldmont".
12882 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12883 (ix86_option_override_internal): Add "goldmont".
12884 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12885 (processor_type): Add PROCESSOR_GOLDMONT.
12886 * config/i386/i386.md: Add CPU "glm".
12887 * config/i386/glm.md: New file.
12888 * config/i386/x86-tune.def: Add m_GOLDMONT.
12889 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12890
12891 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12892
12893 PR target/85572
12894 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12895 E_V4DImode.
12896 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12897 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12898 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12899
12900 PR target/85317
12901 * config/i386/i386.c (ix86_fold_builtin): Handle
12902 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12903
12904 PR target/85480
12905 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12906 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12907
12908 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12909
12910 PR target/85658
12911 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12912 (check_arch): Likewise.
12913 (check_fpu): Return the result rather than printing it.
12914 (end arch): Fix operator precedence.
12915 (end cpu): Likewise.
12916 (END): Print the result from check_fpu.
12917
12918 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12919 Alan Hayward <alan.hayward@arm.com>
12920 David Sherwood <david.sherwood@arm.com>
12921
12922 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12923 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12924 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12925 (*fcmuo<mode>_and): New patterns.
12926
12927 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12928
12929 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12930 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12931 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12932 (cmp_op, sve_imm_con): New code attributes.
12933 (SVE_COND_INT_CMP, imm_con): Delete.
12934 (cmp_op): Remove above unspecs from int attribute.
12935 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12936 to...
12937 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12938 comparison-specific unspecs.
12939 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12940 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12941 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12942 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12943 (*vec_fcm<cmp_op><mode>): Rename to...
12944 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12945 (*vec_fcmuo<mode>): Rename to...
12946 (*fcmuo<mode>): ...this and adjust likewise.
12947 (*pred_fcm<cmp_op><mode>): New pattern.
12948 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12949 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12950 functions.
12951 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12952 and UNORDERED.
12953 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12954 (aarch64_emit_sve_predicated_cond): New function.
12955 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12956 (aarch64_emit_unspec_cond_or): Replace with...
12957 (aarch64_emit_sve_or_conds): ...this new function. Use
12958 aarch64_emit_sve_ptrue_op for the individual comparisons and
12959 aarch64_emit_binop to OR them together.
12960 (aarch64_emit_inverted_unspec_cond): Replace with...
12961 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12962 aarch64_emit_sve_ptrue_op for the comparison and
12963 aarch64_emit_unop to invert the result.
12964 (aarch64_expand_sve_vec_cmp_float): Update after the above
12965 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12966
12967 2018-05-07 Nathan Sidwell <nathan@acm.org>
12968
12969 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12970 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12971 (Backwards Compatibility): Likewise.
12972
12973 2018-05-07 Luis Machado <luis.machado@linaro.org>
12974
12975 PR bootstrap/85681
12976 Revert:
12977 2018-05-07 Luis Machado <luis.machado@linaro.org>
12978
12979 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12980 <prefetch_dynamic_strides>: New const bool field.
12981 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12982 prefetch_dynamic_strides.
12983 (exynosm1_prefetch_tune): Likewise.
12984 (thunderxt88_prefetch_tune): Likewise.
12985 (thunderx_prefetch_tune): Likewise.
12986 (thunderx2t99_prefetch_tune): Likewise.
12987 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12988 to false.
12989 (aarch64_override_options_internal): Update to set
12990 PARAM_PREFETCH_DYNAMIC_STRIDES.
12991 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12992 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12993 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12994 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12995 prefetch-dynamic-strides setting.
12996
12997 2018-05-07 Luis Machado <luis.machado@linaro.org>
12998
12999 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13000 <minimum_stride>: New const int field.
13001 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13002 minimum_stride field.
13003 (exynosm1_prefetch_tune): Likewise.
13004 (thunderxt88_prefetch_tune): Likewise.
13005 (thunderx_prefetch_tune): Likewise.
13006 (thunderx2t99_prefetch_tune): Likewise.
13007 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13008 (aarch64_override_options_internal): Update to set
13009 PARAM_PREFETCH_MINIMUM_STRIDE.
13010 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13011 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13012 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13013 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13014 stride is constant and is below the minimum stride threshold.
13015
13016 2018-05-07 Luis Machado <luis.machado@linaro.org>
13017
13018 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13019 to 512.
13020
13021 2018-05-07 Luis Machado <luis.machado@linaro.org>
13022
13023 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13024 <prefetch_dynamic_strides>: New const bool field.
13025 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13026 prefetch_dynamic_strides.
13027 (exynosm1_prefetch_tune): Likewise.
13028 (thunderxt88_prefetch_tune): Likewise.
13029 (thunderx_prefetch_tune): Likewise.
13030 (thunderx2t99_prefetch_tune): Likewise.
13031 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13032 to false.
13033 (aarch64_override_options_internal): Update to set
13034 PARAM_PREFETCH_DYNAMIC_STRIDES.
13035 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13036 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13037 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13038 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13039 prefetch-dynamic-strides setting.
13040
13041 2018-05-07 Luis Machado <luis.machado@linaro.org>
13042
13043 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13044 <minimum_stride>: New const int field.
13045 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13046 minimum_stride field.
13047 (exynosm1_prefetch_tune): Likewise.
13048 (thunderxt88_prefetch_tune): Likewise.
13049 (thunderx_prefetch_tune): Likewise.
13050 (thunderx2t99_prefetch_tune): Likewise.
13051 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13052 (aarch64_override_options_internal): Update to set
13053 PARAM_PREFETCH_MINIMUM_STRIDE.
13054 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13055 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13056 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13057 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13058 stride is constant and is below the minimum stride threshold.
13059
13060 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13061
13062 PR c++/85659
13063 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13064 the type is addressable. Don't force op into register if it has
13065 BLKmode.
13066
13067 2018-05-05 Roland McGrath <mcgrathr@google.com>
13068
13069 PR other/77609
13070 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13071 any section for which we don't know a specific type it should have,
13072 regardless of name. Previously this was done only for the exact
13073 names ".init_array", ".fini_array", and ".preinit_array".
13074 (default_elf_asm_named_section): Add comment about
13075 relationship with default_section_type_flags and SECTION_NOTYPE.
13076 (get_section): Don't consider it a type conflict if one side has
13077 SECTION_NOTYPE and the other doesn't, as long as neither has the
13078 SECTION_BSS et al used in the default_section_type_flags logic.
13079
13080 2018-05-05 Tom de Vries <tom@codesourcery.com>
13081
13082 PR target/85653
13083 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13084 (workaround_barsyncs): New function.
13085 (nvptx_reorg): Use workaround_barsyncs.
13086 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13087 (define_expand "nvptx_membar_cta"): New define_expand.
13088 (define_insn "*nvptx_membar_cta"): New insn.
13089
13090 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13091
13092 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13093 To improve optimization opportunities.
13094 * builtin-types.def: The new needed builtin types for the above.
13095
13096 2018-05-04 Richard Biener <rguenther@suse.de>
13097
13098 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13099 * gimple-ssa-store-merging.c
13100 (imm_store_chain_info::output_merged_store): Remove redundant create,
13101 release split_store vector contents on failure.
13102 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13103 scalar stmt vector on cache hit.
13104
13105 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13106
13107 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13108 Xilinx FP support.
13109 * config.gcc (powerpc-xilinx-eabi*): Remove.
13110 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13111 support.
13112 (fusion_addis_mem_combo_load): Ditto.
13113 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13114 FP support.
13115 (rs6000_cpu_cpp_builtins): Ditto.
13116 * config/rs6000/rs6000-linux.c
13117 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13118 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13119 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13120 support.
13121 (rs6000_setup_reg_addr_masks): Ditto.
13122 (rs6000_init_hard_regno_mode_ok): Ditto.
13123 (rs6000_option_override_internal): Ditto.
13124 (legitimate_lo_sum_address_p): Ditto.
13125 (rs6000_legitimize_address): Ditto.
13126 (rs6000_legitimize_reload_address): Ditto.
13127 (rs6000_legitimate_address_p): Ditto.
13128 (abi_v4_pass_in_fpr): Ditto.
13129 (setup_incoming_varargs): Ditto.
13130 (rs6000_gimplify_va_arg): Ditto.
13131 (rs6000_split_multireg_move): Ditto.
13132 (rs6000_savres_strategy): Ditto.
13133 (rs6000_emit_prologue_components): Ditto.
13134 (rs6000_emit_epilogue_components): Ditto.
13135 (rs6000_emit_prologue): Ditto.
13136 (rs6000_emit_epilogue): Ditto.
13137 (rs6000_elf_file_end): Ditto.
13138 (rs6000_function_value): Ditto.
13139 (rs6000_libcall_value): Ditto.
13140 * config/rs6000/rs6000.h: Ditto.
13141 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13142 (TARGET_MINMAX): ... this. New.
13143 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13144 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13145 (*movsi_internal1_single): Delete.
13146 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13147 mfpu=, mxilinx-fpu): Delete.
13148 * config/rs6000/singlefp.h: Delete.
13149 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13150 * config/rs6000/t-rs6000: Ditto.
13151 * config/rs6000/t-xilinx: Delete.
13152 * config/rs6000/titan.md: Adjust for fp_type removal.
13153 * config/rs6000/vsx.md: Remove Xilinx FP support.
13154 (VStype_simple): Delete.
13155 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13156 * config/rs6000/xfpu.h: Delete.
13157 * config/rs6000/xfpu.md: Delete.
13158 * config/rs6000/xilinx.h: Delete.
13159 * config/rs6000/xilinx.opt: Delete.
13160 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13161 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13162
13163 2018-05-04 Tom de Vries <tom@codesourcery.com>
13164
13165 PR libgomp/85639
13166 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13167 if ignore == 0.
13168
13169 2018-05-04 Richard Biener <rguenther@suse.de>
13170
13171 PR middle-end/85627
13172 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13173 (expand_complex_div_wide): Likewise.
13174 (expand_complex_operations_1): Likewise.
13175 (expand_complex_libcall): Preserve EH info of the original stmt.
13176 (tree_lower_complex): Handle removed blocks.
13177 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13178 on complex multiplication and division libcall builtins.
13179
13180 2018-05-04 Richard Biener <rguenther@suse.de>
13181
13182 PR middle-end/85574
13183 * fold-const.c (negate_expr_p): Restrict negation of operand
13184 zero of a division to when we know that can happen without
13185 overflow.
13186 (fold_negate_expr_1): Likewise.
13187
13188 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13189
13190 PR libstdc++/85466
13191 * real.h (real_nextafter): Declare.
13192 * real.c (real_nextafter): New function.
13193 * fold-const-call.c (fold_const_nextafter): New function.
13194 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13195 CASE_CFN_NEXTTOWARD.
13196 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13197 even when arg1_mode is different from arg0_mode.
13198
13199 2018-05-03 Nathan Sidwell <nathan@acm.org>
13200
13201 * doc/extend.texi (Deprecated Features): Remove
13202 -ffriend-injection.
13203 (Backwards Compatibility): Likewise.
13204 * doc/invoke.texi (C++ Language Options): Likewise.
13205 (C++ Dialect Options): Likewise.
13206
13207 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13208
13209 PR target/85530
13210 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13211 _mm512_mask_mullox_epi64): New intrinsics.
13212
13213 2018-05-03 Tom de Vries <tom@codesourcery.com>
13214
13215 PR testsuite/85106
13216 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13217 dump files): Add offload-tree.
13218
13219 2018-05-03 Richard Biener <rguenther@suse.de>
13220
13221 PR tree-optimization/85615
13222 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13223 to loops not nested in BBs loop father to avoid creating multi-entry
13224 loops.
13225
13226 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13227
13228 PR tree-optimization/70291
13229 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13230 arguments. Change return type to tree. Emit libcall as a new
13231 statement rather than replacing existing one when inplace_p is true.
13232 (expand_complex_multiplication_components): New function.
13233 (expand_complex_multiplication): Expand floating-point complex
13234 multiplication using the above.
13235 (expand_complex_division): Rename inner_type parameter to type.
13236 Update expand_complex_libcall call-site.
13237 (expand_complex_operations_1): Update expand_complex_multiplication
13238 and expand_complex_division call-sites.
13239
13240 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13241
13242 PR target/85582
13243 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13244 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13245 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13246 the highest significant bit of the shift count mask is clear. In
13247 check whether and[sq]i3 is needed verify that all significant bits
13248 of the shift count other than the highest are set.
13249
13250 2018-05-02 Tom de Vries <tom@codesourcery.com>
13251
13252 PR libgomp/82428
13253 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13254 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13255 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13256 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13257 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13258 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13259 __builtin_goacc_parlevel_size.
13260
13261 2018-05-02 Richard Biener <rguenther@suse.de>
13262
13263 PR tree-optimization/85597
13264 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13265 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13266 directly.
13267
13268 2018-05-02 Tom de Vries <tom@codesourcery.com>
13269
13270 PR testsuite/85106
13271 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13272 dump files): Add ltrans-tree.
13273
13274 2018-05-02 Tom de Vries <tom@codesourcery.com>
13275
13276 PR testsuite/85106
13277 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13278 dump files): Add wpa-ipa.
13279
13280 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13281
13282 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13283 powerpc*-*-linux*paired* target.
13284 * config/rs6000/750cl.h: Delete.
13285 * config/rs6000/paired.h: Delete.
13286 * config/rs6000/paired.md: Delete.
13287 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13288 float support.
13289 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13290 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13291 comment. Remove paired float support.
13292 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13293 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13294 VECTOR_PAIRED.
13295 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13296 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13297 declarations.
13298 * config/rs6000/rs6000.c: Remove paired float support.
13299 (paired_expand_vector_init, paired_expand_vector_move,
13300 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13301 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13302 paired_expand_builtin, paired_expand_predicate_builtin,
13303 paired_init_builtins): Delete.
13304 * config/rs6000/rs6000.h: Remove paired float support.
13305 * config/rs6000/rs6000.md: Remove paired float support.
13306 (move_from_CR_ov_bit): Delete.
13307 * config/rs6000/rs6000.opt (mpaired): Delete.
13308 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13309 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13310
13311 2018-05-02 Richard Biener <rguenther@suse.de>
13312
13313 PR middle-end/85567
13314 * gimplify.c (gimplify_save_expr): When in SSA form allow
13315 SAVE_EXPRs to compute to SSA vars.
13316
13317 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13318
13319 PR target/85582
13320 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13321 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13322 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13323 clobber operands[2], instead use a new pseudo. Formatting fixes.
13324
13325 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13326
13327 PR tree-optimization/85586
13328 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13329 exit early for statements in the same group if the accesses are
13330 not strided.
13331
13332 2018-05-02 Tom de Vries <tom@codesourcery.com>
13333
13334 PR lto/85451
13335 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13336 error message.
13337
13338 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13339
13340 PR tree-optimization/85143
13341 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13342
13343 2018-05-01 Tom de Vries <tom@codesourcery.com>
13344
13345 PR lto/85451
13346 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13347 not found" error message.
13348
13349 2018-05-01 Tom de Vries <tom@codesourcery.com>
13350
13351 PR other/83786
13352 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13353 * vec.c (test_ordered_remove_if): New function.
13354 (vec_c_tests): Call test_ordered_remove_if.
13355 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13356 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13357 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13358 VEC_ORDERED_REMOVE_IF.
13359
13360 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13361
13362 PR tree-optimization/82665
13363 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13364 pointer subtraction where arguments come from a memchr call.
13365
13366 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13367
13368 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13369 --push-state --as-needed and --pop-state instead of --as-needed and
13370 --no-as-needed if ld supports it.
13371 * configure: Regenerated.
13372
13373 PR web/85578
13374 * doc/install.texi2html: Replace _002d with - and _002a with * in
13375 generated html files using sed.
13376
13377 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13378
13379 PR c++/85523
13380 * gcc-rich-location.c (blank_line_before_p): New function.
13381 (use_new_line): New function.
13382 (gcc_rich_location::add_fixit_insert_formatted): New function.
13383 * gcc-rich-location.h
13384 (gcc_rich_location::add_fixit_insert_formatted): New function.
13385
13386 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13387
13388 * selftest.c (assert_streq): Rename "expected" and "actual" to
13389 "val1" and "val2". Extend NULL-handling to cover both inputs
13390 symmetrically, while still requiring both to be non-NULL for a pass.
13391 * selftest.h (assert_streq): Rename "expected" and "actual" to
13392 "val1" and "val2".
13393 (ASSERT_EQ): Likewise.
13394 (ASSERT_EQ_AT): Likewise.
13395 (ASSERT_KNOWN_EQ): Likewise.
13396 (ASSERT_KNOWN_EQ_AT): Likewise.
13397 (ASSERT_NE): Likewise.
13398 (ASSERT_MAYBE_NE): Likewise.
13399 (ASSERT_MAYBE_NE_AT): Likewise.
13400 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13401 the assertion to pass.
13402 (ASSERT_STREQ_AT): Likewise.
13403
13404 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13405
13406 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13407 interaction with -pie.
13408
13409 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13410
13411 * selftest.h: Fix alphabetization of per-source-file selftest
13412 declarations.
13413
13414 2018-04-30 Jason Merrill <jason@redhat.com>
13415
13416 PR c++/61982 - dead stores to destroyed objects.
13417 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13418 of clobber.
13419
13420 2018-04-30 Jason Merrill <jason@redhat.com>
13421
13422 * tree.c (build_clobber): New.
13423 * tree.h: Declare it.
13424 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13425
13426 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13427
13428 * diagnostic-show-locus.c (layout::layout): Update for
13429 location_get_source_line returning a char_span.
13430 (struct char_span): Move to input.h.
13431 (struct correction): Update for fields in char_span becoming
13432 private.
13433 (struct source_line): Update for location_get_source_line
13434 returning a char_span.
13435 (layout::print_line): Likewise.
13436 * edit-context.c (edited_file::print_content): Likewise.
13437 (edited_file::print_diff_hunk): Likewise.
13438 (edited_file::print_run_of_changed_lines): Likewise.
13439 (edited_file::get_num_lines): Likewise.
13440 (edited_line::edited_line): Likewise.
13441 * final.c (asm_show_source): Likewise.
13442 * input.c (location_get_source_line): Convert return type
13443 from const char * to char_span, losing the final "line_len"
13444 param.
13445 (dump_location_info): Update for the above.
13446 (get_substring_ranges_for_loc): Likewise. Use a char_span
13447 when handling the literal within the line.
13448 (test_reading_source_line): Update for location_get_source_line
13449 returning a char_span.
13450 * input.h (class char_span): Move here from
13451 diagnostic-show-locus.c, converting from a struct to a class.
13452 Make data members private.
13453 (char_span::operator bool): New.
13454 (char_span::length): New.
13455 (char_span::get_buffer): New.
13456 (char_span::operator[]): New.
13457 (char_span::subspan): Make const.
13458 (char_span::xstrdup): New.
13459 (location_get_source_line): Convert return type from const char *
13460 to char_span, losing the final "line_size" param.
13461
13462 2018-04-30 Jan Hubicka <jh@suse.cz>
13463
13464 * lto-wrapper.c (ltrans_priorities): New static var.
13465 (cmp_priority): New.
13466 (run_gcc): Read priorities and if doing parallel build order
13467 the Makefile by them.
13468
13469 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13470
13471 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13472
13473 2018-04-30 Richard Biener <rguenther@suse.de>
13474
13475 * tree-cfg.c (verify_address): Remove base argument, add
13476 flag whether to check TREE_ADDRESSABLE and do that.
13477 (verify_expr): Remove.
13478 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13479 (verify_gimple_assign_single): Likewise.
13480 (verify_gimple_switch): Likewise.
13481 (verify_expr_location_1): Dereference tp once. Add (disabled)
13482 piece from verify_expr.
13483 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13484
13485 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13486
13487 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13488
13489 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13490
13491 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13492 (small_data_pattern): Likewise.
13493 (arc_rewrite_small_data): Likewise.
13494 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13495 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13496 (get_symbol_alignment): New function.
13497 (legitimate_small_data_address_p): Likewise.
13498 (legitimate_scaled_address): Update, call
13499 legitimate_small_data_address_p.
13500 (output_sdata): New static variable.
13501 (arc_print_operand): Update how we handle small data operands.
13502 (arc_print_operand_address): Likewise.
13503 (arc_legitimate_address_p): Update, use
13504 legitimate_small_data_address_p.
13505 (arc_rewrite_small_data_p): Remove.
13506 (arc_rewrite_small_data_1): Likewise.
13507 (arc_rewrite_small_data): Likewise.
13508 (small_data_pattern): Likewise.
13509 (compact_sda_memory_operand): Update to use
13510 legitimate_small_data_address_p and get_symbol_alignment.
13511 (prepare_move_operands): Don't rewite sdata pattern.
13512 (prepare_extend_operands): Remove.
13513 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13514 pattern.
13515 (zero_extendqisi2): Likewise.
13516 (zero_extendhisi2): Likewise.
13517 (extendqihi2): Likewise.
13518 (extendqisi2): Likewise.
13519 (extendhisi2): Likewise.
13520 (addsi3): Likewise.
13521 (subsi3): Likewise.
13522 (andsi3): Likewise.
13523 * config/arc/constraints.md (Usd): Change it to memory constraint.
13524
13525 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13526
13527 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13528 as source of std instructions.
13529 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13530 allow 6-bit constants as source for store instructions.
13531 (movdi_insn): Update instruction pattern to allow 6-bit constants
13532 as source for store instructions.
13533
13534 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13535
13536 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13537
13538 2018-04-30 Nathan Sidwell <nathan@acm.org>
13539 Sandra Loosemore <sandra@codesourcery.com>
13540
13541 * dumpfile.c (dump_open): Allow '-' for stdout.
13542 * doc/invoke.texi (Developer Options): Document dump filename
13543 determination early. Document stdin/stdout selection.
13544
13545 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13546
13547 Microblaze Target: PIC data text relative
13548
13549 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13550 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13551 Add declaration.
13552 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13553 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13554 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13555 New addressing mode for data-text relative position indepenedent code.
13556 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13557 'ADDRESS_SYMBOLIC_TXT_REL'.
13558 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13559 (microblaze_legitimate_pic_operand): Exclude function calls from
13560 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13561 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13562 addresses cases.
13563 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13564 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13565 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13566 for 'address + offset'.
13567 (microblaze_expand_prologue): Add new function prologue call for
13568 'r20' assignation.
13569 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13570 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13571 table in case of TARGET_PIC_DATA_TEXT_REL.
13572 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13573 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13574 Add new macros 'UNSPEC_TEXT',
13575 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13576 + exclude function calls from 'UNSPEC_PLT' in case of data text
13577 relative mode.
13578 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13579 new target hook for generating address diff vector tables in case of
13580 flag_pic.
13581 * doc/tm.texi : Regenerate.
13582 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13583 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13584 of addr diff vector generation.
13585 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13586 target hook definition.
13587 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13588 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13589 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13590 option for data text relative.
13591
13592 2018-04-30 Richard Biener <rguenther@suse.de>
13593
13594 * tree-chrec.h (evolution_function_is_constant_p): Remove
13595 redundant check.
13596 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13597
13598 2018-04-30 Richard Biener <rguenther@suse.de>
13599
13600 PR bootstrap/85571
13601 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13602
13603 2018-04-30 Richard Biener <rguenther@suse.de>
13604
13605 PR tree-optimization/28364
13606 PR tree-optimization/85275
13607 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13608 copying first exit test.
13609
13610 2018-04-28 Mark Wielaard <mark@klomp.org>
13611
13612 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13613 dwarf_version >= 5.
13614 (dwarf_AT): Handle DW_AT_addr_base.
13615 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13616
13617 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13618
13619 PR target/84431
13620 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13621 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13622 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13623 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13624
13625 2018-04-28 Richard Biener <rguenther@suse.de>
13626
13627 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13628 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13629 to reflect use. Only add interesting stmts.
13630
13631 2018-04-27 Martin Jambor <mjambor@suse.cz>
13632
13633 PR ipa/85549
13634 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13635 the jump function allows for passing through aggregate values.
13636
13637 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13638
13639 * input.h (in_system_header_at): Convert from macro to inline
13640 function.
13641 (from_macro_expansion_at): Likewise.
13642 (from_macro_definition_at): Likewise.
13643
13644 2018-04-27 Jeff Law <law@redhat.com>
13645
13646 * config.gcc: Mark tile* targets as deprecated/obsolete.
13647
13648 2018-04-27 Richard Biener <rguenther@suse.de>
13649
13650 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13651 fix for ILP32.
13652
13653 2018-04-27 Richard Biener <rguenther@suse.de>
13654
13655 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13656
13657 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13658
13659 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13660 with Yd constraint. Set "preferred_for_speed" attribute from
13661 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13662 with Yd constraint.
13663 (*movdi_internal): Ditto.
13664 (movti_interunit splitters): Remove
13665 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13666 (movdi_interunit splitters): Ditto.
13667 * config/i386/constraints.md (Ye): Remove.
13668 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13669
13670 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13671
13672 PR target/85512
13673 * config/aarch64/constraints.md (Usg): Limit to 31.
13674 (Usj): Limit to 63.
13675
13676 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13677
13678 PR tree-optimization/85529
13679 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13680 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13681 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13682 zero extension or masking of the MSB bit.
13683 (optimize_range_tests): Add FIRST_BB argument, pass it through
13684 to optimize_range_tests_var_bound.
13685 (maybe_optimize_range_tests, reassociate_bb): Adjust
13686 optimize_range_tests callers.
13687
13688 2018-04-26 Richard Biener <rguenther@suse.de>
13689 Jakub Jelinek <jakub@redhat.com>
13690
13691 * cgraph.h (symbol_table): Just declare debug method here.
13692 * symtab.c (symbol_table::debug): Define.
13693
13694 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13695
13696 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13697
13698 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13699
13700 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13701 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13702 (*movdi_internal): Substitute Yi and Yj constraint with x
13703 and Ym and Yn constraint with y constraint. Update "isa"
13704 attribute and set "preferred_for_speed" attribute from
13705 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13706 (*movsi_internal): Ditto.
13707 (*movdf_internal): Ditto.
13708 (*movsf_internal): Ditto.
13709 (*zero_extendsidi2): Ditto.
13710 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13711 (sse2_loadld): Ditto.
13712 (*vec_extract<ssevecmodelower>_0): Ditto.
13713 (*vec_extractv4si_0_zext_sse4): Ditto.
13714 (vec_concatv2di): Ditto.
13715 (*vec_dup<mode>): Ditto.
13716 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13717 * config/i386/constraints.md (Yi): Remove.
13718 (Yj): Remove.
13719 (Ym): Remove.
13720 (Yn): Remove.
13721
13722 2018-04-26 Nathan Sidwell <nathan@acm.org>
13723
13724 * dumpfile.c (dump_open): New.
13725 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13726 (dump_finish): Detect stdio/stderr by value not name.
13727
13728 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13729
13730 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13731
13732 2018-04-26 Tom de Vries <tom@codesourcery.com>
13733
13734 PR target/84952
13735 * config/nvptx/nvptx.c (verify_neutering_jumps)
13736 (verify_neutering_labels): New function
13737 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13738
13739 2018-04-26 Tom de Vries <tom@codesourcery.com>
13740
13741 PR target/84025
13742 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13743 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13744 need neutering.
13745
13746 2018-04-26 Richard Biener <rguenther@suse.de>
13747 Tom de Vries <tom@codesourcery.com>
13748
13749 PR lto/85422
13750 * lto-streamer-out.c (output_function): Fixup loops if required to match
13751 discovery done in the reader.
13752
13753 2018-04-26 Richard Biener <rguenther@suse.de>
13754
13755 PR tree-optimization/85116
13756 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13757 have a loop exit from the single latch predecessor. Remove
13758 case of header with just condition.
13759 (ch_base::copy_headers): Exclude infinite loops from any
13760 processing.
13761 (pass_ch::execute): Record exits.
13762
13763 2018-04-26 Richard Biener <rguenther@suse.de>
13764
13765 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13766 prologue cost vector and pass it to vect_get_load_cost.
13767 (vect_get_peeling_costs_all_drs): Likewise.
13768 (vect_peeling_hash_get_lowest_cost): Likewise.
13769 (vect_enhance_data_refs_alignment): Likewise.
13770
13771 2018-04-26 Richard Biener <rguenther@suse.de>
13772
13773 PR middle-end/85450
13774 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13775 checking of integer<->pointer conversions.
13776 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13777 sign-/zero-extending pointer types.
13778 (expand_omp_for_static_chunk): Likewise.
13779
13780 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13781 Jean Lee <xiaoyur347@gmail.com>
13782
13783 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13784 (TARGET_ASAN_SHADOW_OFFSET): Define.
13785 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13786 true for -fsanitize=address.
13787
13788 2018-04-25 Mark Wielaard <mark@klomp.org>
13789
13790 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13791 shorter ones.
13792
13793 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13794
13795 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13796 than "alu", remove explicit "memory" and "imm_disp" attributes.
13797 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13798
13799 PR middle-end/85414
13800 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13801 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13802 gen_lowpart_no_emit.
13803
13804 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13805
13806 PR target/85473
13807 * config/i386/i386.c (ix86_expand_builtin): Change memory
13808 operand to XI, extend p0 to Pmode.
13809 * config/i386/i386.md: Change unspec volatile and operand
13810 1 mode to XI, change operand 0 mode to P.
13811
13812 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13813
13814 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13815 GET_MODE_MASK before any checking.
13816 (nds32_can_use_bset_p): Likewise.
13817 (nds32_can_use_btgl_p): Likewise.
13818
13819 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13820
13821 * config/nds32/nds32-doubleword.md: New define_split pattern for
13822 illegal register number.
13823
13824 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13825
13826 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13827
13828 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13829
13830 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13831
13832 2018-04-25 Richard Biener <rguenther@suse.de>
13833
13834 * lto-streamer.h (LTO_major_version): Bump to 8.
13835
13836 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13837
13838 * BASE-VER: Set to 9.0.0.
13839
13840 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13841
13842 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13843 in __abskf2 and __powikf2.
13844
13845 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13846
13847 PR target/85512
13848 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13849 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13850 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13851 Use the above on operand 2. Reindent.
13852 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13853
13854 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13855
13856 PR target/85485
13857 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13858 handle OPT_mcet.
13859 * config/i386/i386.opt (mcet): Removed.
13860 * doc/install.texi: Remove -mcet documentation.
13861 * doc/invoke.texi: Likewise.
13862
13863 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13864
13865 PR target/85485
13866 * doc/install.texi: Remove -mcet from bootstrap-cet.
13867
13868 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13869
13870 PR target/85511
13871 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13872 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13873 if TARGET_64BIT.
13874
13875 PR target/85503
13876 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13877 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13878 containing a CONST_VECTOR.
13879
13880 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13881
13882 * doc/install.texi: Update newlib dependency for nvptx.
13883
13884 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13885
13886 PR target/85508
13887 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13888 instead of INTVAL when shifting x left.
13889
13890 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13891
13892 PR tree-optimization/85478
13893 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13894 vect_grouped_store_supported for single element vectors.
13895
13896 2018-04-24 Richard Biener <rguenther@suse.de>
13897
13898 PR target/85491
13899 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13900 load cost increase to the case of non-constant step.
13901
13902 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13903
13904 PR target/84828
13905 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13906 destination if any_malformed_asm.
13907
13908 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13909
13910 PR middle-end/85496
13911 * expr.c (store_field): In the bitfield case, if the value comes from
13912 a function call and is returned in registers by means of a PARALLEL,
13913 do not change the mode of the temporary unless BLKmode and VOIDmode.
13914
13915 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13916
13917 PR rtl-optimization/85423
13918 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13919 dependencies to debug insns when the previous insn is non-debug.
13920
13921 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13922
13923 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13924 enums into a single definition.
13925 (fls): Fix predicates and printing.
13926 (seti): Likewise.
13927
13928 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13929
13930 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13931 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13932 and short u6 immediate.
13933 (check_if_valid_sleep_operand): Remove.
13934 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13935
13936 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13937
13938 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13939 flag_always_save_lp condition.
13940 * config/nds32/nds32.opt (malways-save-lp): New option.
13941
13942 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13943
13944 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13945 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13946 * config/nds32/nds32.h
13947 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13948 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13949
13950 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13951
13952 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13953 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13954
13955 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13956 Chung-Ju Wu <jasonwucj@gmail.com>
13957
13958 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13959 Declare.
13960 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13961 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13962
13963 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13964
13965 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13966
13967 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13968
13969 * config/nds32/nds32-protos.h (nds32_data_alignment,
13970 nds32_local_alignment): Declare.
13971 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13972 nds32_local_alignment): New functions.
13973 (TARGET_CONSTANT_ALIGNMENT): Define.
13974 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13975
13976 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13977
13978 * config/nds32/nds32.c
13979 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13980 (TARGET_MODES_TIEABLE_P): Likewise.
13981
13982 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13983
13984 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13985 level Ofast and Og.
13986
13987 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13988 Chung-Ju Wu <jasonwucj@gmail.com>
13989
13990 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13991 for unaligned access.
13992 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13993 unaligned access.
13994 * config/nds32/nds32-intrinsic.md: Likewise.
13995 * config/nds32/nds32_intrinsic.h: Likewise.
13996 * config/nds32/nds32.h (nds32_builtins): Likewise.
13997 * config/nds32/nds32.opt (munaligned-access): New option.
13998 * config/nds32/nds32.c (nds32_asm_file_start): Display
13999 flag_unaligned_access status.
14000
14001 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14002
14003 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14004 -mno-relax is present.
14005 * config/riscv/linux.h (LINK_SPEC): Ditto.
14006
14007 2018-04-20 Martin Sebor <msebor@redhat.com>
14008
14009 PR c/85365
14010 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14011 for null pointers.
14012 (gimple_fold_builtin_stxcpy_chk): Same.
14013 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14014
14015 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14016
14017 PR target/85456
14018 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14019 __powikf2 when long double is IEEE 128-bit.
14020
14021 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14022
14023 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14024 step to make sure stack always aligned.
14025
14026 2018-04-20 Carl Love <cel@us.ibm.com>
14027
14028 PR target/83402
14029 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14030 size check for arg0.
14031
14032 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14033 Tom de Vries <tom@codesourcery.com>
14034
14035 PR target/85445
14036 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14037 Emit insns for calls too.
14038 (nvptx_find_par): Always look for worker-level predecessor insn.
14039 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14040 calls.
14041 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14042 (nvptx_process_pars): Propagate frames for calls.
14043
14044 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14045
14046 PR target/85469
14047 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14048 Removed.
14049 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14050 (ix86_handle_option): Don't handle OPT_mibt.
14051 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14052 __SHSTK__.
14053 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14054 has_ibt and ibt.
14055 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14056 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14057 (ix86_target_macros): Define __CET__ with flag_cf_protection
14058 for -fcf-protection.
14059 * config/i386/i386.c (isa2_opts): Remove -mibt.
14060 * config/i386/i386.h (TARGET_IBT): Removed.
14061 (TARGET_IBT_P): Likewise.
14062 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14063 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14064 * config/i386/i386.opt (mcet): Update help message.
14065 (mshstk): Likewise.
14066 (mibt): Removed.
14067 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14068 -mcet as an alias for -mshstk.
14069
14070 2018-04-20 Richard Biener <rguenther@suse.de>
14071
14072 PR middle-end/85475
14073 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14074 complexity by forcing a single use of the multiply operand.
14075
14076 2018-04-20 Martin Jambor <mjambor@suse.cz>
14077
14078 ipa/85449
14079 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14080 recursion dependency to only apply to non-clones.
14081
14082 2018-04-20 Martin Jambor <mjambor@suse.cz>
14083
14084 ipa/85447
14085 * ipa-cp.c (create_specialized_node): Check that clones of
14086 self-recursive edges exist during IPA-CP.
14087
14088 2018-04-19 Toon Moene <toon@moene.org>
14089
14090 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14091 by -O3.
14092
14093 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14094
14095 PR tree-optimization/85467
14096 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14097 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14098 VECTOR_CST element to type.
14099
14100 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14101
14102 PR target/85397
14103 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14104 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14105 (builtin_longjmp): Likewise.
14106 (save_stack_nonlocal): New pattern.
14107 (restore_stack_nonlocal): Likewise.
14108
14109 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14110
14111 PR target/85404
14112 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14113 Replace ASM_OUTPUT_LABEL with fprintf.
14114
14115 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14116
14117 PR target/85417
14118 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14119 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14120 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14121 define __IBT__ and __SHSTK__ for -fcf-protection.
14122 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14123 TARGET_IBT.
14124 (ix86_trampoline_init): Likewise.
14125 (x86_output_mi_thunk): Likewise.
14126 (ix86_notrack_prefixed_insn_p): Likewise.
14127 (ix86_option_override_internal): Don't disallow -fcf-protection.
14128 * config/i386/i386.md (rdssp<mode>): Also enable for
14129 -fcf-protection.
14130 (incssp<mode>): Likewise.
14131 (nop_endbr): Likewise.
14132 * config/i386/i386.opt (mcet): Change help message to built-in
14133 functions only.
14134 (mibt): Likewise.
14135 (mshstk): Likewise.
14136 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14137 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14138 enable CET built-in functions.
14139
14140 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14141
14142 * common/config/i386/i386-common.c
14143 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14144 OPTION_MASK_ISA_MOVDIRI_UNSET,
14145 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14146 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14147 * config.gcc (movdirintrin.h): New header.
14148 * config/i386/cpuid.h (bit_MOVDIRI,
14149 bit_MOVDIR64B): New bits.
14150 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14151 and -mmvodir64b.
14152 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14153 (VOID, PVOID, PCVOID)): New function types.
14154 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14155 __builtin_ia32_directstoreu_u64,
14156 __builtin_ia32_movdir64b): New builtins.
14157 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14158 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14159 and -mmovdiri.
14160 (ix86_valid_target_attribute_inner_p): Ditto.
14161 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14162 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14163 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14164 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14165 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14166 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14167 (movdiri<mode>, movdir64b_<mode>): New.
14168 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14169 * config/i386/immintrin.h: Include movdirintrin.h.
14170 * config/i386/movdirintrin.h: New file.
14171 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14172
14173 2018-04-19 Richard Biener <rguenther@suse.de>
14174
14175 PR middle-end/85455
14176 * cfg.c (clear_bb_flags): When loop state says we have
14177 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14178
14179 2018-04-19 Richard Biener <rguenther@suse.de>
14180
14181 PR tree-optimization/84737
14182 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14183 copying restrict info.
14184 (vect_setup_realignment): Use it.
14185 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14186 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14187 the first DR to all generated stores.
14188 (vectorizable_load): Likewise for loads.
14189
14190 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14191
14192 PR tree-optimization/85446
14193 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14194 the integral and pointer types to have the same precision.
14195
14196 * doc/install.texi: Document --disable-cet being the default and
14197 --enable-cet=auto.
14198
14199 2018-04-18 Martin Liska <mliska@suse.cz>
14200
14201 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14202 style.
14203
14204 2018-04-18 Martin Liska <mliska@suse.cz>
14205
14206 Revert
14207 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14208
14209 PR ipa/83983
14210 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14211 arguments if they are comparable.
14212
14213 2018-04-18 Martin Liska <mliska@suse.cz>
14214
14215 Revert
14216 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14217
14218 PR lto/84805
14219 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14220 incomplete types.
14221
14222 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14223
14224 PR target/85388
14225 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14226 ENDBR after calling __morestack.
14227
14228 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14229
14230 PR jit/85384
14231 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14232 by using gcc_base_ver to generate a gcc_driver_version, and use
14233 it when generating GCC_DRIVER_NAME.
14234 * configure: Regenerate.
14235
14236 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14237
14238 PR target/81084
14239 * config.gcc: Obsolete powerpc*-*-*spe*.
14240
14241 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14242
14243 PR debug/84637
14244 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14245 (stabstr_D): Change type of unum from unsigned int to
14246 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14247 type.
14248
14249 2018-04-17 Jim Wilson <jimw@sifive.com>
14250
14251 PR 84856
14252 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14253 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14254 Set arg_pointer_offset after using pretend_args_size.
14255
14256 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14257
14258 PR rtl-optimization/85431
14259 * dse.c (record_store): Ignore zero width stores.
14260
14261 PR sanitizer/85230
14262 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14263 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14264 __builtin_stack_restore rather than after it.
14265 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14266 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14267 argument instead of virtual_dynamic_stack_rtx.
14268
14269 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14270
14271 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14272 New prototype.
14273 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14274 Add note to error message to explain internal mapping of overloaded
14275 built-in function name to non-overloaded built-in function name.
14276 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14277 function.
14278
14279 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14280
14281 PR target/85424
14282 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14283 where the inputs overlap with the output.
14284
14285 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14286
14287 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14288 (=v, v) alternative and explicit "memory" attribute.
14289 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14290 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14291 attributes.
14292 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14293 "sselog1" type instead of "sselog".
14294 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14295 "sselog". Remove explicit "memory" attribute.
14296 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14297 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14298 attributes.
14299 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14300 "sselog1" type instead of "sselog". Remove explicit "memory"
14301 attribute.
14302 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14303 use "sselog1" type instead of "sselog". Remove explicit "memory"
14304 attribute.
14305 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14306 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14307 attributes.
14308 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14309 "sselog1" type instead of "sselog". Remove explicit "memory"
14310 attribute.
14311 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14312 use "sselog1" type instead of "sselog". Remove explicit "memory"
14313 attribute.
14314
14315 PR target/85430
14316 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14317
14318 PR middle-end/85414
14319 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14320 on a SUBREG.
14321
14322 2018-04-17 Martin Jambor <mjambor@suse.cz>
14323
14324 PR ipa/85421
14325 * ipa-cp.c (create_specialized_node): Call
14326 expand_all_artificial_thunks if necessary.
14327
14328 2018-04-17 Martin Liska <mliska@suse.cz>
14329
14330 PR lto/85405
14331 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14332 in message, remote space in between '_G' and '('.
14333
14334 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14335
14336 PR target/85281
14337 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14338 avx512f_vmcmp<mode>3<round_saeonly_name>,
14339 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14340 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14341 avx512f_rndscale<mode><round_saeonly_name>,
14342 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14343 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14344 Use %<iptr>2 instead of %2 for -masm=intel.
14345 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14346 avx512f_vcvttss2usi<round_saeonly_name>,
14347 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14348 -masm=intel.
14349 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14350 avx512f_vcvttsd2usi<round_saeonly_name>,
14351 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14352 Use %q1 instead of %1 for -masm=intel.
14353 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14354 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14355 of %3 for -masm=intel.
14356 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14357 -masm=intel.
14358 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14359 -masm=intel.
14360 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14361 -masm=intel.
14362 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14363 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14364 %g1.
14365 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14366 -masm=intel.
14367 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14368 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14369 %g1 and one with %0 and %1.
14370 (avx512er_vmrcp28<mode><round_saeonly_name>,
14371 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14372 %1 for -masm=intel.
14373 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14374 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14375 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14376 of %0 and %{%4%} for -masm=intel.
14377 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14378 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14379 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14380 order of %0 and %{%5%}%{z%} for -masm=intel.
14381
14382 2018-04-17 Jan Hubicka <jh@suse.cz>
14383
14384 PR lto/85405
14385 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14386
14387 2018-04-17 Martin Liska <mliska@suse.cz>
14388
14389 PR ipa/85329
14390 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14391 for target_clone error message. Make default implementation
14392 clone to be a local declaration.
14393 (separate_attrs): Add new argument and check for an empty
14394 string.
14395 (expand_target_clones): Handle it.
14396 (ipa_target_clone): Make redirection just for target_clones
14397 functions.
14398
14399 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14400 Tom de Vries <tom@codesourcery.com>
14401
14402 PR middle-end/84955
14403 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14404 tiled basic blocks without omp continue statements.
14405
14406 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14407
14408 PR target/83660
14409 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14410 vec_extract expression as having side effects to make sure it gets
14411 a cleanup point.
14412
14413 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14414
14415 PR target/85403
14416 * config/i386/i386.c (get_builtin_code_for_version): Check
14417 error_mark_node.
14418
14419 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14420
14421 PR target/84331
14422 * config.gcc: Support "skylake".
14423 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14424 PROCESSOR_SKYLAKE.
14425 * config/i386/i386.c (m_SKYLAKE): Define.
14426 (processor_target_table): Add "skylake".
14427 (ix86_option_override_internal): Add "skylake".
14428 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14429 PROCESSOR_CANNONLAKE.
14430 (get_builtin_code_for_version): Fix priority for
14431 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14432 PROCESSOR_SKYLAKE-AVX512.
14433 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14434 (processor_type): Add PROCESSOR_SKYLAKE.
14435
14436 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14437 Jason Merrill <jason@redhat.com>
14438
14439 PR c++/85112
14440 * convert.c (convert_to_integer_1): Use direct recursion for
14441 enumeral types and types with a precision less than the number
14442 of bits in their mode.
14443
14444 2018-04-16 Julia Koval <julia.koval@intel.com>
14445
14446 PR target/84413
14447 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14448 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14449
14450 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14451
14452 PR target/85293
14453 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14454 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14455 and -mno-direct-move.
14456
14457 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14458
14459 PR target/83402
14460 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14461 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14462 Ensure negative shifts result in {0}.
14463
14464 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14465
14466 PR rtl-optimization/79916
14467 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14468 regs (if any) to define how to gnerate SD moves when LRA is in
14469 progress.
14470
14471 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14472
14473 PR rtl-optimization/85393
14474 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14475 * except.c (expand_dw2_landing_pad_for_region): Make static.
14476 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14477 a label and unconditional jump to old_bb, rather than
14478 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14479 basic block.
14480
14481 PR rtl-optimization/85376
14482 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14483 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14484 instead of a specific value.
14485
14486 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14487 Bin Cheng <bin.cheng@arm.com>
14488
14489 PR tree-optimization/82965
14490 PR tree-optimization/83991
14491 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14492 by_profile_only parameter.
14493 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14494 information if the loop was predicted to iterate too many times.
14495 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14496
14497 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14498
14499 PR lto/71991
14500 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14501 always inline.
14502
14503 2018-04-13 Martin Liska <mliska@suse.cz>
14504 Jakub Jelinek <jakub@redhat.com>
14505
14506 PR middle-end/81657
14507 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14508 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14509 * builtins.c (expand_builtin_memory_copy_args): Use
14510 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14511 handle dest_addr == pc_rtx.
14512
14513 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14514
14515 PR target/85291
14516 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14517 asked to not generate direct moves.
14518 (fix_trunc<mode>si2_stfiwx): Similar.
14519 (fix_trunc<mode>si2_internal): Similar.
14520
14521 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14522
14523 PR debug/83157
14524 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14525 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14526 lookup if dest in some wider mode is known to be const0_rtx and
14527 if so, record permanent equivalence for it to be ZERO_EXTEND of
14528 the narrower mode destination.
14529
14530 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14531
14532 * lto-streamer-out.c (output_function): Revert 259346.
14533 * omp-expand.c (expand_oacc_for): Likewise.
14534
14535 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14536
14537 PR rtl-optimization/85354
14538 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14539 * sel-sched.c (sel_global_init): ... here.
14540
14541 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14542
14543 PR target/85238
14544 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14545 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14546 mode for PE-COFF targets.
14547 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14548 (i386_pe_asm_lto_end): Likewise.
14549 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14550 (TARGET_ASM_LTO_END): Likewise.
14551 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14552 (i386_pe_asm_lto_start): New function.
14553 (i386_pe_asm_lto_end): Likewise.
14554
14555 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14556 Richard Biener <rguenther@suse.de>
14557
14558 PR middle-end/84955
14559 * lto-streamer-out.c (output_function): Fix CFG loop state before
14560 streaming out.
14561 * omp-expand.c (expand_oacc_for): Handle calls to internal
14562 functions like regular functions.
14563
14564 2018-04-12 Richard Biener <rguenther@suse.de>
14565
14566 PR lto/85371
14567 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14568 for the early LTO debug to properly generate references to it
14569 during DIE emission. Do not re-use that for the skeleton for
14570 split-dwarf.
14571 (dwarf2out_early_finish): Likewise.
14572
14573 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14574
14575 PR target/85328
14576 * config/i386/sse.md
14577 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14578 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14579 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14580 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14581 and output is a reg, avoid creating invalid lowpart subreg, but
14582 instead split into a 512-bit move. Don't split if not AVX512VL,
14583 input is xmm16+ reg and output is a mem.
14584 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14585 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14586 xmm16+ reg and output is a mem.
14587
14588 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14589
14590 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14591 also for flag_dwarf2_cfi_asm.
14592
14593 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14594
14595 PR rtl-optimization/85342
14596 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14597 a bool scalar var inside of the loop instead. Don't try to update
14598 recog_data.operand after failed apply_change_group.
14599
14600 2018-04-12 Tom de Vries <tom@codesourcery.com>
14601
14602 PR target/85296
14603 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14604 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14605 array with flexible array member as array without given dimension.
14606 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14607 argument for undefined param to true.
14608
14609 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14610
14611 PR target/85321
14612 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14613 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14614 from PowerPC section.
14615 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14616 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14617 help text that is too long.
14618 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14619 help text that is too long.
14620 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14621 help text that is too long.
14622
14623 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14624
14625 * config/alpha/alpha.md (stack_probe_internal): Rename
14626 from "probe_stack". Update all callers.
14627
14628 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14629
14630 PR rtl-optimization/84566
14631 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14632 sched_macro_fuse_insns.
14633
14634 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14635
14636 PR target/84301
14637 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14638 (compute_block_dependences): ... from here.
14639
14640 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14641
14642 PR tree-optimization/85331
14643 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14644 from int to HOST_WIDE_INT.
14645
14646 2018-04-11 Martin Jambor <mjambor@suse.cz>
14647
14648 PR ipa/84149
14649 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14650 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14651 not the same as the source val.
14652 (cgraph_edge_brings_value_p): New parameter.
14653 (gather_edges_for_value): Pass destination value to
14654 cgraph_edge_brings_value_p.
14655 (perhaps_add_new_callers): Likewise.
14656 (get_info_about_necessary_edges): Likewise and exclude values brought
14657 only by self-recursive edges.
14658 (create_specialized_node): Redirect only clones of self-calling edges.
14659 (+self_recursive_pass_through_p): New function.
14660 (find_more_scalar_values_for_callers_subset): Use it.
14661 (find_aggregate_values_for_callers_subset): Likewise.
14662 (known_aggs_to_agg_replacement_list): Removed.
14663 (decide_whether_version_node): Re-calculate known constants for all
14664 remaining context clones.
14665
14666 2018-04-11 Richard Biener <rguenther@suse.de>
14667
14668 PR lto/85339
14669 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14670 from early DWARF output.
14671 (dwarf2out_early_finish): Output line info unconditionally into
14672 early DWARF and add reference to it.
14673
14674 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14675
14676 PR target/85281
14677 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14678 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14679 other than V2DFmode using iptr mode attribute.
14680 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14681
14682 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14683
14684 PR rtl-optimization/84659
14685 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14686
14687 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14688
14689 PR debug/85302
14690 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14691 SIZEP is NULL.
14692 (output_loc_list): Pass address of a dummy size variable even in the
14693 locview handling loop.
14694 (index_location_lists): Add comment on why skip_loc_list_entry can't
14695 call size_of_locs.
14696
14697 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14698
14699 PR target/85261
14700 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14701 into register.
14702
14703 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14704
14705 PR target/85321
14706 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14707 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14708 and -mstring-compare-inline-limit.
14709
14710 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14711
14712 PR target/85287
14713 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14714 for stack clash protection in a register whenever we need it to be in
14715 a register.
14716
14717 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14718
14719 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14720 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14721
14722 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14723
14724 PR target/85321
14725 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14726 the help text.
14727 (mlong-double-): Ditto.
14728 * config/rs6000/sysv4.opt (msdata=): Ditto.
14729 (mtls-size=): Ditto.
14730
14731 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14732
14733 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14734 erroneous entries for
14735 "vector int vec_ldl (int, long int *)", and
14736 "vector unsigned int vec_ldl (int, unsigned long int *)".
14737 Add comments and entries for
14738 "vector bool char vec_ldl (int, bool char *)",
14739 "vector bool short vec_ldl (int, bool short *)",
14740 "vector bool int vec_ldl (int, bool int *)",
14741 "vector bool long long vec_ldl (int, bool long long *)",
14742 "vector pixel vec_ldl (int, pixel *)",
14743 "vector long long vec_ldl (int, long long *)",
14744 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14745 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14746 type tree bool_long_long_type_node and correct definition of
14747 bool_V2DI_type_node to make reference to this new type tree.
14748 (rs6000_mangle_type): Replace erroneous reference to
14749 bool_long_type_node with bool_long_long_type_node.
14750 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14751 comments to emphasize sign distinctions for char and int types and
14752 replace RS6000_BTI_bool_long constant with
14753 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14754 use of RS6000_BTI_pixel.
14755 (bool_long_type_node): Remove this macro definition.
14756 (bool_long_long_type_node): New macro definition
14757
14758 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14759
14760 PR rtl-optimization/85300
14761 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14762 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14763 simplify_unary_operation fails.
14764
14765 2018-04-10 Martin Liska <mliska@suse.cz>
14766
14767 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14768 cgraph_edge and ipa_ref.
14769
14770 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14771
14772 PR target/85177
14773 PR target/85255
14774 * config/i386/sse.md
14775 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14776 computation of the VEC_MERGE selector from mask.
14777 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14778 Fix decoding of the VEC_MERGE selector into mask.
14779
14780 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14781
14782 PR tree-optimization/85286
14783 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14784
14785 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14786
14787 * final.c (final_1): Set insn_last_address as well as
14788 insn_current_address.
14789
14790 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14791
14792 PR target/85173
14793 * explow.c (emit_stack_probe): Call validize_mem on memory location
14794 before passing it to gen_probe_stack. Create address operand and
14795 legitimize it for the probe_stack_address case.
14796
14797 2018-04-09 Jan Hubicka <jh@suse.cz>
14798
14799 PR lto/85078
14800 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14801 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14802 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14803 walk basetypes.
14804 (free_lang_data): Rebuild type inheritance graph.
14805
14806 2018-04-09 Martin Sebor <msebor@redhat.com>
14807
14808 * invoke.texi (-finline-small-functions): Mention other optimization
14809 options.
14810 (-findirect-inlining, -fpartial-inlining): Same.
14811 (-finline-functions-called-once): Same.
14812 (-freorder-blocks-and-partition): Same.
14813
14814 2018-04-09 Jan Hubicka <jh@suse.cz>
14815
14816 PR rtl/84058
14817 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14818 jumps; choose last target that matches the criteria (i.e.
14819 no partition changes for non-crossing jumps).
14820 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14821 support for redirecting crossing jumps to non-crossing.
14822
14823 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14824
14825 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14826 also for naked functions.
14827
14828 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14829
14830 * config/arc/arc.md (add_shift): New pattern.
14831 (add_shift2): Likewise.
14832 (sub_shift): Likewise.
14833 (sub_shift_cmp0_noout): Likewise.
14834 (compare_si_ashiftsi): Likewise.
14835 (xbfu_cmp0_noout): New combine pattern.
14836 (xbfu_cmp0"): Likewise.
14837 (movsi_set_cc_insn): Place the predicable variant first.
14838 (commutative_binary_cmp0_noout): Remove clobber.
14839 (commutative_binary_cmp0): New pattern.
14840 (noncommutative_binary_cmp0): Likewise.
14841 (noncommutative_binary_cmp0_noout): Likewise.
14842 (noncommutative_binary_comparison_result_used): Removed.
14843 (rsub_cmp0): New pattern.
14844 (rsub_cmp0_noout): Likewise.
14845 (extzvsi): Changed, keep only meaningful variants.
14846 (SQH, SEZ): New iterators.
14847 (SQH_postfix): New mode attribute.
14848 (SEZ_prefix): New code attribute.
14849 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14850 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14851 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14852 of numerical value.
14853 (noncommutative_operator): Check the availability of barrel
14854 shifter option.
14855
14856 2018-04-09 Richard Biener <rguenther@suse.de>
14857
14858 PR tree-optimization/85284
14859 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14860 Only use the niter constraining form of simple_iv when the exit
14861 is always executed.
14862
14863 2018-04-09 Tom de Vries <tom@codesourcery.com>
14864
14865 PR target/84041
14866 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14867 (define_expand "*memory_barrier"): New define_expand.
14868 (define_insn "memory_barrier"): New insn.
14869
14870 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14871
14872 PR rtl-optimization/80463
14873 PR rtl-optimization/83972
14874 PR rtl-optimization/83480
14875
14876 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14877 correct producer for the insn.
14878 (tidy_control_flow): Fixup seqnos in case of debug insns.
14879
14880 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14881
14882 PR rtl-optimization/83913
14883
14884 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14885 different sched-times when merging exprs.
14886
14887 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14888
14889 PR rtl-optimization/83962
14890
14891 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14892 tidy_fallthru_edge and tidy_control_flow.
14893
14894 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14895
14896 PR rtl-optimization/83530
14897
14898 * sel-sched.c (force_next_insn): New global variable.
14899 (remove_insn_for_debug): When force_next_insn is true, also leave only
14900 next insn in the ready list.
14901 (sel_sched_region): When the region wasn't scheduled, make another pass
14902 over it with force_next_insn set to 1.
14903
14904 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14905
14906 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14907 into tm_file.
14908 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14909 for interrupt control.
14910 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14911 functions for interrupt control.
14912 * config/nds32/nds32-intrinsic.md: Likewise.
14913 * config/nds32/nds32_intrinsic.h: Likewise.
14914 * config/nds32/nds32.h (nds32_builtins): Likewise.
14915
14916 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14917
14918 * config/nds32/nds32.c (nds32_init_machine_status,
14919 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14920 strict_aligned_p field.
14921 (nds32_expand_to_rtl_hook): New function.
14922 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14923 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14924
14925 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14926 Chung-Ju Wu <jasonwucj@gmail.com>
14927
14928 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14929 * config/nds32/nds32-n7.md: New file.
14930 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14931 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14932 pipeline.
14933 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14934 * config/nds32/nds32.md (pipeline_model): Add n7.
14935 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14936 * config/nds32/pipelines.md: Include n7 settings.
14937
14938 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14939 Chung-Ju Wu <jasonwucj@gmail.com>
14940
14941 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14942 * config/nds32/nds32-e8.md: New file.
14943 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14944 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14945 pipeline.
14946 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14947 * config/nds32/nds32.md (pipeline_model): Add e8.
14948 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14949 * config/nds32/pipelines.md: Include e8 settings.
14950
14951 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14952 Chung-Ju Wu <jasonwucj@gmail.com>
14953
14954 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14955 * config/nds32/nds32-n8.md: New file.
14956 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14957 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14958 pipeline.
14959 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14960 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14961 * config/nds32/nds32.md (pipeline_model): Add n8.
14962 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14963 * config/nds32/pipelines.md: Include n8 settings.
14964
14965 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14966 Chung-Ju Wu <jasonwucj@gmail.com>
14967
14968 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14969 * config/nds32/nds32-n9-2r1w.md: New file.
14970 * config/nds32/nds32-n9-3r2w.md: New file.
14971 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14972 nds32_register_ports): New or modify for cpu n9.
14973 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14974 pipeline.
14975 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14976 * config/nds32/nds32-utils.c: New file.
14977 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14978 TARGET_MUL_SLOW): Define.
14979 * config/nds32/nds32.md (pipeline_model): New attribute.
14980 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14981 New options that support cpu n9.
14982 * config/nds32/pipelines.md: Include n9 settings.
14983 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14984
14985 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14986
14987 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14988 information if necessary.
14989 (output_cond_branch_compare_zero): Likewise.
14990 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14991 (nds32_target_alignment): Refine for alignment.
14992 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14993 (FUNCTION_BOUNDARY): Modify.
14994 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14995 align case.
14996 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14997
14998 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14999
15000 * config/nds32/constants.md (unspec_volatile_element): Add values for
15001 TLB operation and data prefetch.
15002 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15003 functions for TLB operation and data prefetch.
15004 * config/nds32/nds32-intrinsic.md: Likewise.
15005 * config/nds32/nds32_intrinsic.h: Likewise.
15006 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15007 (nds32_print_operand): Likewise.
15008 * config/nds32/nds32.h (nds32_builtins): Likewise.
15009
15010 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15011 Andrew Pinski <pinsika@gcc.gnu.org>
15012
15013 PR middle-end/82976
15014 * match.pd: Use constant_boolean_node of correct type instead of
15015 boolean_true_node or boolean_false_node for simplifying
15016 pointer comparisons to zero.
15017
15018 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15019
15020 PR tree-optimization/80021
15021 * tree.c (verify_type_variant): Make error call in verify_variant_match
15022 translatable and remove final full stop.
15023
15024 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15025
15026 * config/nds32/constants.md (unspec_volatile_element): Add
15027 UNSPEC_VOLATILE_EH_RETURN.
15028 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15029 nds32_output_stack_pop): Support dwarf exception handling process.
15030 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15031 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15032 exception handling process.
15033 (nds32_compute_stack_frame): Likewise.
15034 (nds32_return_addr_rtx): Likewise.
15035 (nds32_initial_elimination_offset): Likewise.
15036 (nds32_expand_prologue): Likewise.
15037 (nds32_expand_epilogue): Likewise.
15038 (nds32_dynamic_chain_address): New function.
15039 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15040 exception handling.
15041 (DYNAMIC_CHAIN_ADDRESS): Define.
15042 (EH_RETURN_DATA_REGNO): Define.
15043 (EH_RETURN_STACKADJ_RTX): Define.
15044 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15045 patterns for dwarf exception handling.
15046
15047 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15048
15049 * config/nds32/nds32.h: Clean up obsolete macros.
15050
15051 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15052
15053 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15054 Add enum values for particular instructions.
15055 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15056 particular intrinsic functions.
15057 * config/nds32/nds32-intrinsic.md: Likewise.
15058 * config/nds32/nds32_intrinsic.h: Likewise.
15059 * config/nds32/nds32.h (nds32_builtins): Likewise.
15060 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15061 (btst, ave): New patterns for particular instructions.
15062
15063 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15064
15065 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15066 Add enum values for atomic load/store and memory sync.
15067 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15068 and memory sync.
15069 * config/nds32/nds32-intrinsic.md: Likewise.
15070 * config/nds32/nds32_intrinsic.h: Likewise.
15071 * config/nds32/nds32.h (nds32_builtins): Likewise.
15072
15073 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15074
15075 PR tree-optimization/85257
15076 * fold-const.c (native_encode_vector): If not all elts could fit
15077 and off is -1, return 0 rather than offset.
15078 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15079 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15080 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15081 adjust buffer in native_interpret_expr call.
15082
15083 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15084
15085 * config/nds32/constants.md (unspec_volatile_element): Add cache
15086 control enum values.
15087 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15088 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15089 * config/nds32/nds32.c (nds32_cctl_names): New.
15090 (nds32_print_operand): Handle cache control register names.
15091 * config/nds32/nds32.h (nds32_builtins): New enum values.
15092 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15093 macros.
15094 * config/nds32/nds32.md (type): Add mmu.
15095 * config/nds32/pipelines.md (simple_insn): Add mmu.
15096
15097 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15098
15099 * config/nds32/nds32.md (type): Remove call.
15100 * config/nds32/pipelines.md (simple_insn): Likewise.
15101
15102 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15103
15104 * config/nds32/constants.md (unspec_volatile_element): Add
15105 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15106 UNSPEC_VOLATILE_FMFCFG.
15107 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15108 description for fmfcfg and fmfcsr.
15109 (bdesc_1arg): Add fmtcsr.
15110 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15111 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15112 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15113 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15114 unspec_fmfcfg): New patterns.
15115 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15116 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15117 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15118 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15119 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15120 __nds32__fmfcfg): Define.
15121
15122 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15123
15124 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15125 intrinsic register names.
15126 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15127 intrinsic register enum values and macros.
15128
15129 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15130
15131 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15132 for load/store addressing form.
15133 (nds32_print_operand_address): Likewise.
15134
15135 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15136
15137 PR target/85196
15138 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15139 based on LABEL_REF. Remove useless assertion.
15140 (pic_address_needs_scratch): Fix formatting.
15141 (sparc_legitimize_pic_address): Minor tweaks.
15142 (sparc_delegitimize_address): Adjust assertion accordingly.
15143 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15144 into symbolic_operand.
15145 (movsi_high_pic_label_ref): Likewise.
15146 (movsi_lo_sum_pic_label_ref): Likewise.
15147 (movdi_pic_label_ref): Likewise.
15148 (movdi_high_pic_label_ref): Likewise.
15149 (movdi_lo_sum_pic_label_ref): Likewise.
15150
15151 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15152
15153 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15154 custom LIB_SPEC setup.
15155
15156 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15157 Kito Cheng <kito.cheng@gmail.com>
15158
15159 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15160 * config/riscv/freebsd.h: New.
15161
15162 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15163
15164 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15165 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15166 file.
15167
15168 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15169 Kito Cheng <kito.cheng@gmail.com>
15170
15171 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15172 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15173 * config/nds32/nds32-protos.h (nds32_output_call,
15174 nds32_output_return): Declare.
15175 * config/nds32/nds32.md: Refine all the call and return patterns.
15176
15177 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15178
15179 PR debug/85252
15180 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15181 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15182
15183 PR rtl-optimization/84872
15184 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15185 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15186 EDGE_CROSSING edge.
15187
15188 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15189
15190 * expr.c (copy_blkmode_to_reg): Revert 254862.
15191 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15192
15193 2018-04-06 Richard Biener <rguenther@suse.de>
15194
15195 PR middle-end/85244
15196 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15197 after seeing a component reference with an adjacent field. Treat
15198 refs to arrays at struct end of external decls similar to
15199 refs to unconstrained commons.
15200
15201 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15202
15203 PR sanitizer/85213
15204 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15205 look through SAVE_EXPRs with non-side-effects argument. Adjust
15206 recursive calls.
15207 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15208 save_p here.
15209
15210 2018-04-06 Richard Biener <rguenther@suse.de>
15211
15212 PR middle-end/85180
15213 * alias.c (find_base_term): New wrapper around find_base_term
15214 unwinding CSELIB_VAL_PTR changes.
15215 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15216 recursion.
15217
15218 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15219
15220 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15221 instructions.
15222 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15223 constant definitions.
15224 ("nop"): lr 0,0 -> nopr r0
15225 ("nop_lr0", "nop_lr1"): New insn definitions.
15226
15227 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15228
15229 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15230 NDS32_V3PUSH_AVAILABLE_P macro.
15231
15232 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15233 Chung-Ju Wu <jasonwucj@gmail.com>
15234
15235 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15236 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15237 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15238 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15239 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15240 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15241 * config/nds32/constraints.md: New constraints and checking for hard
15242 float configuration.
15243 * config/nds32/iterators.md: New mode iterator and attribute for hard
15244 float configuration.
15245 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15246 patterns.
15247 * config/nds32/nds32-fpu.md: New file.
15248 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15249 deal with hard float code generation.
15250 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15251 ARCH_V3S.
15252 (abi_type, float_reg_number): New enum type.
15253 * config/nds32/nds32-predicates.c: New predicates for hard float.
15254 * config/nds32/nds32-protos.h: Declare functions for hard float.
15255 * config/nds32/nds32.c: Implementation for hard float configuration.
15256 * config/nds32/nds32.h: Definitions for hard float configuration.
15257 * config/nds32/nds32.md: Include hard float machine description and
15258 modify patterns for hard float configuration.
15259 * config/nds32/nds32.opt: New options for hard float configuration.
15260 * config/nds32/predicates.md: New predicates for hard float
15261 configuration.
15262
15263 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15264
15265 * common/config/nds32/nds32-common.c
15266 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15267
15268 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15269
15270 PR middle-end/85195
15271 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15272 CONSTRUCTOR_ELT (ctor, ...)->value.
15273
15274 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15275
15276 PR target/85193
15277 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15278
15279 2018-04-05 Tom de Vries <tom@codesourcery.com>
15280
15281 PR target/85204
15282 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15283 cond jump.
15284
15285 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15286 Kito Cheng <kito.cheng@gmail.com>
15287
15288 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15289 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15290 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15291 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15292
15293 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15294 Kito Cheng <kito.cheng@gmail.com>
15295
15296 * config/nds32/constraints.md (Ufe): New memory constraint.
15297 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15298 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15299 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15300 operands.
15301 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15302 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15303
15304 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15305
15306 * config/nds32/nds32.md: Use optimize_size in the condition for
15307 alu-shift instructions.
15308
15309 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15310
15311 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15312
15313 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15314
15315 * config/nds32/nds32.md (negsi2): Refine pattern.
15316
15317 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15318 Chung-Ju Wu <jasonwucj@gmail.com>
15319
15320 * config/nds32/iterators.md (shift_rotate): New code iterator.
15321 (shift): New code attribute.
15322 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15323 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15324 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15325 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15326 bit-wise operations.
15327 (andsi3, *andsi3): Ditto.
15328 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15329 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15330 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15331 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15332 nds32_ior_operand, nds32_xor_operand): New predicates.
15333
15334 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15335
15336 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15337 (addsi3, subsi3): ... this.
15338
15339 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15340
15341 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15342
15343 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15344
15345 * config/nds32/nds32.md: Adjust indention.
15346
15347 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15348
15349 * config/nds32/nds32.md (feature): New attribute.
15350
15351 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15352
15353 * config/nds32/nds32.md (subtype): New attribute.
15354
15355 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15356
15357 PR target/85203
15358 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15359 expansion to perform a bitwise AND of the argument followed by a
15360 boolean negation of the result.
15361
15362 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15363
15364 PR rtl-optimization/84878
15365 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15366 the basic block. Assert the use reference is not artificial and that
15367 it has an associated insn.
15368
15369 2018-04-04 Michael Matz <matz@suse.de>
15370
15371 * builtins.c (compute_objsize): Pass correct operand
15372 to array_at_struct_end_p.
15373
15374 2018-04-04 Richard Biener <rguenther@suse.de>
15375
15376 PR lto/85176
15377 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15378 from contexts for DINFO_LEVEL_TERSE and below.
15379
15380 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15381
15382 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15383 resiter_operand condition.
15384 * config/nds32/nds32.md (*move<mode>): Ditto.
15385
15386 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15387 Monk Chiang <sh.chiang04@gmail.com>
15388
15389 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15390
15391 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15392
15393 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15394
15395 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15396 Kito Cheng <kito.cheng@gmail.com>
15397
15398 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15399 nds32_cond_code_str, output_cond_branch,
15400 output_cond_branch_compare_zero, nds32_expand_cbranch,
15401 nds32_expand_cstore, nds32_expand_movcc,
15402 nds32_output_cbranchsi4_equality_zero,
15403 nds32_output_cbranchsi4_equality_reg,
15404 nds32_output_cbranchsi4_equality_reg_or_const_int,
15405 nds32_output_cbranchsi4_greater_less_zero: New functions.
15406 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15407 nds32_expand_cstore, nds32_expand_movcc,
15408 nds32_output_cbranchsi4_equality_zero,
15409 nds32_output_cbranchsi4_equality_reg,
15410 nds32_output_cbranchsi4_equality_reg_or_const_int,
15411 nds32_output_cbranchsi4_greater_less_zero): Declare.
15412 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15413 nds32_rimm11s_operand): New predicates.
15414 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15415 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15416 patterns.
15417
15418 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15419
15420 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15421 * config/nds32/nds32.md: Ditto.
15422 * config/nds32/pipelines.md: Ditto.
15423
15424 2018-04-04 Richard Biener <rguenther@suse.de>
15425
15426 PR tree-optimization/85168
15427 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15428 propagating abnormals.
15429
15430 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15431
15432 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15433
15434 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15435 Kito Cheng <kito.cheng@gmail.com>
15436
15437 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15438 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15439 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15440 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15441 * config/nds32/nds32.md (sibcall_internal): New.
15442 (sibcall_register): Remove.
15443 (sibcall_immediate): Remove.
15444 (sibcall_value_internal): New.
15445 (sibcall_value_register): Remove.
15446 (sibcall_value_immediate): Remove.
15447 * config/nds32/predicates.md (nds32_general_register_operand): New.
15448 (nds32_call_address_operand): New.
15449
15450 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15451
15452 PR rtl-optimization/85167
15453 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15454 bb_defs if *split_p, instead preinitialize it to NULL.
15455
15456 PR tree-optimization/85156
15457 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15458 evaluating the argument multiple times.
15459
15460 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15461
15462 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15463 than vector.
15464 (_mm_cvtpd_ps): Likewise.
15465 (_mm_cvttpd_epi32): Likewise.
15466 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15467 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15468 vector, pixel, and bool following altivec.h include.
15469
15470 2018-04-03 Martin Sebor <msebor@redhat.com>
15471
15472 * doc/extend.texi (Common Function Attributes): Clarify.
15473 (const attribute): Likewise.
15474 (pure attribute): Likewise.
15475
15476 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15477
15478 PR target/85169
15479 * config/i386/i386.c (ix86_expand_vector_set): Use
15480 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15481
15482 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15483
15484 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15485 instructions when changing rounding bits to preserve precision bits
15486 in the x87 control word.
15487
15488 2018-04-03 Martin Liska <mliska@suse.cz>
15489
15490 PR tree-optimization/82491
15491 * rtl.h (strip_offset_and_add): Replace += suboffset with
15492 poly_uint64 () + suboffset.
15493
15494 2018-03-29 Martin Liska <mliska@suse.cz>
15495 Martin Jambor <mjambor@suse.cz>
15496
15497 PR ipa/84947
15498 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15499 param_type is not an integral or pointer type.
15500
15501 2018-04-03 Richard Biener <rguenther@suse.de>
15502
15503 * sese.h (recompute_all_dominators): Remove.
15504
15505 2018-04-02 Martin Sebor <msebor@redhat.com>
15506
15507 * doc/invoke.texi (-Wrestrict): Fix typos.
15508
15509 2018-04-02 Jim Wilson <jimw@sifive.com>
15510
15511 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15512 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15513 (<optab>di3, <optab>si3_extend): Likewise.
15514 (<optab>si3_mask, <optab>si3_mask_1): New.
15515 (<optab>di3_mask, <optab>di3_mask_1): New.
15516 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15517 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15518 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15519
15520 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15521
15522 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15523 example.
15524
15525 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15526
15527 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15528 (nds32_canonicalize_comparison): New function.
15529
15530 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15531 Kito Cheng <kito.cheng@gmail.com>
15532 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15533
15534 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15535 * config/nds32/constants.md (unspec_volatile_element): Add
15536 UNSPEC_VOLATILE_RELAX_GROUP.
15537 * config/nds32/nds32-relax-opt.c: New file.
15538 * config/nds32/nds32-predicates.c
15539 (nds32_symbol_load_store_p): New function.
15540 * config/nds32/nds32-protos.h
15541 (nds32_symbol_load_store_p): Declare function.
15542 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15543 * config/nds32/nds32.c
15544 (nds32_register_pass): New function to register pass.
15545 (nds32_register_passes): New function to register passes.
15546 * config/nds32/nds32.md (relax_group): New pattern.
15547 * config/nds32/nds32.opt (mrelax-hint): New option.
15548 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15549
15550 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15551
15552 * config/nds32/t-nds32: Modify files dependency.
15553
15554 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15555
15556 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15557 (PROFILE_HOOK): Define its implementation.
15558
15559 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15560
15561 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15562 type and 32-bit size.
15563
15564 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15565
15566 PR middle-end/85090
15567 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15568 (V_128_256): New mode iterator.
15569 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15570 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15571 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15572 of V.
15573 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15574 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15575
15576 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15577
15578 PR target/83315
15579 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15580 NaN inputs correctly.
15581
15582 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15583
15584 PR target/80546
15585 * config/rs6000/vsx.md (??r): New mode attribute.
15586 (*vsx_mov<mode>_64bit): Use it.
15587 (*vsx_mov<mode>_32bit): Likewise.
15588
15589 2018-03-30 Martin Sebor <msebor@redhat.com>
15590
15591 PR tree-optimization/84818
15592 * builtins.c (check_access): Use warning_n.
15593
15594 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15595
15596 PR target/83822
15597 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15598 condition.
15599 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15600 condition.
15601
15602 2018-03-30 Julia Koval <julia.koval@intel.com>
15603
15604 PR target/84413
15605 * x86-tune.def (movx, partial_reg_dependency): Enable for
15606 m_SKYLAKE_AVX512.
15607
15608 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15609
15610 PR inline-asm/84985
15611 * lra-constraints.c (process_alt_operands): Move setting
15612 this_alternative_matches below.
15613
15614 2018-03-29 Martin Liska <mliska@suse.cz>
15615
15616 PR lto/84995.
15617 * doc/invoke.texi: Document how LTO works with debug info.
15618 Describe auto-load support of binutils. Mention 'x86-64'
15619 as valid option value of -march option.
15620
15621 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15622
15623 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15624
15625 PR c/85094
15626 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15627 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15628 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15629 checking.
15630
15631 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15632
15633 PR target/84912
15634 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15635 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15636 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15637 for RS6000_BTM_POWERPC64.
15638 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15639 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15640 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15641 definition.
15642 (DIVDE): Use it.
15643 (DIVDEU): Likewise.
15644
15645 2018-03-28 Carl Love <cel@us.ibm.com>
15646
15647 Revert
15648 2017-09-27 Carl Love <cel@us.ibm.com>
15649
15650 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15651 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15652 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15653 fctiw instruction.
15654
15655 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15656
15657 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15658 instead of __vector bool.
15659 (_mm_max_pu8): Likewise.
15660 (_mm_min_pi16): Likewise.
15661
15662 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15663
15664 PR target/84912
15665 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15666 (DIVWEUO): Likewise.
15667 (DIVDEO): Likewise.
15668 (DIVDEUO): Likewise.
15669 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15670 DIVWEUO and DIVDEUO.
15671 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15672 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15673 (div_extend): Likewise.
15674 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15675 builtin function.
15676 (__builtin_divweuo): Likewise.
15677 (__builtin_divdeo): Likewise.
15678 (__builtin_divdeuo): Likewise.
15679
15680 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15681
15682 PR target/85095
15683 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15684 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15685
15686 PR tree-optimization/82004
15687 * gimple-match-head.c (optimize_pow_to_exp): New function.
15688 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15689 Don't fold to exp if optimize_pow_to_exp is false.
15690
15691 2018-03-28 Martin Liska <mliska@suse.cz>
15692
15693 PR other/84819
15694 * calls.c (initialize_argument_information): Fix trailing space.
15695 * common.opt: Fix typo and provide better explanation for
15696 -fsanitize-coverage option.
15697 * config/i386/i386.opt: Fix typo.
15698
15699 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15700 Martin Liska <mliska@suse.cz>
15701
15702 PR sanitizer/85081
15703 * gimplify.c (asan_poison_variable): Don't do the check for
15704 gimplify_omp_ctxp here.
15705 (gimplify_decl_expr): Do it here.
15706 (gimplify_target_expr): Likewise.
15707
15708 2018-03-28 Martin Liska <mliska@suse.cz>
15709
15710 PR target/84988
15711 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15712 chkp_type_bounds_count if MPX is not enabled.
15713
15714 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15715
15716 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15717
15718 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15719
15720 PR target/84914
15721 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15722 function to create the function decl for complex long double
15723 multiply and divide for -mabi=ieeelongdouble.
15724 (init_float128_ieee): Call it.
15725
15726 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15727
15728 PR target/85044
15729 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15730 -fcf-protection=branch -mibt.
15731 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15732
15733 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15734
15735 PR target/81863
15736 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15737 arm_word_relocations.
15738
15739 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15740
15741 PR target/85056
15742 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15743 extern array declarations.
15744
15745 2018-03-27 Richard Biener <rguenther@suse.de>
15746
15747 PR middle-end/84067
15748 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15749 explicit single_use checks.
15750
15751 2018-03-27 Richard Biener <rguenther@suse.de>
15752
15753 PR tree-optimization/85082
15754 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15755 Valueize the VUSE.
15756
15757 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15758
15759 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15760 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15761 Turn on fasynchronous-unwind-tables and funwind-tables.
15762
15763 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15764
15765 PR target/85073
15766 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15767 (*bmi_blsr_<mode>_ccz): Ditto.
15768
15769 2018-03-26 Tom de Vries <tom@codesourcery.com>
15770
15771 PR tree-optimization/85063
15772 * omp-general.c (offloading_function_p): New function. Factor out
15773 of ...
15774 * omp-offload.c (pass_omp_target_link::gate): ... here.
15775 * omp-general.h (offloading_function_p): Declare.
15776 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15777 with attribute omp declare target for offloading functions.
15778
15779 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15780
15781 PR tree-optimization/84005
15782 * tree-data-ref.h (get_base_for_alignment): Declare.
15783 * tree-data-ref.c (get_base_for_alignment_1): New function.
15784 (get_base_for_alignment): Likewise.
15785 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15786 get_base_for_alignment to find a suitable base object, instead
15787 of always using drb->base_address.
15788
15789 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15790
15791 PR inline-asm/85022
15792 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15793 known size by default.
15794
15795 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15796
15797 PR inline-asm/85030
15798 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15799 and non BLKmode operands.
15800
15801 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15802
15803 PR target/85026
15804 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15805 Clean up attributes.
15806
15807 2018-03-23 Richard Biener <rguenther@suse.de>
15808
15809 PR debug/85020
15810 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15811 we are going to emit early debug for LTO.
15812
15813 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15814
15815 PR inline-asm/85034
15816 * function.c (match_asm_constraints_1): Don't optimize if input
15817 doesn't satisfy general_operand predicate for output's mode.
15818
15819 PR inline-asm/85022
15820 * alias.c (write_dependence_p): Don't require for x_canonicalized
15821 non-VOIDmode if x has VOIDmode.
15822
15823 PR sanitizer/85029
15824 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15825 just don't try to optimize it rather than assert it never happens.
15826
15827 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15828
15829 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15830 macro expansions for definition of ST_INTERNAL_<mode> and
15831 LD_INTERNAL_<mode> builtins.
15832 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15833 Remove prototype.
15834 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15835 function.
15836 (altivec_expand_st_builtin): Likewise.
15837 (altivec_expand_builtin): Remove calls to deleted functions.
15838 (rs6000_address_for_altivec): Delete this function.
15839 * config/rs6000/vector.md: Remove expands for
15840 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15841
15842 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15843
15844 PR target/84826
15845 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15846 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15847 re-computing once computed.
15848 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15849 (arm_init_machine_status): Initialize
15850 machine->static_chain_stack_bytes.
15851
15852 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15853
15854 PR target/84760
15855 * doc/extend.texi: Add four new prototypes for vec_ld.
15856 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15857 definitions for more logical presentation.
15858 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15859 entries for V1TI variants of __builtin_altivec_ld builtin.
15860 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15861 handling of V1TI variant of LVX icode pattern.
15862 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15863 (rs6000_gimple_fold_builtin): Likewise.
15864 (altivec_init_builtins): Add code to define
15865 __builtin_altivec_lvx_v1ti function.
15866
15867 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15868
15869 PR inline-asm/84941
15870 * function.c (match_asm_constraints_1): Don't do the optimization
15871 if input isn't a REG, SUBREG, MEM or constant.
15872
15873 2018-03-22 Tom de Vries <tom@codesourcery.com>
15874
15875 PR tree-optimization/84956
15876 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15877 bb_has_abnormal_pred.
15878
15879 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15880
15881 PR sanitizer/85018
15882 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15883 DECL_INITIAL (decl) to decl at the end.
15884 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15885 adjust the comment.
15886
15887 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15888
15889 * doc/extend.texi (__builtin_tgmath): Document when complex
15890 integer types are treated as _Complex _Float64.
15891
15892 2018-03-21 Tom de Vries <tom@codesourcery.com>
15893
15894 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15895
15896 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15897
15898 PR tree-optimization/84960
15899 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15900 if it is ENTRY block, move them into single succ of ENTRY in that case.
15901
15902 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15903
15904 PR tree-optimization/84811
15905 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15906 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15907 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15908 (known_subrange_p): Update accordingly. Cast each value involved
15909 in the size comparison, rather than casting the result of the
15910 subtraction.
15911
15912 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15913
15914 PR tree-optimization/84982
15915 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15916 by flipping the least significant bit rather than all bits from
15917 bitpos to bitpos + bitsize - 1.
15918
15919 2018-03-21 Nathan Sidwell <nathan@acm.org>
15920
15921 * doc/extend.texi (Deprecated Features): Remove mention of
15922 long-deleted deprecations.
15923
15924 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15925
15926 PR jit/84288
15927 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15928 * configure: Regenerate.
15929
15930 2018-03-21 Tom de Vries <tom@codesourcery.com>
15931
15932 PR tree-optimization/83126
15933 * tree-parloops.c (num_phis): New function.
15934 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15935
15936 2018-03-21 Nathan Sidwell <nathan@acm.org>
15937
15938 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15939 mention anon-struct/union members and trailing attributes.
15940
15941 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15942
15943 PR tree-optimization/84969
15944 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15945 builtin memset partitions if they set different rhs values.
15946
15947 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15948
15949 PR rtl-optimization/84989
15950 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15951 VEC_DUPLICATE with scalar result mode.
15952
15953 2018-03-21 Martin Liska <mliska@suse.cz>
15954
15955 PR ipa/84963
15956 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15957 not intended return statement.
15958
15959 2018-03-21 Martin Liska <mliska@suse.cz>
15960
15961 PR target/84988
15962 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15963 (chkp_find_bound_slots_1): Limit number of iterations.
15964
15965 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15966
15967 PR target/84838
15968 * Minor grammar fixes for x86 options.
15969
15970 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15971
15972 PR debug/84875
15973 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15974 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15975
15976 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15977
15978 PR target/83789
15979 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15980 (altivec_lvx_<mode>_1op): Likewise.
15981 (altivec_stvx_<mode>_2op): Likewise.
15982 (altivec_stvx_<mode>_1op): Likewise.
15983 (altivec_lvx_<VM2:mode>): New define_expand.
15984 (altivec_stvx_<VM2:mode>): Likewise.
15985 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15986 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15987 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15988 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15989 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15990 (rs6000_gen_lvx): Likewise.
15991 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15992 (altivec_expand_stv_builtin): Likewise.
15993 (altivec_expand_builtin): Likewise.
15994 * config/rs6000/vector.md: Likewise.
15995
15996 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15997
15998 PR target/82518
15999 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16000 BYTES_BIG_ENDIAN.
16001
16002 2018-03-20 Richard Biener <rguenther@suse.de>
16003
16004 PR target/84986
16005 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16006 sign-conversions as zero, fall back to standard scalar_stmt
16007 cost for the rest.
16008
16009 2018-03-20 Martin Liska <mliska@suse.cz>
16010
16011 PR ipa/84825
16012 * predict.c (rebuild_frequencies): Handle case when we have
16013 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16014
16015 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16016
16017 PR target/84990
16018 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16019 flag_section_anchors.
16020 * varasm.c (use_blocks_for_decl_p): Remove hack for
16021 dw2_force_const_mem.
16022
16023 PR target/84845
16024 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16025 to ...
16026 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16027 be created, use lowpart_subreg of operands[0] rather than operands[0]
16028 itself.
16029 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16030 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16031 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16032 and n constraint instead of aarch64_shift_imm_di and Usd.
16033 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16034 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16035
16036 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16037
16038 PR target/82989
16039 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16040 to favor GPR over NEON registers.
16041 (<shift>di3_neon): Likewise.
16042
16043 2018-03-20 Tom de Vries <tom@codesourcery.com>
16044
16045 PR target/84952
16046 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16047 (nvptx_process_pars): Emit bar.sync asap and alap.
16048
16049 2018-03-20 Tom de Vries <tom@codesourcery.com>
16050
16051 PR target/84954
16052 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16053 seen_label if seen_label is already set.
16054
16055 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16056
16057 PR target/84945
16058 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16059 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16060 Use 1U instead of 1. Formatting fixes.
16061
16062 PR c/84953
16063 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16064 instead of TREE_TYPE (s1) for the return value.
16065
16066 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16067
16068 PR tree-optimization/84946
16069 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16070 bitsize + bitsize in poly_uint64 rather than poly_int64.
16071
16072 PR sanitizer/78651
16073 * dwarf2asm.c: Include fold-const.c.
16074 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16075 of decl rather than decl itself.
16076
16077 PR rtl-optimization/84643
16078 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16079
16080 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16081
16082 PR sanitizer/78651
16083 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16084 calling assemble_variable.
16085
16086 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16087
16088 PR target/81647
16089 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16090 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16091
16092 2018-03-19 Jim Wilson <jimw@sifive.com>
16093
16094 PR bootstrap/84856
16095 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16096 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16097 (riscv_first_stack_step): Likewise.
16098 (riscv_option_override): Use STACK_BOUNDARY instead of
16099 MIN_STACK_BOUNDARY.
16100 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16101 MIN_STACK_BOUNDARY.
16102 (BIGGEST_ALIGNMENT): Set to 128.
16103 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16104 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16105 STACK_BOUNDARY.
16106
16107 2018-03-19 Richard Biener <rguenther@suse.de>
16108
16109 PR tree-optimization/84933
16110 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16111 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16112
16113 2018-03-19 Richard Biener <rguenther@suse.de>
16114
16115 PR tree-optimization/84859
16116 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16117 (cond_if_else_store_replacement): Perform sinking operation on
16118 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16119 Generalize what a BB with a single eligible store is.
16120
16121 2018-03-19 Richard Biener <rguenther@suse.de>
16122
16123 PR tree-optimization/84929
16124 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16125 chrec_is_positive against non-chrec arg.
16126
16127 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16128
16129 PR target/84711
16130 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16131
16132 2018-03-18 Martin Liska <mliska@suse.cz>
16133
16134 PR rtl-optimization/84635
16135 * regrename.c (build_def_use): Use matches_mode only when
16136 matches >= 0.
16137
16138 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16139
16140 PR tree-optimization/84913
16141 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16142 vectorize chains of COND_EXPRs.
16143
16144 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16145
16146 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16147
16148 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16149
16150 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16151
16152 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16153
16154 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16155
16156 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16157 Kito Cheng <kito.cheng@gmail.com>
16158
16159 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16160 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16161 (nds32_adjust_reg_alloc_order): New function.
16162 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16163
16164 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16165
16166 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16167 nds32_print_operand, nds32_print_operand_address): Use
16168 HOST_WIDE_INT_PRINT_DEC instead.
16169
16170 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16171
16172 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16173
16174 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16175
16176 PR target/84902
16177 * config/i386/i386.c (initial_ix86_tune_features,
16178 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16179 unsigned long long.
16180 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16181 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16182 rather than 1u << ix86_tune. Formatting fix.
16183 (ix86_option_override_internal): Change ix86_arch_mask from
16184 unsigned int to unsigned HOST_WIDE_INT, initialize to
16185 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16186 (ix86_function_specific_restore): Likewise.
16187
16188 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16189
16190 PR target/84899
16191 * postreload.c (reload_combine_recognize_pattern): Perform
16192 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16193 truncate_int_for_mode the result for the destination's mode.
16194
16195 PR c/84909
16196 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16197 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16198 Likewise.
16199 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16200 Likewise.
16201
16202 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16203
16204 PR target/84876
16205 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16206 regno_allocno_class_array and sorted_pseudos.
16207 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16208 insns where regno is used.
16209
16210 2018-03-16 Martin Liska <mliska@suse.cz>
16211
16212 PR ipa/84833
16213 * multiple_target.c (create_dispatcher_calls): Redirect
16214 reference in the symbol table.
16215
16216 2018-03-16 Martin Liska <mliska@suse.cz>
16217
16218 PR ipa/84722
16219 * multiple_target.c (create_dispatcher_calls): Redirect also
16220 an alias.
16221
16222 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16223
16224 PR c++/79937
16225 PR c++/82410
16226 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16227 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16228 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16229
16230 2018-03-16 Julia Koval <julia.koval@intel.com>
16231
16232 * doc/invoke.texi (Skylake Server): Add CLWB.
16233 Cannonlake): Remove CLWB.
16234
16235 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16236
16237 PR tree-optimization/84841
16238 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16239 1 << 3.
16240 (FLOAT_ONE_CONST_TYPE): Define.
16241 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16242 (sort_by_operand_rank): Put entries with higher constant_type last
16243 rather than first to match comments.
16244
16245 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16246
16247 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16248 split predicate.
16249
16250 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16251
16252 PR c++/79085
16253 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16254 check and use address of target always.
16255
16256 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16257
16258 PR target/84574
16259 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16260 (indirect_thunk_bnd_needed): Likewise.
16261 (indirect_thunks_used): Likewise.
16262 (indirect_thunks_bnd_used): Likewise.
16263 (indirect_return_needed): New.
16264 (indirect_return_bnd_needed): Likewise.
16265 (output_indirect_thunk_function): Add a bool argument for
16266 function return.
16267 (output_indirect_thunk_function): Don't generate alias for
16268 function return thunk.
16269 (ix86_code_end): Call output_indirect_thunk_function to generate
16270 function return thunks.
16271 (ix86_output_function_return): Set indirect_return_bnd_needed
16272 and indirect_return_needed instead of indirect_thunk_bnd_needed
16273 and indirect_thunk_needed.
16274
16275 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16276
16277 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16278 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16279 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16280
16281 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16282 Paul Hua <paul.hua.gm@gmail.com>
16283
16284 PR c/84852
16285 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16286
16287 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16288
16289 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16290 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16291 resp. SFmode cases.
16292
16293 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16294
16295 PR target/84711
16296 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16297 instead of GET_MODE_SIZE when comparing Units.
16298
16299 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16300
16301 PR target/68256
16302 * varasm.c (hash_section): Return an unchangeble hash value
16303 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16304 Return !aarch64_can_use_per_function_literal_pools_p ().
16305
16306 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16307
16308 PR target/84860
16309 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16310 rather than address of cmode as last argument to prepare_cmp_insn.
16311
16312 2018-03-15 Julia Koval <julia.koval@intel.com>
16313
16314 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16315 F_AVX512VNNI, F_AVX512BITALG): New.
16316
16317 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16318
16319 PR target/83451
16320 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16321 insn for floating-point loads and stores.
16322
16323 2018-03-14 Carl Love <cel@us.ibm.com>
16324
16325 * config/rs6000/rs6000-c.c: Add macro definitions for
16326 ALTIVEC_BUILTIN_VEC_PERMXOR.
16327 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16328 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16329 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16330 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16331 UNSPEC_VPERMXOR.
16332 * config/doc/extend.texi: Add prototypes for vec_permxor.
16333
16334 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16335
16336 PR c/84852
16337 * diagnostic-show-locus.c (class layout_point): Convert m_line
16338 from int to linenum_type.
16339 (line_span::comparator): Use linenum "compare" function when
16340 comparing line numbers.
16341 (test_line_span): New function.
16342 (layout_range::contains_point): Convert param "row" from int to
16343 linenum_type.
16344 (layout_range::intersects_line_p): Likewise.
16345 (layout::will_show_line_p): Likewise.
16346 (layout::print_source_line): Likewise.
16347 (layout::should_print_annotation_line_p): Likewise.
16348 (layout::print_annotation_line): Likewise.
16349 (layout::print_leading_fixits): Likewise.
16350 (layout::annotation_line_showed_range_p): Likewise.
16351 (struct line_corrections): Likewise for field m_row.
16352 (line_corrections::line_corrections): Likewise for param "row".
16353 (layout::print_trailing_fixits): Likewise.
16354 (layout::get_state_at_point): Likewise.
16355 (layout::get_x_bound_for_row): Likewise.
16356 (layout::print_line): Likewise.
16357 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16358 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16359 * input.c (selftest::test_linenum_comparisons): New function.
16360 (selftest::input_c_tests): Call it.
16361 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16362 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16363 * selftest.h (ASSERT_GT): New macro.
16364 (ASSERT_GT_AT): New macro.
16365 (ASSERT_LT): New macro.
16366 (ASSERT_LT_AT): New macro.
16367
16368 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16369
16370 PR rtl-optimization/84780
16371 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16372
16373 2018-03-14 Martin Liska <mliska@suse.cz>
16374
16375 * tree.c (record_node_allocation_statistics): Use
16376 get_stats_node_kind.
16377 (get_stats_node_kind): New function extracted from
16378 record_node_allocation_statistics.
16379 (free_node): Use get_stats_node_kind.
16380
16381 2018-03-14 Richard Biener <rguenther@suse.de>
16382
16383 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16384 that the value-set of ANTIC_IN doesn't grow.
16385
16386 Revert
16387 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16388 member.
16389 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16390 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16391
16392 2018-03-14 Julia Koval <julia.koval@intel.com>
16393
16394 * config.gcc (icelake-client, icelake-server): New.
16395 (icelake): Remove.
16396 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16397 (initial_ix86_arch_features): Ditto.
16398 (PTA_SKYLAKE): Add SGX.
16399 (PTA_ICELAKE): Remove.
16400 (PTA_ICELAKE_CLIENT): New.
16401 (PTA_ICELAKE_SERVER): New.
16402 (ix86_option_override_internal): Split up icelake on icelake client and
16403 icelake server.
16404 (get_builtin_code_for_version): Ditto.
16405 (fold_builtin_cpu): Ditto.
16406 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16407 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16408 * config/i386/i386.h (processor_type): Ditto.
16409 * doc/invoke.texi: Ditto.
16410
16411 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16412
16413 PR sanitizer/83392
16414 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16415 INTEGER_CST offset, add it together with bitpos / 8 and
16416 sign extend based on POINTER_SIZE.
16417
16418 PR target/84844
16419 Revert
16420 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16421
16422 PR target/78090
16423 * config/i386/constraints.md (Yc): New register constraint.
16424 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16425 Use Yc constraint for alternative 2 of operand 0. Remove
16426 preferred_for_speed attribute.
16427
16428 2018-03-14 Richard Biener <rguenther@suse.de>
16429
16430 PR tree-optimization/84830
16431 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16432 with the old one to avoid oscillations.
16433
16434 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16435
16436 PR target/83712
16437 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16438 pseudos.
16439 (assign_by_spills): Return a flag of reload assignment failure.
16440 Do not process the reload assignment failures. Do not spill other
16441 reload pseudos if they has the same reg class. Update n if
16442 necessary.
16443 (lra_assign): Add a return arg. Set up from the result of
16444 assign_by_spills call.
16445 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16446 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16447 usage_insns if it is not NULL.
16448 (spill_hard_reg_in_range): New function.
16449 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16450 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16451 function prototypes.
16452 (lra_assign): Change prototype.
16453 * lra.c (lra): Add code to deal with fails by splitting hard reg
16454 live ranges.
16455
16456 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16457
16458 * config/riscv/riscv.opt (mrelax): New option.
16459 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16460 "norelax" when riscv_mrelax is disabled.
16461 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16462
16463 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16464
16465 PR target/84743
16466 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16467 reassociation for int modes.
16468
16469 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16470
16471 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16472 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16473 for big-endian.
16474 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16475 * config/aarch64/aarch64-sve.md
16476 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16477 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16478 (*extend<mode><Vwide>2): Rename to...
16479 (aarch64_sve_extend<mode><Vwide>2): ...this.
16480 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16481 renaming the old pattern to...
16482 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16483 unsigned packs.
16484 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16485 define_expand, renaming the old pattern to...
16486 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16487 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16488 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16489 account when deciding which SVE instruction the optab should use.
16490 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16491
16492 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16493
16494 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16495 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16496 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16497 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16498 (tlsdesc_small_<mode>): Turn a define_expand and use
16499 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16500 (tlsdesc_small_advsimd_<mode>): ...this.
16501 (tlsdesc_small_sve_<mode>): New pattern.
16502
16503 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16504
16505 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16506 (UNSPEC_UMUL_HIGHPART): New constants.
16507 (MUL_HIGHPART): New int iteraor.
16508 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16509 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16510 define_expand.
16511 (*<su>mul<mode>3_highpart): New define_insn.
16512
16513 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16514
16515 PR lto/84805
16516 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16517 incomplete types.
16518
16519 2018-03-13 Martin Liska <mliska@suse.cz>
16520
16521 PR ipa/84658.
16522 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16523 vector.
16524 (sem_item_optimizer::~sem_item_optimizer): Release it.
16525 (sem_item_optimizer::merge_classes): Register variable aliases.
16526 (sem_item_optimizer::fixup_pt_set): New function.
16527 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16528 * ipa-icf.h: Declare new variables and functions.
16529
16530 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16531
16532 PR middle-end/84834
16533 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16534 integer_pow2p@2 and test integer_pow2p in condition.
16535 (A < 0 ? C : 0): Similarly for @1.
16536
16537 PR middle-end/84831
16538 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16539 characters starting at p contain '\0' character, don't look beyond
16540 that.
16541
16542 PR target/84827
16543 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16544 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16545
16546 PR target/84828
16547 * reg-stack.c (change_stack): Change update_end var from int to
16548 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16549 also call set_block_for_insn on the newly added insns and rescan.
16550
16551 PR target/84786
16552 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16553 on the last operand.
16554
16555 PR c++/84704
16556 * tree.c (stabilize_reference_1): Return save_expr (e) for
16557 STATEMENT_LIST even if it doesn't have side-effects.
16558
16559 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16560
16561 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16562
16563 2018-03-12 Renlin Li <renlin.li@arm.com>
16564
16565 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16566 aarch64_output_scalar_simd_mov_immediate.
16567
16568 2018-03-12 Martin Sebor <msebor@redhat.com>
16569
16570 PR tree-optimization/83456
16571 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16572 for perfectly overlapping calls to memcpy.
16573 (gimple_fold_builtin_memory_chk): Same.
16574 (gimple_fold_builtin_strcpy): Handle no-warning.
16575 (gimple_fold_builtin_stxcpy_chk): Same.
16576 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16577
16578 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16579
16580 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16581 parameter. Use it for SFmode.
16582 (rs6000_function_arg_advance_1): Adjust.
16583 (rs6000_function_arg): Adjust.
16584 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16585
16586 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16587
16588 PR rtl-optimization/84169
16589 PR rtl-optimization/84780
16590 * combine.c (can_combine_p): Check for a 2-insn combination whether
16591 the destination register is used between the two insns, too.
16592
16593 2018-03-12 Richard Biener <rguenther@suse.de>
16594
16595 PR tree-optimization/84803
16596 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16597 for refs DR analysis didn't process.
16598
16599 2018-03-12 Richard Biener <rguenther@suse.de>
16600
16601 PR tree-optimization/84777
16602 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16603 force-vectorize loops ignore whether we are optimizing for size.
16604
16605 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16606
16607 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16608 (TARGET_MD_ASM_ADJUST): Define.
16609
16610 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16611 Kito Cheng <kito.cheng@gmail.com>
16612 Chung-Ju Wu <jasonwucj@gmail.com>
16613
16614 * config/nds32/nds32.c (nds32_compute_stack_frame,
16615 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16616 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16617 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16618 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16619 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16620 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16621 * config/nds32/nds32.md (prologue, epilogue): Use macro
16622 NDS32_V3PUSH_AVAILABLE_P to do checking.
16623
16624 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16625
16626 PR debug/58150
16627 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16628 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16629 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16630 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16631 addition of most attributes on !orig_type_die or the attribute not
16632 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16633
16634 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16635 Chung-Ju Wu <jasonwucj@gmail.com>
16636
16637 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16638 __NDS32_VH__ macro.
16639 * config/nds32/nds32.opt (mvh): New option.
16640
16641 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16642 Chung-Ju Wu <jasonwucj@gmail.com>
16643
16644 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16645 function.
16646 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16647 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16648 definition.
16649
16650 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16651 Chung-Ju Wu <jasonwucj@gmail.com>
16652
16653 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16654 function.
16655 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16656 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16657
16658 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16659 Kito Cheng <kito.cheng@gmail.com>
16660 Chung-Ju Wu <jasonwucj@gmail.com>
16661
16662 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16663 UNSPEC_FFMISM and UNSPEC_FLMISM.
16664 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16665 for ffb, ffmism and flmism.
16666 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16667 (unspec_ffmism): Ditto.
16668 (unspec_flmism): Ditto.
16669 (nds32_expand_builtin_impl): Check if string extension is available.
16670 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16671 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16672
16673 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16674
16675 Reverting patch:
16676 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16677
16678 PR target/83712
16679 * lra-assigns.c (assign_by_spills): Return a flag of reload
16680 assignment failure. Do not process the reload assignment
16681 failures. Do not spill other reload pseudos if they has the same
16682 reg class.
16683 (lra_assign): Add a return arg. Set up from the result of
16684 assign_by_spills call.
16685 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16686 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16687 usage_insns if it is not NULL.
16688 (spill_hard_reg_in_range): New function.
16689 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16690 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16691 function prototypes.
16692 (lra_assign): Change prototype.
16693 * lra.c (lra): Add code to deal with fails by splitting hard reg
16694 live ranges.
16695
16696 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16697
16698 PR target/84807
16699 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16700
16701 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16702
16703 PR debug/84620
16704 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16705 (dw_val_node): Add val_symbolic_view.
16706 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16707 (symview_upper_bound): New.
16708 (new_line_info_table): Initialize symviews_since_reset.
16709 (dwarf2out_source_line): Count symviews_since_reset and set
16710 symview_upper_bound.
16711 (dw_val_equal_p): Handle symview.
16712 (add_AT_symview): New.
16713 (print_dw_val): Handle symview.
16714 (attr_checksum, attr_checksum_ordered): Likewise.
16715 (same_dw_val_p, size_of_die): Likewise.
16716 (value_format, output_die): Likewise.
16717 (add_high_low_attributes): Use add_AT_symview for entry_view.
16718 (dwarf2out_finish): Reset symview_upper_bound, clear
16719 zero_view_p.
16720
16721 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16722
16723 PR target/83969
16724 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16725 Add strict argument and use it.
16726 (rs6000_split_multireg_move): Update for new strict argument.
16727 (mem_operand_gpr): Disallow all non-offsettable addresses.
16728 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16729
16730 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16731
16732 PR target/84772
16733 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16734 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16735 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16736
16737 PR c++/84767
16738 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16739 decl, use remap_type if we want to use the type.
16740
16741 2018-03-09 Martin Sebor <msebor@redhat.com>
16742
16743 PR tree-optimization/84526
16744 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16745 Remove dead code.
16746 (builtin_access::generic_overlap): Be prepared to handle non-array
16747 base objects.
16748
16749 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16750
16751 PR rtl-optimization/84682
16752 * lra-constraints.c (process_address_1): Check is_address flag
16753 for address constraints.
16754 (process_alt_operands): Likewise.
16755 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16756 preprocess_constraints.
16757 * recog.h (preprocess_constraints): Add oploc parameter.
16758 Adjust callers.
16759 * recog.c (preprocess_constraints): Test address_operand for
16760 CT_ADDRESS constraints.
16761
16762 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16763
16764 PR target/83712
16765 * lra-assigns.c (assign_by_spills): Return a flag of reload
16766 assignment failure. Do not process the reload assignment
16767 failures. Do not spill other reload pseudos if they has the same
16768 reg class.
16769 (lra_assign): Add a return arg. Set up from the result of
16770 assign_by_spills call.
16771 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16772 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16773 usage_insns if it is not NULL.
16774 (spill_hard_reg_in_range): New function.
16775 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16776 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16777 function prototypes.
16778 (lra_assign): Change prototype.
16779 * lra.c (lra): Add code to deal with fails by splitting hard reg
16780 live ranges.
16781
16782 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16783
16784 PR target/83193
16785 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16786 Accept complain bool parameter. Only emit errors if it is true.
16787 (arm_parse_cpu_option_name): Likewise.
16788 (arm_target_thumb_only): Adjust callers of the above.
16789 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16790 prototype to take a default true bool parameter.
16791 (arm_parse_arch_option_name): Likewise.
16792
16793 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16794 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16795
16796 PR jit/64089
16797 PR jit/84288
16798 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16799 * configure: Regenerate.
16800 * configure.ac ("linker --version-script option"): New.
16801 ("linker soname option"): New.
16802
16803 2018-03-09 Richard Biener <rguenther@suse.de>
16804
16805 PR tree-optimization/84775
16806 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16807 immediate uses of predicate stmts and mark them modified.
16808
16809 Revert
16810 PR tree-optimization/84178
16811 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16812 to caller.
16813 (version_loop_for_if_conversion): Delay update_ssa call.
16814 (tree_if_conversion): Delay update_ssa until after predicate
16815 insertion.
16816
16817 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16818
16819 PR target/84763
16820 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16821 when the function accesses prior frames.
16822
16823 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16824
16825 PR debug/84456
16826 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16827 gen_llsym, otherwise call maybe_gen_llsym.
16828
16829 PR inline-asm/84742
16830 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16831 has ',' character inside of it.
16832
16833 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16834
16835 PR target/84748
16836 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16837 as clobbering CC_REGNUM.
16838
16839 2018-03-08 Richard Biener <rguenther@suse.de>
16840
16841 PR middle-end/84552
16842 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16843 (follow_copies_to_constant): Do not follow SSA names registered
16844 for update.
16845
16846 2018-03-08 Richard Biener <rguenther@suse.de>
16847
16848 PR tree-optimization/84178
16849 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16850 to caller.
16851 (version_loop_for_if_conversion): Delay update_ssa call.
16852 (tree_if_conversion): Delay update_ssa until after predicate
16853 insertion.
16854
16855 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16856
16857 PR tree-optimization/84178
16858 * tree-if-conv.c (release_bb_predicate): Remove the
16859 the assertion that the stmts have NULL use_ops.
16860 Discard the statements, asserting that they haven't
16861 yet been added to a BB.
16862
16863 2018-03-08 Richard Biener <rguenther@suse.de>
16864
16865 PR tree-optimization/84746
16866 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16867 (phi_translate): Pass in destination ANTIC_OUT set.
16868 (phi_translate_1): Likewise. For a simplified result lookup
16869 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16870 (phi_translate_set): Adjust.
16871 (do_pre_regular_insertion): Likewise.
16872 (do_pre_partial_partial_insertion): Likewise.
16873
16874 2018-03-08 Martin Liska <mliska@suse.cz>
16875
16876 PR gcov-profile/84735
16877 * doc/gcov.texi: Document usage of profile files.
16878 * gcov-io.h: Document changes in the format.
16879
16880 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16881
16882 PR debug/84404
16883 PR debug/84408
16884 * dwarf2out.c (struct dw_line_info_table): Update comments for
16885 view == -1.
16886 (FORCE_RESET_NEXT_VIEW): New.
16887 (FORCE_RESETTING_VIEW_P): New.
16888 (RESETTING_VIEW_P): Check for -1 too.
16889 (ZERO_VIEW_P): Likewise.
16890 (new_line_info_table): Force-reset next view.
16891 (dwarf2out_begin_function): Likewise.
16892 (dwarf2out_source_line): Simplify zero_view_p initialization.
16893 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16894 view directly. Omit view when omitting .loc at line 0.
16895
16896 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16897
16898 PR tree-optimization/84740
16899 * tree-switch-conversion.c (process_switch): Call build_constructors
16900 only if info.phi_count is non-zero.
16901
16902 PR tree-optimization/84739
16903 * tree-tailcall.c (find_tail_calls): Check call arguments against
16904 DECL_ARGUMENTS (current_function_decl) rather than
16905 DECL_ARGUMENTS (func) when checking for tail recursion.
16906
16907 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16908
16909 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16910 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16911 Volker Reichelt's entry and add entries for people that perform
16912 GCC fuzzy testing and report numerous bugs.
16913
16914 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16915
16916 PR target/82411
16917 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16918 readonly data in sdata, if that is disabled.
16919 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16920 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16921 -mreadonly-in-sdata option.
16922
16923 2018-03-07 Martin Sebor <msebor@redhat.com>
16924
16925 PR tree-optimization/84468
16926 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16927 basic block when looking for nul assignment.
16928
16929 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16930
16931 PR target/84277
16932 * except.h (output_function_exception_table): Adjust prototype.
16933 * except.c (output_function_exception_table): Remove FNNAME parameter
16934 and add SECTION parameter. Ouput one part of the table at a time.
16935 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16936 the first part of the exception table and emit unwind directives.
16937 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16938 (i386_pe_seh_cold_init): Likewise.
16939 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16940 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16941 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16942 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16943 * config/i386/winnt.c: Include except.h.
16944 (struct seh_frame_state): Add reg_offset, after_prologue and
16945 in_cold_section fields.
16946 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16947 (i386_pe_seh_cold_init): New function.
16948 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16949 to seh->in_cold_section.
16950 (seh_emit_push): Record the offset of the push.
16951 (seh_emit_save): Record the offet of the save.
16952 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16953 Test seh->after_prologue to disregard the epilogue.
16954 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16955 (i386_pe_end_cold_function): New function.
16956
16957 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16958
16959 PR fortran/84565
16960 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16961 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16962
16963 PR c++/84704
16964 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16965 on tmp_var.
16966 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16967 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16968
16969 PR middle-end/84723
16970 * multiple_target.c: Include tree-inline.h and intl.h.
16971 (expand_target_clones): Diagnose and fail if node->definition and
16972 !tree_versionable_function_p (node->decl).
16973
16974 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16975
16976 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16977 sprint_ul.
16978 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16979 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16980 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16981
16982 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16983
16984 PR target/84710
16985 * combine.c (try_combine): Use reg_or_subregno instead of handling
16986 just paradoxical SUBREGs and REGs.
16987
16988 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16989
16990 * config/arc/arc.c (arc_finalize_pic): Remove function.
16991 (arc_must_save_register): We use single base PIC register, remove
16992 checks to save/restore the PIC register.
16993 (arc_expand_prologue): Likewise.
16994 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16995 Remove.
16996 (arc_verify_short): Likewise.
16997 (arc_attr_type): Likewise.
16998 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16999 (walk_stores): Likewise.
17000 (arc_address_cost): Make it static.
17001 (arc_verify_short): Likewise.
17002 (branch_dest): Likewise.
17003 (arc_attr_type): Likewise.
17004 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17005 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17006 (arc_final_prescan_insn): Remove inserting the nops due to
17007 hardware hazards. It is done in reorg step.
17008 (insn_length_variant_t): Remove.
17009 (insn_length_parameters_t): Likewise.
17010 (arc_insn_length_parameters): Likewise.
17011 (arc_get_insn_variants): Likewise.
17012 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17013
17014 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17015
17016 PR inline-asm/84683
17017 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17018 assertion failure.
17019
17020 PR tree-optimization/84687
17021 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17022 on new_node->decl.
17023 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17024
17025 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17026
17027 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17028 Rename to ppc_speculation_barrier.
17029 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17030 __builtin_ppc_speculation_barrier.
17031
17032 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17033
17034 PR target/84700
17035 * combine.c (combine_simplify_rtx): Don't try to simplify if
17036 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17037 are equal to x.
17038
17039 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17040
17041 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17042 to 32 bytes when compiling for POWER9.
17043
17044 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17045
17046 PR target/84564
17047 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17048 regparm >= 3 with no arg reg available also for calls with
17049 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17050
17051 PR target/84524
17052 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17053 orig,vex.
17054 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17055
17056 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17057
17058 PR target/84264
17059 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17060
17061 2018-03-05 Richard Biener <rguenther@suse.de>
17062
17063 PR tree-optimization/84486
17064 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17065 When inserting a __builtin_assume_aligned call set the LHS
17066 SSA name alignment info accordingly.
17067
17068 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17069
17070 PR tree-optimization/84114
17071 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17072 Avoid reassociation of FLOAT_MODE addition.
17073
17074 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17075
17076 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17077 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17078 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17079 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17080 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17081 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17082 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17083 and -mwbnoinvd.
17084 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17085 __builtin_ia32_wbinvd): New builtins.
17086 (SPECIAL_ARGS2): New.
17087 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17088 (SPECIAL_ARGS2): New.
17089 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17090 (ix86_valid_target_attribute_inner_p): Ditto.
17091 (ix86_init_mmx_sse_builtins): Add special_args2.
17092 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17093 TARGET_WBNOINVD_P): New.
17094 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17095 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17096 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17097 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17098 * config/i386/pconfigintrin.h: New file.
17099 * config/i386/wbnoinvdintrin.h: Ditto.
17100 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17101 wbnoinvdintrin.h.
17102 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17103
17104 2018-03-05 Richard Biener <rguenther@suse.de>
17105
17106 PR tree-optimization/84670
17107 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17108 member.
17109 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17110 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17111 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17112 doesn't grow if all successors (recursively) were visited at least
17113 once.
17114
17115 2018-03-05 Richard Biener <rguenther@suse.de>
17116
17117 PR tree-optimization/84650
17118 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17119 if executed in the loop pipeline.
17120
17121 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17122
17123 * doc/configfiles.texi (Configuration Files): Move info about
17124 conditionalizing $target-protos.h to...
17125 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17126 differs from $target-protos.h.
17127
17128 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17129 Chung-Ju Wu <jasonwucj@gmail.com>
17130
17131 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17132 * config/nds32/nds32-multiple.md (setmemsi): Define.
17133 * config/nds32/nds32-memory-manipulation.c
17134 (nds32_gen_dup_4_byte_to_word_value): New.
17135 (emit_setmem_word_loop): New.
17136 (emit_setmem_byte_loop): New.
17137 (nds32_expand_setmem_loop): New.
17138 (nds32_expand_setmem_loop_v3m): New.
17139 (nds32_expand_setmem_unroll): New.
17140 (nds32_expand_setmem): New.
17141
17142 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17143 Chung-Ju Wu <jasonwucj@gmail.com>
17144
17145 * config/nds32/nds32-memory-manipulation.c
17146 (nds32_emit_load_store): New.
17147 (nds32_emit_post_inc_load_store): New.
17148 (nds32_emit_mem_move): New.
17149 (nds32_emit_mem_move_block): New.
17150 (nds32_expand_movmemsi_loop_unknown_size): New.
17151 (nds32_expand_movmemsi_loop_known_size): New.
17152 (nds32_expand_movmemsi_loop): New.
17153 (nds32_expand_movmemsi_unroll): New.
17154 (nds32_expand_movmemqi): Rename ...
17155 (nds32_expand_movmemsi): ... to this.
17156 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17157 (movmemsi): ... to this.
17158 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17159 (nds32_expand_movmemsi): ... to this.
17160
17161 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17162 Monk Chiang <sh.chiang04@gmail.com>
17163 Chung-Ju Wu <jasonwucj@gmail.com>
17164
17165 * config/nds32/nds32-protos.h
17166 (nds32_expand_load_multiple): New arguments.
17167 (nds32_expand_store_multiple): Ditto.
17168 (nds32_valid_multiple_load_store): Rename ...
17169 (nds32_valid_multiple_load_store_p): ... to this.
17170 * config/nds32/nds32-memory-manipulation.c
17171 (nds32_expand_load_multiple): Refine implementation.
17172 (nds32_expand_store_multiple): Ditto.
17173 * config/nds32/nds32-multiple.md
17174 (load_multiple): Update nds32_expand_load_multiple interface.
17175 (store_multiple): Update nds32_expand_store_multiple interface.
17176 * config/nds32/nds32-predicates.c
17177 (nds32_valid_multiple_load_store): Rename ...
17178 (nds32_valid_multiple_load_store_p): ... to this and refine
17179 implementation.
17180 * config/nds32/predicates.md
17181 (nds32_load_multiple_and_update_address_operation): New predicate.
17182 (nds32_store_multiple_and_update_address_operation): New predicate.
17183
17184 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17185 Chung-Ju Wu <jasonwucj@gmail.com>
17186
17187 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17188 (combo): New attribute.
17189 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17190
17191 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17192
17193 * config/nds32/nds32.opt: Change -mcmodel= default value.
17194
17195 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17196 Monk Chiang <sh.chiang04@gmail.com>
17197 Chung-Ju Wu <jasonwucj@gmail.com>
17198
17199 * config/nds32/constants.md (unspec_element): New enum.
17200 * config/nds32/constraints.md (Umw): New constraint.
17201 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17202 * config/nds32/nds32-intrinsic.md: Likewise.
17203 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17204 (nds32_valid_smw_lwm_base_p): New.
17205 (nds32_output_smw_single_word): New.
17206 (nds32_output_lmw_single_word): New.
17207 (nds32_expand_unaligned_load): New.
17208 (nds32_expand_unaligned_store): New.
17209 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17210 (nds32_output_smw_single_word): Declare.
17211 (nds32_output_lmw_single_word): Declare.
17212 (nds32_expand_unaligned_load): Declare.
17213 (nds32_expand_unaligned_store): Declare.
17214 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17215 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17216 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17217 NDS32_BUILTIN_UASTORE_DW.
17218 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17219 predicate.
17220
17221 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17222 Kito Cheng <kito.cheng@gmail.com>
17223 Chung-Ju Wu <jasonwucj@gmail.com>
17224
17225 * config/nds32/nds32-intrinsic.c
17226 (nds32_expand_builtin_null_ftype_reg): Delete.
17227 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17228 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17229 (nds32_read_argument): New.
17230 (nds32_legitimize_target): Ditto.
17231 (nds32_legitimize_argument): Ditto.
17232 (nds32_check_constant_argument): Ditto.
17233 (nds32_expand_unop_builtin): Ditto.
17234 (nds32_expand_unopimm_builtin): Ditto.
17235 (nds32_expand_binop_builtin): Ditto.
17236 (nds32_builtin_decl_impl): Ditto.
17237 (builtin_description): Ditto.
17238 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17239 (nds32_init_builtins_impl): Ditto.
17240 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17241 (nds32_builtin_decl): New.
17242 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17243 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17244
17245 2018-03-02 Jeff Law <law@redhat.com>
17246
17247 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17248 (redundant_insn, fill_simple_delay_slots): Likewise.
17249 (fill_slots_from_thread): Likewise.
17250 * resource.c (mark_referenced_resources): Likewise.
17251 (mark_set_resources, find_dead_or_set_registers): Likewise.
17252
17253 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17254
17255 * substring-locations.h (format_warning_va): Formatting fix for
17256 ATTRIBUTE_GCC_DIAG.
17257 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17258 argument.
17259 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17260 * substring-locations.c: Include intl.h.
17261 (format_warning_va): Turned into small wrapper around
17262 format_warning_n_va, renamed to ...
17263 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17264 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17265 use ngettext.
17266 (format_warning_at_substring_n): New function.
17267 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17268 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17269 format_warning_at_substring with just a shorter name instead of
17270 const function pointer.
17271 (fmtwarn_n): New function.
17272 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17273 appropriate, get rid of all the fmtstr temporaries, move conditionals
17274 with G_() wrapped string literals directly into fmtwarn arguments,
17275 cast dir.len to (int), formatting fixes.
17276
17277 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17278
17279 * doc/invoke.texi: Remove "Cilk Plus" references.
17280
17281 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17282 Richard Biener <rguenther@suse.de>
17283
17284 PR ipa/84628
17285 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17286 for error or warning attributes if CALL_FROM_THUNK_P is set.
17287 Formatting fixes.
17288
17289 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17290
17291 PR target/56540
17292 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17293 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17294
17295 PR target/56540
17296 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17297 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17298
17299 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17300 instead of -1U in last predictors element's probability member.
17301
17302 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17303
17304 PR ipa/83983
17305 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17306 arguments if they are comparable.
17307
17308 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17309
17310 PR tree-optimization/84634
17311 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17312 masks and masked_loop_p with a single loop_masks, making sure it's
17313 null for bb vectorization.
17314
17315 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17316
17317 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17318 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17319 loop->force_vectorize to check whether there is no alias.
17320
17321 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17322
17323 PR target/84614
17324 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17325 prototypes.
17326 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17327 comments.
17328 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17329 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17330 instead of a loop around prev_real_insn.
17331 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17332 prev_real_insn.
17333
17334 PR inline-asm/84625
17335 * config/i386/i386.c (ix86_print_operand): Use conditional
17336 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17337 zero vector.
17338
17339 2018-03-02 Richard Biener <rguenther@suse.de>
17340
17341 PR tree-optimization/84427
17342 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17343 (bitmap_set_subtract_values): Rewrite to handle multiple
17344 exprs per value.
17345 (clean): Likewise.
17346 (prune_clobbered_mems): Likewise.
17347 (phi_translate): Take edge instead of pred/phiblock.
17348 (phi_translate_1): Likewise.
17349 (phi_translate_set): Likewise. Insert all translated
17350 exprs for a value into the set, keeping possibly multiple
17351 expressions per value.
17352 (compute_antic_aux): Adjust for phi_translate changes.
17353 When intersecting union the expressions and prune those
17354 not in the final value set, keeping possibly multiple
17355 expressions per value. Do not use value-insertion
17356 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17357 all expressions. Add verification that the value-sets
17358 only shrink during iteration.
17359 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17360 (do_pre_regular_insertion): Likewise.
17361 (do_pre_partial_partial_insertion): Likewise.
17362
17363 2018-03-02 Richard Biener <rguenther@suse.de>
17364
17365 PR target/82005
17366 * config/darwin.c (saved_debug_info_level): New static global.
17367 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17368 (darwin_asm_lto_end): Restore debug info generation settings.
17369
17370 2018-03-01 Martin Liska <mliska@suse.cz>
17371
17372 PR sanitizer/82484
17373 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17374 volatile arguments.
17375
17376 2018-03-01 Richard Biener <rguenther@suse.de>
17377
17378 PR debug/84645
17379 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17380 type annotation with LTO when debug was disabled at compile-time.
17381
17382 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17383
17384 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17385 XINT with INTVAL.
17386 (mips_final_postscan_insn): Likewise.
17387
17388 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17389
17390 PR rtl-optimization/84528
17391 * alias.c (init_alias_target): Add commentary.
17392 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17393 a unique base value if the frame pointer is not eliminated
17394 to the stack pointer.
17395
17396 2018-03-01 Tom de Vries <tom@codesourcery.com>
17397
17398 PR rtl-optimization/83327
17399 * lra-int.h (hard_regs_spilled_into): Declare.
17400 * lra.c (hard_regs_spilled_into): Define.
17401 (init_reg_info): Init hard_regs_spilled_into.
17402 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17403 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17404 (process_bb_lives): Handle hard_regs_spilled_into.
17405 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17406 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17407
17408 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17409
17410 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17411 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17412 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17413 * config/rs6000/aix72.h: New file.
17414
17415 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17416
17417 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17418 instead of warning_at with conditional singular and plural messages
17419 where possible.
17420
17421 PR target/52991
17422 * stor-layout.c (update_alignment_for_field): For
17423 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17424 && !DECL_PACKED (field), do the alignment update, just use
17425 only desired_align instead of MAX (type_align, desired_align)
17426 as the alignment.
17427 (place_field): Don't do known_align < desired_align handling
17428 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17429 is non-NULL, instead do it after rli->prev_field handling and
17430 only if not within a bitfield word. For DECL_PACKED (field)
17431 use type_align of BITS_PER_UNIT.
17432
17433 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17434
17435 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17436 superfluous parentheses and trailing spaces.
17437
17438 2018-02-28 Richard Biener <rguenther@suse.de>
17439
17440 PR tree-optimization/84584
17441 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17442 SCoPs with fake exit edge.
17443
17444 2018-02-28 Martin Liska <mliska@suse.cz>
17445
17446 PR testsuite/84597
17447 * timevar.c (timer::print): Fix format to properly print 100%
17448 values.
17449
17450 2018-02-28 Richard Biener <rguenther@suse.de>
17451
17452 PR middle-end/84607
17453 * genmatch.c (capture_info::walk_match): Do not mark
17454 captured expressions without operands as expr_p given
17455 they act more like predicates and should be subject to
17456 "lost tail" side-effect preserving.
17457
17458 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17459
17460 PR rtl-optimization/81611
17461 * auto-inc-dec.c (attempt_change): Move dead note from
17462 mem_insn if it's the next use of regno
17463 (find_address): Take address use of reg holding
17464 non-incremented value. Add parm to limit search to the named
17465 reg only.
17466 (merge_in_block): Attempt to use a mem insn that is the next
17467 use of the original regno.
17468
17469 2018-02-27 Martin Sebor <msebor@redhat.com>
17470
17471 PR c++/83871
17472 * doc/invoke.texi (-Wmissing-attributes): New option.
17473 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17474
17475 2018-02-27 Martin Sebor <msebor@redhat.com>
17476
17477 PR translation/84207
17478 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17479 n argument to unsigned HOST_WIDE_INT.
17480 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17481 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17482 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17483 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17484
17485 2018-02-27 Richard Biener <rguenther@suse.de>
17486
17487 PR tree-optimization/84512
17488 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17489 Do not use the estimate returned from record_stmt_cost for
17490 the scalar iteration cost but sum properly using add_stmt_cost.
17491
17492 2018-02-27 Richard Biener <rguenther@suse.de>
17493
17494 PR tree-optimization/84466
17495 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17496 Adjust last change to less strictly validate use operands.
17497
17498 2018-02-27 Martin Liska <mliska@suse.cz>
17499
17500 PR gcov-profile/84548
17501 * gcov.c (process_file): Allow partial overlap and consider it
17502 also as group functions.
17503 (output_lines): Properly calculate range of lines for a group.
17504
17505 2018-02-27 Martin Liska <mliska@suse.cz>
17506
17507 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17508 'ggc' suffixes. Change first column width.
17509 (timer::print): Fix formatting of the column.
17510
17511 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17512
17513 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17514 preserve inline entry blocks for the sake of debug inline
17515 entry point markers alone.
17516 (remove_unused_locals): Suggest in comments a better place to
17517 force the preservation of inline entry blocks that are
17518 otherwise unused, but do not preserve them.
17519
17520 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17521
17522 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17523
17524 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17525
17526 PR target/84039
17527 * config/i386/constraints.md (Bs): Replace
17528 ix86_indirect_branch_register with
17529 TARGET_INDIRECT_BRANCH_REGISTER.
17530 (Bw): Likewise.
17531 * config/i386/i386.md (indirect_jump): Likewise.
17532 (tablejump): Likewise.
17533 (*sibcall_memory): Likewise.
17534 (*sibcall_value_memory): Likewise.
17535 Peepholes of indirect call and jump via memory: Likewise.
17536 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17537 (*sibcall_value_GOT_32): Likewise.
17538 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17539 (GOT_memory_operand): Likewise.
17540 (call_insn_operand): Likewise.
17541 (sibcall_insn_operand): Likewise.
17542 (GOT32_symbol_operand): Likewise.
17543 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17544
17545 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17546
17547 PR rtl-optimization/83496
17548 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17549 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17550 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17551 redundant insn, if any.
17552 (relax_delay_slots): Likewise.
17553 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17554
17555 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17556
17557 PR tree-optimization/83965
17558 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17559 that grouped statements are part of a reduction chain. Return
17560 true if the statement is not marked as a reduction itself but
17561 is part of a group.
17562 (vect_recog_dot_prod_pattern): Don't check whether the statement
17563 is part of a group here.
17564 (vect_recog_sad_pattern): Likewise.
17565 (vect_recog_widen_sum_pattern): Likewise.
17566
17567 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17568
17569 PR debug/84545
17570 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17571
17572 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17573
17574 PR target/84530
17575 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17576 the bool argument.
17577 (ix86_output_indirect_function_return): New prototype.
17578 (ix86_split_simple_return_pop_internal): Likewise.
17579 * config/i386/i386.c (indirect_return_via_cx): New.
17580 (indirect_return_via_cx_bnd): Likewise.
17581 (indirect_thunk_name): Handle return va CX_REG.
17582 (output_indirect_thunk_function): Create alias for
17583 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17584 (ix86_output_indirect_jmp): Remove the bool argument.
17585 (ix86_output_indirect_function_return): New function.
17586 (ix86_split_simple_return_pop_internal): Likewise.
17587 * config/i386/i386.md (*indirect_jump): Don't pass false
17588 to ix86_output_indirect_jmp.
17589 (*tablejump_1): Likewise.
17590 (simple_return_pop_internal): Change it to define_insn_and_split.
17591 Call ix86_split_simple_return_pop_internal to split it for
17592 -mfunction-return=.
17593 (simple_return_indirect_internal): Call
17594 ix86_output_indirect_function_return instead of
17595 ix86_output_indirect_jmp.
17596
17597 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17598
17599 PR bootstrap/84405
17600 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17601 memset and value initialization afterwards.
17602
17603 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17604
17605 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17606
17607 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17608
17609 PR target/84521
17610 * common/config/aarch64/aarch64-common.c
17611 (aarch_option_optimization_table[]): Switch
17612 off fomit-frame-pointer
17613
17614 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17615 Chung-Ju Wu <jasonwucj@gmail.com>
17616
17617 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17618 volatile memory.
17619 (store_multiple): Ditto.
17620
17621 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17622
17623 * config.gcc: Add --with-cpu support for nds32 target.
17624 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17625 * config/nds32/nds32.opt: Add -mcpu= option.
17626
17627 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17628
17629 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17630 isel=yes): Warn for these deprecated options.
17631
17632 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17633
17634 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17635 ISA_2_5_MASKS_EMBEDDED.
17636
17637 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17638
17639 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17640 p->max as pointers rather than using iterative_hash_expr.
17641
17642 2018-02-23 Carl Love <cel@us.ibm.com>
17643
17644 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17645 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17646 BU_P8V_OVERLOAD_2.
17647 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17648 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17649 P8V_BUILTIN_VEC_VUNSIGNED2.
17650
17651 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17652
17653 PR target/81572
17654 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17655 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17656 LRA_UNKNOWN_ALT.
17657 * lra-constraints.c (curr_insn_transform): Set up
17658 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17659 LRA_UNKNOWN_ALT.
17660 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17661 * lra-eliminations.c (spill_pseudos): Ditto.
17662 (process_insn_for_elimination): Ditto.
17663 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17664 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17665 LRA_NON_CLOBBERED_ALT.
17666
17667 2018-02-22 Martin Sebor <msebor@redhat.com>
17668
17669 PR tree-optimization/84480
17670 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17671 to maybe_diag_stxncpy_trunc. Call it.
17672 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17673 from gimple_fold_builtin_strcpy. Print inlining stack.
17674 (handle_builtin_stxncpy): Print inlining stack.
17675 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17676
17677 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17678
17679 PR target/84176
17680 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17681 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17682 and -fcheck-pointer-bounds are used together.
17683 (indirect_thunk_prefix): New enum.
17684 (indirect_thunk_need_prefix): New function.
17685 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17686 "_nt" instead of "_bnd" for NOTRACK prefix.
17687 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17688 (output_indirect_thunk_function): Likewise.
17689 (): Likewise.
17690 (ix86_code_end): Update output_indirect_thunk_function calls.
17691 (ix86_output_indirect_branch_via_reg): Replace
17692 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17693 (ix86_output_indirect_branch_via_push): Likewise.
17694 (ix86_output_function_return): Likewise.
17695 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17696 incompatible with -fcf-protection=branch and
17697 -fcheck-pointer-bounds.
17698
17699 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17700
17701 PR target/83335
17702 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17703 Change gcc_assert call to output_operand_lossage.
17704
17705 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17706
17707 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17708
17709 2018-02-22 DJ Delorie <dj@redhat.com>
17710 Sebastian Perta <sebastian.perta@renesas.com>
17711 Oleg Endo <olegendo@gcc.gnu.org>
17712
17713 * config/rx/rx.c (rx_rtx_costs): New function.
17714 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17715
17716 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17717
17718 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17719
17720 2018-02-22 Martin Liska <mliska@suse.cz>
17721
17722 PR driver/83193
17723 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17724 Add "native" as a possible value.
17725
17726 2018-02-22 Martin Liska <mliska@suse.cz>
17727
17728 PR driver/83193
17729 * config/i386/i386.c (ix86_option_override_internal):
17730 Add "native" as a possible value for -march and -mtune.
17731
17732 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17733
17734 PR target/84502
17735 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17736 to all type variants.
17737
17738 PR tree-optimization/84503
17739 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17740 width as info->bitpos + info->bitsize - start.
17741 (merged_store_group::merge_overlapping): Simplify width computation.
17742 (check_no_overlap): New function.
17743 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17744 start + width and last_order of the group, fail if check_no_overlap
17745 fails.
17746 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17747 to group if check_no_overlap fails.
17748
17749 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17750
17751 * config/rs6000/altivec.md: Delete contraint arguments to
17752 define_expand, define_split, and define_peephole2, and in
17753 define_insn_and_split if always unused.
17754 * config/rs6000/darwin.md: Ditto.
17755 * config/rs6000/dfp.md: Ditto.
17756 * config/rs6000/rs6000.md: Ditto.
17757 * config/rs6000/sync.md: Ditto.
17758 * config/rs6000/vector.md: Ditto.
17759 * config/rs6000/vsx.md: Ditto.
17760
17761 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17762
17763 * config/rs6000/altivec.md: Write output control strings as braced
17764 blocks instead of double-quoted strings.
17765 * config/rs6000/darwin.md: Ditto.
17766 * config/rs6000/rs6000.md: Ditto.
17767 * config/rs6000/vector.md: Ditto.
17768 * config/rs6000/vsx.md: Ditto.
17769
17770 2018-02-21 Jason Merrill <jason@redhat.com>
17771
17772 PR c++/84314 - ICE with templates and fastcall attribute.
17773 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17774
17775 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17776
17777 * ipa-cp.c (determine_versionability): Fix comment typos.
17778
17779 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17780
17781 PR c/84229
17782 * ipa-cp.c (determine_versionability): Do not version functions caling
17783 va_arg_pack.
17784
17785 2018-02-21 Martin Liska <mliska@suse.cz>
17786
17787 PR driver/83193
17788 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17789 Add "native" as a possible value.
17790 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17791 the macro when native cpu detection is available.
17792
17793 2018-02-21 Martin Liska <mliska@suse.cz>
17794
17795 PR driver/83193
17796 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17797 Add "native" as a possible value.
17798 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17799 when native cpu detection is available.
17800
17801 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17802 Martin Sebor <msebor@redhat.com>
17803
17804 PR tree-optimization/84478
17805 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17806 false.
17807 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17808 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17809 support which is conservatively correct, for 2 only stay conservative
17810 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17811 argument to the 2 argument get_range_strlen, adjust 6 arg
17812 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17813 false.
17814 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17815 (gimple_fold_builtin_strlen): Pass true as last argument to
17816 get_range_strlen.
17817
17818 2018-02-20 Martin Sebor <msebor@redhat.com>
17819
17820 PR middle-end/84095
17821 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17822 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17823 (builtin_memref::builtin_memref): Factor out parts into
17824 set_base_and_offset and call it.
17825
17826 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17827
17828 PR middle-end/84406
17829 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17830 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17831 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17832 search at the associated MODE_INT.
17833
17834 2018-02-20 Jeff Law <law@redhat.com>
17835
17836 PR middle-end/82123
17837 PR tree-optimization/81592
17838 PR middle-end/79257
17839 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17840 for range data rather than using global data.
17841 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17842 range data rather than using global data.
17843 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17844 pass it to children as needed.
17845 (struct directive::fmtresult): Similarly.
17846 (struct directive::set_width): Similarly.
17847 (struct directive::set_precision): Similarly.
17848 (format_integer, format_directive, parse_directive): Similarly.
17849 (format_none): Accept unnamed vr_values parameter.
17850 (format_percent, format_floating, format_character): Similarly.
17851 (format_string, format_plain): Similarly.
17852 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17853 the EVRP range analyzer for range data rather than using global data.
17854 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17855 gimple-ssa-evrp-analyze.h
17856 (class sprintf_dom_walker): Add after_dom_children member function.
17857 Add evrp_range_analyzer member.
17858 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17859 range analyzer as needed.
17860 (sprintf_dom_walker::after_dom_children): New member function.
17861 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17862 if not optimizing.
17863 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17864 (evrp_range_analyzer::pop_to_marker): Likewise.
17865
17866 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17867
17868 PR tree-optimization/84419
17869 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17870 with the required type if its current type is compatible but
17871 different.
17872
17873 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17874
17875 PR middle-end/82004
17876 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17877 after vectorization.
17878
17879 2018-02-20 Martin Liska <mliska@suse.cz>
17880
17881 PR driver/83193
17882 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17883 possible values if we don't have a hint.
17884
17885 2018-02-20 Martin Liska <mliska@suse.cz>
17886
17887 PR c/84310
17888 PR target/79747
17889 * final.c (shorten_branches): Build align_tab array with one
17890 more element.
17891 * opts.c (finish_options): Add alignment option limit check.
17892 (MAX_CODE_ALIGN): Likewise.
17893 (MAX_CODE_ALIGN_VALUE): Likewise.
17894 * doc/invoke.texi: Document maximum allowed option value for
17895 all -falign-* options.
17896
17897 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17898
17899 PR target/84146
17900 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17901 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17902 * var-tracking.c (emit_note_insn_var_location): Remove all references
17903 to NOTE_INSN_CALL_ARG_LOCATION.
17904 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17905 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17906 Use copy_rtx_if_shared.
17907 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17908 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17909 (dwarf2out_var_location): Remove handling of
17910 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17911 on call_insn.
17912 * final.c (final_scan_insn): Remove all references to
17913 NOTE_INSN_CALL_ARG_LOCATION.
17914 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17915 before dumping final insns.
17916 * except.c (emit_note_eh_region_end): Remove all references to
17917 NOTE_INSN_CALL_ARG_LOCATION.
17918 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17919 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17920 * config/arc/arc.c (hwloop_optimize): Likewise.
17921 * config/arm/arm.c (create_fix_barrier): Likewise.
17922 * config/s390/s390.c (s390_chunkify_start): Likewise.
17923 * config/sh/sh.c (find_barrier): Likewise.
17924 * config/i386/i386.c (rest_of_insert_endbranch,
17925 ix86_seh_fixup_eh_fallthru): Likewise.
17926 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17927 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17928 * config/frv/frv.c (frv_function_prologue): Likewise.
17929 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17930 reg note.
17931 (note_outside_basic_block_p): Remove all references to
17932 NOTE_INSN_CALL_ARG_LOCATION.
17933 * gengtype.c (adjust_field_rtx_def): Likewise.
17934 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17935 Likewise.
17936 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17937 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17938
17939 PR c++/84444
17940 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17941 is ADDR_EXPR.
17942
17943 PR tree-optimization/84452
17944 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17945 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17946 is NULL.
17947
17948 2018-02-19 Martin Liska <mliska@suse.cz>
17949
17950 PR sanitizer/82183
17951 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17952
17953 2018-02-19 Martin Liska <mliska@suse.cz>
17954 Richard Sandiford <richard.sandiford@linaro.org>
17955
17956 PR tree-optimization/82491
17957 * gimple-fold.c (get_base_constructor): Make earlier bail out
17958 to prevent ubsan.
17959
17960 2018-02-19 Carl Love <cel@us.ibm.com>
17961
17962 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17963 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17964 BU_P8V_OVERLOAD_1.
17965 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17966 P8V_BUILTIN_VEC_NEG.
17967
17968 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17969
17970 * config/rl78/rl78.md (movdf): New define expand.
17971
17972 2018-02-19 Martin Liska <mliska@suse.cz>
17973
17974 PR other/80589
17975 * doc/invoke.texi: Fix typo.
17976 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17977
17978 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17979
17980 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17981 handle rs6000_single_float and rs6000_double_float specially for
17982 e500 family CPUs.
17983
17984 2018-02-16 Jeff Law <law@redhat.com>
17985
17986 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17987 (pop_regs): Use it.
17988
17989 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17990
17991 PR ipa/84425
17992 * ipa-inline.c (inline_small_functions): Fix a typo.
17993
17994 2018-02-16 Nathan Sidwell <nathan@acm.org>
17995
17996 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17997
17998 2018-02-16 Carl Love <cel@us.ibm.com>
17999
18000 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18001 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18002 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18003 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18004 expansion to P8V_BUILTIN_VEC_FLOAT2.
18005
18006 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18007
18008 PR rtl-optimization/70023
18009 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18010 src_regno into account.
18011
18012 2018-02-16 Carl Love <cel@us.ibm.com>
18013
18014 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18015 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18016 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18017 * config/rs6000/rs6000.c: Remove case statements for
18018 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18019 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18020 and P9V_BUILTIN_VEC_VINSERT4B.
18021 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18022 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18023 * config/rs6000/vsx.md:
18024 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18025 vec_insert4b.
18026
18027 2018-02-16 Carl Love <cel@us.ibm.com>
18028
18029 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18030 vec_insert4b.
18031 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18032 definitions.
18033 * config/rs6000/rs6000-c.c: Add the definitions for
18034 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18035 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18036 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18037 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18038 definition for insert4b and define insn *insert3b_internal.
18039 * doc/extend.texi: Add documentation for vec_extract4b.
18040
18041 2018-02-16 Nathan Sidwell <nathan@acm.org>
18042
18043 * doc/extend.texi (Backwards Compatibility): Mention friend
18044 injection. Note for-scope is deprecated.
18045 * doc/invoke.texi (-ffriend-injection): Deprecate.
18046
18047 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18048
18049 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18050 that moved to I2, also allow destinations that are a paradoxical
18051 subreg (instead of a normal reg).
18052
18053 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18054
18055 PR target/83831
18056 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18057 to QImode.
18058
18059 2018-02-16 Richard Biener <rguenther@suse.de>
18060
18061 PR tree-optimization/84037
18062 PR tree-optimization/84016
18063 PR target/82862
18064 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18065 Adjust vec_construct for the fact we need additional higher latency
18066 128bit inserts for AVX256 and AVX512 vector builds.
18067 (ix86_add_stmt_cost): Scale vector construction cost for
18068 elementwise loads.
18069
18070 2018-02-16 Richard Biener <rguenther@suse.de>
18071
18072 PR tree-optimization/84417
18073 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18074 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18075 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18076
18077 2018-02-16 Martin Liska <mliska@suse.cz>
18078
18079 PR sanitizer/84307
18080 * internal-fn.def (ASAN_CHECK): Set proper flags.
18081 (ASAN_MARK): Likewise.
18082
18083 2018-02-16 Julia Koval <julia.koval@intel.com>
18084
18085 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18086 from PTA_CANNONLAKE.
18087
18088 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18089
18090 PR target/84272
18091 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18092 Use ++iter rather than iter++ for std::list iterators.
18093 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18094 defer deleting them until all nodes in the forest are processed. Do
18095 free even leaf nodes. Change to_process into auto_vec.
18096
18097 PR bootstrap/84405
18098 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18099 * vec.h (vec_default_construct): Use memset instead of placement new
18100 if BROKEN_VALUE_INITIALIZATION is defined.
18101 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18102 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18103 is defined.
18104
18105 PR rtl-optimization/83723
18106 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18107 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18108 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18109 recursive calls.
18110 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18111 callers.
18112 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18113
18114 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18115
18116 PR rtl-optimization/81443
18117 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18118 from inner REGs to paradoxical SUBREGs.
18119
18120 2018-02-16 Richard Biener <rguenther@suse.de>
18121
18122 PR tree-optimization/84399
18123 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18124 For operands we can analyze at their definition make sure we can
18125 analyze them at each use as well.
18126
18127 2018-02-16 Richard Biener <rguenther@suse.de>
18128
18129 PR tree-optimization/84190
18130 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18131 volatile accesses if the decl isn't volatile.
18132
18133 2018-02-15 Jason Merrill <jason@redhat.com>
18134
18135 PR c++/84314 - ICE with templates and fastcall attribute.
18136 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18137 TYPE_CANONICAL on an existing type.
18138
18139 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18140
18141 PR tree-optimization/84383
18142 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18143 dstoff nor call operand_equal_p if dstbase is NULL.
18144
18145 PR tree-optimization/84334
18146 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18147 also a CONSTANT_CLASS_P, punt.
18148
18149 2018-02-14 Jim Wilson <jimw@sifive.com>
18150
18151 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18152 first SMALL_OPERAND check. New local min_second_step. Move assert
18153 to where locals are set. Add TARGET_RVC support.
18154 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18155
18156 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18157
18158 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18159
18160 2018-02-14 Martin Sebor <msebor@redhat.com>
18161
18162 PR tree-optimization/83698
18163 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18164 arrays constrain the offset range to their bounds.
18165 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18166 (builtin_access::overlap): Avoid setting the size of overlap if it's
18167 already been set.
18168 (maybe_diag_overlap): Also consider arrays when deciding what values
18169 of offsets to include in diagnostics.
18170
18171 2018-02-14 Martin Sebor <msebor@redhat.com>
18172
18173 PR c/84108
18174 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18175 that correspond to the kind of a declaration.
18176
18177 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18178
18179 PR target/83984
18180 * config/pa/pa.md: Load address of PIC label using the linkage table
18181 if the label is nonlocal.
18182
18183 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18184
18185 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18186 warning message if user requests -maltivec=be.
18187 * doc/invoke.texi: Document deprecation of -maltivec=be.
18188
18189 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18190
18191 PR target/84220
18192 * config/rs6000/rs6000-c.c: Update definitions for
18193 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18194 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18195
18196 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18197
18198 PR target/84239
18199 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18200 add _get_ssp intrinsics. Remove argument from
18201 __builtin_ia32_rdssp[d|q].
18202 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18203 * config/i386/i386-builtin.def: Remove argument from
18204 __builtin_ia32_rdssp[d|q].
18205 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18206 ix86_expand_special_args_builtin for _rdssp[d|q].
18207 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18208 Clear register before usage.
18209 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18210 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18211
18212 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18213
18214 PR tree-optimization/84357
18215 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18216 operand 1 of an ARRAY_REF too.
18217
18218 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18219
18220 PR target/83831
18221 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18222 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18223 declarations.
18224 (set_of_reg): New struct.
18225 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18226 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18227 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18228 functions.
18229 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18230 Split into bitclr, bitset, bitinvert patterns if appropriate.
18231 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18232 use rx_fuse_in_memory_bitop.
18233 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18234 to named insn, correct maximum insn length.
18235
18236 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18237
18238 PR target/79242
18239 * machmode.def: Define a complex mode for PARTIAL_INT.
18240 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18241 MODE_PARTIAL_INT.
18242 * doc/rtl.texi: Document CSPImode.
18243 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18244 handling.
18245 (msp430_hard_regno_nregs_with_padding): Likewise.
18246
18247 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18248
18249 PR target/84279
18250 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18251
18252 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18253
18254 PR rtl-optimization/84169
18255 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18256 we generated a parallel as new i3 and we split that to new i2 and i3
18257 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18258 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18259 those to i2, not i1. Partially rewrite this scan code.
18260
18261 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18262
18263 PR c/82210
18264 * stor-layout.c (place_field): For variable length fields, adjust
18265 offset_align afterwards not just based on the field's alignment,
18266 but also on the size.
18267
18268 PR middle-end/84309
18269 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18270 of exps and logs in the use_exp2 case.
18271
18272 2018-02-13 Jeff Law <law@redhat.com>
18273
18274 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18275 entry for "vector".
18276
18277 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18278 ARGS as unused.
18279
18280 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18281
18282 PR debug/84342
18283 PR debug/84319
18284 * common.opt (gas-loc-support, gas-locview-support): New.
18285 (ginline-points, ginternal-reset-location-views): New.
18286 * doc/invoke.texi: Document them. Use @itemx where intended.
18287 (gvariable-location-views): Adjust.
18288 * target.def (reset_location_view): New.
18289 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18290 (TARGET_RESET_LOCATION_VIEW): New.
18291 * doc/tm.texi: Rebuilt.
18292 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18293 (dwarf2out_default_as_locview_support): New.
18294 (output_asm_line_debug_info): Use option variables.
18295 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18296 (output_loc_list): Likewise.
18297 (add_high_low_attributes): Check option variables.
18298 Don't output entry view attribute in strict mode.
18299 (gen_inlined_subroutine_die): Check option variables.
18300 (dwarf2out_inline_entry): Likewise.
18301 (init_sections_and_labels): Likewise.
18302 (dwarf2out_early_finish): Likewise.
18303 (maybe_reset_location_view): New, from...
18304 (dwarf2out_var_location): ... here. Call it.
18305 * debug.h (dwarf2out_default_as_loc_support): Declare.
18306 (dwarf2out_default_as_locview_support): Declare.
18307 * hooks.c (hook_int_rtx_insn_0): New.
18308 * hooks.h (hook_int_rtx_insn_0): Declare.
18309 * toplev.c (process_options): Take -gas-loc-support and
18310 -gas-locview-support from dwarf2out. Enable
18311 -gvariable-location-views by default only with locview
18312 assembler support. Enable -ginternal-reset-location-views by
18313 default only if the target defines the corresponding hook.
18314 Enable -ginline-points by default if location views are
18315 enabled; force it disabled if statement frontiers are
18316 disabled.
18317 * tree-inline.c (expand_call_inline): Check option variables.
18318 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18319
18320 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18321
18322 PR tree-optimization/84321
18323 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18324 handling. Also check whether the anti-range contains any values
18325 that satisfy the mask; switch to a VR_RANGE if not.
18326
18327 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18328
18329 PR sanitizer/84340
18330 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18331
18332 2018-02-13 Martin Jambor <mjambor@suse.cz>
18333
18334 PR c++/83990
18335 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18336 of call statements, also set location of a load to a temporary.
18337
18338 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18339
18340 * config/rl78/rl78.c (add_vector_labels): New function.
18341 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18342 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18343 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18344 which checks that no arguments are passed.
18345 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18346 * doc/extend.texi: Documentation for the new attribute.
18347
18348 2018-02-13 Andreas Schwab <schwab@suse.de>
18349
18350 * config/riscv/linux.h (CPP_SPEC): Define.
18351
18352 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18353
18354 PR target/84335
18355 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18356 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18357 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18358 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18359 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18360 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18361 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18362 temporarily for AES and PCLMUL builtins.
18363
18364 PR tree-optimization/84339
18365 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18366 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18367 Formatting fixes.
18368
18369 PR middle-end/84309
18370 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18371 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18372 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18373 inline function.
18374 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18375 inline function.
18376 * omp-simd-clone.h: New file.
18377 * omp-simd-clone.c: Include omp-simd-clone.h.
18378 (expand_simd_clones): No longer static.
18379 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18380 cgraph.h and omp-simd-clone.h.
18381 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18382 (vect_recog_widen_shift_pattern): Formatting fix.
18383 (vect_pattern_recog_1): Don't check optab for calls.
18384
18385 PR target/84336
18386 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18387 operands[2] into a REG before using gen_lowpart on it.
18388
18389 2018-02-12 Jeff Law <law@redhat.com>
18390
18391 PR target/83760
18392 * config/sh/sh.c (find_barrier): Consider a sibling call
18393 a barrier as well.
18394
18395 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18396 successfully back substituting a reg.
18397
18398 2018-02-12 Richard Biener <rguenther@suse.de>
18399
18400 PR tree-optimization/84037
18401 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18402 parameter, move visited init to caller.
18403 (vect_slp_analyze_operations): Separate cost from validity
18404 check, initialize visited once for all instances.
18405 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18406 for all instances.
18407 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18408 out an assert.
18409 (vect_model_promotion_demotion_cost): Likewise.
18410 (vectorizable_bswap): Guard cost modeling with !slp_node
18411 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18412 SLP stmts.
18413 (vectorizable_call): Likewise.
18414 (vectorizable_conversion): Likewise.
18415 (vectorizable_assignment): Likewise.
18416 (vectorizable_shift): Likewise.
18417 (vectorizable_operation): Likewise.
18418 (vectorizable_store): Likewise.
18419 (vectorizable_load): Likewise.
18420 (vectorizable_condition): Likewise.
18421 (vectorizable_comparison): Likewise.
18422
18423 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18424
18425 PR sanitizer/84307
18426 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18427 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18428 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18429
18430 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18431
18432 PR middle-end/83665
18433 * params.def (inline-min-speedup): Increase from 8 to 15.
18434 (max-inline-insns-auto): Decrease from 40 to 30.
18435 * ipa-split.c (consider_split): Add some buffer for function to
18436 be considered inlining candidate.
18437 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18438 default values.
18439
18440 2018-02-12 Richard Biener <rguenther@suse.de>
18441
18442 PR tree-optimization/84037
18443 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18444 matched stmts if we cannot swap the non-matched ones.
18445
18446 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18447
18448 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18449 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18450 _mm_maskz_scalef_round_ss): New intrinsics.
18451 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18452 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18453 __builtin_ia32_scalefss_round): Remove.
18454 (__builtin_ia32_scalefsd_mask_round,
18455 __builtin_ia32_scalefss_mask_round): New intrinsics.
18456 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18457 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18458 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18459 "<round_constraint>")): Changed to ...
18460 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18461 "<round_scalar_constraint>")): ... this.
18462 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18463 %0, %1, %2<round_op3>}"): Changed to ...
18464 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18465 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18466 %2<round_scalar_mask_op3>}"): ... this.
18467 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18468
18469 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18470
18471 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18472 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18473 (_mm_maskz_sqrt_round_ss): New intrinsics.
18474 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18475 (__builtin_ia32_sqrtsd_mask_round)
18476 (__builtin_ia32_sqrtss_mask_round): New builtins.
18477 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18478 (__builtin_ia32_sqrtss_round): Remove.
18479 (__builtin_ia32_sqrtsd_mask_round)
18480 (__builtin_ia32_sqrtss_mask_round): New builtins.
18481 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18482 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18483 ((match_operand:VF_128 1 "vector_operand"
18484 "xBm,<round_constraint>")): Changed to ...
18485 ((match_operand:VF_128 1 "vector_operand"
18486 "xBm,<round_scalar_constraint>")): ... this.
18487 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18488 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18489 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18490 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18491 %<iptr>1<round_scalar_mask_op3>}): ... this.
18492 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18493 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18494
18495 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18496
18497 PR target/84266
18498 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18499 Cast vec_cmpeq result to correct type.
18500 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18501 Cast vec_cmpgt result to correct type.
18502
18503 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18504
18505 * final.c (final_scan_insn_1): Renamed from...
18506 (final_scan_insn): ... this. New wrapper, to recover
18507 seen from the outermost call in recursive ones.
18508 * config/sparc/sparc.c (output_return): Drop seen from call.
18509 (output_sibcall): Likewise.
18510 * config/visium/visium.c (output_branch): Likewise.
18511
18512 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18513
18514 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18515 function label.
18516
18517 2018-02-10 Alan Modra <amodra@gmail.com>
18518
18519 PR target/84300
18520 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18521 Specify LR as an input.
18522
18523 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18524
18525 PR sanitizer/83987
18526 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18527 remove_member_access_dummy_vars): New functions.
18528 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18529 lower_omp_1, execute_lower_omp): Use them.
18530
18531 PR rtl-optimization/84308
18532 * shrink-wrap.c (spread_components): Release todo vector.
18533
18534 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18535
18536 PR rtl-optimization/57193
18537 * ira-color.c (struct allocno_color_data): Add member
18538 conflict_allocno_hard_prefs.
18539 (update_conflict_allocno_hard_prefs): New.
18540 (bucket_allocno_compare_func): Add a preference based on
18541 conflict_allocno_hard_prefs.
18542 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18543 (color_allocnos): Remove a dead code. Initiate
18544 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18545
18546 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18547
18548 PR target/84226
18549 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18550 constraint from =wa to wa. Avoid a subreg on the output operand,
18551 instead use a pseudo and subreg it in a move.
18552 (p9_xxbrd_<mode>): Changed to ...
18553 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18554 (p9_xxbrd_v2df): New expander.
18555 (p9_xxbrw_<mode>): Changed to ...
18556 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18557 (p9_xxbrw_v4sf): New expander.
18558
18559 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18560
18561 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18562
18563 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18564
18565 PR target/83926
18566 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18567 multiply in 32-bit mode.
18568 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18569 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18570 mode.
18571
18572 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18573
18574 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18575 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18576 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18577 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18578
18579 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18580
18581 PR lto/84213
18582 * dwarf2out.c (is_trivial_indirect_ref): New function.
18583 (dwarf2out_late_global_decl): Do not generate a location
18584 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18585 and that are not defined in the current unit.
18586
18587 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18588
18589 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18590 instead of a libcall for UNORDERED.
18591
18592 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18593
18594 PR target/82641
18595 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18596 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18597
18598 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18599
18600 PR target/PR84295
18601 * config/s390/s390.c (s390_set_current_function): Invoke
18602 s390_indirect_branch_settings also if fndecl didn't change.
18603
18604 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18605
18606 * config/rs6000/rs6000.md (blockage): Set length to zero.
18607
18608 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18609
18610 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18611
18612 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18613
18614 PR sanitizer/84285
18615 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18616 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18617 -static-lib*san.
18618
18619 PR debug/84252
18620 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18621 PARALLEL incoming that failed vt_get_decl_and_offset check.
18622
18623 PR middle-end/84237
18624 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18625 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18626 TREE_READONLY bit.
18627 (get_variable_section): For decls in named .bss* sections pass true as
18628 second argument to bss_initializer_p.
18629
18630 2018-02-09 Marek Polacek <polacek@redhat.com>
18631 Jakub Jelinek <jakub@redhat.com>
18632
18633 PR c++/83659
18634 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18635 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18636 Sync some changes from cxx_fold_indirect_ref.
18637
18638 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18639
18640 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18641 markers.
18642 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18643 (BLOCK_INLINE_ENTRY_LABEL): New.
18644 (dwarf2out_var_location): Disregard inline entry markers.
18645 (inline_entry_data): New struct.
18646 (inline_entry_data_hasher): New hashtable type.
18647 (inline_entry_data_hasher::hash): New.
18648 (inline_entry_data_hasher::equal): New.
18649 (inline_entry_data_table): New variable.
18650 (add_high_low_attributes): Add DW_AT_entry_pc and
18651 DW_AT_GNU_entry_view attributes if a pending entry is found
18652 in inline_entry_data_table. Add old entry_pc attribute only
18653 if debug nonbinding markers are disabled.
18654 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18655 markers are enabled.
18656 (block_within_block_p, dwarf2out_inline_entry): New.
18657 (dwarf2out_finish): Check that no entries remained in
18658 inline_entry_data_table.
18659 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18660 (final_scan_insn, notice_source_line): Likewise.
18661 (rest_of_clean_state): Skip inline entry markers.
18662 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18663 markers.
18664 * gimple.c (gimple_build_debug_inline_entry): New.
18665 * gimple.h (enum gimple_debug_subcode): Add
18666 GIMPLE_DEBUG_INLINE_ENTRY.
18667 (gimple_build_debug_inline_entry): Declare.
18668 (gimple_debug_inline_entry_p): New.
18669 (gimple_debug_nonbind_marker_p): Adjust.
18670 * insn-notes.def (INLINE_ENTRY): New.
18671 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18672 inline entry marker notes.
18673 (print_insn): Likewise.
18674 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18675 (INSN_DEBUG_MARKER_KIND): Likewise.
18676 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18677 * tree-inline.c (expand_call_inline): Build and insert
18678 debug_inline_entry stmt.
18679 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18680 inline entry blocks early, if nonbind markers are enabled.
18681 (dump_scope_block): Dump fragment info.
18682 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18683 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18684 (gimple_build_debug_inline_entry): New.
18685 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18686 Enable/disable inline entry points too.
18687 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18688 (DEBUG_INSN): Describe inline entry markers.
18689
18690 * common.opt (gvariable-location-views): New.
18691 (gvariable-location-views=incompat5): New.
18692 * config.in: Rebuilt.
18693 * configure: Rebuilt.
18694 * configure.ac: Test assembler for view support.
18695 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18696 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18697 * dwarf2out.c (var_loc_view): New typedef.
18698 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18699 (dwarf2out_locviews_in_attribute): New.
18700 (dwarf2out_locviews_in_loclist): New.
18701 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18702 (enum dw_line_info_opcode): Add LI_adv_address.
18703 (struct dw_line_info_table): Add view.
18704 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18705 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18706 (zero_view_p): New variable.
18707 (ZERO_VIEW_P): New macro.
18708 (output_asm_line_debug_info): New.
18709 (struct var_loc_node): Add view.
18710 (add_AT_view_list, AT_loc_list): New.
18711 (add_var_loc_to_decl): Add view param. Test it against last.
18712 (new_loc_list): Add view params. Record them.
18713 (AT_loc_list_ptr): Handle loc and view lists.
18714 (view_list_to_loc_list_val_node): New.
18715 (print_dw_val): Handle dw_val_class_view_list.
18716 (size_of_die): Likewise.
18717 (value_format): Likewise.
18718 (loc_list_has_views): New.
18719 (gen_llsym): Set vl_symbol too.
18720 (maybe_gen_llsym, skip_loc_list_entry): New.
18721 (dwarf2out_maybe_output_loclist_view_pair): New.
18722 (output_loc_list): Output view list or entries too.
18723 (output_view_list_offset): New.
18724 (output_die): Handle dw_val_class_view_list.
18725 (output_dwarf_version): New.
18726 (output_compilation_unit_header): Use it.
18727 (output_skeleton_debug_sections): Likewise.
18728 (output_rnglists, output_line_info): Likewise.
18729 (output_pubnames, output_aranges): Update version comments.
18730 (output_one_line_info_table): Output view numbers in asm comments.
18731 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18732 Call maybe_gen_llsym.
18733 (loc_list_from_tree_1): Adjust.
18734 (add_AT_location_description): Create view list attribute if
18735 needed, check it's absent otherwise.
18736 (convert_cfa_to_fb_loc_list): Adjust.
18737 (maybe_emit_file): Call output_asm_line_debug_info for test.
18738 (dwarf2out_var_location): Reset views as needed. Precompute
18739 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18740 attribute. Set view.
18741 (new_line_info_table): Reset next view.
18742 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18743 (dwarf2out_source_line): Likewise. Output view resets and labels to
18744 the assembler, or select appropriate line info opcodes.
18745 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18746 (optimize_string_length): Catch it. Adjust.
18747 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18748 dw_val_class_view_list, and remove it if no longer needed.
18749 (hash_loc_list): Hash view numbers.
18750 (loc_list_hasher::equal): Compare them.
18751 (optimize_location_lists): Check whether a view list symbol is
18752 needed, and whether the locview attribute is present, and
18753 whether they match. Remove the locview attribute if no longer
18754 needed.
18755 (index_location_lists): Call skip_loc_list_entry for test.
18756 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18757 Use output_dwarf_version.
18758 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18759 (struct dw_val_node): Add val_view_list.
18760 * final.c (SEEN_NEXT_VIEW): New.
18761 (set_next_view_needed): New.
18762 (clear_next_view_needed): New.
18763 (maybe_output_next_view): New.
18764 (final_start_function): Rename to...
18765 (final_start_function_1): ... this. Take pointer to FIRST,
18766 add SEEN parameter. Emit param bindings in the initial view.
18767 (final_start_function): Reintroduce SEEN-less interface.
18768 (final): Rename to...
18769 (final_1): ... this. Take SEEN parameter. Output final pending
18770 next view at the end.
18771 (final): Reintroduce seen-less interface.
18772 (final_scan_insn): Output pending next view before switching
18773 sections or ending a block. Mark the next view as needed when
18774 outputting variable locations. Notify debug backend of section
18775 changes, and of location view changes.
18776 (rest_of_handle_final): Adjust.
18777 * toplev.c (process_options): Autodetect value for debug variable
18778 location views option. Warn on incompat5 without -gdwarf-5.
18779 * doc/invoke.texi (gvariable-location-views): New.
18780 (gvariable-location-views=incompat5): New.
18781 (gno-variable-location-views): New.
18782
18783 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18784
18785 PR tree-optimization/84136
18786 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18787 that the result of find_edge is non-NULL.
18788
18789 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18790
18791 PR target/83008
18792 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18793 storing integer register in SImode. Fix cost of 256 and 512
18794 byte aligned SSE register store.
18795
18796 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18797
18798 * config/i386/i386.c (ix86_multiplication_cost): Fix
18799 multiplication cost for TARGET_AVX512DQ.
18800
18801 2018-02-08 Marek Polacek <polacek@redhat.com>
18802
18803 PR tree-optimization/84238
18804 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18805 get_range_strlen.
18806
18807 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18808
18809 PR tree-optimization/84265
18810 * tree-vect-stmts.c (vectorizable_store): Don't treat
18811 VMAT_CONTIGUOUS accesses as grouped.
18812 (vectorizable_load): Likewise.
18813
18814 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18815
18816 PR tree-optimization/81635
18817 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18818 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18819 (test_round_for_mask): New functions.
18820 (wide_int_cc_tests): Call test_round_for_mask.
18821 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18822 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18823 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18824 range returned by get_range_info.
18825
18826 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18827
18828 PR ipa/81360
18829 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18830 * symtab.c: Include builtins.h
18831 (symtab_node::output_to_lto_symbol_table_p): Move here
18832 from lto-streamer-out.c:output_symbol_p.
18833 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18834 (output_symbol_p): Move all logic to symtab.c
18835 (produce_symtab): Update.
18836
18837 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18838
18839 * config/s390/s390-opts.h (enum indirect_branch): Define.
18840 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18841 (s390_indirect_branch_via_thunk)
18842 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18843 (enum s390_indirect_branch_type): Define.
18844 * config/s390/s390.c (struct s390_frame_layout, struct
18845 machine_function): Remove.
18846 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18847 (indirect_branch_table_label_no, indirect_branch_table_name):
18848 Define variables.
18849 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18850 (enum s390_indirect_branch_option): Define.
18851 (s390_return_addr_from_memory): New function.
18852 (s390_handle_string_attribute): New function.
18853 (s390_attribute_table): Add new attribute handler.
18854 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18855 (s390_indirect_branch_via_thunk): New function.
18856 (s390_indirect_branch_via_inline_thunk): New function.
18857 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18858 sibling call optimization for non z10 compiles.
18859 (s390_emit_call): Force indirect branch target to be a single
18860 register. Add r1 clobber for non-z10 compiles.
18861 (s390_emit_epilogue): Emit return jump via return_use expander.
18862 (s390_reorg): Handle JUMP_INSNs as execute targets.
18863 (s390_option_override_internal): Perform validity checks for the
18864 new command line options.
18865 (s390_indirect_branch_attrvalue): New function.
18866 (s390_indirect_branch_settings): New function.
18867 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18868 (s390_output_indirect_thunk_function): New function.
18869 (s390_code_end): Implement target hook.
18870 (s390_case_values_threshold): Implement target hook.
18871 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18872 macros.
18873 * config/s390/s390.h (struct s390_frame_layout)
18874 (struct machine_function): Move here from s390.c.
18875 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18876 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18877 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18878 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18879 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18880 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18881 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18882 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18883 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18884 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18885 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18886 (mnemonic attribute): Add values which aren't recognized
18887 automatically.
18888 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18889 pattern for branch conversion. Fix mnemonic attribute.
18890 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18891 indirect branch via thunk if requested.
18892 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18893 ("*indirect_jump"): Disable for branch conversion using out of
18894 line thunks.
18895 ("indirect_jump_via_thunk<mode>_z10")
18896 ("indirect_jump_via_thunk<mode>")
18897 ("indirect_jump_via_inlinethunk<mode>_z10")
18898 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18899 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18900 ("casesi_jump_via_inlinethunk<mode>_z10")
18901 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18902 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18903 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18904 ("*indirect2_jump"): Disable for branch conversion.
18905 ("casesi_jump"): Turn into expander and expand patterns for branch
18906 conversion.
18907 ("return_use"): New expander.
18908 ("*return"): Emit return via thunk and rename it to ...
18909 ("*return<mode>"): ... this one.
18910 * config/s390/s390.opt: Add new options and and enum for the
18911 option values.
18912
18913 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18914
18915 * lra-constraints.c (match_reload): Unconditionally use
18916 gen_lowpart_SUBREG, rather than selecting between that
18917 and equivalent gen_rtx_SUBREG code.
18918
18919 2018-02-08 Richard Biener <rguenther@suse.de>
18920
18921 PR tree-optimization/84233
18922 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18923 changed flag instead of boguously re-using phi_inserted.
18924
18925 2018-02-08 Martin Jambor <mjambor@suse.cz>
18926
18927 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18928 static local variables.
18929
18930 2018-02-08 Richard Biener <rguenther@suse.de>
18931
18932 PR tree-optimization/84278
18933 * tree-vect-stmts.c (vectorizable_store): When looking for
18934 smaller vector types to perform grouped strided loads/stores
18935 make sure the mode is supported by the target.
18936 (vectorizable_load): Likewise.
18937
18938 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18939
18940 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18941 Increase LDP/STP opportunities by adding adjacent callee-saves.
18942
18943 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18944
18945 PR rtl-optimization/84068
18946 PR rtl-optimization/83459
18947 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18948
18949 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18950
18951 PR tree-optimization/84224
18952 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18953 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18954 non-zero arguments.
18955
18956 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18957
18958 PR target/84113
18959 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18960 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18961 count, remove one USE.
18962
18963 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18964
18965 * doc/install.texi (Configuration): Document the
18966 --with-long-double-format={ibm,ieee} PowerPC configuration
18967 options.
18968
18969 PR target/84154
18970 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18971 Convert from define_expand to be define_insn_and_split. Rework
18972 float/double/_Float128 conversions to QI/HI/SImode to work with
18973 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18974 conversions to QI/HImode types did a store and then a load to
18975 truncate the value. For conversions to VSX registers, don't split
18976 the insn, instead emit the code directly. Use the code iterator
18977 any_fix to combine signed and unsigned conversions.
18978 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18979 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18980 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18981 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18982 (fix_<mode>di2_hw): Likewise.
18983 (fixuns_<mode>di2_hw): Likewise.
18984 (fix_<mode>si2_hw): Likewise.
18985 (fixuns_<mode>si2_hw): Likewise.
18986 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18987 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18988 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18989 fix<uns>_trunc<SFDF:mode>si2_p8.
18990 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18991 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18992 (fix<uns>_<mode>_mem): Likewise.
18993 (fctiw<u>z_<mode>_mem): Likewise.
18994 (fix<uns>_<mode>_mem): Likewise.
18995 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18996 the register allocator from doing a direct move to the GPRs to do
18997 a store, and instead use the ISA 3.0 store byte/half-word from
18998 vector register instruction. For IEEE 128-bit floating point,
18999 also optimize stores of 32-bit ints.
19000 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19001
19002 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19003
19004 * genextract.c (push_pathstr_operand): New function to support
19005 [a-zA-Z].
19006 (walk_rtx): Call push_pathstr_operand.
19007 (print_path): Support [a-zA-Z].
19008
19009 2018-02-07 Richard Biener <rguenther@suse.de>
19010
19011 PR tree-optimization/84037
19012 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19013 (cse_and_gimplify_to_preheader): Declare.
19014 (vect_get_place_in_interleaving_chain): Likewise.
19015 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19016 ivexpr_map.
19017 (_loop_vec_info::~_loop_vec_info): Delete it.
19018 (cse_and_gimplify_to_preheader): New function.
19019 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19020 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19021 (vectorizable_load): Likewise. For grouped stores always base
19022 the IV on the first element.
19023 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19024 condition before gimplifying.
19025
19026 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19027
19028 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19029 *DIV_EXPR and *MOD_EXPR.
19030
19031 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19032
19033 PR target/84248
19034 * config/i386/i386.c (ix86_option_override_internal): Mask out
19035 the CF_SET bit when checking -fcf-protection.
19036
19037 2018-02-07 Tom de Vries <tom@codesourcery.com>
19038
19039 PR libgomp/84217
19040 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19041 enough.
19042
19043 2018-02-07 Richard Biener <rguenther@suse.de>
19044
19045 PR tree-optimization/84204
19046 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19047 this place.
19048
19049 PR tree-optimization/84205
19050 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19051 special-case isl_ast_op_zdiv_r.
19052
19053 PR tree-optimization/84223
19054 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19055 Only add conditions from within the region.
19056 (gather_bbs::after_dom_children): Adjust.
19057
19058 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19059
19060 PR target/84209
19061 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19062 * config/avr/avr.md: Only post-reload split REG-REG moves if
19063 either register is GENERAL_REG_P.
19064
19065 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19066
19067 PR tree-optimization/84235
19068 * tree-ssa-scopedtables.c
19069 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19070 if the subtraction is performed in floating point type where NaNs are
19071 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19072 build 1. Formatting fix.
19073
19074 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19075
19076 PR target/84146
19077 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19078 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19079 and skip it regardless of bb boundaries. Use CALL_P macro,
19080 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19081 unnecessarily, formatting fix.
19082
19083 2018-02-06 Michael Collison <michael.collison@arm.com>
19084
19085 * config/arm/thumb2.md:
19086 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19087 (*thumb_mov_notscc): Ditto.
19088
19089 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19090
19091 PR target/84154
19092 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19093 unsigned_fix, not "s".
19094
19095 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19096
19097 * configure.ac (gcc_fn_eh_frame_ro): New function.
19098 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19099 correct .eh_frame permissions.
19100 * configure: Regenerate.
19101
19102 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19103
19104 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19105 irrelevant options.
19106
19107 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19108
19109 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19110 Display warning message for -mno-speculate-indirect-jumps.
19111
19112 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19113
19114 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19115 Undocumented.
19116 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19117
19118 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19119
19120 PR tree-optimization/84225
19121 * tree-eh.c (find_trapping_overflow): Only call
19122 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19123
19124 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19125
19126 PR target/84145
19127 * config/i386/i386.c: Reimplement the check of possible options
19128 -mibt/-mshstk conbination. Change error messages.
19129 * doc/invoke.texi: Fix a typo: remove extra '='.
19130
19131 2018-02-06 Marek Polacek <polacek@redhat.com>
19132
19133 PR tree-optimization/84228
19134 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19135
19136 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19137
19138 PR target/82641
19139 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19140 emitted arch directives.
19141 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19142 __ARM_FEATURE_COPROC before changing architectures.
19143
19144 2018-02-06 Richard Biener <rguenther@suse.de>
19145
19146 * config/i386/i386.c (print_reg): Fix typo.
19147 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19148
19149 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19150
19151 * configure: Regenerate.
19152
19153 2018-02-05 Martin Sebor <msebor@redhat.com>
19154
19155 PR tree-optimization/83369
19156 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19157 inlining context.
19158
19159 2018-02-05 Martin Liska <mliska@suse.cz>
19160
19161 * doc/invoke.texi: Cherry-pick upstream r323995.
19162
19163 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19164
19165 * ira.c (ira_init_register_move_cost): Adjust comment.
19166
19167 2018-02-05 Martin Liska <mliska@suse.cz>
19168
19169 PR gcov-profile/84137
19170 * doc/gcov.texi: Fix typo in documentation.
19171
19172 2018-02-05 Martin Liska <mliska@suse.cz>
19173
19174 PR gcov-profile/83879
19175 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19176 using dlopen functionality.
19177
19178 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19179
19180 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19181 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19182 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19183 _mm_maskz_range_round_ss): New intrinsics.
19184 (__builtin_ia32_rangesd128_round)
19185 (__builtin_ia32_rangess128_round): Remove.
19186 (__builtin_ia32_rangesd128_mask_round,
19187 __builtin_ia32_rangess128_mask_round): New builtins.
19188 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19189 __builtin_ia32_rangess128_round): Remove.
19190 (__builtin_ia32_rangesd128_mask_round,
19191 __builtin_ia32_rangess128_mask_round): New builtins.
19192 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19193 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19194 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19195 "<round_saeonly_constraint>")): Changed to ...
19196 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19197 "<round_saeonly_scalar_constraint>")): ... this.
19198 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19199 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19200 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19201 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19202 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19203
19204 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19205
19206 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19207 options.
19208 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19209 Remove all values except native, 8540 and 8548.
19210
19211 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19212
19213 * config/i386/i386.c (ix86_output_function_return): Pass
19214 INVALID_REGNUM, instead of -1, as invalid register number to
19215 indirect_thunk_name and output_indirect_thunk.
19216
19217 2018-02-02 Julia Koval <julia.koval@intel.com>
19218
19219 * config.gcc: Add -march=icelake.
19220 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19221 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19222 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19223 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19224 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19225 (processor_target_table): Add icelake.
19226 (ix86_option_override_internal): Handle new PTAs.
19227 (get_builtin_code_for_version): Handle icelake.
19228 (M_INTEL_COREI7_ICELAKE): New.
19229 (fold_builtin_cpu): Handle icelake.
19230 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19231 * doc/invoke.texi: Add -march=icelake.
19232
19233 2018-02-02 Julia Koval <julia.koval@intel.com>
19234
19235 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19236 to wide_int_bitmask.
19237 * wide-int-bitmask.h: New.
19238
19239 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19240
19241 PR target/84066
19242 * config/i386/i386.md: Replace Pmode with word_mode in
19243 builtin_setjmp_setup and builtin_longjmp to support x32.
19244
19245 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19246
19247 PR target/56010
19248 PR target/83743
19249 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19250 #include "opts.h".
19251 (rs6000_supported_cpu_names): New static variable.
19252 (linux_cpu_translation_table): Likewise.
19253 (elf_platform) <cpu>: Define new static variable and use it.
19254 Translate kernel AT_PLATFORM name to canonical name if needed.
19255 Error if platform name is unknown.
19256
19257 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19258
19259 PR target/84089
19260 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19261
19262 2018-02-01 Jeff Law <law@redhat.com>
19263
19264 PR target/84128
19265 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19266 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19267 the scratch if RELEASE_VIA_POP is false.
19268 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19269 If we have to save a temporary register, decrement SIZE appropriately.
19270 Pass new arguments to release_scratch_register_on_entry.
19271 (ix86_adjust_stack_and_probe): Likewise.
19272 (ix86_emit_probe_stack_range): Pass new arguments to
19273 release_scratch_register_on_entry.
19274
19275 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19276
19277 PR rtl-optimization/84157
19278 * combine.c (change_zero_ext): Use REG_P predicate in
19279 front of HARD_REGISTER_P predicate.
19280
19281 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19282
19283 * config/avr/avr.c (avr_option_override): Move disabling of
19284 -fdelete-null-pointer-checks to...
19285 * common/config/avr/avr-common.c (avr_option_optimization_table):
19286 ...here.
19287
19288 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19289
19290 PR tree-optimization/81635
19291 * tree-data-ref.c (split_constant_offset_1): For types that
19292 wrap on overflow, try to use range info to prove that wrapping
19293 cannot occur.
19294
19295 2018-02-01 Renlin Li <renlin.li@arm.com>
19296
19297 PR target/83370
19298 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19299 TAILCALL_ADDR_REGS.
19300 (aarch64_register_move_cost): Likewise.
19301 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19302 TAILCALL_ADDR_REGS.
19303 (REG_CLASS_NAMES): Likewise.
19304 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19305 TAILCALL_ADDR_REGS. Remove IP registers.
19306 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19307
19308 2018-02-01 Richard Biener <rguenther@suse.de>
19309
19310 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19311 for specifying RPO order and allow NULL for that.
19312 * domwalk.c (dom_walker::dom_walker): Likewise.
19313 (dom_walker::walk): Handle NULL RPO order.
19314 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19315 in RPO order.
19316 (rewrite_update_dom_walker): Likewise.
19317 (mark_def_dom_walker): Likewise.
19318
19319 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19320
19321 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19322 (aarch64_maybe_expand_sve_subreg_move): Declare.
19323 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19324 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19325 predicate.
19326 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19327 that are semantically a reverse operation.
19328 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19329 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19330 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19331 functions.
19332 (aarch64_can_change_mode_class): For big-endian, forbid changes
19333 between two SVE modes if they have different element sizes.
19334
19335 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19336
19337 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19338 the TImode handling for big-endian targets.
19339
19340 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19341
19342 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19343 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19344 not just bytes.
19345 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19346 Remove BSWAP handing for big-endian targets and use the form of
19347 LD1RQ appropariate for the mode.
19348
19349 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19350
19351 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19352 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19353 duplicated element.
19354
19355 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19356
19357 PR tearget/83845
19358 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19359 check for operands that need to go through aarch64_sve_reload_be.
19360
19361 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19362
19363 PR tree-optimization/81661
19364 PR tree-optimization/84117
19365 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19366 * tree-eh.c: Include gimplify.h.
19367 (find_trapping_overflow, replace_trapping_overflow,
19368 rewrite_to_non_trapping_overflow): New functions.
19369 * tree-vect-loop.c: Include tree-eh.h.
19370 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19371 * tree-data-ref.c: Include tree-eh.h.
19372 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19373
19374 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19375
19376 PR rtl-optimization/84123
19377 * combine.c (change_zero_ext): Check if hard register satisfies
19378 can_change_dest_mode before calling gen_lowpart_SUBREG.
19379
19380 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19381
19382 PR target/82444
19383 * ira.c (ira_init_register_move_cost): Remove assert.
19384
19385 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19386
19387 PR rtl-optimization/84071
19388 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19389 * doc/tm.texi: Regenerate.
19390
19391 2018-01-31 Richard Biener <rguenther@suse.de>
19392
19393 PR tree-optimization/84132
19394 * tree-data-ref.c (analyze_miv_subscript): Properly
19395 check whether evolution_function_is_affine_multivariate_p
19396 before calling gcd_of_steps_may_divide_p.
19397
19398 2018-01-31 Julia Koval <julia.koval@intel.com>
19399
19400 PR target/83618
19401 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19402 * config/i386/i386.md (rdpid_rex64) New.
19403 (rdpid): Make 32bit only.
19404
19405 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19406
19407 PR lto/84105
19408 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19409 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19410
19411 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19412
19413 Revert
19414 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19415
19416 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19417
19418 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19419
19420 PR rtl-optimization/84071
19421 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19422 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19423
19424 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19425
19426 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19427 (arc_attribute_table): Add 'aux' attribute.
19428 (arc_in_small_data_p): Consider aux like variables.
19429 (arc_is_aux_reg_p): New function.
19430 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19431 (arc_get_aux_arg): New function.
19432 (prepare_move_operands): Handle aux-register access.
19433 (arc_handle_aux_attribute): New function.
19434 * doc/extend.texi (ARC Variable attributes): Add subsection.
19435
19436 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19437
19438 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19439 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19440 (arc_attribute_table): Add 'uncached' attribute.
19441 (arc_print_operand): Print '.di' flag for uncached memory
19442 accesses.
19443 (arc_in_small_data_p): Do not consider for small data the uncached
19444 types.
19445 (arc_is_uncached_mem_p): New function.
19446 * config/arc/predicates.md (compact_store_memory_operand): Check
19447 for uncached memory accesses.
19448 (nonvol_nonimm_operand): Likewise.
19449 * doc/extend.texi (ARC Type Attribute): New subsection.
19450
19451 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19452
19453 PR c/84100
19454 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19455 falign-loops=): Add Optimization flag.
19456
19457 2018-01-30 Jeff Law <law@redhat.com>
19458
19459 PR target/84064
19460 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19461 INT_REGISTERS_SAVED. Check it prior to calling
19462 get_scratch_register_on_entry.
19463 (ix86_adjust_stack_and_probe): Similarly.
19464 (ix86_emit_probe_stack_range): Similarly.
19465 (ix86_expand_prologue): Corresponding changes.
19466
19467 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19468
19469 PR target/40411
19470 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19471 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19472
19473 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19474
19475 PR target/84112
19476 * lra-constraints.c (curr_insn_transform): Process AND in the
19477 address.
19478
19479 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19480
19481 PR rtl-optimization/83986
19482 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19483 dependence against last_pending_memory_flush in addition to
19484 pending_jump_insns.
19485
19486 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19487
19488 PR tree-optimization/81611
19489 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19490 copies.
19491
19492 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19493
19494 PR target/83758
19495 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19496 a reg rtx.
19497
19498 2018-01-30 Richard Biener <rguenther@suse.de>
19499 Jakub Jelinek <jakub@redhat.com>
19500
19501 PR tree-optimization/84111
19502 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19503 inner loops added during recursion, as they don't have up-to-date
19504 SSA form.
19505
19506 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19507
19508 PR ipa/81360
19509 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19510 (can_inline_edge_by_limits_p): ... here.
19511 (can_early_inline_edge_p, check_callers,
19512 update_caller_keys, update_callee_keys, recursive_inlining,
19513 add_new_edges_to_heap, speculation_useful_p,
19514 inline_small_functions,
19515 inline_small_functions, flatten_function,
19516 inline_to_all_callers_1): Update.
19517
19518 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19519
19520 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19521 zeros correctly.
19522
19523 2018-01-30 Richard Biener <rguenther@suse.de>
19524
19525 PR tree-optimization/83008
19526 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19527 invariant and constant vector uses in stmts when they need
19528 more than one stmt.
19529
19530 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19531
19532 PR bootstrap/84017
19533 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19534 * configure: Regenerate.
19535
19536 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19537
19538 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19539 pattern.
19540 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19541 Use gen_rtx_REG rather than gen_lowpart.
19542
19543 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19544
19545 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19546 rather than 0 when creating partial subregs.
19547
19548 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19549
19550 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19551 of usage.
19552
19553 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19554
19555 PR target/81550
19556 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19557 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19558 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19559 flags. This restores the settings used before the 2017-07-24.
19560 Turning off pre increment/decrement/modify allows IVOPTS to
19561 optimize DF/SF loops where the index is an int.
19562
19563 2018-01-29 Richard Biener <rguenther@suse.de>
19564 Kelvin Nilsen <kelvin@gcc.gnu.org>
19565
19566 PR bootstrap/80867
19567 * tree-vect-stmts.c (vectorizable_call): Don't call
19568 targetm.vectorize_builtin_md_vectorized_function if callee is
19569 NULL.
19570
19571 2018-01-22 Carl Love <cel@us.ibm.com>
19572
19573 * doc/extend.tex: Fix typo in second arg in
19574 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19575
19576 2018-01-29 Richard Biener <rguenther@suse.de>
19577
19578 PR tree-optimization/84086
19579 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19580 (flush_ssaname_freelist): When SSA names were released reset
19581 the SCEV hash table.
19582
19583 2018-01-29 Richard Biener <rguenther@suse.de>
19584
19585 PR tree-optimization/84057
19586 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19587 removed paths when removing edges.
19588
19589 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19590
19591 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19592 -mfunction-return=@var{choice}.
19593
19594 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19595
19596 PR diagnostic/84034
19597 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19598 Handle CR like TAB.
19599 (layout::print_source_line): Likewise.
19600 (test_get_line_width_without_trailing_whitespace): Add test cases.
19601
19602 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19603
19604 PR middle-end/84040
19605 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19606 debug insns.
19607
19608 2018-01-26 Jim Wilson <jimw@sifive.com>
19609
19610 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19611
19612 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19613 specified.
19614
19615 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19616
19617 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19618 and CMP + SUB-immediate -> SUBS.
19619
19620 2018-01-26 Martin Sebor <msebor@redhat.com>
19621
19622 PR tree-optimization/83896
19623 * tree-ssa-strlen.c (get_string_len): Rename...
19624 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19625 Avoid assuming length is constant.
19626 (handle_char_store): Use HOST_WIDE_INT for string length.
19627
19628 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19629
19630 PR target/81763
19631 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19632 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19633
19634 2018-01-26 Richard Biener <rguenther@suse.de>
19635
19636 PR rtl-optimization/84003
19637 * dse.c (record_store): Only record redundant stores when
19638 the earlier store aliases at least all accesses the later one does.
19639
19640 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19641
19642 PR rtl-optimization/83985
19643 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19644 REG_CFA_RESTORE insns.
19645 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19646 REG_CFA_RESTORE insns here.
19647
19648 PR c/83989
19649 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19650 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19651
19652 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19653
19654 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19655 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19656 (arc_init): Likewise.
19657 (arc_override_options): Likewise.
19658 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19659 value.
19660 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19661 support.
19662 * config/arc/arc.h (TARGET_DBNZ): Define.
19663 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19664 properly set the tune attribute.
19665 (dbnz): Use TARGET_DBNZ guard.
19666 * config/arc/arc.opt (mtune): Add core3 option.
19667
19668 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19669
19670 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19671 recognize new pic like addresses.
19672 (arc_delegitimize_address): Clean up.
19673
19674 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19675
19676 * config/arc/arc-arches.def: Option mrf16 valid for all
19677 architectures.
19678 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19679 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19680 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19681 * config/arc/arc-tables.opt: Regenerate.
19682 * config/arc/arc.c (arc_conditional_register_usage): Handle
19683 reduced register file case.
19684 (arc_file_start): Set must have build attributes.
19685 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19686 mrf16 option value.
19687 * config/arc/arc.opt (mrf16): Add new option.
19688 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19689 * config/arc/genmultilib.awk: Handle new mrf16 option.
19690 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19691 * config/arc/t-multilib: Regenerate.
19692 * doc/invoke.texi (ARC Options): Document mrf16 option.
19693
19694 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19695
19696 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19697 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19698 (arc_attribute_table): Add 'secure_call' attribute.
19699 (arc_print_operand): Print secure call operand.
19700 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19701 secure.
19702 (arc_is_secure_call_p): New function. * config/arc/arc.md
19703 (call_i): Add support for sjli instruction.
19704 (call_value_i): Likewise.
19705 * config/arc/constraints.md (Csc): New constraint.
19706
19707 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19708 John Eric Martin <John.Martin@emmicro-us.com>
19709
19710 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19711 * config/arc/arc.c (_arc_jli_section): New struct.
19712 (arc_jli_section): New type.
19713 (rc_jli_sections): New static variable.
19714 (arc_handle_jli_attribute): New function.
19715 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19716 (arc_file_end): New function.
19717 (TARGET_ASM_FILE_END): Define.
19718 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19719 (arc_add_jli_section): New function.
19720 (jli_call_scan): Likewise.
19721 (arc_reorg): Call jli_call_scan.
19722 (arc_output_addsi): Remove 'S' from printing asm operand.
19723 (arc_is_jli_call_p): New function.
19724 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19725 operand.
19726 (movhi_insn): Likewise.
19727 (movsi_insn): Likewise.
19728 (movsi_set_cc_insn): Likewise.
19729 (loadqi_update): Likewise.
19730 (load_zeroextendqisi_update): Likewise.
19731 (load_signextendqisi_update): Likewise.
19732 (loadhi_update): Likewise.
19733 (load_zeroextendhisi_update): Likewise.
19734 (load_signextendhisi_update): Likewise.
19735 (loadsi_update): Likewise.
19736 (loadsf_update): Likewise.
19737 (movsicc_insn): Likewise.
19738 (bset_insn): Likewise.
19739 (bxor_insn): Likewise.
19740 (bclr_insn): Likewise.
19741 (bmsk_insn): Likewise.
19742 (bicsi3_insn): Likewise.
19743 (cmpsi_cc_c_insn): Likewise.
19744 (movsi_ne): Likewise.
19745 (movsi_cond_exec): Likewise.
19746 (clrsbsi2): Likewise.
19747 (norm_f): Likewise.
19748 (normw): Likewise.
19749 (swap): Likewise.
19750 (divaw): Likewise.
19751 (flag): Likewise.
19752 (sr): Likewise.
19753 (kflag): Likewise.
19754 (ffs): Likewise.
19755 (ffs_f): Likewise.
19756 (fls): Likewise.
19757 (call_i): Remove 'S' asm letter, add jli instruction.
19758 (call_value_i): Likewise.
19759 * config/arc/arc.op (mjli-always): New option.
19760 * config/arc/constraints.md (Cji): New constraint.
19761 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19762 operand.
19763 (subsf3_fpx): Likewise.
19764 (mulsf3_fpx): Likewise.
19765 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19766 asm operand.
19767 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19768 function attrbutes.
19769 * doc/invoke.texi (ARC): Document mjli-always option.
19770
19771 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19772
19773 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19774 avoid addition with 0 and use incw and decw where possible.
19775
19776 2018-01-26 Richard Biener <rguenther@suse.de>
19777
19778 PR tree-optimization/81082
19779 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19780 association if it requires casting to unsigned.
19781 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19782 from fold_plusminus_mult_expr to catch important cases late when
19783 range info is available.
19784
19785 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19786
19787 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19788 * configure.ac (hidden_linkonce): New test.
19789 * configure: Regenerate.
19790 * config.in: Regenerate.
19791
19792 2018-01-26 Julia Koval <julia.koval@intel.com>
19793
19794 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19795 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19796 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19797 _mm_mask_bitshuffle_epi64_mask): Fix type.
19798 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19799 USI_FTYPE_V4DI_V4DI_USI): Remove.
19800 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19801 __builtin_ia32_vpshufbitqmb256_mask,
19802 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19803 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19804 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19805
19806 2018-01-26 Alan Modra <amodra@gmail.com>
19807
19808 PR target/84033
19809 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19810 UNSPEC_VBPERMQ. Sort other unspecs.
19811
19812 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19813
19814 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19815
19816 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19817
19818 PR middle-end/83055
19819 * predict.c (drop_profile): Do not push/pop cfun; update also
19820 node->count.
19821 (handle_missing_profiles): Fix logic looking for zero profiles.
19822
19823 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19824
19825 PR middle-end/83977
19826 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19827 on functions with #pragma omp declare simd or functions with simd
19828 attribute.
19829 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19830 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19831 Remove trailing \n from warning_at calls.
19832
19833 2018-01-25 Tom de Vries <tom@codesourcery.com>
19834
19835 PR target/84028
19836 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19837 for neutered workers.
19838
19839 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19840
19841 PR target/68467
19842 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19843 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19844
19845 2018-01-24 Jeff Law <law@redhat.com>
19846
19847 PR target/83994
19848 * i386.c (get_probe_interval): Move to earlier point.
19849 (ix86_compute_frame_layout): If -fstack-clash-protection and
19850 the frame is larger than the probe interval, then use pushes
19851 to save registers rather than reg->mem moves.
19852 (ix86_expand_prologue): Remove conditional for int_registers_saved
19853 assertion.
19854
19855 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19856
19857 PR target/84014
19858 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19859 min/max for never referenced object.
19860
19861 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19862
19863 PR middle-end/83977
19864 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19865 here.
19866 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19867 attributes from DECL_ATTRIBUTES (decl) without affecting
19868 DECL_ATTRIBUTES (current_function_decl).
19869 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19870 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19871
19872 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19873
19874 PR tree-optimization/83979
19875 * fold-const.c (fold_comparison): Use constant_boolean_node
19876 instead of boolean_{true,false}_node.
19877
19878 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19879
19880 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19881 with zero counts.
19882
19883 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19884
19885 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19886 Simplify the clause that sets the length attribute.
19887 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19888 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19889 clause that sets the length attribute.
19890 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19891
19892 2018-01-24 Tom de Vries <tom@codesourcery.com>
19893
19894 PR target/83589
19895 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19896 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19897 Add strict parameter.
19898 (prevent_branch_around_nothing): Insert dummy insn between branch to
19899 label and label with no ptx insn inbetween.
19900 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19901
19902 2018-01-24 Tom de Vries <tom@codesourcery.com>
19903
19904 PR target/81352
19905 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19906 for neutered threads in warp.
19907 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19908
19909 2018-01-24 Richard Biener <rguenther@suse.de>
19910
19911 PR tree-optimization/83176
19912 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19913 operands.
19914
19915 2018-01-24 Richard Biener <rguenther@suse.de>
19916
19917 PR tree-optimization/82819
19918 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19919 code generating pluses that are no-ops in the target precision.
19920
19921 2018-01-24 Richard Biener <rguenther@suse.de>
19922
19923 PR middle-end/84000
19924 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19925
19926 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19927
19928 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19929 to merge probabilities.
19930 * predict.c (probably_never_executed): Also mark as cold functions
19931 with global 0 profile and guessed local profile.
19932 * profile-count.c (profile_probability::combine_with_count): New
19933 member function.
19934 * profile-count.h (profile_probability::operator*,
19935 profile_probability::operator*=, profile_probability::operator/,
19936 profile_probability::operator/=): Reduce precision to adjusted
19937 and set value to guessed on contradictory divisions.
19938 (profile_probability::combine_with_freq): Remove.
19939 (profile_probability::combine_wiht_count): Declare.
19940 (profile_count::force_nonzero):: Set to adjusted.
19941 (profile_count::probability_in):: Set quality to adjusted.
19942 * tree-ssa-tail-merge.c (replace_block_by): Use
19943 combine_with_count.
19944
19945 2018-01-23 Andrew Waterman <andrew@sifive.com>
19946 Jim Wilson <jimw@sifive.com>
19947
19948 * config/riscv/riscv.c (riscv_stack_boundary): New.
19949 (riscv_option_override): Set riscv_stack_boundary. Handle
19950 riscv_preferred_stack_boundary_arg.
19951 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19952 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19953 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19954 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19955 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19956 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19957
19958 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19959
19960 PR target/83905
19961 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19962 of struct ix86_frame.
19963 (ix86_expand_epilogue): Likewise. Add a local variable for
19964 the reg_save_offset field in struct ix86_frame.
19965
19966 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19967
19968 PR tree-optimization/82604
19969 * tree-loop-distribution.c (enum partition_kind): New enum item
19970 PKIND_PARTIAL_MEMSET.
19971 (partition_builtin_p): Support above new enum item.
19972 (generate_code_for_partition): Ditto.
19973 (compute_access_range): Differentiate cases that equality can be
19974 proven at all loops, the innermost loops or no loops.
19975 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19976 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19977 (finalize_partitions, distribute_loop): Don't fuse partition of
19978 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19979 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19980 parloop is enabled.
19981
19982 2018-01-23 Martin Liska <mliska@suse.cz>
19983
19984 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19985 order to ignore the predictor.
19986 (PRED_POLYMORPHIC_CALL): Likewise.
19987 (PRED_RECURSIVE_CALL): Likewise.
19988
19989 2018-01-23 Martin Liska <mliska@suse.cz>
19990
19991 * tree-profile.c (tree_profiling): Print function header to
19992 aware reader which function we are working on.
19993 * value-prof.c (gimple_find_values_to_profile): Do not print
19994 not interesting value histograms.
19995
19996 2018-01-23 Martin Liska <mliska@suse.cz>
19997
19998 * profile-count.h (enum profile_quality): Add
19999 profile_uninitialized as the first value. Do not number values
20000 as they are zero based.
20001 (profile_count::verify): Update sanity check.
20002 (profile_probability::verify): Likewise.
20003
20004 2018-01-23 Nathan Sidwell <nathan@acm.org>
20005
20006 * doc/invoke.texi (ffor-scope): Deprecate.
20007
20008 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20009
20010 PR tree-optimization/83510
20011 * domwalk.c (set_all_edges_as_executable): New function.
20012 (dom_walker::dom_walker): Convert bool param
20013 "skip_unreachable_blocks" to enum reachability. Move setup of
20014 edge flags to set_all_edges_as_executable and only do it when
20015 reachability is REACHABLE_BLOCKS.
20016 * domwalk.h (enum dom_walker::reachability): New enum.
20017 (dom_walker::dom_walker): Convert bool param
20018 "skip_unreachable_blocks" to enum reachability.
20019 (set_all_edges_as_executable): New decl.
20020 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20021 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20022 "reachability".
20023 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20024 but converting true to REACHABLE_BLOCKS.
20025 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20026 * tree-vrp.c
20027 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20028 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20029 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20030 REACHABLE_BLOCKS.
20031 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20032 if check_all_array_refs will be called.
20033
20034 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20035
20036 * tree.c (selftest::test_location_wrappers): Add more test
20037 coverage.
20038
20039 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20040
20041 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20042 (selftest::test_bit_in_range): Likewise.
20043
20044 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20045
20046 PR testsuite/83888
20047 * doc/sourcebuild.texi (vect_float): Say that the selector
20048 only describes the situation when -funsafe-math-optimizations is on.
20049 (vect_float_strict): Document.
20050
20051 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20052
20053 PR tree-optimization/83965
20054 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20055 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20056 instead of checking only for a reduction.
20057 (vect_recog_widen_sum_pattern): Likewise.
20058
20059 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20060
20061 * predict.c (probably_never_executed): Only use precise profile info.
20062 (compute_function_frequency): Skip after inlining hack since we now
20063 have quality checking.
20064
20065 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20066
20067 * profile-count.h (profile_probability::very_unlikely,
20068 profile_probability::unlikely, profile_probability::even): Set
20069 precision to guessed.
20070
20071 2018-01-23 Richard Biener <rguenther@suse.de>
20072
20073 PR tree-optimization/83963
20074 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20075 Properly terminate dominator walk when crossing the exit edge not
20076 when visiting its source block.
20077
20078 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20079
20080 PR c++/83918
20081 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20082 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20083
20084 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20085
20086 PR tree-optimization/83957
20087 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20088 semicolon after for body surrounded by braces.
20089
20090 PR tree-optimization/83081
20091 * profile-count.h (profile_probability::split): New method.
20092 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20093 Use profile_probability::split.
20094 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20095 when splitting a single conditional jump into 2.
20096
20097 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20098
20099 PR tree-optimization/69452
20100 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20101 decl.
20102
20103 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20104
20105 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20106 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20107 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20108
20109 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20110
20111 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20112 declaration.
20113 * config/rl78/rl78.md (movdi): New define_expand.
20114 * config/rl78/rl78.c (rl78_split_movdi): New function.
20115
20116 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20117
20118 PR target/83862
20119 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20120 no longer used.
20121 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20122 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20123 128-bit to produce an UNSPEC move to get the double word with the
20124 signbit and then a shift directly to do signbit.
20125 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20126 implementation with a new version that just does either a direct
20127 move or a regular move. Move memory interface to separate insns.
20128 Move insns so they are next to the expander.
20129 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20130 with signbit move. Split big and little endian case.
20131 (signbit<mode>2_dm_mem_le): Likewise.
20132 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20133 (signbit<mode>2_dm2): Likewise.
20134
20135 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20136
20137 * config/rl78/rl78.md (anddi3): New define_expand.
20138
20139 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20140
20141 * config/rl78/rl78.md (umindi3): New define_expand.
20142
20143 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20144
20145 * config/rl78/rl78.md (smindi3): New define_expand.
20146
20147 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20148
20149 * config/rl78/rl78.md (smaxdi3): New define_expand.
20150
20151 2018-01-22 Carl Love <cel@us.ibm.com>
20152
20153 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20154 LVX_V1TI): Add macro expansion.
20155 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20156 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20157 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20158 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20159 Change check to determine if the instruction is a byte reversing
20160 entry. Fix typo in comment.
20161 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20162 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20163 Add def_builtin calls for new builtins.
20164 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20165 Add define_insn expansion.
20166
20167 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20168
20169 * config/rl78/rl78.md (umaxdi3): New define_expand.
20170
20171 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20172
20173 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20174 for non-QImode registers.
20175
20176 2018-01-22 Richard Biener <rguenther@suse.de>
20177
20178 PR tree-optimization/83963
20179 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20180 including the loop exit block.
20181 (scop_detection::merge_sese): Likewise.
20182 (scop_detection::add_scop): Do it here instead.
20183
20184 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20185
20186 * doc/sourcebuild.texi (arm_softfloat): Document.
20187
20188 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20189
20190 PR gcc/77734
20191 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20192 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20193 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20194
20195 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20196 David Edelsohn <dje.gcc@gmail.com>
20197
20198 PR target/83946
20199 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20200 Change "crset eq" to "crset 2".
20201 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20202 (*call_indirect_aix<mode>_nospec): Likewise.
20203 (*call_value_indirect_aix<mode>_nospec): Likewise.
20204 (*call_indirect_elfv2<mode>_nospec): Likewise.
20205 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20206 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20207 change assembly output from . to $.
20208 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20209 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20210 (*tablejump<mode>_internal1_nospec): Likewise.
20211
20212 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20213
20214 PR target/80870
20215 * config/sh/sh_optimize_sett_clrt.cc:
20216 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20217
20218 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20219
20220 PR tree-optimization/83940
20221 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20222 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20223 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20224 use it to pass back the definition type.
20225 (vect_check_store_rhs): Likewise rhs_dt_out.
20226 (vect_build_gather_load_calls): Add a mask_dt argument and use
20227 it instead of a call to vect_is_simple_use.
20228 (vectorizable_store): Update calls to vect_check_load_store_mask
20229 and vect_check_store_rhs. Use the dt returned by the latter instead
20230 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20231 instead of calls to vect_is_simple_use. Pass the scalar rather
20232 than the vector operand to vect_is_simple_use when handling
20233 second and subsequent copies of an rhs value.
20234 (vectorizable_load): Update calls to vect_check_load_store_mask
20235 and vect_build_gather_load_calls. Use the cached mask_dt and
20236 gs_info.offset_dt instead of calls to vect_is_simple_use.
20237
20238 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20239
20240 PR middle-end/83945
20241 * tree-emutls.c: Include gimplify.h.
20242 (lower_emutls_2): New function.
20243 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20244 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20245 it before further processing.
20246
20247 PR target/83930
20248 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20249 UINTVAL (trueop1) instead of INTVAL (op1).
20250
20251 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20252
20253 PR debug/81570
20254 PR debug/83728
20255 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20256 INCOMING_FRAME_SP_OFFSET if not defined.
20257 (scan_trace): Add ENTRY argument. If true and
20258 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20259 emit a note to adjust the CFA offset.
20260 (create_cfi_notes): Adjust scan_trace callers.
20261 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20262 INCOMING_FRAME_SP_OFFSET in the CIE.
20263 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20264 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20265 Likewise.
20266 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20267 * doc/tm.texi: Regenerated.
20268
20269 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20270
20271 PR rtl-optimization/83147
20272 * lra-constraints.c (remove_inheritance_pseudos): Use
20273 lra_substitute_pseudo_within_insn.
20274
20275 2018-01-19 Tom de Vries <tom@codesourcery.com>
20276 Cesar Philippidis <cesar@codesourcery.com>
20277
20278 PR target/83920
20279 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20280
20281 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20282
20283 PR target/83790
20284 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20285 spaces for function labels.
20286
20287 2018-01-19 Martin Liska <mliska@suse.cz>
20288
20289 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20290 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20291 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20292 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20293 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20294 (PRED_CONST_RETURN): Change from 69 to 65.
20295 (PRED_NULL_RETURN): Change from 91 to 71.
20296 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20297 (PRED_LOOP_GUARD): Change from 66 to 73.
20298
20299 2018-01-19 Martin Liska <mliska@suse.cz>
20300
20301 * predict.c (predict_insn_def): Add new assert.
20302 (struct branch_predictor): Change type to signed integer.
20303 (test_prediction_value_range): Amend test to cover
20304 PROB_UNINITIALIZED.
20305 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20306 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20307 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20308 (PRED_LOOP_IV_COMPARE): Likewise.
20309 * predict.h (PROB_UNINITIALIZED): Define new constant.
20310
20311 2018-01-19 Martin Liska <mliska@suse.cz>
20312
20313 * predict.c (dump_prediction): Add new format for
20314 analyze_brprob.py script which is enabled with -details
20315 suboption.
20316 * profile-count.h (precise_p): New function.
20317
20318 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20319
20320 PR tree-optimization/83922
20321 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20322 there are no statements that need masking.
20323 (vect_active_double_reduction_p): New function.
20324 (vect_analyze_loop_operations): Use it when handling phis that
20325 are not in the loop header.
20326
20327 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20328
20329 PR tree-optimization/83914
20330 * tree-vect-loop.c (vectorizable_induction): Don't convert
20331 init_expr or apply the peeling adjustment for inductions
20332 that are nested within the vectorized loop.
20333
20334 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20335
20336 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20337 instead of NEG.
20338
20339 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20340
20341 PR sanitizer/81715
20342 PR testsuite/83882
20343 * function.h (gimplify_parameters): Add gimple_seq * argument.
20344 * function.c: Include gimple.h and options.h.
20345 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20346 for the added local temporaries if needed.
20347 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20348 if there are any parameter cleanups, wrap whole body into a
20349 try/finally with the cleanups.
20350
20351 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20352
20353 PR target/82964
20354 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20355 Use GET_MODE_CLASS for scalar floating point.
20356
20357 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20358
20359 PR ipa/82256
20360 patch by PaX Team
20361 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20362 Fix call of call_cgraph_insertion_hooks.
20363
20364 2018-01-18 Martin Sebor <msebor@redhat.com>
20365
20366 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20367
20368 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20369
20370 PR ipa/83619
20371 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20372 frequencies.
20373
20374 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20375
20376 PR other/70268
20377 * common.opt: (-ffile-prefix-map): New option.
20378 * opts.c (common_handle_option): Defer it.
20379 * opts-global.c (handle_common_deferred_options): Handle it.
20380 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20381 * file-prefix-map.h: New file.
20382 (remap_debug_filename, add_debug_prefix_map): ...here.
20383 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20384 * final.c (debug_prefix_map, add_debug_prefix_map
20385 remap_debug_filename): Move to...
20386 * file-prefix-map.c: New file.
20387 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20388 generalize, get rid of alloca(), use strrchr() instead of strchr().
20389 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20390 Implement in terms of add_prefix_map().
20391 (remap_macro_filename, remap_debug_filename): Implement in term of
20392 remap_filename().
20393 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20394 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20395 * dbxout.c: Include file-prefix-map.h.
20396 * varasm.c: Likewise.
20397 * vmsdbgout.c: Likewise.
20398 * xcoffout.c: Likewise.
20399 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20400 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20401 * doc/invoke.texi (-ffile-prefix-map): Document.
20402 (-fdebug-prefix-map): Update description.
20403
20404 2018-01-18 Martin Liska <mliska@suse.cz>
20405
20406 * config/i386/i386.c (indirect_thunk_name): Document that also
20407 lfence is emitted.
20408 (output_indirect_thunk): Document why both instructions
20409 (pause and lfence) are generated.
20410
20411 2018-01-18 Richard Biener <rguenther@suse.de>
20412
20413 PR tree-optimization/83887
20414 * graphite-scop-detection.c
20415 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20416 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20417 (scop_detection::merge_sese): Re-implement with a flood-fill
20418 algorithm that properly finds a SESE region if it exists.
20419
20420 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20421
20422 PR c/61240
20423 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20424 pointer_diff optimizations use view_convert instead of convert.
20425
20426 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20427
20428 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20429 Generate different code for -mno-speculate-indirect-jumps.
20430 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20431 (*call_indirect_aix<mode>): Disable for
20432 -mno-speculate-indirect-jumps.
20433 (*call_indirect_aix<mode>_nospec): New define_insn.
20434 (*call_value_indirect_aix<mode>): Disable for
20435 -mno-speculate-indirect-jumps.
20436 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20437 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20438 -mno-speculate-indirect-jumps.
20439 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20440
20441 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20442
20443 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20444 long double type, set the flags for noting the default long double
20445 type, even if we don't pass or return a long double type.
20446
20447 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20448
20449 PR ipa/83051
20450 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20451 failure.
20452
20453 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20454
20455 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20456 support for merge[hl].
20457 (fold_mergehl_helper): New helper function.
20458 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20459 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20460 (altivec_vmrglw_direct): Add xxmrglw insn.
20461
20462 2018-01-17 Andrew Waterman <andrew@sifive.com>
20463
20464 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20465 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20466
20467 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20468
20469 PR lto/83121
20470 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20471 call the lto_location_cache before reading the
20472 DECL_SOURCE_LOCATION of the types.
20473
20474 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20475 Richard Sandiford <richard.sandiford@linaro.org>
20476
20477 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20478 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20479 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20480 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20481 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20482 Add declaration.
20483 * config/aarch64/constraints.md (aarch64_movti_operand):
20484 Limit immediates.
20485 * config/aarch64/predicates.md (Uti): Add new constraint.
20486
20487 2018-01-17 Carl Love <cel@us.ibm.com>
20488
20489 * config/rs6000/vsx.md (define_expand xl_len_r,
20490 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20491 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20492 lxvll.
20493 (define_expand, define_insn): Move the shift left from the
20494 define_insn to the define_expand for lxvl and stxvl instructions.
20495 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20496 and XL_LEN_R definitions to PURE.
20497
20498 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20499
20500 * config/i386/i386.c (indirect_thunk_name): Declare regno
20501 as unsigned int. Compare regno with INVALID_REGNUM.
20502 (output_indirect_thunk): Ditto.
20503 (output_indirect_thunk_function): Ditto.
20504 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20505 in the call to output_indirect_thunk_function.
20506
20507 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20508
20509 PR middle-end/83884
20510 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20511 rather than the size of inner_type to determine the stack slot size
20512 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20513
20514 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20515
20516 PR target/83546
20517 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20518 to PTA_SILVERMONT.
20519
20520 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20521
20522 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20523 endian Linux systems to optionally enable multilibs for selecting
20524 the long double type if the user configured an explicit type.
20525 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20526 have no long double multilibs if not defined.
20527 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20528 warn if the user used -mabi={ieee,ibm}longdouble and we built
20529 multilibs for long double.
20530 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20531 appropriate multilib option.
20532 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20533 multilib options.
20534 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20535 for building long double multilibs.
20536 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20537
20538 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20539
20540 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20541 copies.
20542
20543 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20544 64 bits.
20545 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20546 128 bits.
20547
20548 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20549 variables.
20550
20551 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20552 return value.
20553
20554 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20555
20556 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20557 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20558
20559 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20560
20561 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20562 different rtl trees depending on TARGET_64BIT.
20563 (rs6000_gen_lvx): Likewise.
20564
20565 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20566
20567 * config/visium/visium.md (nop): Tweak comment.
20568 (hazard_nop): Likewise.
20569
20570 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20571
20572 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20573 -mspeculate-indirect-jumps.
20574 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20575 for -mno-speculate-indirect-jumps.
20576 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20577 (*call_value_indirect_elfv2<mode>): Disable for
20578 -mno-speculate-indirect-jumps.
20579 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20580 (indirect_jump): Emit different RTL for
20581 -mno-speculate-indirect-jumps.
20582 (*indirect_jump<mode>): Disable for
20583 -mno-speculate-indirect-jumps.
20584 (*indirect_jump<mode>_nospec): New define_insn.
20585 (tablejump): Emit different RTL for
20586 -mno-speculate-indirect-jumps.
20587 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20588 (tablejumpsi_nospec): New define_expand.
20589 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20590 (tablejumpdi_nospec): New define_expand.
20591 (*tablejump<mode>_internal1): Disable for
20592 -mno-speculate-indirect-jumps.
20593 (*tablejump<mode>_internal1_nospec): New define_insn.
20594 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20595 option.
20596
20597 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20598
20599 * caller-save.c (insert_save): Drop unnecessary parameter. All
20600 callers updated.
20601
20602 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20603 Richard Biener <rguenth@suse.de>
20604
20605 PR libgomp/83590
20606 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20607 return early, inline manually is_gimple_sizepos. Make sure if we
20608 call gimplify_expr we don't end up with a gimple constant.
20609 * tree.c (variably_modified_type_p): Don't return true for
20610 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20611 * gimplify.h (is_gimple_sizepos): Remove.
20612
20613 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20614
20615 PR tree-optimization/83857
20616 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20617 vectorizable_live_operation for pure SLP statements.
20618 (vectorizable_live_operation): Handle PHIs.
20619
20620 2018-01-16 Richard Biener <rguenther@suse.de>
20621
20622 PR tree-optimization/83867
20623 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20624 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20625
20626 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20627
20628 PR c/83844
20629 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20630 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20631 If off is not INTEGER_CST, issue a may not be aligned warning
20632 rather than isn't aligned. Use isn%'t rather than isn't.
20633 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20634 into MULT_EXPR.
20635 <case MULT_EXPR>: Improve the case when bottom and one of the
20636 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20637 operand, in that case check if the other operand is multiple of
20638 bottom divided by the INTEGER_CST operand.
20639
20640 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20641
20642 PR target/83858
20643 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20644 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20645 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20646 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20647 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20648 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20649 (pa_function_arg_size): New function.
20650
20651 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20652
20653 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20654 in a separate statement.
20655
20656 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20657
20658 PR tree-optimization/83847
20659 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20660 group gathers and scatters.
20661
20662 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20663
20664 PR rtl-optimization/86620
20665 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20666
20667 PR rtl-optimization/83213
20668 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20669 to last if both are JUMP_INSNs.
20670
20671 PR tree-optimization/83843
20672 * gimple-ssa-store-merging.c
20673 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20674 store_immediate_info for bswap/nop orig_stores.
20675
20676 2018-01-15 Andrew Waterman <andrew@sifive.com>
20677
20678 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20679 !TARGET_MUL.
20680 <UDIV>: Increase cost if !TARGET_DIV.
20681
20682 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20683
20684 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20685 (define_attr "cr_logical_3op"): New.
20686 (cceq_ior_compare): Adjust.
20687 (cceq_ior_compare_complement): Adjust.
20688 (*cceq_rev_compare): Adjust.
20689 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20690 (is_cracked_insn): Adjust.
20691 (insn_must_be_first_in_group): Adjust.
20692 * config/rs6000/40x.md: Adjust.
20693 * config/rs6000/440.md: Adjust.
20694 * config/rs6000/476.md: Adjust.
20695 * config/rs6000/601.md: Adjust.
20696 * config/rs6000/603.md: Adjust.
20697 * config/rs6000/6xx.md: Adjust.
20698 * config/rs6000/7450.md: Adjust.
20699 * config/rs6000/7xx.md: Adjust.
20700 * config/rs6000/8540.md: Adjust.
20701 * config/rs6000/cell.md: Adjust.
20702 * config/rs6000/e300c2c3.md: Adjust.
20703 * config/rs6000/e500mc.md: Adjust.
20704 * config/rs6000/e500mc64.md: Adjust.
20705 * config/rs6000/e5500.md: Adjust.
20706 * config/rs6000/e6500.md: Adjust.
20707 * config/rs6000/mpc.md: Adjust.
20708 * config/rs6000/power4.md: Adjust.
20709 * config/rs6000/power5.md: Adjust.
20710 * config/rs6000/power6.md: Adjust.
20711 * config/rs6000/power7.md: Adjust.
20712 * config/rs6000/power8.md: Adjust.
20713 * config/rs6000/power9.md: Adjust.
20714 * config/rs6000/rs64.md: Adjust.
20715 * config/rs6000/titan.md: Adjust.
20716
20717 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20718
20719 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20720 ix86_indirect_branch_register logic.
20721
20722 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20723
20724 * config/i386/constraints.md (Bs): Update
20725 ix86_indirect_branch_register check. Don't check
20726 ix86_indirect_branch_register with GOT_memory_operand.
20727 (Bw): Likewise.
20728 * config/i386/predicates.md (GOT_memory_operand): Don't check
20729 ix86_indirect_branch_register here.
20730 (GOT32_symbol_operand): Likewise.
20731
20732 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20733
20734 * config/i386/predicates.md (constant_call_address_operand):
20735 Rewrite ix86_indirect_branch_register logic.
20736 (sibcall_insn_operand): Likewise.
20737
20738 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20739
20740 * config/i386/constraints.md (Bs): Replace
20741 ix86_indirect_branch_thunk_register with
20742 ix86_indirect_branch_register.
20743 (Bw): Likewise.
20744 * config/i386/i386.md (indirect_jump): Likewise.
20745 (tablejump): Likewise.
20746 (*sibcall_memory): Likewise.
20747 (*sibcall_value_memory): Likewise.
20748 Peepholes of indirect call and jump via memory: Likewise.
20749 * config/i386/i386.opt: Likewise.
20750 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20751 (GOT_memory_operand): Likewise.
20752 (call_insn_operand): Likewise.
20753 (sibcall_insn_operand): Likewise.
20754 (GOT32_symbol_operand): Likewise.
20755
20756 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20757
20758 PR middle-end/83837
20759 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20760 type rather than type addr's type points to.
20761 (expand_omp_atomic_mutex): Likewise.
20762 (expand_omp_atomic): Likewise.
20763
20764 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20765
20766 PR target/83839
20767 * config/i386/i386.c (output_indirect_thunk_function): Use
20768 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20769 for __x86_return_thunk.
20770
20771 2018-01-15 Richard Biener <rguenther@suse.de>
20772
20773 PR middle-end/83850
20774 * expmed.c (extract_bit_field_1): Fix typo.
20775
20776 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20777
20778 PR target/83687
20779 * config/arm/iterators.md (VF): New mode iterator.
20780 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20781 Remove integer-related logic from pattern.
20782 (neon_vabd<mode>_3): Likewise.
20783
20784 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20785
20786 PR middle-end/82694
20787 * common.opt (fstrict-overflow): No longer an alias.
20788 (fwrapv-pointer): New option.
20789 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20790 also for pointer types based on flag_wrapv_pointer.
20791 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20792 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20793 opts->x_flag_wrapv got set.
20794 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20795 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20796 POINTER_TYPE_OVERFLOW_UNDEFINED.
20797 * match.pd: Likewise in address comparison pattern.
20798 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20799
20800 2018-01-15 Richard Biener <rguenther@suse.de>
20801
20802 PR lto/83804
20803 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20804 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20805 Reset type names to their identifier if their TYPE_DECL doesn't
20806 have linkage (and thus is used for ODR and devirt).
20807 (save_debug_info_for_decl): Remove.
20808 (save_debug_info_for_type): Likewise.
20809 (add_tree_to_fld_list): Adjust.
20810 * tree-pretty-print.c (dump_generic_node): Make dumping of
20811 type names more robust.
20812
20813 2018-01-15 Richard Biener <rguenther@suse.de>
20814
20815 * BASE-VER: Bump to 8.0.1.
20816
20817 2018-01-14 Martin Sebor <msebor@redhat.com>
20818
20819 PR other/83508
20820 * builtins.c (check_access): Avoid warning when the no-warning bit
20821 is set.
20822
20823 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20824
20825 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20826 * ira-color (allocno_hard_regs_compare): Likewise.
20827
20828 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20829
20830 PR target/83013
20831 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20832 Use .pushsection/.popsection.
20833
20834 2018-01-14 Martin Sebor <msebor@redhat.com>
20835
20836 PR c++/81327
20837 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20838
20839 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20840
20841 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20842 entry from extra_headers.
20843 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20844 extra_headers, make the list bitwise identical to the i?86-*-* one.
20845
20846 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20847
20848 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20849 -mcmodel=large with -mindirect-branch=thunk,
20850 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20851 -mfunction-return=thunk-extern.
20852 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20853 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20854 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20855
20856 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20857
20858 * config/i386/i386.c (print_reg): Print the name of the full
20859 integer register without '%'.
20860 (ix86_print_operand): Handle 'V'.
20861 * doc/extend.texi: Document 'V' modifier.
20862
20863 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20864
20865 * config/i386/constraints.md (Bs): Disallow memory operand for
20866 -mindirect-branch-register.
20867 (Bw): Likewise.
20868 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20869 (GOT_memory_operand): Likewise.
20870 (call_insn_operand): Likewise.
20871 (sibcall_insn_operand): Likewise.
20872 (GOT32_symbol_operand): Likewise.
20873 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20874 for -mindirect-branch-register.
20875 (tablejump): Likewise.
20876 (*sibcall_memory): Likewise.
20877 (*sibcall_value_memory): Likewise.
20878 Disallow peepholes of indirect call and jump via memory for
20879 -mindirect-branch-register.
20880 (*call_pop): Replace m with Bw.
20881 (*call_value_pop): Likewise.
20882 (*sibcall_pop_memory): Replace m with Bs.
20883 * config/i386/i386.opt (mindirect-branch-register): New option.
20884 * doc/invoke.texi: Document -mindirect-branch-register option.
20885
20886 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20887
20888 * config/i386/i386-protos.h (ix86_output_function_return): New.
20889 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20890 set function_return_type.
20891 (indirect_thunk_name): Add ret_p to indicate thunk for function
20892 return.
20893 (output_indirect_thunk_function): Pass false to
20894 indirect_thunk_name.
20895 (ix86_output_indirect_branch_via_reg): Likewise.
20896 (ix86_output_indirect_branch_via_push): Likewise.
20897 (output_indirect_thunk_function): Create alias for function
20898 return thunk if regno < 0.
20899 (ix86_output_function_return): New function.
20900 (ix86_handle_fndecl_attribute): Handle function_return.
20901 (ix86_attribute_table): Add function_return.
20902 * config/i386/i386.h (machine_function): Add
20903 function_return_type.
20904 * config/i386/i386.md (simple_return_internal): Use
20905 ix86_output_function_return.
20906 (simple_return_internal_long): Likewise.
20907 * config/i386/i386.opt (mfunction-return=): New option.
20908 (indirect_branch): Mention -mfunction-return=.
20909 * doc/extend.texi: Document function_return function attribute.
20910 * doc/invoke.texi: Document -mfunction-return= option.
20911
20912 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20913
20914 * config/i386/i386-opts.h (indirect_branch): New.
20915 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20916 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20917 with local indirect jump when converting indirect call and jump.
20918 (ix86_set_indirect_branch_type): New.
20919 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20920 (indirectlabelno): New.
20921 (indirect_thunk_needed): Likewise.
20922 (indirect_thunk_bnd_needed): Likewise.
20923 (indirect_thunks_used): Likewise.
20924 (indirect_thunks_bnd_used): Likewise.
20925 (INDIRECT_LABEL): Likewise.
20926 (indirect_thunk_name): Likewise.
20927 (output_indirect_thunk): Likewise.
20928 (output_indirect_thunk_function): Likewise.
20929 (ix86_output_indirect_branch_via_reg): Likewise.
20930 (ix86_output_indirect_branch_via_push): Likewise.
20931 (ix86_output_indirect_branch): Likewise.
20932 (ix86_output_indirect_jmp): Likewise.
20933 (ix86_code_end): Call output_indirect_thunk_function if needed.
20934 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20935 needed.
20936 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20937 (ix86_attribute_table): Add indirect_branch.
20938 * config/i386/i386.h (machine_function): Add indirect_branch_type
20939 and has_local_indirect_jump.
20940 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20941 to true.
20942 (tablejump): Likewise.
20943 (*indirect_jump): Use ix86_output_indirect_jmp.
20944 (*tablejump_1): Likewise.
20945 (simple_return_indirect_internal): Likewise.
20946 * config/i386/i386.opt (mindirect-branch=): New option.
20947 (indirect_branch): New.
20948 (keep): Likewise.
20949 (thunk): Likewise.
20950 (thunk-inline): Likewise.
20951 (thunk-extern): Likewise.
20952 * doc/extend.texi: Document indirect_branch function attribute.
20953 * doc/invoke.texi: Document -mindirect-branch= option.
20954
20955 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20956
20957 PR ipa/83051
20958 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20959
20960 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20961
20962 * ipa-inline.c (want_inline_small_function_p): Return false if
20963 inlining has already failed with CIF_FINAL_ERROR.
20964 (update_caller_keys): Call want_inline_small_function_p before
20965 can_inline_edge_p.
20966 (update_callee_keys): Likewise.
20967
20968 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20969
20970 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20971 New function.
20972 (rs6000_quadword_masked_address_p): Likewise.
20973 (quad_aligned_load_p): Likewise.
20974 (quad_aligned_store_p): Likewise.
20975 (const_load_sequence_p): Add comment to describe the outer-most loop.
20976 (mimic_memory_attributes_and_flags): New function.
20977 (rs6000_gen_stvx): Likewise.
20978 (replace_swapped_aligned_store): Likewise.
20979 (rs6000_gen_lvx): Likewise.
20980 (replace_swapped_aligned_load): Likewise.
20981 (replace_swapped_load_constant): Capitalize argument name in
20982 comment describing this function.
20983 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20984 and stores that access quad-word aligned addresses and replace
20985 with stvx or lvx instructions when appropriate.
20986 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20987 New function prototype.
20988 (rs6000_quadword_masked_address_p): Likewise.
20989 (rs6000_gen_lvx): Likewise.
20990 (rs6000_gen_stvx): Likewise.
20991 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20992 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20993 when memory address is aligned.
20994 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20995 this split to select lvx instruction when memory address is aligned.
20996 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20997 instruction when memory address is aligned.
20998 (*vsx_le_perm_load_v16qi): Likewise.
20999 (four unnamed splitters): Modify to select the stvx instruction
21000 when memory is aligned.
21001
21002 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21003
21004 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21005 which appears in the queue multiple times.
21006
21007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21008 Alan Hayward <alan.hayward@arm.com>
21009 David Sherwood <david.sherwood@arm.com>
21010
21011 * tree-vectorizer.h (vec_lower_bound): New structure.
21012 (_loop_vec_info): Add check_nonzero and lower_bounds.
21013 (LOOP_VINFO_CHECK_NONZERO): New macro.
21014 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21015 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21016 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21017 fields. Make seg_len the distance travelled, not including the
21018 access size.
21019 (dr_direction_indicator): Declare.
21020 (dr_zero_step_indicator): Likewise.
21021 (dr_known_forward_stride_p): Likewise.
21022 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21023 tree-ssanames.h.
21024 (runtime_alias_check_p): Allow runtime alias checks with
21025 variable strides.
21026 (operator ==): Compare access_size and align.
21027 (prune_runtime_alias_test_list): Rework for new distinction between
21028 the access_size and seg_len.
21029 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21030 segment lengths.
21031 (get_segment_min_max): New function.
21032 (create_intersect_range_checks): Use it.
21033 (dr_step_indicator): New function.
21034 (dr_direction_indicator): Likewise.
21035 (dr_zero_step_indicator): Likewise.
21036 (dr_known_forward_stride_p): Likewise.
21037 * tree-loop-distribution.c (data_ref_segment_size): Return
21038 DR_STEP * (niters - 1).
21039 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21040 constructor.
21041 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21042 (vect_preserves_scalar_order_p): New function, split out from...
21043 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21044 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21045 (vect_vfa_access_size): New function.
21046 (vect_vfa_align): Likewise.
21047 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21048 (dump_lower_bound): New function.
21049 (vect_check_lower_bound): Likewise.
21050 (vect_small_gap_p): Likewise.
21051 (vectorizable_with_step_bound_p): Likewise.
21052 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21053 depencies if the vectorization factor is 1. Convert the checks
21054 for nonzero steps into checks on the bounds of DR_STEP. Try using
21055 a bunds check for variable steps if the minimum required step is
21056 relatively small. Update calls to the dr_with_seg_len
21057 constructor and to vect_compile_time_alias.
21058 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21059 function.
21060 (vect_loop_versioning): Call it.
21061 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21062 when retrying.
21063 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21064
21065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21066 Alan Hayward <alan.hayward@arm.com>
21067 David Sherwood <david.sherwood@arm.com>
21068
21069 * doc/sourcebuild.texi (vect_scatter_store): Document.
21070 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21071 optabs.
21072 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21073 Document.
21074 * genopinit.c (main): Add supports_vec_scatter_store and
21075 supports_vec_scatter_store_cached to target_optabs.
21076 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21077 IFN_MASK_SCATTER_STORE.
21078 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21079 functions.
21080 * internal-fn.h (internal_store_fn_p): Declare.
21081 (internal_fn_stored_value_index): Likewise.
21082 * internal-fn.c (scatter_store_direct): New macro.
21083 (expand_scatter_store_optab_fn): New function.
21084 (direct_scatter_store_optab_supported_p): New macro.
21085 (internal_store_fn_p): New function.
21086 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21087 IFN_MASK_SCATTER_STORE.
21088 (internal_fn_mask_index): Likewise.
21089 (internal_fn_stored_value_index): New function.
21090 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21091 for scatter stores.
21092 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21093 * optabs-query.c (supports_vec_scatter_store_p): New function.
21094 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21095 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21096 true for scatter stores.
21097 (vect_gather_scatter_fn_p): Handle scatter stores too.
21098 (vect_check_gather_scatter): Consider using scatter stores if
21099 supports_vec_scatter_store_p.
21100 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21101 scatter stores too.
21102 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21103 internal_fn_stored_value_index.
21104 (check_load_store_masking): Handle scatter stores too.
21105 (vect_get_store_rhs): Make public.
21106 (vectorizable_call): Use internal_store_fn_p.
21107 (vectorizable_store): Handle scatter store internal functions.
21108 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21109 when deciding whether the end of the group has been reached.
21110 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21111 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21112 (mask_scatter_store<mode>): New insns.
21113
21114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21115 Alan Hayward <alan.hayward@arm.com>
21116 David Sherwood <david.sherwood@arm.com>
21117
21118 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21119 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21120 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21121 function.
21122 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21123 Use vect_truncate_gather_scatter_offset if we can't treat the
21124 operation as a normal gather load or scatter store.
21125 (get_group_load_store_type): Take the gather_scatter_info
21126 as argument. Try using a gather load or scatter store for
21127 single-element groups.
21128 (get_load_store_type): Update calls to get_group_load_store_type
21129 and vect_use_strided_gather_scatters_p.
21130
21131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21132 Alan Hayward <alan.hayward@arm.com>
21133 David Sherwood <david.sherwood@arm.com>
21134
21135 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21136 optional tree argument.
21137 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21138 null target hooks.
21139 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21140 but continue to use the current value as a fallback.
21141 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21142 to compare the updates.
21143 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21144 (get_load_store_type): Use it when handling a strided access.
21145 (vect_get_strided_load_store_ops): New function.
21146 (vect_get_data_ptr_increment): Likewise.
21147 (vectorizable_load): Handle strided gather loads. Always pass
21148 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21149
21150 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21151 Alan Hayward <alan.hayward@arm.com>
21152 David Sherwood <david.sherwood@arm.com>
21153
21154 * doc/md.texi (gather_load@var{m}): Document.
21155 (mask_gather_load@var{m}): Likewise.
21156 * genopinit.c (main): Add supports_vec_gather_load and
21157 supports_vec_gather_load_cached to target_optabs.
21158 * optabs-tree.c (init_tree_optimization_optabs): Use
21159 ggc_cleared_alloc to allocate target_optabs.
21160 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21161 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21162 functions.
21163 * internal-fn.h (internal_load_fn_p): Declare.
21164 (internal_gather_scatter_fn_p): Likewise.
21165 (internal_fn_mask_index): Likewise.
21166 (internal_gather_scatter_fn_supported_p): Likewise.
21167 * internal-fn.c (gather_load_direct): New macro.
21168 (expand_gather_load_optab_fn): New function.
21169 (direct_gather_load_optab_supported_p): New macro.
21170 (direct_internal_fn_optab): New function.
21171 (internal_load_fn_p): Likewise.
21172 (internal_gather_scatter_fn_p): Likewise.
21173 (internal_fn_mask_index): Likewise.
21174 (internal_gather_scatter_fn_supported_p): Likewise.
21175 * optabs-query.c (supports_at_least_one_mode_p): New function.
21176 (supports_vec_gather_load_p): Likewise.
21177 * optabs-query.h (supports_vec_gather_load_p): Declare.
21178 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21179 and memory_type field.
21180 (NUM_PATTERNS): Bump to 15.
21181 * tree-vect-data-refs.c: Include internal-fn.h.
21182 (vect_gather_scatter_fn_p): New function.
21183 (vect_describe_gather_scatter_call): Likewise.
21184 (vect_check_gather_scatter): Try using internal functions for
21185 gather loads. Recognize existing calls to a gather load function.
21186 (vect_analyze_data_refs): Consider using gather loads if
21187 supports_vec_gather_load_p.
21188 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21189 (vect_get_gather_scatter_offset_type): Likewise.
21190 (vect_convert_mask_for_vectype): Likewise.
21191 (vect_add_conversion_to_patterm): Likewise.
21192 (vect_try_gather_scatter_pattern): Likewise.
21193 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21194 (vect_vect_recog_func_ptrs): Add it.
21195 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21196 internal_fn_mask_index and internal_gather_scatter_fn_p.
21197 (check_load_store_masking): Take the gather_scatter_info as an
21198 argument and handle gather loads.
21199 (vect_get_gather_scatter_ops): New function.
21200 (vectorizable_call): Check internal_load_fn_p.
21201 (vectorizable_load): Likewise. Handle gather load internal
21202 functions.
21203 (vectorizable_store): Update call to check_load_store_masking.
21204 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21205 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21206 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21207 (aarch64_gather_scale_operand_d): New predicates.
21208 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21209 (mask_gather_load<mode>): New insns.
21210
21211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21212 Alan Hayward <alan.hayward@arm.com>
21213 David Sherwood <david.sherwood@arm.com>
21214
21215 * optabs.def (fold_left_plus_optab): New optab.
21216 * doc/md.texi (fold_left_plus_@var{m}): Document.
21217 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21218 * internal-fn.c (fold_left_direct): Define.
21219 (expand_fold_left_optab_fn): Likewise.
21220 (direct_fold_left_optab_supported_p): Likewise.
21221 * fold-const-call.c (fold_const_fold_left): New function.
21222 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21223 * tree-parloops.c (valid_reduction_p): New function.
21224 (gather_scalar_reductions): Use it.
21225 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21226 (vect_finish_replace_stmt): Declare.
21227 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21228 (needs_fold_left_reduction_p): New function, split out from...
21229 (vect_is_simple_reduction): ...here. Accept reductions that
21230 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21231 (vect_force_simple_reduction): Also store the reduction type in
21232 the assignment's STMT_VINFO_REDUC_TYPE.
21233 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21234 (merge_with_identity): New function.
21235 (vect_expand_fold_left): Likewise.
21236 (vectorize_fold_left_reduction): Likewise.
21237 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21238 scalar phi in place for it. Check for target support and reject
21239 cases that would reassociate the operation. Defer the transform
21240 phase to vectorize_fold_left_reduction.
21241 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21242 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21243 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21244
21245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21246
21247 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21248 call to ifc_temp_var.
21249
21250 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21251 Alan Hayward <alan.hayward@arm.com>
21252 David Sherwood <david.sherwood@arm.com>
21253
21254 * target.def (legitimize_address_displacement): Take the original
21255 offset as a poly_int.
21256 * targhooks.h (default_legitimize_address_displacement): Update
21257 accordingly.
21258 * targhooks.c (default_legitimize_address_displacement): Likewise.
21259 * doc/tm.texi: Regenerate.
21260 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21261 as an argument, moving assert of ad->disp == ad->disp_term to...
21262 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21263 Try calling targetm.legitimize_address_displacement before expanding
21264 the address rather than afterwards, and adjust for the new interface.
21265 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21266 Match the new hook interface. Handle SVE addresses.
21267 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21268 new hook interface.
21269
21270 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21271
21272 * Makefile.in (OBJS): Add early-remat.o.
21273 * target.def (select_early_remat_modes): New hook.
21274 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21275 * doc/tm.texi: Regenerate.
21276 * targhooks.h (default_select_early_remat_modes): Declare.
21277 * targhooks.c (default_select_early_remat_modes): New function.
21278 * timevar.def (TV_EARLY_REMAT): New timevar.
21279 * passes.def (pass_early_remat): New pass.
21280 * tree-pass.h (make_pass_early_remat): Declare.
21281 * early-remat.c: New file.
21282 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21283 function.
21284 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21285
21286 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21287 Alan Hayward <alan.hayward@arm.com>
21288 David Sherwood <david.sherwood@arm.com>
21289
21290 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21291 vfm1 with a bound_epilog parameter.
21292 (vect_do_peeling): Update calls accordingly, and move the prologue
21293 call earlier in the function. Treat the base bound_epilog as 0 for
21294 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21295 this base when peeling for gaps.
21296 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21297 with fully-masked loops.
21298 (vect_estimate_min_profitable_iters): Handle the single peeled
21299 iteration in that case.
21300
21301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21302 Alan Hayward <alan.hayward@arm.com>
21303 David Sherwood <david.sherwood@arm.com>
21304
21305 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21306 single-element interleaving even if the size is not a power of 2.
21307 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21308 accesses for single-element interleaving if the group size is
21309 not a power of 2.
21310
21311 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21312 Alan Hayward <alan.hayward@arm.com>
21313 David Sherwood <david.sherwood@arm.com>
21314
21315 * doc/md.texi (fold_extract_last_@var{m}): Document.
21316 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21317 * optabs.def (fold_extract_last_optab): New optab.
21318 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21319 * internal-fn.c (fold_extract_direct): New macro.
21320 (expand_fold_extract_optab_fn): Likewise.
21321 (direct_fold_extract_optab_supported_p): Likewise.
21322 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21323 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21324 EXTRACT_LAST_REDUCTION.
21325 (get_initial_def_for_reduction): Do not create an initial vector
21326 for EXTRACT_LAST_REDUCTION reductions.
21327 (vectorizable_reduction): Leave the scalar phi in place for
21328 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21329 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21330 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21331 transform phase to vectorizable_condition.
21332 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21333 split out from...
21334 (vect_finish_stmt_generation): ...here.
21335 (vect_finish_replace_stmt): New function.
21336 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21337 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21338 pattern.
21339 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21340
21341 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21342 Alan Hayward <alan.hayward@arm.com>
21343 David Sherwood <david.sherwood@arm.com>
21344
21345 * doc/md.texi (extract_last_@var{m}): Document.
21346 * optabs.def (extract_last_optab): New optab.
21347 * internal-fn.def (EXTRACT_LAST): New internal function.
21348 * internal-fn.c (cond_unary_direct): New macro.
21349 (expand_cond_unary_optab_fn): Likewise.
21350 (direct_cond_unary_optab_supported_p): Likewise.
21351 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21352 loops using EXTRACT_LAST.
21353 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21354 (extract_last_<mode>): ...this optab.
21355 (vec_extract<mode><Vel>): Update accordingly.
21356
21357 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21358 Alan Hayward <alan.hayward@arm.com>
21359 David Sherwood <david.sherwood@arm.com>
21360
21361 * target.def (empty_mask_is_expensive): New hook.
21362 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21363 * doc/tm.texi: Regenerate.
21364 * targhooks.h (default_empty_mask_is_expensive): Declare.
21365 * targhooks.c (default_empty_mask_is_expensive): New function.
21366 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21367 if the target says that empty masks are expensive.
21368 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21369 New function.
21370 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21371
21372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21373 Alan Hayward <alan.hayward@arm.com>
21374 David Sherwood <david.sherwood@arm.com>
21375
21376 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21377 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21378 (vect_use_loop_mask_for_alignment_p): New function.
21379 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21380 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21381 niters_skip argument. Make sure that the first niters_skip elements
21382 of the first iteration are inactive.
21383 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21384 Update call to vect_set_loop_masks_directly.
21385 (get_misalign_in_elems): New function, split out from...
21386 (vect_gen_prolog_loop_niters): ...here.
21387 (vect_update_init_of_dr): Take a code argument that specifies whether
21388 the adjustment should be added or subtracted.
21389 (vect_update_init_of_drs): Likewise.
21390 (vect_prepare_for_masked_peels): New function.
21391 (vect_do_peeling): Skip prologue peeling if we're using a mask
21392 instead. Update call to vect_update_inits_of_drs.
21393 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21394 mask_skip_niters.
21395 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21396 alignment. Do not include the number of peeled iterations in
21397 the minimum threshold in that case.
21398 (vectorizable_induction): Adjust the start value down by
21399 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21400 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21401 Take the number of skipped iterations into account when calculating
21402 the loop bounds.
21403 * tree-vect-stmts.c (vect_gen_while_not): New function.
21404
21405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21406 Alan Hayward <alan.hayward@arm.com>
21407 David Sherwood <david.sherwood@arm.com>
21408
21409 * doc/sourcebuild.texi (vect_fully_masked): Document.
21410 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21411 default value to 0.
21412 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21413 split out from...
21414 (vect_analyze_loop_2): ...here. Don't check the vectorization
21415 factor against the number of loop iterations if the loop is
21416 fully-masked.
21417
21418 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21419 Alan Hayward <alan.hayward@arm.com>
21420 David Sherwood <david.sherwood@arm.com>
21421
21422 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21423 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21424 (dump_groups): Update accordingly.
21425 (iv_use::mem_type): New member variable.
21426 (address_p): New function.
21427 (record_use): Add a mem_type argument and initialize the new
21428 mem_type field.
21429 (record_group_use): Add a mem_type argument. Use address_p.
21430 Remove obsolete null checks of base_object. Update call to record_use.
21431 (find_interesting_uses_op): Update call to record_group_use.
21432 (find_interesting_uses_cond): Likewise.
21433 (find_interesting_uses_address): Likewise.
21434 (get_mem_type_for_internal_fn): New function.
21435 (find_address_like_use): Likewise.
21436 (find_interesting_uses_stmt): Try find_address_like_use before
21437 calling find_interesting_uses_op.
21438 (addr_offset_valid_p): Use the iv mem_type field as the type
21439 of the addressed memory.
21440 (add_autoinc_candidates): Likewise.
21441 (get_address_cost): Likewise.
21442 (split_small_address_groups_p): Use address_p.
21443 (split_address_groups): Likewise.
21444 (add_iv_candidate_for_use): Likewise.
21445 (autoinc_possible_for_pair): Likewise.
21446 (rewrite_groups): Likewise.
21447 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21448 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21449 (get_alias_ptr_type_for_ptr_address): New function.
21450 (rewrite_use_address): Rewrite address uses in calls that were
21451 identified by find_address_like_use.
21452
21453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21454 Alan Hayward <alan.hayward@arm.com>
21455 David Sherwood <david.sherwood@arm.com>
21456
21457 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21458 TARGET_MEM_REFs.
21459 * gimple-expr.h (is_gimple_addressable: Likewise.
21460 * gimple-expr.c (is_gimple_address): Likewise.
21461 * internal-fn.c (expand_call_mem_ref): New function.
21462 (expand_mask_load_optab_fn): Use it.
21463 (expand_mask_store_optab_fn): Likewise.
21464
21465 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21466 Alan Hayward <alan.hayward@arm.com>
21467 David Sherwood <david.sherwood@arm.com>
21468
21469 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21470 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21471 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21472 (cond_umax@var{mode}): Document.
21473 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21474 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21475 (cond_umin_optab, cond_umax_optab): New optabs.
21476 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21477 (COND_IOR, COND_XOR): New internal functions.
21478 * internal-fn.h (get_conditional_internal_fn): Declare.
21479 * internal-fn.c (cond_binary_direct): New macro.
21480 (expand_cond_binary_optab_fn): Likewise.
21481 (direct_cond_binary_optab_supported_p): Likewise.
21482 (get_conditional_internal_fn): New function.
21483 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21484 Cope with reduction statements that are vectorized as calls rather
21485 than assignments.
21486 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21487 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21488 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21489 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21490 (UNSPEC_COND_EOR): New unspecs.
21491 (optab): Add mappings for them.
21492 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21493 (sve_int_op, sve_fp_op): New int attributes.
21494
21495 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21496 Alan Hayward <alan.hayward@arm.com>
21497 David Sherwood <david.sherwood@arm.com>
21498
21499 * optabs.def (while_ult_optab): New optab.
21500 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21501 * internal-fn.def (WHILE_ULT): New internal function.
21502 * internal-fn.h (direct_internal_fn_supported_p): New override
21503 that takes two types as argument.
21504 * internal-fn.c (while_direct): New macro.
21505 (expand_while_optab_fn): New function.
21506 (convert_optab_supported_p): Likewise.
21507 (direct_while_optab_supported_p): New macro.
21508 * wide-int.h (wi::udiv_ceil): New function.
21509 * tree-vectorizer.h (rgroup_masks): New structure.
21510 (vec_loop_masks): New typedef.
21511 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21512 and fully_masked_p.
21513 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21514 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21515 (vect_max_vf): New function.
21516 (slpeel_make_loop_iterate_ntimes): Delete.
21517 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21518 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21519 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21520 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21521 internal-fn.h, stor-layout.h and optabs-query.h.
21522 (vect_set_loop_mask): New function.
21523 (add_preheader_seq): Likewise.
21524 (add_header_seq): Likewise.
21525 (interleave_supported_p): Likewise.
21526 (vect_maybe_permute_loop_masks): Likewise.
21527 (vect_set_loop_masks_directly): Likewise.
21528 (vect_set_loop_condition_masked): Likewise.
21529 (vect_set_loop_condition_unmasked): New function, split out from
21530 slpeel_make_loop_iterate_ntimes.
21531 (slpeel_make_loop_iterate_ntimes): Rename to..
21532 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21533 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21534 (vect_do_peeling): Update call accordingly.
21535 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21536 loops.
21537 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21538 mask_compare_type, can_fully_mask_p and fully_masked_p.
21539 (release_vec_loop_masks): New function.
21540 (_loop_vec_info): Use it to free the loop masks.
21541 (can_produce_all_loop_masks_p): New function.
21542 (vect_get_max_nscalars_per_iter): Likewise.
21543 (vect_verify_full_masking): Likewise.
21544 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21545 retries, and free the mask rgroups before retrying. Check loop-wide
21546 reasons for disallowing fully-masked loops. Make the final decision
21547 about whether use a fully-masked loop or not.
21548 (vect_estimate_min_profitable_iters): Do not assume that peeling
21549 for the number of iterations will be needed for fully-masked loops.
21550 (vectorizable_reduction): Disable fully-masked loops.
21551 (vectorizable_live_operation): Likewise.
21552 (vect_halve_mask_nunits): New function.
21553 (vect_double_mask_nunits): Likewise.
21554 (vect_record_loop_mask): Likewise.
21555 (vect_get_loop_mask): Likewise.
21556 (vect_transform_loop): Handle the case in which the final loop
21557 iteration might handle a partial vector. Call vect_set_loop_condition
21558 instead of slpeel_make_loop_iterate_ntimes.
21559 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21560 (check_load_store_masking): New function.
21561 (prepare_load_store_mask): Likewise.
21562 (vectorizable_store): Handle fully-masked loops.
21563 (vectorizable_load): Likewise.
21564 (supportable_widening_operation): Use vect_halve_mask_nunits for
21565 booleans.
21566 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21567 (vect_gen_while): New function.
21568 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21569 (aarch64_uqdec<mode>): New insn.
21570
21571 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21572 Alan Hayward <alan.hayward@arm.com>
21573 David Sherwood <david.sherwood@arm.com>
21574
21575 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21576 (reduc_xor_scal_optab): New optabs.
21577 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21578 (reduc_xor_scal_@var{m}): Document.
21579 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21580 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21581 internal functions.
21582 * fold-const-call.c (fold_const_call): Handle them.
21583 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21584 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21585 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21586 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21587 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21588 (UNSPEC_XORV): New unspecs.
21589 (optab): Add entries for them.
21590 (BITWISEV): New int iterator.
21591 (bit_reduc_op): New int attributes.
21592
21593 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21594 Alan Hayward <alan.hayward@arm.com>
21595 David Sherwood <david.sherwood@arm.com>
21596
21597 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21598 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21599 * optabs.def (vec_shl_insert_optab): New optab.
21600 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21601 (duplicate_and_interleave): Likewise.
21602 * tree-vect-loop.c: Include internal-fn.h.
21603 (neutral_op_for_slp_reduction): New function, split out from
21604 get_initial_defs_for_reduction.
21605 (get_initial_def_for_reduction): Handle option 2 for variable-length
21606 vectors by loading the neutral value into a vector and then shifting
21607 the initial value into element 0.
21608 (get_initial_defs_for_reduction): Replace the code argument with
21609 the neutral value calculated by neutral_op_for_slp_reduction.
21610 Use gimple_build_vector for constant-length vectors.
21611 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21612 but the first group_size elements have a neutral value.
21613 Use duplicate_and_interleave otherwise.
21614 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21615 Update call to get_initial_defs_for_reduction. Handle SLP
21616 reductions for variable-length vectors by creating one vector
21617 result for each scalar result, with the elements associated
21618 with other scalar results stubbed out with the neutral value.
21619 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21620 Require IFN_VEC_SHL_INSERT for double reductions on
21621 variable-length vectors, or SLP reductions that have
21622 a neutral value. Require can_duplicate_and_interleave_p
21623 support for variable-length unchained SLP reductions if there
21624 is no neutral value, such as for MIN/MAX reductions. Also require
21625 the number of vector elements to be a multiple of the number of
21626 SLP statements when doing variable-length unchained SLP reductions.
21627 Update call to vect_create_epilog_for_reduction.
21628 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21629 and remove initial values.
21630 (duplicate_and_interleave): Make public.
21631 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21632 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21633
21634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21635 Alan Hayward <alan.hayward@arm.com>
21636 David Sherwood <david.sherwood@arm.com>
21637
21638 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21639 (can_duplicate_and_interleave_p): New function.
21640 (vect_get_and_check_slp_defs): Take the vector of statements
21641 rather than just the current one. Remove excess parentheses.
21642 Restriction rejectinon of vect_constant_def and vect_external_def
21643 for variable-length vectors to boolean types, or types for which
21644 can_duplicate_and_interleave_p is false.
21645 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21646 (duplicate_and_interleave): New function.
21647 (vect_get_constant_vectors): Use gimple_build_vector for
21648 constant-length vectors and suitable variable-length constant
21649 vectors. Use duplicate_and_interleave for other variable-length
21650 vectors. Don't defer the update when inserting new statements.
21651
21652 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21653 Alan Hayward <alan.hayward@arm.com>
21654 David Sherwood <david.sherwood@arm.com>
21655
21656 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21657 min_profitable_iters doesn't go negative.
21658
21659 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21660 Alan Hayward <alan.hayward@arm.com>
21661 David Sherwood <david.sherwood@arm.com>
21662
21663 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21664 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21665 * optabs.def (vec_mask_load_lanes_optab): New optab.
21666 (vec_mask_store_lanes_optab): Likewise.
21667 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21668 (MASK_STORE_LANES): Likewise.
21669 * internal-fn.c (mask_load_lanes_direct): New macro.
21670 (mask_store_lanes_direct): Likewise.
21671 (expand_mask_load_optab_fn): Handle masked operations.
21672 (expand_mask_load_lanes_optab_fn): New macro.
21673 (expand_mask_store_optab_fn): Handle masked operations.
21674 (expand_mask_store_lanes_optab_fn): New macro.
21675 (direct_mask_load_lanes_optab_supported_p): Likewise.
21676 (direct_mask_store_lanes_optab_supported_p): Likewise.
21677 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21678 parameter.
21679 (vect_load_lanes_supported): Likewise.
21680 * tree-vect-data-refs.c (strip_conversion): New function.
21681 (can_group_stmts_p): Likewise.
21682 (vect_analyze_data_ref_accesses): Use it instead of checking
21683 for a pair of assignments.
21684 (vect_store_lanes_supported): Take a masked_p parameter.
21685 (vect_load_lanes_supported): Likewise.
21686 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21687 vect_store_lanes_supported and vect_load_lanes_supported.
21688 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21689 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21690 parameter. Don't allow gaps for masked accesses.
21691 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21692 and vect_load_lanes_supported.
21693 (get_load_store_type): Take a masked_p parameter and update
21694 call to get_group_load_store_type.
21695 (vectorizable_store): Update call to get_load_store_type.
21696 Handle IFN_MASK_STORE_LANES.
21697 (vectorizable_load): Update call to get_load_store_type.
21698 Handle IFN_MASK_LOAD_LANES.
21699
21700 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21701 Alan Hayward <alan.hayward@arm.com>
21702 David Sherwood <david.sherwood@arm.com>
21703
21704 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21705 modes for SVE.
21706 * config/aarch64/aarch64-protos.h
21707 (aarch64_sve_struct_memory_operand_p): Declare.
21708 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21709 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21710 (VPRED, vpred): Handle SVE structure modes.
21711 * config/aarch64/constraints.md (Utx): New constraint.
21712 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21713 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21714 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21715 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21716 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21717 structure modes. Split into pieces after RA.
21718 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21719 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21720 New patterns.
21721 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21722 SVE structure modes.
21723 (aarch64_classify_address): Likewise.
21724 (sizetochar): Move earlier in file.
21725 (aarch64_print_operand): Handle SVE register lists.
21726 (aarch64_array_mode): New function.
21727 (aarch64_sve_struct_memory_operand_p): Likewise.
21728 (TARGET_ARRAY_MODE): Redefine.
21729
21730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21731 Alan Hayward <alan.hayward@arm.com>
21732 David Sherwood <david.sherwood@arm.com>
21733
21734 * target.def (array_mode): New target hook.
21735 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21736 * doc/tm.texi: Regenerate.
21737 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21738 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21739 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21740 targetm.array_mode.
21741 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21742 type sizes.
21743
21744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21745 Alan Hayward <alan.hayward@arm.com>
21746 David Sherwood <david.sherwood@arm.com>
21747
21748 * fold-const.c (fold_binary_loc): Check the argument types
21749 rather than the result type when testing for a vector operation.
21750
21751 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21752
21753 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21754 * doc/tm.texi: Regenerate.
21755
21756 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21757 Alan Hayward <alan.hayward@arm.com>
21758 David Sherwood <david.sherwood@arm.com>
21759
21760 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21761 (sve): Document new AArch64 extension.
21762 * doc/md.texi (w): Extend the description of the AArch64
21763 constraint to include SVE vectors.
21764 (Upl, Upa): Document new AArch64 predicate constraints.
21765 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21766 enum.
21767 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21768 (msve-vector-bits=): New option.
21769 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21770 SVE when these are disabled.
21771 (sve): New extension.
21772 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21773 modes. Adjust their number of units based on aarch64_sve_vg.
21774 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21775 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21776 aarch64_addr_query_type.
21777 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21778 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21779 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21780 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21781 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21782 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21783 (aarch64_simd_imm_zero_p): Delete.
21784 (aarch64_check_zero_based_sve_index_immediate): Declare.
21785 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21786 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21787 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21788 (aarch64_sve_float_mul_immediate_p): Likewise.
21789 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21790 rather than an rtx.
21791 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21792 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21793 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21794 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21795 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21796 (aarch64_regmode_natural_size): Likewise.
21797 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21798 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21799 left one place.
21800 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21801 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21802 for VG and the SVE predicate registers.
21803 (V_ALIASES): Add a "z"-prefixed alias.
21804 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21805 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21806 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21807 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21808 (REG_CLASS_NAMES): Add entries for them.
21809 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21810 and the predicate registers.
21811 (aarch64_sve_vg): Declare.
21812 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21813 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21814 (REGMODE_NATURAL_SIZE): Define.
21815 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21816 SVE macros.
21817 * config/aarch64/aarch64.c: Include cfgrtl.h.
21818 (simd_immediate_info): Add a constructor for series vectors,
21819 and an associated step field.
21820 (aarch64_sve_vg): New variable.
21821 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21822 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21823 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21824 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21825 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21826 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21827 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21828 (aarch64_get_mask_mode): New functions.
21829 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21830 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21831 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21832 predicate modes and predicate registers. Explicitly restrict
21833 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21834 to store a vector mode if it is recognized by
21835 aarch64_classify_vector_mode.
21836 (aarch64_regmode_natural_size): New function.
21837 (aarch64_hard_regno_caller_save_mode): Return the original mode
21838 for predicates.
21839 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21840 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21841 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21842 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21843 functions.
21844 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21845 does not overlap dest if the function is frame-related. Handle
21846 SVE constants.
21847 (aarch64_split_add_offset): New function.
21848 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21849 them aarch64_add_offset.
21850 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21851 and update call to aarch64_sub_sp.
21852 (aarch64_add_cfa_expression): New function.
21853 (aarch64_expand_prologue): Pass extra temporary registers to the
21854 functions above. Handle the case in which we need to emit new
21855 DW_CFA_expressions for registers that were originally saved
21856 relative to the stack pointer, but now have to be expressed
21857 relative to the frame pointer.
21858 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21859 functions above.
21860 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21861 IP0 and IP1 values for SVE frames.
21862 (aarch64_expand_vec_series): New function.
21863 (aarch64_expand_sve_widened_duplicate): Likewise.
21864 (aarch64_expand_sve_const_vector): Likewise.
21865 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21866 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21867 into the register, rather than emitting a SET directly.
21868 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21869 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21870 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21871 (offset_9bit_signed_scaled_p): New functions.
21872 (aarch64_replicate_bitmask_imm): New function.
21873 (aarch64_bitmask_imm): Use it.
21874 (aarch64_cannot_force_const_mem): Reject expressions involving
21875 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21876 (aarch64_classify_index): Handle SVE indices, by requiring
21877 a plain register index with a scale that matches the element size.
21878 (aarch64_classify_address): Handle SVE addresses. Assert that
21879 the mode of the address is VOIDmode or an integer mode.
21880 Update call to aarch64_classify_symbol.
21881 (aarch64_classify_symbolic_expression): Update call to
21882 aarch64_classify_symbol.
21883 (aarch64_const_vec_all_in_range_p): New function.
21884 (aarch64_print_vector_float_operand): Likewise.
21885 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21886 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21887 and the FP immediates 1.0 and 0.5.
21888 (aarch64_print_address_internal): Handle SVE addresses.
21889 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21890 (aarch64_regno_regclass): Handle predicate registers.
21891 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21892 data modes.
21893 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21894 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21895 (aarch64_convert_sve_vector_bits): New function.
21896 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21897 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21898 rather than an rtx.
21899 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21900 Handle SVE vector and predicate modes. Accept VL-based constants
21901 that need only one temporary register, and VL offsets that require
21902 no temporary registers.
21903 (aarch64_conditional_register_usage): Mark the predicate registers
21904 as fixed if SVE isn't available.
21905 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21906 Return true for SVE vector and predicate modes.
21907 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21908 rather than an unsigned int. Handle SVE modes.
21909 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21910 SVE modes.
21911 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21912 if SVE is enabled.
21913 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21914 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21915 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21916 (aarch64_sve_float_mul_immediate_p): New functions.
21917 (aarch64_sve_valid_immediate): New function.
21918 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21919 Explicitly reject structure modes. Check for INDEX constants.
21920 Handle PTRUE and PFALSE constants.
21921 (aarch64_check_zero_based_sve_index_immediate): New function.
21922 (aarch64_simd_imm_zero_p): Delete.
21923 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21924 vector modes. Accept constants in the range of CNT[BHWD].
21925 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21926 ask for an Advanced SIMD mode.
21927 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21928 (aarch64_simd_vector_alignment): Handle SVE predicates.
21929 (aarch64_vectorize_preferred_vector_alignment): New function.
21930 (aarch64_simd_vector_alignment_reachable): Use it instead of
21931 the vector size.
21932 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21933 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21934 functions.
21935 (MAX_VECT_LEN): Delete.
21936 (expand_vec_perm_d): Add a vec_flags field.
21937 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21938 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21939 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21940 for SVE modes.
21941 (aarch64_evpc_rev): Rename to...
21942 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21943 (aarch64_evpc_rev_global): New function.
21944 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21945 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21946 MAX_VECT_LEN.
21947 (aarch64_evpc_sve_tbl): New function.
21948 (aarch64_expand_vec_perm_const_1): Update after rename of
21949 aarch64_evpc_rev. Handle SVE permutes too, trying
21950 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21951 than aarch64_evpc_tbl.
21952 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21953 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21954 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21955 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21956 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21957 (aarch64_expand_sve_vcond): New functions.
21958 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21959 of aarch64_vector_mode_p.
21960 (aarch64_dwarf_poly_indeterminate_value): New function.
21961 (aarch64_compute_pressure_classes): Likewise.
21962 (aarch64_can_change_mode_class): Likewise.
21963 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21964 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21965 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21966 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21967 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21968 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21969 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21970 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21971 constraints.
21972 (Dn, Dl, Dr): Accept const as well as const_vector.
21973 (Dz): Likewise. Compare against CONST0_RTX.
21974 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21975 of "vector" where appropriate.
21976 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21977 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21978 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21979 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21980 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21981 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21982 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21983 (v_int_equiv): Extend to SVE modes.
21984 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21985 mode attributes.
21986 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21987 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21988 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21989 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21990 (SVE_COND_FP_CMP): New int iterators.
21991 (perm_hilo): Handle the new unpack unspecs.
21992 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21993 attributes.
21994 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21995 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21996 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21997 (aarch64_equality_operator, aarch64_constant_vector_operand)
21998 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21999 (aarch64_sve_nonimmediate_operand): Likewise.
22000 (aarch64_sve_general_operand): Likewise.
22001 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22002 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22003 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22004 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22005 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22006 (aarch64_sve_float_arith_immediate): Likewise.
22007 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22008 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22009 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22010 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22011 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22012 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22013 (aarch64_sve_float_arith_operand): Likewise.
22014 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22015 (aarch64_sve_float_mul_operand): Likewise.
22016 (aarch64_sve_vec_perm_operand): Likewise.
22017 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22018 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22019 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22020 as well as const_vector.
22021 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22022 in file. Use CONST0_RTX and CONSTM1_RTX.
22023 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22024 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22025 Use aarch64_simd_imm_zero.
22026 * config/aarch64/aarch64-sve.md: New file.
22027 * config/aarch64/aarch64.md: Include it.
22028 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22029 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22030 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22031 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22032 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22033 (sve): New attribute.
22034 (enabled): Disable instructions with the sve attribute unless
22035 TARGET_SVE.
22036 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22037 aarch64_expand_mov_immediate.
22038 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22039 CNT[BHSD] immediates.
22040 (movti): Split CONST_POLY_INT moves into two halves.
22041 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22042 Split additions that need a temporary here if the destination
22043 is the stack pointer.
22044 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22045 (*add<mode>3_poly_1): New instruction.
22046 (set_clobber_cc): New expander.
22047
22048 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22049
22050 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22051 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22052 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22053 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22054 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22055 Change innermode from fixed_mode_size to machine_mode.
22056 (simplify_subreg): Update call accordingly. Handle a constant-sized
22057 subreg of a variable-length CONST_VECTOR.
22058
22059 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22060 Alan Hayward <alan.hayward@arm.com>
22061 David Sherwood <david.sherwood@arm.com>
22062
22063 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22064 (add_offset_to_base): New function, split out from...
22065 (create_mem_ref): ...here. When handling a scale other than 1,
22066 check first whether the address is valid without the offset.
22067 Add it into the base if so, leaving the index and scale as-is.
22068
22069 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22070
22071 PR c++/83778
22072 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22073 fold_for_warn before checking if arg2 is INTEGER_CST.
22074
22075 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22076
22077 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22078 (store_multiple_operation): Delete.
22079 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22080 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22081 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22082 guarded by TARGET_STRING.
22083 (rs6000_output_load_multiple): Delete.
22084 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22085 OPTION_MASK_STRING / TARGET_STRING handling.
22086 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22087 (const rs6000_opt_masks) <"string">: Change mask to 0.
22088 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22089 (MASK_STRING): Delete.
22090 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22091 parts. Simplify.
22092 (load_multiple): Delete.
22093 (*ldmsi8): Delete.
22094 (*ldmsi7): Delete.
22095 (*ldmsi6): Delete.
22096 (*ldmsi5): Delete.
22097 (*ldmsi4): Delete.
22098 (*ldmsi3): Delete.
22099 (store_multiple): Delete.
22100 (*stmsi8): Delete.
22101 (*stmsi7): Delete.
22102 (*stmsi6): Delete.
22103 (*stmsi5): Delete.
22104 (*stmsi4): Delete.
22105 (*stmsi3): Delete.
22106 (movmemsi_8reg): Delete.
22107 (corresponding unnamed define_insn): Delete.
22108 (movmemsi_6reg): Delete.
22109 (corresponding unnamed define_insn): Delete.
22110 (movmemsi_4reg): Delete.
22111 (corresponding unnamed define_insn): Delete.
22112 (movmemsi_2reg): Delete.
22113 (corresponding unnamed define_insn): Delete.
22114 (movmemsi_1reg): Delete.
22115 (corresponding unnamed define_insn): Delete.
22116 * config/rs6000/rs6000.opt (mno-string): New.
22117 (mstring): Replace by deprecation warning stub.
22118 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22119
22120 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22121
22122 * regrename.c (regrename_do_replace): If replacing the same
22123 reg multiple times, try to reuse last created gen_raw_REG.
22124
22125 PR debug/81155
22126 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22127 main to workaround a bug in GDB.
22128
22129 2018-01-12 Tom de Vries <tom@codesourcery.com>
22130
22131 PR target/83737
22132 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22133
22134 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22135
22136 PR rtl-optimization/80481
22137 * ira-color.c (get_cap_member): New function.
22138 (allocnos_conflict_by_live_ranges_p): Use it.
22139 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22140 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22141
22142 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22143
22144 PR target/83628
22145 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22146 (*saddl_se_1): Ditto.
22147 (*ssubsi_1): Ditto.
22148 (*ssubl_se_1): Ditto.
22149
22150 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22151
22152 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22153 rather than wi::to_widest for DR_INITs.
22154 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22155 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22156 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22157 INTEGER_CSTs.
22158 (vect_analyze_group_access_1): Note that here.
22159
22160 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22161
22162 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22163 polynomial type sizes.
22164
22165 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22166
22167 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22168 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22169 (gimple_add_tmp_var): Likewise.
22170
22171 2018-01-12 Martin Liska <mliska@suse.cz>
22172
22173 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22174 (gimple_alloc_sizes): Likewise.
22175 (dump_gimple_statistics): Use PRIu64 in printf format.
22176 * gimple.h: Change uint64_t to int.
22177
22178 2018-01-12 Martin Liska <mliska@suse.cz>
22179
22180 * tree-core.h: Use uint64_t instead of int.
22181 * tree.c (tree_node_counts): Likewise.
22182 (tree_node_sizes): Likewise.
22183 (dump_tree_statistics): Use PRIu64 in printf format.
22184
22185 2018-01-12 Martin Liska <mliska@suse.cz>
22186
22187 * Makefile.in: As qsort_chk is implemented in vec.c, add
22188 vec.o to linkage of gencfn-macros.
22189 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22190 passing the info to record_node_allocation_statistics.
22191 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22192 and pass the info.
22193 * ggc-common.c (struct ggc_usage): Add operator== and use
22194 it in operator< and compare function.
22195 * mem-stats.h (struct mem_usage): Likewise.
22196 * vec.c (struct vec_usage): Remove operator< and compare
22197 function. Can be simply inherited.
22198
22199 2018-01-12 Martin Jambor <mjambor@suse.cz>
22200
22201 PR target/81616
22202 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22203 * tree-ssa-math-opts.c: Include domwalk.h.
22204 (convert_mult_to_fma_1): New function.
22205 (fma_transformation_info): New type.
22206 (fma_deferring_state): Likewise.
22207 (cancel_fma_deferring): New function.
22208 (result_of_phi): Likewise.
22209 (last_fma_candidate_feeds_initial_phi): Likewise.
22210 (convert_mult_to_fma): Added deferring logic, split actual
22211 transformation to convert_mult_to_fma_1.
22212 (math_opts_dom_walker): New type.
22213 (math_opts_dom_walker::after_dom_children): New method, body moved
22214 here from pass_optimize_widening_mul::execute, added deferring logic
22215 bits.
22216 (pass_optimize_widening_mul::execute): Moved most of code to
22217 math_opts_dom_walker::after_dom_children.
22218 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22219 * config/i386/i386.c (ix86_option_override_internal): Added
22220 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22221
22222 2018-01-12 Richard Biener <rguenther@suse.de>
22223
22224 PR debug/83157
22225 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22226 inline instance vars.
22227
22228 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22229
22230 PR target/81819
22231 * config/rx/rx.c (rx_is_restricted_memory_address):
22232 Handle SUBREG case.
22233
22234 2018-01-12 Richard Biener <rguenther@suse.de>
22235
22236 PR tree-optimization/80846
22237 * target.def (split_reduction): New target hook.
22238 * targhooks.c (default_split_reduction): New function.
22239 * targhooks.h (default_split_reduction): Declare.
22240 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22241 target requests first reduce vectors by combining low and high
22242 parts.
22243 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22244 (get_vectype_for_scalar_type_and_size): Export.
22245 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22246 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22247 * doc/tm.texi: Regenerate.
22248 * config/i386/i386.c (ix86_split_reduction): Implement
22249 TARGET_VECTORIZE_SPLIT_REDUCTION.
22250
22251 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22252
22253 PR target/83368
22254 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22255 in PIC mode except for TARGET_VXWORKS_RTP.
22256 * config/sparc/sparc.c: Include cfgrtl.h.
22257 (TARGET_INIT_PIC_REG): Define.
22258 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22259 (sparc_pic_register_p): New predicate.
22260 (sparc_legitimate_address_p): Use it.
22261 (sparc_legitimize_pic_address): Likewise.
22262 (sparc_delegitimize_address): Likewise.
22263 (sparc_mode_dependent_address_p): Likewise.
22264 (gen_load_pcrel_sym): Remove 4th parameter.
22265 (load_got_register): Adjust call to above. Remove obsolete stuff.
22266 (sparc_expand_prologue): Do not call load_got_register here.
22267 (sparc_flat_expand_prologue): Likewise.
22268 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22269 (sparc_use_pseudo_pic_reg): New function.
22270 (sparc_init_pic_reg): Likewise.
22271 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22272 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22273
22274 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22275
22276 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22277 Add item for branch_cost.
22278
22279 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22280
22281 PR rtl-optimization/83565
22282 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22283 not extend the result to a larger mode for rotate operations.
22284 (num_sign_bit_copies1): Likewise.
22285
22286 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22287
22288 PR target/40411
22289 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22290 -symbolic.
22291 Use values-Xc.o for -pedantic.
22292 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22293
22294 2018-01-12 Martin Liska <mliska@suse.cz>
22295
22296 PR ipa/83054
22297 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22298 New function.
22299 (possible_polymorphic_call_targets): Use it.
22300 (ipa_devirt): Likewise.
22301
22302 2018-01-12 Martin Liska <mliska@suse.cz>
22303
22304 * profile-count.h (enum profile_quality): Use 0 as invalid
22305 enum value of profile_quality.
22306
22307 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22308
22309 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22310 -mext-string options.
22311
22312 2018-01-12 Richard Biener <rguenther@suse.de>
22313
22314 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22315 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22316 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22317 Likewise.
22318 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22319
22320 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22321
22322 * configure.ac (--with-long-double-format): Add support for the
22323 configuration option to change the default long double format on
22324 PowerPC systems.
22325 * config.gcc (powerpc*-linux*-*): Likewise.
22326 * configure: Regenerate.
22327 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22328 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22329 used without modification.
22330
22331 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22332
22333 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22334 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22335 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22336 MISC_BUILTIN_SPEC_BARRIER.
22337 (rs6000_init_builtins): Likewise.
22338 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22339 enum value.
22340 (speculation_barrier): New define_insn.
22341 * doc/extend.texi: Document __builtin_speculation_barrier.
22342
22343 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22344
22345 PR target/83203
22346 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22347 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22348 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22349 iterators.
22350 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22351 integral modes instead of "ss" and "sd".
22352 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22353 vectors with 32-bit and 64-bit elements.
22354 (vecdupssescalarmodesuffix): New mode attribute.
22355 (vec_dup<mode>): Use it.
22356
22357 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22358
22359 PR target/83330
22360 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22361 frame if argument is passed on stack.
22362
22363 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22364
22365 PR target/82682
22366 * ree.c (combine_reaching_defs): Optimize also
22367 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22368 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22369
22370 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22371
22372 PR middle-end/83189
22373 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22374
22375 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22376
22377 PR middle-end/83718
22378 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22379 after they are computed.
22380
22381 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22382
22383 PR tree-optimization/83695
22384 * gimple-loop-linterchange.cc
22385 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22386 reset cached scev information after interchange.
22387 (pass_linterchange::execute): Remove call to scev_reset_htab.
22388
22389 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22390
22391 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22392 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22393 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22394 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22395 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22396 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22397 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22398 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22399 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22400 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22401 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22402 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22403 (V_lane_reg): Likewise.
22404 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22405 New define_expand.
22406 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22407 (vfmal_lane_low<mode>_intrinsic,
22408 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22409 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22410 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22411 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22412 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22413 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22414
22415 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22416
22417 * config/arm/arm-cpus.in (fp16fml): New feature.
22418 (ALL_SIMD): Add fp16fml.
22419 (armv8.2-a): Add fp16fml as an option.
22420 (armv8.3-a): Likewise.
22421 (armv8.4-a): Add fp16fml as part of fp16.
22422 * config/arm/arm.h (TARGET_FP16FML): Define.
22423 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22424 when appropriate.
22425 * config/arm/arm-modes.def (V2HF): Define.
22426 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22427 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22428 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22429 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22430 vfmsl_low, vfmsl_high): New set of builtins.
22431 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22432 (vfml_op): New code attribute.
22433 (VFMLHALVES): New int iterator.
22434 (VFML, VFMLSEL): New mode attributes.
22435 (V_reg): Define mapping for V2HF.
22436 (V_hi, V_lo): New mode attributes.
22437 (VF_constraint): Likewise.
22438 (vfml_half, vfml_half_selector): New int attributes.
22439 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22440 define_expand.
22441 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22442 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22443 New define_insn.
22444 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22445 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22446 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22447 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22448 documentation.
22449 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22450 Document new effective target and option set.
22451
22452 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22453
22454 * config/arm/arm-cpus.in (armv8_4): New feature.
22455 (ARMv8_4a): New fgroup.
22456 (armv8.4-a): New arch.
22457 * config/arm/arm-tables.opt: Regenerate.
22458 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22459 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22460 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22461 Add matching rules for -march=armv8.4-a and extensions.
22462 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22463
22464 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22465
22466 PR target/81821
22467 * config/rx/rx.md (BW): New mode attribute.
22468 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22469
22470 2018-01-11 Richard Biener <rguenther@suse.de>
22471
22472 PR tree-optimization/83435
22473 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22474 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22475 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22476
22477 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22478 Alan Hayward <alan.hayward@arm.com>
22479 David Sherwood <david.sherwood@arm.com>
22480
22481 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22482 field.
22483 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22484 (aarch64_print_address_internal): Use it to check for a zero offset.
22485
22486 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22487 Alan Hayward <alan.hayward@arm.com>
22488 David Sherwood <david.sherwood@arm.com>
22489
22490 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22491 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22492 Return a poly_int64 rather than a HOST_WIDE_INT.
22493 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22494 rather than a HOST_WIDE_INT.
22495 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22496 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22497 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22498 final_offset from HOST_WIDE_INT to poly_int64.
22499 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22500 to_constant when getting the number of units in an Advanced SIMD
22501 mode.
22502 (aarch64_builtin_vectorized_function): Check for a constant number
22503 of units.
22504 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22505 GET_MODE_SIZE.
22506 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22507 attribute instead of GET_MODE_NUNITS.
22508 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22509 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22510 GET_MODE_SIZE for fixed-size registers.
22511 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22512 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22513 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22514 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22515 (aarch64_print_operand, aarch64_print_address_internal)
22516 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22517 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22518 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22519 Handle polynomial GET_MODE_SIZE.
22520 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22521 wider than SImode without modification.
22522 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22523 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22524 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22525 passing and returning SVE modes.
22526 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22527 rather than GEN_INT.
22528 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22529 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22530 (aarch64_allocate_and_probe_stack_space): Likewise.
22531 (aarch64_layout_frame): Cope with polynomial offsets.
22532 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22533 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22534 polynomial offsets.
22535 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22536 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22537 poly_int64 rather than a HOST_WIDE_INT.
22538 (aarch64_get_separate_components, aarch64_process_components)
22539 (aarch64_expand_prologue, aarch64_expand_epilogue)
22540 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22541 (aarch64_anchor_offset): New function, split out from...
22542 (aarch64_legitimize_address): ...here.
22543 (aarch64_builtin_vectorization_cost): Handle polynomial
22544 TYPE_VECTOR_SUBPARTS.
22545 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22546 GET_MODE_NUNITS.
22547 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22548 number of elements from the PARALLEL rather than the mode.
22549 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22550 rather than GET_MODE_BITSIZE.
22551 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22552 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22553 (aarch64_expand_vec_perm_const_1): Handle polynomial
22554 d->perm.length () and d->perm elements.
22555 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22556 Apply to_constant to d->perm elements.
22557 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22558 polynomial CONST_VECTOR_NUNITS.
22559 (aarch64_move_pointer): Take amount as a poly_int64 rather
22560 than an int.
22561 (aarch64_progress_pointer): Avoid temporary variable.
22562 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22563 the mode attribute instead of GET_MODE.
22564
22565 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22566 Alan Hayward <alan.hayward@arm.com>
22567 David Sherwood <david.sherwood@arm.com>
22568
22569 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22570 x exists before using it.
22571 (aarch64_add_constant_internal): Rename to...
22572 (aarch64_add_offset_1): ...this. Replace regnum with separate
22573 src and dest rtxes. Handle the case in which they're different,
22574 including when the offset is zero. Replace scratchreg with an rtx.
22575 Use 2 additions if there is no spare register into which we can
22576 move a 16-bit constant.
22577 (aarch64_add_constant): Delete.
22578 (aarch64_add_offset): Replace reg with separate src and dest
22579 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22580 Use aarch64_add_offset_1.
22581 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22582 an rtx rather than an int. Take the delta as a poly_int64
22583 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22584 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22585 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22586 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22587 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22588 and aarch64_add_sp.
22589 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22590 aarch64_add_constant.
22591
22592 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22593
22594 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22595 Use scalar_float_mode.
22596
22597 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22598
22599 * config/aarch64/aarch64-simd.md
22600 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22601 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22602 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22603 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22604 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22605 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22606 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22607 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22608 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22609 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22610
22611 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22612
22613 PR target/83514
22614 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22615 targ_options->x_arm_arch_string is non NULL.
22616
22617 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22618
22619 * config/aarch64/aarch64.h
22620 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22621
22622 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22623
22624 PR target/82096
22625 * expmed.c (emit_store_flag_force): Swap if const op0
22626 and change VOIDmode to mode of op0.
22627
22628 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22629
22630 PR rtl-optimization/83761
22631 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22632 than bytes to mode_for_size.
22633
22634 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22635
22636 PR middle-end/83189
22637 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22638 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22639 profile.
22640
22641 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22642
22643 PR middle-end/83575
22644 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22645 when in layout mode.
22646 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22647 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22648 partition fixup.
22649
22650 2018-01-10 Michael Collison <michael.collison@arm.com>
22651
22652 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22653 * config/aarch64/aarch64-option-extension.def: Add
22654 AARCH64_OPT_EXTENSION of 'fp16fml'.
22655 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22656 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22657 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22658 * config/aarch64/constraints.md (Ui7): New constraint.
22659 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22660 (VFMLA_SEL_W): Ditto.
22661 (f16quad): Ditto.
22662 (f16mac1): Ditto.
22663 (VFMLA16_LOW): New int iterator.
22664 (VFMLA16_HIGH): Ditto.
22665 (UNSPEC_FMLAL): New unspec.
22666 (UNSPEC_FMLSL): Ditto.
22667 (UNSPEC_FMLAL2): Ditto.
22668 (UNSPEC_FMLSL2): Ditto.
22669 (f16mac): New code attribute.
22670 * config/aarch64/aarch64-simd-builtins.def
22671 (aarch64_fmlal_lowv2sf): Ditto.
22672 (aarch64_fmlsl_lowv2sf): Ditto.
22673 (aarch64_fmlalq_lowv4sf): Ditto.
22674 (aarch64_fmlslq_lowv4sf): Ditto.
22675 (aarch64_fmlal_highv2sf): Ditto.
22676 (aarch64_fmlsl_highv2sf): Ditto.
22677 (aarch64_fmlalq_highv4sf): Ditto.
22678 (aarch64_fmlslq_highv4sf): Ditto.
22679 (aarch64_fmlal_lane_lowv2sf): Ditto.
22680 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22681 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22682 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22683 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22684 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22685 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22686 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22687 (aarch64_fmlal_lane_highv2sf): Ditto.
22688 (aarch64_fmlsl_lane_highv2sf): Ditto.
22689 (aarch64_fmlal_laneq_highv2sf): Ditto.
22690 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22691 (aarch64_fmlalq_lane_highv4sf): Ditto.
22692 (aarch64_fmlsl_lane_highv4sf): Ditto.
22693 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22694 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22695 * config/aarch64/aarch64-simd.md:
22696 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22697 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22698 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22699 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22700 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22701 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22702 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22703 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22704 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22705 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22706 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22707 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22708 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22709 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22710 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22711 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22712 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22713 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22714 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22715 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22716 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22717 (vfmlsl_low_u32): Ditto.
22718 (vfmlalq_low_u32): Ditto.
22719 (vfmlslq_low_u32): Ditto.
22720 (vfmlal_high_u32): Ditto.
22721 (vfmlsl_high_u32): Ditto.
22722 (vfmlalq_high_u32): Ditto.
22723 (vfmlslq_high_u32): Ditto.
22724 (vfmlal_lane_low_u32): Ditto.
22725 (vfmlsl_lane_low_u32): Ditto.
22726 (vfmlal_laneq_low_u32): Ditto.
22727 (vfmlsl_laneq_low_u32): Ditto.
22728 (vfmlalq_lane_low_u32): Ditto.
22729 (vfmlslq_lane_low_u32): Ditto.
22730 (vfmlalq_laneq_low_u32): Ditto.
22731 (vfmlslq_laneq_low_u32): Ditto.
22732 (vfmlal_lane_high_u32): Ditto.
22733 (vfmlsl_lane_high_u32): Ditto.
22734 (vfmlal_laneq_high_u32): Ditto.
22735 (vfmlsl_laneq_high_u32): Ditto.
22736 (vfmlalq_lane_high_u32): Ditto.
22737 (vfmlslq_lane_high_u32): Ditto.
22738 (vfmlalq_laneq_high_u32): Ditto.
22739 (vfmlslq_laneq_high_u32): Ditto.
22740 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22741 (AARCH64_FL_FOR_ARCH8_4): New.
22742 (AARCH64_ISA_F16FML): New ISA flag.
22743 (TARGET_F16FML): New feature flag for fp16fml.
22744 (doc/invoke.texi): Document new fp16fml option.
22745
22746 2018-01-10 Michael Collison <michael.collison@arm.com>
22747
22748 * config/aarch64/aarch64-builtins.c:
22749 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22750 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22751 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22752 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22753 (AARCH64_ISA_SHA3): New ISA flag.
22754 (TARGET_SHA3): New feature flag for sha3.
22755 * config/aarch64/iterators.md (sha512_op): New int attribute.
22756 (CRYPTO_SHA512): New int iterator.
22757 (UNSPEC_SHA512H): New unspec.
22758 (UNSPEC_SHA512H2): Ditto.
22759 (UNSPEC_SHA512SU0): Ditto.
22760 (UNSPEC_SHA512SU1): Ditto.
22761 * config/aarch64/aarch64-simd-builtins.def
22762 (aarch64_crypto_sha512hqv2di): New builtin.
22763 (aarch64_crypto_sha512h2qv2di): Ditto.
22764 (aarch64_crypto_sha512su0qv2di): Ditto.
22765 (aarch64_crypto_sha512su1qv2di): Ditto.
22766 (aarch64_eor3qv8hi): Ditto.
22767 (aarch64_rax1qv2di): Ditto.
22768 (aarch64_xarqv2di): Ditto.
22769 (aarch64_bcaxqv8hi): Ditto.
22770 * config/aarch64/aarch64-simd.md:
22771 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22772 (aarch64_crypto_sha512su0qv2di): Ditto.
22773 (aarch64_crypto_sha512su1qv2di): Ditto.
22774 (aarch64_eor3qv8hi): Ditto.
22775 (aarch64_rax1qv2di): Ditto.
22776 (aarch64_xarqv2di): Ditto.
22777 (aarch64_bcaxqv8hi): Ditto.
22778 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22779 (vsha512h2q_u64): Ditto.
22780 (vsha512su0q_u64): Ditto.
22781 (vsha512su1q_u64): Ditto.
22782 (veor3q_u16): Ditto.
22783 (vrax1q_u64): Ditto.
22784 (vxarq_u64): Ditto.
22785 (vbcaxq_u16): Ditto.
22786 * config/arm/types.md (crypto_sha512): New type attribute.
22787 (crypto_sha3): Ditto.
22788 (doc/invoke.texi): Document new sha3 option.
22789
22790 2018-01-10 Michael Collison <michael.collison@arm.com>
22791
22792 * config/aarch64/aarch64-builtins.c:
22793 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22794 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22795 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22796 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22797 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22798 (AARCH64_ISA_SM4): New ISA flag.
22799 (TARGET_SM4): New feature flag for sm4.
22800 * config/aarch64/aarch64-simd-builtins.def
22801 (aarch64_sm3ss1qv4si): Ditto.
22802 (aarch64_sm3tt1aq4si): Ditto.
22803 (aarch64_sm3tt1bq4si): Ditto.
22804 (aarch64_sm3tt2aq4si): Ditto.
22805 (aarch64_sm3tt2bq4si): Ditto.
22806 (aarch64_sm3partw1qv4si): Ditto.
22807 (aarch64_sm3partw2qv4si): Ditto.
22808 (aarch64_sm4eqv4si): Ditto.
22809 (aarch64_sm4ekeyqv4si): Ditto.
22810 * config/aarch64/aarch64-simd.md:
22811 (aarch64_sm3ss1qv4si): Ditto.
22812 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22813 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22814 (aarch64_sm4eqv4si): Ditto.
22815 (aarch64_sm4ekeyqv4si): Ditto.
22816 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22817 (sm3part_op): Ditto.
22818 (CRYPTO_SM3TT): Ditto.
22819 (CRYPTO_SM3PART): Ditto.
22820 (UNSPEC_SM3SS1): New unspec.
22821 (UNSPEC_SM3TT1A): Ditto.
22822 (UNSPEC_SM3TT1B): Ditto.
22823 (UNSPEC_SM3TT2A): Ditto.
22824 (UNSPEC_SM3TT2B): Ditto.
22825 (UNSPEC_SM3PARTW1): Ditto.
22826 (UNSPEC_SM3PARTW2): Ditto.
22827 (UNSPEC_SM4E): Ditto.
22828 (UNSPEC_SM4EKEY): Ditto.
22829 * config/aarch64/constraints.md (Ui2): New constraint.
22830 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22831 * config/arm/types.md (crypto_sm3): New type attribute.
22832 (crypto_sm4): Ditto.
22833 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22834 (vsm3tt1aq_u32): Ditto.
22835 (vsm3tt1bq_u32): Ditto.
22836 (vsm3tt2aq_u32): Ditto.
22837 (vsm3tt2bq_u32): Ditto.
22838 (vsm3partw1q_u32): Ditto.
22839 (vsm3partw2q_u32): Ditto.
22840 (vsm4eq_u32): Ditto.
22841 (vsm4ekeyq_u32): Ditto.
22842 (doc/invoke.texi): Document new sm4 option.
22843
22844 2018-01-10 Michael Collison <michael.collison@arm.com>
22845
22846 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22847 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22848 (AARCH64_FL_FOR_ARCH8_4): New.
22849 (AARCH64_FL_V8_4): New flag.
22850 (doc/invoke.texi): Document new armv8.4-a option.
22851
22852 2018-01-10 Michael Collison <michael.collison@arm.com>
22853
22854 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22855 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22856 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22857 * config/aarch64/aarch64-option-extension.def: Add
22858 AARCH64_OPT_EXTENSION of 'sha2'.
22859 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22860 (crypto): Disable sha2 and aes if crypto disabled.
22861 (crypto): Enable aes and sha2 if enabled.
22862 (simd): Disable sha2 and aes if simd disabled.
22863 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22864 New flags.
22865 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22866 (TARGET_SHA2): New feature flag for sha2.
22867 (TARGET_AES): New feature flag for aes.
22868 * config/aarch64/aarch64-simd.md:
22869 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22870 conditional on TARGET_AES.
22871 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22872 (aarch64_crypto_sha1hsi): Make pattern conditional
22873 on TARGET_SHA2.
22874 (aarch64_crypto_sha1hv4si): Ditto.
22875 (aarch64_be_crypto_sha1hv4si): Ditto.
22876 (aarch64_crypto_sha1su1v4si): Ditto.
22877 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22878 (aarch64_crypto_sha1su0v4si): Ditto.
22879 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22880 (aarch64_crypto_sha256su0v4si): Ditto.
22881 (aarch64_crypto_sha256su1v4si): Ditto.
22882 (doc/invoke.texi): Document new aes and sha2 options.
22883
22884 2018-01-10 Martin Sebor <msebor@redhat.com>
22885
22886 PR tree-optimization/83781
22887 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22888 as string arrays.
22889
22890 2018-01-11 Martin Sebor <msebor@gmail.com>
22891 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22892
22893 PR tree-optimization/83501
22894 PR tree-optimization/81703
22895
22896 * tree-ssa-strlen.c (get_string_cst): Rename...
22897 (get_string_len): ...to this. Handle global constants.
22898 (handle_char_store): Adjust.
22899
22900 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22901 Jim Wilson <jimw@sifive.com>
22902
22903 * config/riscv/riscv-protos.h (riscv_output_return): New.
22904 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22905 (riscv_attribute_table, riscv_output_return),
22906 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22907 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22908 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22909 function.
22910 (riscv_expand_prologue): Add early return for naked function.
22911 (riscv_expand_epilogue): Likewise.
22912 (riscv_function_ok_for_sibcall): Return false for naked function.
22913 (riscv_set_current_function): New.
22914 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22915 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22916 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22917 * doc/extend.texi (RISC-V Function Attributes): New.
22918
22919 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22920
22921 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22922 check for 128-bit long double before checking TCmode.
22923 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22924 128-bit long doubles before checking TFmode or TCmode.
22925 (FLOAT128_IBM_P): Likewise.
22926
22927 2018-01-10 Martin Sebor <msebor@redhat.com>
22928
22929 PR tree-optimization/83671
22930 * builtins.c (c_strlen): Unconditionally return zero for the empty
22931 string.
22932 Use -Warray-bounds for warnings.
22933 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22934 for non-constant array indices with COMPONENT_REF, arrays of
22935 arrays, and pointers to arrays.
22936 (gimple_fold_builtin_strlen): Determine and set length range for
22937 non-constant character arrays.
22938
22939 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22940
22941 PR middle-end/81897
22942 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22943 empty blocks.
22944
22945 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22946
22947 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22948
22949 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22950
22951 PR target/83399
22952 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22953 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22954 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22955 indexed_or_indirect_operand predicate.
22956 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22957 (*vsx_le_perm_load_v8hi): Likewise.
22958 (*vsx_le_perm_load_v16qi): Likewise.
22959 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22960 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22961 (*vsx_le_perm_store_v8hi): Likewise.
22962 (*vsx_le_perm_store_v16qi): Likewise.
22963 (eight unnamed splitters): Likewise.
22964
22965 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22966
22967 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22968 * config/rs6000/emmintrin.h: Likewise.
22969 * config/rs6000/mmintrin.h: Likewise.
22970 * config/rs6000/xmmintrin.h: Likewise.
22971
22972 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22973
22974 PR c++/43486
22975 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22976 "public_flag".
22977 * tree.c (tree_nop_conversion): Return true for location wrapper
22978 nodes.
22979 (maybe_wrap_with_location): New function.
22980 (selftest::check_strip_nops): New function.
22981 (selftest::test_location_wrappers): New function.
22982 (selftest::tree_c_tests): Call it.
22983 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22984 (maybe_wrap_with_location): New decl.
22985 (EXPR_LOCATION_WRAPPER_P): New macro.
22986 (location_wrapper_p): New inline function.
22987 (tree_strip_any_location_wrapper): New inline function.
22988
22989 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22990
22991 PR target/83735
22992 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22993 stack_realign_offset for the largest alignment of stack slot
22994 actually used.
22995 (ix86_find_max_used_stack_alignment): New function.
22996 (ix86_finalize_stack_frame_flags): Use it. Set
22997 max_used_stack_alignment if we don't realign stack.
22998 * config/i386/i386.h (machine_function): Add
22999 max_used_stack_alignment.
23000
23001 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23002
23003 * config/arm/arm.opt (-mbranch-cost): New option.
23004 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23005 account.
23006
23007 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23008
23009 PR target/83629
23010 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23011 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23012
23013 2018-01-10 Richard Biener <rguenther@suse.de>
23014
23015 PR debug/83765
23016 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23017 early out so it also covers the case where we have a non-NULL
23018 origin.
23019
23020 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23021
23022 PR tree-optimization/83753
23023 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23024 for non-strided grouped accesses if the number of elements is 1.
23025
23026 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23027
23028 PR target/81616
23029 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23030 * i386.h (TARGET_USE_GATHER): Define.
23031 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23032
23033 2018-01-10 Martin Liska <mliska@suse.cz>
23034
23035 PR bootstrap/82831
23036 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23037 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23038 partitioning.
23039 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23040 CLEANUP_NO_PARTITIONING is not set.
23041
23042 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23043
23044 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23045 for vectors, as a partial revert of r254296.
23046 * rtl.h (const_vec_p): Delete.
23047 (const_vec_duplicate_p): Don't test for vector CONSTs.
23048 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23049 * expmed.c (make_tree): Likewise.
23050
23051 Revert:
23052 * common.md (E, F): Use CONSTANT_P instead of checking for
23053 CONST_VECTOR.
23054 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23055 checking for CONST_VECTOR.
23056
23057 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23058
23059 PR middle-end/83575
23060 * predict.c (force_edge_cold): Handle in more sane way edges
23061 with no prediction.
23062
23063 2018-01-09 Carl Love <cel@us.ibm.com>
23064
23065 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23066 V4SI, V4SF types.
23067 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23068 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23069 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23070 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23071 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23072 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23073 * config/rs6000/rs6000-protos.h: Add extern defition for
23074 rs6000_generate_float2_double_code.
23075 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23076 function.
23077 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23078 (float2_v2df): Add define_expand.
23079
23080 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23081
23082 PR target/83628
23083 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23084 op_mode in the force_to_mode call.
23085
23086 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23087
23088 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23089 instead of checking each element individually.
23090 (aarch64_evpc_uzp): Likewise.
23091 (aarch64_evpc_zip): Likewise.
23092 (aarch64_evpc_ext): Likewise.
23093 (aarch64_evpc_rev): Likewise.
23094 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23095 instead of checking each element individually. Return true without
23096 generating rtl if
23097 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23098 whether all selected elements come from the same input, instead of
23099 checking each element individually. Remove calls to gen_rtx_REG,
23100 start_sequence and end_sequence and instead assert that no rtl is
23101 generated.
23102
23103 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23104
23105 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23106 order of HIGH and CONST checks.
23107
23108 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23109
23110 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23111 if the destination isn't an SSA_NAME.
23112
23113 2018-01-09 Richard Biener <rguenther@suse.de>
23114
23115 PR tree-optimization/83668
23116 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23117 move prologue...
23118 (canonicalize_loop_form): ... here, renamed from ...
23119 (canonicalize_loop_closed_ssa_form): ... this and amended to
23120 swap successor edges for loop exit blocks to make us use
23121 the RPO order we need for initial schedule generation.
23122
23123 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23124
23125 PR tree-optimization/64811
23126 * match.pd: When optimizing comparisons with Inf, avoid
23127 introducing or losing exceptions from comparisons with NaN.
23128
23129 2018-01-09 Martin Liska <mliska@suse.cz>
23130
23131 PR sanitizer/82517
23132 * asan.c (shadow_mem_size): Add gcc_assert.
23133
23134 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23135
23136 Don't save registers in main().
23137
23138 PR target/83738
23139 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23140 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23141 * config/avr/avr.c (avr_set_current_function): Don't error if
23142 naked, OS_task or OS_main are specified at the same time.
23143 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23144 OS_main.
23145 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23146 attribute.
23147 * common/config/avr/avr-common.c (avr_option_optimization_table):
23148 Switch on -mmain-is-OS_task for optimizing compilations.
23149
23150 2018-01-09 Richard Biener <rguenther@suse.de>
23151
23152 PR tree-optimization/83572
23153 * graphite.c: Include cfganal.h.
23154 (graphite_transform_loops): Connect infinite loops to exit
23155 and remove fake edges at the end.
23156
23157 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23158
23159 * ipa-inline.c (edge_badness): Revert accidental checkin.
23160
23161 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23162
23163 PR ipa/80763
23164 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23165 symbols; not inline clones.
23166
23167 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23168
23169 PR target/83507
23170 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23171 hard registers. Formatting fixes.
23172
23173 PR preprocessor/83722
23174 * gcc.c (try_generate_repro): Pass
23175 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23176 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23177 do_report_bug.
23178
23179 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23180 Kito Cheng <kito.cheng@gmail.com>
23181
23182 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23183 (riscv_leaf_function_p): Delete.
23184 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23185
23186 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23187
23188 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23189 function.
23190 (do_ifelse): New function.
23191 (do_isel): New function.
23192 (do_sub3): New function.
23193 (do_add3): New function.
23194 (do_load_mask_compare): New function.
23195 (do_overlap_load_compare): New function.
23196 (expand_compare_loop): New function.
23197 (expand_block_compare): Call expand_compare_loop() when appropriate.
23198 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23199 option description.
23200 (-mblock-compare-inline-loop-limit): New option.
23201
23202 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23203
23204 PR target/83677
23205 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23206 Reverse order of second and third operands in first alternative.
23207 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23208 of first and second elements in UNSPEC_VPERMR vector.
23209 (altivec_expand_vec_perm_le): Likewise.
23210
23211 2018-01-08 Jeff Law <law@redhat.com>
23212
23213 PR rtl-optimizatin/81308
23214 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23215 (process_switch): If group_case_labels makes a change, then set
23216 cfg_altered.
23217 (pass_convert_switch::execute): If a switch is converted, then
23218 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23219
23220 PR rtl-optimization/81308
23221 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23222 splitting insns.
23223
23224 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23225
23226 PR target/83663 - Revert r255946
23227 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23228 generation for cases where splatting a value is not useful.
23229 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23230 across a vec_duplicate and a paradoxical subreg forming a vector
23231 mode to a vec_concat.
23232
23233 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23234
23235 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23236 -march=armv8.3-a variants.
23237 * config/arm/t-multilib: Likewise.
23238 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23239
23240 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23241
23242 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23243 to generate rtl.
23244 (cceq_ior_compare_complement): Give it a name so I can use it, and
23245 change boolean_or_operator predicate to boolean_operator so it can
23246 be used to generate a crand.
23247 (eqne): New code iterator.
23248 (bd/bd_neg): New code_attrs.
23249 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23250 a single define_insn.
23251 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23252 decrement (bdnzt/bdnzf/bdzt/bdzf).
23253 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23254 with the new names of the branch decrement patterns, and added the
23255 names of the branch decrement conditional patterns.
23256
23257 2018-01-08 Richard Biener <rguenther@suse.de>
23258
23259 PR tree-optimization/83563
23260 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23261 cache.
23262
23263 2018-01-08 Richard Biener <rguenther@suse.de>
23264
23265 PR middle-end/83713
23266 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23267
23268 2018-01-08 Richard Biener <rguenther@suse.de>
23269
23270 PR tree-optimization/83685
23271 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23272 references to abnormals.
23273
23274 2018-01-08 Richard Biener <rguenther@suse.de>
23275
23276 PR lto/83719
23277 * dwarf2out.c (output_indirect_strings): Handle empty
23278 skeleton_debug_str_hash.
23279 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23280
23281 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23282
23283 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23284 (emit_store_direct): Likewise.
23285 (arc_trampoline_adjust_address): Likewise.
23286 (arc_asm_trampoline_template): New function.
23287 (arc_initialize_trampoline): Use asm_trampoline_template.
23288 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23289 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23290 * config/arc/arc.md (flush_icache): Delete pattern.
23291
23292 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23293
23294 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23295 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23296 munaligned-access.
23297
23298 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23299
23300 PR target/83681
23301 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23302 by not USED_FOR_TARGET.
23303 (make_pass_resolve_sw_modes): Likewise.
23304
23305 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23306
23307 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23308 USED_FOR_TARGET.
23309
23310 2018-01-08 Richard Biener <rguenther@suse.de>
23311
23312 PR middle-end/83580
23313 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23314
23315 2018-01-08 Richard Biener <rguenther@suse.de>
23316
23317 PR middle-end/83517
23318 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23319
23320 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23321
23322 PR middle-end/81897
23323 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23324 basic blocks with a small number of successors.
23325 (convert_control_dep_chain_into_preds): Improve handling of
23326 forwarder blocks.
23327 (dump_predicates): Split apart into...
23328 (dump_pred_chain): ...here...
23329 (dump_pred_info): ...and here.
23330 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23331 (can_chain_union_be_invalidated_p): Improve check for invalidation
23332 of paths.
23333 (uninit_uses_cannot_happen): Avoid unnecessary if
23334 convert_control_dep_chain_into_preds yielded nothing.
23335
23336 2018-01-06 Martin Sebor <msebor@redhat.com>
23337
23338 PR tree-optimization/83640
23339 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23340 subtracting negative offset from size.
23341 (builtin_access::overlap): Adjust offset bounds of the access to fall
23342 within the size of the object if possible.
23343
23344 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23345
23346 PR rtl-optimization/83699
23347 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23348 extract_bit_field_as_subreg to cases in which the extracted
23349 value is also a vector.
23350
23351 * lra-constraints.c (process_alt_operands): Test for the equivalence
23352 substitutions when detecting a possible reload cycle.
23353
23354 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23355
23356 PR debug/83480
23357 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23358 by default if flag_selective_schedling{,2}. Formatting fixes.
23359
23360 PR rtl-optimization/83682
23361 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23362 if it has non-VECTOR_MODE element mode.
23363 (vec_duplicate_p): Likewise.
23364
23365 PR middle-end/83694
23366 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23367 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23368
23369 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23370
23371 PR target/83604
23372 * config/i386/i386-builtin.def
23373 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23374 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23375 Require also OPTION_MASK_ISA_AVX512F in addition to
23376 OPTION_MASK_ISA_GFNI.
23377 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23378 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23379 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23380 to OPTION_MASK_ISA_GFNI.
23381 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23382 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23383 OPTION_MASK_ISA_AVX512BW.
23384 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23385 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23386 addition to OPTION_MASK_ISA_GFNI.
23387 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23388 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23389 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23390 to OPTION_MASK_ISA_GFNI.
23391 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23392 a requirement for all ISAs rather than any of them with a few
23393 exceptions.
23394 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23395 processing.
23396 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23397 bitmasks to be enabled with 3 exceptions, instead of requiring any
23398 enabled ISA with lots of exceptions.
23399 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23400 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23401 Change avx512bw in isa attribute to avx512f.
23402 * config/i386/sgxintrin.h: Add license boilerplate.
23403 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23404 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23405 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23406 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23407 defined.
23408 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23409 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23410 temporarily sse2 rather than sse if not enabled already.
23411
23412 PR target/83604
23413 * config/i386/sse.md (VI248_VLBW): Rename to ...
23414 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23415 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23416 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23417 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23418 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23419 mode iterator instead of VI248_VLBW.
23420
23421 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23422
23423 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23424 (record_modified): Skip clobbers; add debug output.
23425 (param_change_prob): Use sreal frequencies.
23426
23427 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23428
23429 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23430 punt for user-aligned variables.
23431
23432 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23433
23434 * tree-chrec.c (chrec_contains_symbols): Return true for
23435 POLY_INT_CST.
23436
23437 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23438
23439 PR target/82439
23440 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23441 of (x|y) == x for BICS pattern.
23442
23443 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23444
23445 PR tree-optimization/83605
23446 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23447 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23448 can throw.
23449
23450 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23451
23452 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23453 * config/epiphany/rtems.h: New file.
23454
23455 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23456 Uros Bizjak <ubizjak@gmail.com>
23457
23458 PR target/83554
23459 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23460 QIreg_operand instead of register_operand predicate.
23461 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23462 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23463 comments instead of -fmitigate[-_]rop.
23464
23465 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23466
23467 PR bootstrap/81926
23468 * cgraphunit.c (symbol_table::compile): Switch to text_section
23469 before calling assembly_start debug hook.
23470 * run-rtl-passes.c (run_rtl_passes): Likewise.
23471 Include output.h.
23472
23473 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23474
23475 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23476 range_int_cst_p rather than !symbolic_range_p before calling
23477 extract_range_from_multiplicative_op_1.
23478
23479 2018-01-04 Jeff Law <law@redhat.com>
23480
23481 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23482 redundant test in assertion.
23483
23484 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23485
23486 * doc/rtl.texi: Document machine_mode wrapper classes.
23487
23488 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23489
23490 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23491 using tree_to_uhwi.
23492
23493 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23494
23495 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23496 the VEC_PERM_EXPR fold to fail.
23497
23498 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23499
23500 PR debug/83585
23501 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23502 to switched_sections.
23503
23504 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23505
23506 PR target/83680
23507 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23508 test for d.testing.
23509
23510 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23511
23512 PR target/83387
23513 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23514 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23515
23516 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23517
23518 PR debug/83666
23519 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23520 is BLKmode and bitpos not zero or mode change is needed.
23521
23522 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23523
23524 PR target/83675
23525 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23526 TARGET_VIS2.
23527
23528 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23529
23530 PR target/83628
23531 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23532 instead of MULT rtx. Update all corresponding splitters.
23533 (*saddl_se): Ditto.
23534 (*ssub<modesuffix>): Ditto.
23535 (*ssubl_se): Ditto.
23536 (*cmp_sadd_di): Update split patterns.
23537 (*cmp_sadd_si): Ditto.
23538 (*cmp_sadd_sidi): Ditto.
23539 (*cmp_ssub_di): Ditto.
23540 (*cmp_ssub_si): Ditto.
23541 (*cmp_ssub_sidi): Ditto.
23542 * config/alpha/predicates.md (const23_operand): New predicate.
23543 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23544 Look for ASHIFT, not MULT inner operand.
23545 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23546
23547 2018-01-04 Martin Liska <mliska@suse.cz>
23548
23549 PR gcov-profile/83669
23550 * gcov.c (output_intermediate_file): Add version to intermediate
23551 gcov file.
23552 * doc/gcov.texi: Document new field 'version' in intermediate
23553 file format. Fix location of '-k' option of gcov command.
23554
23555 2018-01-04 Martin Liska <mliska@suse.cz>
23556
23557 PR ipa/82352
23558 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23559
23560 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23561
23562 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23563
23564 2018-01-03 Martin Sebor <msebor@redhat.com>
23565
23566 PR tree-optimization/83655
23567 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23568 checking calls with invalid arguments.
23569
23570 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23571
23572 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23573 (vectorizable_mask_load_store): Delete.
23574 (vectorizable_call): Return false for masked loads and stores.
23575 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23576 instead of gimple_assign_rhs1.
23577 (vectorizable_load): Handle IFN_MASK_LOAD.
23578 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23579
23580 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23581
23582 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23583 split out from..,
23584 (vectorizable_mask_load_store): ...here.
23585 (vectorizable_load): ...and here.
23586
23587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23588
23589 * tree-vect-stmts.c (vect_build_all_ones_mask)
23590 (vect_build_zero_merge_argument): New functions, split out from...
23591 (vectorizable_load): ...here.
23592
23593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23594
23595 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23596 split out from...
23597 (vectorizable_mask_load_store): ...here.
23598 (vectorizable_store): ...and here.
23599
23600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23601
23602 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23603 split out from...
23604 (vectorizable_mask_load_store): ...here.
23605
23606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23607
23608 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23609 (vect_model_store_cost): Take a vec_load_store_type instead of a
23610 vect_def_type.
23611 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23612 (vect_model_store_cost): Take a vec_load_store_type instead of a
23613 vect_def_type.
23614 (vectorizable_mask_load_store): Update accordingly.
23615 (vectorizable_store): Likewise.
23616 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23617
23618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23619
23620 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23621 IFN_MASK_LOAD calls here rather than...
23622 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23623
23624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23625 Alan Hayward <alan.hayward@arm.com>
23626 David Sherwood <david.sherwood@arm.com>
23627
23628 * expmed.c (extract_bit_field_1): For vector extracts,
23629 fall back to extract_bit_field_as_subreg if vec_extract
23630 isn't available.
23631
23632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23633 Alan Hayward <alan.hayward@arm.com>
23634 David Sherwood <david.sherwood@arm.com>
23635
23636 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23637 they are variable or constant sized.
23638 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23639 slots for constant-sized data.
23640
23641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23642 Alan Hayward <alan.hayward@arm.com>
23643 David Sherwood <david.sherwood@arm.com>
23644
23645 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23646 handling COND_EXPRs with boolean comparisons, try to find a better
23647 basis for the mask type than the boolean itself.
23648
23649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23650
23651 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23652 is calculated and how it can be overridden.
23653 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23654 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23655 if defined.
23656 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23657 if nonzero.
23658
23659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23660 Alan Hayward <alan.hayward@arm.com>
23661 David Sherwood <david.sherwood@arm.com>
23662
23663 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23664 Remove the mode argument.
23665 (aarch64_simd_valid_immediate): Remove the mode and inverse
23666 arguments.
23667 * config/aarch64/iterators.md (bitsize): New iterator.
23668 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23669 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23670 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23671 aarch64_simd_valid_immediate.
23672 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23673 (aarch64_reg_or_bic_imm): Likewise.
23674 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23675 with an insn_type enum and msl with a modifier_type enum.
23676 Replace element_width with a scalar_mode. Change the shift
23677 to unsigned int. Add constructors for scalar_float_mode and
23678 scalar_int_mode elements.
23679 (aarch64_vect_float_const_representable_p): Delete.
23680 (aarch64_can_const_movi_rtx_p)
23681 (aarch64_simd_scalar_immediate_valid_for_move)
23682 (aarch64_simd_make_constant): Update call to
23683 aarch64_simd_valid_immediate.
23684 (aarch64_advsimd_valid_immediate_hs): New function.
23685 (aarch64_advsimd_valid_immediate): Likewise.
23686 (aarch64_simd_valid_immediate): Remove mode and inverse
23687 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23688 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23689 and aarch64_float_const_representable_p on the result.
23690 (aarch64_output_simd_mov_immediate): Remove mode argument.
23691 Update call to aarch64_simd_valid_immediate and use of
23692 simd_immediate_info.
23693 (aarch64_output_scalar_simd_mov_immediate): Update call
23694 accordingly.
23695
23696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23697 Alan Hayward <alan.hayward@arm.com>
23698 David Sherwood <david.sherwood@arm.com>
23699
23700 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23701 (mode_nunits): Likewise CONST_MODE_NUNITS.
23702 * machmode.def (ADJUST_NUNITS): Document.
23703 * genmodes.c (mode_data::need_nunits_adj): New field.
23704 (blank_mode): Update accordingly.
23705 (adj_nunits): New variable.
23706 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23707 parameter.
23708 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23709 listed in adj_nunits.
23710 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23711 listed in adj_nunits. Don't emit case statements for such modes.
23712 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23713 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23714 nothing if adj_nunits is nonnull.
23715 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23716 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23717 (emit_mode_fbit): Update use of print_maybe_const_decl.
23718 (emit_move_size): Likewise. Treat the array as non-const
23719 if adj_nunits.
23720 (emit_mode_adjustments): Handle adj_nunits.
23721
23722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23723
23724 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23725 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23726 (VECTOR_MODES): Use it.
23727 (make_vector_modes): Take the prefix as an argument.
23728
23729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23730 Alan Hayward <alan.hayward@arm.com>
23731 David Sherwood <david.sherwood@arm.com>
23732
23733 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23734 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23735 for MODE_VECTOR_BOOL.
23736 * machmode.def (VECTOR_BOOL_MODE): Document.
23737 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23738 (make_vector_bool_mode): New function.
23739 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23740 MODE_VECTOR_BOOL.
23741 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23742 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23743 Likewise.
23744 * stor-layout.c (int_mode_for_mode): Likewise.
23745 * tree.c (build_vector_type_for_mode): Likewise.
23746 * varasm.c (output_constant_pool_2): Likewise.
23747 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23748 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23749 for MODE_VECTOR_BOOL.
23750 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23751 of mode class checks.
23752 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23753 instead of a list of mode class checks.
23754 (expand_vector_scalar_condition): Likewise.
23755 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23756
23757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23758 Alan Hayward <alan.hayward@arm.com>
23759 David Sherwood <david.sherwood@arm.com>
23760
23761 * machmode.h (mode_size): Change from unsigned short to
23762 poly_uint16_pod.
23763 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23764 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23765 or if measurement_type is not polynomial.
23766 (fixed_size_mode::includes_p): Check for constant-sized modes.
23767 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23768 return a poly_uint16 rather than an unsigned short.
23769 (emit_mode_size): Change the type of mode_size from unsigned short
23770 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23771 (emit_mode_adjustments): Cope with polynomial vector sizes.
23772 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23773 for GET_MODE_SIZE.
23774 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23775 for GET_MODE_SIZE.
23776 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23777 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23778 * caller-save.c (setup_save_areas): Likewise.
23779 (replace_reg_with_saved_mem): Likewise.
23780 * calls.c (emit_library_call_value_1): Likewise.
23781 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23782 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23783 (gen_lowpart_for_combine): Likewise.
23784 * convert.c (convert_to_integer_1): Likewise.
23785 * cse.c (equiv_constant, cse_insn): Likewise.
23786 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23787 (cselib_subst_to_values): Likewise.
23788 * dce.c (word_dce_process_block): Likewise.
23789 * df-problems.c (df_word_lr_mark_ref): Likewise.
23790 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23791 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23792 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23793 (rtl_for_decl_location): Likewise.
23794 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23795 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23796 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23797 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23798 (expand_expr_real_1): Likewise.
23799 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23800 (pad_below): Likewise.
23801 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23802 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23803 * ira.c (get_subreg_tracking_sizes): Likewise.
23804 * ira-build.c (ira_create_allocno_objects): Likewise.
23805 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23806 (ira_sort_regnos_for_alter_reg): Likewise.
23807 * ira-costs.c (record_operand_costs): Likewise.
23808 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23809 (resolve_simple_move): Likewise.
23810 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23811 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23812 (lra_constraints): Likewise.
23813 (CONST_POOL_OK_P): Reject variable-sized modes.
23814 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23815 (add_pseudo_to_slot, lra_spill): Likewise.
23816 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23817 * optabs-query.c (get_best_extraction_insn): Likewise.
23818 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23819 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23820 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23821 * recog.c (offsettable_address_addr_space_p): Likewise.
23822 * regcprop.c (maybe_mode_change): Likewise.
23823 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23824 * regrename.c (build_def_use): Likewise.
23825 * regstat.c (dump_reg_info): Likewise.
23826 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23827 (find_reloads, find_reloads_subreg_address): Likewise.
23828 * reload1.c (eliminate_regs_1): Likewise.
23829 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23830 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23831 (simplify_binary_operation_1, simplify_subreg): Likewise.
23832 * targhooks.c (default_function_arg_padding): Likewise.
23833 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23834 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23835 (verify_gimple_assign_ternary): Likewise.
23836 * tree-inline.c (estimate_move_cost): Likewise.
23837 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23838 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23839 (get_address_cost_ainc): Likewise.
23840 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23841 (vect_supportable_dr_alignment): Likewise.
23842 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23843 (vectorizable_reduction): Likewise.
23844 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23845 (vectorizable_operation, vectorizable_load): Likewise.
23846 * tree.c (build_same_sized_truth_vector_type): Likewise.
23847 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23848 * var-tracking.c (emit_note_insn_var_location): Likewise.
23849 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23850 (ADDR_VEC_ALIGN): Likewise.
23851
23852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23853 Alan Hayward <alan.hayward@arm.com>
23854 David Sherwood <david.sherwood@arm.com>
23855
23856 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23857 unsigned short.
23858 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23859 or if measurement_type is polynomial.
23860 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23861 * combine.c (make_extraction): Likewise.
23862 * dse.c (find_shift_sequence): Likewise.
23863 * dwarf2out.c (mem_loc_descriptor): Likewise.
23864 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23865 (extract_bit_field, extract_low_bits): Likewise.
23866 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23867 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23868 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23869 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23870 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23871 * reload.c (find_reloads): Likewise.
23872 * reload1.c (alter_reg): Likewise.
23873 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23874 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23875 * tree-if-conv.c (predicate_mem_writes): Likewise.
23876 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23877 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23878 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23879 * valtrack.c (dead_debug_insert_temp): Likewise.
23880 * varasm.c (mergeable_constant_section): Likewise.
23881 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23882
23883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23884 Alan Hayward <alan.hayward@arm.com>
23885 David Sherwood <david.sherwood@arm.com>
23886
23887 * expr.c (expand_assignment): Cope with polynomial mode sizes
23888 when assigning to a CONCAT.
23889
23890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23891 Alan Hayward <alan.hayward@arm.com>
23892 David Sherwood <david.sherwood@arm.com>
23893
23894 * machmode.h (mode_precision): Change from unsigned short to
23895 poly_uint16_pod.
23896 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23897 short.
23898 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23899 or if measurement_type is not polynomial.
23900 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23901 in which the mode is already known to be a scalar_int_mode.
23902 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23903 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23904 initializer.
23905 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23906 for GET_MODE_PRECISION.
23907 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23908 for GET_MODE_PRECISION.
23909 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23910 as polynomial.
23911 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23912 (expand_field_assignment, make_extraction): Likewise.
23913 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23914 (get_last_value): Likewise.
23915 * convert.c (convert_to_integer_1): Likewise.
23916 * cse.c (cse_insn): Likewise.
23917 * expr.c (expand_expr_real_1): Likewise.
23918 * lra-constraints.c (simplify_operand_subreg): Likewise.
23919 * optabs-query.c (can_atomic_load_p): Likewise.
23920 * optabs.c (expand_atomic_load): Likewise.
23921 (expand_atomic_store): Likewise.
23922 * ree.c (combine_reaching_defs): Likewise.
23923 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23924 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23925 * tree.h (type_has_mode_precision_p): Likewise.
23926 * ubsan.c (instrument_si_overflow): Likewise.
23927
23928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23929 Alan Hayward <alan.hayward@arm.com>
23930 David Sherwood <david.sherwood@arm.com>
23931
23932 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23933 polynomial numbers of units.
23934 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23935 (valid_vector_subparts_p): New function.
23936 (build_vector_type): Remove temporary shim and take the number
23937 of units as a poly_uint64 rather than an int.
23938 (build_opaque_vector_type): Take the number of units as a
23939 poly_uint64 rather than an int.
23940 * tree.c (build_vector_from_ctor): Handle polynomial
23941 TYPE_VECTOR_SUBPARTS.
23942 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23943 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23944 (build_vector_from_val): If the number of units is variable,
23945 use build_vec_duplicate_cst for constant operands and
23946 VEC_DUPLICATE_EXPR otherwise.
23947 (make_vector_type): Remove temporary is_constant ().
23948 (build_vector_type, build_opaque_vector_type): Take the number of
23949 units as a poly_uint64 rather than an int.
23950 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23951 VECTOR_CST_NELTS.
23952 * cfgexpand.c (expand_debug_expr): Likewise.
23953 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23954 (store_constructor, expand_expr_real_1): Likewise.
23955 (const_scalar_mask_from_tree): Likewise.
23956 * fold-const-call.c (fold_const_reduction): Likewise.
23957 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23958 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23959 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23960 (fold_relational_const): Likewise.
23961 (native_interpret_vector): Likewise. Change the size from an
23962 int to an unsigned int.
23963 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23964 TYPE_VECTOR_SUBPARTS.
23965 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23966 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23967 duplicating a non-constant operand into a variable-length vector.
23968 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23969 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23970 * ipa-icf.c (sem_variable::equals): Likewise.
23971 * match.pd: Likewise.
23972 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23973 * print-tree.c (print_node): Likewise.
23974 * stor-layout.c (layout_type): Likewise.
23975 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23976 * tree-cfg.c (verify_gimple_comparison): Likewise.
23977 (verify_gimple_assign_binary): Likewise.
23978 (verify_gimple_assign_ternary): Likewise.
23979 (verify_gimple_assign_single): Likewise.
23980 * tree-pretty-print.c (dump_generic_node): Likewise.
23981 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23982 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23983 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23984 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23985 (vect_shift_permute_load_chain): Likewise.
23986 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23987 (expand_vector_condition, optimize_vector_constructor): Likewise.
23988 (lower_vec_perm, get_compute_type): Likewise.
23989 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23990 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23991 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23992 (vect_recog_mask_conversion_pattern): Likewise.
23993 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23994 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23995 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23996 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23997 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23998 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23999 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24000 (supportable_widening_operation): Likewise.
24001 (supportable_narrowing_operation): Likewise.
24002 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24003 Likewise.
24004 * varasm.c (output_constant): Likewise.
24005
24006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24007 Alan Hayward <alan.hayward@arm.com>
24008 David Sherwood <david.sherwood@arm.com>
24009
24010 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24011 so that both the length == 3 and length != 3 cases set up their
24012 own permute vectors. Add comments explaining why we know the
24013 number of elements is constant.
24014 (vect_permute_load_chain): Likewise.
24015
24016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24017 Alan Hayward <alan.hayward@arm.com>
24018 David Sherwood <david.sherwood@arm.com>
24019
24020 * machmode.h (mode_nunits): Change from unsigned char to
24021 poly_uint16_pod.
24022 (ONLY_FIXED_SIZE_MODES): New macro.
24023 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24024 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24025 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24026 New typedefs.
24027 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24028 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24029 or if measurement_type is not polynomial.
24030 * genmodes.c (ZERO_COEFFS): New macro.
24031 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24032 poly_uint16.
24033 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24034 Use ZERO_COEFFS when emitting initializers.
24035 * data-streamer.h (bp_pack_poly_value): New function.
24036 (bp_unpack_poly_value): Likewise.
24037 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24038 for GET_MODE_NUNITS.
24039 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24040 for GET_MODE_NUNITS.
24041 * tree.c (make_vector_type): Remove temporary shim and make
24042 the real function take the number of units as a poly_uint64
24043 rather than an int.
24044 (build_vector_type_for_mode): Handle polynomial nunits.
24045 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24046 * emit-rtl.c (const_vec_series_p_1): Likewise.
24047 (gen_rtx_CONST_VECTOR): Likewise.
24048 * fold-const.c (test_vec_duplicate_folding): Likewise.
24049 * genrecog.c (validate_pattern): Likewise.
24050 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24051 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24052 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24053 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24054 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24055 * rtlanal.c (subreg_get_info): Likewise.
24056 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24057 (vect_grouped_load_supported): Likewise.
24058 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24059 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24060 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24061 (simplify_const_unary_operation, simplify_binary_operation_1)
24062 (simplify_const_binary_operation, simplify_ternary_operation)
24063 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24064 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24065 instead of CONST_VECTOR_NUNITS.
24066 * varasm.c (output_constant_pool_2): Likewise.
24067 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24068 explicit-encoded elements in the XVEC for variable-length vectors.
24069
24070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24071
24072 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24073
24074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24075 Alan Hayward <alan.hayward@arm.com>
24076 David Sherwood <david.sherwood@arm.com>
24077
24078 * coretypes.h (fixed_size_mode): Declare.
24079 (fixed_size_mode_pod): New typedef.
24080 * builtins.h (target_builtins::x_apply_args_mode)
24081 (target_builtins::x_apply_result_mode): Change type to
24082 fixed_size_mode_pod.
24083 * builtins.c (apply_args_size, apply_result_size, result_vector)
24084 (expand_builtin_apply_args_1, expand_builtin_apply)
24085 (expand_builtin_return): Update accordingly.
24086
24087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24088
24089 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24090 * cselib.c (cselib_hash_rtx): Likewise.
24091 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24092 CONST_VECTOR encoding.
24093
24094 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24095 Jeff Law <law@redhat.com>
24096
24097 PR target/83641
24098 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24099 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24100 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24101 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24102
24103 PR target/83641
24104 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24105 explicitly probe *sp in a noreturn function if there were any callee
24106 register saves or frame pointer is needed.
24107
24108 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24109
24110 PR debug/83621
24111 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24112 BLKmode for ternary, binary or unary expressions.
24113
24114 PR debug/83645
24115 * var-tracking.c (delete_vta_debug_insn): New inline function.
24116 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24117 insns from get_insns () to NULL instead of each bb separately.
24118 Use delete_vta_debug_insn. No longer static.
24119 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24120 delete_vta_debug_insns callers.
24121 * rtl.h (delete_vta_debug_insns): Declare.
24122 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24123 instead of variable_tracking_main.
24124
24125 2018-01-03 Martin Sebor <msebor@redhat.com>
24126
24127 PR tree-optimization/83603
24128 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24129 arguments past the endof the argument list in functions declared
24130 without a prototype.
24131 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24132 Avoid checking when arguments are null.
24133
24134 2018-01-03 Martin Sebor <msebor@redhat.com>
24135
24136 PR c/83559
24137 * doc/extend.texi (attribute const): Fix a typo.
24138 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24139 issuing -Wsuggest-attribute for void functions.
24140
24141 2018-01-03 Martin Sebor <msebor@redhat.com>
24142
24143 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24144 offset_int::from instead of wide_int::to_shwi.
24145 (maybe_diag_overlap): Remove assertion.
24146 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24147 * gimple-ssa-sprintf.c (format_directive): Same.
24148 (parse_directive): Same.
24149 (sprintf_dom_walker::compute_format_length): Same.
24150 (try_substitute_return_value): Same.
24151
24152 2018-01-03 Jeff Law <law@redhat.com>
24153
24154 PR middle-end/83654
24155 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24156 non-constant residual for zero at runtime and avoid probing in
24157 that case. Reorganize code for trailing problem to mirror handling
24158 of the residual.
24159
24160 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24161
24162 PR tree-optimization/83501
24163 * tree-ssa-strlen.c (get_string_cst): New.
24164 (handle_char_store): Call get_string_cst.
24165
24166 2018-01-03 Martin Liska <mliska@suse.cz>
24167
24168 PR tree-optimization/83593
24169 * tree-ssa-strlen.c: Include tree-cfg.h.
24170 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24171 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24172 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24173 to false.
24174 (strlen_dom_walker::before_dom_children): Call
24175 gimple_purge_dead_eh_edges. Dump tranformation with details
24176 dump flags.
24177 (strlen_dom_walker::before_dom_children): Update call by adding
24178 new argument cleanup_eh.
24179 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24180
24181 2018-01-03 Martin Liska <mliska@suse.cz>
24182
24183 PR ipa/83549
24184 * cif-code.def (VARIADIC_THUNK): New enum value.
24185 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24186 thunks.
24187
24188 2018-01-03 Jan Beulich <jbeulich@suse.com>
24189
24190 * sse.md (mov<mode>_internal): Tighten condition for when to use
24191 vmovdqu<ssescalarsize> for TI and OI modes.
24192
24193 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24194
24195 Update copyright years.
24196
24197 2018-01-03 Martin Liska <mliska@suse.cz>
24198
24199 PR ipa/83594
24200 * ipa-visibility.c (function_and_variable_visibility): Skip
24201 functions with noipa attribure.
24202
24203 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24204
24205 * gcc.c (process_command): Update copyright notice dates.
24206 * gcov-dump.c (print_version): Ditto.
24207 * gcov.c (print_version): Ditto.
24208 * gcov-tool.c (print_version): Ditto.
24209 * gengtype.c (create_file): Ditto.
24210 * doc/cpp.texi: Bump @copying's copyright year.
24211 * doc/cppinternals.texi: Ditto.
24212 * doc/gcc.texi: Ditto.
24213 * doc/gccint.texi: Ditto.
24214 * doc/gcov.texi: Ditto.
24215 * doc/install.texi: Ditto.
24216 * doc/invoke.texi: Ditto.
24217
24218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24219
24220 * vector-builder.h (vector_builder::m_full_nelts): Change from
24221 unsigned int to poly_uint64.
24222 (vector_builder::full_nelts): Update prototype accordingly.
24223 (vector_builder::new_vector): Likewise.
24224 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24225 (vector_builder::operator ==): Likewise.
24226 (vector_builder::finalize): Likewise.
24227 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24228 Take the number of elements as a poly_uint64 rather than an
24229 unsigned int.
24230 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24231 from unsigned int to poly_uint64.
24232 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24233 (vec_perm_indices::new_vector): Likewise.
24234 (vec_perm_indices::length): Likewise.
24235 (vec_perm_indices::nelts_per_input): Likewise.
24236 (vec_perm_indices::input_nelts): Likewise.
24237 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24238 number of elements per input as a poly_uint64 rather than an
24239 unsigned int. Use the original encoding for variable-length
24240 vectors, rather than clamping each individual element.
24241 For the second and subsequent elements in each pattern,
24242 clamp the step and base before clamping their sum.
24243 (vec_perm_indices::series_p): Handle polynomial element counts.
24244 (vec_perm_indices::all_in_range_p): Likewise.
24245 (vec_perm_indices_to_tree): Likewise.
24246 (vec_perm_indices_to_rtx): Likewise.
24247 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24248 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24249 (tree_vector_builder::new_binary_operation): Handle polynomial
24250 element counts. Return false if we need to know the number
24251 of elements at compile time.
24252 * fold-const.c (fold_vec_perm): Punt if the number of elements
24253 isn't known at compile time.
24254
24255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24256
24257 * vec-perm-indices.h (vec_perm_builder): Change element type
24258 from HOST_WIDE_INT to poly_int64.
24259 (vec_perm_indices::element_type): Update accordingly.
24260 (vec_perm_indices::clamp): Handle polynomial element_types.
24261 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24262 (vec_perm_indices::all_in_range_p): Likewise.
24263 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24264 than shwi trees.
24265 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24266 polynomial vec_perm_indices element types.
24267 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24268 * fold-const.c (fold_vec_perm): Likewise.
24269 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24270 * tree-vect-generic.c (lower_vec_perm): Likewise.
24271 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24272 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24273 element type to HOST_WIDE_INT.
24274
24275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24276 Alan Hayward <alan.hayward@arm.com>
24277 David Sherwood <david.sherwood@arm.com>
24278
24279 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24280 rather than an int. Use plus_constant.
24281 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24282 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24283
24284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24285 Alan Hayward <alan.hayward@arm.com>
24286 David Sherwood <david.sherwood@arm.com>
24287
24288 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24289 a HOST_WIDE_INT to a poly_int64.
24290
24291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24294
24295 * calls.c (load_register_parameters): Cope with polynomial
24296 mode sizes. Require a constant size for BLKmode parameters
24297 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24298 forces a parameter to be padded at the lsb end in order to
24299 fill a complete number of words, require the parameter size
24300 to be ordered wrt UNITS_PER_WORD.
24301
24302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24303 Alan Hayward <alan.hayward@arm.com>
24304 David Sherwood <david.sherwood@arm.com>
24305
24306 * reload1.c (spill_stack_slot_width): Change element type
24307 from unsigned int to poly_uint64_pod.
24308 (alter_reg): Treat mode sizes as polynomial.
24309
24310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24311 Alan Hayward <alan.hayward@arm.com>
24312 David Sherwood <david.sherwood@arm.com>
24313
24314 * reload.c (complex_word_subreg_p): New function.
24315 (reload_inner_reg_of_subreg, push_reload): Use it.
24316
24317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24318 Alan Hayward <alan.hayward@arm.com>
24319 David Sherwood <david.sherwood@arm.com>
24320
24321 * lra-constraints.c (process_alt_operands): Reject matched
24322 operands whose sizes aren't ordered.
24323 (match_reload): Refer to this check here.
24324
24325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24326 Alan Hayward <alan.hayward@arm.com>
24327 David Sherwood <david.sherwood@arm.com>
24328
24329 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24330 that the mode size is in the set {1, 2, 4, 8, 16}.
24331
24332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24333 Alan Hayward <alan.hayward@arm.com>
24334 David Sherwood <david.sherwood@arm.com>
24335
24336 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24337 Use plus_constant instead of gen_rtx_PLUS.
24338
24339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24340 Alan Hayward <alan.hayward@arm.com>
24341 David Sherwood <david.sherwood@arm.com>
24342
24343 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24344 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24345 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24346 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24347 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24348 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24349 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24350 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24351 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24352 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24353 a poly_int64.
24354 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24355 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24356 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24357 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24358 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24359 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24360 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24361 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24362 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24363 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24364 function.
24365 * expr.c (emit_move_resolve_push): Treat the input and result
24366 of PUSH_ROUNDING as a poly_int64.
24367 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24368 (emit_push_insn): Likewise.
24369 * lra-eliminations.c (mark_not_eliminable): Likewise.
24370 * recog.c (push_operand): Likewise.
24371 * reload1.c (elimination_effects): Likewise.
24372 * rtlanal.c (nonzero_bits1): Likewise.
24373 * calls.c (store_one_arg): Likewise. Require the padding to be
24374 known at compile time.
24375
24376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24377 Alan Hayward <alan.hayward@arm.com>
24378 David Sherwood <david.sherwood@arm.com>
24379
24380 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24381 Use plus_constant instead of gen_rtx_PLUS.
24382
24383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24384 Alan Hayward <alan.hayward@arm.com>
24385 David Sherwood <david.sherwood@arm.com>
24386
24387 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24388 rather than an int.
24389
24390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24391 Alan Hayward <alan.hayward@arm.com>
24392 David Sherwood <david.sherwood@arm.com>
24393
24394 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24395 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24396 via stack temporaries. Treat the mode size as polynomial too.
24397
24398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24399 Alan Hayward <alan.hayward@arm.com>
24400 David Sherwood <david.sherwood@arm.com>
24401
24402 * expr.c (expand_expr_real_2): When handling conversions involving
24403 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24404 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24405 as a poly_uint64 too.
24406
24407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24408 Alan Hayward <alan.hayward@arm.com>
24409 David Sherwood <david.sherwood@arm.com>
24410
24411 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24412
24413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24414 Alan Hayward <alan.hayward@arm.com>
24415 David Sherwood <david.sherwood@arm.com>
24416
24417 * combine.c (can_change_dest_mode): Handle polynomial
24418 REGMODE_NATURAL_SIZE.
24419 * expmed.c (store_bit_field_1): Likewise.
24420 * expr.c (store_constructor): Likewise.
24421 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24422 and polynomial REGMODE_NATURAL_SIZE.
24423 (gen_lowpart_common): Likewise.
24424 * reginfo.c (record_subregs_of_mode): Likewise.
24425 * rtlanal.c (read_modify_subreg_p): Likewise.
24426
24427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24428 Alan Hayward <alan.hayward@arm.com>
24429 David Sherwood <david.sherwood@arm.com>
24430
24431 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24432 numbers of elements.
24433
24434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24435 Alan Hayward <alan.hayward@arm.com>
24436 David Sherwood <david.sherwood@arm.com>
24437
24438 * match.pd: Cope with polynomial numbers of vector elements.
24439
24440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24441 Alan Hayward <alan.hayward@arm.com>
24442 David Sherwood <david.sherwood@arm.com>
24443
24444 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24445 in a POINTER_PLUS_EXPR.
24446
24447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24448 Alan Hayward <alan.hayward@arm.com>
24449 David Sherwood <david.sherwood@arm.com>
24450
24451 * omp-simd-clone.c (simd_clone_subparts): New function.
24452 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24453 (ipa_simd_modify_function_body): Likewise.
24454
24455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24456 Alan Hayward <alan.hayward@arm.com>
24457 David Sherwood <david.sherwood@arm.com>
24458
24459 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24460 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24461 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24462 (expand_vector_condition, vector_element): Likewise.
24463 (subparts_gt): New function.
24464 (get_compute_type): Use subparts_gt.
24465 (count_type_subparts): Delete.
24466 (expand_vector_operations_1): Use subparts_gt instead of
24467 count_type_subparts.
24468
24469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24470 Alan Hayward <alan.hayward@arm.com>
24471 David Sherwood <david.sherwood@arm.com>
24472
24473 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24474 (vect_compile_time_alias): ...this new function. Do the calculation
24475 on poly_ints rather than trees.
24476 (vect_prune_runtime_alias_test_list): Update call accordingly.
24477
24478 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24479 Alan Hayward <alan.hayward@arm.com>
24480 David Sherwood <david.sherwood@arm.com>
24481
24482 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24483 numbers of units.
24484 (vect_schedule_slp_instance): Likewise.
24485
24486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24487 Alan Hayward <alan.hayward@arm.com>
24488 David Sherwood <david.sherwood@arm.com>
24489
24490 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24491 constant and extern definitions for variable-length vectors.
24492 (vect_get_constant_vectors): Note that the number of units
24493 is known to be constant.
24494
24495 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24496 Alan Hayward <alan.hayward@arm.com>
24497 David Sherwood <david.sherwood@arm.com>
24498
24499 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24500 of units as polynomial. Choose between WIDE and NARROW based
24501 on multiple_p.
24502
24503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24504 Alan Hayward <alan.hayward@arm.com>
24505 David Sherwood <david.sherwood@arm.com>
24506
24507 * tree-vect-stmts.c (simd_clone_subparts): New function.
24508 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24509
24510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24511 Alan Hayward <alan.hayward@arm.com>
24512 David Sherwood <david.sherwood@arm.com>
24513
24514 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24515 vectors as polynomial. Use build_index_vector for
24516 IFN_GOMP_SIMD_LANE.
24517
24518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24519 Alan Hayward <alan.hayward@arm.com>
24520 David Sherwood <david.sherwood@arm.com>
24521
24522 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24523 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24524 for variable-length vectors.
24525 (vectorizable_mask_load_store): Treat the number of units as
24526 polynomial, asserting that it is constant if the condition has
24527 already been enforced.
24528 (vectorizable_store, vectorizable_load): Likewise.
24529
24530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24531 Alan Hayward <alan.hayward@arm.com>
24532 David Sherwood <david.sherwood@arm.com>
24533
24534 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24535 of units as polynomial. Punt if we can't tell at compile time
24536 which vector contains the final result.
24537
24538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24539 Alan Hayward <alan.hayward@arm.com>
24540 David Sherwood <david.sherwood@arm.com>
24541
24542 * tree-vect-loop.c (vectorizable_induction): Treat the number
24543 of units as polynomial. Punt on SLP inductions. Use an integer
24544 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24545 cast of such a series for variable-length floating-point
24546 reductions.
24547
24548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24549 Alan Hayward <alan.hayward@arm.com>
24550 David Sherwood <david.sherwood@arm.com>
24551
24552 * tree.h (build_index_vector): Declare.
24553 * tree.c (build_index_vector): New function.
24554 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24555 of units as polynomial, forcibly converting it to a constant if
24556 vectorizable_reduction has already enforced the condition.
24557 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24558 to create a {1,2,3,...} vector.
24559 (vectorizable_reduction): Treat the number of units as polynomial.
24560 Choose vectype_in based on the largest scalar element size rather
24561 than the smallest number of units. Enforce the restrictions
24562 relied on above.
24563
24564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24565 Alan Hayward <alan.hayward@arm.com>
24566 David Sherwood <david.sherwood@arm.com>
24567
24568 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24569 number of units as polynomial.
24570
24571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24572 Alan Hayward <alan.hayward@arm.com>
24573 David Sherwood <david.sherwood@arm.com>
24574
24575 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24576 * target.def (autovectorize_vector_sizes): Return the vector sizes
24577 by pointer, using vector_sizes rather than a bitmask.
24578 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24579 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24580 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24581 Likewise.
24582 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24583 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24584 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24585 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24586 * omp-general.c (omp_max_vf): Likewise.
24587 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24588 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24589 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24590 * tree-vect-slp.c (vect_slp_bb): Likewise.
24591 * doc/tm.texi: Regenerate.
24592 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24593 to a poly_uint64.
24594 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24595 the vector size as a poly_uint64 rather than an unsigned int.
24596 (current_vector_size): Change from an unsigned int to a poly_uint64.
24597 (get_vectype_for_scalar_type): Update accordingly.
24598 * tree.h (build_truth_vector_type): Take the size and number of
24599 units as a poly_uint64 rather than an unsigned int.
24600 (build_vector_type): Add a temporary overload that takes
24601 the number of units as a poly_uint64 rather than an unsigned int.
24602 * tree.c (make_vector_type): Likewise.
24603 (build_truth_vector_type): Take the number of units as a poly_uint64
24604 rather than an unsigned int.
24605
24606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24607 Alan Hayward <alan.hayward@arm.com>
24608 David Sherwood <david.sherwood@arm.com>
24609
24610 * target.def (get_mask_mode): Take the number of units and length
24611 as poly_uint64s rather than unsigned ints.
24612 * targhooks.h (default_get_mask_mode): Update accordingly.
24613 * targhooks.c (default_get_mask_mode): Likewise.
24614 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24615 * doc/tm.texi: Regenerate.
24616
24617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24618 Alan Hayward <alan.hayward@arm.com>
24619 David Sherwood <david.sherwood@arm.com>
24620
24621 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24622 * omp-general.c (omp_max_vf): Likewise.
24623 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24624 (expand_omp_simd): Handle polynomial safelen.
24625 * omp-low.c (omplow_simd_context): Add a default constructor.
24626 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24627 (lower_rec_simd_input_clauses): Update accordingly.
24628 (lower_rec_input_clauses): Likewise.
24629
24630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24631 Alan Hayward <alan.hayward@arm.com>
24632 David Sherwood <david.sherwood@arm.com>
24633
24634 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24635 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24636 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24637 (vect_analyze_slp_cost): Likewise.
24638 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24639 (vect_model_load_cost): Likewise.
24640
24641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24642 Alan Hayward <alan.hayward@arm.com>
24643 David Sherwood <david.sherwood@arm.com>
24644
24645 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24646 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24647 from an unsigned int * to a poly_uint64_pod *.
24648 (calculate_unrolling_factor): New function.
24649 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24650
24651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24652 Alan Hayward <alan.hayward@arm.com>
24653 David Sherwood <david.sherwood@arm.com>
24654
24655 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24656 from an unsigned int to a poly_uint64.
24657 (_loop_vec_info::slp_unrolling_factor): Likewise.
24658 (_loop_vec_info::vectorization_factor): Change from an int
24659 to a poly_uint64.
24660 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24661 (vect_get_num_vectors): New function.
24662 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24663 (vect_get_num_copies): Use vect_get_num_vectors.
24664 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24665 to an unsigned int *.
24666 (vect_analyze_data_refs): Change min_vf from an int * to a
24667 poly_uint64 *.
24668 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24669 than an unsigned HOST_WIDE_INT.
24670 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24671 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24672 to an unsigned int *.
24673 (vect_analyze_data_ref_dependences): Likewise.
24674 (vect_compute_data_ref_alignment): Handle polynomial vf.
24675 (vect_enhance_data_refs_alignment): Likewise.
24676 (vect_prune_runtime_alias_test_list): Likewise.
24677 (vect_shift_permute_load_chain): Likewise.
24678 (vect_supportable_dr_alignment): Likewise.
24679 (dependence_distance_ge_vf): Take the vectorization factor as a
24680 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24681 (vect_analyze_data_refs): Change min_vf from an int * to a
24682 poly_uint64 *.
24683 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24684 vfm1 as a poly_uint64 rather than an int. Make the same change
24685 for the returned bound_scalar.
24686 (vect_gen_vector_loop_niters): Handle polynomial vf.
24687 (vect_do_peeling): Likewise. Update call to
24688 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24689 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24690 be constant.
24691 * tree-vect-loop.c (vect_determine_vectorization_factor)
24692 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24693 (vect_get_known_peeling_cost): Likewise.
24694 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24695 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24696 (vect_transform_loop): Likewise. Use the lowest possible VF when
24697 updating the upper bounds of the loop.
24698 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24699 rather than an int.
24700 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24701 polynomial unroll factors.
24702 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24703 (vect_make_slp_decision): Likewise.
24704 (vect_supported_load_permutation_p): Likewise, and polynomial
24705 vf too.
24706 (vect_analyze_slp_cost): Handle polynomial vf.
24707 (vect_slp_analyze_node_operations): Likewise.
24708 (vect_slp_analyze_bb_1): Likewise.
24709 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24710 than an unsigned HOST_WIDE_INT.
24711 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24712 (vectorizable_load): Handle polynomial vf.
24713 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24714 a poly_uint64.
24715 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24716
24717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24718 Alan Hayward <alan.hayward@arm.com>
24719 David Sherwood <david.sherwood@arm.com>
24720
24721 * match.pd: Handle bit operations involving three constants
24722 and try to fold one pair.
24723
24724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24725
24726 * tree-vect-loop-manip.c: Include gimple-fold.h.
24727 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24728 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24729 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24730 Add a path that uses a step of VF instead of 1, but disable it
24731 for now.
24732 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24733 and niters_no_overflow parameters. Update calls to
24734 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24735 Create a new SSA name if the latter choses to use a ste other
24736 than zero, and return it via niters_vector_mult_vf_var.
24737 * tree-vect-loop.c (vect_transform_loop): Update calls to
24738 vect_do_peeling, vect_gen_vector_loop_niters and
24739 slpeel_make_loop_iterate_ntimes.
24740 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24741 (vect_gen_vector_loop_niters): Update declarations after above changes.
24742
24743 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24744
24745 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24746 128-bit round to integer instructions.
24747 (ceil<mode>2): Likewise.
24748 (btrunc<mode>2): Likewise.
24749 (round<mode>2): Likewise.
24750
24751 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24752
24753 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24754 unaligned VSX load/store on P8/P9.
24755 (expand_block_clear): Allow the use of unaligned VSX
24756 load/store on P8/P9.
24757
24758 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24759
24760 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24761 New function.
24762 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24763 swap associated with both a load and a store.
24764
24765 2018-01-02 Andrew Waterman <andrew@sifive.com>
24766
24767 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24768 * config/riscv/riscv.md (clear_cache): Use it.
24769
24770 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24771
24772 * web.c: Remove out-of-date comment.
24773
24774 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24775
24776 * expr.c (fixup_args_size_notes): Check that any existing
24777 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24778 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24779 (emit_single_push_insn): ...here.
24780
24781 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24782
24783 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24784 (const_vector_encoded_nelts): New function.
24785 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24786 (const_vector_int_elt, const_vector_elt): Declare.
24787 * emit-rtl.c (const_vector_int_elt_1): New function.
24788 (const_vector_elt): Likewise.
24789 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24790 of CONST_VECTOR_ELT.
24791
24792 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24793
24794 * expr.c: Include rtx-vector-builder.h.
24795 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24796 directly on the tree encoding.
24797 (const_vector_from_tree): Likewise.
24798 * optabs.c: Include rtx-vector-builder.h.
24799 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24800 sequence of "u" values.
24801 * vec-perm-indices.c: Include rtx-vector-builder.h.
24802 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24803 directly on the vec_perm_indices encoding.
24804
24805 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24806
24807 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24808 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24809 * rtx-vector-builder.h: New file.
24810 * rtx-vector-builder.c: Likewise.
24811 * rtl.h (rtx_def::u2): Add a const_vector field.
24812 (CONST_VECTOR_NPATTERNS): New macro.
24813 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24814 (CONST_VECTOR_DUPLICATE_P): Likewise.
24815 (CONST_VECTOR_STEPPED_P): Likewise.
24816 (CONST_VECTOR_ENCODED_ELT): Likewise.
24817 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24818 (unwrap_const_vec_duplicate): Likewise.
24819 (const_vec_series_p): Check for a non-duplicated vector encoding.
24820 Say that the function only returns true for integer vectors.
24821 * emit-rtl.c: Include rtx-vector-builder.h.
24822 (gen_const_vec_duplicate_1): Delete.
24823 (gen_const_vector): Call gen_const_vec_duplicate instead of
24824 gen_const_vec_duplicate_1.
24825 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24826 (gen_const_vec_duplicate): Use rtx_vector_builder.
24827 (gen_const_vec_series): Likewise.
24828 (gen_rtx_CONST_VECTOR): Likewise.
24829 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24830 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24831 Build a new vector rather than modifying a CONST_VECTOR in-place.
24832 (handle_special_swappables): Update call accordingly.
24833 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24834 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24835 Build a new vector rather than modifying a CONST_VECTOR in-place.
24836 (handle_special_swappables): Update call accordingly.
24837
24838 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24839
24840 * simplify-rtx.c (simplify_const_binary_operation): Use
24841 CONST_VECTOR_ELT instead of XVECEXP.
24842
24843 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24844
24845 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24846 the selector elements to be different from the data elements
24847 if the selector is a VECTOR_CST.
24848 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24849 ssizetype for the selector.
24850
24851 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24852
24853 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24854 before testing each element individually.
24855 * tree-vect-generic.c (lower_vec_perm): Likewise.
24856
24857 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24858
24859 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24860 * selftest-run-tests.c (selftest::run_tests): Call it.
24861 * vector-builder.h (vector_builder::operator ==): New function.
24862 (vector_builder::operator !=): Likewise.
24863 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24864 (vec_perm_indices::all_from_input_p): New function.
24865 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24866 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24867 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24868 instead of reading the VECTOR_CST directly. Detect whether both
24869 vector inputs are the same before constructing the vec_perm_indices,
24870 and update the number of inputs argument accordingly. Use the
24871 utility functions added above. Only construct sel2 if we need to.
24872
24873 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24874
24875 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24876 the broadcast of the low byte.
24877 (expand_mult_highpart): Use an explicit encoding for the permutes.
24878 * optabs-query.c (can_mult_highpart_p): Likewise.
24879 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24880 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24881 (vectorizable_bswap): Likewise.
24882 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24883 explicit encoding for the power-of-2 permutes.
24884 (vect_permute_store_chain): Likewise.
24885 (vect_grouped_load_supported): Likewise.
24886 (vect_permute_load_chain): Likewise.
24887
24888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24889
24890 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24891 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24892 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24893 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24894 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24895 (vect_gen_perm_mask_any): Likewise.
24896
24897 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24898
24899 * int-vector-builder.h: New file.
24900 * vec-perm-indices.h: Include int-vector-builder.h.
24901 (vec_perm_indices): Redefine as an int_vector_builder.
24902 (auto_vec_perm_indices): Delete.
24903 (vec_perm_builder): Redefine as a stand-alone class.
24904 (vec_perm_indices::vec_perm_indices): New function.
24905 (vec_perm_indices::clamp): Likewise.
24906 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24907 (vec_perm_indices::new_vector): New function.
24908 (vec_perm_indices::new_expanded_vector): Update for new
24909 vec_perm_indices class.
24910 (vec_perm_indices::rotate_inputs): New function.
24911 (vec_perm_indices::all_in_range_p): Operate directly on the
24912 encoded form, without computing elided elements.
24913 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24914 encoding. Update for new vec_perm_indices class.
24915 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24916 the given vec_perm_builder.
24917 (expand_vec_perm_var): Update vec_perm_builder constructor.
24918 (expand_mult_highpart): Use vec_perm_builder instead of
24919 auto_vec_perm_indices.
24920 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24921 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24922 or double series encoding as appropriate.
24923 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24924 vec_perm_indices instead of auto_vec_perm_indices.
24925 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24926 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24927 (vect_permute_store_chain): Likewise.
24928 (vect_grouped_load_supported): Likewise.
24929 (vect_permute_load_chain): Likewise.
24930 (vect_shift_permute_load_chain): Likewise.
24931 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24932 (vect_transform_slp_perm_load): Likewise.
24933 (vect_schedule_slp_instance): Likewise.
24934 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24935 (vectorizable_mask_load_store): Likewise.
24936 (vectorizable_bswap): Likewise.
24937 (vectorizable_store): Likewise.
24938 (vectorizable_load): Likewise.
24939 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24940 vec_perm_indices instead of auto_vec_perm_indices. Use
24941 tree_to_vec_perm_builder to read the vector from a tree.
24942 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24943 vec_perm_builder instead of a vec_perm_indices.
24944 (have_whole_vector_shift): Use vec_perm_builder and
24945 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24946 truncation to calc_vec_perm_mask_for_shift.
24947 (vect_create_epilog_for_reduction): Likewise.
24948 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24949 from auto_vec_perm_indices to vec_perm_indices.
24950 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24951 instead of changing individual elements.
24952 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24953 the vector in d.perm.
24954 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24955 from auto_vec_perm_indices to vec_perm_indices.
24956 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24957 instead of changing individual elements.
24958 (arm_vectorize_vec_perm_const): Use new_vector to install
24959 the vector in d.perm.
24960 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24961 Update vec_perm_builder constructor.
24962 (rs6000_expand_interleave): Likewise.
24963 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24964 (rs6000_expand_interleave): Likewise.
24965
24966 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24967
24968 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24969 to qimode could truncate the indices.
24970 * optabs.c (expand_vec_perm_var): Likewise.
24971
24972 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24973
24974 * Makefile.in (OBJS): Add vec-perm-indices.o.
24975 * vec-perm-indices.h: New file.
24976 * vec-perm-indices.c: Likewise.
24977 * target.h (vec_perm_indices): Replace with a forward class
24978 declaration.
24979 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24980 * optabs.h: Include vec-perm-indices.h.
24981 (expand_vec_perm): Delete.
24982 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24983 (expand_vec_perm_const): Declare.
24984 * target.def (vec_perm_const_ok): Replace with...
24985 (vec_perm_const): ...this new hook.
24986 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24987 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24988 * doc/tm.texi: Regenerate.
24989 * optabs.def (vec_perm_const): Delete.
24990 * doc/md.texi (vec_perm_const): Likewise.
24991 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24992 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24993 expand_vec_perm for constant permutation vectors. Assert that
24994 the mode of variable permutation vectors is the integer equivalent
24995 of the mode that is being permuted.
24996 * optabs-query.h (selector_fits_mode_p): Declare.
24997 * optabs-query.c: Include vec-perm-indices.h.
24998 (selector_fits_mode_p): New function.
24999 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25000 is defined, instead of checking whether the vec_perm_const_optab
25001 exists. Use targetm.vectorize.vec_perm_const instead of
25002 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25003 fit in the vector mode before using a variable permute.
25004 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25005 vec_perm_indices instead of an rtx.
25006 (expand_vec_perm): Replace with...
25007 (expand_vec_perm_const): ...this new function. Take the selector
25008 as a vec_perm_indices rather than an rtx. Also take the mode of
25009 the selector. Update call to shift_amt_for_vec_perm_mask.
25010 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25011 Use vec_perm_indices::new_expanded_vector to expand the original
25012 selector into bytes. Check whether the indices fit in the vector
25013 mode before using a variable permute.
25014 (expand_vec_perm_var): Make global.
25015 (expand_mult_highpart): Use expand_vec_perm_const.
25016 * fold-const.c: Includes vec-perm-indices.h.
25017 * tree-ssa-forwprop.c: Likewise.
25018 * tree-vect-data-refs.c: Likewise.
25019 * tree-vect-generic.c: Likewise.
25020 * tree-vect-loop.c: Likewise.
25021 * tree-vect-slp.c: Likewise.
25022 * tree-vect-stmts.c: Likewise.
25023 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25024 Delete.
25025 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25026 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25027 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25028 (aarch64_vectorize_vec_perm_const): ...this new function.
25029 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25030 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25031 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25032 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25033 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25034 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25035 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25036 into...
25037 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25038 check for NEON modes.
25039 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25040 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25041 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25042 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25043 into...
25044 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25045 the old VEC_PERM_CONST conditions.
25046 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25047 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25048 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25049 (ia64_vectorize_vec_perm_const_ok): Merge into...
25050 (ia64_vectorize_vec_perm_const): ...this new function.
25051 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25052 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25053 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25054 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25055 * config/mips/mips.c (mips_expand_vec_perm_const)
25056 (mips_vectorize_vec_perm_const_ok): Merge into...
25057 (mips_vectorize_vec_perm_const): ...this new function.
25058 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25059 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25060 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25061 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25062 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25063 (rs6000_expand_vec_perm_const): Delete.
25064 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25065 Delete.
25066 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25067 (altivec_expand_vec_perm_const_le): Take each operand individually.
25068 Operate on constant selectors rather than rtxes.
25069 (altivec_expand_vec_perm_const): Likewise. Update call to
25070 altivec_expand_vec_perm_const_le.
25071 (rs6000_expand_vec_perm_const): Delete.
25072 (rs6000_vectorize_vec_perm_const_ok): Delete.
25073 (rs6000_vectorize_vec_perm_const): New function.
25074 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25075 an element count and rtx array.
25076 (rs6000_expand_extract_even): Update call accordingly.
25077 (rs6000_expand_interleave): Likewise.
25078 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25079 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25080 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25081 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25082 (rs6000_expand_vec_perm_const): Delete.
25083 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25084 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25085 (altivec_expand_vec_perm_const_le): Take each operand individually.
25086 Operate on constant selectors rather than rtxes.
25087 (altivec_expand_vec_perm_const): Likewise. Update call to
25088 altivec_expand_vec_perm_const_le.
25089 (rs6000_expand_vec_perm_const): Delete.
25090 (rs6000_vectorize_vec_perm_const_ok): Delete.
25091 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25092 reference to the SPE evmerge intructions.
25093 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25094 an element count and rtx array.
25095 (rs6000_expand_extract_even): Update call accordingly.
25096 (rs6000_expand_interleave): Likewise.
25097 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25098 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25099 new function.
25100 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25101
25102 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25103
25104 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25105 vector mode and that that mode matches the mode of the data
25106 being permuted.
25107 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25108 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25109 directly using expand_vec_perm_1 when forcing selectors into
25110 registers.
25111 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25112
25113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25114
25115 * optabs-query.h (can_vec_perm_p): Delete.
25116 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25117 * optabs-query.c (can_vec_perm_p): Split into...
25118 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25119 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25120 particular selector is valid.
25121 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25122 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25123 (vect_grouped_load_supported): Likewise.
25124 (vect_shift_permute_load_chain): Likewise.
25125 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25126 (vect_transform_slp_perm_load): Likewise.
25127 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25128 (vectorizable_bswap): Likewise.
25129 (vect_gen_perm_mask_checked): Likewise.
25130 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25131 implementations of variable permutation vectors into account
25132 when deciding which selector to use.
25133 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25134 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25135 with a false third argument.
25136 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25137 to test whether the constant selector is valid and can_vec_perm_var_p
25138 to test whether a variable selector is valid.
25139
25140 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25141
25142 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25143 * optabs-query.c (can_vec_perm_p): Likewise.
25144 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25145 instead of vec_perm_indices.
25146 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25147 (vect_gen_perm_mask_checked): Likewise,
25148 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25149 (vect_gen_perm_mask_checked): Likewise,
25150
25151 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25152
25153 * optabs-query.h (qimode_for_vec_perm): Declare.
25154 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25155 (qimode_for_vec_perm): ...this new function.
25156 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25157
25158 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25159
25160 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25161 does not have a conditional at the top.
25162
25163 2018-01-02 Richard Biener <rguenther@suse.de>
25164
25165 * ipa-inline.c (big_speedup_p): Fix expression.
25166
25167 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25168
25169 PR target/81616
25170 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25171 for generic 4->6.
25172
25173 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25174
25175 PR target/81616
25176 Generic tuning.
25177 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25178 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25179 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25180 cond_taken_branch_cost 3->4.
25181
25182 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25183
25184 PR tree-optimization/83581
25185 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25186 TODO_cleanup_cfg if any changes have been made.
25187
25188 PR middle-end/83608
25189 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25190 convert_modes if target mode has the right side, but different mode
25191 class.
25192
25193 PR middle-end/83609
25194 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25195 last argument when extracting from CONCAT. If either from_real or
25196 from_imag is NULL, use expansion through memory. If result is not
25197 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25198 the parts directly to inner mode, if even that fails, use expansion
25199 through memory.
25200
25201 PR middle-end/83623
25202 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25203 check for bswap in mode rather than HImode and use that in expand_unop
25204 too.
25205 \f
25206 Copyright (C) 2018 Free Software Foundation, Inc.
25207
25208 Copying and distribution of this file, with or without modification,
25209 are permitted in any medium without royalty provided the copyright
25210 notice and this notice are preserved.